From 7e3a82ef47119d55d7a703f09acf802cecc523a0 Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Thu, 30 Nov 2023 21:48:45 +0000 Subject: [PATCH 1/9] Issue #747: Add Stripe invoice triggers --- .changeset/fluffy-rocks-prove.md | 5 + docs/integrations/apis/stripe.mdx | 15 + integrations/stripe/src/events.ts | 659 +++++++++++++++++++++++++++++ integrations/stripe/src/index.ts | 119 ++++++ integrations/stripe/src/schemas.ts | 26 +- integrations/stripe/src/types.ts | 4 + 6 files changed, 825 insertions(+), 3 deletions(-) create mode 100644 .changeset/fluffy-rocks-prove.md diff --git a/.changeset/fluffy-rocks-prove.md b/.changeset/fluffy-rocks-prove.md new file mode 100644 index 000000000..c0dabae38 --- /dev/null +++ b/.changeset/fluffy-rocks-prove.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/stripe": patch +--- + +Added invoice and invoice item webhook triggers diff --git a/docs/integrations/apis/stripe.mdx b/docs/integrations/apis/stripe.mdx index 87e2a10f5..81ad02fa7 100644 --- a/docs/integrations/apis/stripe.mdx +++ b/docs/integrations/apis/stripe.mdx @@ -140,6 +140,21 @@ Available triggers are listed below: | `onPayoutPaid` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.paid` | `onPayout` | | `onPayoutFailed` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.failed` | `onPayout` | | `onPayoutReconciliationCompleted` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.reconciliation_completed` | `onPayout` | +| `onInvoice` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.created`, `payout.updated`, `payout.canceled`, `payout.paid`, `payout.failed`, `payout.reconciliation_completed` | ✔️ | +| `onInvoiceCreated` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.created` | `onInvoice` | +| `onInvoiceFinalized` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.updated` | `onInvoice` | +| `onInvoiceFinalizationFailed` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.canceled` | `onInvoice` | +| `onInvoiceDeleted` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.paid` | `onInvoice` | +| `onInvoiceMarkedUncollectible` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.failed` | `onInvoice` | +| `onInvoicePaid` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | +| `onInvoicePaymentActionRequired` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | +| `onInvoicePaymentFailed` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | +| `onInvoicePaymentSucceeded` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | +| `onInvoiceSent` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | +| `onInvoiceUpcoming` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | +| `onInvoiceVoided` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | +| `onInvoiceItemCreated` | [InvoiceItem](https://stripe.com/docs/api/invoiceitems/object) | `payout.reconciliation_completed` | N/A | +| `onInvoiceItemDeleted` | [InvoiceItem](https://stripe.com/docs/api/invoiceitems/object) | `payout.reconciliation_completed` | N/A | If there are any triggers missing that you'd like to see added, please [open a new GitHub Issue](https://github.com/triggerdotdev/trigger.dev/issues/new) diff --git a/integrations/stripe/src/events.ts b/integrations/stripe/src/events.ts index dcc531a62..15d452c48 100644 --- a/integrations/stripe/src/events.ts +++ b/integrations/stripe/src/events.ts @@ -25,6 +25,8 @@ import { OnCustomerEvent, OnCustomerSubscription, OnExternalAccountEvent, + OnInvoiceEvent, + OnInvoiceItemEvent, OnPaymentIntentEvent, OnPayoutEvent, OnPersonEvent, @@ -932,3 +934,660 @@ export const onPayoutUpdated: EventSpecification = { { label: "Amount", text: `${payload.amount} ${payload.currency}` }, ], }; + +export const onInvoice: EventSpecification = { + name: [ + "invoice.created", + "invoice.finalized", + "invoice.finalization_failed", + "invoice.deleted", + "invoice.marked_uncollectible", + "invoice.paid", + "invoice.payment_action_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.voided", + ], + title: "On Invoice Event", + source: "stripe.com", + icon: "stripe", + examples: [], + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoiceCreated: EventSpecification = { + name: "invoice.created", + title: "On Invoice Created", + source: "stripe.com", + icon: "stripe", + examples: [ + { + id: "invoice.created", + name: "Invoice Created", + icon: "stripe", + payload: { + id: "in_1OIBngI0XSgju2urLPfyF8yN", + object: "invoice", + account_country: "GB", + account_name: "Trigger.dev", + account_tax_ids: null, + amount_due: 2000, + amount_paid: 0, + amount_remaining: 2000, + amount_shipping: 0, + application: null, + application_fee_amount: null, + attempt_count: 0, + attempted: false, + auto_advance: false, + automatic_tax: { + enabled: false, + status: null, + }, + billing_reason: "manual", + charge: null, + collection_method: "charge_automatically", + created: 1701356712, + currency: "usd", + custom_fields: null, + customer: "cus_P6Oaqh5b0bx59U", + customer_address: null, + customer_email: null, + customer_name: null, + customer_phone: null, + customer_shipping: null, + customer_tax_exempt: "none", + customer_tax_ids: [], + default_payment_method: null, + default_source: null, + default_tax_rates: [], + description: "(created by Stripe CLI)", + discount: null, + discounts: [], + due_date: null, + effective_at: null, + ending_balance: null, + footer: null, + from_invoice: null, + hosted_invoice_url: null, + invoice_pdf: null, + last_finalization_error: null, + latest_revision: null, + lines: { + object: "list", + data: [ + { + id: "il_1OIBngI0XSgju2urOIBrJ3GK", + object: "line_item", + amount: 2000, + amount_excluding_tax: 2000, + currency: "usd", + description: "(created by Stripe CLI)", + discount_amounts: [], + discountable: true, + discounts: [], + invoice_item: "ii_1OIBngI0XSgju2urw3wl9FUf", + livemode: false, + metadata: {}, + period: { + end: 1701356712, + start: 1701356712, + }, + plan: null, + price: { + id: "price_1OIBngI0XSgju2urxiG1M9fT", + object: "price", + active: false, + billing_scheme: "per_unit", + created: 1701356712, + currency: "usd", + custom_unit_amount: null, + livemode: false, + lookup_key: null, + metadata: {}, + nickname: null, + product: "prod_P6Oatqn6T5L2Ey", + recurring: null, + tax_behavior: "unspecified", + tiers_mode: null, + transform_quantity: null, + type: "one_time", + unit_amount: 2000, + unit_amount_decimal: "2000", + }, + proration: false, + proration_details: { + credited_items: null, + }, + quantity: 1, + subscription: null, + tax_amounts: [], + tax_rates: [], + type: "invoiceitem", + unit_amount_excluding_tax: "2000", + }, + ], + has_more: false, + total_count: 1, + url: "/v1/invoices/in_1OIBngI0XSgju2urLPfyF8yN/lines", + }, + livemode: false, + metadata: {}, + next_payment_attempt: null, + number: null, + on_behalf_of: null, + paid: false, + paid_out_of_band: false, + payment_intent: null, + payment_settings: { + default_mandate: null, + payment_method_options: null, + payment_method_types: null, + }, + period_end: 1701356712, + period_start: 1701356712, + post_payment_credit_notes_amount: 0, + pre_payment_credit_notes_amount: 0, + quote: null, + receipt_number: null, + rendering: { + amount_tax_display: null, + pdf: { + page_size: "auto", + }, + }, + rendering_options: null, + shipping_cost: null, + shipping_details: null, + starting_balance: 0, + statement_descriptor: null, + status: "draft", + status_transitions: { + finalized_at: null, + marked_uncollectible_at: null, + paid_at: null, + voided_at: null, + }, + subscription: null, + subscription_details: { + metadata: null, + }, + subtotal: 2000, + subtotal_excluding_tax: 2000, + tax: null, + test_clock: null, + total: 2000, + total_discount_amounts: [], + total_excluding_tax: 2000, + total_tax_amounts: [], + transfer_data: null, + webhooks_delivered_at: null, + }, + }, + ], + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoiceFinalized: EventSpecification = { + name: "invoice.finalized", + title: "On Invoice Finalized", + source: "stripe.com", + icon: "stripe", + examples: [ + { + id: "invoice.finalized", + name: "Invoice Finalized", + icon: "stripe", + payload: { + id: "in_1OIBqbI0XSgju2urMmXEFbj3", + object: "invoice", + account_country: "GB", + account_name: "Trigger.dev", + account_tax_ids: null, + amount_due: 2000, + amount_paid: 0, + amount_remaining: 2000, + amount_shipping: 0, + application: null, + application_fee_amount: null, + attempt_count: 0, + attempted: false, + auto_advance: false, + automatic_tax: { + enabled: false, + status: null, + }, + billing_reason: "manual", + charge: null, + collection_method: "charge_automatically", + created: 1701356892, + currency: "usd", + custom_fields: null, + customer: "cus_P6Od2vu85eNeMI", + customer_address: null, + customer_email: null, + customer_name: null, + customer_phone: null, + customer_shipping: null, + customer_tax_exempt: "none", + customer_tax_ids: [], + default_payment_method: null, + default_source: null, + default_tax_rates: [], + description: "(created by Stripe CLI)", + discount: null, + discounts: [], + due_date: null, + effective_at: 1701356893, + ending_balance: 0, + footer: null, + from_invoice: null, + hosted_invoice_url: + "https://invoice.stripe.com/i/acct_1MRmG4I0XSgju2ur/test_YWNjdF8xTVJtRzRJMFhTZ2p1MnVyLF9QNk9kYmlDaVZyek53UXRJbUhEdmNxa1pPSUtKbmdPLDkxODk3Njk00200Ibh1G5H7?s=ap", + invoice_pdf: + "https://pay.stripe.com/invoice/acct_1MRmG4I0XSgju2ur/test_YWNjdF8xTVJtRzRJMFhTZ2p1MnVyLF9QNk9kYmlDaVZyek53UXRJbUhEdmNxa1pPSUtKbmdPLDkxODk3Njk00200Ibh1G5H7/pdf?s=ap", + last_finalization_error: null, + latest_revision: null, + lines: { + object: "list", + data: [ + { + id: "il_1OIBqaI0XSgju2urWRv5yH9h", + object: "line_item", + amount: 2000, + amount_excluding_tax: 2000, + currency: "usd", + description: "(created by Stripe CLI)", + discount_amounts: [], + discountable: true, + discounts: [], + invoice_item: "ii_1OIBqaI0XSgju2urik7fdYlI", + livemode: false, + metadata: {}, + period: { + end: 1701356892, + start: 1701356892, + }, + plan: null, + price: { + id: "price_1OIBngI0XSgju2urxiG1M9fT", + object: "price", + active: false, + billing_scheme: "per_unit", + created: 1701356712, + currency: "usd", + custom_unit_amount: null, + livemode: false, + lookup_key: null, + metadata: {}, + nickname: null, + product: "prod_P6Oatqn6T5L2Ey", + recurring: null, + tax_behavior: "unspecified", + tiers_mode: null, + transform_quantity: null, + type: "one_time", + unit_amount: 2000, + unit_amount_decimal: "2000", + }, + proration: false, + proration_details: { + credited_items: null, + }, + quantity: 1, + subscription: null, + tax_amounts: [], + tax_rates: [], + type: "invoiceitem", + unit_amount_excluding_tax: "2000", + }, + ], + has_more: false, + total_count: 1, + url: "/v1/invoices/in_1OIBqbI0XSgju2urMmXEFbj3/lines", + }, + livemode: false, + metadata: {}, + next_payment_attempt: null, + number: "FD943C29-0111", + on_behalf_of: null, + paid: false, + paid_out_of_band: false, + payment_intent: "pi_3OIBqbI0XSgju2ur0BelVhdO", + payment_settings: { + default_mandate: null, + payment_method_options: null, + payment_method_types: null, + }, + period_end: 1701356892, + period_start: 1701356892, + post_payment_credit_notes_amount: 0, + pre_payment_credit_notes_amount: 0, + quote: null, + receipt_number: null, + rendering: { + amount_tax_display: null, + pdf: { + page_size: "letter", + }, + }, + rendering_options: null, + shipping_cost: null, + shipping_details: null, + starting_balance: 0, + statement_descriptor: null, + status: "open", + status_transitions: { + finalized_at: 1701356893, + marked_uncollectible_at: null, + paid_at: null, + voided_at: null, + }, + subscription: null, + subscription_details: { + metadata: null, + }, + subtotal: 2000, + subtotal_excluding_tax: 2000, + tax: null, + test_clock: null, + total: 2000, + total_discount_amounts: [], + total_excluding_tax: 2000, + total_tax_amounts: [], + transfer_data: null, + webhooks_delivered_at: 1701356893, + }, + }, + ], + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoiceFinalizationFailed: EventSpecification = { + name: "invoice.finalization_failed", + title: "On Invoice Finalization failed", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoiceDeleted: EventSpecification = { + name: "invoice.deleted", + title: "On Invoice Deleted", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoiceMarkedUncollectible: EventSpecification = { + name: "invoice.marked_uncollectible", + title: "On Invoice Deleted", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoicePaid: EventSpecification = { + name: "invoice.paid", + title: "On Invoice Paid", + source: "stripe.com", + icon: "stripe", + examples: [ + { + id: "invoice.paid", + name: "Invoice Paid", + icon: "stripe", + payload: { + id: "in_1OIBuTI0XSgju2urKkqZFraX", + object: "invoice", + account_country: "GB", + account_name: "Trigger.dev", + account_tax_ids: null, + amount_due: 2000, + amount_paid: 2000, + amount_remaining: 0, + amount_shipping: 0, + application: null, + application_fee_amount: null, + attempt_count: 1, + attempted: true, + auto_advance: false, + automatic_tax: { + enabled: false, + status: null, + }, + billing_reason: "manual", + charge: "ch_3OIBuUI0XSgju2ur1ibTvTmE", + collection_method: "charge_automatically", + created: 1701357133, + currency: "usd", + custom_fields: null, + customer: "cus_P6OhphiNsxG9aM", + customer_address: null, + customer_email: null, + customer_name: null, + customer_phone: null, + customer_shipping: null, + customer_tax_exempt: "none", + customer_tax_ids: [], + default_payment_method: null, + default_source: null, + default_tax_rates: [], + description: "(created by Stripe CLI)", + discount: null, + discounts: [], + due_date: null, + effective_at: 1701357134, + ending_balance: 0, + footer: null, + from_invoice: null, + hosted_invoice_url: + "https://invoice.stripe.com/i/acct_1MRmG4I0XSgju2ur/test_YWNjdF8xTVJtRzRJMFhTZ2p1MnVyLF9QNk9oeUJwdXpYVUtrb0hVQmJHYUFDclZhbmVha2w5LDkxODk3OTM20200JlMCKvkD?s=ap", + invoice_pdf: + "https://pay.stripe.com/invoice/acct_1MRmG4I0XSgju2ur/test_YWNjdF8xTVJtRzRJMFhTZ2p1MnVyLF9QNk9oeUJwdXpYVUtrb0hVQmJHYUFDclZhbmVha2w5LDkxODk3OTM20200JlMCKvkD/pdf?s=ap", + last_finalization_error: null, + latest_revision: null, + lines: { + object: "list", + data: [ + { + id: "il_1OIBuTI0XSgju2urpRdDk5DO", + object: "line_item", + amount: 2000, + amount_excluding_tax: 2000, + currency: "usd", + description: "(created by Stripe CLI)", + discount_amounts: [], + discountable: true, + discounts: [], + invoice_item: "ii_1OIBuTI0XSgju2urRDAJz6ec", + livemode: false, + metadata: {}, + period: { + end: 1701357133, + start: 1701357133, + }, + plan: null, + price: { + id: "price_1OIBngI0XSgju2urxiG1M9fT", + object: "price", + active: false, + billing_scheme: "per_unit", + created: 1701356712, + currency: "usd", + custom_unit_amount: null, + livemode: false, + lookup_key: null, + metadata: {}, + nickname: null, + product: "prod_P6Oatqn6T5L2Ey", + recurring: null, + tax_behavior: "unspecified", + tiers_mode: null, + transform_quantity: null, + type: "one_time", + unit_amount: 2000, + unit_amount_decimal: "2000", + }, + proration: false, + proration_details: { + credited_items: null, + }, + quantity: 1, + subscription: null, + tax_amounts: [], + tax_rates: [], + type: "invoiceitem", + unit_amount_excluding_tax: "2000", + }, + ], + has_more: false, + total_count: 1, + url: "/v1/invoices/in_1OIBuTI0XSgju2urKkqZFraX/lines", + }, + livemode: false, + metadata: {}, + next_payment_attempt: null, + number: "FD943C29-0112", + on_behalf_of: null, + paid: true, + paid_out_of_band: false, + payment_intent: "pi_3OIBuUI0XSgju2ur15gtauR9", + payment_settings: { + default_mandate: null, + payment_method_options: null, + payment_method_types: null, + }, + period_end: 1701357133, + period_start: 1701357133, + post_payment_credit_notes_amount: 0, + pre_payment_credit_notes_amount: 0, + quote: null, + receipt_number: null, + rendering: { + amount_tax_display: null, + pdf: { + page_size: "letter", + }, + }, + rendering_options: null, + shipping_cost: null, + shipping_details: null, + starting_balance: 0, + statement_descriptor: null, + status: "paid", + status_transitions: { + finalized_at: 1701357134, + marked_uncollectible_at: null, + paid_at: 1701357134, + voided_at: null, + }, + subscription: null, + subscription_details: { + metadata: null, + }, + subtotal: 2000, + subtotal_excluding_tax: 2000, + tax: null, + test_clock: null, + total: 2000, + total_discount_amounts: [], + total_excluding_tax: 2000, + total_tax_amounts: [], + transfer_data: null, + webhooks_delivered_at: 1701357134, + }, + }, + ], + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoicePaymentActionRequired: EventSpecification = { + name: "invoice.payment_action_required", + title: "On Invoice Payment Action Required", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoicePaymentFailed: EventSpecification = { + name: "invoice.payment_failed", + title: "On Invoice Payment Failed", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoicePaymentSucceeded: EventSpecification = { + name: "invoice.payment_succeeded", + title: "On Invoice Payment Succeeded", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoiceSent: EventSpecification = { + name: "invoice.sent", + title: "On Invoice Sent", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoiceUpcoming: EventSpecification = { + name: "invoice.upcoming", + title: "On Invoice Upcoming", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoiceUpdated: EventSpecification = { + name: "invoice.updated", + title: "On Invoice Updated", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoiceVoided: EventSpecification = { + name: "invoice.voided", + title: "On Invoice Voided", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceEvent, + runProperties: (payload) => [{ label: "Invoice ID", text: payload.id }], +}; + +export const onInvoiceItemCreated: EventSpecification = { + name: "invoiceitem.created", + title: "On Invoice Item Created", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceItemEvent, + runProperties: (payload) => [{ label: "Invoice Item ID", text: payload.id }], +}; + +export const onInvoiceItemDeleted: EventSpecification = { + name: "invoiceitem.deleted", + title: "On Invoice Item Deleted", + source: "stripe.com", + icon: "stripe", + parsePayload: (payload) => payload as OnInvoiceItemEvent, + runProperties: (payload) => [{ label: "Invoice Item ID", text: payload.id }], +}; diff --git a/integrations/stripe/src/index.ts b/integrations/stripe/src/index.ts index 496fe6d0a..327da7330 100644 --- a/integrations/stripe/src/index.ts +++ b/integrations/stripe/src/index.ts @@ -32,6 +32,8 @@ import { CustomerSubscriptionEventNamesSchema, ExternalAccountEventNames, ExternalAccountEventNamesSchema, + InvoiceEventNames, + InvoiceEventNamesSchema, PaymentIntentEventNames, PaymentIntentEventNamesSchema, PayoutEventNames, @@ -901,6 +903,123 @@ export class Stripe implements TriggerIntegration { params ?? { connect: false } ); } + + /** + * Occurs on any invoice.* event. Accepts an optional array of events to filter on. By default it will listen to all invoice.* events. + * + * @example + * ```ts + * stripe.onInvoice({ events: ["invoice.created", "invoice.paid"] }) + * ``` + * + * You can detect the event name in your job by using the `ctx.event.name` property: + * + * ```ts + * client.defineJob({ + * id: "stripe-example", + * name: "Stripe Example", + * version: "0.1.0", + * trigger: stripe.onInvoice({ events: ["invoice.created", "invoice.paid"] }), + * run: async (payload, io, ctx) => { + * console.log(ctx.event.name); // "invoice.created" or "invoice.paid" + * }, + * }); + * ``` + */ + onInvoice(params?: TriggerParams & { events?: InvoiceEventNames }) { + const parsedEvents = InvoiceEventNamesSchema.optional().parse(params?.events); + + const event = { + ...events.onInvoice, + name: parsedEvents ?? events.onPayout.name, + }; + + return createTrigger(this.source, event, params ?? { connect: false }); + } + + /** + * Occurs whenever an invoice is created. + */ + onInvoiceCreated(params?: TriggerParams) { + return createTrigger(this.source, events.onInvoiceCreated, params ?? { connect: false }); + } + + /** + * Occurs whenever an invoice is finalized. + */ + onInvoiceFinalized(params?: TriggerParams) { + return createTrigger(this.source, events.onInvoiceFinalized, params ?? { connect: false }); + } + + /** + * The invoice couldn’t be finalized. + */ + onInvoiceFinalizationFailed(params?: TriggerParams) { + return createTrigger( + this.source, + events.onInvoiceFinalizationFailed, + params ?? { connect: false } + ); + } + + /** + * Occurs whenever an invoice is marked uncollectible. + */ + onInvoiceMarkedUncollectible(params?: TriggerParams) { + return createTrigger( + this.source, + events.onInvoiceMarkedUncollectible, + params ?? { connect: false } + ); + } + + onInvoicePaid(params?: TriggerParams) { + return createTrigger(this.source, events.onInvoicePaid, params ?? { connect: false }); + } + + onInvoicePaymentActionRequired(params?: TriggerParams) { + return createTrigger( + this.source, + events.onInvoicePaymentActionRequired, + params ?? { connect: false } + ); + } + + onInvoicePaymentFailed(params?: TriggerParams) { + return createTrigger(this.source, events.onInvoicePaymentFailed, params ?? { connect: false }); + } + + onInvoicePaymentSucceeded(params?: TriggerParams) { + return createTrigger( + this.source, + events.onInvoicePaymentSucceeded, + params ?? { connect: false } + ); + } + + onInvoiceSent(params?: TriggerParams) { + return createTrigger(this.source, events.onInvoiceSent, params ?? { connect: false }); + } + + onInvoiceUpcoming(params?: TriggerParams) { + return createTrigger(this.source, events.onInvoiceUpcoming, params ?? { connect: false }); + } + + onInvoiceUpdated(params?: TriggerParams) { + return createTrigger(this.source, events.onInvoiceUpdated, params ?? { connect: false }); + } + + onInvoiceVoided(params?: TriggerParams) { + return createTrigger(this.source, events.onInvoiceVoided, params ?? { connect: false }); + } + + onInvoiceItemCreated(params?: TriggerParams) { + return createTrigger(this.source, events.onInvoiceItemCreated, params ?? { connect: false }); + } + + onInvoiceItemDeleted(params?: TriggerParams) { + return createTrigger(this.source, events.onInvoiceItemDeleted, params ?? { connect: false }); + } } export type TriggerParams = { diff --git a/integrations/stripe/src/schemas.ts b/integrations/stripe/src/schemas.ts index fefd101e9..77fdd8133 100644 --- a/integrations/stripe/src/schemas.ts +++ b/integrations/stripe/src/schemas.ts @@ -1,6 +1,8 @@ -import { z } from "zod" +import { z } from "zod"; -export const PriceEventNamesSchema = z.array(z.enum(["price.created", "price.updated", "price.deleted"])); +export const PriceEventNamesSchema = z.array( + z.enum(["price.created", "price.updated", "price.deleted"]) +); export type PriceEventNames = z.infer; export const ProductEventNamesSchema = z.array( @@ -87,4 +89,22 @@ export const PayoutEventNamesSchema = z.array( "payout.updated", ]) ); -export type PayoutEventNames = z.infer; \ No newline at end of file +export type PayoutEventNames = z.infer; + +export const InvoiceEventNamesSchema = z.array( + z.enum([ + "invoice.created", + "invoice.finalized", + "invoice.finalization_failed", + "invoice.deleted", + "invoice.marked_uncollectible", + "invoice.paid", + "invoice.payment_action_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.voided", + ]) +); +export type InvoiceEventNames = z.infer; diff --git a/integrations/stripe/src/types.ts b/integrations/stripe/src/types.ts index 28f6a45a8..2bc1cbe1a 100644 --- a/integrations/stripe/src/types.ts +++ b/integrations/stripe/src/types.ts @@ -86,3 +86,7 @@ export type OnPaymentIntentEvent = ExtractWebhookPayload; export type OnPayoutEvent = ExtractWebhookPayload; + +export type OnInvoiceEvent = ExtractWebhookPayload; + +export type OnInvoiceItemEvent = ExtractWebhookPayload; From 00b0c3e02eb671d8ea4a9863803a1a4a643b278e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:54:13 +0000 Subject: [PATCH 2/9] chore: Update version for release (#765) Co-authored-by: github-actions[bot] --- .changeset/fluffy-rocks-prove.md | 5 ----- apps/proxy/CHANGELOG.md | 6 ++++++ apps/proxy/package.json | 2 +- integrations/airtable/CHANGELOG.md | 7 +++++++ integrations/airtable/package.json | 6 +++--- integrations/github/CHANGELOG.md | 7 +++++++ integrations/github/package.json | 6 +++--- integrations/linear/CHANGELOG.md | 7 +++++++ integrations/linear/package.json | 6 +++--- integrations/openai/CHANGELOG.md | 7 +++++++ integrations/openai/package.json | 6 +++--- integrations/plain/CHANGELOG.md | 7 +++++++ integrations/plain/package.json | 6 +++--- integrations/replicate/CHANGELOG.md | 7 +++++++ integrations/replicate/package.json | 6 +++--- integrations/resend/CHANGELOG.md | 7 +++++++ integrations/resend/package.json | 6 +++--- integrations/sendgrid/CHANGELOG.md | 7 +++++++ integrations/sendgrid/package.json | 6 +++--- integrations/shopify/CHANGELOG.md | 7 +++++++ integrations/shopify/package.json | 6 +++--- integrations/slack/CHANGELOG.md | 6 ++++++ integrations/slack/package.json | 4 ++-- integrations/stripe/CHANGELOG.md | 8 ++++++++ integrations/stripe/package.json | 6 +++--- integrations/supabase/CHANGELOG.md | 7 +++++++ integrations/supabase/package.json | 6 +++--- integrations/typeform/CHANGELOG.md | 7 +++++++ integrations/typeform/package.json | 6 +++--- packages/astro/CHANGELOG.md | 6 ++++++ packages/astro/package.json | 4 ++-- packages/cli/CHANGELOG.md | 6 ++++++ packages/cli/package.json | 2 +- packages/core-backend/CHANGELOG.md | 2 ++ packages/core-backend/package.json | 2 +- packages/core/CHANGELOG.md | 2 ++ packages/core/package.json | 2 +- packages/eslint-plugin/CHANGELOG.md | 2 ++ packages/eslint-plugin/package.json | 2 +- packages/express/CHANGELOG.md | 6 ++++++ packages/express/package.json | 6 +++--- packages/integration-kit/CHANGELOG.md | 6 ++++++ packages/integration-kit/package.json | 2 +- packages/nestjs/CHANGELOG.md | 6 ++++++ packages/nestjs/package.json | 6 +++--- packages/nextjs/CHANGELOG.md | 6 ++++++ packages/nextjs/package.json | 4 ++-- packages/react/CHANGELOG.md | 6 ++++++ packages/react/package.json | 4 ++-- packages/remix/CHANGELOG.md | 6 ++++++ packages/remix/package.json | 4 ++-- packages/sveltekit/CHANGELOG.md | 6 ++++++ packages/sveltekit/package.json | 4 ++-- packages/testing/CHANGELOG.md | 7 +++++++ packages/testing/package.json | 2 +- packages/trigger-sdk/CHANGELOG.md | 7 +++++++ packages/trigger-sdk/package.json | 6 +++--- 57 files changed, 235 insertions(+), 69 deletions(-) delete mode 100644 .changeset/fluffy-rocks-prove.md diff --git a/.changeset/fluffy-rocks-prove.md b/.changeset/fluffy-rocks-prove.md deleted file mode 100644 index c0dabae38..000000000 --- a/.changeset/fluffy-rocks-prove.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/stripe": patch ---- - -Added invoice and invoice item webhook triggers diff --git a/apps/proxy/CHANGELOG.md b/apps/proxy/CHANGELOG.md index d57740969..f28d93af6 100644 --- a/apps/proxy/CHANGELOG.md +++ b/apps/proxy/CHANGELOG.md @@ -1,5 +1,11 @@ # proxy +## 0.0.4 + +### Patch Changes + +- @trigger.dev/core@2.2.10 + ## 0.0.3 ### Patch Changes diff --git a/apps/proxy/package.json b/apps/proxy/package.json index 3cedad227..62a28d1f5 100644 --- a/apps/proxy/package.json +++ b/apps/proxy/package.json @@ -1,6 +1,6 @@ { "name": "proxy", - "version": "0.0.3", + "version": "0.0.4", "private": true, "scripts": { "deploy": "wrangler deploy", diff --git a/integrations/airtable/CHANGELOG.md b/integrations/airtable/CHANGELOG.md index 93e962554..96c73a4f1 100644 --- a/integrations/airtable/CHANGELOG.md +++ b/integrations/airtable/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/airtable +## 2.2.10 + +### Patch Changes + +- @trigger.dev/integration-kit@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/airtable/package.json b/integrations/airtable/package.json index f37e77221..68d06e839 100644 --- a/integrations/airtable/package.json +++ b/integrations/airtable/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/airtable", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev integration for airtable", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -26,8 +26,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.9", - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/integration-kit": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.10", "airtable": "^0.12.1", "zod": "3.22.3" }, diff --git a/integrations/github/CHANGELOG.md b/integrations/github/CHANGELOG.md index 6cdc5b7a7..aec8c9464 100644 --- a/integrations/github/CHANGELOG.md +++ b/integrations/github/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/github +## 2.2.10 + +### Patch Changes + +- @trigger.dev/integration-kit@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/github/package.json b/integrations/github/package.json index 219307466..3afb5085f 100644 --- a/integrations/github/package.json +++ b/integrations/github/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/github", - "version": "2.2.9", + "version": "2.2.10", "description": "The official GitHub integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -29,8 +29,8 @@ "@octokit/request": "^6.2.5", "@octokit/request-error": "^4.0.1", "@octokit/webhooks": "^10.4.0", - "@trigger.dev/integration-kit": "workspace:^2.2.9", - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/integration-kit": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.10", "octokit": "^2.0.14", "zod": "3.22.3" }, diff --git a/integrations/linear/CHANGELOG.md b/integrations/linear/CHANGELOG.md index d53ba6b16..fa2ae173c 100644 --- a/integrations/linear/CHANGELOG.md +++ b/integrations/linear/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/linear +## 2.2.10 + +### Patch Changes + +- @trigger.dev/integration-kit@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/linear/package.json b/integrations/linear/package.json index c33ae8f65..4299e8f69 100644 --- a/integrations/linear/package.json +++ b/integrations/linear/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/linear", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev integration for @linear/sdk", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -27,8 +27,8 @@ }, "dependencies": { "@linear/sdk": "^8.0.0", - "@trigger.dev/integration-kit": "workspace:^2.2.9", - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/integration-kit": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.10", "zod": "3.22.3" }, "engines": { diff --git a/integrations/openai/CHANGELOG.md b/integrations/openai/CHANGELOG.md index d859f71f5..42f815189 100644 --- a/integrations/openai/CHANGELOG.md +++ b/integrations/openai/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/slack +## 2.2.10 + +### Patch Changes + +- @trigger.dev/integration-kit@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/openai/package.json b/integrations/openai/package.json index f33249ec8..d9694593d 100644 --- a/integrations/openai/package.json +++ b/integrations/openai/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/openai", - "version": "2.2.9", + "version": "2.2.10", "description": "The official OpenAI integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -31,8 +31,8 @@ }, "dependencies": { "openai": "^4.16.1", - "@trigger.dev/sdk": "workspace:^2.2.9", - "@trigger.dev/integration-kit": "workspace:^2.2.9" + "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.10" }, "engines": { "node": ">=18.0.0" diff --git a/integrations/plain/CHANGELOG.md b/integrations/plain/CHANGELOG.md index a9935be4e..5657a9d99 100644 --- a/integrations/plain/CHANGELOG.md +++ b/integrations/plain/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/plain +## 2.2.10 + +### Patch Changes + +- @trigger.dev/integration-kit@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/plain/package.json b/integrations/plain/package.json index 5ab07127e..a51774759 100644 --- a/integrations/plain/package.json +++ b/integrations/plain/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/plain", - "version": "2.2.9", + "version": "2.2.10", "description": "The official Plain.com integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -24,8 +24,8 @@ "build:tsup": "tsup" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.9", - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/integration-kit": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.10", "@team-plain/typescript-sdk": "^2.7.0" }, "engines": { diff --git a/integrations/replicate/CHANGELOG.md b/integrations/replicate/CHANGELOG.md index 52e4b9f4c..e7148421e 100644 --- a/integrations/replicate/CHANGELOG.md +++ b/integrations/replicate/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/replicate +## 2.2.10 + +### Patch Changes + +- @trigger.dev/integration-kit@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/replicate/package.json b/integrations/replicate/package.json index 648f2756f..970bfaf01 100644 --- a/integrations/replicate/package.json +++ b/integrations/replicate/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/replicate", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev integration for replicate", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -26,8 +26,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.9", - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/integration-kit": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.10", "replicate": "^0.18.1", "zod": "3.22.3" }, diff --git a/integrations/resend/CHANGELOG.md b/integrations/resend/CHANGELOG.md index 33fb6b743..8359cefda 100644 --- a/integrations/resend/CHANGELOG.md +++ b/integrations/resend/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/resend +## 2.2.10 + +### Patch Changes + +- @trigger.dev/integration-kit@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/resend/package.json b/integrations/resend/package.json index 8ded54f9f..86c0f6915 100644 --- a/integrations/resend/package.json +++ b/integrations/resend/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/resend", - "version": "2.2.9", + "version": "2.2.10", "description": "The official Resend.com integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -24,8 +24,8 @@ "build:tsup": "tsup" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.9", - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/integration-kit": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.10", "resend": "^2.0.0" }, "engines": { diff --git a/integrations/sendgrid/CHANGELOG.md b/integrations/sendgrid/CHANGELOG.md index e492caf77..362755746 100644 --- a/integrations/sendgrid/CHANGELOG.md +++ b/integrations/sendgrid/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/sendgrid +## 2.2.10 + +### Patch Changes + +- @trigger.dev/integration-kit@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/sendgrid/package.json b/integrations/sendgrid/package.json index aa6eb1308..424c1966a 100644 --- a/integrations/sendgrid/package.json +++ b/integrations/sendgrid/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/sendgrid", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev integration for @sendgrid/mail", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -27,8 +27,8 @@ }, "dependencies": { "@sendgrid/mail": "^7.7.0", - "@trigger.dev/sdk": "workspace:^2.2.9", - "@trigger.dev/integration-kit": "workspace:^2.2.9" + "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.10" }, "engines": { "node": ">=16.8.0" diff --git a/integrations/shopify/CHANGELOG.md b/integrations/shopify/CHANGELOG.md index b330112b4..bc30fa62a 100644 --- a/integrations/shopify/CHANGELOG.md +++ b/integrations/shopify/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/shopify +## 2.2.10 + +### Patch Changes + +- @trigger.dev/integration-kit@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/shopify/package.json b/integrations/shopify/package.json index 097d1a777..d89a81e5e 100644 --- a/integrations/shopify/package.json +++ b/integrations/shopify/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/shopify", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev integration for @shopify/shopify-api", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -27,8 +27,8 @@ }, "dependencies": { "@shopify/shopify-api": "^8.0.2", - "@trigger.dev/sdk": "workspace:^2.2.9", - "@trigger.dev/integration-kit": "workspace:^2.2.9", + "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.10", "zod": "3.22.3" }, "engines": { diff --git a/integrations/slack/CHANGELOG.md b/integrations/slack/CHANGELOG.md index 5ab37cb5d..870f0868f 100644 --- a/integrations/slack/CHANGELOG.md +++ b/integrations/slack/CHANGELOG.md @@ -1,5 +1,11 @@ # @trigger.dev/slack +## 2.2.10 + +### Patch Changes + +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/slack/package.json b/integrations/slack/package.json index 9e5aea295..0a2411d70 100644 --- a/integrations/slack/package.json +++ b/integrations/slack/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/slack", - "version": "2.2.9", + "version": "2.2.10", "description": "The official Slack integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -25,7 +25,7 @@ }, "dependencies": { "@slack/web-api": "^6.8.1", - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/sdk": "workspace:^2.2.10", "zod": "3.22.3" }, "engines": { diff --git a/integrations/stripe/CHANGELOG.md b/integrations/stripe/CHANGELOG.md index 3ca871a32..ed3415b03 100644 --- a/integrations/stripe/CHANGELOG.md +++ b/integrations/stripe/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/stripe +## 2.2.10 + +### Patch Changes + +- 7e3a82ef: Added invoice and invoice item webhook triggers + - @trigger.dev/integration-kit@2.2.10 + - @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/stripe/package.json b/integrations/stripe/package.json index 93867fe33..20b16e6af 100644 --- a/integrations/stripe/package.json +++ b/integrations/stripe/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/stripe", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev integration for stripe", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -26,8 +26,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.9", - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/integration-kit": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.10", "stripe": "^12.14.0", "zod": "3.22.3" }, diff --git a/integrations/supabase/CHANGELOG.md b/integrations/supabase/CHANGELOG.md index f4fce7b92..3b62b6c7c 100644 --- a/integrations/supabase/CHANGELOG.md +++ b/integrations/supabase/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/supabase +## 2.2.10 + +### Patch Changes + +- @trigger.dev/integration-kit@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/supabase/package.json b/integrations/supabase/package.json index aba0e46fc..27e74ff69 100644 --- a/integrations/supabase/package.json +++ b/integrations/supabase/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/supabase", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev integration for @supabase/supabase-js", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -27,8 +27,8 @@ }, "dependencies": { "@supabase/supabase-js": "^2.26.0", - "@trigger.dev/integration-kit": "workspace:^2.2.9", - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/integration-kit": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.10", "supabase-management-js": "^0.1.4", "zod": "3.22.3" }, diff --git a/integrations/typeform/CHANGELOG.md b/integrations/typeform/CHANGELOG.md index c337997a5..c1490e253 100644 --- a/integrations/typeform/CHANGELOG.md +++ b/integrations/typeform/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/typeform +## 2.2.10 + +### Patch Changes + +- @trigger.dev/integration-kit@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/integrations/typeform/package.json b/integrations/typeform/package.json index 2fc3fd123..a689195d3 100644 --- a/integrations/typeform/package.json +++ b/integrations/typeform/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/typeform", - "version": "2.2.9", + "version": "2.2.10", "description": "The official Typeform integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -25,8 +25,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.9", - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/integration-kit": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.10", "@typeform/api-client": "^1.8.0", "zod": "3.22.3" }, diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index e4ae1b393..da9b791aa 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,11 @@ # @trigger.dev/astro +## 2.2.10 + +### Patch Changes + +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 211605201..6606d1066 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,7 +1,7 @@ { "name": "@trigger.dev/astro", "description": "An Astro-native integration for Trigger.dev background jobs platform", - "version": "2.2.9", + "version": "2.2.10", "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ @@ -20,7 +20,7 @@ "build:tsup": "tsup" }, "peerDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.9" + "@trigger.dev/sdk": "workspace:^2.2.10" }, "devDependencies": { "astro": "^3.0.12", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index e46fec098..969a720fb 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # create-trigger +## 2.2.10 + +### Patch Changes + +- @trigger.dev/core@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 61cb2661b..0fbba518e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/cli", - "version": "2.2.9", + "version": "2.2.10", "description": "The Trigger.dev CLI", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/core-backend/CHANGELOG.md b/packages/core-backend/CHANGELOG.md index 6ad0a40bc..b1ae0b20b 100644 --- a/packages/core-backend/CHANGELOG.md +++ b/packages/core-backend/CHANGELOG.md @@ -1,5 +1,7 @@ # @trigger.dev/core-backend +## 2.2.10 + ## 2.2.9 ## 2.2.8 diff --git a/packages/core-backend/package.json b/packages/core-backend/package.json index 8bee526f9..6d22746fb 100644 --- a/packages/core-backend/package.json +++ b/packages/core-backend/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/core-backend", - "version": "2.2.9", + "version": "2.2.10", "description": "Core code used across `@trigger.dev/sdk` and Trigger.dev server", "license": "MIT", "main": "./dist/index.js", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 4927a2c3b..9abef8d80 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,7 @@ # internal-platform +## 2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 06e363209..8ac57abe0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/core", - "version": "2.2.9", + "version": "2.2.10", "description": "Core code used across the Trigger.dev SDK and platform", "license": "MIT", "main": "./dist/index.js", diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 743230aee..258a28ed8 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,5 +1,7 @@ # @trigger.dev/eslint-plugin +## 2.2.10 + ## 2.2.9 ## 2.2.8 diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 517ac3417..6d9dbaa28 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/eslint-plugin", - "version": "2.2.9", + "version": "2.2.10", "description": "ESLint plugin with trigger.dev best practices", "keywords": [ "eslint", diff --git a/packages/express/CHANGELOG.md b/packages/express/CHANGELOG.md index 6f9b2e923..e6ebca7e6 100644 --- a/packages/express/CHANGELOG.md +++ b/packages/express/CHANGELOG.md @@ -1,5 +1,11 @@ # @trigger.dev/express +## 2.2.10 + +### Patch Changes + +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/express/package.json b/packages/express/package.json index 8bbb84735..da05a31a7 100644 --- a/packages/express/package.json +++ b/packages/express/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/express", - "version": "2.2.9", + "version": "2.2.10", "description": "Official Express adapter for Trigger.dev", "license": "MIT", "main": "./dist/index.js", @@ -19,7 +19,7 @@ "./package.json": "./package.json" }, "devDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/sdk": "workspace:^2.2.10", "@trigger.dev/tsconfig": "workspace:*", "@types/debug": "^4.1.7", "@types/express": "^4.17.13", @@ -33,7 +33,7 @@ "build:tsup": "tsup" }, "peerDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.9" + "@trigger.dev/sdk": "workspace:^2.2.10" }, "dependencies": { "debug": "^4.3.4", diff --git a/packages/integration-kit/CHANGELOG.md b/packages/integration-kit/CHANGELOG.md index fd6eb9c67..dcb1f8f42 100644 --- a/packages/integration-kit/CHANGELOG.md +++ b/packages/integration-kit/CHANGELOG.md @@ -1,5 +1,11 @@ # @trigger.dev/integration-kit +## 2.2.10 + +### Patch Changes + +- @trigger.dev/core@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/integration-kit/package.json b/packages/integration-kit/package.json index 74794a0f6..25ae49845 100644 --- a/packages/integration-kit/package.json +++ b/packages/integration-kit/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/integration-kit", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev Integration Kit has helpers to make creating integrations easier", "license": "MIT", "main": "./dist/index.js", diff --git a/packages/nestjs/CHANGELOG.md b/packages/nestjs/CHANGELOG.md index c9007bfb5..b65809586 100644 --- a/packages/nestjs/CHANGELOG.md +++ b/packages/nestjs/CHANGELOG.md @@ -1,5 +1,11 @@ # @trigger.dev/nestjs +## 2.2.10 + +### Patch Changes + +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/nestjs/package.json b/packages/nestjs/package.json index 20688b7d7..20c6849ab 100644 --- a/packages/nestjs/package.json +++ b/packages/nestjs/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/nestjs", - "version": "2.2.9", + "version": "2.2.10", "description": "Official NestJS adapter for Trigger.dev", "license": "MIT", "main": "./dist/index.js", @@ -19,7 +19,7 @@ "./package.json": "./package.json" }, "devDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/sdk": "workspace:^2.2.10", "@trigger.dev/tsconfig": "workspace:*", "@types/debug": "^4.1.7", "@types/express": "^4.17.13", @@ -35,7 +35,7 @@ }, "peerDependencies": { "@nestjs/common": ">=10.0.0", - "@trigger.dev/sdk": "workspace:^2.2.9" + "@trigger.dev/sdk": "workspace:^2.2.10" }, "dependencies": { "@nestjs/common": "^10.2.4", diff --git a/packages/nextjs/CHANGELOG.md b/packages/nextjs/CHANGELOG.md index ece327d99..c23a49473 100644 --- a/packages/nextjs/CHANGELOG.md +++ b/packages/nextjs/CHANGELOG.md @@ -1,5 +1,11 @@ # @trigger.dev/nextjs +## 2.2.10 + +### Patch Changes + +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index a62bae9b9..05c3c4b8c 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/nextjs", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev Next.js integration", "license": "MIT", "main": "./dist/index.js", @@ -36,7 +36,7 @@ "build:tsup": "tsup" }, "peerDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/sdk": "workspace:^2.2.10", "next": ">=12.0.0" }, "dependencies": { diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 6243d16a4..2e245975d 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @trigger.dev/react +## 2.2.10 + +### Patch Changes + +- @trigger.dev/core@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index b9a56b3c7..80b581610 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/react", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev React SDK", "license": "MIT", "types": "dist/index.d.ts", @@ -27,7 +27,7 @@ }, "dependencies": { "@tanstack/react-query": "5.0.0-beta.2", - "@trigger.dev/core": "workspace:^2.2.9", + "@trigger.dev/core": "workspace:^2.2.10", "debug": "^4.3.4", "zod": "3.22.3" }, diff --git a/packages/remix/CHANGELOG.md b/packages/remix/CHANGELOG.md index 828ca217d..139d00013 100644 --- a/packages/remix/CHANGELOG.md +++ b/packages/remix/CHANGELOG.md @@ -1,5 +1,11 @@ # @trigger.dev/remix +## 2.2.10 + +### Patch Changes + +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/remix/package.json b/packages/remix/package.json index fc90a5133..e2d83ed1c 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/remix", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev Remix integration", "license": "MIT", "main": "./dist/index.js", @@ -34,7 +34,7 @@ "build:tsup": "tsup" }, "peerDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.9", + "@trigger.dev/sdk": "workspace:^2.2.10", "@remix-run/server-runtime": ">1.19.0" }, "dependencies": { diff --git a/packages/sveltekit/CHANGELOG.md b/packages/sveltekit/CHANGELOG.md index 7f0b58137..b41493e7e 100644 --- a/packages/sveltekit/CHANGELOG.md +++ b/packages/sveltekit/CHANGELOG.md @@ -1,5 +1,11 @@ # @trigger.dev/sveltekit +## 2.2.10 + +### Patch Changes + +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index ff097a20c..0d6d6be35 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/sveltekit", - "version": "2.2.9", + "version": "2.2.10", "description": "Trigger.dev svelteKit integration", "license": "MIT", "main": "./dist/index.js", @@ -33,7 +33,7 @@ "build:tsup": "tsup" }, "peerDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.9" + "@trigger.dev/sdk": "workspace:^2.2.10" }, "dependencies": { "debug": "^4.3.4" diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index efe62f36c..15614c0d5 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/testing +## 2.2.10 + +### Patch Changes + +- @trigger.dev/core@2.2.10 +- @trigger.dev/sdk@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index e550ea974..2bebb98ee 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,7 +1,7 @@ { "name": "@trigger.dev/testing", "description": "A collection of useful tools to write tests for Trigger.dev.", - "version": "2.2.9", + "version": "2.2.10", "license": "MIT", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/trigger-sdk/CHANGELOG.md b/packages/trigger-sdk/CHANGELOG.md index 92a3a9521..4383abc85 100644 --- a/packages/trigger-sdk/CHANGELOG.md +++ b/packages/trigger-sdk/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/sdk +## 2.2.10 + +### Patch Changes + +- @trigger.dev/core@2.2.10 +- @trigger.dev/core-backend@2.2.10 + ## 2.2.9 ### Patch Changes diff --git a/packages/trigger-sdk/package.json b/packages/trigger-sdk/package.json index 6e15096ae..12f31f3da 100644 --- a/packages/trigger-sdk/package.json +++ b/packages/trigger-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/sdk", - "version": "2.2.9", + "version": "2.2.10", "description": "trigger.dev Node.JS SDK", "license": "MIT", "main": "./dist/index.js", @@ -25,8 +25,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@trigger.dev/core": "workspace:^2.2.9", - "@trigger.dev/core-backend": "workspace:^2.2.9", + "@trigger.dev/core": "workspace:^2.2.10", + "@trigger.dev/core-backend": "workspace:^2.2.10", "chalk": "^5.2.0", "colorette": "^2.0.20", "cronstrue": "^2.21.0", From 5d00fc7cdbd9d7ce5d5d0731d49381d0295b9a51 Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Thu, 30 Nov 2023 21:54:43 +0000 Subject: [PATCH 3/9] Update pnpm lock file for release --- pnpm-lock.yaml | 60 +++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6fbf1acf..b65705f37 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -415,8 +415,8 @@ importers: integrations/airtable: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/node': 16.x airtable: ^0.12.1 @@ -443,8 +443,8 @@ importers: '@octokit/types': ^9.2.3 '@octokit/webhooks': ^10.4.0 '@octokit/webhooks-types': ^6.10.0 - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/node': '18' octokit: ^2.0.14 @@ -470,8 +470,8 @@ importers: integrations/linear: specifiers: '@linear/sdk': ^8.0.0 - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/node': 16.x rimraf: ^3.0.2 @@ -492,8 +492,8 @@ importers: integrations/openai: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/jest': ^29.5.3 '@types/node': '18' @@ -520,8 +520,8 @@ importers: integrations/plain: specifiers: '@team-plain/typescript-sdk': ^2.7.0 - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/node': '18' rimraf: ^3.0.2 @@ -538,8 +538,8 @@ importers: integrations/replicate: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/node': 16.x replicate: ^0.18.1 @@ -561,8 +561,8 @@ importers: integrations/resend: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/node': '18' resend: ^2.0.0 @@ -581,8 +581,8 @@ importers: integrations/sendgrid: specifiers: '@sendgrid/mail': ^7.7.0 - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/node': 16.x rimraf: ^3.0.2 @@ -602,8 +602,8 @@ importers: integrations/shopify: specifiers: '@shopify/shopify-api': ^8.0.2 - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/node': 16.x rimraf: ^3.0.2 @@ -625,7 +625,7 @@ importers: integrations/slack: specifiers: '@slack/web-api': ^6.8.1 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/node': '18' rimraf: ^3.0.2 @@ -643,8 +643,8 @@ importers: integrations/stripe: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@types/node': 16.x rimraf: ^3.0.2 stripe: ^12.14.0 @@ -667,8 +667,8 @@ importers: integrations/supabase: specifiers: '@supabase/supabase-js': ^2.26.0 - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/node': 18.x rimraf: ^3.0.2 @@ -691,8 +691,8 @@ importers: integrations/typeform: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.9 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/integration-kit': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.10 '@typeform/api-client': ^1.8.0 '@types/node': 16.x rimraf: ^3.0.2 @@ -946,7 +946,7 @@ importers: packages/express: specifiers: - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/debug': ^4.1.7 '@types/express': ^4.17.13 @@ -994,7 +994,7 @@ importers: specifiers: '@nestjs/common': ^10.2.4 '@remix-run/web-fetch': ^4.3.5 - '@trigger.dev/sdk': workspace:^2.2.9 + '@trigger.dev/sdk': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/debug': ^4.1.7 '@types/express': ^4.17.13 @@ -1047,7 +1047,7 @@ importers: packages/react: specifiers: '@tanstack/react-query': 5.0.0-beta.2 - '@trigger.dev/core': workspace:^2.2.9 + '@trigger.dev/core': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/debug': ^4.1.7 '@types/react': 18.2.17 @@ -1142,8 +1142,8 @@ importers: packages/trigger-sdk: specifiers: - '@trigger.dev/core': workspace:^2.2.9 - '@trigger.dev/core-backend': workspace:^2.2.9 + '@trigger.dev/core': workspace:^2.2.10 + '@trigger.dev/core-backend': workspace:^2.2.10 '@trigger.dev/tsconfig': workspace:* '@types/debug': ^4.1.7 '@types/node': '18' From 0769dc43158311d1ee4106b104312599a7897264 Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Fri, 1 Dec 2023 08:42:05 +0000 Subject: [PATCH 4/9] Fixed the event names for stripe docs --- docs/integrations/apis/stripe.mdx | 140 +++++++++++++++--------------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/docs/integrations/apis/stripe.mdx b/docs/integrations/apis/stripe.mdx index 81ad02fa7..63f692868 100644 --- a/docs/integrations/apis/stripe.mdx +++ b/docs/integrations/apis/stripe.mdx @@ -85,76 +85,76 @@ client.defineJob({ Available triggers are listed below: -| Function Name | Payload Object | Events | Aggregate Version | -| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | -| `onCharge` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.succeeded`, `charge.failed`, `charge.captured`, `charge.refunded`, `charge.updated` | ✔️ | -| `onChargeSucceeded` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.succeeded` | `onCharge` | -| `onChargeFailed` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.failed` | `onCharge` | -| `onChargeCaptured` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.captured` | `onCharge` | -| `onChargeRefunded` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.refunded` | `onCharge` | -| `onChargeUpdated` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.updated` | `onCharge` | -| `onProduct` | [Product](https://stripe.com/docs/api/events/types#product_object) | `product.created`, `product.updated`, `product.deleted` | ✔️ | -| `onProductCreated` | [Product](https://stripe.com/docs/api/events/types#product_object) | `product.created` | `onProduct` | -| `onProductUpdated` | [Product](https://stripe.com/docs/api/events/types#product_object) | `product.updated` | `onProduct` | -| `onProductDeleted` | [Product](https://stripe.com/docs/api/events/types#product_object) | `product.deleted` | `onProduct` | -| `onPrice` | [Price](https://stripe.com/docs/api/events/types#price_object) | `price.created`, `price.updated`, `price.deleted` | ✔️ | -| `onPriceCreated` | [Price](https://stripe.com/docs/api/events/types#price_object) | `price.created` | `onPrice` | -| `onPriceUpdated` | [Price](https://stripe.com/docs/api/events/types#price_object) | `price.updated` | `onPrice` | -| `onPriceDeleted` | [Price](https://stripe.com/docs/api/events/types#price_object) | `price.deleted` | `onPrice` | -| `onCheckoutSession` | [CheckoutSession](https://stripe.com/docs/api/events/types#checkout_session_object) | `checkout.session.completed`, `checkout.session.async_payment_succeeded`, `checkout.session.async_payment_failed`, `checkout.session.expired` | ✔️ | -| `onCheckoutSessionCompleted` | [CheckoutSession](https://stripe.com/docs/api/events/types#checkout_session_object) | `checkout.session.completed` | `onCheckoutSession` | -| `onCheckoutSessionExpired` | [CheckoutSession](https://stripe.com/docs/api/events/types#checkout_session_object) | `checkout.session.expired` | `onCheckoutSession` | -| `onCustomerSubscription` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.created`, `customer.subscription.updated`, `customer.subscription.deleted`, `customer.subscription.paused`, `customer.subscription.pending_updated_applied`, `customer.subscription.pending_update_expired`, `customer.subscription.resumed` | ✔️ | -| `onCustomerSubscriptionCreated` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.created` | `onCustomerSubscription` | -| `onCustomerSubscriptionUpdated` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.updated` | `onCustomerSubscription` | -| `onCustomerSubscriptionDeleted` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.deleted` | `onCustomerSubscription` | -| `onCustomerSubscriptionPaused` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.paused` | `onCustomerSubscription` | -| `onCustomerSubscriptionPending` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.pending_updated_applied`, `customer.subscription.pending_update_expired` | `onCustomerSubscription` | -| `onCustomerSubscriptionResumed` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.resumed` | `onCustomerSubscription` | -| `onCustomer` | [Customer](https://stripe.com/docs/api/events/types#customer_object) | `customer.created`, `customer.updated`, `customer.deleted` | ✔️ | -| `onCustomerCreated` | [Customer](https://stripe.com/docs/api/events/types#customer_object) | `customer.created` | `onCustomer` | -| `onCustomerUpdated` | [Customer](https://stripe.com/docs/api/events/types#customer_object) | `customer.updated` | `onCustomer` | -| `onCustomerDeleted` | [Customer](https://stripe.com/docs/api/events/types#customer_object) | `customer.deleted` | `onCustomer` | -| `onExternalAccount` | [Card](https://stripe.com/docs/api/events/types#account_card_object) or [Bank Account](https://stripe.com/docs/api/events/types#account_bank_account_object) | `account.external_account.created`, `account.external_account.updated`, `account.external_account.deleted` | ✔️ | -| `onExternalAccountCreated` | [Card](https://stripe.com/docs/api/events/types#account_card_object) or [Bank Account](https://stripe.com/docs/api/events/types#account_bank_account_object) | `account.external_account.created` | `onExternalAccount` | -| `onExternalAccountUpdated` | [Card](https://stripe.com/docs/api/events/types#account_card_object) or [Bank Account](https://stripe.com/docs/api/events/types#account_bank_account_object) | `account.external_account.updated` | `onExternalAccount` | -| `onExternalAccountDeleted` | [Card](https://stripe.com/docs/api/events/types#account_card_object) or [Bank Account](https://stripe.com/docs/api/events/types#account_bank_account_object) | `account.external_account.deleted` | `onExternalAccount` | -| `onPerson` | [Person](https://stripe.com/docs/api/events/types#person_object) | `account.person.created`, `account.person.updated`, `account.person.deleted` | ✔️ | -| `onPersonCreated` | [Person](https://stripe.com/docs/api/events/types#person_object) | `account.person.created` | `onPerson` | -| `onPersonUpdated` | [Person](https://stripe.com/docs/api/events/types#person_object) | `account.person.updated` | `onPerson` | -| `onPersonDeleted` | [Person](https://stripe.com/docs/api/events/types#person_object) | `account.person.deleted` | `onPerson` | -| `onAccountUpdated` | [Account](https://stripe.com/docs/api/events/types#account_object) | `account.updated` | N/A | -| `onPaymentIntent` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.created`, `payment_intent.succeeded`, `payment_intent.payment_failed`, `payment_intent.canceled`, `payment_intent.processing`, `payment_intent.amount_capturable_updated`, `payment_intent.requires_action`, `payment_intent.partially_funded` | ✔️ | -| `onPaymentIntentCreated` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.created` | `onPaymentIntent` | -| `onPaymentIntentSucceeded` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.succeeded` | `onPaymentIntent` | -| `onPaymentIntentPaymentFailed` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.payment_failed` | `onPaymentIntent` | -| `onPaymentIntentCanceled` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.canceled` | `onPaymentIntent` | -| `onPaymentIntentProcessing` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.processing` | `onPaymentIntent` | -| `onPaymentIntentRequiresAction` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.requires_action` | `onPaymentIntent` | -| `onPaymentIntentAmountCapturableUpdated` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.amount_capturable_updated` | `onPaymentIntent` | -| `onPaymentIntentPartiallyFunded` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.partially_funded` | `onPaymentIntent` | -| `onPayout` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.created`, `payout.updated`, `payout.canceled`, `payout.paid`, `payout.failed`, `payout.reconciliation_completed` | ✔️ | -| `onPayoutCreated` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.created` | `onPayout` | -| `onPayoutUpdated` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.updated` | `onPayout` | -| `onPayoutCanceled` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.canceled` | `onPayout` | -| `onPayoutPaid` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.paid` | `onPayout` | -| `onPayoutFailed` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.failed` | `onPayout` | -| `onPayoutReconciliationCompleted` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.reconciliation_completed` | `onPayout` | -| `onInvoice` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.created`, `payout.updated`, `payout.canceled`, `payout.paid`, `payout.failed`, `payout.reconciliation_completed` | ✔️ | -| `onInvoiceCreated` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.created` | `onInvoice` | -| `onInvoiceFinalized` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.updated` | `onInvoice` | -| `onInvoiceFinalizationFailed` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.canceled` | `onInvoice` | -| `onInvoiceDeleted` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.paid` | `onInvoice` | -| `onInvoiceMarkedUncollectible` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.failed` | `onInvoice` | -| `onInvoicePaid` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | -| `onInvoicePaymentActionRequired` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | -| `onInvoicePaymentFailed` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | -| `onInvoicePaymentSucceeded` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | -| `onInvoiceSent` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | -| `onInvoiceUpcoming` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | -| `onInvoiceVoided` | [Invoice](https://stripe.com/docs/api/invoices/object) | `payout.reconciliation_completed` | `onInvoice` | -| `onInvoiceItemCreated` | [InvoiceItem](https://stripe.com/docs/api/invoiceitems/object) | `payout.reconciliation_completed` | N/A | -| `onInvoiceItemDeleted` | [InvoiceItem](https://stripe.com/docs/api/invoiceitems/object) | `payout.reconciliation_completed` | N/A | +| Function Name | Payload Object | Events | Aggregate Version | +| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | +| `onCharge` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.succeeded`, `charge.failed`, `charge.captured`, `charge.refunded`, `charge.updated` | ✔️ | +| `onChargeSucceeded` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.succeeded` | `onCharge` | +| `onChargeFailed` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.failed` | `onCharge` | +| `onChargeCaptured` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.captured` | `onCharge` | +| `onChargeRefunded` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.refunded` | `onCharge` | +| `onChargeUpdated` | [Charge](https://stripe.com/docs/api/events/types#charge_object) | `charge.updated` | `onCharge` | +| `onProduct` | [Product](https://stripe.com/docs/api/events/types#product_object) | `product.created`, `product.updated`, `product.deleted` | ✔️ | +| `onProductCreated` | [Product](https://stripe.com/docs/api/events/types#product_object) | `product.created` | `onProduct` | +| `onProductUpdated` | [Product](https://stripe.com/docs/api/events/types#product_object) | `product.updated` | `onProduct` | +| `onProductDeleted` | [Product](https://stripe.com/docs/api/events/types#product_object) | `product.deleted` | `onProduct` | +| `onPrice` | [Price](https://stripe.com/docs/api/events/types#price_object) | `price.created`, `price.updated`, `price.deleted` | ✔️ | +| `onPriceCreated` | [Price](https://stripe.com/docs/api/events/types#price_object) | `price.created` | `onPrice` | +| `onPriceUpdated` | [Price](https://stripe.com/docs/api/events/types#price_object) | `price.updated` | `onPrice` | +| `onPriceDeleted` | [Price](https://stripe.com/docs/api/events/types#price_object) | `price.deleted` | `onPrice` | +| `onCheckoutSession` | [CheckoutSession](https://stripe.com/docs/api/events/types#checkout_session_object) | `checkout.session.completed`, `checkout.session.async_payment_succeeded`, `checkout.session.async_payment_failed`, `checkout.session.expired` | ✔️ | +| `onCheckoutSessionCompleted` | [CheckoutSession](https://stripe.com/docs/api/events/types#checkout_session_object) | `checkout.session.completed` | `onCheckoutSession` | +| `onCheckoutSessionExpired` | [CheckoutSession](https://stripe.com/docs/api/events/types#checkout_session_object) | `checkout.session.expired` | `onCheckoutSession` | +| `onCustomerSubscription` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.created`, `customer.subscription.updated`, `customer.subscription.deleted`, `customer.subscription.paused`, `customer.subscription.pending_updated_applied`, `customer.subscription.pending_update_expired`, `customer.subscription.resumed` | ✔️ | +| `onCustomerSubscriptionCreated` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.created` | `onCustomerSubscription` | +| `onCustomerSubscriptionUpdated` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.updated` | `onCustomerSubscription` | +| `onCustomerSubscriptionDeleted` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.deleted` | `onCustomerSubscription` | +| `onCustomerSubscriptionPaused` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.paused` | `onCustomerSubscription` | +| `onCustomerSubscriptionPending` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.pending_updated_applied`, `customer.subscription.pending_update_expired` | `onCustomerSubscription` | +| `onCustomerSubscriptionResumed` | [Subscription](https://stripe.com/docs/api/events/types#subscription_object) | `customer.subscription.resumed` | `onCustomerSubscription` | +| `onCustomer` | [Customer](https://stripe.com/docs/api/events/types#customer_object) | `customer.created`, `customer.updated`, `customer.deleted` | ✔️ | +| `onCustomerCreated` | [Customer](https://stripe.com/docs/api/events/types#customer_object) | `customer.created` | `onCustomer` | +| `onCustomerUpdated` | [Customer](https://stripe.com/docs/api/events/types#customer_object) | `customer.updated` | `onCustomer` | +| `onCustomerDeleted` | [Customer](https://stripe.com/docs/api/events/types#customer_object) | `customer.deleted` | `onCustomer` | +| `onExternalAccount` | [Card](https://stripe.com/docs/api/events/types#account_card_object) or [Bank Account](https://stripe.com/docs/api/events/types#account_bank_account_object) | `account.external_account.created`, `account.external_account.updated`, `account.external_account.deleted` | ✔️ | +| `onExternalAccountCreated` | [Card](https://stripe.com/docs/api/events/types#account_card_object) or [Bank Account](https://stripe.com/docs/api/events/types#account_bank_account_object) | `account.external_account.created` | `onExternalAccount` | +| `onExternalAccountUpdated` | [Card](https://stripe.com/docs/api/events/types#account_card_object) or [Bank Account](https://stripe.com/docs/api/events/types#account_bank_account_object) | `account.external_account.updated` | `onExternalAccount` | +| `onExternalAccountDeleted` | [Card](https://stripe.com/docs/api/events/types#account_card_object) or [Bank Account](https://stripe.com/docs/api/events/types#account_bank_account_object) | `account.external_account.deleted` | `onExternalAccount` | +| `onPerson` | [Person](https://stripe.com/docs/api/events/types#person_object) | `account.person.created`, `account.person.updated`, `account.person.deleted` | ✔️ | +| `onPersonCreated` | [Person](https://stripe.com/docs/api/events/types#person_object) | `account.person.created` | `onPerson` | +| `onPersonUpdated` | [Person](https://stripe.com/docs/api/events/types#person_object) | `account.person.updated` | `onPerson` | +| `onPersonDeleted` | [Person](https://stripe.com/docs/api/events/types#person_object) | `account.person.deleted` | `onPerson` | +| `onAccountUpdated` | [Account](https://stripe.com/docs/api/events/types#account_object) | `account.updated` | N/A | +| `onPaymentIntent` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.created`, `payment_intent.succeeded`, `payment_intent.payment_failed`, `payment_intent.canceled`, `payment_intent.processing`, `payment_intent.amount_capturable_updated`, `payment_intent.requires_action`, `payment_intent.partially_funded` | ✔️ | +| `onPaymentIntentCreated` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.created` | `onPaymentIntent` | +| `onPaymentIntentSucceeded` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.succeeded` | `onPaymentIntent` | +| `onPaymentIntentPaymentFailed` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.payment_failed` | `onPaymentIntent` | +| `onPaymentIntentCanceled` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.canceled` | `onPaymentIntent` | +| `onPaymentIntentProcessing` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.processing` | `onPaymentIntent` | +| `onPaymentIntentRequiresAction` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.requires_action` | `onPaymentIntent` | +| `onPaymentIntentAmountCapturableUpdated` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.amount_capturable_updated` | `onPaymentIntent` | +| `onPaymentIntentPartiallyFunded` | [PaymentIntent](https://stripe.com/docs/api/events/types#payment_intent_object) | `payment_intent.partially_funded` | `onPaymentIntent` | +| `onPayout` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.created`, `payout.updated`, `payout.canceled`, `payout.paid`, `payout.failed`, `payout.reconciliation_completed` | ✔️ | +| `onPayoutCreated` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.created` | `onPayout` | +| `onPayoutUpdated` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.updated` | `onPayout` | +| `onPayoutCanceled` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.canceled` | `onPayout` | +| `onPayoutPaid` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.paid` | `onPayout` | +| `onPayoutFailed` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.failed` | `onPayout` | +| `onPayoutReconciliationCompleted` | [Payout](https://stripe.com/docs/api/events/types#payout_object) | `payout.reconciliation_completed` | `onPayout` | +| `onInvoice` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.created`, `invoice.finalized`, `invoice.finalization_failed`, `invoice.deleted`, `invoice.marked_uncollectible`, `invoice.paid`, `invoice.payment_action_required`, `invoice.payment_failed`, `invoice.payment_succeeded`, `invoice.sent`, `invoice.upcoming`, `invoice.voided`, `invoiceitem.created`, `invoiceitem.deleted` | ✔️ | +| `onInvoiceCreated` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.created` | `onInvoice` | +| `onInvoiceFinalized` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.finalized` | `onInvoice` | +| `onInvoiceFinalizationFailed` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.finalization_failed` | `onInvoice` | +| `onInvoiceDeleted` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.deleted` | `onInvoice` | +| `onInvoiceMarkedUncollectible` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.marked_uncollectible` | `onInvoice` | +| `onInvoicePaid` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.paid` | `onInvoice` | +| `onInvoicePaymentActionRequired` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.payment_action_required` | `onInvoice` | +| `onInvoicePaymentFailed` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.payment_failed` | `onInvoice` | +| `onInvoicePaymentSucceeded` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.payment_succeeded` | `onInvoice` | +| `onInvoiceSent` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.sent` | `onInvoice` | +| `onInvoiceUpcoming` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.upcoming` | `onInvoice` | +| `onInvoiceVoided` | [Invoice](https://stripe.com/docs/api/invoices/object) | `invoice.voided` | `onInvoice` | +| `onInvoiceItemCreated` | [InvoiceItem](https://stripe.com/docs/api/invoiceitems/object) | `invoiceitem.created` | N/A | +| `onInvoiceItemDeleted` | [InvoiceItem](https://stripe.com/docs/api/invoiceitems/object) | `invoiceitem.deleted` | N/A | If there are any triggers missing that you'd like to see added, please [open a new GitHub Issue](https://github.com/triggerdotdev/trigger.dev/issues/new) From b5aea6c53411a42aa1813165e95615a1225dceeb Mon Sep 17 00:00:00 2001 From: Dan <8297864+D-K-P@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:35:54 +0000 Subject: [PATCH 5/9] Replaced showcase links -> api (#764) * Updated the examples section with new links / changed showcase link to project showcase * Added links to the api pages for all of our integrations * Deleted card from the airtable tasks page --- docs/examples/introduction.mdx | 22 +++++++++---------- docs/integrations/apis/airtable-tasks.mdx | 1 + docs/integrations/apis/airtable.mdx | 16 +++++++------- docs/integrations/apis/github.mdx | 14 +++++------- docs/integrations/apis/linear.mdx | 6 +++++ docs/integrations/apis/openai.mdx | 14 +++++------- docs/integrations/apis/plain.mdx | 14 +++++------- docs/integrations/apis/replicate.mdx | 6 +++++ docs/integrations/apis/resend.mdx | 14 +++++------- docs/integrations/apis/sendgrid.mdx | 14 +++++------- docs/integrations/apis/shopify.mdx | 20 ++++++++--------- docs/integrations/apis/slack-tasks.mdx | 2 -- docs/integrations/apis/slack.mdx | 14 +++++------- docs/integrations/apis/stripe.mdx | 6 +++++ .../apis/supabase/introduction.mdx | 6 +++++ docs/integrations/apis/typeform.mdx | 6 +++++ 16 files changed, 95 insertions(+), 80 deletions(-) diff --git a/docs/examples/introduction.mdx b/docs/examples/introduction.mdx index 43984b0ab..30178de68 100644 --- a/docs/examples/introduction.mdx +++ b/docs/examples/introduction.mdx @@ -4,18 +4,17 @@ description: "Jobs and code examples you can use to get started." --- + + Find code examples for the API you need that you can copy and paste into your projects. + - The showcase is our library of Jobs. Use them as they are, right out of the box, or customize - them to suit your needs. - - - Find code examples for the API you need that you can copy and paste into your - projects. + Our library of full-stack projects. A great place to learn more and find inspiration for your + next project. @@ -27,9 +26,10 @@ To run them, simply follow the instructions in the README files linked below. | Project Name | Description | Integrations | Author | Status | | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | ------ | -| [OpenAI text summarizer](https://github.com/triggerdotdev/examples/tree/main/openai-text-summarizer) | An app which uses OpenAI to summarize an article and then post the result to Slack. | [OpenAI](https://trigger.dev/docs/integrations/apis/openai) [Slack](https://trigger.dev/docs/integrations/apis/slack) | Trigger.dev | ✅ | -| [Supabase onboarding emails](https://github.com/triggerdotdev/examples/tree/main/supabase-onboarding-emails) | When a user signs up and confirms their email address, they will receive 3 "onboarding" emails over 2 days using Resend.com and Trigger.dev | [Supabase](https://trigger.dev/docs/integrations/apis/supabase) [Resend](https://trigger.dev/docs/integrations/apis/resend) | Trigger.dev | ✅ | +| [OpenAI text summarizer](https://trigger.dev/showcase/projects/openai-text-summarizer) | An app which uses OpenAI to summarize an article and then post the result to Slack. | [OpenAI](https://trigger.dev/docs/integrations/apis/openai) [Slack](https://trigger.dev/docs/integrations/apis/slack) | Trigger.dev | ✅ | +| [Supabase onboarding emails](https://trigger.dev/showcase/projects/supabase-onboarding-emails) | When a user signs up and confirms their email address, they will receive 3 "onboarding" emails over 2 days using Resend.com and Trigger.dev | [Supabase](https://trigger.dev/docs/integrations/apis/supabase) [Resend](https://trigger.dev/docs/integrations/apis/resend) | Trigger.dev | ✅ | | [Generate presentation titles using OpenAI](https://github.com/triggerdotdev/examples/tree/main/express-vanilla) | Generate presentation titles using OpenAI background jobs with Node.js, Express and Trigger.dev | [OpenAI](https://trigger.dev/docs/integrations/apis/openai) | [lirantal](https://github.com/lirantal) | ✅ | -| [Send a basic email with Resend](https://github.com/triggerdotdev/examples/tree/main/resend-email-form) | Send a basic email from a form with Resend | [Resend](https://trigger.dev/docs/integrations/apis/resend) | Trigger.dev | ✅ | +| [Send a basic email with Resend](https://trigger.dev/showcase/projects/resend-email-form) | Send a basic email from a form with Resend | [Resend](https://trigger.dev/docs/integrations/apis/resend) | Trigger.dev | ✅ | +| [AI changelog generator](https://autochangelog.dev/) | Generates a changelog from your GitHub commits using OpenAI | [OpenAI](https://trigger.dev/docs/integrations/apis/openai) [GitHub](https://trigger.dev/docs/integrations/apis/github) | Trigger.dev | ✅ | +| [AI avatar generator](https://trigger.dev/showcase/projects/avatar-generator) | Turn yourself into a superhero using AI | [OpenAI](https://trigger.dev/docs/integrations/apis/openai) | Trigger.dev | ✅ | | AI landing page copy generator | Copies your site and generates new copy using OpenAI | [OpenAI](https://trigger.dev/docs/integrations/apis/openai) | Trigger.dev | 🛠️ | -| AI changelog generator | Generates a changelog from your GitHub commits using OpenAI | [OpenAI](https://trigger.dev/docs/integrations/apis/openai) [GitHub](https://trigger.dev/docs/integrations/apis/github) | Trigger.dev | 🛠️ | diff --git a/docs/integrations/apis/airtable-tasks.mdx b/docs/integrations/apis/airtable-tasks.mdx index fc86cddf6..d5921c7c0 100644 --- a/docs/integrations/apis/airtable-tasks.mdx +++ b/docs/integrations/apis/airtable-tasks.mdx @@ -161,3 +161,4 @@ client.defineJob({ }, }); ``` + diff --git a/docs/integrations/apis/airtable.mdx b/docs/integrations/apis/airtable.mdx index 6da846b30..482b7603f 100644 --- a/docs/integrations/apis/airtable.mdx +++ b/docs/integrations/apis/airtable.mdx @@ -7,14 +7,6 @@ sidebarTitle: Overview & authentication Our Airtable integration allows you to easily connect to the Airtable API and perform tasks such as creating / updating / deleting single or multiple records in your tables. - - Check out pre-built Airtable jobs in our showcase. - - ## Installation To get started with our Airtable integration, you need to install the `@trigger.dev/airtable` packages. You can do this using `npm`, `pnpm`, or `yarn`: @@ -70,6 +62,14 @@ const airtable = new Airtable({ Once you have set up a Airtable client, you can use it to create tasks. +{" "} + Perform tasks such as creating / updating / deleting single or multiple records in table. + +## Example jobs + + + Check out pre-built jobs using Airtable in our API section. + diff --git a/docs/integrations/apis/github.mdx b/docs/integrations/apis/github.mdx index 39efad55b..85c9a636f 100644 --- a/docs/integrations/apis/github.mdx +++ b/docs/integrations/apis/github.mdx @@ -7,14 +7,6 @@ sidebarTitle: Overview & authentication Our GitHub integration allows you to create triggers and tasks that interact with GitHub. Trigger jobs when events happen, like when a new issue is added to a repo, or when a pull request is opened, etc. You can also perform tasks like creating issues, getting information about a repo, adding comments, and much more. - - Check out pre-built GitHub jobs in our showcase. - - ## Installing the GitHub packages To get started with our GitHub integration, you need to install the `@trigger.dev/github` packages. You can do this using `npm`, `pnpm`, or `yarn`: @@ -80,3 +72,9 @@ Once you have set up a GitHub client, you can use it to create triggers and task Perform tasks such as creating a new issue or a new comment. + +## Example jobs + + + Check out pre-built jobs using GitHub in our API section. + diff --git a/docs/integrations/apis/linear.mdx b/docs/integrations/apis/linear.mdx index c1b5287d6..d2b1148c3 100644 --- a/docs/integrations/apis/linear.mdx +++ b/docs/integrations/apis/linear.mdx @@ -463,3 +463,9 @@ client.defineJob({ | `createProjectMilestone` | Creates a project milestone. | | `issuePriorityValues` | Gets issue priority values and labels. | | `viewer` | Gets the currently authenticated user. | + +## Example jobs + + + Check out pre-built jobs using Linear in our API section. + diff --git a/docs/integrations/apis/openai.mdx b/docs/integrations/apis/openai.mdx index 871f95ff3..95dfdd4ba 100644 --- a/docs/integrations/apis/openai.mdx +++ b/docs/integrations/apis/openai.mdx @@ -7,14 +7,6 @@ sidebarTitle: Overview & authentication Our OpenAI integration allows you to easily perform AI-powered tasks, such as summarizing text, answering questions, generating images, fine tuning and much more. - - Check out pre-built OpenAI jobs in our showcase. - - ## Installing the OpenAI packages @@ -173,3 +165,9 @@ client.defineJob({ And you'll get the same experience in the Run Dashboard when viewing the logs: ![Perplexity.ai logs](/images/perplexity.png) + +## Example jobs + + + Check out pre-built jobs using OpenAI in our API section. + diff --git a/docs/integrations/apis/plain.mdx b/docs/integrations/apis/plain.mdx index cfa8ed733..3116bf0b9 100644 --- a/docs/integrations/apis/plain.mdx +++ b/docs/integrations/apis/plain.mdx @@ -8,14 +8,6 @@ sidebarTitle: Overview & authentication Plain is the customer support tool for technical teams and products. It aims to bring engineering and customer service teams together by creating a modern opinionated platform that's fantastic to build with. - - Check out pre-built Plain jobs in our showcase. - - ## Installing the Plain packages @@ -56,3 +48,9 @@ Once you have set up a Plain client, you can use it to create tasks. Perform tasks such as creating/updating customers and adding timeline entries. + +## Example jobs + + + Check out pre-built jobs using Plain in our API section. + diff --git a/docs/integrations/apis/replicate.mdx b/docs/integrations/apis/replicate.mdx index 978bb51c1..d15bc2c4b 100644 --- a/docs/integrations/apis/replicate.mdx +++ b/docs/integrations/apis/replicate.mdx @@ -168,3 +168,9 @@ client.defineJob({ | `paginate` | Pagination helper that returns an async generator. | | `request` | Sends authenticated requests to the Replicate API. | | `run` | Creates and waits for a prediction. | + +## Example jobs + + + Check out pre-built jobs using Replicate in our API section. + diff --git a/docs/integrations/apis/resend.mdx b/docs/integrations/apis/resend.mdx index f04f7d256..8590c29a0 100644 --- a/docs/integrations/apis/resend.mdx +++ b/docs/integrations/apis/resend.mdx @@ -7,14 +7,6 @@ sidebarTitle: Overview & authentication Resend is the email API for developers. With our Resend integration you can send email campaigns, transactional emails, and automated emails (drip campaigns) from your app. - - Check out pre-built Resend jobs in our showcase. - - ## Installing the Resend packages To get started with our Resend integration, you need to install the `@trigger.dev/resend` packages. You can do this using `npm`, `pnpm`, or `yarn`: @@ -55,3 +47,9 @@ Once you have set up a Resend client, you can use it to create tasks. Send emails with Resend. + +## Example jobs + + + Check out pre-built jobs using Resend in our API section. + diff --git a/docs/integrations/apis/sendgrid.mdx b/docs/integrations/apis/sendgrid.mdx index 377a2266e..0bd2c8524 100644 --- a/docs/integrations/apis/sendgrid.mdx +++ b/docs/integrations/apis/sendgrid.mdx @@ -7,14 +7,6 @@ sidebarTitle: Overview & authentication SendGrid is a cloud-based SMTP provider that allows you to send email without having to maintain email servers. With our SendGrid integration you can send email campaigns, transactional emails, and automated emails (drip campaigns) from your app. - - Check out pre-built SendGrid jobs in our showcase. - - ## Installing the SendGrid packages To get started with our SendGrid integration, you need to install the `@trigger.dev/sendgrid` packages. You can do this using `npm`, `pnpm`, or `yarn`: @@ -57,3 +49,9 @@ Once you have set up a SendGrid client, you can use it to create tasks. Send emails with SendGrid. + +## Example jobs + + + Check out pre-built jobs using SendGrid in our API section. + diff --git a/docs/integrations/apis/shopify.mdx b/docs/integrations/apis/shopify.mdx index f65dab881..d1bcf0b9f 100644 --- a/docs/integrations/apis/shopify.mdx +++ b/docs/integrations/apis/shopify.mdx @@ -7,14 +7,6 @@ sidebarTitle: Overview & authentication Our Shopify integration allows you to create triggers and tasks that interact with Shopify. Trigger jobs when events happen, like when a new product is added to a shop, or when an order is paid for, etc. You can also perform tasks like creating products, editing variants, getting information about an order, and a lot more. -{/* - Check out pre-built Shopify jobs in our showcase. - */} - ## Installing the Shopify packages To get started with our Shopify integration, you need to install the `@trigger.dev/shopify` packages. You can do this using `npm`, `pnpm`, or `yarn`: @@ -43,13 +35,13 @@ It's **required** to import the correct Runtime Adapter for your platform. All e ```ts // Import the Node.js adapter -import '@shopify/shopify-api/adapters/node'; +import "@shopify/shopify-api/adapters/node"; // Import the CloudFlare Worker adapter -import '@shopify/shopify-api/adapters/cf-worker'; +import "@shopify/shopify-api/adapters/cf-worker"; // Import the generic Web API adapter -import '@shopify/shopify-api/adapters/web-api'; +import "@shopify/shopify-api/adapters/web-api"; ``` You can then import and use `@trigger.dev/shopify` like any other integration: @@ -102,3 +94,9 @@ Once you have set up a Shopify client, you can use it to create triggers and tas Perform Tasks such as creating new variants, or editing orders, and more. + +## Example jobs + + + Check out pre-built jobs using Shopify in our API section. + diff --git a/docs/integrations/apis/slack-tasks.mdx b/docs/integrations/apis/slack-tasks.mdx index f8c6f21ff..dfee32167 100644 --- a/docs/integrations/apis/slack-tasks.mdx +++ b/docs/integrations/apis/slack-tasks.mdx @@ -67,8 +67,6 @@ client.defineJob({ Use their [Block kit builder](https://api.slack.com/block-kit), and then use the `blocks` property to send the message. -To see this in action, check out our 'Daily Slack alert for Linear issues' [example job](https://trigger.dev/showcase/jobs/linearIssuesDailySlackAlert). - ```ts linearIssuesDailySlackAlert.ts ... await io.slack.postMessage("post message", { diff --git a/docs/integrations/apis/slack.mdx b/docs/integrations/apis/slack.mdx index 22cd7cb3f..5e647860d 100644 --- a/docs/integrations/apis/slack.mdx +++ b/docs/integrations/apis/slack.mdx @@ -7,14 +7,6 @@ sidebarTitle: Overview & authentication Our Slack integration allows you to connect to the Slack API and post messages to Slack. - - Check out pre-built Slack jobs in our showcase. - - ## Installation @@ -58,3 +50,9 @@ Once you have set up a Slack client, you can use it to create tasks. Perform tasks such as posting messages to a channel. + +## Example jobs + + + Check out pre-built jobs using Slack in our API section. + diff --git a/docs/integrations/apis/stripe.mdx b/docs/integrations/apis/stripe.mdx index 63f692868..87b7febfc 100644 --- a/docs/integrations/apis/stripe.mdx +++ b/docs/integrations/apis/stripe.mdx @@ -275,3 +275,9 @@ client.defineJob({ ``` Make sure to pass the `idempotencyKey` to the underlying client to ensure that the API call is only executed once. This is only needed for mutating API calls. + +## Example jobs + + + Check out pre-built jobs using Stripe in our API section. + diff --git a/docs/integrations/apis/supabase/introduction.mdx b/docs/integrations/apis/supabase/introduction.mdx index af78305dc..224c190e0 100644 --- a/docs/integrations/apis/supabase/introduction.mdx +++ b/docs/integrations/apis/supabase/introduction.mdx @@ -73,3 +73,9 @@ Our Supabase package supports two different integrations: One for the Supabase M [service_role](https://supabase.com/docs/guides/api/api-keys#the-servicerole-key) key. + +## Example jobs + + + Check out pre-built jobs using Supabase in our API section. + diff --git a/docs/integrations/apis/typeform.mdx b/docs/integrations/apis/typeform.mdx index 9b695b155..2e7a089fb 100644 --- a/docs/integrations/apis/typeform.mdx +++ b/docs/integrations/apis/typeform.mdx @@ -165,3 +165,9 @@ client.defineJob({ }, }); ``` + +## Example jobs + + + Check out pre-built jobs using Typeform in our API section. + From 1f3733b70f09dc1c2ce76a3a0b3cf003c383ac1b Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Mon, 4 Dec 2023 09:20:40 +0000 Subject: [PATCH 6/9] Fix resuming timed out or auto-yielded executions --- apps/webapp/app/services/runs/performRunExecutionV3.server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/webapp/app/services/runs/performRunExecutionV3.server.ts b/apps/webapp/app/services/runs/performRunExecutionV3.server.ts index 52fc0ed78..779013fbb 100644 --- a/apps/webapp/app/services/runs/performRunExecutionV3.server.ts +++ b/apps/webapp/app/services/runs/performRunExecutionV3.server.ts @@ -834,6 +834,7 @@ export class PerformRunExecutionV3Service { ], }, forceYieldImmediately: false, + status: "WAITING_TO_EXECUTE", }, select: { executionCount: true, @@ -1005,6 +1006,7 @@ export class PerformRunExecutionV3Service { }, }, forceYieldImmediately: false, + status: "WAITING_TO_EXECUTE", }, }); From de652c1dfbff1a8f4239196370ccbc190674622e Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:37:55 +0000 Subject: [PATCH 7/9] Fix: Shopify tasks and KV `get()` return types (#770) * Improve KV get types * Fix shopify find and all task return types * Add changeset --- .changeset/khaki-points-remain.md | 7 +++ integrations/airtable/src/webhooks.ts | 8 ++++ integrations/shopify/src/rest.ts | 43 ++++++++++++++++--- integrations/shopify/src/types.ts | 13 +++--- integrations/shopify/src/webhooks.ts | 8 ++++ .../trigger-sdk/src/store/keyValueStore.ts | 9 ++-- .../src/store/keyValueStoreClient.ts | 2 +- 7 files changed, 71 insertions(+), 19 deletions(-) create mode 100644 .changeset/khaki-points-remain.md diff --git a/.changeset/khaki-points-remain.md b/.changeset/khaki-points-remain.md new file mode 100644 index 000000000..a32c0dd7b --- /dev/null +++ b/.changeset/khaki-points-remain.md @@ -0,0 +1,7 @@ +--- +"@trigger.dev/airtable": patch +"@trigger.dev/shopify": patch +"@trigger.dev/sdk": patch +--- + +Fix Shopify task types and KV `get()` return types diff --git a/integrations/airtable/src/webhooks.ts b/integrations/airtable/src/webhooks.ts index 98ca0c2c3..bc3d0fbe5 100644 --- a/integrations/airtable/src/webhooks.ts +++ b/integrations/airtable/src/webhooks.ts @@ -315,6 +315,10 @@ export function createWebhookSource( delete: async ({ io, ctx }) => { const webhookId = await io.store.job.get("get-webhook-id", "webhook-id"); + if (!webhookId) { + throw new Error("Missing webhook ID for delete operation."); + } + await io.integration.webhooks().delete("delete-webhook", { baseId: ctx.params?.baseId, webhookId, @@ -327,6 +331,10 @@ export function createWebhookSource( `${registerJobNamespace(ctx.key)}:webhook-secret-base64` ); + if (!secretBase64) { + throw new Error("Missing secret for verification."); + } + return await verifyRequestSignature({ request, headerName: "x-airtable-content-mac", diff --git a/integrations/shopify/src/rest.ts b/integrations/shopify/src/rest.ts index 3e9a8ead0..6971524e0 100644 --- a/integrations/shopify/src/rest.ts +++ b/integrations/shopify/src/rest.ts @@ -9,8 +9,23 @@ import { ShopifyInputType, } from "./types"; -type AllReturnType = Promise<{ - data: RecursiveShopifySerializer>["data"]>; +type ResourceArrayWithIndexSignature = T extends Array + ? Array + : never; + +type RecursiveSomeNonNullable = T extends object + ? T extends Array + ? Array> + : SomeNonNullable + : T; + +type AllReturnType< + TResource extends ShopifyRestResources[ResourcesWithStandardMethods], + TSerializedData extends Record[] = RecursiveShopifySerializer< + Awaited>["data"] + >, +> = Promise<{ + data: ResourceArrayWithIndexSignature>; pageInfo?: PageInfo; }>; @@ -18,13 +33,23 @@ type CountReturnType = Promise<{ count: number }>; type DeleteReturnType = Promise; +type FindReturnType< + TResource extends ShopifyRestResources[ResourcesWithStandardMethods], + TSerialized extends Record = RecursiveShopifySerializer>, +> = Promise< + | (SomeNonNullable & { + [key: string]: any; + }) + | null +>; + type SaveReturnType< TResource extends ShopifyRestResources[ResourcesWithStandardMethods], TUpdate extends boolean, TFromData extends any, > = Promise< TUpdate extends true - ? SomeNonNullable, "id"> + ? SomeNonNullable, "id"> : TFromData >; @@ -58,14 +83,18 @@ export class Resource< /** * Fetch a single resource by its ID. */ - async find(key: string, params: Optional[0], "session">) { + async find( + key: string, + params: Optional[0], "session"> + ): FindReturnType { return this.runTask( key, async (client, task, io) => { - const abc = this.#withSession(params ?? {}); - const resource = await client.rest[this.resourceType].find(this.#withSession(params)); + const resource = (await client.rest[this.resourceType].find( + this.#withSession(params) + )) as Awaited>; - return serializeShopifyResource(resource); + return JSON.parse(JSON.stringify(resource)); }, { name: `Find ${this.resourceType}`, diff --git a/integrations/shopify/src/types.ts b/integrations/shopify/src/types.ts index 4861f670d..d6d74de3c 100644 --- a/integrations/shopify/src/types.ts +++ b/integrations/shopify/src/types.ts @@ -1,5 +1,4 @@ import { - ObjectNonNullable, OmitFunctions, OmitIndexSignature, OmitValues, @@ -7,16 +6,14 @@ import { } from "@trigger.dev/integration-kit"; import { ShopifyRestResources } from "./index"; -type OmitNonSerializable = Omit>, "session">; +type OmitNonSerializable = OmitFunctions>; -export type SerializedShopifyResource = Prettify< - TNonNullable extends true ? ObjectNonNullable> : OmitNonSerializable ->; +export type SerializedShopifyResource = Prettify, "session">>; -export type RecursiveShopifySerializer = T extends object +export type RecursiveShopifySerializer = T extends object ? T extends Array ? Array> - : SerializedShopifyResource + : SerializedShopifyResource : T; export type ShopifyReturnType< @@ -42,7 +39,7 @@ export type ShopifyWebhookPayload = { export type ShopifyInputType = { [K in keyof OmitIndexSignature]: Prettify< - Partial, false>> + Partial>> > & { id?: number }; }; diff --git a/integrations/shopify/src/webhooks.ts b/integrations/shopify/src/webhooks.ts index f54986de6..c39bcd8fa 100644 --- a/integrations/shopify/src/webhooks.ts +++ b/integrations/shopify/src/webhooks.ts @@ -105,6 +105,10 @@ export function createWebhookEventSource(integration: Shopify) { delete: async ({ io, ctx }) => { const webhookId = await io.store.job.get("get-webhook-id", "webhook-id"); + if (!webhookId) { + throw new Error("Missing webhook ID for delete operation."); + } + await io.integration.rest.Webhook.delete("delete-webhook", { id: webhookId, }); @@ -130,6 +134,10 @@ export function createWebhookEventSource(integration: Shopify) { `${registerJobNamespace(ctx.key)}:webhook-secret` ); + if (!clientSecret) { + throw new Error("Missing secret for verification."); + } + return await verifyRequestSignature({ request, headerName: "x-shopify-hmac-sha256", diff --git a/packages/trigger-sdk/src/store/keyValueStore.ts b/packages/trigger-sdk/src/store/keyValueStore.ts index 6d112eeef..c7b636d7e 100644 --- a/packages/trigger-sdk/src/store/keyValueStore.ts +++ b/packages/trigger-sdk/src/store/keyValueStore.ts @@ -74,9 +74,12 @@ export class KeyValueStore { ); } - async get = any>(cacheKey: string | any[], key: string): Promise; - async get = any>(key: string): Promise; - async get = any>(param1: string | any[], param2?: string): Promise { + async get = any>(cacheKey: string | any[], key: string): Promise; + async get = any>(key: string): Promise; + async get = any>( + param1: string | any[], + param2?: string + ): Promise { const runStore = runLocalStorage.getStore(); if (!runStore) { diff --git a/packages/trigger-sdk/src/store/keyValueStoreClient.ts b/packages/trigger-sdk/src/store/keyValueStoreClient.ts index e294bbcd4..3c81db53f 100644 --- a/packages/trigger-sdk/src/store/keyValueStoreClient.ts +++ b/packages/trigger-sdk/src/store/keyValueStoreClient.ts @@ -47,7 +47,7 @@ export class KeyValueStoreClient implements AsyncMap { return result.deleted; } - async get>(key: string): Promise { + async get>(key: string): Promise { const result = await this.queryStore("GET", { key: this.#namespacedKey(key), }); From 1567239718c9514cf6ba98877800f95d3be887ff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:14:41 +0000 Subject: [PATCH 8/9] chore: Update version for release (#771) * chore: Update version for release * Release lockfile --------- Co-authored-by: github-actions[bot] Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com> --- .changeset/khaki-points-remain.md | 7 ---- apps/proxy/CHANGELOG.md | 6 +++ apps/proxy/package.json | 2 +- integrations/airtable/CHANGELOG.md | 9 ++++ integrations/airtable/package.json | 6 +-- integrations/github/CHANGELOG.md | 8 ++++ integrations/github/package.json | 6 +-- integrations/linear/CHANGELOG.md | 8 ++++ integrations/linear/package.json | 6 +-- integrations/openai/CHANGELOG.md | 8 ++++ integrations/openai/package.json | 6 +-- integrations/plain/CHANGELOG.md | 8 ++++ integrations/plain/package.json | 6 +-- integrations/replicate/CHANGELOG.md | 8 ++++ integrations/replicate/package.json | 6 +-- integrations/resend/CHANGELOG.md | 8 ++++ integrations/resend/package.json | 6 +-- integrations/sendgrid/CHANGELOG.md | 8 ++++ integrations/sendgrid/package.json | 6 +-- integrations/shopify/CHANGELOG.md | 9 ++++ integrations/shopify/package.json | 6 +-- integrations/slack/CHANGELOG.md | 7 ++++ integrations/slack/package.json | 4 +- integrations/stripe/CHANGELOG.md | 8 ++++ integrations/stripe/package.json | 6 +-- integrations/supabase/CHANGELOG.md | 8 ++++ integrations/supabase/package.json | 6 +-- integrations/typeform/CHANGELOG.md | 8 ++++ integrations/typeform/package.json | 6 +-- packages/astro/CHANGELOG.md | 7 ++++ packages/astro/package.json | 4 +- packages/cli/CHANGELOG.md | 6 +++ packages/cli/package.json | 2 +- packages/core-backend/CHANGELOG.md | 2 + packages/core-backend/package.json | 2 +- packages/core/CHANGELOG.md | 2 + packages/core/package.json | 2 +- packages/eslint-plugin/CHANGELOG.md | 2 + packages/eslint-plugin/package.json | 2 +- packages/express/CHANGELOG.md | 7 ++++ packages/express/package.json | 6 +-- packages/integration-kit/CHANGELOG.md | 6 +++ packages/integration-kit/package.json | 2 +- packages/nestjs/CHANGELOG.md | 7 ++++ packages/nestjs/package.json | 6 +-- packages/nextjs/CHANGELOG.md | 7 ++++ packages/nextjs/package.json | 4 +- packages/react/CHANGELOG.md | 6 +++ packages/react/package.json | 4 +- packages/remix/CHANGELOG.md | 7 ++++ packages/remix/package.json | 4 +- packages/sveltekit/CHANGELOG.md | 7 ++++ packages/sveltekit/package.json | 4 +- packages/testing/CHANGELOG.md | 8 ++++ packages/testing/package.json | 2 +- packages/trigger-sdk/CHANGELOG.md | 8 ++++ packages/trigger-sdk/package.json | 6 +-- pnpm-lock.yaml | 60 +++++++++++++-------------- 58 files changed, 287 insertions(+), 101 deletions(-) delete mode 100644 .changeset/khaki-points-remain.md diff --git a/.changeset/khaki-points-remain.md b/.changeset/khaki-points-remain.md deleted file mode 100644 index a32c0dd7b..000000000 --- a/.changeset/khaki-points-remain.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@trigger.dev/airtable": patch -"@trigger.dev/shopify": patch -"@trigger.dev/sdk": patch ---- - -Fix Shopify task types and KV `get()` return types diff --git a/apps/proxy/CHANGELOG.md b/apps/proxy/CHANGELOG.md index f28d93af6..3298a9ff4 100644 --- a/apps/proxy/CHANGELOG.md +++ b/apps/proxy/CHANGELOG.md @@ -1,5 +1,11 @@ # proxy +## 0.0.5 + +### Patch Changes + +- @trigger.dev/core@2.2.11 + ## 0.0.4 ### Patch Changes diff --git a/apps/proxy/package.json b/apps/proxy/package.json index 62a28d1f5..a83b7e8c0 100644 --- a/apps/proxy/package.json +++ b/apps/proxy/package.json @@ -1,6 +1,6 @@ { "name": "proxy", - "version": "0.0.4", + "version": "0.0.5", "private": true, "scripts": { "deploy": "wrangler deploy", diff --git a/integrations/airtable/CHANGELOG.md b/integrations/airtable/CHANGELOG.md index 96c73a4f1..cdb028d66 100644 --- a/integrations/airtable/CHANGELOG.md +++ b/integrations/airtable/CHANGELOG.md @@ -1,5 +1,14 @@ # @trigger.dev/airtable +## 2.2.11 + +### Patch Changes + +- de652c1d: Fix Shopify task types and KV `get()` return types +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/airtable/package.json b/integrations/airtable/package.json index 68d06e839..b79462e07 100644 --- a/integrations/airtable/package.json +++ b/integrations/airtable/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/airtable", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev integration for airtable", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -26,8 +26,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.10", - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.11", + "@trigger.dev/sdk": "workspace:^2.2.11", "airtable": "^0.12.1", "zod": "3.22.3" }, diff --git a/integrations/github/CHANGELOG.md b/integrations/github/CHANGELOG.md index aec8c9464..142c2260e 100644 --- a/integrations/github/CHANGELOG.md +++ b/integrations/github/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/github +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/github/package.json b/integrations/github/package.json index 3afb5085f..cfe94d27d 100644 --- a/integrations/github/package.json +++ b/integrations/github/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/github", - "version": "2.2.10", + "version": "2.2.11", "description": "The official GitHub integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -29,8 +29,8 @@ "@octokit/request": "^6.2.5", "@octokit/request-error": "^4.0.1", "@octokit/webhooks": "^10.4.0", - "@trigger.dev/integration-kit": "workspace:^2.2.10", - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.11", + "@trigger.dev/sdk": "workspace:^2.2.11", "octokit": "^2.0.14", "zod": "3.22.3" }, diff --git a/integrations/linear/CHANGELOG.md b/integrations/linear/CHANGELOG.md index fa2ae173c..d3fca2329 100644 --- a/integrations/linear/CHANGELOG.md +++ b/integrations/linear/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/linear +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/linear/package.json b/integrations/linear/package.json index 4299e8f69..60af21c1a 100644 --- a/integrations/linear/package.json +++ b/integrations/linear/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/linear", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev integration for @linear/sdk", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -27,8 +27,8 @@ }, "dependencies": { "@linear/sdk": "^8.0.0", - "@trigger.dev/integration-kit": "workspace:^2.2.10", - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.11", + "@trigger.dev/sdk": "workspace:^2.2.11", "zod": "3.22.3" }, "engines": { diff --git a/integrations/openai/CHANGELOG.md b/integrations/openai/CHANGELOG.md index 42f815189..28ecd5daa 100644 --- a/integrations/openai/CHANGELOG.md +++ b/integrations/openai/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/slack +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/openai/package.json b/integrations/openai/package.json index d9694593d..069b5e0d8 100644 --- a/integrations/openai/package.json +++ b/integrations/openai/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/openai", - "version": "2.2.10", + "version": "2.2.11", "description": "The official OpenAI integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -31,8 +31,8 @@ }, "dependencies": { "openai": "^4.16.1", - "@trigger.dev/sdk": "workspace:^2.2.10", - "@trigger.dev/integration-kit": "workspace:^2.2.10" + "@trigger.dev/sdk": "workspace:^2.2.11", + "@trigger.dev/integration-kit": "workspace:^2.2.11" }, "engines": { "node": ">=18.0.0" diff --git a/integrations/plain/CHANGELOG.md b/integrations/plain/CHANGELOG.md index 5657a9d99..f19789b38 100644 --- a/integrations/plain/CHANGELOG.md +++ b/integrations/plain/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/plain +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/plain/package.json b/integrations/plain/package.json index a51774759..53b6a8fa1 100644 --- a/integrations/plain/package.json +++ b/integrations/plain/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/plain", - "version": "2.2.10", + "version": "2.2.11", "description": "The official Plain.com integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -24,8 +24,8 @@ "build:tsup": "tsup" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.10", - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.11", + "@trigger.dev/sdk": "workspace:^2.2.11", "@team-plain/typescript-sdk": "^2.7.0" }, "engines": { diff --git a/integrations/replicate/CHANGELOG.md b/integrations/replicate/CHANGELOG.md index e7148421e..5757d91e4 100644 --- a/integrations/replicate/CHANGELOG.md +++ b/integrations/replicate/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/replicate +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/replicate/package.json b/integrations/replicate/package.json index 970bfaf01..021825338 100644 --- a/integrations/replicate/package.json +++ b/integrations/replicate/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/replicate", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev integration for replicate", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -26,8 +26,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.10", - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.11", + "@trigger.dev/sdk": "workspace:^2.2.11", "replicate": "^0.18.1", "zod": "3.22.3" }, diff --git a/integrations/resend/CHANGELOG.md b/integrations/resend/CHANGELOG.md index 8359cefda..eb94f1ff8 100644 --- a/integrations/resend/CHANGELOG.md +++ b/integrations/resend/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/resend +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/resend/package.json b/integrations/resend/package.json index 86c0f6915..cb4b9bc85 100644 --- a/integrations/resend/package.json +++ b/integrations/resend/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/resend", - "version": "2.2.10", + "version": "2.2.11", "description": "The official Resend.com integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -24,8 +24,8 @@ "build:tsup": "tsup" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.10", - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.11", + "@trigger.dev/sdk": "workspace:^2.2.11", "resend": "^2.0.0" }, "engines": { diff --git a/integrations/sendgrid/CHANGELOG.md b/integrations/sendgrid/CHANGELOG.md index 362755746..ceeb50745 100644 --- a/integrations/sendgrid/CHANGELOG.md +++ b/integrations/sendgrid/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/sendgrid +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/sendgrid/package.json b/integrations/sendgrid/package.json index 424c1966a..18e08d17e 100644 --- a/integrations/sendgrid/package.json +++ b/integrations/sendgrid/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/sendgrid", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev integration for @sendgrid/mail", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -27,8 +27,8 @@ }, "dependencies": { "@sendgrid/mail": "^7.7.0", - "@trigger.dev/sdk": "workspace:^2.2.10", - "@trigger.dev/integration-kit": "workspace:^2.2.10" + "@trigger.dev/sdk": "workspace:^2.2.11", + "@trigger.dev/integration-kit": "workspace:^2.2.11" }, "engines": { "node": ">=16.8.0" diff --git a/integrations/shopify/CHANGELOG.md b/integrations/shopify/CHANGELOG.md index bc30fa62a..90c336d6a 100644 --- a/integrations/shopify/CHANGELOG.md +++ b/integrations/shopify/CHANGELOG.md @@ -1,5 +1,14 @@ # @trigger.dev/shopify +## 2.2.11 + +### Patch Changes + +- de652c1d: Fix Shopify task types and KV `get()` return types +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/shopify/package.json b/integrations/shopify/package.json index d89a81e5e..7d634df5b 100644 --- a/integrations/shopify/package.json +++ b/integrations/shopify/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/shopify", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev integration for @shopify/shopify-api", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -27,8 +27,8 @@ }, "dependencies": { "@shopify/shopify-api": "^8.0.2", - "@trigger.dev/sdk": "workspace:^2.2.10", - "@trigger.dev/integration-kit": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.11", + "@trigger.dev/integration-kit": "workspace:^2.2.11", "zod": "3.22.3" }, "engines": { diff --git a/integrations/slack/CHANGELOG.md b/integrations/slack/CHANGELOG.md index 870f0868f..7b782e368 100644 --- a/integrations/slack/CHANGELOG.md +++ b/integrations/slack/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/slack +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/slack/package.json b/integrations/slack/package.json index 0a2411d70..80c2ed8d8 100644 --- a/integrations/slack/package.json +++ b/integrations/slack/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/slack", - "version": "2.2.10", + "version": "2.2.11", "description": "The official Slack integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -25,7 +25,7 @@ }, "dependencies": { "@slack/web-api": "^6.8.1", - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.11", "zod": "3.22.3" }, "engines": { diff --git a/integrations/stripe/CHANGELOG.md b/integrations/stripe/CHANGELOG.md index ed3415b03..6b01c2a49 100644 --- a/integrations/stripe/CHANGELOG.md +++ b/integrations/stripe/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/stripe +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/stripe/package.json b/integrations/stripe/package.json index 20b16e6af..deb58e656 100644 --- a/integrations/stripe/package.json +++ b/integrations/stripe/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/stripe", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev integration for stripe", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -26,8 +26,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.10", - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.11", + "@trigger.dev/sdk": "workspace:^2.2.11", "stripe": "^12.14.0", "zod": "3.22.3" }, diff --git a/integrations/supabase/CHANGELOG.md b/integrations/supabase/CHANGELOG.md index 3b62b6c7c..c9181c287 100644 --- a/integrations/supabase/CHANGELOG.md +++ b/integrations/supabase/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/supabase +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/supabase/package.json b/integrations/supabase/package.json index 27e74ff69..a7829bf3a 100644 --- a/integrations/supabase/package.json +++ b/integrations/supabase/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/supabase", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev integration for @supabase/supabase-js", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -27,8 +27,8 @@ }, "dependencies": { "@supabase/supabase-js": "^2.26.0", - "@trigger.dev/integration-kit": "workspace:^2.2.10", - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.11", + "@trigger.dev/sdk": "workspace:^2.2.11", "supabase-management-js": "^0.1.4", "zod": "3.22.3" }, diff --git a/integrations/typeform/CHANGELOG.md b/integrations/typeform/CHANGELOG.md index c1490e253..ab08e837b 100644 --- a/integrations/typeform/CHANGELOG.md +++ b/integrations/typeform/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/typeform +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/integration-kit@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/integrations/typeform/package.json b/integrations/typeform/package.json index a689195d3..4e899b0b5 100644 --- a/integrations/typeform/package.json +++ b/integrations/typeform/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/typeform", - "version": "2.2.10", + "version": "2.2.11", "description": "The official Typeform integration for Trigger.dev", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -25,8 +25,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@trigger.dev/integration-kit": "workspace:^2.2.10", - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/integration-kit": "workspace:^2.2.11", + "@trigger.dev/sdk": "workspace:^2.2.11", "@typeform/api-client": "^1.8.0", "zod": "3.22.3" }, diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index da9b791aa..39b884df4 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/astro +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 6606d1066..601deeaa6 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,7 +1,7 @@ { "name": "@trigger.dev/astro", "description": "An Astro-native integration for Trigger.dev background jobs platform", - "version": "2.2.10", + "version": "2.2.11", "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ @@ -20,7 +20,7 @@ "build:tsup": "tsup" }, "peerDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.10" + "@trigger.dev/sdk": "workspace:^2.2.11" }, "devDependencies": { "astro": "^3.0.12", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 969a720fb..fa8577779 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # create-trigger +## 2.2.11 + +### Patch Changes + +- @trigger.dev/core@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 0fbba518e..ac1090b97 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/cli", - "version": "2.2.10", + "version": "2.2.11", "description": "The Trigger.dev CLI", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/core-backend/CHANGELOG.md b/packages/core-backend/CHANGELOG.md index b1ae0b20b..694315368 100644 --- a/packages/core-backend/CHANGELOG.md +++ b/packages/core-backend/CHANGELOG.md @@ -1,5 +1,7 @@ # @trigger.dev/core-backend +## 2.2.11 + ## 2.2.10 ## 2.2.9 diff --git a/packages/core-backend/package.json b/packages/core-backend/package.json index 6d22746fb..4db625773 100644 --- a/packages/core-backend/package.json +++ b/packages/core-backend/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/core-backend", - "version": "2.2.10", + "version": "2.2.11", "description": "Core code used across `@trigger.dev/sdk` and Trigger.dev server", "license": "MIT", "main": "./dist/index.js", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 9abef8d80..650616fe4 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,7 @@ # internal-platform +## 2.2.11 + ## 2.2.10 ## 2.2.9 diff --git a/packages/core/package.json b/packages/core/package.json index 8ac57abe0..9896ab651 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/core", - "version": "2.2.10", + "version": "2.2.11", "description": "Core code used across the Trigger.dev SDK and platform", "license": "MIT", "main": "./dist/index.js", diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 258a28ed8..44e6ffbdf 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,5 +1,7 @@ # @trigger.dev/eslint-plugin +## 2.2.11 + ## 2.2.10 ## 2.2.9 diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 6d9dbaa28..da3e960cd 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/eslint-plugin", - "version": "2.2.10", + "version": "2.2.11", "description": "ESLint plugin with trigger.dev best practices", "keywords": [ "eslint", diff --git a/packages/express/CHANGELOG.md b/packages/express/CHANGELOG.md index e6ebca7e6..5fb16fb4b 100644 --- a/packages/express/CHANGELOG.md +++ b/packages/express/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/express +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/packages/express/package.json b/packages/express/package.json index da05a31a7..d810d9957 100644 --- a/packages/express/package.json +++ b/packages/express/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/express", - "version": "2.2.10", + "version": "2.2.11", "description": "Official Express adapter for Trigger.dev", "license": "MIT", "main": "./dist/index.js", @@ -19,7 +19,7 @@ "./package.json": "./package.json" }, "devDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.11", "@trigger.dev/tsconfig": "workspace:*", "@types/debug": "^4.1.7", "@types/express": "^4.17.13", @@ -33,7 +33,7 @@ "build:tsup": "tsup" }, "peerDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.10" + "@trigger.dev/sdk": "workspace:^2.2.11" }, "dependencies": { "debug": "^4.3.4", diff --git a/packages/integration-kit/CHANGELOG.md b/packages/integration-kit/CHANGELOG.md index dcb1f8f42..c1d927998 100644 --- a/packages/integration-kit/CHANGELOG.md +++ b/packages/integration-kit/CHANGELOG.md @@ -1,5 +1,11 @@ # @trigger.dev/integration-kit +## 2.2.11 + +### Patch Changes + +- @trigger.dev/core@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/packages/integration-kit/package.json b/packages/integration-kit/package.json index 25ae49845..cfeb122c9 100644 --- a/packages/integration-kit/package.json +++ b/packages/integration-kit/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/integration-kit", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev Integration Kit has helpers to make creating integrations easier", "license": "MIT", "main": "./dist/index.js", diff --git a/packages/nestjs/CHANGELOG.md b/packages/nestjs/CHANGELOG.md index b65809586..ab912da82 100644 --- a/packages/nestjs/CHANGELOG.md +++ b/packages/nestjs/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/nestjs +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/packages/nestjs/package.json b/packages/nestjs/package.json index 20c6849ab..93497964f 100644 --- a/packages/nestjs/package.json +++ b/packages/nestjs/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/nestjs", - "version": "2.2.10", + "version": "2.2.11", "description": "Official NestJS adapter for Trigger.dev", "license": "MIT", "main": "./dist/index.js", @@ -19,7 +19,7 @@ "./package.json": "./package.json" }, "devDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.11", "@trigger.dev/tsconfig": "workspace:*", "@types/debug": "^4.1.7", "@types/express": "^4.17.13", @@ -35,7 +35,7 @@ }, "peerDependencies": { "@nestjs/common": ">=10.0.0", - "@trigger.dev/sdk": "workspace:^2.2.10" + "@trigger.dev/sdk": "workspace:^2.2.11" }, "dependencies": { "@nestjs/common": "^10.2.4", diff --git a/packages/nextjs/CHANGELOG.md b/packages/nextjs/CHANGELOG.md index c23a49473..c0cb930d0 100644 --- a/packages/nextjs/CHANGELOG.md +++ b/packages/nextjs/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/nextjs +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 05c3c4b8c..6c6e5997d 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/nextjs", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev Next.js integration", "license": "MIT", "main": "./dist/index.js", @@ -36,7 +36,7 @@ "build:tsup": "tsup" }, "peerDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.11", "next": ">=12.0.0" }, "dependencies": { diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 2e245975d..449f92aa3 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @trigger.dev/react +## 2.2.11 + +### Patch Changes + +- @trigger.dev/core@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 80b581610..be80ff4a8 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/react", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev React SDK", "license": "MIT", "types": "dist/index.d.ts", @@ -27,7 +27,7 @@ }, "dependencies": { "@tanstack/react-query": "5.0.0-beta.2", - "@trigger.dev/core": "workspace:^2.2.10", + "@trigger.dev/core": "workspace:^2.2.11", "debug": "^4.3.4", "zod": "3.22.3" }, diff --git a/packages/remix/CHANGELOG.md b/packages/remix/CHANGELOG.md index 139d00013..9df11a4b3 100644 --- a/packages/remix/CHANGELOG.md +++ b/packages/remix/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/remix +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/packages/remix/package.json b/packages/remix/package.json index e2d83ed1c..1ad880004 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/remix", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev Remix integration", "license": "MIT", "main": "./dist/index.js", @@ -34,7 +34,7 @@ "build:tsup": "tsup" }, "peerDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.10", + "@trigger.dev/sdk": "workspace:^2.2.11", "@remix-run/server-runtime": ">1.19.0" }, "dependencies": { diff --git a/packages/sveltekit/CHANGELOG.md b/packages/sveltekit/CHANGELOG.md index b41493e7e..2319fb5d2 100644 --- a/packages/sveltekit/CHANGELOG.md +++ b/packages/sveltekit/CHANGELOG.md @@ -1,5 +1,12 @@ # @trigger.dev/sveltekit +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index 0d6d6be35..fc1319e0e 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/sveltekit", - "version": "2.2.10", + "version": "2.2.11", "description": "Trigger.dev svelteKit integration", "license": "MIT", "main": "./dist/index.js", @@ -33,7 +33,7 @@ "build:tsup": "tsup" }, "peerDependencies": { - "@trigger.dev/sdk": "workspace:^2.2.10" + "@trigger.dev/sdk": "workspace:^2.2.11" }, "dependencies": { "debug": "^4.3.4" diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 15614c0d5..40f1dfa74 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/testing +## 2.2.11 + +### Patch Changes + +- Updated dependencies [de652c1d] + - @trigger.dev/sdk@2.2.11 + - @trigger.dev/core@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index 2bebb98ee..cac58c933 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,7 +1,7 @@ { "name": "@trigger.dev/testing", "description": "A collection of useful tools to write tests for Trigger.dev.", - "version": "2.2.10", + "version": "2.2.11", "license": "MIT", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/trigger-sdk/CHANGELOG.md b/packages/trigger-sdk/CHANGELOG.md index 4383abc85..40fe0d663 100644 --- a/packages/trigger-sdk/CHANGELOG.md +++ b/packages/trigger-sdk/CHANGELOG.md @@ -1,5 +1,13 @@ # @trigger.dev/sdk +## 2.2.11 + +### Patch Changes + +- de652c1d: Fix Shopify task types and KV `get()` return types + - @trigger.dev/core@2.2.11 + - @trigger.dev/core-backend@2.2.11 + ## 2.2.10 ### Patch Changes diff --git a/packages/trigger-sdk/package.json b/packages/trigger-sdk/package.json index 12f31f3da..147100ccc 100644 --- a/packages/trigger-sdk/package.json +++ b/packages/trigger-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@trigger.dev/sdk", - "version": "2.2.10", + "version": "2.2.11", "description": "trigger.dev Node.JS SDK", "license": "MIT", "main": "./dist/index.js", @@ -25,8 +25,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@trigger.dev/core": "workspace:^2.2.10", - "@trigger.dev/core-backend": "workspace:^2.2.10", + "@trigger.dev/core": "workspace:^2.2.11", + "@trigger.dev/core-backend": "workspace:^2.2.11", "chalk": "^5.2.0", "colorette": "^2.0.20", "cronstrue": "^2.21.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b65705f37..be38ff2dc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -415,8 +415,8 @@ importers: integrations/airtable: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/node': 16.x airtable: ^0.12.1 @@ -443,8 +443,8 @@ importers: '@octokit/types': ^9.2.3 '@octokit/webhooks': ^10.4.0 '@octokit/webhooks-types': ^6.10.0 - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/node': '18' octokit: ^2.0.14 @@ -470,8 +470,8 @@ importers: integrations/linear: specifiers: '@linear/sdk': ^8.0.0 - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/node': 16.x rimraf: ^3.0.2 @@ -492,8 +492,8 @@ importers: integrations/openai: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/jest': ^29.5.3 '@types/node': '18' @@ -520,8 +520,8 @@ importers: integrations/plain: specifiers: '@team-plain/typescript-sdk': ^2.7.0 - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/node': '18' rimraf: ^3.0.2 @@ -538,8 +538,8 @@ importers: integrations/replicate: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/node': 16.x replicate: ^0.18.1 @@ -561,8 +561,8 @@ importers: integrations/resend: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/node': '18' resend: ^2.0.0 @@ -581,8 +581,8 @@ importers: integrations/sendgrid: specifiers: '@sendgrid/mail': ^7.7.0 - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/node': 16.x rimraf: ^3.0.2 @@ -602,8 +602,8 @@ importers: integrations/shopify: specifiers: '@shopify/shopify-api': ^8.0.2 - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/node': 16.x rimraf: ^3.0.2 @@ -625,7 +625,7 @@ importers: integrations/slack: specifiers: '@slack/web-api': ^6.8.1 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/node': '18' rimraf: ^3.0.2 @@ -643,8 +643,8 @@ importers: integrations/stripe: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@types/node': 16.x rimraf: ^3.0.2 stripe: ^12.14.0 @@ -667,8 +667,8 @@ importers: integrations/supabase: specifiers: '@supabase/supabase-js': ^2.26.0 - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/node': 18.x rimraf: ^3.0.2 @@ -691,8 +691,8 @@ importers: integrations/typeform: specifiers: - '@trigger.dev/integration-kit': workspace:^2.2.10 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/integration-kit': workspace:^2.2.11 + '@trigger.dev/sdk': workspace:^2.2.11 '@typeform/api-client': ^1.8.0 '@types/node': 16.x rimraf: ^3.0.2 @@ -946,7 +946,7 @@ importers: packages/express: specifiers: - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/debug': ^4.1.7 '@types/express': ^4.17.13 @@ -994,7 +994,7 @@ importers: specifiers: '@nestjs/common': ^10.2.4 '@remix-run/web-fetch': ^4.3.5 - '@trigger.dev/sdk': workspace:^2.2.10 + '@trigger.dev/sdk': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/debug': ^4.1.7 '@types/express': ^4.17.13 @@ -1047,7 +1047,7 @@ importers: packages/react: specifiers: '@tanstack/react-query': 5.0.0-beta.2 - '@trigger.dev/core': workspace:^2.2.10 + '@trigger.dev/core': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/debug': ^4.1.7 '@types/react': 18.2.17 @@ -1142,8 +1142,8 @@ importers: packages/trigger-sdk: specifiers: - '@trigger.dev/core': workspace:^2.2.10 - '@trigger.dev/core-backend': workspace:^2.2.10 + '@trigger.dev/core': workspace:^2.2.11 + '@trigger.dev/core-backend': workspace:^2.2.11 '@trigger.dev/tsconfig': workspace:* '@types/debug': ^4.1.7 '@types/node': '18' From 08f7c639ef5f474342499562b071a4bc6a3f74e1 Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Mon, 4 Dec 2023 15:02:15 +0000 Subject: [PATCH 9/9] Maximum background fetch timeout is now 5 minutes --- apps/webapp/app/services/tasks/performTaskOperation.server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/webapp/app/services/tasks/performTaskOperation.server.ts b/apps/webapp/app/services/tasks/performTaskOperation.server.ts index 48fb47d6d..a0b4787d5 100644 --- a/apps/webapp/app/services/tasks/performTaskOperation.server.ts +++ b/apps/webapp/app/services/tasks/performTaskOperation.server.ts @@ -214,8 +214,8 @@ export class PerformTaskOperationService { const abortController = new AbortController(); // calculate the actual timeout. If timeoutInMs is undefined, we use the default of 120s - // Also make sure the timeout is at least 1s, but not bigger than 120s - const actualTimeoutInMs = Math.min(Math.max(timeout?.durationInMs ?? 120000, 1000), 120000); + // Also make sure the timeout is at least 1s, but not bigger than 300s + const actualTimeoutInMs = Math.min(Math.max(timeout?.durationInMs ?? 120000, 1000), 300000); const timeoutId = setTimeout(() => { abortController.abort();