@vectoriox/iox-ui 5.102.0 → 5.104.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.
@@ -156,6 +156,38 @@ interface CatalogEntry {
156
156
  declare function sellableQuantity(entry: CatalogEntry): number | null;
157
157
  declare const catalogKey: (productId: string, variantId?: string | null) => string;
158
158
 
159
+ /**
160
+ * What a VISITOR may see of a shop row (commerce plan F4, iox-cms#67) — the ONE allowlist, here so the server that
161
+ * projects a row (iox-cms `storefront-projection.ts`) and the builder that offers its fields to bind (iox-cms-client#50)
162
+ * read the same list. An ALLOWLIST: a field added to a shop schema stays private until it is named here — stock counts,
163
+ * SKUs, the organization, the build bookkeeping and the sample mark never leave the server.
164
+ */
165
+ /** A top-level field the storefront serves: `true` as stored, or the sub-fields of each nested row it keeps. */
166
+ type StorefrontFieldSpec = true | ReadonlyArray<string>;
167
+ /** The shop collections a storefront reads (iox-cms `ShopCollection`, orders excluded — never public). */
168
+ declare enum StorefrontCollection {
169
+ Products = "products",
170
+ Categories = "categories",
171
+ SubCategories = "subCategories"
172
+ }
173
+ declare const STOREFRONT_FIELDS: Readonly<Record<string, Readonly<Record<string, StorefrontFieldSpec>>>>;
174
+ /**
175
+ * What the server ADDS to a projected row — never stored, so never sortable or filterable: a product's `currency` (ISO
176
+ * 4217) and its stock as a WORD (`availability`, commerce-core `Availability`), also on each variant. A product card
177
+ * binds `availability`, never a count.
178
+ */
179
+ declare const STOREFRONT_COMPUTED_FIELDS: Readonly<Record<string, ReadonlyArray<string>>>;
180
+ /**
181
+ * True when `path` (`title`, `pricing.price`, `variants.name`) is a STORED field a visitor sees — what a storefront
182
+ * query may filter or sort by. A computed field is not one; nor is anything deeper than one nested level.
183
+ */
184
+ declare function isStorefrontField(collection: string, path: string): boolean;
185
+ /**
186
+ * The fields a page may BIND from a shop source: the stored paths a schema lists that a visitor sees, then the computed
187
+ * ones — a stock count or a SKU in the schema is never offered, because the live site never has it.
188
+ */
189
+ declare function storefrontBindPaths(collection: string, schemaPaths: ReadonlyArray<string>): string[];
190
+
159
191
  /** Shipping v1 (C-D9): methods per studio, one country. Zones and weights come later. */
160
192
  declare enum ShippingMethodKind {
161
193
  Pickup = "pickup",
@@ -237,6 +269,89 @@ declare function freeShippingRemaining(methods: ReadonlyArray<Pick<ShippingMetho
237
269
  freeOver?: Money | null;
238
270
  }>, cart: Pick<ShippingCart, 'currency' | 'subtotal' | 'discount' | 'requiresShipping' | 'lines'>): Money | null;
239
271
 
272
+ /**
273
+ * Coupons v1 (commerce plan §3h, E4): a code, a percent or a fixed amount off the GOODS (never the delivery), an
274
+ * optional minimum order, start and end, a uses limit; one per order. `priceCart` is the only place a coupon becomes
275
+ * a discount — iox-cms recomputes it at checkout and when the order is placed (trap T1). Pure: the caller passes `now`.
276
+ */
277
+ declare enum CouponKind {
278
+ Percent = "percent",
279
+ Fixed = "fixed"
280
+ }
281
+ interface Coupon {
282
+ code: string;
283
+ kind: CouponKind;
284
+ /** 1–100, at most two decimals — a Percent coupon's. */
285
+ percent?: number | null;
286
+ /** A Fixed coupon's amount, in the studio currency. */
287
+ amount?: Money | null;
288
+ /** The goods (after nothing else) must come to at least this. */
289
+ minimumOrder?: Money | null;
290
+ /** ISO dates; a missing one is open-ended. */
291
+ startsAt?: string | null;
292
+ expiresAt?: string | null;
293
+ /** Orders it may be used on; null = no limit. */
294
+ maxUses?: number | null;
295
+ /** Orders placed with it so far. */
296
+ uses?: number;
297
+ enabled: boolean;
298
+ }
299
+ /** What a priced cart says about the coupon it applied (the summary's "Discount · CODE"). */
300
+ interface AppliedCoupon {
301
+ code: string;
302
+ kind: CouponKind;
303
+ percent: number | null;
304
+ amount: Money | null;
305
+ }
306
+ declare const COUPON_CODE_MIN = 3;
307
+ declare const COUPON_CODE_MAX = 32;
308
+ /** A code as it is stored and compared: trimmed, upper-case. A buyer may type `back10` for `BACK10`. */
309
+ declare function normalizeCouponCode(value: unknown): string;
310
+ declare function isCouponCode(value: unknown): boolean;
311
+ /** What the owner must fix before a coupon may be saved. */
312
+ declare enum CouponProblem {
313
+ CodeInvalid = "code-invalid",
314
+ KindInvalid = "kind-invalid",
315
+ PercentInvalid = "percent-invalid",
316
+ AmountInvalid = "amount-invalid",
317
+ MinimumInvalid = "minimum-invalid",
318
+ DatesInvalid = "dates-invalid",
319
+ MaxUsesInvalid = "max-uses-invalid"
320
+ }
321
+ /** Every reason this coupon cannot be saved for a studio selling in `currency` — empty when it can. */
322
+ declare function couponProblems(coupon: Partial<Coupon> | null | undefined, currency: CurrencyCode): CouponProblem[];
323
+ /** Why a coupon gives no discount to this cart — each said to the buyer on the coupon field. */
324
+ declare enum CouponRefusal {
325
+ Unknown = "coupon-unknown",
326
+ Disabled = "coupon-disabled",
327
+ NotStarted = "coupon-not-started",
328
+ Expired = "coupon-expired",
329
+ UsedUp = "coupon-used-up",
330
+ MinimumNotMet = "coupon-minimum-not-met",
331
+ /** Another currency, or a coupon the owner would not be allowed to save now. */
332
+ NotUsable = "coupon-not-usable"
333
+ }
334
+ /** `{amount}` is the minimum order, filled by `couponRefusalWords`. */
335
+ declare const COUPON_REFUSAL_LABELS: Readonly<Record<CouponRefusal, CommerceLabel>>;
336
+ declare function couponRefusalWords(refusal: CouponRefusal, lang: string | null | undefined, fill?: {
337
+ amount?: string;
338
+ }): string;
339
+ /** What a coupon gives, in words ("10% off", "₪50.00 off") — the reminder's offer and the admin's coupon list. */
340
+ declare function couponOfferWords(coupon: Pick<Coupon, 'kind' | 'percent' | 'amount'>, lang: string | null | undefined, formatMoney: (value: Money) => string): string;
341
+ type CouponCheck = {
342
+ ok: true;
343
+ discount: Money;
344
+ applied: AppliedCoupon;
345
+ } | {
346
+ ok: false;
347
+ refusal: CouponRefusal;
348
+ };
349
+ /**
350
+ * The discount `coupon` gives goods worth `goods` at `now`: a percent of them (rounded once, half to even) or the
351
+ * fixed amount, never more than the goods themselves. No clock is read: a missing `now` refuses a dated coupon.
352
+ */
353
+ declare function couponDiscount(coupon: Coupon | null | undefined, goods: Money, now: number | null | undefined): CouponCheck;
354
+
240
355
  /** A cart names what and how many — never a price (C-D16, trap T1): every read prices it again. */
241
356
  interface CartLine {
242
357
  productId: string;
@@ -254,6 +369,10 @@ interface StudioCommerce {
254
369
  }
255
370
  interface PricingChoice {
256
371
  shippingMethodId?: string | null;
372
+ /** The buyer's coupon (E4) — the caller looked it up; `priceCart` decides what it gives. */
373
+ coupon?: Coupon | null;
374
+ /** Epoch ms the coupon's dates are judged at (no clock is read here). */
375
+ now?: number | null;
257
376
  }
258
377
  declare enum CartIssueCode {
259
378
  /** Not a whole number ≥ 1: the line is dropped. */
@@ -277,7 +396,9 @@ declare enum CartIssueCode {
277
396
  /** The chosen shipping method is not offered for this cart: no shipping is priced. */
278
397
  ShippingUnavailable = "shipping-unavailable",
279
398
  /** The studio's VAT is not a usable rate: the VAT line reads 0. */
280
- VatInvalid = "vat-invalid"
399
+ VatInvalid = "vat-invalid",
400
+ /** The coupon gives this cart nothing now (expired, used up, under its minimum…): no discount; `couponRefusal` says why. */
401
+ CouponNotApplied = "coupon-not-applied"
281
402
  }
282
403
  declare const CART_ISSUE_LABELS: Readonly<Record<CartIssueCode, CommerceLabel>>;
283
404
  interface CartIssue {
@@ -289,6 +410,9 @@ interface CartIssue {
289
410
  /** What the priced line holds now (clamped / capped). */
290
411
  quantity?: number;
291
412
  shippingMethodId?: string;
413
+ /** CouponNotApplied: the code and why. */
414
+ coupon?: string;
415
+ couponRefusal?: CouponRefusal;
292
416
  }
293
417
  interface PricedLine {
294
418
  productId: string;
@@ -307,8 +431,10 @@ interface PricedCart {
307
431
  currency: CurrencyCode;
308
432
  lines: PricedLine[];
309
433
  subtotal: Money;
310
- /** Zero until coupons (E4); `total` already subtracts it. */
434
+ /** The coupon's discount on the goods (E4); `total` already subtracts it. */
311
435
  discount: Money;
436
+ /** The coupon that gave `discount`, or null. */
437
+ coupon: AppliedCoupon | null;
312
438
  shipping: Money;
313
439
  shippingMethod: ShippingQuote | null;
314
440
  requiresShipping: boolean;
@@ -613,6 +739,10 @@ interface OrderSnapshot {
613
739
  readonly lines: readonly OrderSnapshotLine[];
614
740
  readonly subtotal: Money;
615
741
  readonly discount: Money;
742
+ /** The coupon code the discount came from (E4), or null. */
743
+ readonly coupon: {
744
+ readonly code: string;
745
+ } | null;
616
746
  readonly shipping: Money;
617
747
  readonly delivery: {
618
748
  readonly methodId: string;
@@ -828,6 +958,9 @@ interface CartView {
828
958
  count: number;
829
959
  empty: boolean;
830
960
  subtotal: Money | null;
961
+ /** The coupon's discount (E4) — zero, or null on a cart never priced. */
962
+ discount: Money | null;
963
+ coupon: AppliedCoupon | null;
831
964
  total: Money | null;
832
965
  vat: Money | null;
833
966
  vatPercent: number;
@@ -974,6 +1107,12 @@ declare enum SiteCommerceRoute {
974
1107
  CheckoutOptions = "checkout/options",
975
1108
  Checkout = "checkout",
976
1109
  CheckoutPlace = "checkout/place",
1110
+ /** `PUT {code}` applies a coupon to the open checkout; `DELETE` removes it (E4). */
1111
+ CheckoutCoupon = "checkout/coupon",
1112
+ /** `POST /:token` — a reminder's link: the bag back under this browser's cookie, the checkout as it was (E4). */
1113
+ CheckoutRecover = "checkout/recover",
1114
+ /** `GET|POST /:token` — the unsubscribe page's state, and the unsubscribe itself (E4). */
1115
+ Unsubscribe = "marketing/unsubscribe",
977
1116
  Order = "order"
978
1117
  }
979
1118
  /** A public commerce route of one org, ROOT-relative (the same rule as `cartEndpointPath`). */
@@ -1139,7 +1278,11 @@ declare enum CheckoutWord {
1139
1278
  Working = "working",
1140
1279
  StepOf = "stepOf",
1141
1280
  OrderMissing = "orderMissing",
1142
- Legal = "legal"
1281
+ Legal = "legal",
1282
+ Coupon = "coupon",
1283
+ ApplyCoupon = "applyCoupon",
1284
+ RemoveCoupon = "removeCoupon",
1285
+ Discount = "discount"
1143
1286
  }
1144
1287
  /** `{name}`, `{n}`, `{of}`, `{amount}`, `{percent}`, `{number}`, `{email}`, `{total}`, `{place}` are filled by `checkoutWord`. */
1145
1288
  declare const CHECKOUT_WORDS: Readonly<Record<CheckoutWord, CommerceLabel>>;
@@ -1156,6 +1299,8 @@ declare enum CheckoutSlot {
1156
1299
  Terms = "terms",
1157
1300
  /** The order summary: the bag itself changed. */
1158
1301
  Cart = "cart",
1302
+ /** The coupon field in the order summary (E4). */
1303
+ Coupon = "coupon",
1159
1304
  /** The whole page: closed, busy, unreachable. */
1160
1305
  Page = "page"
1161
1306
  }
@@ -1194,6 +1339,17 @@ declare enum SiteRefusalCode {
1194
1339
  UnknownSite = "unknown-site",
1195
1340
  /** The owner blocked this buyer (commerce E3c): no checkout, no order. */
1196
1341
  CustomerBlocked = "customer-blocked",
1342
+ CouponUnknown = "coupon-unknown",
1343
+ CouponDisabled = "coupon-disabled",
1344
+ CouponNotStarted = "coupon-not-started",
1345
+ CouponExpired = "coupon-expired",
1346
+ CouponUsedUp = "coupon-used-up",
1347
+ CouponMinimumNotMet = "coupon-minimum-not-met",
1348
+ CouponNotUsable = "coupon-not-usable",
1349
+ /** A reminder's link to a purchase that was completed (E4). */
1350
+ RecoveryDone = "recovery-done",
1351
+ /** A reminder's link whose bag is gone, or a link that is not one. */
1352
+ RecoveryExpired = "recovery-expired",
1197
1353
  Network = "network"
1198
1354
  }
1199
1355
  interface RefusalRule {
@@ -1212,11 +1368,212 @@ interface SiteRefusal {
1212
1368
  * `refusals` on its own field; any other code is one sentence; no body at all is `network`. `message` is a log line
1213
1369
  * and is never shown. One sentence per slot (the first wins).
1214
1370
  */
1215
- declare function siteRefusalsOf(body: unknown, lang: string | null | undefined): SiteRefusal[];
1371
+ declare function siteRefusalsOf(body: unknown, lang: string | null | undefined, formatMoney?: (value: Money) => string): SiteRefusal[];
1372
+
1373
+ /** A purchase with an email and no payment for this long is abandoned — a lead the owner can follow up. */
1374
+ declare const ABANDONED_AFTER_MS: number;
1375
+ /** A reminder this late (a pod was down, reminders were just switched on) is passed over, never sent stale. */
1376
+ declare const REMINDER_LATE_MS: number;
1377
+ declare enum ReminderStep {
1378
+ First = "first",
1379
+ Second = "second",
1380
+ Third = "third"
1381
+ }
1382
+ interface ReminderTiming {
1383
+ readonly step: ReminderStep;
1384
+ /** After the buyer's LAST activity on the checkout. */
1385
+ readonly afterMs: number;
1386
+ /** The owner's coupon rides this one, when there is one. */
1387
+ readonly carriesCoupon: boolean;
1388
+ }
1389
+ /** The sequence (board 9): 1 hour after leaving, after 24 hours, after 72 hours + a coupon. */
1390
+ declare const REMINDER_SEQUENCE: readonly ReminderTiming[];
1391
+ declare const REMINDER_STEPS: readonly ReminderStep[];
1392
+ /** The owner's words for one reminder — blank keeps the default. */
1393
+ interface ReminderWords {
1394
+ subject?: string | null;
1395
+ lead?: string | null;
1396
+ }
1397
+ interface ReminderSettings {
1398
+ enabled: boolean;
1399
+ steps: Record<ReminderStep, boolean>;
1400
+ /** A coupon code of the studio's, offered in the reminder that carries one. */
1401
+ couponCode: string | null;
1402
+ words: Partial<Record<ReminderStep, ReminderWords>>;
1403
+ }
1404
+ declare const REMINDER_WORDS_MAX = 200;
1405
+ /** On, every step on, no coupon (board 9). Reminders still go ONLY to a buyer who ticked consent. */
1406
+ declare const DEFAULT_REMINDER_SETTINGS: Readonly<ReminderSettings>;
1407
+ /** A stored (or sent) settings value read leniently: anything missing or malformed is the default. */
1408
+ declare function reminderSettingsOf(raw: unknown): ReminderSettings;
1409
+ /** One recorded decision about marketing: the checkout's tick, the customer's latest, an unsubscribe, the owner's stop. */
1410
+ interface ConsentDecision {
1411
+ given: boolean;
1412
+ at: string | number | Date | null | undefined;
1413
+ }
1414
+ /**
1415
+ * THE consent gate of a marketing message (Israel's Communications Law §30A, the GDPR — C-D14): the LATEST decision
1416
+ * wins. A tick at a checkout allows; an unsubscribe or the owner's "Stop reminders" after it forbids; a new tick at a
1417
+ * later checkout allows again. No decision at all forbids — a reminder is never sent on silence. A tie forbids.
1418
+ */
1419
+ declare function marketingAllowed(...decisions: ReadonlyArray<ConsentDecision | null | undefined>): boolean;
1420
+ /** Why a checkout gets no (more) reminders. */
1421
+ declare enum ReminderStop {
1422
+ /** The purchase was made. */
1423
+ Completed = "completed",
1424
+ NoEmail = "no-email",
1425
+ /** No tick, or the latest decision is a withdrawal. */
1426
+ NoConsent = "no-consent",
1427
+ /** The owner marked the lead lost. */
1428
+ Lost = "lost",
1429
+ /** The studio's reminders are off. */
1430
+ Off = "off",
1431
+ /** Every reminder was sent, or its time has passed. */
1432
+ Done = "done"
1433
+ }
1434
+ interface ReminderFacts {
1435
+ /** The checkout is still open (no order placed from it). */
1436
+ open: boolean;
1437
+ hasEmail: boolean;
1438
+ /** `marketingAllowed(...)` for this buyer. */
1439
+ consent: boolean;
1440
+ lost: boolean;
1441
+ /** Epoch ms of the buyer's last activity on the checkout. */
1442
+ lastActivityAt: number;
1443
+ /** Steps already sent, failed or passed over — never tried twice. */
1444
+ done: readonly ReminderStep[];
1445
+ settings: ReminderSettings;
1446
+ }
1447
+ type ReminderPlan = {
1448
+ due: true;
1449
+ step: ReminderStep;
1450
+ dueAt: number;
1451
+ carriesCoupon: boolean;
1452
+ } | {
1453
+ due: false;
1454
+ stop: ReminderStop;
1455
+ };
1456
+ /**
1457
+ * The next reminder of a checkout at `now`: the first step that is switched on, not done yet, and not more than
1458
+ * `REMINDER_LATE_MS` past its time — due at `lastActivityAt + afterMs` (it may be in the future: the scheduler waits).
1459
+ * A buyer who comes back moves every later reminder with their activity. Steps too late are passed over silently.
1460
+ */
1461
+ declare function nextReminder(facts: ReminderFacts, now: number): ReminderPlan;
1462
+ /** The step's number as the owner reads it ("Reminder 2"). */
1463
+ declare function reminderNumber(step: ReminderStep): number;
1464
+ /** What became of one reminder. */
1465
+ declare enum ReminderOutcome {
1466
+ Sent = "sent",
1467
+ Failed = "failed",
1468
+ /** Not sent, on purpose — `ReminderSkip` says why. */
1469
+ Skipped = "skipped"
1470
+ }
1471
+ declare enum ReminderSkip {
1472
+ /** The studio's sender domain is not verified: it would land in spam (T13). */
1473
+ SenderUnverified = "sender-unverified",
1474
+ NoMailer = "no-mailer",
1475
+ /** The studio's public address is unknown, so there is no link to put in it. */
1476
+ NoSiteAddress = "no-site-address",
1477
+ /** The bag is empty now: nothing to come back to. */
1478
+ EmptyBag = "empty-bag",
1479
+ /** A send was started and the pod stopped before it was recorded: never sent twice. */
1480
+ Interrupted = "interrupted"
1481
+ }
1482
+ /** Is a checkout an abandoned purchase at `now`: open, with an email, untouched for an hour. */
1483
+ declare function isAbandoned(c: {
1484
+ open: boolean;
1485
+ hasEmail: boolean;
1486
+ lastActivityAt: number;
1487
+ }, now: number): boolean;
1488
+ /** Where a purchase stopped: the step after the furthest one the buyer completed (board 9's "Stopped at"). */
1489
+ declare function stoppedAt(furthest: CheckoutStep | null | undefined): CheckoutStep;
1490
+ declare enum FunnelStage {
1491
+ AddedToBag = "added-to-bag",
1492
+ GaveEmail = "gave-email",
1493
+ ChoseDelivery = "chose-delivery",
1494
+ ReachedPayment = "reached-payment",
1495
+ PlacedOrder = "placed-order",
1496
+ Paid = "paid"
1497
+ }
1498
+ declare const FUNNEL_STAGES: readonly FunnelStage[];
1499
+ interface FunnelRow {
1500
+ stage: FunnelStage;
1501
+ count: number;
1502
+ /** Whole percent of the first stage. */
1503
+ share: number;
1504
+ /** Whole percent lost since the previous stage; null on the first. */
1505
+ drop: number | null;
1506
+ }
1507
+ /**
1508
+ * The funnel's rows. Each stage is a subset of the one before, so a count is raised to the next stage's when the
1509
+ * records disagree (a bag removed after 30 days while its checkout is kept) — a share never passes 100 %.
1510
+ */
1511
+ declare function funnelOf(counts: Partial<Record<FunnelStage, number>>): FunnelRow[];
1512
+ /** The stage that loses the most buyers after `after` (board 9: "After contact, the biggest drop is at delivery"). */
1513
+ declare function biggestDrop(rows: readonly FunnelRow[], after?: FunnelStage): FunnelStage | null;
1514
+ /** The Sales journey's periods (board 9). */
1515
+ declare const JOURNEY_PERIODS_DAYS: readonly number[];
1516
+ declare const DEFAULT_JOURNEY_DAYS = 30;
1517
+ /** What a timeline says happened — the purchase's own records, never browsing (C-D13). */
1518
+ declare enum JourneyEventKind {
1519
+ CheckoutStarted = "checkout-started",
1520
+ DeliveryChosen = "delivery-chosen",
1521
+ PaymentChosen = "payment-chosen",
1522
+ ReminderSent = "reminder-sent",
1523
+ ReminderFailed = "reminder-failed",
1524
+ ReminderSkipped = "reminder-skipped",
1525
+ ReminderScheduled = "reminder-scheduled",
1526
+ CameBack = "came-back",
1527
+ Unsubscribed = "unsubscribed",
1528
+ MarkedLost = "marked-lost",
1529
+ OrderPlaced = "order-placed"
1530
+ }
1531
+ /** `/<orgLabel>/checkout/r/<token>` — the reminder's link: the bag restored, the step they left. */
1532
+ declare const RECOVERY_PATH = "r";
1533
+ /** `/<orgLabel>/checkout/unsubscribe/<token>` — works without signing in. */
1534
+ declare const UNSUBSCRIBE_PATH = "unsubscribe";
1535
+ declare function recoveryHref(orgLabel: string | null | undefined, token: string): string;
1536
+ declare function unsubscribeHref(orgLabel: string | null | undefined, token: string): string;
1537
+ /** `GET|POST api/site/:orgId/marketing/unsubscribe/:token` — the page's state. The email is masked. */
1538
+ interface SiteUnsubscribeState {
1539
+ subscribed: boolean;
1540
+ email: string;
1541
+ siteName: string | null;
1542
+ language: string;
1543
+ }
1544
+ /** `n•••@example.com` — enough for a person to recognise their address, not enough to harvest it. */
1545
+ declare function maskEmail(email: string | null | undefined): string;
1546
+ declare enum RecoveryWord {
1547
+ SubjectFirst = "subjectFirst",
1548
+ SubjectSecond = "subjectSecond",
1549
+ SubjectThird = "subjectThird",
1550
+ Heading = "heading",
1551
+ Lead = "lead",
1552
+ Return = "return",
1553
+ KeptDetails = "keptDetails",
1554
+ CouponOffer = "couponOffer",
1555
+ Why = "why",
1556
+ Unsubscribe = "unsubscribe",
1557
+ UnsubscribeTitle = "unsubscribeTitle",
1558
+ UnsubscribeAsk = "unsubscribeAsk",
1559
+ UnsubscribeButton = "unsubscribeButton",
1560
+ UnsubscribeDone = "unsubscribeDone",
1561
+ UnsubscribeAlready = "unsubscribeAlready",
1562
+ UnsubscribeUnknown = "unsubscribeUnknown",
1563
+ UnsubscribeTransactional = "unsubscribeTransactional",
1564
+ RecoveryDone = "recoveryDone",
1565
+ RecoveryExpired = "recoveryExpired",
1566
+ Restoring = "restoring"
1567
+ }
1568
+ /** `{studio}`, `{code}`, `{offer}`, `{step}`, `{email}` are filled by `recoveryWord`. */
1569
+ declare const RECOVERY_WORDS: Readonly<Record<RecoveryWord, CommerceLabel>>;
1570
+ declare function recoveryWord(word: RecoveryWord, lang: string | null | undefined, fill?: Readonly<Record<string, string | number>>): string;
1571
+ /** The default subject of each reminder. */
1572
+ declare const REMINDER_SUBJECT_WORDS: Readonly<Record<ReminderStep, RecoveryWord>>;
1216
1573
 
1217
1574
  declare const looksLikeEmail: (value: unknown) => boolean;
1218
1575
  /** A phone a person can be called on: 7–15 digits once spaces, dashes, brackets and a leading + are dropped. */
1219
1576
  declare const looksLikePhone: (value: unknown) => boolean;
1220
1577
 
1221
- export { Availability, CART_COOKIE_PREFIX, CART_ISSUE_LABELS, CART_TRANSPORT_ERROR_LABELS, CHECKOUT_FORM_STEPS, CHECKOUT_GATE_RULES, CHECKOUT_PATH, CHECKOUT_STEPS, CHECKOUT_STEP_LABELS, CHECKOUT_WORDS, CURRENCY_CODES, CURRENCY_EXPONENTS, CartIssueCode, CartTransportError, CartTransportErrorCode, CheckoutAskedField, CheckoutFieldMode, CheckoutGateArea, CheckoutGateCode, CheckoutSlot, CheckoutStep, CheckoutWord, CommerceLanguage, CurrencyCode, DEFAULT_MONEY_LOCALE, DEFAULT_VARIANT_NAME, DeliveryFit, FINAL_ORDER_STATES, LegalPage, MAX_CART_AMOUNT, MAX_CART_LINES, MAX_LINE_QUANTITY, MAX_VAT_PERCENT, MIN_LINE_QUANTITY, MoneyError, MoneyErrorCode, NO_CART_TRANSPORT, ORDER_PATH, ORDER_STATE_LABELS, ORDER_STOCK_HOLD, ORDER_TRANSITIONS, OrderActor, OrderEvent, OrderRefusal, OrderSnapshotRefusal, OrderState, PAYMENT_FIELD_LABELS, PAYMENT_METHODS, PaymentChannel, PaymentField, PaymentMethodKind, PaymentProvider, QuantityStep, SAMPLE_CART_LINE, SAMPLE_PRODUCT, SAMPLE_STUDIO, SAMPLE_SWATCHES, SHIPPING_KINDS, SHOP_SLOTS, SHOP_WORDS, SITE_REFUSALS, STOCK_EFFECTS, STOCK_RESERVATION_MINUTES, ShippingField, ShippingMethodKind, ShopSlot, ShopWord, SiteCommerceRoute, SiteRefusalCode, StockEffect, StockHold, VARIANT_NAME_SEPARATOR, VAT_PERCENT_MAX_DECIMALS, addMoney, addressLine, availableShippingMethods, canBuy, canStep, cartCookieName, cartEndpointPath, cartIssueWords, cartLineId, cartOf, cartTransportErrorFor, cartViewOf, catalogKey, checkoutGate, checkoutHref, checkoutWord, chooseValue, clampQuantity, commerceLanguage, currencyExponent, currentCheckoutStep, defaultChoice, emptyCartView, fieldAsked, fieldRequired, findVariant, formatMoney, formatMoneyValue, freeShippingRemaining, furthestStep, includedVat, isCurrencyCode, isMoney, isPaymentMethodKind, isShippingMethodKind, isStorefrontProduct, isVatPercent, labelIn, looksLikeEmail, looksLikePhone, majorToMinor, mergeCarts, migrateMajorPrice, minorToMajor, money, nextOrderState, openingOrderState, optionValueStates, orderHref, orderSnapshot, paymentChannelOf, paymentInstructions, paymentMethodProblems, paymentMethodReady, percentOf, priceCart, productCurrency, productInScope, productOptions, productVariants, quantityBounds, quoteShipping, reservationExpiresAt, sellableQuantity, shippingMethodProblems, shippingMethodReady, shippingNeedsAddress, shopWord, simulatedCartTransport, siteCartView, siteCommercePath, siteRefusalsOf, stepQuantity, stockEffect, storefrontCatalog, storefrontMoney, subtractMoney, timesMoney, usablePaymentMethods, variantChoiceOf, variantSlotOf, variantWords };
1222
- export type { AddToCartRequest, BusinessIdentity, Cart, CartIssue, CartLine, CartTransport, CartView, CartViewLine, CatalogEntry, CheckoutFieldModes, CheckoutGateFacts, CheckoutGateRefusal, CheckoutGateResult, CommerceLabel, Money, OptionState, OptionValueState, OrderBuyer, OrderMove, OrderSnapshot, OrderSnapshotLine, OrderSnapshotResult, OrderTransition, PaymentMethodConfig, PostalAddress, PricedCart, PricedLine, PricingChoice, ProductOption, ProductVariantView, QuantityBounds, ShippingCart, ShippingGoods, ShippingMethod, ShippingQuote, SimulatedCartTransport, SiteBuyerOrder, SiteCartView, SiteCheckoutContact, SiteCheckoutOptions, SiteCheckoutView, SiteLegalLink, SitePaymentOption, SitePlacedOrder, SiteRefusal, SiteShippingMethod, SiteShippingOption, StorefrontProduct, StorefrontVariant, StudioCommerce, VariantChoice, VariantSlot };
1578
+ export { ABANDONED_AFTER_MS, Availability, CART_COOKIE_PREFIX, CART_ISSUE_LABELS, CART_TRANSPORT_ERROR_LABELS, CHECKOUT_FORM_STEPS, CHECKOUT_GATE_RULES, CHECKOUT_PATH, CHECKOUT_STEPS, CHECKOUT_STEP_LABELS, CHECKOUT_WORDS, COUPON_CODE_MAX, COUPON_CODE_MIN, COUPON_REFUSAL_LABELS, CURRENCY_CODES, CURRENCY_EXPONENTS, CartIssueCode, CartTransportError, CartTransportErrorCode, CheckoutAskedField, CheckoutFieldMode, CheckoutGateArea, CheckoutGateCode, CheckoutSlot, CheckoutStep, CheckoutWord, CommerceLanguage, CouponKind, CouponProblem, CouponRefusal, CurrencyCode, DEFAULT_JOURNEY_DAYS, DEFAULT_MONEY_LOCALE, DEFAULT_REMINDER_SETTINGS, DEFAULT_VARIANT_NAME, DeliveryFit, FINAL_ORDER_STATES, FUNNEL_STAGES, FunnelStage, JOURNEY_PERIODS_DAYS, JourneyEventKind, LegalPage, MAX_CART_AMOUNT, MAX_CART_LINES, MAX_LINE_QUANTITY, MAX_VAT_PERCENT, MIN_LINE_QUANTITY, MoneyError, MoneyErrorCode, NO_CART_TRANSPORT, ORDER_PATH, ORDER_STATE_LABELS, ORDER_STOCK_HOLD, ORDER_TRANSITIONS, OrderActor, OrderEvent, OrderRefusal, OrderSnapshotRefusal, OrderState, PAYMENT_FIELD_LABELS, PAYMENT_METHODS, PaymentChannel, PaymentField, PaymentMethodKind, PaymentProvider, QuantityStep, RECOVERY_PATH, RECOVERY_WORDS, REMINDER_LATE_MS, REMINDER_SEQUENCE, REMINDER_STEPS, REMINDER_SUBJECT_WORDS, REMINDER_WORDS_MAX, RecoveryWord, ReminderOutcome, ReminderSkip, ReminderStep, ReminderStop, SAMPLE_CART_LINE, SAMPLE_PRODUCT, SAMPLE_STUDIO, SAMPLE_SWATCHES, SHIPPING_KINDS, SHOP_SLOTS, SHOP_WORDS, SITE_REFUSALS, STOCK_EFFECTS, STOCK_RESERVATION_MINUTES, STOREFRONT_COMPUTED_FIELDS, STOREFRONT_FIELDS, ShippingField, ShippingMethodKind, ShopSlot, ShopWord, SiteCommerceRoute, SiteRefusalCode, StockEffect, StockHold, StorefrontCollection, UNSUBSCRIBE_PATH, VARIANT_NAME_SEPARATOR, VAT_PERCENT_MAX_DECIMALS, addMoney, addressLine, availableShippingMethods, biggestDrop, canBuy, canStep, cartCookieName, cartEndpointPath, cartIssueWords, cartLineId, cartOf, cartTransportErrorFor, cartViewOf, catalogKey, checkoutGate, checkoutHref, checkoutWord, chooseValue, clampQuantity, commerceLanguage, couponDiscount, couponOfferWords, couponProblems, couponRefusalWords, currencyExponent, currentCheckoutStep, defaultChoice, emptyCartView, fieldAsked, fieldRequired, findVariant, formatMoney, formatMoneyValue, freeShippingRemaining, funnelOf, furthestStep, includedVat, isAbandoned, isCouponCode, isCurrencyCode, isMoney, isPaymentMethodKind, isShippingMethodKind, isStorefrontField, isStorefrontProduct, isVatPercent, labelIn, looksLikeEmail, looksLikePhone, majorToMinor, marketingAllowed, maskEmail, mergeCarts, migrateMajorPrice, minorToMajor, money, nextOrderState, nextReminder, normalizeCouponCode, openingOrderState, optionValueStates, orderHref, orderSnapshot, paymentChannelOf, paymentInstructions, paymentMethodProblems, paymentMethodReady, percentOf, priceCart, productCurrency, productInScope, productOptions, productVariants, quantityBounds, quoteShipping, recoveryHref, recoveryWord, reminderNumber, reminderSettingsOf, reservationExpiresAt, sellableQuantity, shippingMethodProblems, shippingMethodReady, shippingNeedsAddress, shopWord, simulatedCartTransport, siteCartView, siteCommercePath, siteRefusalsOf, stepQuantity, stockEffect, stoppedAt, storefrontBindPaths, storefrontCatalog, storefrontMoney, subtractMoney, timesMoney, unsubscribeHref, usablePaymentMethods, variantChoiceOf, variantSlotOf, variantWords };
1579
+ export type { AddToCartRequest, AppliedCoupon, BusinessIdentity, Cart, CartIssue, CartLine, CartTransport, CartView, CartViewLine, CatalogEntry, CheckoutFieldModes, CheckoutGateFacts, CheckoutGateRefusal, CheckoutGateResult, CommerceLabel, ConsentDecision, Coupon, CouponCheck, FunnelRow, Money, OptionState, OptionValueState, OrderBuyer, OrderMove, OrderSnapshot, OrderSnapshotLine, OrderSnapshotResult, OrderTransition, PaymentMethodConfig, PostalAddress, PricedCart, PricedLine, PricingChoice, ProductOption, ProductVariantView, QuantityBounds, ReminderFacts, ReminderPlan, ReminderSettings, ReminderTiming, ReminderWords, ShippingCart, ShippingGoods, ShippingMethod, ShippingQuote, SimulatedCartTransport, SiteBuyerOrder, SiteCartView, SiteCheckoutContact, SiteCheckoutOptions, SiteCheckoutView, SiteLegalLink, SitePaymentOption, SitePlacedOrder, SiteRefusal, SiteShippingMethod, SiteShippingOption, SiteUnsubscribeState, StorefrontFieldSpec, StorefrontProduct, StorefrontVariant, StudioCommerce, VariantChoice, VariantSlot };