@scopetickets/checkout 0.1.2 → 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.
1490
+ * THE CHEAPEST WAY INTO THESE TICKETS, across every band each of them offers.
1500
1491
  *
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.
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.
1506
1496
  *
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.
1511
- *
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;
@@ -2131,6 +2135,16 @@ export declare type NoticeId =
2131
2135
  /** The order could not be opened at all: no cart, and nothing to check out. */
2132
2136
  | 'ORDER_NOT_OPENED'
2133
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'
2143
+ /** The event's questionnaire could not be read. */
2144
+ | 'QUESTIONS_NOT_LOADED'
2145
+ /** The platform refused the answers. Only raised before a charge. */
2146
+ | 'ANSWERS_NOT_SAVED'
2147
+ /**
2134
2148
  * The verification code could not be SENT. Distinct from a code that was refused, which
2135
2149
  * is the buyer mistyping and is answered by the boxes themselves — validation, not a
2136
2150
  * failure of ours.
@@ -2183,25 +2197,6 @@ export declare type NoticeId =
2183
2197
  */
2184
2198
  export declare const NOTICES: Readonly<Record<Exclude<NoticeId, 'ORDER_PART_FILLED'>, Notice>>;
2185
2199
 
2186
- /**
2187
- * WHAT A BUYER IS TOLD WHEN THE ORDER DID NOT DO WHAT THEY ASKED.
2188
- *
2189
- * ONE CARD DRAWN FROM DATA — never a screen per failure, and never failure UI inside a
2190
- * step. Adding a case is an entry here and a raise from the site that knows: see
2191
- * `raiseFor` and the two effects in `ScopeTicketsCheckout` that call it.
2192
- *
2193
- * ONE VOCABULARY IN TWO PACKAGES, and that is a debt rather than a design. `@scopetickets
2194
- * /sdk` has said all of this since before the island existed — the same two severities,
2195
- * the same action ids, the same reporting rule — and `packages/checkout` cannot reach it:
2196
- * neither package depends on the other, and the island exists to be the lean one. So the
2197
- * vocabulary is copied, and the WORDING is too wherever the SDK has already said the same
2198
- * thing to a buyer — copy that has been read beats copy invented twice. When the notices
2199
- * module moves somewhere both can use, this file is what it replaces; the names are
2200
- * deliberately identical so that merge is a deletion.
2201
- *
2202
- * Pure: no React, no network, no DOM.
2203
- */
2204
-
2205
2200
  /**
2206
2201
  * WARNING: the system worked and something needs adjusting, so there is a way forward.
2207
2202
  * FAILURE: something broke — leave, or try again where there is anything to try.
@@ -2281,39 +2276,20 @@ export declare type OrderIntent = {
2281
2276
  readonly timeslot?: string;
2282
2277
  readonly buyer?: IntentBuyer;
2283
2278
  /**
2284
- * WHETHER THE EVENT ASKS ITS OWN QUESTIONS, and the one field where absent does NOT
2285
- * mean "you ask".
2286
- *
2287
- * Every other field here is optional because the widget can collect it: there is a
2288
- * party stepper, a calendar, a name field. There is no such control for these. The
2289
- * questions are the EVENT's, they vary in number and height, and they come from an
2290
- * endpoint that takes an id the widget has no cart to read — see `DETAILS`'s blurb.
2291
- * So "absent" cannot mean "ask them", because there is nothing to ask with; it means
2292
- * the event asks nothing, which is the common case and the safe one.
2293
- *
2294
- * Saying `true` puts the More Information card in the flow as a GATE — it says
2295
- * questions are waiting, and does not draw them.
2279
+ * Whether the event asks questions. Absent, the platform decides from the ticket, event and
2280
+ * series questions; `true` keeps the details step in place before they are known.
2296
2281
  */
2297
2282
  readonly asksQuestions?: boolean;
2298
- /** Questionnaire answers already collected, by question id. */
2283
+ /**
2284
+ * Answers the host already has, keyed by question id. They skip the details step only when
2285
+ * they answer every question, and are sent to every cart item before payment. Invalid
2286
+ * entries are ignored.
2287
+ */
2299
2288
  readonly answers?: Readonly<Record<string, string>>;
