@waffo/pancake-ts 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/README.md +5 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -10
- package/dist/index.d.ts +29 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,64 @@ All notable changes to `@waffo/pancake-ts` will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.11.0] - 2026-06-05
|
|
8
|
+
|
|
9
|
+
Aligns Create/Update Product params with backend product-service v2026.6.4: `description` and `successUrl` accept `null` for explicit field clearing (previously only `undefined` / omitted). Backend also tightens `name` to ≤ 64 characters to match the PSP `goodsName` cap — passing a longer name now returns 400.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **`CreateOnetimeProductParams.description` / `successUrl`** — typed `string | null` (was `string`).
|
|
14
|
+
- **`UpdateOnetimeProductParams.description` / `successUrl`** — typed `string | null`.
|
|
15
|
+
- **`CreateSubscriptionProductParams.description` / `successUrl`** — typed `string | null`.
|
|
16
|
+
- **`UpdateSubscriptionProductParams.description` / `successUrl`** — typed `string | null`.
|
|
17
|
+
|
|
18
|
+
### Migration
|
|
19
|
+
|
|
20
|
+
If you currently omit `description` / `successUrl` (or pass `undefined`), no change needed — the backend keeps the existing value. To explicitly clear a previously-set value:
|
|
21
|
+
|
|
22
|
+
```diff
|
|
23
|
+
-await client.onetimeProducts.update({ id, description: undefined }); // keeps existing value
|
|
24
|
+
+await client.onetimeProducts.update({ id, description: null }); // clears the field
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Backend also accepts `""` for the same effect; SDK uses `null` as the canonical "clear" sentinel.
|
|
28
|
+
|
|
29
|
+
Note `name.length` must now be ≤ 64. The backend enforced no limit previously; existing names > 64 chars are rare (production scan found 1 internal test outlier, no real merchant data). New attempts > 64 chars return `400 { errors: [{ message: "name must not exceed 64 characters", layer: "product" }] }`.
|
|
30
|
+
|
|
31
|
+
## [0.10.0] - 2026-06-01
|
|
32
|
+
|
|
33
|
+
Expands `NotificationSettings` to the full 19-field schema (8 consumer-email + 11 merchant-notify toggles) and narrows `UpdateStoreParams.notificationSettings` to the merchant-writable subset.
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- **`NotificationSettings`** gains 11 fields aligning with the platform schema:
|
|
38
|
+
- Consumer email (platform-managed): `emailTrialStarted`, `emailTrialEnding`
|
|
39
|
+
- Merchant notify (merchant-writable): `notifySubscriptionCanceled`, `notifySubscriptionEnded`, `notifySubscriptionPastDue`, `notifySubscriptionRenewed`, `notifySubscriptionUncanceled`, `notifySubscriptionUpdated`, `notifyChargeback`, `notifyPayoutCompleted`, `notifyPayoutFailed`
|
|
40
|
+
- **`MerchantWritableNotificationSettings`** — new type exposing only the 11 `notify*` toggles. Use this for any merchant-side `update-store` call. `email*` toggles are managed by the PANCAKE platform (admin via DB) and silently dropped if passed to the merchant API.
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
|
|
44
|
+
- **`UpdateStoreParams.notificationSettings` narrowed** from `Partial<NotificationSettings>` to `Partial<MerchantWritableNotificationSettings>`. Passing `email*` keys now fails TypeScript compilation rather than being silently dropped at the server.
|
|
45
|
+
- README "Update store" example pruned to only show writable `notify*` fields with an explicit comment on the platform-managed `email*` subset.
|
|
46
|
+
|
|
47
|
+
### Migration
|
|
48
|
+
|
|
49
|
+
If your `client.stores.update` calls passed any `emailOrderConfirmation` / `emailSubscription*` / `emailTrial*` keys in `notificationSettings`, remove them — these were already being dropped server-side as of v2026.5 (returned as a `warnings[].aiHint`). Only `notify*` keys are merchant-writable.
|
|
50
|
+
|
|
51
|
+
```diff
|
|
52
|
+
await client.stores.update({
|
|
53
|
+
id: storeId,
|
|
54
|
+
notificationSettings: {
|
|
55
|
+
- emailOrderConfirmation: true,
|
|
56
|
+
- emailSubscriptionCycled: true,
|
|
57
|
+
notifyNewOrders: true,
|
|
58
|
+
notifyNewSubscriptions: false,
|
|
59
|
+
+ notifyChargeback: true,
|
|
60
|
+
+ notifyPayoutFailed: true,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
7
65
|
## [0.9.0] - 2026-05-21
|
|
8
66
|
|
|
9
67
|
Adds flat dual-key external-id fields across write inputs, response entities, and webhook payload. The same field name now appears at every layer (REST request body / REST response / webhook payload / GraphQL).
|
package/README.md
CHANGED
|
@@ -369,18 +369,16 @@ const { store } = await client.stores.create({ name: "My Store" });
|
|
|
369
369
|
|
|
370
370
|
// Update settings (notification, checkout theme).
|
|
371
371
|
// NOTE: webhook configuration moved to client.webhooks (see Webhooks section below).
|
|
372
|
+
// NOTE: only merchant-facing `notify*` toggles (notifyNewOrders / notifyNewSubscriptions /
|
|
373
|
+
// notifySubscription* / notifyChargeback / notifyPayout*) are writable here;
|
|
374
|
+
// consumer email toggles (emailOrderConfirmation, emailSubscription*, emailTrial*) are
|
|
375
|
+
// managed by the PANCAKE platform and silently dropped if passed.
|
|
372
376
|
const { store: updated } = await client.stores.update({
|
|
373
377
|
id: store.id,
|
|
374
378
|
supportEmail: "help@example.com",
|
|
375
379
|
notificationSettings: {
|
|
376
|
-
emailOrderConfirmation: true,
|
|
377
|
-
emailSubscriptionConfirmation: true,
|
|
378
|
-
emailSubscriptionCycled: true,
|
|
379
|
-
emailSubscriptionCanceled: true,
|
|
380
|
-
emailSubscriptionRevoked: true,
|
|
381
|
-
emailSubscriptionPastDue: true,
|
|
382
380
|
notifyNewOrders: true,
|
|
383
|
-
notifyNewSubscriptions:
|
|
381
|
+
notifyNewSubscriptions: false,
|
|
384
382
|
},
|
|
385
383
|
});
|
|
386
384
|
|