@waffo/pancake-ts 0.9.0 → 0.10.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 CHANGED
@@ -4,6 +4,40 @@ 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.10.0] - 2026-06-01
8
+
9
+ Expands `NotificationSettings` to the full 19-field schema (8 consumer-email + 11 merchant-notify toggles) and narrows `UpdateStoreParams.notificationSettings` to the merchant-writable subset.
10
+
11
+ ### Added
12
+
13
+ - **`NotificationSettings`** gains 11 fields aligning with the platform schema:
14
+ - Consumer email (platform-managed): `emailTrialStarted`, `emailTrialEnding`
15
+ - Merchant notify (merchant-writable): `notifySubscriptionCanceled`, `notifySubscriptionEnded`, `notifySubscriptionPastDue`, `notifySubscriptionRenewed`, `notifySubscriptionUncanceled`, `notifySubscriptionUpdated`, `notifyChargeback`, `notifyPayoutCompleted`, `notifyPayoutFailed`
16
+ - **`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.
17
+
18
+ ### Changed
19
+
20
+ - **`UpdateStoreParams.notificationSettings` narrowed** from `Partial<NotificationSettings>` to `Partial<MerchantWritableNotificationSettings>`. Passing `email*` keys now fails TypeScript compilation rather than being silently dropped at the server.
21
+ - README "Update store" example pruned to only show writable `notify*` fields with an explicit comment on the platform-managed `email*` subset.
22
+
23
+ ### Migration
24
+
25
+ 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.
26
+
27
+ ```diff
28
+ await client.stores.update({
29
+ id: storeId,
30
+ notificationSettings: {
31
+ - emailOrderConfirmation: true,
32
+ - emailSubscriptionCycled: true,
33
+ notifyNewOrders: true,
34
+ notifyNewSubscriptions: false,
35
+ + notifyChargeback: true,
36
+ + notifyPayoutFailed: true,
37
+ },
38
+ });
39
+ ```
40
+
7
41
  ## [0.9.0] - 2026-05-21
8
42
 
9
43
  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: true,
381
+ notifyNewSubscriptions: false,
384
382
  },
385
383
  });
386
384