@getmicdrop/venue-calendar 4.3.138 → 4.3.139
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/README.md +895 -840
- package/dist/AddOnCard-Dlt_4lut.js +475 -0
- package/dist/{Button-B_gbGd63.js → Button-Ch5dRGa2.js} +1 -1
- package/dist/{Button-B1cBhdtC.js → Button-DpeQSoQ7.js} +58 -45
- package/dist/Calendar-CNWS2xiR.js +396 -0
- package/dist/CalendarFoundryView-B5puOxH5.js +16431 -0
- package/dist/{ChartBlock-DcsCXfX8.js → ChartBlock-vihMKVdW.js} +2 -2
- package/dist/Checkout-B2FvX6Af.js +1070 -0
- package/dist/Checkout-y0x-v-XH.js +1995 -0
- package/dist/{ChevronDownOutline-kFgRY2cg.js → CloseOutline-Bh9UO94v.js} +2 -2
- package/dist/{CollectionView-C0vDg5oJ.js → CollectionView-CcLlV-1f.js} +22 -24
- package/dist/{CropImage-BWYeQXXA.js → CropImage-DqLAGy5s.js} +6 -6
- package/dist/{DatePicker-v-4ijT8N.js → DatePicker-D20Te0JY.js} +222 -215
- package/dist/{Event-vlu8IAxh.js → Event-DoIU0o6C.js} +799 -796
- package/dist/{EventCard-puoh3xag.js → EventCard-B8MYLyIW.js} +1 -1
- package/dist/EventPage-DM4tjCcL.js +1298 -0
- package/dist/{FilterChipGroup-DUGvOaRI.js → FilterChipGroup-BCjc7-pE.js} +1 -1
- package/dist/{ImageUploader-CKrf5amy.js → ImageUploader-BzxKIyLN.js} +324 -375
- package/dist/{Input-BQk4itex.js → Input-Bp5EgI1F.js} +5 -3
- package/dist/Modal-C6EXgkuF.js +159 -0
- package/dist/{ModalFooter-gFaDKsfj.js → ModalFooter-C4TD3-zP.js} +1 -1
- package/dist/{ModalTitle-CS5AGwrU.js → ModalTitle-BP4Bm3sA.js} +1 -1
- package/dist/{PasswordInput-C65GqxdF.js → PasswordInput-BlzSrkPs.js} +1 -1
- package/dist/{PhoneInput-Dj1I3bEn.js → PhoneInput-_ByjRGQ0.js} +2 -2
- package/dist/{RecommendationsRail-DC5qX1ei.js → RecommendationsRail-BDNnbL-p.js} +53 -50
- package/dist/{Search-BE64QcmK.js → Search-vhGEpog6.js} +1 -1
- package/dist/SeriesPage-YE8czX1M.js +32 -0
- package/dist/{SkeletonLoader-DfW0N9R3.js → SkeletonLoader-Beh2izdy.js} +1 -1
- package/dist/Spinner-DgubkWKo.js +88 -0
- package/dist/{Success-D3CrUeka.js → Success-CN5HB8gN.js} +164 -166
- package/dist/{TimePicker-HYzPI_Dc.js → TimePicker-BDuy9Ap8.js} +1 -1
- package/dist/{ViewTicketsEmbed-DzUCgtA3.js → ViewTicketsEmbed-DvoMIiKJ.js} +9 -10
- package/dist/{address-field-BwGHcMKY.js → address-field-DOalICpt.js} +2 -2
- package/dist/{allowlist-Bt1BHhNd.js → allowlist-DinkGF2L.js} +77 -68
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +320 -297
- package/dist/api/client.d.ts +14 -53
- package/dist/api/events.d.ts +15 -1
- package/dist/api/result.d.ts +9 -0
- package/dist/{api-CRHFSJDI.js → api-CsAx0rmV.js} +150 -145
- package/dist/{avatar-picker-field-CSF5okeM.js → avatar-picker-field-CV4vRxTB.js} +14 -14
- package/dist/{checkoutState-BDNjJRMG.js → checkoutState-DSx7g3Vy.js} +12 -21
- package/dist/{client-BIN_q-of.js → client-SaDt6559.js} +18 -12
- package/dist/{constants-DrFV2oht.js → constants-sRRJh0u-.js} +1 -1
- package/dist/{date-field-3tgOYbzF.js → date-field-DylJx0y7.js} +9 -9
- package/dist/{date-range-field-D0Aq9me9.js → date-range-field-BOV1V2ab.js} +7 -7
- package/dist/{de-CUrE_4a4.js → de-CzkX3H3B.js} +1 -0
- package/dist/{defaultLabels-CybwJCNn.js → defaultLabels-DLK6rq4q.js} +1 -0
- package/dist/{defaults-B5wyre5O.js → defaults-Cbuin1WS.js} +2 -3
- package/dist/{es-B2-z2Kft.js → es-BOLzv8eD.js} +1 -0
- package/dist/{event-CEg17hts.js → event-ClsLWtR0.js} +1 -1
- package/dist/{event-transform-DqFigNQg.js → event-transform-Cs63X0hI.js} +42 -42
- package/dist/{eventStatusStream-DK5fWCTB.js → eventStatusStream-BAh5nJP2.js} +1 -1
- package/dist/{field-rules-CKFFB16Q.js → field-rules-Yb2JY1qT.js} +1 -1
- package/dist/{file-field-2mPz4Da-.js → file-field-Dwo80kDg.js} +4 -4
- package/dist/format-CehusdDg.js +1718 -0
- package/dist/{formatters-CzKNRUwz.js → formatters-DUWbI_Eg.js} +25 -35
- package/dist/{fr-CiePVIlj.js → fr-DYTIBBXo.js} +1 -0
- package/dist/{href-DpbLXQ4c.js → href-BXhNawil.js} +1 -1
- package/dist/i18n-BNF6a-QA.js +720 -0
- package/dist/i18n-F_QOaHVh.js +26 -0
- package/dist/{id-Ttw95_7t.js → id-CIyIkGhH.js} +1 -0
- package/dist/{image-field-B8x0WQ2j.js → image-field-DeLzsJlz.js} +2 -2
- package/dist/{it-CBbXcFY1.js → it-CF4Db_nK.js} +1 -0
- package/dist/{ja-B2Tag7J3.js → ja-5-7WNHD1.js} +1 -0
- package/dist/{ko-CcTn4lAi.js → ko-huIzHR3W.js} +1 -0
- package/dist/locales/4.3.139/main/de.js +1 -0
- package/dist/locales/4.3.139/main/es.js +1 -0
- package/dist/locales/4.3.139/main/fr.js +1 -0
- package/dist/locales/4.3.139/main/id.js +1 -0
- package/dist/locales/4.3.139/main/it.js +1 -0
- package/dist/locales/4.3.139/main/ja.js +1 -0
- package/dist/locales/4.3.139/main/ko.js +1 -0
- package/dist/locales/4.3.139/main/nl.js +1 -0
- package/dist/locales/4.3.139/main/pl.js +1 -0
- package/dist/locales/4.3.139/main/pt-br.js +1 -0
- package/dist/locales/4.3.139/main/tr.js +1 -0
- package/dist/locales/4.3.139/main/zh.js +1 -0
- package/dist/look-island.svelte-D87MvHNy.js +1296 -0
- package/dist/{look-names-JI6GE-Zj.js → look-names-B9MywEzX.js} +68 -58
- package/dist/looks/4.3.139/AddOnCard-CKdkGcHH.js +1 -0
- package/dist/looks/4.3.139/Checkout-D7CaFYTE.js +1 -0
- package/dist/looks/4.3.139/Checkout-DuP46PMi.js +3 -0
- package/dist/looks/4.3.139/CollectionView-CWm57JCx.js +1 -0
- package/dist/looks/4.3.139/Event-ePupb4qY.js +8 -0
- package/dist/looks/4.3.139/EventPage-CgexXhEU.js +1 -0
- package/dist/looks/4.3.139/RecommendationsRail-Bz-Mj_r4.js +2 -0
- package/dist/looks/4.3.139/SeriesPage-DI2uFF0Y.js +1 -0
- package/dist/looks/4.3.139/Success-BkMzmgmc.js +3 -0
- package/dist/looks/4.3.139/ViewTicketsEmbed-CbEJwRry.js +1 -0
- package/dist/looks/4.3.139/_vc-foundry-calendar-stub-BVbAFEK2.js +1 -0
- package/dist/looks/4.3.139/buyerEmail-CqCYa9UL.js +1 -0
- package/dist/looks/4.3.139/constants-CU_ZgyQu.js +3 -0
- package/dist/looks/4.3.139/defaults-B46SFFK4.js +2 -0
- package/dist/looks/4.3.139/dist-BWGSqtWN.js +1 -0
- package/dist/looks/4.3.139/eventStatusStream-CW5lJwsa.js +10 -0
- package/dist/looks/4.3.139/first-core-DrYq9wBy.js +151 -0
- package/dist/looks/4.3.139/first-mount.svelte-DFSLaJWm.js +1 -0
- package/dist/looks/4.3.139/first-seo-DvHuCXT6.js +1 -0
- package/dist/looks/4.3.139/first.js +1 -0
- package/dist/looks/4.3.139/full-widget-DDBk3i4U.js +2 -0
- package/dist/looks/4.3.139/gate-password-cache-D4Zls6QM.js +1 -0
- package/dist/looks/4.3.139/i18n-DRaFNYsQ.js +1 -0
- package/dist/looks/4.3.139/listing-BSaRTkxW.js +1 -0
- package/dist/looks/4.3.139/loaders.runtime-BNG8O6-A.js +1 -0
- package/dist/looks/4.3.139/looks.js +1 -0
- package/dist/looks/4.3.139/modalManager.svelte-CqQWYz9Y.js +1 -0
- package/dist/looks/4.3.139/rolldown-runtime-4tVxZq34.js +1 -0
- package/dist/looks/4.3.139/serverTotals-Bu1fAPLB.js +1 -0
- package/dist/looks/4.3.139/showcase-state-options-CpCMAKVD.js +1 -0
- package/dist/looks/4.3.139/utils-pGRhH4A-.js +1 -0
- package/dist/{media-field-HieD0ye0.js → media-field-PW8ye6EL.js} +2 -2
- package/dist/modalManager.svelte-BHE0t9q3.js +79 -0
- package/dist/{multiselect-field-CJ4lUJyS.js → multiselect-field-CmocFs5f.js} +2 -2
- package/dist/navigation-B8rkS2On.js +348 -0
- package/dist/{nl-DeIqgjIs.js → nl-B1dv1lqk.js} +1 -0
- package/dist/{number-field-D5GkkGLB.js → number-field-CUD936Ai.js} +3 -3
- package/dist/{numeric-filter-field-CRWZFu_P.js → numeric-filter-field-BmgSYhOt.js} +3 -3
- package/dist/{password-field-DdOHXEOo.js → password-field-BfvcZUi_.js} +1 -1
- package/dist/{phone-field-BaYmp56f.js → phone-field-DO0U_YZ6.js} +17 -18
- package/dist/{pixels-BXXzmoCb.js → pixels-ipedGW6i.js} +7 -7
- package/dist/{pl-Bm2FcD5y.js → pl-DLlM_IPo.js} +1 -0
- package/dist/{pt-br-XS1Lsa6z.js → pt-br-8V3mf7pu.js} +1 -0
- package/dist/repeating-field-BwtJ6VS1.js +488 -0
- package/dist/{richtext-field-KmUytgBW.js → richtext-field-DvLCxPvq.js} +2 -2
- package/dist/{datetime-BlEsN_-8.js → scarcity-DfQvyhJP.js} +74 -85
- package/dist/{searchable-select-field-DettZRav.js → searchable-select-field-zuIqfoQM.js} +17 -17
- package/dist/{select-field-Wc4gAtou.js → select-field-DNNN-a9q.js} +6 -6
- package/dist/seo/HostSeoController.d.ts +13 -0
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.mjs +18 -11
- package/dist/{serverTotals-COsx7Mc5.js → serverTotals-BprgDwOw.js} +1 -1
- package/dist/{showcase-state-options-CHGUaZtl.js → showcase-state-options-bKRf48yz.js} +2 -2
- package/dist/{time-field-CnxZcziR.js → time-field-DmPCoppV.js} +2 -2
- package/dist/{to-event-card-props-C9v9dspT.js → to-event-card-props-KVcCJ2JF.js} +34 -34
- package/dist/{tr-zKAbMfgi.js → tr-DiUEV65j.js} +1 -0
- package/dist/{tree-picker-field-aqux58EQ.js → tree-picker-field-BJwSFAqm.js} +8 -8
- package/dist/types/index.d.ts +3 -0
- package/dist/{utils-AIszIHUb.js → utils-x8YXRKvr.js} +12 -12
- package/dist/venue-BjLCg-PW.js +38 -0
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +1655 -1539
- package/dist/venue-calendar.iife.js +1 -54
- package/dist/venue-calendar.umd.js +69 -63
- package/dist/{widget-key-context-BrWW0fyM.js → widget-key-context-dHM9FiuJ.js} +8 -37
- package/dist/{zh-DHfgJplH.js → zh-Cej2EPQt.js} +1 -0
- package/package.json +2 -2
- package/src/lib/constants/scarcity.ts +1 -2
- package/dist/AddOnCard-DEAC26HA.js +0 -348
- package/dist/BlockPlaceholder-BKfoE795.js +0 -59
- package/dist/Calendar-9xskvKUf.js +0 -395
- package/dist/CalendarFoundryView-DbxZNmY7.js +0 -16356
- package/dist/CartView-DMINN6bY.js +0 -2200
- package/dist/Checkbox-sObkYRdj.js +0 -60
- package/dist/Checkout-H9RGBU9D.js +0 -1071
- package/dist/Checkout-VnochAZE.js +0 -1967
- package/dist/CheckoutTimer-mjcYR3XU.js +0 -42
- package/dist/EventPage-DycxjX5Z.js +0 -1301
- package/dist/Modal-DOpDiAwN.js +0 -102
- package/dist/ScarcityBadge-BAaV2CIY.js +0 -141
- package/dist/SeriesPage-Cx89s2B6.js +0 -34
- package/dist/Skeleton-B6qB_udJ.js +0 -31
- package/dist/Spinner-Bj4dr9kO.js +0 -19
- package/dist/Textarea-BDcuBI13.js +0 -72
- package/dist/__SKIP_NAVIGATION__-Znm_vYcG.js +0 -5
- package/dist/__SKIP_PATHS__-Bzzrca_a.js +0 -5
- package/dist/calendar-Cdu8fCIt.js +0 -111
- package/dist/cta-qbcIt5Gh.js +0 -116
- package/dist/format-CypC4vWs.js +0 -1587
- package/dist/heic-to-BoLfsr3l.js +0 -70
- package/dist/i18n-B_TWnExv.js +0 -495
- package/dist/i18n-CSaUFnlD.js +0 -26
- package/dist/instant-BkZCSGDm.js +0 -162
- package/dist/labels-D8LN8lY7.js +0 -227
- package/dist/locales/4.3.138/main/de.js +0 -1
- package/dist/locales/4.3.138/main/es.js +0 -1
- package/dist/locales/4.3.138/main/fr.js +0 -1
- package/dist/locales/4.3.138/main/id.js +0 -1
- package/dist/locales/4.3.138/main/it.js +0 -1
- package/dist/locales/4.3.138/main/ja.js +0 -1
- package/dist/locales/4.3.138/main/ko.js +0 -1
- package/dist/locales/4.3.138/main/nl.js +0 -1
- package/dist/locales/4.3.138/main/pl.js +0 -1
- package/dist/locales/4.3.138/main/pt-br.js +0 -1
- package/dist/locales/4.3.138/main/tr.js +0 -1
- package/dist/locales/4.3.138/main/zh.js +0 -1
- package/dist/look-island.svelte-B7UH_QVv.js +0 -1270
- package/dist/looks/4.3.138/looks.js +0 -248
- package/dist/modalManager.svelte-BvyrTI6p.js +0 -51
- package/dist/navigation-DpqP-ahJ.js +0 -241
- package/dist/repeating-field-B4OhsaGB.js +0 -488
- package/dist/venue-DLkL7xdj.js +0 -12
- /package/dist/checkout-libs/{4.3.138 → 4.3.139}/phone.js +0 -0
- /package/dist/checkout-libs/{4.3.138 → 4.3.139}/qrcode.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/de.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/es.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/id.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/it.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.138 → 4.3.139}/flow/zh.js +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/micdrop-wordmark-BYMG6vLR.svg +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/microphone-Ccv4r-kd.webp +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/superuser-CZF6a5gO.webp +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/treasury-DUE7lZzT.webp +0 -0
- /package/dist/looks/{4.3.138 → 4.3.139}/user-image-yuS4errP.svg +0 -0
package/dist/api/client.d.ts
CHANGED
|
@@ -24,12 +24,10 @@ export interface ApiRequestOptions extends RequestInit {
|
|
|
24
24
|
* Skip the global `onError` handler for this call.
|
|
25
25
|
*
|
|
26
26
|
* For endpoints where a non-2xx is an EXPECTED, handled answer rather than a
|
|
27
|
-
* fault
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* in CartView survived (and broke every venue-hosted embed, which cannot
|
|
32
|
-
* reach a URL pinned to our own origin under its own CSP/consent rules).
|
|
27
|
+
* fault. Without this the caller has to bypass the whole api-client with a
|
|
28
|
+
* raw `fetch` just to avoid emitting API-error noise on the happy path — and a
|
|
29
|
+
* raw `fetch` pinned to our own origin breaks every venue-hosted embed, which
|
|
30
|
+
* cannot reach it under its own CSP/consent rules.
|
|
33
31
|
*/
|
|
34
32
|
suppressOnError?: boolean;
|
|
35
33
|
}
|
|
@@ -122,53 +120,6 @@ export declare function apiGet<T>(endpoint: string, options?: ApiRequestOptions)
|
|
|
122
120
|
export declare function apiPost<T>(endpoint: string, body?: unknown, options?: ApiRequestOptions): Promise<ApiResult<T>>;
|
|
123
121
|
export declare function apiPut<T>(endpoint: string, body?: unknown, options?: ApiRequestOptions): Promise<ApiResult<T>>;
|
|
124
122
|
export declare function apiDelete<T>(endpoint: string, options?: ApiRequestOptions): Promise<ApiResult<T>>;
|
|
125
|
-
/** One priced line in a tax quote. `amountCents` is the LINE total, not unit. */
|
|
126
|
-
export interface TaxPreviewLineItem {
|
|
127
|
-
amountCents: number;
|
|
128
|
-
reference: string;
|
|
129
|
-
quantity: number;
|
|
130
|
-
}
|
|
131
|
-
export interface TaxPreviewRequest {
|
|
132
|
-
venueId: number;
|
|
133
|
-
/** WHICH SHOW the quote is for — honours a per-event tax exemption (MIC-2606). */
|
|
134
|
-
eventId?: number;
|
|
135
|
-
lineItems: TaxPreviewLineItem[];
|
|
136
|
-
/** Order-level promo discount in integer cents (MIC-2567). */
|
|
137
|
-
discountCents?: number;
|
|
138
|
-
/** Ask the server for the authoritative service fee alongside the tax. */
|
|
139
|
-
computeServiceFee?: boolean;
|
|
140
|
-
}
|
|
141
|
-
/** Both fields are integer CENTS, and both are contract-optional. */
|
|
142
|
-
export interface TaxPreviewResponse {
|
|
143
|
-
taxTotal?: number;
|
|
144
|
-
serviceFeeCents?: number;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Server-authoritative tax (and, optionally, service fee) quote.
|
|
148
|
-
*
|
|
149
|
-
* Exists so the cart summary does not have to bypass this client to get one.
|
|
150
|
-
* The raw `fetch` it replaces hardcoded `https://get-micdrop.com/...`, which is
|
|
151
|
-
* the whole third-party-domain bug in one line: an embed on a venue's own
|
|
152
|
-
* domain could not retarget it at all, so a self-hosted or proxied deployment
|
|
153
|
-
* quoted tax from the wrong origin (or, under a strict CSP, not at all).
|
|
154
|
-
*
|
|
155
|
-
* `suppressOnError` defaults TRUE because a 422 here is a documented, handled
|
|
156
|
-
* answer — "this venue has no address configured for Stripe Tax, show $0" — and
|
|
157
|
-
* routing it through the global onError handler is what made the raw fetch look
|
|
158
|
-
* necessary. Callers still see the 422 in `statusCode` and must apply their own
|
|
159
|
-
* fallback; genuine 5xx/network failures are theirs to log.
|
|
160
|
-
*
|
|
161
|
-
* @param req - the quote request; `lineItems` may be empty, but prefer not
|
|
162
|
-
* calling at all in that case (the server has nothing to price).
|
|
163
|
-
* @param options.signal - abort a superseded quote. An abort comes back as
|
|
164
|
-
* `{ aborted: true }`, NOT as a failure, so a debouncing caller can return
|
|
165
|
-
* early without clobbering the numbers it is still showing.
|
|
166
|
-
*/
|
|
167
|
-
export declare function taxPreview(req: TaxPreviewRequest, options?: {
|
|
168
|
-
signal?: AbortSignal;
|
|
169
|
-
suppressOnError?: boolean;
|
|
170
|
-
widgetKey?: string;
|
|
171
|
-
}): Promise<ApiResult<TaxPreviewResponse>>;
|
|
172
123
|
/**
|
|
173
124
|
* Whether a GET to `url` answers 2xx. Reads no body and reports nothing.
|
|
174
125
|
*
|
|
@@ -187,4 +138,14 @@ export declare function apiResponds(url: string, options?: Pick<ApiRequestOption
|
|
|
187
138
|
* credentials; see the apiRequest comment for why that is the point.
|
|
188
139
|
*/
|
|
189
140
|
export declare function simpleFetch<T>(url: string, options?: RequestInit & Pick<ApiRequestOptions, 'widgetKey'>): Promise<T | null>;
|
|
141
|
+
/**
|
|
142
|
+
* simpleFetch that also hands back the HTTP status of a refused request, so a
|
|
143
|
+
* loader can tell a 403 (this site may not read this calendar) from a network
|
|
144
|
+
* or server failure. `status` is 0 when no response arrived at all.
|
|
145
|
+
*/
|
|
146
|
+
export declare const simpleFetchWithStatus: typeof requestJson;
|
|
147
|
+
declare function requestJson<T>(url: string, options?: RequestInit & Pick<ApiRequestOptions, 'widgetKey'>): Promise<{
|
|
148
|
+
data: T | null;
|
|
149
|
+
status: number;
|
|
150
|
+
}>;
|
|
190
151
|
export {};
|
package/dist/api/events.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare function fetchEventDetailsResult(eventId: string | number, custom
|
|
|
21
21
|
* Gets full event information including venue and ticket data.
|
|
22
22
|
*
|
|
23
23
|
* Fail-open adapter over {@link fetchEventDetailsResult}: existing in-widget
|
|
24
|
-
* callers (Checkout,
|
|
24
|
+
* callers (Checkout, EventPage) keep degrading to `null` on any
|
|
25
25
|
* failure. SSR loaders that need to answer 404-vs-503 use the Result variant.
|
|
26
26
|
*
|
|
27
27
|
* @param eventId - The event ID
|
|
@@ -97,6 +97,20 @@ export interface MonthReadOptions {
|
|
|
97
97
|
* Returns whether a month was parked.
|
|
98
98
|
*/
|
|
99
99
|
export declare function primeOrgMonthEvents(orgId: string | number, firstMonth: unknown, req?: Pick<ApiRequestOptions, 'widgetKey'>): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Park months the embed's first piece already read (src/lib/split), so the full
|
|
102
|
+
* widget it hands over to draws from them instead of asking again.
|
|
103
|
+
*
|
|
104
|
+
* Same hand-off as `primeOrgMonthEvents`, for whichever feed the calendar
|
|
105
|
+
* reads: the organization feed when `organizationId` is set, else the venue
|
|
106
|
+
* feed — CalendarContainer.loadMonthEvents' own rule. Parked at the moment of
|
|
107
|
+
* the hand-over, so the TTL counts from then: the data is exactly as old as the
|
|
108
|
+
* card the visitor is looking at.
|
|
109
|
+
*/
|
|
110
|
+
export declare function primeMonthEvents(feed: {
|
|
111
|
+
organizationId?: string | number;
|
|
112
|
+
venueId?: string | number;
|
|
113
|
+
}, year: number, month: number, events: Event[], req?: Pick<ApiRequestOptions, 'widgetKey'>): boolean;
|
|
100
114
|
export declare function getMonthEventsResult(venueId: string | number, year: number, month: number, options?: MonthReadOptions, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Result<Event[]>>;
|
|
101
115
|
export declare function getMonthEvents(venueId: string | number, year: number, month: number, req?: Pick<ApiRequestOptions, 'widgetKey'>): Promise<Event[]>;
|
|
102
116
|
/**
|
package/dist/api/result.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export type Result<T> = {
|
|
|
29
29
|
ok: false;
|
|
30
30
|
error: string;
|
|
31
31
|
notFound?: boolean;
|
|
32
|
+
forbidden?: boolean;
|
|
32
33
|
};
|
|
33
34
|
/** Wrap a successful value. */
|
|
34
35
|
export declare function ok<T>(data: T): Result<T>;
|
|
@@ -49,6 +50,13 @@ export declare function err(error: string): Result<never>;
|
|
|
49
50
|
* channel exists to prevent (a fetch blip becoming a permanent 404).
|
|
50
51
|
*/
|
|
51
52
|
export declare function errNotFound(error: string): Result<never>;
|
|
53
|
+
/**
|
|
54
|
+
* Wrap a refusal (upstream 403): the API will not answer this caller at all —
|
|
55
|
+
* on the public surface, a widget on a domain the venue has not allowed, or
|
|
56
|
+
* one sent without its key. Retrying cannot help, so a caller shows that the
|
|
57
|
+
* calendar is not enabled for the site rather than a connection error.
|
|
58
|
+
*/
|
|
59
|
+
export declare function errForbidden(error: string): Result<never>;
|
|
52
60
|
/** Narrowing guard — true when the result carries data. */
|
|
53
61
|
export declare function isOk<T>(result: Result<T>): result is {
|
|
54
62
|
ok: true;
|
|
@@ -67,6 +75,7 @@ export declare function isErr<T>(result: Result<T>): result is {
|
|
|
67
75
|
ok: false;
|
|
68
76
|
error: string;
|
|
69
77
|
notFound?: boolean;
|
|
78
|
+
forbidden?: boolean;
|
|
70
79
|
};
|
|
71
80
|
/**
|
|
72
81
|
* Collapse a Result to its data, substituting `fallback` on failure.
|