Skip to content

Commit 04992da

Browse files
Release to npm (#436)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent a353fdf commit 04992da

File tree

4 files changed

+24
-26
lines changed

4 files changed

+24
-26
lines changed

.changeset/fluffy-adults-draw.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.changeset/fuzzy-rocks-kiss.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# @saleor/app-sdk
22

3+
## 1.0.5
4+
5+
### Patch Changes
6+
7+
- 965089a: Added optional second generic parameter to `buildSyncWebhookResponsePayload` called `SaleorVersion`.
8+
This change improves TypeScript type safety when working with different Saleor versions that have varying payload requirements.
9+
10+
After this change you can for example use `buildSyncWebhookResponsePayload` with different version and differently type responses:
11+
12+
```ts
13+
// 3.20 is default `SaleorVersion` so you can also write `buildSyncWebhookResponsePayload<TRANSACTION_CHARGE_REQUESTED>`
14+
const respOne = buildSyncWebhookResponsePayload<"TRANSACTION_CHARGE_REQUESTED", "3.20">({
15+
result: "CHARGE_SUCCESS",
16+
amount: 100, // Required in 3.20
17+
});
18+
19+
const respTwo = buildSyncWebhookResponsePayload<"TRANSACTION_CHARGE_REQUESTED", "3.21">({
20+
result: "CHARGE_SUCCESS", // amount is optional in 3.21
21+
});
22+
```
23+
24+
- a353fdf: Allow to override signature verification method in SaleorWebhook class (likely for testing)
25+
326
## 1.0.4
427

528
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@saleor/app-sdk",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "SDK for building great Saleor Apps",
55
"scripts": {
66
"prepublishOnly": "pnpm build",

0 commit comments

Comments
 (0)