Commit Graph

63 Commits

Author SHA1 Message Date
Matt Aitken ecd050bece Airtable integration with webhook and integration changes (#399)
* CLI create-integration command now accepts an Open AI api key

* Create integration docs separated into multiple pages

* Initial Airtable integration commit, with OpenAI generated code

* OAuth page coming soon

* Export DisplayProperty from the SDK

* TSConfig made to match GitHub’s with paths

* getRecords

* Removed duplicate Stripe job from the catalog

* Renamed Airtable apiKey option to token

* First Airtable job

* Export Collaborator and Attachment field types

* A typesafe example that uses runTask

* WIP on new integration tasks… not working yet

* Attempt with class

* Revert "Attempt with class"

This reverts commit 93a48330019f754c3216c5b49964fa4b0218bd3f.

* WIP changing how tasks work

* Mock of async local storage

* Moved client creation from constructor

* New approach with a clone method on TriggerIntegration

* Added runTask to Airtable which is used by integration tasks

* Added the Airtable icon and connection when using runTask

* base().table() is working

* runTask options moved to the 3rd param, made optional with optional name

* Added some generic arguments

* Added generic type to table

* Removed old comment

* We don’t need to repeat the icon

* getRecords and getRecord now returning the right data and types

* Creating records

* Update records

* Delete records

* The internal properties of integrations are now hidden by the TypeScript types

* Sprinkled a Prettify in there

* Improved the types

* Added Airtable to the integration catalog

* Early work on Airtable webhook registration

* More progress with webhooks

* connectionKey needs to be cloned for webhooks to work

* connectionKey needs to be cloned for webhooks to work

* It was unclear that the ActivateSourceService was using a graphileJob id

* ActivateSourceService optionally takes a jobId, if missing it generate a unique id

* When retrying trigger registration, don’t pass an id so it is generated

* Removed Airtable webhooks tasks from the job-catalog example

* Added TriggerSourceOption, removed TriggerSourceEvent

* WIP with new ExternalSource options

* ExternalSourceTrigger setup

* DynamicTrigger changed to options, will need some more work

* filter gets options passed to it

* SourceMetadata v2 renamed to SourceMetadataV2, kept original

* Started versioning the backend

* Moved param order on io.getEvent and io.cancelEvent

* The runTask stuff that allows unknown to work is back

* Indexing for v1 and v2, with version on “activateSource” schema

* Added todos, to deal with Airtable SDK calls inside the webhook handler

* “deliverHttpSourceRequest” queueName changed to the source id so they process in order

* ActivateSource changes to deal with old and new data formats

* Update existing TriggerSources to v2

* Fix for dynamic.ts typescript errors, need to revisit this later

* UpdateSourceService v1 and v2, with new v2 API endpoint

* Removed unused imports

* More progress on v1 and v2

* Airtable webhooks are now triggering a job

* Moved webhooks to a new file

* You can do API calls in the webhook handler now, Airtable webhook data is being processed

* Airtable events coming through

* Defined the Airtable table payload type

* TriggerSource metadata is being stored and used

* Removed some logs

* Added filtering and don’t allow any webhooks that use automated sources

* Resend switched to new integration

* Moved Resend test jobs to the catalog, and tested it worked

* WIP on Slack, there are compile errors

* Created a generic type that strips out indexes

* Slack updated to use new integration

* SendGrid migrated over

* Integration runTask is now allowing regular types

* Changed io.runTask types so it only allows Json-able types

* OpenAI models tasks working

* Added Airtable changes to runTask

* Removed the index signature crap from the Slack integration

* Don’t need to cast the callback result

* Updated Resend

* Re-ordered runTask params

* WIP on openai

* onAccountUpdated is Connect only

* Removed RunTaskResult

* Handle Resend errors, the official SDK doesn’t expose them properly at the moment

* Removed OmitIndexSignature

* OpenAI converted to new integration, with backwards compatible functions

* Put the openai catalog back to what it was originally

* Export a standard retry with backoff, to be used

* Use the standard exponential backoff in the integrations

* Retry options moved earlier so they can be overriden by a task

* GitHub tasks migrated

* Added sources, fixed one bundling issue

* Added GitHub jobs to catalog

* Remove duplicate options

* Deduplicate events

* Removed duplicate Job

* Switched Plain over

* Set the Plain icon

* Converted Stripe over

* Supabase adapted

* Typeform working

* Added dynamic-schedule to catalog

* Added background-fetch job catalog

* Created dynamic-triggers catalog file

* Fixed old general file with runTask param order

* Dynamic triggers working

* SendGrid updated to use the same tsconfig as other integrations

* Removed Airtable webhook, until we have batch support

* Added OAuth airtable auth example

* Created beta changeset tag

* Beta changesets for most packages

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-09-05 14:21:42 +01:00
Matt Aitken 9ff4c0dbd5 Project-wide Prettier setup (#237)
* Setup project-wide prettier

* Remove old workspace file

* Remove old debugging directives

* New top-level .prettierignore

* Updated Prettier config settings

* Contrubuting guide: Fix for some bad code blocks

* Added more ignores

* Improved the format script command

* printWidth set to 100

* Formatted entire repo (pnpm run format)
2023-08-01 10:21:22 +01:00
Akhil fdf1b2148c feat: added git database tasks for github integration (#204)
* feat: added git database tasks for github integration

* feat: added examples for git database tasks
2023-07-31 09:50:41 +01:00
Matt Aitken d4da2f322b Added GitHub getIssue Task (with example Job) 2023-07-19 16:31:55 +01:00
Matt Aitken fe3bc6efe4 Missing token/apikey error improved for display in Next.js logs 2023-07-13 16:35:21 +01:00
Matt Aitken bac8ad1040 Throw if the clients are passed an undefined apikey or token 2023-07-13 15:34:35 +01:00
Matt Aitken 32ff3f3136 @trigger.dev/github: Fixed some properties that had API urls instead of HTML urls 2023-07-05 11:12:27 +01:00
Eric Allam 23adc15ce3 Fixed the broken export issue with two of the new github tasks 2023-06-27 17:41:49 +01:00
Eric Allam e8442eedad Commenting these out for now because they break build 2023-06-23 11:59:30 +01:00
Matt Aitken d43529dce9 Added some GitHub property helpers 2023-06-22 12:02:08 +01:00
Matt Aitken 7381e5b393 GitHub addIssueAssignees and addIssueLabels 2023-06-22 12:02:08 +01:00
Matt Aitken 95787fcc66 Make the tasks user a separate owner and repo too 2023-06-22 10:49:50 +01:00
Matt Aitken 4ef76f72dc Separate GitHub repo into owner and repo, to match official SDK/API 2023-06-22 10:49:50 +01:00
Matt Aitken 0776cc884d Pull request review 2023-06-21 19:50:20 +01:00
Matt Aitken 0ad09eb11f Pull request event 2023-06-21 19:41:33 +01:00
Matt Aitken 9e8b37c6cf Added push event 2023-06-21 19:29:02 +01:00
Matt Aitken c2839934b4 Added branch and tag events 2023-06-21 19:04:14 +01:00
Matt Aitken cf9c34950f Show more of the comment body 2023-06-21 18:44:08 +01:00
Matt Aitken 56172b1e5c Star examples 2023-06-21 18:24:38 +01:00
Matt Aitken 2166929fa8 Issue commented event, not working properly because of truncate function issue 2023-06-21 17:55:16 +01:00
Matt Aitken 25f9aa8c2d Started fleshing out GitHub events with examples and more events 2023-06-21 17:00:29 +01:00
Matt Aitken b7385825b6 Added missing auth param to GitHub integration 2023-06-21 14:11:52 +01:00
Matt Aitken 5a20528cc8 @trigger.dev/github package now uses integration-kit 2023-06-21 14:02:16 +01:00
Eric Allam e4b0b1e305 Add support for background task operations, starting with fetch 2023-06-19 17:22:18 +01:00
Eric Allam e7f7c0704a Revamped the integration schema and local only integrations now work in the UI 2023-06-16 14:15:17 +01:00
Eric Allam 9f49b7f4c0 Move prisma to an internal database package 2023-06-15 14:18:34 +01:00
Eric Allam 3589d26fb3 Implement task retrying to recording task attempts 2023-06-13 15:48:07 +01:00
Matt Aitken e141aa3ff4 Added an GitHub Issue opened example 2023-06-13 10:57:06 +01:00
Eric Allam 99316df879 Adding changeset for v2 2023-06-09 14:42:50 +01:00
Eric Allam f430bcf54a Renamed elements to properties 2023-06-09 11:04:22 +01:00
Eric Allam 410efe1192 Implement @trigger.dev/nextjs package and make it work with the Next.js 13 app dir 2023-06-08 17:15:05 +01:00
Eric Allam 2ef99d8383 Re-architect pre-processing and executing jobs, and gather run elements 2023-06-07 13:12:02 +01:00
Eric Allam 8a2cd974fd Remove comboTrigger and add elements to JobVersion 2023-06-05 16:43:32 +01:00
Matt Aitken a11dea6e7f Added icon to the GitHub events 2023-05-25 12:46:58 +01:00
Eric Allam 396206ca03 Dynamic triggers now can be registered at runtime and trigger jobs 2023-05-18 14:00:54 +01:00
Eric Allam 6cafe077b4 Rename job connections to job integrations and get local integration triggers working 2023-05-17 13:52:03 +01:00
Eric Allam e0e618ac1c Get webhook deliveries working again 2023-05-16 16:34:51 +01:00
Eric Allam f6ea37381a Re-work how triggers work to better support dynamic triggers 2023-05-16 16:34:51 +01:00
Eric Allam 214546d17a WIP new stuff 2023-05-16 16:34:51 +01:00
Eric Allam 0a7ad96dcc Variants working in the new internal job system 2023-05-05 16:46:38 +01:00
Eric Allam 6d7f20b527 Moved over external source preparing and handling events into the internal job system 2023-05-05 16:09:42 +01:00
Eric Allam 8b7d847291 Added job queue system (needed for internal jobs but useful for our users as well) 2023-05-05 12:34:14 +01:00
Eric Allam c77dfae653 WIP new internal job system 2023-05-04 21:18:19 +01:00
Eric Allam 3e87e832c7 WIP trigger variants 2023-05-04 10:06:06 +01:00
Eric Allam b1a6ada443 Implement GitHub oauth and add it to the github integration 2023-05-02 13:53:37 +01:00
Eric Allam 26d537867e Integrate with the new ApiConnection system to authenticate with Slack using OAuth 2023-04-28 16:44:52 +01:00
Eric Allam 51dd20424c Implemented subtasks 2023-04-27 17:25:19 +01:00
Eric Allam 3d38b95276 Continuing nextjs support, as well as moving event matching up to the server to support tasks that can wait for a trigger 2023-04-26 14:27:34 +01:00
Eric Allam 38e0460878 nextjs support WIP 2023-04-26 14:27:34 +01:00
Eric Allam da0290e494 Adding support for connections, integrations, webhooks 2023-04-22 09:52:45 -07:00