@scopetickets/checkout 0.1.3 → 0.4.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/dist/index.d.cts CHANGED
@@ -28,43 +28,20 @@ declare type Account = {
28
28
  readonly userTypeKey: string | null;
29
29
  };
30
30
 
31
+ /**
32
+ * A card's button as this file describes one — the role and the words, plus whatever
33
+ * mark the design puts beside them. `onPress` is the gallery's, since a fixture has
34
+ * nowhere to send anybody.
35
+ */
36
+ declare type ActionRole = 'action' | 'primary' | 'secondary';
37
+
31
38
  /** How a step tells its card whether its question is answered. */
32
39
  export declare type AnswerReporting = {
33
40
  readonly onAnsweredChange?: (answered: boolean) => void;
34
41
  };
35
42
 
36
- /**
37
- * THE CDN A HOST SHOULD RESOLVE AGAINST — the same one this widget uses.
38
- *
39
- * PUBLISHED BECAUSE A HOST THAT SUPPLIES `cartLines` OWNS THE PICTURE, and cannot
40
- * resolve it correctly without this: the url on the wire keeps the host of whichever
41
- * environment uploaded the file, so the stored one answers 403 from anywhere else.
42
- * Measured on TwinkleTown's staging series, 2026-09-10 — the same path is 403 on
43
- * `cdn-dev.scopetickets.com` and 200 on `cdn.scopetickets.com`.
44
- *
45
- * A HOST CANNOT READ `ENVIRONMENT_URLS` ITSELF. `@scopetickets/api` is this package's
46
- * dependency and not the host's, so without this the only way to a working `<img>` is a
47
- * hostname typed into somebody's integration — which is the fact this module exists to
48
- * keep in one place.
49
- */
50
43
  export declare function artworkOrigin(environment?: Environment): string;
51
44
 
52
- /**
53
- * THE RUN'S OWN PICTURE, resolved to something an `<img>` on somebody else's page can load.
54
- *
55
- * TWO FACTS ABOUT THE WIRE, AND EACH ONE LOOKS LIKE SUCCESS WHEN IT IS WRONG.
56
- * `@scopetickets/avatar` draws `<img src>` unconditionally, so a bad url and a missing one
57
- * both render as its own fill — which is roughly what a ticket looks like anyway.
58
- *
59
- * THE PICTURE IS `Backgrounds`, NOT `Cover`. `Cover` is the link preview: a different asset,
60
- * and on its own host.
61
- *
62
- * THE HOST IS NOT THE PLATFORM'S TO CHOOSE. Artwork urls are stored absolute, keeping the
63
- * host of whichever environment UPLOADED the file — so a run authored against dev answers
64
- * `cdn-dev` from production forever. The path is the platform's; the host is this
65
- * integration's, and `ENVIRONMENT_URLS[env].artworkUrl` states it.
66
- */
67
-
68
45
  /** The artwork half of the wire's `Theme`, and nothing else it carries. */
