saleor-app-sdk-REDIS_APL/.changeset/afraid-poets-visit.md
Lukasz Ostrowski 9420209a2d
Add sync webhook (#202)
* Change process-async-saleor-webhook to process-saleor-webhook and add better debug logs

* Change processWebhook name

* wip

* Add base class structure

* refactor

* add sync payload builder

* wip

* wip

* Add some missing webhook responses

* Fix tests for Async version

* Fix tests

* Add MockAPL test util

* Refactor tests to use MockAPL

* Add test to sync webhook

* Restore legacy subscriptionQueryAst field for compatibility

* CR Fixes - TS type & event -> eventType

* Changelog, docs and remove old payment webhooks

* Apply suggestions from code review

Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>

* Update src/handlers/next/saleor-webhooks/process-saleor-webhook.ts

Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>

---------

Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
2023-03-06 15:01:22 +01:00

15 lines
381 B
Markdown

---
"@saleor/app-sdk": minor
---
Add SaleorSyncWebhook class
Now app-sdk support both `new SaleorAsyncWebhook()` and `new SaleorSyncWebhook()`.
Changes:
Constructor field `subscriptionQueryAst?: ASTNode` in `SaleorAsyncWebhook` has been deprecated.
Use `query` field instead (`query: ASTNode | string`)
Constructor field `asyncEvent` has been deprecated. Use `event` instead