2300
2289
  /** A method the host has already had chosen. */
2301
2290
  readonly paymentMethodKey?: string;
2302
2291
  };
2303
2292
 
2304
- /**
2305
- * WHAT A HOST HANDS THE WIDGET, complete or partial.
2306
- *
2307
- * A host calls the widget to do the parts it will not or cannot do itself. So it says
2308
- * what it already knows and leaves the rest absent, and the widget collects whatever is
2309
- * missing. Every field but the subject is optional for exactly that reason: absent means
2310
- * "you ask", not "there is none".
2311
- *
2312
- * PARTIAL IS THE NORMAL CASE. A host with its own calendar fills the day and leaves the
2313
- * buyer empty; a host with nothing but a series key fills only the subject. Both are
2314
- * valid, and the difference between them is which steps the widget mounts.
2315
- */
2316
-
2317
2293
  /**
2318
2294
  * WHAT IS BEING BOUGHT INTO, as one value rather than two nullable keys.
2319
2295
  *
@@ -2379,20 +2355,12 @@ export declare type PartyStepperProps = {
2379
2355
  readonly refused?: number | null;
2380
2356
  };
2381
2357
 
2382
- /**
2383
- * THE PARTY STEP — one stepper per user type, or a single line when the event offers
2384
- * none.
2385
- *
2386
- * Controlled: the caller holds the counts, because the composition belongs to the order
2387
- * rather than to the control that edits it. `max` is the ticket's ceiling and is the
2388
- * caller's too — a row has no opinion about how many people a party may hold.
2389
- */
2390
2358
  /** A user type the event offers, as the row needs it. */
2391
2359
  export declare type PartyUserTypeOption = {
2392
2360
  /**
2393
2361
  * WHAT THE COMPOSITION COUNTS UNDER. The platform's types are keyed by NAME, because an
2394
- * assignment key belongs to a product no one has chosen yet — see `user-types`. A host
2395
- * 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.
2396
2364
  */
2397
2365
  readonly key: string;
2398
2366
  /** Always present: an event with no discount types still offers a default. */
@@ -2633,6 +2601,60 @@ declare type PressPhase = 'held';
2633
2601
  /** WHAT the press compresses, which is decided by what the control DOES. */
2634
2602
  export declare type PressScope = 'island' | 'element';
2635
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
+
2636
2658
  /**
2637
2659
  * THE PHOTO GRID'S OWN WORDS — the group, its cells and the two refusals.
2638
2660
  *
@@ -2651,15 +2673,6 @@ export declare const PROFILE_PHOTO_COPY: {
2651
2673
  };
2652
2674
  };
2653
2675
 
2654
- /**
2655
- * WHAT MAY BECOME SOMEBODY'S FACE — the one rule the photo step enforces on a file it did
2656
- * not choose.
2657
- *
2658
- * `accept="image/*"` decides what the picker OFFERS and guarantees nothing: a browser
2659
- * hands back whatever was dragged onto it. So a chosen file is external input, and the two
2660
- * things knowable before anything is drawn are checked here, apart from the DOM.
2661
- */
2662
-
2663
2676
  /**
2664
2677
  * ONE OF THE STOCK FACES A NEW ACCOUNT CAN BE GIVEN — the platform's, exactly as the
2665
2678
  * calendar's days are: the widget owns the grid's layout and none of its faces.
@@ -2720,11 +2733,6 @@ export declare type ProfilePhotoPickerProps = {
2720
2733
  */
2721
2734
  export declare type ProfilePhotoSize = 256 | 1024;
2722
2735
 
2723
- /**
2724
- * The steps of a purchase, in the buyer's order, and what the resting pill's action
2725
- * says at each.
2726
- */
2727
-
2728
2736
  /** In the flow's own order, so the union reads as the sequence it names. */
2729
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';
2730
2738
 
@@ -2894,7 +2902,7 @@ checking: boolean): {
2894
2902
  actions: ({
2895
2903
  key: string;
2896
2904
  role: "primary";
2897
- label: "Check Out" | "Checking…";
2905
+ label: "Checking…" | "Check Out";
2898
2906
  disabled: boolean;
2899
2907
  onPress: () => void;
2900
2908
  } | {
@@ -2906,6 +2914,9 @@ checking: boolean): {
2906
2914
  })[];
2907
2915
  };
