@scopetickets/checkout 0.1.3 → 0.2.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
  /**
@@ -754,25 +755,6 @@ declare interface CartItem {
754
755
  DiscountAmount: number;
755
756
  }
756
757
 
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
758
  /** One line of the cart. Everything a row draws, and nothing about how. */
777
759
  export declare type CartLine = {
778
760
  /** Stable across a re-price, so React keeps the row rather than replacing it. */
@@ -1233,7 +1215,13 @@ export declare type CheckoutSchedule = {
1233
1215
  *
1234
1216
  * ONE CALL ANSWERS BOTH. `getSeriesInfo` returns the run's events AND its user types, so
1235
1217
  * 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.
1218
+ * are fetched together rather than by two hooks that would each have to know the key.
1219
+ *
1220
+ * ── WHAT IS LEFT HERE ────────────────────────────────────────────────────────
1221
+ *
1222
+ * React, and the client. Which day is worth asking for, which answers still belong to the
1223
+ * question that was put, and what stays drawn while the next day arrives are all
1224
+ * `machine/run-data.ts`; what a run IS once it arrives is `domain/run-info.ts`.
1237
1225
  *
1238
1226
  * ── WHY A HOOK AND NOT A PROVIDER ────────────────────────────────────────────
1239
1227
  *
@@ -1399,7 +1387,6 @@ export declare type DayPickerProps = {
1399
1387
  readonly onVisibleMonthChange?: (month: CalendarMonthKey) => void;
1400
1388
  };
1401
1389
 
1402
- /** The stock set as the picker and the hero both need it, for the configured platform. */
1403
1390
  export declare function defaultProfilePhotos(environment?: Environment, size?: ProfilePhotoSize): ProfilePhoto[];
1404
1391
 
1405
1392
  /** The record with the caller's own facts folded in — see the top of this file. */
@@ -1495,27 +1482,36 @@ export declare type FollowListProps = {
1495
1482
  readonly onToggle: (key: string) => void;
1496
1483
  };
1497
1484
 
1485
+ /** Money, and how it is written. */
1486
+ /** `1234, 'EUR'` → `"€12.34"`. `1200, 'JPY'` → `"¥1,200"`. */
1487
+ export declare function formatMoney(minorUnits: number, currency: string): string;
1488
+
1498
1489
  /**
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.
1490
+ * THE CHEAPEST WAY INTO THESE TICKETS, across every band each of them offers.
1506
1491
  *
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.
1492
+ * A TICKET THAT NAMES NO BANDS IS SOLD AT ITS OWN PRICE — the platform's "everyone else",
1493
+ * and the case `PartyStepper` draws its single unnamed line for. Where bands ARE named they
1494
+ * are the only ways to buy, so the ticket's undiscounted price is a candidate only if a band
1495
+ * states it; an `Adult` at `DiscountNominal: 0` does.
1511
1496
  *
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.
1497
+ * `null` RATHER THAN A NUMBER in three cases, each of which would otherwise put a wrong
1498
+ * figure on a card: no currency to state it in, nothing payable here, or a band whose rate
1499
+ * cannot be read. The last refuses the whole line rather than skipping that band — a skipped
1500
+ * band that happened to be the cheapest leaves a "From" ABOVE the real floor, which is the
1501
+ * one thing a From must never be.
1518
1502
  */
1503
+ export declare function fromPrice(tickets: readonly PricedTicket[], currency: string | null | undefined): SlotPrice | null;
1504
+
1505
+ /** A badge over the hero. */
1506
+ declare type GlyphBadge = {
1507
+ readonly shape: 'square' | 'circle';
1508
+ readonly glyph: GlyphId;
1509
+ readonly spin?: true;
1510
+ readonly id?: string;
1511
+ };
1512
+
1513
+ /** A glyph from the icon set, by name; each renderer decides how to draw it. */
1514
+ declare type GlyphId = 'ASTERISK' | 'BELL' | 'CALLOUT_WITH_HEART' | 'CAMERA' | 'CLOUD_WITH_ARROW_UP_IN' | 'EYE_TO_CENTER' | 'EYE_TO_CENTER_WITH_STRIKETHROUGH' | 'KEYHOLE_IN_SQUARE' | 'PAPER_PLANE_TO_TOP_LEFT' | 'PASSKEY' | 'PAYMENT_CARD' | 'PERCENT_IN_STICKER' | 'PHONE_TO_RIGHT' | 'PLUS_IN_CIRCLE' | 'TEXT_CURSOR_WITH_RECTANGLE' | 'TEXT_CURSOR_WITH_REDACTED_TEXT';
1519
1515
 
1520
1516
  /**
1521
1517
  * THE DISTINCT TYPES, in the order the platform first names each — the organiser's own,
@@ -1601,6 +1597,14 @@ export declare type HolderSave = {
1601
1597
  */
1602
1598
  export declare function holdExpired(hold: EscrowHold): boolean;
1603
1599
 
1600
+ declare type Inline = {
1601
+ readonly kind: 'TEXT';
1602
+ readonly text: string;
1603
+ } | {
1604
+ readonly kind: 'MARK';
1605
+ readonly mark: BrandMarkId;
1606
+ };
1607
+
1604
1608
  /** What the platform needs about the person paying. */
1605
1609
  export declare type IntentBuyer = {
1606
1610
  readonly firstName?: string;
@@ -2130,6 +2134,12 @@ export declare type NoticeId =
2130
2134
  | 'ORDER_SOLD_OUT'
2131
2135
  /** The order could not be opened at all: no cart, and nothing to check out. */
2132
2136
  | 'ORDER_NOT_OPENED'
2137
+ /**
2138
+ * THE RUN OR THE DAY COULD NOT BE READ. One id for both, because they read the same to a
2139
+ * buyer — the thing they came to buy is not on screen — and the difference between them
2140
+ * is a fact about which call to make again, which the retry already knows.
2141
+ */
2142
+ | 'EVENT_NOT_LOADED'
2133
2143
  /** The event's questionnaire could not be read. */
2134
2144
  | 'QUESTIONS_NOT_LOADED'
2135
2145
  /** The platform refused the answers. Only raised before a charge. */
@@ -2187,25 +2197,6 @@ export declare type NoticeId =
2187
2197
  */
2188
2198
  export declare const NOTICES: Readonly<Record<Exclude<NoticeId, 'ORDER_PART_FILLED'>, Notice>>;
2189
2199
 
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
2200
  /**
2210
2201
  * WARNING: the system worked and something needs adjusting, so there is a way forward.
2211
2202
  * FAILURE: something broke — leave, or try again where there is anything to try.
@@ -2299,19 +2290,6 @@ export declare type OrderIntent = {
2299
2290
  readonly paymentMethodKey?: string;
2300
2291
  };
2301
2292
 
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
2293
  /**
2316
2294
  * WHAT IS BEING BOUGHT INTO, as one value rather than two nullable keys.
2317
2295
  *
@@ -2377,20 +2355,12 @@ export declare type PartyStepperProps = {
2377
2355
  readonly refused?: number | null;
2378
2356
  };
2379
2357
 
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
2358
  /** A user type the event offers, as the row needs it. */
2389
2359
  export declare type PartyUserTypeOption = {
2390
2360
  /**
2391
2361
  * 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.
2362
+ * assignment key belongs to a product no one has chosen yet — see this module's header.
2363
+ * A host supplying its own may key them however it likes.
2394
2364
  */
2395
2365
  readonly key: string;
2396
2366
  /** Always present: an event with no discount types still offers a default. */
@@ -2631,6 +2601,60 @@ declare type PressPhase = 'held';
2631
2601
  /** WHAT the press compresses, which is decided by what the control DOES. */
2632
2602
  export declare type PressScope = 'island' | 'element';
2633
2603
 
2604
+ /**
2605
+ * THE SESSION PRICED FOR A PARTY — what this buyer will (likely) be charged for it.
2606
+ *
2607
+ * THE SUM AND NOT THE FLOOR, which is the whole point. A row showing the cheapest single
2608
+ * admission while the buyer holds two Adults and a Child is quoting a ticket they are not
2609
+ * buying: two of the three heads cost more than the figure on screen, and the number only
2610
+ * becomes true again if the party is one Child.
2611
+ *
2612
+ * AN EMPTY PARTY KEEPS THE FLOOR. Before anybody has said who is coming there is no total
2613
+ * to state, and the cheapest way in is the honest thing to show — which is also what the
2614
+ * row said before this existed.
2615
+ *
2616
+ * MINIMISED ACROSS PRODUCTS, each priced whole. A product that cannot serve every band in
2617
+ * the composition is not a cheaper way to buy it, it is a different order — see `options`.
2618
+ *
2619
+ * `null` WHERE NO PRODUCT CAN SERVE THE PARTY, rather than a total built by leaving
2620
+ * somebody out. A figure that silently drops a head is worse than no figure: it is a
2621
+ * smaller number, so it reads as a better price rather than as a missing one.
2622
+ *
2623
+ * STILL A LIKELIHOOD AND NOT A PROMISE. The cart is what charges, and promotions, fees the
2624
+ * wire does not break out and the two unsettled rules in `bandPrice` all sit between this
2625
+ * and the amount taken. It is the best statement available before a cart exists.
2626
+ */
2627
+ export declare function priceComposition(price: SlotPrice | null | undefined, composition: Readonly<Record<string, number>>): SlotPrice | null;
2628
+
2629
+ /**
2630
+ * WHAT A SESSION COSTS AT ITS CHEAPEST — the "From" a timeslot row draws.
2631
+ *
2632
+ * NOTHING ON THE WIRE STATES THIS, which is the whole reason it is computed. `EventTimeslot`
2633
+ * is two times, a total and a remaining — no money at all — so a session's price is reached
2634
+ * through the TICKET that sells it, and the discount bands hang off that ticket too. No
2635
+ * endpoint states what a band costs.
2636
+ *
2637
+ * A DAY'S SESSIONS ARE NOT ONE PRICE. Measured on sandbox 2026-09-16, TwinkleTown's rink:
2638
+ * the day's slots are split across two products, disjointly — Off-Peak holds 11:00, 13:00
2639
+ * and 14:00 and Peak holds 15:00 to 20:00. Nine sessions, two prices, no overlap. So this
2640
+ * takes a SESSION and not a day: a figure computed per day would be wrong for two thirds of
2641
+ * that column.
2642
+ *
2643
+ * `SalePrice` IS THE BASIS, and it is already this package's: `ticketChoice` sorts on it to
2644
+ * mean "cheapest first". It is the all-in, `BasePrice + Fees`, which is the right number to
2645
+ * show first because it is the one that must not grow at the checkout.
2646
+ */
2647
+ /**
2648
+ * THE FIELDS A PRICE IS READ OFF, and no more — the SDK's own `Ticket` satisfies it.
2649
+ *
2650
+ * STRUCTURAL RATHER THAN THE WHOLE TICKET, because a host composing its own session rows
2651
+ * rarely holds one: it has whatever its own fetch returned, and demanding twenty-three
2652
+ * fields to read three of them is how a published function goes unused.
2653
+ */
2654
+ export declare type PricedTicket = Pick<Ticket, 'SalePrice' | 'PaymentsEnabled'> & {
2655
+ readonly UserTypes: readonly Pick<UserType, 'Name' | 'DiscountNominal' | 'DiscountRate'>[] | null;
2656
+ };
2657
+
2634
2658
  /**
2635
2659
  * THE PHOTO GRID'S OWN WORDS — the group, its cells and the two refusals.
2636
2660
  *
@@ -2649,15 +2673,6 @@ export declare const PROFILE_PHOTO_COPY: {
2649
2673
  };
2650
2674
  };
2651
2675
 
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
2676
  /**
2662
2677
  * ONE OF THE STOCK FACES A NEW ACCOUNT CAN BE GIVEN — the platform's, exactly as the
2663
2678
  * calendar's days are: the widget owns the grid's layout and none of its faces.
@@ -2718,11 +2733,6 @@ export declare type ProfilePhotoPickerProps = {
2718
2733
  */
2719
2734
  export declare type ProfilePhotoSize = 256 | 1024;
2720
2735
 
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
2736
  /** In the flow's own order, so the union reads as the sequence it names. */
2727
2737
  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
2738
 
@@ -2892,7 +2902,7 @@ checking: boolean): {
2892
2902
  actions: ({
2893
2903
  key: string;
2894
2904
  role: "primary";
2895
- label: "Check Out" | "Checking…";
2905
+ label: "Checking…" | "Check Out";
2896
2906
  disabled: boolean;
2897
2907
  onPress: () => void;
2898
2908
  } | {
@@ -2904,6 +2914,9 @@ checking: boolean): {
2904
2914
  })[];
2905
2915
  };
2906
2916
 
2917
+ /** Copy that is words, or words beside a brand mark. */
2918
+ declare type RichText = string | readonly Inline[];
2919
+
2907
2920
  /**
2908
2921
  * WHICH WAY ROUND AN ARC GROWS FROM 12 O'CLOCK.
2909
2922
  *
@@ -2951,10 +2964,19 @@ origin?: string): string | undefined;
2951
2964
  */
2952
2965
  export declare function ScopeTicketsCheckout({ intent, opensOn, session: seed, ...props }: CheckoutProps): react_jsx_runtime.JSX.Element;
2953
2966
 
2967
+ /**
2968
+ * THE FROM FOR ONE SESSION — the cheapest band of whichever products sell that session.
2969
+ *
2970
+ * `sellsSession` IS THE PACKAGE'S OWN MATCHER, the same one `productForSession` spends to
2971
+ * decide what the cart is filled with. A second way of asking which product holds a slot is
2972
+ * how a row comes to advertise a price the cart then does not charge.
2973
+ */
2974
+ export declare function sessionFromPrice(tickets: readonly Ticket[], session: TimeslotRequest, currency: string | null | undefined): SlotPrice | null;
2975
+
2954
2976
  /** THE SIGN-IN FUNNEL'S CREDENTIAL CARD — the design. */
2955
2977
  export declare const SIGN_IN_FUNNEL_CARD: {
2956
2978
  readonly copy: {
2957
- readonly title: react_jsx_runtime.JSX.Element;
2979
+ readonly title: RichText;
2958
2980
  readonly subtitle: "Sign in below.";
2959
2981
  };
2960
2982
  /** the design primary, the design secondary. */
@@ -3010,6 +3032,34 @@ export declare const SIMULATED_SESSIONS: {
3010
3032
 
3011
3033
  export declare function simulatedSchedule(today?: string, nights?: number): CheckoutSchedule;
3012
3034
 
3035
+ /** One way into a session: a band by the name a party is counted under, and its unit price. */
3036
+ export declare type SlotBand = {
3037
+ readonly name: string;
3038
+ readonly minorUnits: number;
3039
+ };
3040
+
3041
+ /**
3042
+ * WHAT A SESSION COSTS.
3043
+ *
3044
+ * `minorUnits` IS THE FLOOR — the cheapest single admission, which is what a row can say
3045
+ * before anybody has said who is coming.
3046
+ *
3047
+ * `options` IS HOW IT BECOMES A TOTAL. One list of bands per product that sells the session,
3048
+ * because the price of a party is not a property of the session alone: two Adults and a
3049
+ * Child is a different number from three Adults, and the difference is only knowable once
3050
+ * the party is. `priceComposition` spends this; nothing else needs to.
3051
+ *
3052
+ * ONE LIST PER PRODUCT AND NOT ONE MERGED LIST, because a composition has to be priced
3053
+ * against a product that can serve ALL of it. Merging two tickets' bands would let a total
3054
+ * be built out of an Adult from one and a Child from the other, at a price no single cart
3055
+ * line could be filled at.
3056
+ */
3057
+ export declare type SlotPrice = {
3058
+ readonly minorUnits: number;
3059
+ readonly currency: string;
3060
+ readonly options?: readonly (readonly SlotBand[])[];
3061
+ };
3062
+
3013
3063
  /** The key the single line counts under when the event names no types. */
3014
3064
  export declare const SOLO_KEY = "default";
3015
3065
 
@@ -3056,10 +3106,7 @@ export declare const STEP_CARD_COPY: Record<PurchaseStepId, {
3056
3106
  */
3057
3107
  export declare const STEP_DISMISS: Partial<Record<PurchaseStepId, 'back' | 'close'>>;
3058
3108
 
3059
- declare type StepBadge = {
3060
- readonly shape: 'square' | 'circle';
3061
- readonly content: ReactNode;
3062
- };
3109
+ declare type StepBadge = GlyphBadge;
3063
3110
 
3064
3111
  /**
3065
3112
  * STui's `Switch` (`11376:2089`) — an on/off control, for a host composing its own rows.
@@ -3493,46 +3540,6 @@ export declare type TicketEdgeTokens = {
3493
3540
  readonly gap: number;
3494
3541
  };
3495
3542
 
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
3543
  /** Who a ticket is for. */
3537
3544
  export declare type Ticketholder = {
3538
3545
  readonly firstName: string;
@@ -3717,11 +3724,6 @@ export declare type TimeSelection = {
3717
3724
  readonly startTime: string | null;
3718
3725
  };
3719
3726
 
3720
- /**
3721
- * The times within one day that a ticket is sold for — the timeslot picker's whole
3722
- * domain.
3723
- */
3724
-
3725
3727
  /** One slot a ticket is sold for. */
3726
3728
  export declare type Timeslot = {
3727
3729
  /**
@@ -3736,8 +3738,35 @@ export declare type Timeslot = {
3736
3738
  * reports it. Null where the slot does not say.
3737
3739
  */
3738
3740
  readonly remaining: number | null;
3741
+ /**
3742
+ * THE CHEAPEST WAY INTO THIS SESSION, where the host knows one. Absent draws no price,
3743
+ * which is the default and what every existing caller gets.
3744
+ *
3745
+ * COMPUTED, NEVER READ. A slot carries no money on the wire — `EventTimeslot` is two
3746
+ * times, a total and a remaining — so a price is reached through the TICKET that owns
3747
+ * the slot, and the discount bands hang off that ticket too. `slot-price.ts` is the
3748
+ * package's answer to all of that, and `runView` spends it for the schedule the widget
3749
+ * builds itself; a host composing its own rows reaches the same functions.
3750
+ *
3751
+ * SO THIS IS A FIGURE AND NOT A RULE. The picker writes the word in front of it and
3752
+ * formats the money — that is copy and presentation, which stay here — and takes no view
3753
+ * on how the number was arrived at.
3754
+ */
3755
+ readonly fromPrice?: SlotPrice | null;
3739
3756
  };
3740
3757
 
3758
+ /**
3759
+ * The session an item is bought for. BOTH ENDS ARE TIMES OF DAY — `18:00:00`, which is
3760
+ * what the platform deserialises them into (`System.TimeSpan`) and the shape a ticket's
3761
+ * own `Timeslots` come back in. A full local timestamp is refused: `The JSON value could
3762
+ * not be converted to System.TimeSpan`. The date is not missing from this — it is the
3763
+ * event the cart was opened on.
3764
+ */
3765
+ declare interface TimeslotRequest {
3766
+ LocalStartTime: string;
3767
+ LocalEndTime: string;
3768
+ }
3769
+
3741
3770
  /**
3742
3771
  * The selection after a day is pressed: the day, or NOTHING if it was already the
3743
3772
  * chosen one.