Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .changeset/fluffy-adults-draw.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fuzzy-rocks-kiss.md

This file was deleted.

23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# @saleor/app-sdk

## 1.0.5

### Patch Changes

- 965089a: Added optional second generic parameter to `buildSyncWebhookResponsePayload` called `SaleorVersion`.
This change improves TypeScript type safety when working with different Saleor versions that have varying payload requirements.

After this change you can for example use `buildSyncWebhookResponsePayload` with different version and differently type responses:

```ts
// 3.20 is default `SaleorVersion` so you can also write `buildSyncWebhookResponsePayload<TRANSACTION_CHARGE_REQUESTED>`
const respOne = buildSyncWebhookResponsePayload<"TRANSACTION_CHARGE_REQUESTED", "3.20">({
result: "CHARGE_SUCCESS",
amount: 100, // Required in 3.20
});

const respTwo = buildSyncWebhookResponsePayload<"TRANSACTION_CHARGE_REQUESTED", "3.21">({
result: "CHARGE_SUCCESS", // amount is optional in 3.21
});
```

- a353fdf: Allow to override signature verification method in SaleorWebhook class (likely for testing)

## 1.0.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@saleor/app-sdk",
"version": "1.0.4",
"version": "1.0.5",
"description": "SDK for building great Saleor Apps",
"scripts": {
"prepublishOnly": "pnpm build",
Expand Down
Loading