2908
2916
 
2917
+ /** Copy that is words, or words beside a brand mark. */
2918
+ declare type RichText = string | readonly Inline[];
2919
+
2909
2920
  /**
2910
2921
  * WHICH WAY ROUND AN ARC GROWS FROM 12 O'CLOCK.
2911
2922
  *
@@ -2953,10 +2964,19 @@ origin?: string): string | undefined;
2953
2964
  */
2954
2965
  export declare function ScopeTicketsCheckout({ intent, opensOn, session: seed, ...props }: CheckoutProps): react_jsx_runtime.JSX.Element;
2955
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
+
2956
2976
  /** THE SIGN-IN FUNNEL'S CREDENTIAL CARD — the design. */
2957
2977
  export declare const SIGN_IN_FUNNEL_CARD: {
2958
2978
  readonly copy: {
2959
- readonly title: react_jsx_runtime.JSX.Element;
2979
+ readonly title: RichText;
2960
2980
  readonly subtitle: "Sign in below.";
2961
2981
  };
2962
2982
  /** the design primary, the design secondary. */
@@ -3012,6 +3032,34 @@ export declare const SIMULATED_SESSIONS: {
3012
3032
 
3013
3033
  export declare function simulatedSchedule(today?: string, nights?: number): CheckoutSchedule;
3014
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
+
3015
3063
  /** The key the single line counts under when the event names no types. */
3016
3064
  export declare const SOLO_KEY = "default";
3017
3065
 
@@ -3058,10 +3106,7 @@ export declare const STEP_CARD_COPY: Record<PurchaseStepId, {
3058
3106
  */
3059
3107
  export declare const STEP_DISMISS: Partial<Record<PurchaseStepId, 'back' | 'close'>>;
3060
3108
 
3061
- declare type StepBadge = {
3062
- readonly shape: 'square' | 'circle';
3063
- readonly content: ReactNode;
3064
- };
3109
+ declare type StepBadge = GlyphBadge;
3065
3110
 
3066
3111
  /**
3067
3112
  * STui's `Switch` (`11376:2089`) — an on/off control, for a host composing its own rows.
@@ -3097,7 +3142,7 @@ export declare type SwitchProps = {
3097
3142
  export declare type SwitchSize = 'wide' | 'thin';
3098
3143
 
3099
3144
  /** Figma's `InputTextShort`, ported from. */
3100
- export declare function TextField({ label, value, onChange, flag, flagTitle, trailing, icon, note, type, inputMode, prose, autoComplete, autoCapitalize, passwordRules, enterKeyHint, onSubmit, monospace, placeholder, maxLength, autoFocus, id, name, }: TextFieldProps): react_jsx_runtime.JSX.Element;
3145
+ export declare function TextField({ label, value, onChange, flag, flagTitle, trailing, icon, note, type, inputMode, prose, autoComplete, autoCapitalize, passwordRules, enterKeyHint, onSubmit, monospace, placeholder, maxLength, autoFocus, readOnly, id, name, }: TextFieldProps): react_jsx_runtime.JSX.Element;
3101
3146
 
3102
3147
  export declare type TextFieldProps = {
3103
3148
  /** The field's name, and its only label — there is no placeholder. */
@@ -3185,6 +3230,7 @@ export declare type TextFieldProps = {
3185
3230
  * not told by a notice two presses later. Omitted where the wire sets no limit.
3186
3231
  */
3187
3232
  readonly maxLength?: number;
3233
+ readonly readOnly?: boolean;
3188
3234
  /** Given so a preceding field's return key can move focus here. */
3189
3235
  readonly id?: string;
3190
3236
  readonly name?: string;
@@ -3223,6 +3269,11 @@ declare interface Ticket {
3223
3269
  UrgencyTags: string[];
3224
3270
  /** Nullable for the same reason as the run's — see `EventInfoResponse`. */
3225
3271
  UserTypes: UserType[] | null;
3272
+ /**
3273
+ * The events this product sells for. Only `TicketInformation` sends it, which is how a
3274
+ * response spanning a whole series is split back into days.
3275
+ */
3276
+ EventKeys?: string[] | null;
3226
3277
  }
3227
3278
 
3228
3279
  /**
@@ -3489,46 +3540,6 @@ export declare type TicketEdgeTokens = {
3489
3540
  readonly gap: number;
3490
3541
  };
3491
3542
 
3492
- /**
3493
- * MY BOOKING — what a buyer owns once the money has moved, as the cards draw it.
3494
- *
3495
- * ── THE TWO HALVES, AND WHY THEY COME FROM DIFFERENT PLACES ──────────────────
3496
- *
3497
- * A booking is an OCCASION and a set of TICKETS, and the platform answers for only one of
3498
- * them. `GET /api/Transactions/ByKey/{cartKey}` returns the attendee tickets — a key each,
3499
- * and the person each is for — and says nothing about what was bought into: no event name,
3500
- * no artwork, no day, no session. It carries a numeric `EventID`, which no endpoint here
3501
- * takes.
3502
- *
3503
- * So the occasion is the CALLER'S, exactly as `cartLines` is: the flow has just walked a
3504
- * buyer through choosing it and holds every field, and a host mounting this on its own page
3505
- * holds them too or it would not have had anything to sell. Inventing a lookup that cannot
3506
- * be made is the alternative, and it ends in a card that says "Ice Skating" for one mount
3507
- * and nothing for the other.
3508
- *
3509
- * ── WHICH IS WHY THERE ARE TWO TYPES AND NOT ONE ─────────────────────────────
3510
- *
3511
- * `BookingRecord` is what the platform holds. `Booking` is that record with the caller's
3512
- * facts folded in, and `dressBooking` is the fold. Keeping them apart is not tidiness: the
3513
- * occasion and the attribution are written inline by most callers and are therefore new
3514
- * objects on every render, so a read that took them would refetch the whole booking every
3515
- * time anything above it moved. Folded at render, the request depends on the cart key and
3516
- * nothing else.
3517
- *
3518
- * ── WHAT A TICKET IS, AND WHAT IT IS NOT ─────────────────────────────────────
3519
- *
3520
- * `Items[].Key` IS the `AttendeeTicketKey` — what a QR code is drawn FROM, and the only
3521
- * identity a ticket has on screen. `Attendee.ID` is separate and is what `PUT /Attendees`
3522
- * names when a holder is edited; the two are not interchangeable and both are kept.
3523
- *
3524
- * `Items[].Type` IS DELIBERATELY NOT READ. A booking must list tickets and not booking fees,
3525
- * and the tempting way to say so is to narrow that free text to a closed union. The honest
3526
- * rule is the one the cards actually need: an item is a ticket when it has a key a code can
3527
- * be drawn from AND an attendee it belongs to. A fee has neither. Narrowing `Type` would
3528
- * mean a closed union over spellings nobody here has seen, and the first unrecognised one
3529
- * would empty a buyer's booking rather than draw an extra row.
3530
- */
3531
-
3532
3543
  /** Who a ticket is for. */
3533
3544
  export declare type Ticketholder = {
3534
3545
  readonly firstName: string;
@@ -3713,11 +3724,6 @@ export declare type TimeSelection = {
3713
3724
  readonly startTime: string | null;
3714
3725
  };
3715
3726
 
3716
- /**
3717
- * The times within one day that a ticket is sold for — the timeslot picker's whole
3718
- * domain.
3719
- */
3720
-
3721
3727
  /** One slot a ticket is sold for. */
3722
3728
  export declare type Timeslot = {
3723
3729
  /**
@@ -3732,8 +3738,35 @@ export declare type Timeslot = {
3732
3738
  * reports it. Null where the slot does not say.
3733
3739
  */
3734
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;
3735
3756
  };
3736
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
+
3737
3770
  /**
3738
3771
  * The selection after a day is pressed: the day, or NOTHING if it was already the
3739
3772
  * chosen one.