From 9056e7617a51c13c5bb9edec5e5c4ee63d73b8cb Mon Sep 17 00:00:00 2001 From: Krzysztof Wolski Date: Tue, 6 Jun 2023 14:41:25 +0200 Subject: [PATCH] Update async webhook enum (#249) * Add new async webhook types to events enum * Add changeset --- .changeset/gorgeous-coats-rule.md | 8 ++++++++ src/types.ts | 8 +++++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 .changeset/gorgeous-coats-rule.md diff --git a/.changeset/gorgeous-coats-rule.md b/.changeset/gorgeous-coats-rule.md new file mode 100644 index 0000000..8f8ba7f --- /dev/null +++ b/.changeset/gorgeous-coats-rule.md @@ -0,0 +1,8 @@ +--- +"@saleor/app-sdk": patch +--- + +Added definitions for new async events: + +- `CHECKOUT_FULLY_PAID` +- `GIFT_CARD_SENT` diff --git a/src/types.ts b/src/types.ts index a326748..18528c3 100644 --- a/src/types.ts +++ b/src/types.ts @@ -49,7 +49,7 @@ export type Permission = export type AppPermission = Exclude; /** - * @see https://github.com/saleor/saleor/blob/main/saleor/graphql/schema.graphql#L1505 + * @see https://docs.saleor.io/docs/3.x/api-reference/webhooks/enums/webhook-event-type-async-enum */ export type AsyncWebhookEventType = | "ADDRESS_CREATED" @@ -75,6 +75,7 @@ export type AsyncWebhookEventType = | "GIFT_CARD_CREATED" | "GIFT_CARD_UPDATED" | "GIFT_CARD_DELETED" + | "GIFT_CARD_SENT" | "GIFT_CARD_STATUS_CHANGED" | "GIFT_CARD_METADATA_UPDATED" | "MENU_CREATED" @@ -127,8 +128,9 @@ export type AsyncWebhookEventType = | "PRODUCT_VARIANT_BACK_IN_STOCK" | "PRODUCT_VARIANT_STOCK_UPDATED" | "CHECKOUT_CREATED" - | "CHECKOUT_UPDATED" + | "CHECKOUT_FULLY_PAID" | "CHECKOUT_METADATA_UPDATED" + | "CHECKOUT_UPDATED" | "NOTIFY_USER" | "PAGE_CREATED" | "PAGE_UPDATED" @@ -272,7 +274,7 @@ export interface AppManifest { * ">=3.10 <4 || 4.0.0" - 3.10 and newer, less than 4, but allow exactly 4.0.0 */ requiredSaleorVersion?: string; - /** + /** * App author name displayed in the dashboard * * In Saleor versions lower than 3.13, this field will be ignored