@getmicdrop/venue-calendar 4.3.1 → 4.3.3

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.
Files changed (138) hide show
  1. package/dist/{ArrowLeftIcon-DvOokN4u.js → ArrowLeftIcon-Z4nKB5nM.js} +2 -2
  2. package/dist/{Badge-Gg5PWs7f.js → Badge-B-RPK9j4.js} +5 -5
  3. package/dist/{BlockPlaceholder-C2PUGPNA.js → BlockPlaceholder-BwrNdnWs.js} +4 -4
  4. package/dist/{Button-Cm6xkipe.js → Button-lNEMFgek.js} +7 -7
  5. package/dist/{Calendar-bhl8Q8us.js → Calendar-DHbfAnnZ.js} +256 -256
  6. package/dist/{CalendarFoundryView-C2O_AmBk.js → CalendarFoundryView-CispqB9b.js} +315 -315
  7. package/dist/{CalendarIcon-DvhQ-GaL.js → CalendarIcon-BEjbOHHM.js} +2 -2
  8. package/dist/{CartView-D57bwixz.js → CartView-D1WVQdkX.js} +26 -26
  9. package/dist/{Checkbox-24CWEsty.js → Checkbox-BwLIRQAK.js} +1 -1
  10. package/dist/{Checkout-BqaJK6UP.js → Checkout-BEVK-XxA.js} +18 -18
  11. package/dist/{Checkout-DQWeMchu.js → Checkout-pe1Nz_ai.js} +27 -27
  12. package/dist/{CheckoutTimer-8tVmatUn.js → CheckoutTimer-CEMQlOey.js} +4 -4
  13. package/dist/{ChevronDownIcon-DyNmV5XZ.js → ChevronDownIcon-BvODFygz.js} +2 -2
  14. package/dist/{ClockIcon-dOWVO61o.js → ClockIcon-DTyldSrw.js} +2 -2
  15. package/dist/{CloseIcon-a3S2RgbP.js → CloseIcon-BYaEoomX.js} +4 -4
  16. package/dist/{CloseOutline-qpVa62mu.js → CloseOutline-e-QEon4Z.js} +1 -1
  17. package/dist/{CollectionView-B-PR54hU.js → CollectionView-YMExbUJJ.js} +8 -8
  18. package/dist/{CropImage-CxLcNArr.js → CropImage-Cn-w5oSo.js} +11 -11
  19. package/dist/{Event-DxNC58Zb.js → Event-Cr2vouCk.js} +40 -40
  20. package/dist/{EventPage-Y3NWzmN0.js → EventPage-Dfqh7dVU.js} +20 -20
  21. package/dist/{Heading-cKAx0Ogl.js → Heading-D56WGHbq.js} +4 -4
  22. package/dist/{Image-CNZLcePz.js → Image-C-BoBbtK.js} +8 -8
  23. package/dist/{Input-D1FpSX5Q.js → Input-C13S6gqr.js} +10 -10
  24. package/dist/{LiveRegion-D9Me4kBs.js → LiveRegion-BNdFVeEi.js} +2 -2
  25. package/dist/{MailIcon-CR_eGi6n.js → MailIcon-Ab4c-DXb.js} +3 -3
  26. package/dist/{Modal-LkN8lh_m.js → Modal-Hx_2J7Rs.js} +3 -3
  27. package/dist/{ModalFooter-B_8f1Z5p.js → ModalFooter-ygemSWQg.js} +12 -12
  28. package/dist/{PasswordInput-Bt6tvpzi.js → PasswordInput-BSXp5UU8.js} +7 -7
  29. package/dist/{RequiredIndicator-CYcnRFsA.js → RequiredIndicator-mZNE0avg.js} +1 -1
  30. package/dist/{ScarcityBadge-g0dRh6K7.js → ScarcityBadge-DTRsuMeS.js} +6 -6
  31. package/dist/{SeriesPage-D2305oP-.js → SeriesPage-HAInGoce.js} +5 -5
  32. package/dist/{Spinner-LroI7eOC.js → Spinner-RgxkOQM6.js} +3 -3
  33. package/dist/{Success-ClXshzvl.js → Success-Cyh4ctR_.js} +22 -22
  34. package/dist/{TagIcon-BhLrURo_.js → TagIcon-C0gWJ2Ne.js} +2 -2
  35. package/dist/{Text-CqjLjIF8.js → Text-BBLpprzD.js} +1 -1
  36. package/dist/{ViewTicketsEmbed-CvuMdTA7.js → ViewTicketsEmbed-DqE85DNR.js} +13 -13
  37. package/dist/{WarningCircleIcon-BxBY0OMQ.js → WarningCircleIcon-B9vMus2i.js} +4 -4
  38. package/dist/{WarningTriIcon-QVzQiEM4.js → WarningTriIcon-DiK82tSQ.js} +2 -2
  39. package/dist/{__SKIP_PATHS__-B0_APtpt.js → __SKIP_PATHS__-t6fsPcoF.js} +2 -2
  40. package/dist/api/api.cjs +1 -0
  41. package/dist/api/api.mjs +1442 -0
  42. package/dist/api/client.d.ts +157 -0
  43. package/dist/api/cta.d.ts +50 -0
  44. package/dist/api/events.d.ts +202 -0
  45. package/dist/api/gift-cards.d.ts +119 -0
  46. package/dist/api/index.d.ts +46 -0
  47. package/dist/api/orders.d.ts +193 -0
  48. package/dist/api/promo.d.ts +45 -0
  49. package/dist/api/result.d.ts +78 -0
  50. package/dist/api/route-manifest.d.ts +206 -0
  51. package/dist/api/transformers/address.d.ts +18 -0
  52. package/dist/api/transformers/cart.d.ts +34 -0
  53. package/dist/api/transformers/collection.d.ts +12 -0
  54. package/dist/api/transformers/event.d.ts +177 -0
  55. package/dist/api/transformers/faq.d.ts +40 -0
  56. package/dist/api/transformers/giftCard.d.ts +11 -0
  57. package/dist/api/transformers/index.d.ts +27 -0
  58. package/dist/api/transformers/order.d.ts +44 -0
  59. package/dist/api/transformers/performer.d.ts +8 -0
  60. package/dist/api/transformers/series.d.ts +12 -0
  61. package/dist/api/transformers/venue.d.ts +65 -0
  62. package/dist/api/types.d.ts +554 -0
  63. package/dist/api/venues.d.ts +33 -0
  64. package/dist/api/waitlist.d.ts +77 -0
  65. package/dist/{browser-viCaCwoW.js → browser-CDcw1U3g.js} +4 -4
  66. package/dist/{colors-BsP3TRan.js → colors-BCno-V3M.js} +7 -7
  67. package/dist/{constants-PBNG9ikv.js → constants-0rB39hh9.js} +5 -5
  68. package/dist/{copyToClipboard-B2F5d6Cj.js → copyToClipboard-BTRjm2k0.js} +3 -3
  69. package/dist/{defaultLabels-BigaGqKj.js → defaultLabels-B8o4uGeh.js} +57 -57
  70. package/dist/{dist-bwbfGPKR.js → dist-yd2QOrGL.js} +2 -2
  71. package/dist/{event-rtg4-kWS.js → event-B9vk_NJu.js} +2 -2
  72. package/dist/{event-transform-J7U1JmeK.js → event-transform-CFZBM0Jm.js} +4 -4
  73. package/dist/{eventStatusStream-CJVT_9Gu.js → eventStatusStream-BJwYyjtM.js} +2 -2
  74. package/dist/{filepond-plugin-file-validate-size-DNnItZ84.js → filepond-plugin-file-validate-size-D_xBVbw2.js} +1 -1
  75. package/dist/{filepond-plugin-file-validate-type-CUMTkI8X.js → filepond-plugin-file-validate-type-C5UkfEsQ.js} +1 -1
  76. package/dist/{filepond-plugin-image-exif-orientation-GEwHZTBU.js → filepond-plugin-image-exif-orientation-0721-UXO.js} +1 -1
  77. package/dist/{filepond-plugin-image-preview-DKfgAnVa.js → filepond-plugin-image-preview-BeajRRvH.js} +1 -1
  78. package/dist/{href-Dx7B6ZiQ.js → href-BtTkmi3g.js} +8 -8
  79. package/dist/{i18n-sO8wTASy.js → i18n-Bj098Btz.js} +2 -2
  80. package/dist/{i18n-C0aOwSpF.js → i18n-Dmbmi7EI.js} +6 -6
  81. package/dist/{imageOptimizer-BwLwBMI6.js → imageOptimizer-DRZxsGFT.js} +7 -7
  82. package/dist/{keyboard-fiZFqeNA.js → keyboard-BNjnLxNp.js} +1 -1
  83. package/dist/{labels-BBFJnXep.js → labels-mpBWpCQ5.js} +1 -1
  84. package/dist/{lazyOnce-CCfEO1xG.js → lazyOnce-BouNSpBW.js} +1 -1
  85. package/dist/{modalManager.svelte-B9mhX1cG.js → modalManager.svelte-66X2xNff.js} +4 -4
  86. package/dist/{order-totals-DR-oXumr.js → order-totals-DoPTpTUE.js} +3 -3
  87. package/dist/{orders-CFF0Hb2x.js → orders-BndkYkeg.js} +4 -4
  88. package/dist/{phoneUtils-C2GGZYvA.js → phoneUtils-CdzublA9.js} +53 -53
  89. package/dist/{pixels-M4FTi1Of.js → pixels-B_k0f9uV.js} +3 -3
  90. package/dist/{portal-DqxEuE-7.js → portal-C5DJ9GxX.js} +4 -4
  91. package/dist/{promo--p3GbP64.js → promo-Bf90ebR5.js} +1 -1
  92. package/dist/seo/HostSeoController.d.ts +68 -0
  93. package/dist/seo/buildCollectionJsonLd.d.ts +8 -0
  94. package/dist/seo/buildEventJsonLd.d.ts +9 -0
  95. package/dist/seo/buildSeriesJsonLd.d.ts +6 -0
  96. package/dist/seo/helpers.d.ts +88 -0
  97. package/dist/seo/index.d.ts +10 -0
  98. package/dist/seo/seo.cjs +1 -0
  99. package/dist/seo/seo.mjs +592 -0
  100. package/dist/seo/types.d.ts +156 -0
  101. package/dist/{serverTotals-Dbi69SIr.js → serverTotals-ClFGyoJV.js} +8 -8
  102. package/dist/{shareCopyFeedback.svelte-Ba3vibxL.js → shareCopyFeedback.svelte-DBgw9De7.js} +5 -5
  103. package/dist/{showcase-state-options-BZGCm4wo.js → showcase-state-options-lz-9ttqv.js} +1 -1
  104. package/dist/{sortable.esm--ZtTTTPp.js → sortable.esm-CgRu3FYx.js} +1 -1
  105. package/dist/{src-DZgagYE3.js → src-BBt05SRE.js} +1 -1
  106. package/dist/{to-event-card-props-dIhKdERf.js → to-event-card-props-CoYVe2P7.js} +15 -15
  107. package/dist/types/index.d.ts +3 -0
  108. package/dist/{utils-CbacksjX.js → utils-CuFPcNng.js} +4 -4
  109. package/dist/venue-calendar.css +1 -1
  110. package/dist/venue-calendar.es.js +1038 -1000
  111. package/dist/venue-calendar.iife.js +35 -35
  112. package/dist/venue-calendar.umd.js +26 -26
  113. package/dist/{z-index-BgKs9X9U.js → z-index-DrhWc2Sn.js} +2 -2
  114. package/package.json +220 -220
  115. /package/dist/locales/{4.3.1 → 4.3.3}/flow/de.js +0 -0
  116. /package/dist/locales/{4.3.1 → 4.3.3}/flow/es.js +0 -0
  117. /package/dist/locales/{4.3.1 → 4.3.3}/flow/fr.js +0 -0
  118. /package/dist/locales/{4.3.1 → 4.3.3}/flow/id.js +0 -0
  119. /package/dist/locales/{4.3.1 → 4.3.3}/flow/it.js +0 -0
  120. /package/dist/locales/{4.3.1 → 4.3.3}/flow/ja.js +0 -0
  121. /package/dist/locales/{4.3.1 → 4.3.3}/flow/ko.js +0 -0
  122. /package/dist/locales/{4.3.1 → 4.3.3}/flow/nl.js +0 -0
  123. /package/dist/locales/{4.3.1 → 4.3.3}/flow/pl.js +0 -0
  124. /package/dist/locales/{4.3.1 → 4.3.3}/flow/pt-br.js +0 -0
  125. /package/dist/locales/{4.3.1 → 4.3.3}/flow/tr.js +0 -0
  126. /package/dist/locales/{4.3.1 → 4.3.3}/flow/zh.js +0 -0
  127. /package/dist/locales/{4.3.1 → 4.3.3}/main/de.js +0 -0
  128. /package/dist/locales/{4.3.1 → 4.3.3}/main/es.js +0 -0
  129. /package/dist/locales/{4.3.1 → 4.3.3}/main/fr.js +0 -0
  130. /package/dist/locales/{4.3.1 → 4.3.3}/main/id.js +0 -0
  131. /package/dist/locales/{4.3.1 → 4.3.3}/main/it.js +0 -0
  132. /package/dist/locales/{4.3.1 → 4.3.3}/main/ja.js +0 -0
  133. /package/dist/locales/{4.3.1 → 4.3.3}/main/ko.js +0 -0
  134. /package/dist/locales/{4.3.1 → 4.3.3}/main/nl.js +0 -0
  135. /package/dist/locales/{4.3.1 → 4.3.3}/main/pl.js +0 -0
  136. /package/dist/locales/{4.3.1 → 4.3.3}/main/pt-br.js +0 -0
  137. /package/dist/locales/{4.3.1 → 4.3.3}/main/tr.js +0 -0
  138. /package/dist/locales/{4.3.1 → 4.3.3}/main/zh.js +0 -0