69
46
  export declare type ArtworkTheme = {
70
47
  readonly Backgrounds?: readonly string[] | null;
@@ -136,13 +113,7 @@ export declare type AuthCard = {
136
113
  * The badge on the hero, and the hole it sits in — or absent where the design hides it.
137
114
  * See `DevAvatar.accessory` for why the shape travels with the node.
138
115
  */
139
- readonly accessory?: {
140
- readonly shape: 'square' | 'circle';
141
- readonly content: ReactNode;
142
- /**
143
- * Names this badge for the avatar's own transition — see `STEP_ACCESSORY`, and
144
- * `AvatarAccessory.id` in the package.
145
- */
116
+ readonly accessory?: GlyphBadge & {
146
117
  readonly id: string;
147
118
  };
148
119
  };
@@ -233,6 +204,24 @@ declare type AuthState =
233
204
  */
234
205
  export declare function backFrom(screen: BookingScreen, booking?: Booking | null): BookingScreen | null;
235
206
 
207
+ /**
208
+ * ONE BAND'S UNIT PRICE, or null where it cannot be stated.
209
+ *
210
+ * NULL IS FOR `DiscountRate`, AND IT IS A REFUSAL RATHER THAN A GAP. The field's UNIT is
211
+ * not settled: read as a FRACTION, `50` gives a negative price; read as a PERCENTAGE, a
212
+ * value of `0.5` is a rounding error rather than a half-price ticket. Every rate observed on
213
+ * sandbox is `0` — 304 assignments across 38 events — so neither reading has ever run
214
+ * against real data, and both are one organiser away from being drawn at a buyer.
215
+ *
216
+ * A wrong price is worse than no price, so a non-zero rate draws no From at all.
217
+ *
218
+ * THE NOMINAL COMES OFF THE ALL-IN, which is the other unsettled rule: identical to
219
+ * `(BasePrice - nominal) + Fees` because `Fees` is flat on the wire, but NOT identical to
220
+ * re-rating the fee on the discounted base. Fees are 12.0% of base on both of TwinkleTown's
221
+ * products, so a proportional rule is plausible and nothing says which it is.
222
+ */
223
+ export declare function bandPrice(salePrice: number, band: Pick<UserType, 'DiscountNominal' | 'DiscountRate'>): number | null;
224
+
236
225
  /** One ticket, as the platform holds it. */
237
226
  export declare type BookedTicket = {
238
227
  /**
@@ -572,6 +561,21 @@ export declare type BookingTicket = BookedTicket & {
572
561
  readonly userType: string | null;
573
562
  };
574
563
 
564
+ declare type BrandMarkId = 'SCOPE_TICKETS_WORDMARK';
565
+
566
+ /** A mark beside a button's label. */
567
+ declare type ButtonMark = {
568
+ readonly side: 'leading' | 'trailing';
569
+ readonly spacing?: 'joined' | 'separate';
570
+ } & ({
571
+ readonly glyph: GlyphId;
572
+ readonly size: number;
573
+ } | {
574
+ readonly brand: BrandMarkId;
575
+ readonly height: number;
576
+ readonly title?: string;
577
+ });
578
+
575
579
  /** Which period the pill names — and therefore which picker it opens. */
576
580
  export declare type CalendarGrain = 'YEAR' | 'MONTH';
577
581
 
@@ -615,17 +619,14 @@ export declare type CalendarSeriesEvent = {
615
619
  readonly day: string;
616
620
  };
617
621
 
618
- /**
619
- * A card's button as this file describes one — the role and the words, plus whatever
620
- * mark the design puts beside them. `onPress` is the gallery's, since a fixture has
621
- * nowhere to send anybody.
622
- */
623
- export declare type CardAction = Pick<IslandAction, 'role' | 'mark'> & {
622
+ export declare type CardAction = {
623
+ readonly role: ActionRole;
624
+ readonly mark?: ButtonMark;
624
625
  /**
625
626
  * A `ReactNode` because the pay button composes a brand mark into its own words — "Pay
626
627
  * with [mark] • 1123", as the design draws it.
627
628
  */
628
- readonly label: ReactNode;
629
+ readonly label: string;
629
630
  /** What the button DOES, for the few that do anything. */
630
631
  readonly onPress?: () => void;
631
632
  /**
@@ -681,6 +682,16 @@ export declare type CardAction = Pick<IslandAction, 'role' | 'mark'> & {
681
682
  * the card, and this file draws no controls.
682
683
  */
683
684
  readonly uploads?: boolean;
685
+ /**
686
+ * THIS BUTTON GIVES THE ORDER BACK AND LEAVES — the abandon card's Confirm, and nothing
687
+ * else. Declared rather than handled, like `pays` and `takesAccount`: releasing a cart
688
+ * is a call, and this file is data with no client to make one.
689
+ *
690
+ * WITHOUT IT THE PRESS WOULD CLOSE THE DETOUR, which is what every other button on one
691
+ * does and is exactly wrong here — the buyer would answer "are you sure?" with yes and
692
+ * be returned to the order they had just given up.
693
+ */
694
+ readonly leaves?: boolean;
684
695
  /**
685
696
  * THIS BUTTON SENDS THE RATING — the feedback card's Continue, and the only thing that
686
697
  * does. Declared rather than handled, like `pays`: the number is on the card and the
@@ -754,25 +765,6 @@ declare interface CartItem {
754
765
  DiscountAmount: number;
755
766
  }
756
767
 
757
- /**
758
- * WHAT IS IN THE CART, as the cart screen draws it.
759
- *
760
- * ONE LINE PER PRODUCT, and the platform's own money on each. A cart holds one ITEM PER
761
- * HEAD — `itemsFor` sends one per person and the platform answers with one per person —
762
- * so three adult tickets are three items with a third of the money each. Nobody wants to
763
- * read that; a line is what a buyer recognises as a thing they chose, and the count on
764
- * its badge is how many of it they took.
765
- *
766
- * "Peak" IS THE PRODUCT AND "(Child)" IS THE USER TYPE, where one applies — so three Peak
767
- * tickets bought for one adult and two children are TWO lines, not one. The wire does not
768
- * say which is which: `CartItem` echoes a name and an amount and nothing about who the
769
- * ticket is for, though the widget sent a `UserTypeAssignmentKey` on every one of them.
770
- *
771
- * SO IT IS READ BACK OFF THE REQUEST, where there was one — see `attributeCartItems`. A
772
- * cart the widget did not open (a host's own, adopted) has no request to read, and its
773
- * lines group by product alone until the host or the platform says more.
774
- */
775
-
776
768
  /** One line of the cart. Everything a row draws, and nothing about how. */
777
769
  export declare type CartLine = {
778
770
  /** Stable across a re-price, so React keeps the row rather than replacing it. */
@@ -1172,6 +1164,23 @@ export declare type CheckoutProps = {
1172
1164
  * it, and those stay the widget's own.
1173
1165
  */
1174
1166
  readonly openingLabel?: string;
1167
+ /**
1168
+ * WHICH INVENTORIES ARE ON SALE HERE, and absent means all of the run's.
1169
+ *
1170
+ * An inventory is a collection of sellable products. Every event is given one
1171
+ * programmatically; named ones silo an allocation ACROSS several events without a second
1172
+ * event existing — an accessible-session strand, say, or a private allocation. Naming one
1173
+ * makes this mount sell only from it; naming several is a UNION, so a page offering both
1174
+ * kinds of session names both and a dedicated page names the one.
1175
+ *
1176
+ * A NARROWING OF THE SUBJECT, NOT A REPLACEMENT FOR IT. The subject still says WHICH RUN;
1177
+ * this says which of its stock. The day picker, the sessions and the cart all follow it,
1178
+ * because every one of them is read from the same `TicketInformation` call.
1179
+ *
1180
+ * THE HOST'S TO SUPPLY, like `openingLabel` and for the same reason: which strand a page
1181
+ * sells is something the page knows and the widget cannot infer.
1182
+ */
1183
+ readonly inventories?: readonly string[];
1175
1184
  readonly mode?: IslandMode;
1176
1185
  /**
1177
1186
  * Where in its reservation the island sits — a corner, the middle of an edge, or the
@@ -1233,7 +1242,13 @@ export declare type CheckoutSchedule = {
1233
1242
  *
1234
1243
  * ONE CALL ANSWERS BOTH. `getSeriesInfo` returns the run's events AND its user types, so
1235
1244
  * the calendar and the party stepper come from the same request — which is also why they
1236
- * are fetched together here rather than by two hooks that would each have to know the key.
1245
+ * are fetched together rather than by two hooks that would each have to know the key.
1246
+ *
1247
+ * ── WHAT IS LEFT HERE ────────────────────────────────────────────────────────
1248
+ *
1249
+ * React, and the client. Which day is worth asking for, which answers still belong to the
1250
+ * question that was put, and what stays drawn while the next day arrives are all
1251
+ * `machine/run-data.ts`; what a run IS once it arrives is `domain/run-info.ts`.
1237
1252
  *
1238
1253
  * ── WHY A HOOK AND NOT A PROVIDER ────────────────────────────────────────────
1239
1254
  *
@@ -1399,7 +1414,6 @@ export declare type DayPickerProps = {
1399
1414
  readonly onVisibleMonthChange?: (month: CalendarMonthKey) => void;
1400
1415
  };
1401
1416
 
1402
- /** The stock set as the picker and the hero both need it, for the configured platform. */
1403
1417
  export declare function defaultProfilePhotos(environment?: Environment, size?: ProfilePhotoSize): ProfilePhoto[];
1404
1418
 
1405
1419
  /** The record with the caller's own facts folded in — see the top of this file. */
@@ -1495,27 +1509,36 @@ export declare type FollowListProps = {
1495
1509
  readonly onToggle: (key: string) => void;
1496
1510
  };
1497
1511
 
1512
+ /** Money, and how it is written. */
1513
+ /** `1234, 'EUR'` → `"€12.34"`. `1200, 'JPY'` → `"¥1,200"`. */
1514
+ export declare function formatMoney(minorUnits: number, currency: string): string;
1515
+
1498
1516
  /**
1499
- * WHO THE TICKETS ARE FOR — the party step's rows, and the keys they are spent as.
1500
- *
1501
- * `AssignmentKey` IS NOT A USER TYPE. It identifies one ASSIGNMENT of a type to a product
1502
- * on an event. Measured on sandbox 2026-09-10, TwinkleTown — 38 events × 2 products × 3
1503
- * types — `EventInformation` answers with 228 entries and 228 distinct keys, 76 of them
1504
- * named "Child". So de-duplicating on the key cannot help: every one is already distinct.
1505
- * `Name` is the only field that identifies what a buyer is choosing.
1517
+ * THE CHEAPEST WAY INTO THESE TICKETS, across every band each of them offers.
1506
1518
  *
1507
- * THE SAME NAME IS NOT THE SAME OFFER, which is why the assignments are not collapsed
1508
- * away: Child is 550 off Peak and 450 off Off-Peak, and needs ID on one and not the other.
1509
- * The type is what the buyer picks; the assignment is what it costs, and that is not
1510
- * settled until a product is.
1519
+ * A TICKET THAT NAMES NO BANDS IS SOLD AT ITS OWN PRICE — the platform's "everyone else",
1520
+ * and the case `PartyStepper` draws its single unnamed line for. Where bands ARE named they
1521
+ * are the only ways to buy, so the ticket's undiscounted price is a candidate only if a band
1522
+ * states it; an `Adult` at `DiscountNominal: 0` does.
1511
1523
  *
1512
- * WHICH IS WHY THE KEY IS RESOLVED LATE. `PARTY` runs before `DATE` and `TIME`, so when
1513
- * the buyer picks "Child" there is no product for an assignment to belong to — the product
1514
- * is `productForSession`, decided by the timeslot. Committing to a key there means sending
1515
- * Peak's against an Off-Peak product, and a bulk add that refuses an unknown key leaves no
1516
- * cart at all. So the composition is keyed by NAME and `assignmentFor` converts it once
1517
- * `useCheckoutOrder` holds the product.
1524
+ * `null` RATHER THAN A NUMBER in three cases, each of which would otherwise put a wrong
1525
+ * figure on a card: no currency to state it in, nothing payable here, or a band whose rate
1526
+ * cannot be read. The last refuses the whole line rather than skipping that band — a skipped
1527
+ * band that happened to be the cheapest leaves a "From" ABOVE the real floor, which is the
1528
+ * one thing a From must never be.
1518
1529
  */
1530
+ export declare function fromPrice(tickets: readonly PricedTicket[], currency: string | null | undefined): SlotPrice | null;
1531
+
1532
+ /** A badge over the hero. */
1533
+ declare type GlyphBadge = {
1534
+ readonly shape: 'square' | 'circle';
1535
+ readonly glyph: GlyphId;
1536
+ readonly spin?: true;
1537
+ readonly id?: string;
1538
+ };
1539
+
1540
+ /** A glyph from the icon set, by name; each renderer decides how to draw it. */
1541
+ declare type GlyphId = 'ASTERISK' | 'BELL' | 'CALENDAR' | 'CALLOUT_WITH_HEART' | 'CAMERA' | 'CLOCK_WITH_SEGMENT_SOLID' | 'CLOUD_WITH_ARROW_UP_IN' | 'EYE_TO_CENTER' | 'EYE_TO_CENTER_WITH_STRIKETHROUGH' | 'KEYHOLE_IN_SQUARE' | 'MINUS_MARK' | 'PAPER_PLANE_TO_TOP_LEFT' | 'PASSKEY' | 'PAYMENT_CARD' | 'PERCENT_IN_STICKER' | 'PEOPLE_TWO' | 'PHONE_TO_RIGHT' | 'PLUS_IN_CIRCLE' | 'PLUS_MARK' | 'SHOPPING_CART' | 'TEXT_CURSOR_WITH_RECTANGLE' | 'TEXT_CURSOR_WITH_REDACTED_TEXT';
1519
1542
 
1520
1543
  /**
1521
1544
  * THE DISTINCT TYPES, in the order the platform first names each — the organiser's own,
@@ -1601,6 +1624,14 @@ export declare type HolderSave = {
1601
1624
  */
1602
1625
  export declare function holdExpired(hold: EscrowHold): boolean;
1603
1626
 
1627
+ declare type Inline = {
1628
+ readonly kind: 'TEXT';
1629
+ readonly text: string;
1630
+ } | {
1631
+ readonly kind: 'MARK';
1632
+ readonly mark: BrandMarkId;
1633
+ };
1634
+
1604
1635
  /** What the platform needs about the person paying. */
1605
1636
  export declare type IntentBuyer = {
1606
1637
  readonly firstName?: string;
@@ -1754,7 +1785,26 @@ export declare type IslandCommitPillProps = {
1754
1785
  readonly promoLabel: string;
1755
1786
  };
1756
1787
 
1757
- /** WHAT LED A MOVE, which decides what the SURFACE does about it. */
1788
+ /** When everything has finished — which is what the teardown timer waits for. */
1789
+ /**
1790
+ * WHAT LED A MOVE, which decides what the SURFACE does about it.
1791
+ *
1792
+ * `island` — the collapsed pill was pressed. The surface arrives already compressed and
1793
+ * RETURNING that compression is the move's opening beat.
1794
+ *
1795
+ * `element` — a control inside the card was pressed, and this is the common case. The
1796
+ * surface does not scale at all: the control popped itself over `PRESS_IN_MS` and was
1797
+ * back before the move began, so the morph is the whole acknowledgement. "A press on a
1798
+ * 52px button inside a 676px card should look like the button moving and the card
1799
+ * becoming the next thing."
1800
+ *
1801
+ * `none` — the flow changed the step by itself. Nothing on screen is compressed and no
1802
+ * control popped, so the acknowledgement is the pop played as an animation. The one case
1803
+ * where the surface moves of its own accord.
1804
+ *
1805
+ * IN CORE BECAUSE BOTH RENDERERS DECIDE FROM IT. It was a web type in `island-press.ts`,
1806
+ * and the native surface needs the same three answers to the same question.
1807
+ */
1758
1808
  declare type IslandGesture = 'island' | 'element' | 'none';
1759
1809
 
1760
1810
  export declare function IslandHeader({ dismiss, onDismiss, dismissIcon, dismissLabel, headerLead, headerTrail, closable, }: IslandHeaderProps): react_jsx_runtime.JSX.Element;
@@ -2130,6 +2180,12 @@ export declare type NoticeId =
2130
2180
  | 'ORDER_SOLD_OUT'
2131
2181
  /** The order could not be opened at all: no cart, and nothing to check out. */
2132
2182
  | 'ORDER_NOT_OPENED'
2183
+ /**
2184
+ * THE RUN OR THE DAY COULD NOT BE READ. One id for both, because they read the same to a
2185
+ * buyer — the thing they came to buy is not on screen — and the difference between them
2186
+ * is a fact about which call to make again, which the retry already knows.
2187
+ */
2188
+ | 'EVENT_NOT_LOADED'
2133
2189
  /** The event's questionnaire could not be read. */
2134
2190
  | 'QUESTIONS_NOT_LOADED'
2135
2191
  /** The platform refused the answers. Only raised before a charge. */
@@ -2179,7 +2235,18 @@ export declare type NoticeId =
2179
2235
  * The ticketholder's details never reached the platform. The ticket is unchanged and the
2180
2236
  * buyer is still holding what they typed, so this is the one of the two that is a fault.
2181
2237
  */
2182
- | 'TICKETHOLDER_NOT_SAVED';
2238
+ | 'TICKETHOLDER_NOT_SAVED'
2239
+ /** The merchant settles through a provider no sheet here can open. Nothing broke. */
2240
+ | 'PAYMENT_UNAVAILABLE'
2241
+ /** The sheet could not be opened: no order minted, or it would not take its key. */
2242
+ | 'PAYMENT_NOT_STARTED'
2243
+ /**
2244
+ * THE PLATFORM WAS ASKED FOR A WHOLE ESCROW WINDOW AND NEVER SAID. The one notice here
2245
+ * that cannot tell the buyer what happened, because nothing knows — see
2246
+ * `PaymentOutcome.UNANSWERED`. It is a FAILURE and not a WARNING: nothing worked, and
2247
+ * there is no adjustment the buyer can make that would help.
2248
+ */
2249
+ | 'PAYMENT_UNCONFIRMED';
2183
2250
 
2184
2251
  /**
2185
2252
  * The notices whose words are the same every time. One so far: a notice whose words depend
@@ -2187,25 +2254,6 @@ export declare type NoticeId =
2187
2254
  */
2188
2255
  export declare const NOTICES: Readonly<Record<Exclude<NoticeId, 'ORDER_PART_FILLED'>, Notice>>;
2189
2256
 
2190
- /**
2191
- * WHAT A BUYER IS TOLD WHEN THE ORDER DID NOT DO WHAT THEY ASKED.
2192
- *
2193
- * ONE CARD DRAWN FROM DATA — never a screen per failure, and never failure UI inside a
2194
- * step. Adding a case is an entry here and a raise from the site that knows: see
2195
- * `raiseFor` and the two effects in `ScopeTicketsCheckout` that call it.
2196
- *
2197
- * ONE VOCABULARY IN TWO PACKAGES, and that is a debt rather than a design. `@scopetickets
2198
- * /sdk` has said all of this since before the island existed — the same two severities,
2199
- * the same action ids, the same reporting rule — and `packages/checkout` cannot reach it:
2200
- * neither package depends on the other, and the island exists to be the lean one. So the
2201
- * vocabulary is copied, and the WORDING is too wherever the SDK has already said the same
2202
- * thing to a buyer — copy that has been read beats copy invented twice. When the notices
2203
- * module moves somewhere both can use, this file is what it replaces; the names are
2204
- * deliberately identical so that merge is a deletion.
2205
- *
2206
- * Pure: no React, no network, no DOM.
2207
- */
2208
-
2209
2257
  /**
2210
2258
  * WARNING: the system worked and something needs adjusting, so there is a way forward.
2211
2259
  * FAILURE: something broke — leave, or try again where there is anything to try.
@@ -2299,19 +2347,6 @@ export declare type OrderIntent = {
2299
2347
  readonly paymentMethodKey?: string;
2300
2348
  };
2301
2349
 
2302
- /**
2303
- * WHAT A HOST HANDS THE WIDGET, complete or partial.
2304
- *
2305
- * A host calls the widget to do the parts it will not or cannot do itself. So it says
2306
- * what it already knows and leaves the rest absent, and the widget collects whatever is
2307
- * missing. Every field but the subject is optional for exactly that reason: absent means
2308
- * "you ask", not "there is none".
2309
- *
2310
- * PARTIAL IS THE NORMAL CASE. A host with its own calendar fills the day and leaves the
2311
- * buyer empty; a host with nothing but a series key fills only the subject. Both are
2312
- * valid, and the difference between them is which steps the widget mounts.
2313
- */
2314
-
2315
2350
  /**
2316
2351
  * WHAT IS BEING BOUGHT INTO, as one value rather than two nullable keys.
2317
2352
  *
@@ -2377,20 +2412,12 @@ export declare type PartyStepperProps = {
2377
2412
  readonly refused?: number | null;
2378
2413
  };
2379
2414
 
2380
- /**
2381
- * THE PARTY STEP — one stepper per user type, or a single line when the event offers
2382
- * none.
2383
- *
2384
- * Controlled: the caller holds the counts, because the composition belongs to the order
2385
- * rather than to the control that edits it. `max` is the ticket's ceiling and is the
2386
- * caller's too — a row has no opinion about how many people a party may hold.
2387
- */
2388
2415
  /** A user type the event offers, as the row needs it. */
2389
2416
  export declare type PartyUserTypeOption = {
2390
2417
  /**
2391
2418
  * WHAT THE COMPOSITION COUNTS UNDER. The platform's types are keyed by NAME, because an
2392
- * assignment key belongs to a product no one has chosen yet — see `user-types`. A host
2393
- * supplying its own may key them however it likes.
2419
+ * assignment key belongs to a product no one has chosen yet — see this module's header.
2420
+ * A host supplying its own may key them however it likes.
2394
2421
  */
2395
2422
  readonly key: string;
2396
2423
  /** Always present: an event with no discount types still offers a default. */
@@ -2484,7 +2511,8 @@ export declare type PaymentMethodsProps = {
2484
2511
  };
2485
2512
 
2486
2513
  /**
2487
- * WHAT A PAYMENT DID, in the platform's own three words.
2514
+ * WHAT A PAYMENT DID, in the platform's own words — and, in one case, in the absence of
2515
+ * them.
2488
2516
  *
2489
2517
  * THE CHAIN, WHICH IS THE WHOLE POINT: the status endpoint's `completed` means the
2490
2518
  * PROVIDER took the money — lowercase because it is the platform API's own enum literal,
@@ -2507,6 +2535,24 @@ export declare type PaymentOutcome =
2507
2535
  | {
2508
2536
  readonly kind: 'PAID';
2509
2537
  }
2538
+ /**
2539
+ * THE PLATFORM WAS ASKED AND NEVER SAID — the poll ran to `POLL_LIMIT_MS` with the
2540
+ * payment still undecided, so whether the money moved is genuinely unknown.
2541
+ *
2542
+ * IT CARRIES `PAID`'S SAFETY AND NONE OF ITS CLAIM. Under "unknown" a pay button must
2543
+ * not come back, because a second charge over an attempt that may have gone through is
2544
+ * the one mistake this flow cannot make — which is why `moneyMoved` counts this arm.
2545
+ * But `PAID` buys that safety by ASSERTING the money moved, and on a device that drew
2546
+ * "Payment Received" over a card the provider had declined. Nobody knew that. This arm
2547
+ * exists so the safety no longer has to be bought with a sentence we cannot stand over.
2548
+ *
2549
+ * ADDITIVE ON PURPOSE. `PaymentOutcome` is a public type a host constructs through
2550
+ * `CheckoutProps.payment`; a fourth arm nothing outside asserts leaves every existing
2551
+ * integration compiling, which splitting `PAID` in two would not.
2552
+ */
2553
+ | {
2554
+ readonly kind: 'UNANSWERED';
2555
+ }
2510
2556
  /** Taken. The tickets are the buyer's and nothing can change. */
2511
2557
  | {
2512
2558
  readonly kind: 'PLACED';
@@ -2631,6 +2677,60 @@ declare type PressPhase = 'held';
2631
2677
  /** WHAT the press compresses, which is decided by what the control DOES. */
2632
2678
  export declare type PressScope = 'island' | 'element';
2633
2679
 
2680
+ /**
2681
+ * THE SESSION PRICED FOR A PARTY — what this buyer will (likely) be charged for it.
2682
+ *
2683
+ * THE SUM AND NOT THE FLOOR, which is the whole point. A row showing the cheapest single
2684
+ * admission while the buyer holds two Adults and a Child is quoting a ticket they are not
2685
+ * buying: two of the three heads cost more than the figure on screen, and the number only
2686
+ * becomes true again if the party is one Child.
2687
+ *
2688
+ * AN EMPTY PARTY KEEPS THE FLOOR. Before anybody has said who is coming there is no total
2689
+ * to state, and the cheapest way in is the honest thing to show — which is also what the
2690
+ * row said before this existed.
2691
+ *
2692
+ * MINIMISED ACROSS PRODUCTS, each priced whole. A product that cannot serve every band in
2693
+ * the composition is not a cheaper way to buy it, it is a different order — see `options`.
2694
+ *
2695
+ * `null` WHERE NO PRODUCT CAN SERVE THE PARTY, rather than a total built by leaving
2696
+ * somebody out. A figure that silently drops a head is worse than no figure: it is a
2697
+ * smaller number, so it reads as a better price rather than as a missing one.
2698
+ *
2699
+ * STILL A LIKELIHOOD AND NOT A PROMISE. The cart is what charges, and promotions, fees the
2700
+ * wire does not break out and the two unsettled rules in `bandPrice` all sit between this
2701
+ * and the amount taken. It is the best statement available before a cart exists.
2702
+ */
2703
+ export declare function priceComposition(price: SlotPrice | null | undefined, composition: Readonly<Record<string, number>>): SlotPrice | null;
2704
+
2705
+ /**
2706
+ * WHAT A SESSION COSTS AT ITS CHEAPEST — the "From" a timeslot row draws.
2707
+ *
2708
+ * NOTHING ON THE WIRE STATES THIS, which is the whole reason it is computed. `EventTimeslot`
2709
+ * is two times, a total and a remaining — no money at all — so a session's price is reached
2710
+ * through the TICKET that sells it, and the discount bands hang off that ticket too. No
2711
+ * endpoint states what a band costs.
2712
+ *
2713
+ * A DAY'S SESSIONS ARE NOT ONE PRICE. Measured on sandbox 2026-09-16, TwinkleTown's rink:
2714
+ * the day's slots are split across two products, disjointly — Off-Peak holds 11:00, 13:00
2715
+ * and 14:00 and Peak holds 15:00 to 20:00. Nine sessions, two prices, no overlap. So this
2716
+ * takes a SESSION and not a day: a figure computed per day would be wrong for two thirds of
2717
+ * that column.
2718
+ *
2719
+ * `SalePrice` IS THE BASIS, and it is already this package's: `ticketChoice` sorts on it to
2720
+ * mean "cheapest first". It is the all-in, `BasePrice + Fees`, which is the right number to
2721
+ * show first because it is the one that must not grow at the checkout.
2722
+ */
2723
+ /**
2724
+ * THE FIELDS A PRICE IS READ OFF, and no more — the SDK's own `Ticket` satisfies it.
2725
+ *
2726
+ * STRUCTURAL RATHER THAN THE WHOLE TICKET, because a host composing its own session rows
2727
+ * rarely holds one: it has whatever its own fetch returned, and demanding twenty-three
2728
+ * fields to read three of them is how a published function goes unused.
2729
+ */
2730
+ export declare type PricedTicket = Pick<Ticket, 'SalePrice' | 'PaymentsEnabled'> & {
2731
+ readonly UserTypes: readonly Pick<UserType, 'Name' | 'DiscountNominal' | 'DiscountRate'>[] | null;
2732
+ };
2733
+
2634
2734
  /**
2635
2735
  * THE PHOTO GRID'S OWN WORDS — the group, its cells and the two refusals.
2636
2736
  *
@@ -2649,15 +2749,6 @@ export declare const PROFILE_PHOTO_COPY: {
2649
2749
  };
2650
2750
  };
2651
2751
 
2652
- /**
2653
- * WHAT MAY BECOME SOMEBODY'S FACE — the one rule the photo step enforces on a file it did
2654
- * not choose.
2655
- *
2656
- * `accept="image/*"` decides what the picker OFFERS and guarantees nothing: a browser
2657
- * hands back whatever was dragged onto it. So a chosen file is external input, and the two
2658
- * things knowable before anything is drawn are checked here, apart from the DOM.
2659
- */
2660
-
2661
2752
  /**
2662
2753
  * ONE OF THE STOCK FACES A NEW ACCOUNT CAN BE GIVEN — the platform's, exactly as the
2663
2754
  * calendar's days are: the widget owns the grid's layout and none of its faces.
@@ -2718,11 +2809,6 @@ export declare type ProfilePhotoPickerProps = {
2718
2809
  */
2719
2810
  export declare type ProfilePhotoSize = 256 | 1024;
2720
2811
 
2721
- /**
2722
- * The steps of a purchase, in the buyer's order, and what the resting pill's action
2723
- * says at each.
2724
- */
2725
-
2726
2812
  /** In the flow's own order, so the union reads as the sequence it names. */
2727
2813
  declare type PurchaseStepId = 'PARTY' | 'DATE' | 'TIME' | 'SIGN_IN' | 'NAME' | 'EMAIL' | 'PHONE' | 'DETAILS' | 'REVIEW' | 'PAYMENT' | 'PROMO' | 'ABANDON' | 'PROCESSING' | 'PAYMENT_FAILED' | 'PAYMENT_SUCCESS' | 'FEEDBACK' | 'CREATE_ACCOUNT' | 'CONFIRM_EMAIL' | 'VERIFY_EMAIL' | 'PASSWORD' | 'PROFILE_PHOTO' | 'ACCOUNT_CREATING' | 'ACCOUNT_CREATED' | 'PASSKEY' | 'FOLLOW';
2728
2814
 
@@ -2892,7 +2978,7 @@ checking: boolean): {
2892
2978
  actions: ({
2893
2979
  key: string;
2894
2980
  role: "primary";
2895
- label: "Check Out" | "Checking…";
2981
+ label: "Checking…" | "Check Out";
2896
2982
  disabled: boolean;
2897
2983
  onPress: () => void;
2898
2984
  } | {
@@ -2904,6 +2990,9 @@ checking: boolean): {
2904
2990
  })[];
2905
2991
  };
2906
2992
 
2993
+ /** Copy that is words, or words beside a brand mark. */
2994
+ declare type RichText = string | readonly Inline[];
2995
+
2907
2996
  /**
2908
2997
  * WHICH WAY ROUND AN ARC GROWS FROM 12 O'CLOCK.
2909
2998
  *
@@ -2951,10 +3040,19 @@ origin?: string): string | undefined;
2951
3040
  */
2952
3041
  export declare function ScopeTicketsCheckout({ intent, opensOn, session: seed, ...props }: CheckoutProps): react_jsx_runtime.JSX.Element;
2953
3042
 
3043
+ /**
3044
+ * THE FROM FOR ONE SESSION — the cheapest band of whichever products sell that session.
3045
+ *
3046
+ * `sellsSession` IS THE PACKAGE'S OWN MATCHER, the same one `productForSession` spends to
3047
+ * decide what the cart is filled with. A second way of asking which product holds a slot is
3048
+ * how a row comes to advertise a price the cart then does not charge.
3049
+ */
3050
+ export declare function sessionFromPrice(tickets: readonly Ticket[], session: TimeslotRequest, currency: string | null | undefined): SlotPrice | null;
3051
+
2954
3052
  /** THE SIGN-IN FUNNEL'S CREDENTIAL CARD — the design. */
2955
3053
  export declare const SIGN_IN_FUNNEL_CARD: {
2956
3054
  readonly copy: {
2957
- readonly title: react_jsx_runtime.JSX.Element;
3055
+ readonly title: RichText;
2958
3056
  readonly subtitle: "Sign in below.";
2959
3057
  };
2960
3058
  /** the design primary, the design secondary. */
@@ -3010,6 +3108,34 @@ export declare const SIMULATED_SESSIONS: {
3010
3108
 
3011
3109
  export declare function simulatedSchedule(today?: string, nights?: number): CheckoutSchedule;
3012
3110
 
3111
+ /** One way into a session: a band by the name a party is counted under, and its unit price. */
3112
+ export declare type SlotBand = {
3113
+ readonly name: string;
3114
+ readonly minorUnits: number;
3115
+ };
3116
+
3117
+ /**
3118
+ * WHAT A SESSION COSTS.
3119
+ *
3120
+ * `minorUnits` IS THE FLOOR — the cheapest single admission, which is what a row can say
3121
+ * before anybody has said who is coming.
3122
+ *
3123
+ * `options` IS HOW IT BECOMES A TOTAL. One list of bands per product that sells the session,
3124
+ * because the price of a party is not a property of the session alone: two Adults and a
3125
+ * Child is a different number from three Adults, and the difference is only knowable once
3126
+ * the party is. `priceComposition` spends this; nothing else needs to.
3127
+ *
3128
+ * ONE LIST PER PRODUCT AND NOT ONE MERGED LIST, because a composition has to be priced
3129
+ * against a product that can serve ALL of it. Merging two tickets' bands would let a total
3130
+ * be built out of an Adult from one and a Child from the other, at a price no single cart
3131
+ * line could be filled at.
3132
+ */
3133
+ export declare type SlotPrice = {
3134
+ readonly minorUnits: number;
3135
+ readonly currency: string;
3136
+ readonly options?: readonly (readonly SlotBand[])[];
3137
+ };
3138
+
3013
3139
  /** The key the single line counts under when the event names no types. */
3014
3140
  export declare const SOLO_KEY = "default";
3015
3141
 
@@ -3056,10 +3182,7 @@ export declare const STEP_CARD_COPY: Record<PurchaseStepId, {
3056
3182
  */
3057
3183
  export declare const STEP_DISMISS: Partial<Record<PurchaseStepId, 'back' | 'close'>>;
3058
3184
 
3059
- declare type StepBadge = {
3060
- readonly shape: 'square' | 'circle';
3061
- readonly content: ReactNode;
3062
- };
3185
+ declare type StepBadge = GlyphBadge;
3063
3186
 
3064
3187
  /**
3065
3188
  * STui's `Switch` (`11376:2089`) — an on/off control, for a host composing its own rows.
@@ -3227,6 +3350,11 @@ declare interface Ticket {
3227
3350
  * response spanning a whole series is split back into days.
3228
3351
  */
3229
3352
  EventKeys?: string[] | null;
3353
+ /**
3354
+ * The inventories this product is sold from — the event's own `(Main)` one and any named
3355
+ * ones that silo an allocation across events. Sent by `TicketInformation`.
3356
+ */
3357
+ InventoryKeys?: string[] | null;
3230
3358
  }
3231
3359
 
3232
3360
  /**
@@ -3493,46 +3621,6 @@ export declare type TicketEdgeTokens = {
3493
3621
  readonly gap: number;
3494
3622
  };
3495
3623
 
3496
- /**
3497
- * MY BOOKING — what a buyer owns once the money has moved, as the cards draw it.
3498
- *
3499
- * ── THE TWO HALVES, AND WHY THEY COME FROM DIFFERENT PLACES ──────────────────
3500
- *
3501
- * A booking is an OCCASION and a set of TICKETS, and the platform answers for only one of
3502
- * them. `GET /api/Transactions/ByKey/{cartKey}` returns the attendee tickets — a key each,
3503
- * and the person each is for — and says nothing about what was bought into: no event name,
3504
- * no artwork, no day, no session. It carries a numeric `EventID`, which no endpoint here
3505
- * takes.
3506
- *
3507
- * So the occasion is the CALLER'S, exactly as `cartLines` is: the flow has just walked a
3508
- * buyer through choosing it and holds every field, and a host mounting this on its own page
3509
- * holds them too or it would not have had anything to sell. Inventing a lookup that cannot
3510
- * be made is the alternative, and it ends in a card that says "Ice Skating" for one mount
3511
- * and nothing for the other.
3512
- *
3513
- * ── WHICH IS WHY THERE ARE TWO TYPES AND NOT ONE ─────────────────────────────
3514
- *
3515
- * `BookingRecord` is what the platform holds. `Booking` is that record with the caller's
3516
- * facts folded in, and `dressBooking` is the fold. Keeping them apart is not tidiness: the
3517
- * occasion and the attribution are written inline by most callers and are therefore new
3518
- * objects on every render, so a read that took them would refetch the whole booking every
3519
- * time anything above it moved. Folded at render, the request depends on the cart key and
3520
- * nothing else.
3521
- *
3522
- * ── WHAT A TICKET IS, AND WHAT IT IS NOT ─────────────────────────────────────
3523
- *
3524
- * `Items[].Key` IS the `AttendeeTicketKey` — what a QR code is drawn FROM, and the only
3525
- * identity a ticket has on screen. `Attendee.ID` is separate and is what `PUT /Attendees`
3526
- * names when a holder is edited; the two are not interchangeable and both are kept.
3527
- *
3528
- * `Items[].Type` IS DELIBERATELY NOT READ. A booking must list tickets and not booking fees,
3529
- * and the tempting way to say so is to narrow that free text to a closed union. The honest
3530
- * rule is the one the cards actually need: an item is a ticket when it has a key a code can
3531
- * be drawn from AND an attendee it belongs to. A fee has neither. Narrowing `Type` would
3532
- * mean a closed union over spellings nobody here has seen, and the first unrecognised one
3533
- * would empty a buyer's booking rather than draw an extra row.
3534
- */
3535
-
3536
3624
  /** Who a ticket is for. */
3537
3625
  export declare type Ticketholder = {
3538
3626
  readonly firstName: string;
@@ -3717,11 +3805,6 @@ export declare type TimeSelection = {
3717
3805
  readonly startTime: string | null;
3718
3806
  };
3719
3807
 
3720
- /**
3721
- * The times within one day that a ticket is sold for — the timeslot picker's whole
3722
- * domain.
3723
- */
3724
-
3725
3808
  /** One slot a ticket is sold for. */
3726
3809
  export declare type Timeslot = {
3727
3810
  /**
@@ -3736,8 +3819,35 @@ export declare type Timeslot = {
3736
3819
  * reports it. Null where the slot does not say.
3737
3820
  */
3738
3821
  readonly remaining: number | null;
3822
+ /**
3823
+ * THE CHEAPEST WAY INTO THIS SESSION, where the host knows one. Absent draws no price,
3824
+ * which is the default and what every existing caller gets.
3825
+ *
3826
+ * COMPUTED, NEVER READ. A slot carries no money on the wire — `EventTimeslot` is two
3827
+ * times, a total and a remaining — so a price is reached through the TICKET that owns
3828
+ * the slot, and the discount bands hang off that ticket too. `slot-price.ts` is the
3829
+ * package's answer to all of that, and `runView` spends it for the schedule the widget
3830
+ * builds itself; a host composing its own rows reaches the same functions.
3831
+ *
3832
+ * SO THIS IS A FIGURE AND NOT A RULE. The picker writes the word in front of it and
3833
+ * formats the money — that is copy and presentation, which stay here — and takes no view
3834
+ * on how the number was arrived at.
3835
+ */
3836
+ readonly fromPrice?: SlotPrice | null;
3739
3837
  };
3740
3838
 
3839
+ /**
3840
+ * The session an item is bought for. BOTH ENDS ARE TIMES OF DAY — `18:00:00`, which is
3841
+ * what the platform deserialises them into (`System.TimeSpan`) and the shape a ticket's
3842
+ * own `Timeslots` come back in. A full local timestamp is refused: `The JSON value could
3843
+ * not be converted to System.TimeSpan`. The date is not missing from this — it is the
3844
+ * event the cart was opened on.
3845
+ */
3846
+ declare interface TimeslotRequest {
3847
+ LocalStartTime: string;
3848
+ LocalEndTime: string;
3849
+ }
3850
+
3741
3851
  /**
3742
3852
  * The selection after a day is pressed: the day, or NOTHING if it was already the
3743
3853
  * chosen one.