From d79a9a6f06b87e1744df717b9431f41193d7828a Mon Sep 17 00:00:00 2001 From: Lukasz Ostrowski Date: Wed, 29 Nov 2023 15:08:30 +0100 Subject: [PATCH] remove lgacy events --- .../sync-webhook-response-builder.ts | 50 +------------------ src/types.ts | 7 --- 2 files changed, 1 insertion(+), 56 deletions(-) diff --git a/src/handlers/next/saleor-webhooks/sync-webhook-response-builder.ts b/src/handlers/next/saleor-webhooks/sync-webhook-response-builder.ts index b8dd6246..952e0cb7 100644 --- a/src/handlers/next/saleor-webhooks/sync-webhook-response-builder.ts +++ b/src/handlers/next/saleor-webhooks/sync-webhook-response-builder.ts @@ -148,9 +148,8 @@ export type SyncWebhookResponsesMap = { LIST_STORED_PAYMENT_METHODS: { paymentMethods: Array<{ id: string; - supportedPaymentFlows: Array<"INTERACTIVE">; // todo confirm + supportedPaymentFlows: Array<"INTERACTIVE">; type: string; - // todo confirm which are optional, also numbers vs strings creditCardInfo?: { brand: string; lastDigits: string; @@ -162,53 +161,6 @@ export type SyncWebhookResponsesMap = { data?: unknown; }>; }; - // todo - PAYMENT_VOID: {}; - // todo - PAYMENT_REFUND: {}; - PAYMENT_PROCESS: - | { - action_required: true; - // todo verify - action_required_data: { - confirmation_url: "https://www.example.com/3ds-confirmation/"; - }; - customer_id: string; - // todo - confirm if all required - payment_method: { - brand: string; - exp_month: string; - exp_year: string; - last_4: string; - name: string; - type: string; // enum? - }; - transaction_id: string; - } - | { - action_required: false; - kind: "auth"; // todo enum? - customer_id: string; - // todo - check if required all fields - payment_method: { - brand: string; - exp_month: string; - exp_year: string; - last_4: string; - name: string; - type: string; // enum? - }; - transaction_id: string; - }; - PAYMENT_LIST_GATEWAYS: Array<{ - id: string; - name: string; - currencies: string[]; - config: unknown; - }>; - PAYMENT_CONFIRM: unknown; // todo - PAYMENT_CAPTURE: unknown; // todo - PAYMENT_AUTHORIZE: unknown; // todo }; /** diff --git a/src/types.ts b/src/types.ts index 6c91dfee..a93c7c2e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -189,13 +189,6 @@ export type SyncWebhookEventType = | "PAYMENT_GATEWAY_INITIALIZE_SESSION" | "TRANSACTION_INITIALIZE_SESSION" | "TRANSACTION_PROCESS_SESSION" - | "PAYMENT_AUTHORIZE" - | "PAYMENT_CAPTURE" - | "PAYMENT_CONFIRM" - | "PAYMENT_LIST_GATEWAYS" - | "PAYMENT_PROCESS" - | "PAYMENT_REFUND" - | "PAYMENT_VOID" | "LIST_STORED_PAYMENT_METHODS" | "STORED_PAYMENT_METHOD_DELETE_REQUESTED" | "PAYMENT_GATEWAY_INITIALIZE_TOKENIZATION_SESSION"