@@ -0,0 +1,177 @@
1
+ import { Event, AvailableTicket } from '../types.js';
2
+ interface ApiEvent {
3
+ eventID?: number;
4
+ id?: number;
5
+ ID?: number;
6
+ name?: string;
7
+ title?: string;
8
+ slug?: string;
9
+ description?: string;
10
+ date?: string;
11
+ startDateTime?: string;
12
+ start_date_time?: string;
13
+ endDateTime?: string;
14
+ end_date_time?: string;
15
+ doorsOpenTime?: string;
16
+ doors_open_time?: string;
17
+ timezone?: string;
18
+ time_zone?: string;
19
+ venueId?: number;
20
+ venue_id?: number;
21
+ venueName?: string;
22
+ venue_name?: string;
23
+ venueAddress?: string;
24
+ venue_address?: string;
25
+ location?: string;
26
+ imageUrl?: string;
27
+ imageURL?: string;
28
+ image_url?: string;
29
+ image?: string;
30
+ status?: string;
31
+ isPublished?: boolean;
32
+ is_published?: boolean;
33
+ isCancelled?: boolean;
34
+ is_cancelled?: boolean;
35
+ availableTickets?: any[];
36
+ available_tickets?: any[];
37
+ tickets?: any[];
38
+ ticketsAvailable?: number;
39
+ tickets_available?: number;
40
+ ticketsSold?: number;
41
+ tickets_sold?: number;
42
+ minPrice?: number;
43
+ min_price?: number;
44
+ maxPrice?: number;
45
+ max_price?: number;
46
+ ctaText?: string;
47
+ cta_text?: string;
48
+ ctaState?: string;
49
+ cta_state?: string;
50
+ showPerformers?: boolean;
51
+ show_performers?: boolean;
52
+ eventSeriesId?: number;
53
+ event_series_id?: number;
54
+ seriesInstanceNumber?: number;
55
+ series_instance_number?: number;
56
+ timeZone?: string;
57
+ salesStatus?: string;
58
+ sales_status?: string;
59
+ eventSummary?: string;
60
+ password?: string;
61
+ hasPassword?: boolean;
62
+ disclaimer?: string;
63
+ ticketType?: number;
64
+ eventTicketingType?: number;
65
+ ageRestriction?: number;
66
+ displayAgeRestriction?: boolean;
67
+ displayStartTime?: boolean;
68
+ displayEndTime?: boolean;
69
+ displayDoorsTime?: boolean;
70
+ displayTicketsLeft?: boolean;
71
+ postSalesMessage?: string;
72
+ collectionId?: number;
73
+ collection_id?: number;
74
+ ticketsRemaining?: number;
75
+ ticketsTotal?: number;
76
+ hasHiddenTickets?: boolean;
77
+ stage?: {
78
+ name?: string;
79
+ } | null;
80
+ stageName?: string;
81
+ stageId?: number;
82
+ eventCategoryTypes?: number[] | null;
83
+ publicPerformers?: Array<{
84
+ id?: number;
85
+ displayName?: string;
86
+ image?: string;
87
+ }> | null;
88
+ collectionIds?: number[] | null;
89
+ venue?: Record<string, any>;
90
+ performers?: Record<string, any>[];
91
+ faqs?: Record<string, any>[];
92
+ showtimes?: Record<string, any>[];
93
+ purchasedTickets?: Record<string, any>[];
94
+ }
95
+ /**
96
+ * Get CDN image URL.
97
+ *
98
+ * Delegates the host-join to SC's canonical `resolveImageUrl` (one path-join,
99
+ * one host constant). `{ cdn: true }` picks the Cloudflare-fronted CDN base
100
+ * (`moxy.sfo3.cdn`), the correct, edge-cached host for public buyer surfaces.
101
+ *
102
+ * This replaced VC's local `micdrop-images.sfo3` bucket, which 404s for real
103
+ * event/venue keys (CDN census 2026-07-05, ledger vc-getcdnimageurl-wrong-
104
+ * bucket-404). SC additionally passes `data:`/`blob:` URLs through untouched
105
+ * and normalizes a missing leading slash — a strict superset of the old body.
106
+ */
107
+ export declare function getCDNImageUrl(path: string | undefined): string;
108
+ /**
109
+ * Extract image URL from event with fallbacks.
110
+ *
111
+ * DIVERGENCE (no-shadowed-helper rename-keep): the HOST-JOIN is now the SC
112
+ * canonical (via `getCDNImageUrl` above); only the FIELD PRECEDENCE stays local
113
+ * and deliberately differs -- this transformer reads
114
+ * `imageUrl -> imageURL -> image_url -> image` (incl. the camelCase `imageURL`,
115
+ * asserted by event.test.ts), whereas SC reads
116
+ * `image -> coverImage -> imageUrl -> image_url`. The VC chain is what this
117
+ * wire boundary trusts; changing it would repoint which field wins for the same
118
+ * event, so it is preserved. Declared under a non-shadowing name and
119
+ * re-exported below as `getEventImageUrl` so call sites keep their existing
120
+ * import -- satisfies `micdrop/no-shadowed-helper` without suppression.
121
+ */
122
+ declare function getEventImageUrlByFieldPrecedence(apiEvent: ApiEvent): string;
123
+ export { getEventImageUrlByFieldPrecedence as getEventImageUrl };
124
+ /**
125
+ * Calculate CTA state based on ticket availability
126
+ */
127
+ /**
128
+ * VC's 4-state CTA derivation (available/sold_out/coming_soon/ended) for parsed events.
129
+ * Distinct from SC's `calculateCtaState` (richer wire-level canonical) — renamed to
130
+ * avoid shadowing the SC export; this variant reads the parsed/raw event shape parseEvent consumes.
131
+ */
132
+ type CtaState = 'available' | 'sold_out' | 'coming_soon' | 'ended';
133
+ export declare function deriveEventCtaState(apiEvent: ApiEvent): CtaState;
134
+ /**
135
+ * Parse a raw ticket payload into the normalized AvailableTicket domain shape.
136
+ *
137
+ * Wire shape is contained inside this module. Uses `||` chains matching the
138
+ * old transformer exactly -- 0/false values fall through to the next variant
139
+ * or default, byte-identical to previous behavior.
140
+ */
141
+ export declare function parseTicket(raw: unknown): AvailableTicket;
142
+ /**
143
+ * Parse a raw event payload into the normalized Event domain shape.
144
+ *
145
+ * Wire shape (ApiEvent) is contained inside this module and never escapes it.
146
+ * Uses `||` chains matching the old transformer exactly -- 0/false values fall
147
+ * through to the next variant, byte-identical to previous behavior. Throw
148
+ * behavior preserved from old mapper: null/undefined input (property access on a nullish value) or a non-array
149
+ * tickets field throws exactly as the old code did. Callers always pass real
150
+ * wire objects.
151
+ *
152
+ * COMPOSITION NOTE — passthrough seams (events convergence):
153
+ * The trailing block of fields below is carried VERBATIM from the wire (no
154
+ * fallback chains, no normalization) so that the view-shape projections —
155
+ * `utils/event-transform.js` (DETAIL/BROWSE) and
156
+ * `public-calendar-flow/transform.ts` (EventData) — can compose parseEvent
157
+ * for every event-level scalar instead of reading the wire themselves.
158
+ * `venue`/`performers`/`faqs`/`showtimes`/`purchasedTickets` stay raw objects
159
+ * by contract: their consumers (and #260's performer canonical) own that
160
+ * variance; normalizing them here would change rendered output.
161
+ */
162
+ export declare function parseEvent(raw: unknown): Event;
163
+ /**
164
+ * Back-compat alias -- existing call sites using transformTicket continue
165
+ * to work unchanged.
166
+ */
167
+ export declare const transformTicket: typeof parseTicket;
168
+ /**
169
+ * Back-compat alias -- existing call sites using transformEvent(apiEvent)
170
+ * continue to work unchanged.
171
+ */
172
+ export declare const transformEvent: typeof parseEvent;
173
+ /**
174
+ * Legacy transformer name for backwards compatibility.
175
+ */
176
+ export declare const transformEventData: typeof parseEvent;
177
+ export declare function parseEventList(raws: unknown[]): Event[];
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Venue FAQ: one text field -> the Q/A rows the accordion renders.
3
+ *
4
+ * The venue's `faq` is a single free-text field an operator fills from a
5
+ * textarea ("Common questions and answers for customers"). FaqAccordion renders
6
+ * {question, answer} pairs. This is the bridge, and it is shared so the event
7
+ * page and the series page read that one field the same way.
8
+ *
9
+ * The shape is INFERRED rather than demanded: the field is a plain textarea and
10
+ * no operator is told a format, so the parser has to make sense of whatever is
11
+ * in there.
12
+ *
13
+ * The rules, in the order they are tried:
14
+ *
15
+ * 1. Already structured — an array of {question, answer}, from any caller that
16
+ * holds pre-split pairs, passes through.
17
+ * 2. Explicit Q:/A: markers, the convention people reach for unprompted.
18
+ * 3. A line ending in "?" starts a question; the lines under it are its
19
+ * answer. This is what venue FAQs actually look like.
20
+ * 4. None of the above — no question mark anywhere, no markers — is a single
21
+ * block of prose, and it stays one row rather than being chopped at
22
+ * arbitrary line breaks.
23
+ *
24
+ * A line's OPENING WORDS are deliberately not evidence, even though the ticket
25
+ * PDF's formatter treats "what"/"how"/"can i" that way: on a PDF a mis-split is
26
+ * a cosmetic line break, but here it collapses the rest of a sentence into a
27
+ * closed accordion row and hides it. Ending punctuation and explicit markers are
28
+ * evidence; sentence openings are a guess.
29
+ */
30
+ export interface ParsedFAQItem {
31
+ question: string;
32
+ answer: string;
33
+ }
34
+ /**
35
+ * Normalizes whatever the API answered for a venue's FAQ into accordion rows.
36
+ * Accepts the structured array, the text column, or nothing; always returns an
37
+ * array (empty when there is nothing to show), so callers can render
38
+ * unconditionally.
39
+ */
40
+ export declare function parseVenueFaq(raw: unknown): ParsedFAQItem[];
@@ -0,0 +1,11 @@
1
+ import { ApplyGiftCardResult } from '../gift-cards.js';
2
+ /**
3
+ * Parse a successful apply-gift-card backend payload into ApplyGiftCardResult,
4
+ * or a `{ valid: false }` refusal when the payload does not state the amounts.
5
+ *
6
+ * Maps the real backend contract to what the Checkout component expects:
7
+ * - appliedAmount (cents) -> giftCardAmount (dollars)
8
+ * - remainingTotal (dollars) -> stripeAmount (dollars, residual to charge)
9
+ * - fullyCoveredByCard -> paymentType 'gift_card_only' | 'split' + requiresStripe
10
+ */
11
+ export declare function parseGiftCardApplication(raw: unknown): ApplyGiftCardResult;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Transformers Index
3
+ *
4
+ * Re-exports all transformer functions for convenient importing.
5
+ *
6
+ * Canonical parse<Entity> functions (preferred for new code):
7
+ * parseEvent, parseVenue, parseOrder, parsePurchasedTicket, parseTicket,
8
+ * parseSeries, parseCollection
9
+ *
10
+ * Back-compat aliases (old names, call the same function):
11
+ * transformEvent, transformEventData, transformVenue, transformOrder,
12
+ * transformTicket, transformSeriesPageData, transformCollectionData
13
+ */
14
+ export { parseOrder, parsePurchasedTicket, transformOrder, // back-compat alias
15
+ transformTicket, // back-compat alias
16
+ transformOrderForDisplay, } from './order.js';
17
+ export { parseEvent, parseEventList, parseTicket, transformEvent, // back-compat alias
18
+ transformEventData, // legacy alias
19
+ transformTicket as transformAvailableTicket, // back-compat alias
20
+ getCDNImageUrl, getEventImageUrl, deriveEventCtaState, deriveEventCtaState as calculateCtaState, } from './event.js';
21
+ export { parseVenue, transformVenue, // back-compat alias
22
+ extractVenueFees, extractVenueCheckoutSettings, formatVenueAddress, } from './venue.js';
23
+ export { parseSeries, transformSeriesPageData, } from './series.js';
24
+ export { parseCollection, transformCollectionData, } from './collection.js';
25
+ export { parseCart, parseCartReservation } from './cart.js';
26
+ export { parseGiftCardApplication } from './giftCard.js';
27
+ export { parseEventPerformers } from './performer.js';
@@ -0,0 +1,44 @@
1
+ import { Order, PurchasedTicket } from '../types.js';
2
+ /**
3
+ * Parse a raw purchased-ticket payload into the normalized PurchasedTicket domain shape.
4
+ *
5
+ * Wire shape (ApiTicket) is contained inside this module. Uses `||` chains matching
6
+ * the old transformer exactly -- byte-identical to previous behavior. Throw behavior
7
+ * preserved from old mapper: null/undefined input (property access on a nullish value) throws as the old code did.
8
+ */
9
+ export declare function parsePurchasedTicket(raw: unknown): PurchasedTicket;
10
+ /**
11
+ * Parse a raw order payload into the normalized Order domain shape.
12
+ *
13
+ * Wire shape (ApiOrder) is contained inside this module and never escapes it.
14
+ * Uses `||` chains matching the old transformer exactly (all money fields use `||`,
15
+ * not `??` -- 0-valued amounts fall through to next variant, same as old) --
16
+ * byte-identical to previous behavior. Throw behavior preserved from old mapper:
17
+ * null/undefined input (property access on a nullish value) or a non-array tickets field throws as the old code did.
18
+ */
19
+ export declare function parseOrder(raw: unknown): Order;
20
+ /**
21
+ * Back-compat alias -- existing call sites using transformTicket continue
22
+ * to work unchanged.
23
+ */
24
+ export declare const transformTicket: typeof parsePurchasedTicket;
25
+ /**
26
+ * Back-compat alias -- existing call sites using transformOrder(apiOrder)
27
+ * continue to work unchanged.
28
+ */
29
+ export declare const transformOrder: typeof parseOrder;
30
+ /**
31
+ * Transform order for display on success page.
32
+ *
33
+ * Returns a simplified object with display-ready values.
34
+ */
35
+ export declare function transformOrderForDisplay(raw: unknown): {
36
+ orderId: string;
37
+ displayOrderId: string;
38
+ email: string;
39
+ customerName: string;
40
+ total: number;
41
+ formattedTotal: string;
42
+ ticketCount: number;
43
+ status: string;
44
+ };
@@ -0,0 +1,8 @@
1
+ import { EventPerformersResponse } from '../types.js';
2
+ /**
3
+ * Parse a raw performers payload into the normalized EventPerformersResponse.
4
+ *
5
+ * `performers` is coerced to an array (Array.isArray gate), `showPerformers`
6
+ * to a strict boolean (`=== true`) -- matching fetchEventPerformers exactly.
7
+ */
8
+ export declare function parseEventPerformers(raw: unknown): EventPerformersResponse;
@@ -0,0 +1,12 @@
1
+ import { SeriesPageData } from '../types.js';
2
+ import { EventData } from '../../public-calendar-flow/types';
3
+ /**
4
+ * Transform SeriesPageData (from the series API) into our clean EventData interface.
5
+ * Sets eventSeriesId so EventExperience renders in full-width series mode.
6
+ */
7
+ export declare function parseSeries(series: SeriesPageData): EventData;
8
+ /**
9
+ * Back-compat alias — the public-calendar-flow shaper name. Existing call
10
+ * sites importing transformSeriesPageData continue to work unchanged.
11
+ */
12
+ export declare const transformSeriesPageData: typeof parseSeries;
@@ -0,0 +1,65 @@
1
+ import { Venue } from '../types.js';
2
+ /**
3
+ * Parse a raw venue payload into the normalized Venue domain shape.
4
+ *
5
+ * Wire shape (ApiVenue) is contained inside this module and never escapes it.
6
+ * Uses `||` / `??` chains matching the old transformer exactly -- byte-identical
7
+ * to previous behavior. Throw behavior preserved from old mapper: null/undefined
8
+ * input throws exactly as the old code did. Callers always pass real wire objects.
9
+ */
10
+ declare function vcParseVenue(raw: unknown): Venue;
11
+ /**
12
+ * Public re-export under the canonical name + back-compat alias. Existing call
13
+ * sites using either parseVenue(apiVenue) or transformVenue(apiVenue) continue
14
+ * to work unchanged; re-exports don't redeclare the identifier so the
15
+ * no-shadowed-helper rule is satisfied without a suppression.
16
+ */
17
+ export { vcParseVenue as parseVenue };
18
+ export declare const transformVenue: typeof vcParseVenue;
19
+ /**
20
+ * Extract fee configuration from a raw venue payload.
21
+ *
22
+ * Uses `??` (not `||`) so 0-valued fees are preserved correctly.
23
+ */
24
+ declare function vcExtractVenueFees(raw: unknown): {
25
+ serviceFeePercentage: number;
26
+ serviceFeeCents: number;
27
+ taxPercentage: number;
28
+ };
29
+ /**
30
+ * Get formatted venue address.
31
+ *
32
+ * Compare-first vs SC canonical formatVenueAddress(venue: Pick<ParsedVenue,
33
+ * 'address'|'city'|'state'|...>): GENUINELY DIVERGED — VC takes its own `Venue`
34
+ * domain type (the resolved shape `vcParseVenue` emits), not SC's `ParsedVenue`
35
+ * pick. Kept local under a non-shadowing name and re-exported below; no
36
+ * eslint-disable.
37
+ */
38
+ declare function vcFormatVenueAddress(venue: Venue): string;
39
+ /**
40
+ * The venue's checkout settings, as the checkout form needs them.
41
+ *
42
+ * These four keys describe what the checkout asks a buyer for, so the ONLY
43
+ * consumer is CheckoutForm — every EventData shaper pulls them off whatever
44
+ * venue block its payload carries and hands them down. Kept here, beside
45
+ * extractVenueFees, because they are venue config read out of a raw venue
46
+ * object, and because three shapers (event, series, collection) would otherwise
47
+ * each grow their own copy of the fallbacks.
48
+ *
49
+ * Normalization is the server's (models.PublicCheckoutSettings): `required`
50
+ * never arrives without `ask`, and the prompt is emitted only when the operator
51
+ * has both ticked the box and written a question. This re-applies both rules
52
+ * anyway — the widget is pinned by version and runs against whatever API the
53
+ * host site's embed reaches, so it must not depend on the payload being current.
54
+ *
55
+ * A MISSING key defaults to "ask for a phone, don't require it, ask nothing
56
+ * else": the least surprising checkout, and the one a payload that predates
57
+ * these keys should still produce.
58
+ */
59
+ declare function vcExtractVenueCheckoutSettings(raw: unknown): {
60
+ askForPhoneAtCheckout: boolean;
61
+ requiredPhoneAtCheckout: boolean;
62
+ hasCustomCheckout: boolean;
63
+ questionPrompt: string | undefined;
64
+ };
65
+ export { vcExtractVenueFees as extractVenueFees, vcExtractVenueCheckoutSettings as extractVenueCheckoutSettings, vcFormatVenueAddress as formatVenueAddress, };