Skip to content

Commit 5b65f5c

Browse files
committed
Deprecate buildSyncWebhookResponsePayload function in favor of new JSON schema for webhook response payloads
1 parent 09345e3 commit 5b65f5c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/eight-files-relate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@saleor/app-sdk": patch
3+
---
4+
5+
Deprecate `buildSyncWebhookResponsePayload` function. Saleor now exposes JSON schema for webhook response payloads that can be used to generate TypeScript types. See [Saleor docs](https://docs.saleor.io/developer/extending/apps/developing-apps/generating-types-for-sync-webhooks) for more info.

src/handlers/shared/sync-webhook-response-builder.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ export type SyncWebhookResponsesMap<V extends SaleorVersion = "3.20"> = CoreSync
258258
} & TransactionWebhookResponses<V>;
259259

260260
/**
261+
* @deprecated Saleor now exposes JSON schema for webhook response payloads that can be used to generate TypeScript types. See https://docs.saleor.io/developer/extending/apps/developing-apps/generating-types-for-sync-webhooks for more details.
262+
*
261263
* Identity function, but it works on Typescript level to pick right payload based on first param
262264
*/
263265
export const buildSyncWebhookResponsePayload = <

0 commit comments

Comments
 (0)