platform-types 1.10.843 → 1.10.845
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/dist/customer.d.ts +16 -0
- package/dist/maintenance.d.ts +11 -11
- package/dist/order.d.ts +8 -0
- package/dist/userActivity.d.ts +2 -2
- package/package.json +1 -1
package/dist/customer.d.ts
CHANGED
|
@@ -626,6 +626,22 @@ declare global {
|
|
|
626
626
|
marketing?: CustomerMarketing;
|
|
627
627
|
/** Transactional WhatsApp consent for this store — see `CustomerWhatsappNotices`. Server-written. */
|
|
628
628
|
whatsappNotices?: CustomerWhatsappNotices;
|
|
629
|
+
/**
|
|
630
|
+
* DERIVED, never stored: `isWhatsappNoticesOptedIn(whatsappNotices)`. Served
|
|
631
|
+
* on the composed customer list and search rows (the ungated read the
|
|
632
|
+
* intake picker uses) and on the operator `customers` frame whenever that
|
|
633
|
+
* frame carries the consent — so a cashier without the `customers`
|
|
634
|
+
* capability can see the state without the full row.
|
|
635
|
+
*/
|
|
636
|
+
whatsappOptedIn?: boolean;
|
|
637
|
+
/**
|
|
638
|
+
* DERIVED, never stored: the latest withdrawal's `ts`, present only while
|
|
639
|
+
* the customer is opted out (`whatsappNotices.optOut`). ⚠️ A re-grant
|
|
640
|
+
* removes the withdrawal, so the next frame OMITS this key; a merging
|
|
641
|
+
* cache must read it as meaningful only while `whatsappOptedIn` is
|
|
642
|
+
* `false`, never keep it beside `true`.
|
|
643
|
+
*/
|
|
644
|
+
whatsappOptedOutAt?: number;
|
|
629
645
|
/** Optional notification mail only; transactional mail cannot be disabled. */
|
|
630
646
|
notificationPreferences?: CustomerNotificationPreferences;
|
|
631
647
|
minBuy?: number;
|
package/dist/maintenance.d.ts
CHANGED
|
@@ -16,14 +16,14 @@ declare global {
|
|
|
16
16
|
endsAt?: number;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* A channel a maintenance broadcast can
|
|
19
|
+
* A channel a maintenance broadcast can leave the platform on.
|
|
20
20
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* `'whatsapp'` is the platform's own WhatsApp number (a Meta-approved utility
|
|
22
|
+
* template). A stage with no sender configured for a channel refuses a
|
|
23
|
+
* broadcast naming it — `422 BROADCAST_CHANNEL_NOT_CONFIGURED`, before any
|
|
24
|
+
* claim or send — rather than counting messages nothing would deliver.
|
|
25
25
|
*/
|
|
26
|
-
type MaintenanceBroadcastChannel = 'email' | 'sms';
|
|
26
|
+
type MaintenanceBroadcastChannel = 'email' | 'sms' | 'whatsapp';
|
|
27
27
|
/**
|
|
28
28
|
* Per-user, per-channel opt-in for outbound platform broadcasts.
|
|
29
29
|
*
|
|
@@ -36,9 +36,9 @@ declare global {
|
|
|
36
36
|
*
|
|
37
37
|
* Absent key means the channel's DEFAULT applies, never `false`:
|
|
38
38
|
* `email` defaults ON for a user holding an admin-capable role and OFF for
|
|
39
|
-
* everyone else, and `sms`
|
|
40
|
-
* backfilling, and a store that has never opened the preference screen
|
|
41
|
-
* reaches its admins by email and nobody
|
|
39
|
+
* everyone else, and `sms` and `whatsapp` default OFF for everyone. So no row
|
|
40
|
+
* needs backfilling, and a store that has never opened the preference screen
|
|
41
|
+
* still reaches its admins by email and nobody on a handset.
|
|
42
42
|
*/
|
|
43
43
|
type UserBroadcastChannels = Partial<Record<MaintenanceBroadcastChannel, boolean>>;
|
|
44
44
|
/** `POST /platform/operations { mode: 'maintenance-broadcast' }`. */
|
|
@@ -76,8 +76,8 @@ declare global {
|
|
|
76
76
|
*
|
|
77
77
|
* ⚠️ It is still `queued`, NOT `delivered`, and the two diverge for reasons
|
|
78
78
|
* that live past the queue: a bounced or complained address is dropped by
|
|
79
|
-
* `sendEmail`'s suppression check, and the SMS
|
|
80
|
-
* consumer already accepted. Demo tenants are the one such filter pulled
|
|
79
|
+
* `sendEmail`'s suppression check, and the SMS or WhatsApp provider can
|
|
80
|
+
* reject a send the consumer already accepted. Demo tenants are the one such filter pulled
|
|
81
81
|
* FORWARD of the queue — they are excluded from enumeration entirely — so
|
|
82
82
|
* that a fleet-wide count is not inflated by tenants whose every message the
|
|
83
83
|
* transports would silently discard.
|
package/dist/order.d.ts
CHANGED
|
@@ -2323,6 +2323,14 @@ declare global {
|
|
|
2323
2323
|
* on a {@link Order.creditOverride} sent with it.
|
|
2324
2324
|
*/
|
|
2325
2325
|
onAccount?: boolean;
|
|
2326
|
+
/**
|
|
2327
|
+
* The cashier recorded the customer's transactional WhatsApp consent at
|
|
2328
|
+
* intake (a back-office grant, stamped on the order's customer after the
|
|
2329
|
+
* create commits; best-effort, never changes the answer). `true` only —
|
|
2330
|
+
* `false` is refused 400; a withdrawal stays on `POST /customers`. Create
|
|
2331
|
+
* leg only (an update ignores it); a directive, never stored on the order.
|
|
2332
|
+
*/
|
|
2333
|
+
whatsappOptIn?: true;
|
|
2326
2334
|
/**
|
|
2327
2335
|
* Tender legs to ring against this order, as RAW input — NOT the persisted
|
|
2328
2336
|
* `Order.tenders`, which is why `Partial<Order>` is narrowed with `Omit`
|
package/dist/userActivity.d.ts
CHANGED
|
@@ -991,8 +991,8 @@ declare global {
|
|
|
991
991
|
reason?: string;
|
|
992
992
|
}
|
|
993
993
|
/**
|
|
994
|
-
* A maintenance announcement that actually LEFT the platform — email
|
|
995
|
-
*
|
|
994
|
+
* A maintenance announcement that actually LEFT the platform — email, SMS
|
|
995
|
+
* and/or WhatsApp, per {@link MaintenanceBroadcastChannel}.
|
|
996
996
|
*
|
|
997
997
|
* ⚠️ Sibling of `PlatformMaintenanceToggledEvent`, never a replacement for
|
|
998
998
|
* it. The toggle changes what the product does; this records that people
|