@cimplify/sdk 0.90.0 → 0.93.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/advanced.d.mts +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-KJP4U6L3.js → chunk-6Y7KC5YZ.js} +23 -0
- package/dist/{chunk-JVWFIFQ7.js → chunk-AWNWP5J3.js} +4 -4
- package/dist/{chunk-2UDEWILL.mjs → chunk-FKARGZK3.mjs} +307 -90
- package/dist/{chunk-T7Z25EY4.js → chunk-HKN3YG76.js} +84 -0
- package/dist/{chunk-BN4V4ONE.js → chunk-QLGZIBRO.js} +348 -128
- package/dist/{chunk-NGE37REW.mjs → chunk-QXWX7CD2.mjs} +2 -2
- package/dist/{chunk-OZDDHSIB.mjs → chunk-RRBY35TJ.mjs} +80 -1
- package/dist/{chunk-GHFDYM5K.js → chunk-VEOAMBEX.js} +11 -4
- package/dist/{chunk-ZU4ZRYUR.mjs → chunk-VUSHG3HA.mjs} +11 -4
- package/dist/{chunk-NNGKC3MM.mjs → chunk-X36FZZT6.mjs} +23 -0
- package/dist/{client-YiSelM7x.d.mts → client-BTL9d_nN.d.mts} +117 -11
- package/dist/{client-CR1f94wY.d.ts → client-BX30FAWZ.d.ts} +117 -11
- package/dist/{client-DMttx1xk.d.mts → client-Bhe2TnFW.d.mts} +2 -2
- package/dist/{client-CqpOcbin.d.ts → client-DrkuEK_I.d.ts} +2 -2
- package/dist/{index-DD9z396M.d.mts → index-BuNjyfaV.d.mts} +3 -3
- package/dist/{index-CxTVu0HZ.d.ts → index-D-w5h82t.d.ts} +3 -3
- package/dist/index.d.mts +49 -7
- package/dist/index.d.ts +49 -7
- package/dist/index.js +103 -83
- package/dist/index.mjs +5 -5
- package/dist/mock/cli.mjs +23 -0
- package/dist/mock/library.js +23 -0
- package/dist/mock/library.mjs +23 -0
- package/dist/mock/msw.js +23 -0
- package/dist/mock/msw.mjs +23 -0
- package/dist/{payment-BX7ccIKY.d.ts → payment-By0JidTe.d.ts} +1 -1
- package/dist/{payment-5d8FTA1q.d.mts → payment-pKPpaORI.d.mts} +1 -1
- package/dist/{price-DtfP_Xfq.d.ts → price-23RNXftz.d.ts} +1 -1
- package/dist/{price-arl_4Rzn.d.mts → price-BvRtp6ak.d.mts} +1 -1
- package/dist/{product-DZX4QuKS.d.ts → product-O8-wcHSe.d.mts} +49 -0
- package/dist/{product-DZX4QuKS.d.mts → product-O8-wcHSe.d.ts} +49 -0
- package/dist/react.d.mts +79 -6
- package/dist/react.d.ts +79 -6
- package/dist/react.js +607 -379
- package/dist/react.mjs +539 -315
- package/dist/{server-BceZMxcK.d.mts → server-BN9ZCAKT.d.mts} +5 -1
- package/dist/{server-DoJGSC7L.d.ts → server-DDGbfW_S.d.ts} +5 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +7 -7
- package/dist/server.mjs +2 -2
- package/dist/styles.css +1 -1
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +2 -2
- package/dist/testing/msw.mjs +1 -1
- package/dist/testing/suite.d.mts +6 -6
- package/dist/testing/suite.d.ts +6 -6
- package/dist/testing/suite.js +23 -23
- package/dist/testing/suite.mjs +4 -4
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.js +79 -79
- package/dist/testing.mjs +5 -5
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/package.json +1 -1
- package/registry/booking-page.json +1 -1
- package/registry/chat-widget.json +1 -1
- package/registry/customer-input-fields.json +1 -1
- package/registry/date-slot-picker.json +1 -1
- package/registry/product-customizer.json +1 -1
- package/registry/rental-service-card.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as CimplifyError, S as Category, aZ as Product, f as AddOnWithOptions, aQ as Pagination, bb as ProductWithDetails, b9 as ProductVariant, bF as VariantAxis, bG as VariantAxisSelection, A as AddOn, W as Collection, G as BundleSummary, u as Bundle, a3 as Composite, a1 as ComponentSelectionInput, a8 as CompositePriceResult, U as ChosenPrice, b6 as ProductTaxonomy, bx as TaxonomyWithChildren, ax as EligiblePlansQuery, b1 as ProductBillingPlan, b7 as ProductTimeProfile, b0 as ProductAvailabilityNow, aj as Deal, b2 as ProductDealInfo, ap as DiscountValidation, bu as TagsResponse, ae as CustomAttributeDefinition, af as CustomAttributeValue, bc as PropertyFacet, bw as TaxonomyAttributeTemplate, aJ as KnowledgeArticle, by as UICart, L as CartItem, Q as CartSummary, g as AddToCartInput, N as CartMutationResult, bE as UpdateCartItemInput, ao as DiscountDetails, aO as Money, ad as CurrencyCode, aK as LineConfiguration, bL as VariantDetails, bM as VariantDetailsDTO, a as AddOnDetails, d as AddOnOptionDetails, b as AddOnGroupDetails, D as BundleSelectionData, aa as CompositeSelectionData, ag as CustomerInputValue, bS as components, bk as SchedulingMode, av as DurationUnit, bo as Subscription, bs as SubscriptionWithDetails } from './product-
|
|
2
|
-
import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-
|
|
1
|
+
import { V as CimplifyError, S as Category, aZ as Product, f as AddOnWithOptions, aQ as Pagination, bb as ProductWithDetails, b9 as ProductVariant, bF as VariantAxis, bG as VariantAxisSelection, A as AddOn, W as Collection, G as BundleSummary, u as Bundle, a3 as Composite, a1 as ComponentSelectionInput, a8 as CompositePriceResult, U as ChosenPrice, b6 as ProductTaxonomy, bx as TaxonomyWithChildren, ax as EligiblePlansQuery, b1 as ProductBillingPlan, b7 as ProductTimeProfile, b0 as ProductAvailabilityNow, aj as Deal, b2 as ProductDealInfo, ap as DiscountValidation, bu as TagsResponse, ae as CustomAttributeDefinition, af as CustomAttributeValue, bc as PropertyFacet, bw as TaxonomyAttributeTemplate, aJ as KnowledgeArticle, by as UICart, L as CartItem, Q as CartSummary, g as AddToCartInput, N as CartMutationResult, bE as UpdateCartItemInput, ao as DiscountDetails, aO as Money, ad as CurrencyCode, aK as LineConfiguration, bL as VariantDetails, bM as VariantDetailsDTO, a as AddOnDetails, d as AddOnOptionDetails, b as AddOnGroupDetails, D as BundleSelectionData, aa as CompositeSelectionData, ag as CustomerInputValue, bS as components, bk as SchedulingMode, av as DurationUnit, bo as Subscription, bs as SubscriptionWithDetails } from './product-O8-wcHSe.js';
|
|
2
|
+
import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-By0JidTe.js';
|
|
3
3
|
|
|
4
4
|
interface RequestContext {
|
|
5
5
|
method: "GET" | "POST" | "PATCH" | "DELETE";
|
|
@@ -65,12 +65,43 @@ interface OutboxFullEvent {
|
|
|
65
65
|
operation: string;
|
|
66
66
|
idempotencyKey: string;
|
|
67
67
|
}
|
|
68
|
+
interface TokenChangedEvent {
|
|
69
|
+
token: string | null;
|
|
70
|
+
}
|
|
71
|
+
interface SessionClaimedEvent {
|
|
72
|
+
sessionToken: string;
|
|
73
|
+
threadId: string | null;
|
|
74
|
+
customerName: string;
|
|
75
|
+
}
|
|
76
|
+
declare const MUTATION_ERROR: "mutation:error";
|
|
77
|
+
declare const OUTBOX_REPLAY_SUCCESS: "outbox:replay-success";
|
|
78
|
+
declare const OUTBOX_REPLAY_ERROR: "outbox:replay-error";
|
|
79
|
+
declare const OUTBOX_DEAD_LETTER: "outbox:dead-letter";
|
|
80
|
+
declare const OUTBOX_FULL: "outbox:full";
|
|
81
|
+
declare const AUTH_TOKEN_CHANGED: "auth:token-changed";
|
|
82
|
+
declare const SESSION_CLAIMED: "session:claimed";
|
|
83
|
+
declare const SESSION_CLEARED: "session:cleared";
|
|
68
84
|
interface ClientEventMap {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
85
|
+
[MUTATION_ERROR]: MutationErrorEvent;
|
|
86
|
+
[OUTBOX_REPLAY_SUCCESS]: OutboxReplayEvent;
|
|
87
|
+
[OUTBOX_REPLAY_ERROR]: OutboxReplayErrorEvent;
|
|
88
|
+
[OUTBOX_DEAD_LETTER]: OutboxReplayEvent;
|
|
89
|
+
[OUTBOX_FULL]: OutboxFullEvent;
|
|
90
|
+
[AUTH_TOKEN_CHANGED]: TokenChangedEvent;
|
|
91
|
+
/**
|
|
92
|
+
* The anonymous session was claimed for a verified Link identity: the
|
|
93
|
+
* session token rotated (already adopted by the client) and server-side
|
|
94
|
+
* state — conversation, cart, orders — now resolves customer-first.
|
|
95
|
+
* Consumers should refetch anything session-derived.
|
|
96
|
+
*/
|
|
97
|
+
[SESSION_CLAIMED]: SessionClaimedEvent;
|
|
98
|
+
/**
|
|
99
|
+
* The session was cleared (sign-out): the access token is gone and a
|
|
100
|
+
* fresh anonymous session token was minted. Everything keyed to the old
|
|
101
|
+
* session — conversation, cart, identity — must reset, not linger for
|
|
102
|
+
* the next person at this browser.
|
|
103
|
+
*/
|
|
104
|
+
[SESSION_CLEARED]: Record<string, never>;
|
|
74
105
|
}
|
|
75
106
|
type ClientEventName = keyof ClientEventMap;
|
|
76
107
|
type ClientEventListener<K extends ClientEventName> = (payload: ClientEventMap[K]) => void;
|
|
@@ -1381,6 +1412,10 @@ interface CheckoutFormData {
|
|
|
1381
1412
|
/** Store-credit voucher / gift code to claim into the wallet and apply to this
|
|
1382
1413
|
* order. Presenting a code implies applying store credit. */
|
|
1383
1414
|
voucher_code?: string;
|
|
1415
|
+
/** Pay only the required deposit now (balance collected later) instead of the
|
|
1416
|
+
* full total. Only honored when the order is deposit-eligible and paying in
|
|
1417
|
+
* the order's native currency. */
|
|
1418
|
+
pay_deposit?: boolean;
|
|
1384
1419
|
}
|
|
1385
1420
|
type NextAction = {
|
|
1386
1421
|
type: "none";
|
|
@@ -1560,6 +1595,7 @@ interface EnrichedOrderItem {
|
|
|
1560
1595
|
scheduled_end?: string;
|
|
1561
1596
|
confirmation_code?: string;
|
|
1562
1597
|
primary_staff_id?: string;
|
|
1598
|
+
units?: number;
|
|
1563
1599
|
base_price: Money;
|
|
1564
1600
|
add_ons_price: Money;
|
|
1565
1601
|
total_price: Money;
|
|
@@ -2005,6 +2041,7 @@ interface Service {
|
|
|
2005
2041
|
duration_value?: number;
|
|
2006
2042
|
duration_minutes: number;
|
|
2007
2043
|
duration_unit?: DurationUnit;
|
|
2044
|
+
price_basis?: "flat" | "per_person" | "per_duration_unit";
|
|
2008
2045
|
image_url?: string | null;
|
|
2009
2046
|
category_id?: string | null;
|
|
2010
2047
|
is_available: boolean;
|
|
@@ -2108,6 +2145,8 @@ interface GetAvailableSlotsInput {
|
|
|
2108
2145
|
service_id: string;
|
|
2109
2146
|
date: string;
|
|
2110
2147
|
participant_count?: number;
|
|
2148
|
+
/** Whole units needed; slots that can't seat them drop out. Default 1. */
|
|
2149
|
+
units?: number;
|
|
2111
2150
|
variant_id?: string;
|
|
2112
2151
|
}
|
|
2113
2152
|
interface CheckSlotAvailabilityInput {
|
|
@@ -2163,6 +2202,8 @@ interface ServiceAvailabilityParams {
|
|
|
2163
2202
|
end_date: string;
|
|
2164
2203
|
location_id?: string;
|
|
2165
2204
|
participant_count?: number;
|
|
2205
|
+
/** Whole units needed; short check-in days report unavailable. Default 1. */
|
|
2206
|
+
units?: number;
|
|
2166
2207
|
variant_id?: string;
|
|
2167
2208
|
}
|
|
2168
2209
|
interface ServiceAvailabilityResult {
|
|
@@ -2254,7 +2295,11 @@ interface LiteBootstrapLocation {
|
|
|
2254
2295
|
interface LiteBootstrap {
|
|
2255
2296
|
business: LiteBootstrapBusiness;
|
|
2256
2297
|
categories: LiteBootstrapCategory[];
|
|
2298
|
+
/** The resolved ordering location: the QR / query choice, else the first
|
|
2299
|
+
* active branch. Null only for a business with no locations at all. */
|
|
2257
2300
|
location?: LiteBootstrapLocation | null;
|
|
2301
|
+
/** Every active branch — more than one means the customer can switch. */
|
|
2302
|
+
locations?: LiteBootstrapLocation[];
|
|
2258
2303
|
}
|
|
2259
2304
|
interface LiteResource {
|
|
2260
2305
|
id: string;
|
|
@@ -2299,6 +2344,10 @@ declare class FxService {
|
|
|
2299
2344
|
lockQuote(request: FxQuoteRequest, opts?: IdempotencyOption$3): Promise<Result<FxQuote, CimplifyError>>;
|
|
2300
2345
|
}
|
|
2301
2346
|
|
|
2347
|
+
interface TrackPageViewOptions {
|
|
2348
|
+
pagePath?: string;
|
|
2349
|
+
pageTitle?: string;
|
|
2350
|
+
}
|
|
2302
2351
|
interface TrackProductViewOptions {
|
|
2303
2352
|
productName?: string;
|
|
2304
2353
|
categoryId?: string;
|
|
@@ -2372,6 +2421,13 @@ declare class ActivityService {
|
|
|
2372
2421
|
*/
|
|
2373
2422
|
startSession(): void;
|
|
2374
2423
|
private buildSessionPayload;
|
|
2424
|
+
/**
|
|
2425
|
+
* Record a page the visitor landed on. Product and category views already
|
|
2426
|
+
* imply one, so call this for everything else — home, listings, booking,
|
|
2427
|
+
* checkout — or entry pages, exits and bounce rate are computed from
|
|
2428
|
+
* product pages alone.
|
|
2429
|
+
*/
|
|
2430
|
+
trackPageView(options?: TrackPageViewOptions): void;
|
|
2375
2431
|
trackProductView(productId: string, options?: TrackProductViewOptions): void;
|
|
2376
2432
|
trackCategoryView(categoryId: string, options?: TrackCategoryViewOptions): void;
|
|
2377
2433
|
getState(): Promise<Result<ActivityStateResponse, CimplifyError>>;
|
|
@@ -2509,6 +2565,8 @@ interface ChatMessage {
|
|
|
2509
2565
|
metadata: Record<string, unknown>;
|
|
2510
2566
|
/** Server-resolved quote context; absent when the message isn't a reply. */
|
|
2511
2567
|
reply_to?: ChatReplyContext | null;
|
|
2568
|
+
/** Echo of the sender's idempotency key on widget customer messages. */
|
|
2569
|
+
client_id?: string | null;
|
|
2512
2570
|
created_at: string;
|
|
2513
2571
|
}
|
|
2514
2572
|
/**
|
|
@@ -2560,13 +2618,17 @@ type ChatReplyCard = {
|
|
|
2560
2618
|
order_number?: string;
|
|
2561
2619
|
status?: string;
|
|
2562
2620
|
};
|
|
2563
|
-
declare function chatMessageCards(message: {
|
|
2564
|
-
metadata: Record<string, unknown>;
|
|
2565
|
-
}): ChatReplyCard[];
|
|
2566
2621
|
interface ChatConversationResponse {
|
|
2567
2622
|
conversation: ChatConversation;
|
|
2568
2623
|
messages: ChatMessage[];
|
|
2569
2624
|
}
|
|
2625
|
+
interface ClaimConversationResult {
|
|
2626
|
+
/** The rotated, customer-bound session token; the SDK adopts it automatically. */
|
|
2627
|
+
session_token: string;
|
|
2628
|
+
/** The adopted (or merged-into) conversation; null when there was nothing to adopt. */
|
|
2629
|
+
thread_id?: string | null;
|
|
2630
|
+
customer_name: string;
|
|
2631
|
+
}
|
|
2570
2632
|
interface ChatWidgetStarter {
|
|
2571
2633
|
icon?: string;
|
|
2572
2634
|
text: string;
|
|
@@ -2577,7 +2639,30 @@ interface IdempotencyOption {
|
|
|
2577
2639
|
}
|
|
2578
2640
|
declare class SupportService {
|
|
2579
2641
|
private client;
|
|
2642
|
+
private claimInFlight;
|
|
2643
|
+
private claimInFlightToken;
|
|
2644
|
+
private lastClaimedAccessToken;
|
|
2645
|
+
private claimedName;
|
|
2580
2646
|
constructor(client: CimplifyClient);
|
|
2647
|
+
/** The verified customer this session's conversation was claimed for, null while anonymous. */
|
|
2648
|
+
get claimedCustomerName(): string | null;
|
|
2649
|
+
/**
|
|
2650
|
+
* Claim the anonymous session for the verified Link identity: the server
|
|
2651
|
+
* verifies the access token, rotates the session token (adopted here, so
|
|
2652
|
+
* every subsequent request rides the bound session), folds the guest cart
|
|
2653
|
+
* in, and adopts or merges the widget conversation.
|
|
2654
|
+
*
|
|
2655
|
+
* Idempotent and single-flight: concurrent calls share one request, and a
|
|
2656
|
+
* token already claimed by this instance short-circuits without a network
|
|
2657
|
+
* round trip. Emits `session:claimed` on the client's event channel.
|
|
2658
|
+
*/
|
|
2659
|
+
claimConversation(): Promise<Result<ClaimConversationResult, CimplifyError>>;
|
|
2660
|
+
/**
|
|
2661
|
+
* Peek at the conversation without creating one: resolves the existing
|
|
2662
|
+
* thread (or null) so a page load can hydrate history without littering
|
|
2663
|
+
* the inbox with empty threads.
|
|
2664
|
+
*/
|
|
2665
|
+
peekConversation(): Promise<Result<ChatConversationResponse | null, CimplifyError>>;
|
|
2581
2666
|
/** Open (or resume) the customer's widget conversation. */
|
|
2582
2667
|
openConversation(opts?: IdempotencyOption): Promise<Result<ChatConversationResponse, CimplifyError>>;
|
|
2583
2668
|
/**
|
|
@@ -2708,6 +2793,7 @@ declare function createElements(client: CimplifyClient, businessId?: string, opt
|
|
|
2708
2793
|
interface RequestOptions {
|
|
2709
2794
|
idempotencyKey?: string;
|
|
2710
2795
|
headers?: Record<string, string>;
|
|
2796
|
+
timeoutMs?: number;
|
|
2711
2797
|
}
|
|
2712
2798
|
/**
|
|
2713
2799
|
* Per-call cache hints for server-side reads. Forwarded as `next: { revalidate, tags }`
|
|
@@ -2751,6 +2837,7 @@ declare class CimplifyClient {
|
|
|
2751
2837
|
private credentials;
|
|
2752
2838
|
private accessToken;
|
|
2753
2839
|
private sessionToken;
|
|
2840
|
+
private sessionEpoch;
|
|
2754
2841
|
private timeout;
|
|
2755
2842
|
private maxRetries;
|
|
2756
2843
|
private retryDelay;
|
|
@@ -2794,7 +2881,25 @@ declare class CimplifyClient {
|
|
|
2794
2881
|
getCredentialsMode(): RequestCredentials;
|
|
2795
2882
|
isTestMode(): boolean;
|
|
2796
2883
|
setAccessToken(token: string | null): void;
|
|
2884
|
+
/**
|
|
2885
|
+
* Zero-UI claim: a freshly verified customer identity (OTP verify, silent
|
|
2886
|
+
* refresh restore) binds the anonymous session so the conversation, cart
|
|
2887
|
+
* and orders survive a cleared browser. Best-effort by design — a failed
|
|
2888
|
+
* claim leaves the session anonymous, exactly as it was. Called by the
|
|
2889
|
+
* auth flows, never by the raw token setter.
|
|
2890
|
+
*/
|
|
2891
|
+
autoClaimChatIdentity(): void;
|
|
2892
|
+
/**
|
|
2893
|
+
* Adopt a server-rotated session token (claim flow). The old token stays
|
|
2894
|
+
* in flight-safe use until the next request; the storage swap makes the
|
|
2895
|
+
* rotation durable across reloads.
|
|
2896
|
+
*/
|
|
2897
|
+
adoptSessionToken(token: string): void;
|
|
2797
2898
|
clearSession(): void;
|
|
2899
|
+
getSessionEpoch(): number;
|
|
2900
|
+
publishSessionClaimed(customerName: string | null): void;
|
|
2901
|
+
private broadcastSessionSync;
|
|
2902
|
+
private watchCrossTabSession;
|
|
2798
2903
|
setOrderToken(orderId: string, token: string): void;
|
|
2799
2904
|
getOrderToken(orderId: string): string | null;
|
|
2800
2905
|
clearOrderTokens(): void;
|
|
@@ -2805,6 +2910,7 @@ declare class CimplifyClient {
|
|
|
2805
2910
|
getBusinessId(): string | null;
|
|
2806
2911
|
resolveBusinessId(): Promise<string>;
|
|
2807
2912
|
private authedFetch;
|
|
2913
|
+
private safeStorage;
|
|
2808
2914
|
private loadSessionToken;
|
|
2809
2915
|
/**
|
|
2810
2916
|
* Mint the session token client-side so the very first request already
|
|
@@ -2853,4 +2959,4 @@ declare class CimplifyClient {
|
|
|
2853
2959
|
}
|
|
2854
2960
|
declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
|
|
2855
2961
|
|
|
2856
|
-
export { type CheckSlotAvailabilityInput as $, AUTHORIZATION_TYPE as A, type Booking as B, BusinessService as C, type BusinessSettings as D, type BusinessWithLocations as E, CHECKOUT_MODE as F, CHECKOUT_MUTATION as G, CHECKOUT_STEP as H, CONTACT_TYPE as I, type CacheOptions as J, type CancelBookingInput as K, type CancelBookingResult as L, type CancelOrderInput as M, type CancellationPolicy as N, CartOperations as O, CatalogueQueries as P, type CatalogueResult as Q, type CatalogueSnapshot as R, type CategoryInfo as S, type ChatAttachment as T, type ChatConversation as U, type ChatConversationResponse as V, type ChatMessage as W, type ChatReplyCard as X, type ChatReplyContext as Y, type ChatUploadAttachment as Z, type ChatWidgetStarter as _, AUTH_MUTATION as a, type
|
|
2962
|
+
export { type CheckSlotAvailabilityInput as $, AUTHORIZATION_TYPE as A, type Booking as B, BusinessService as C, type BusinessSettings as D, type BusinessWithLocations as E, CHECKOUT_MODE as F, CHECKOUT_MUTATION as G, CHECKOUT_STEP as H, CONTACT_TYPE as I, type CacheOptions as J, type CancelBookingInput as K, type CancelBookingResult as L, type CancelOrderInput as M, type CancellationPolicy as N, CartOperations as O, CatalogueQueries as P, type CatalogueResult as Q, type CatalogueSnapshot as R, type CategoryInfo as S, type ChatAttachment as T, type ChatConversation as U, type ChatConversationResponse as V, type ChatMessage as W, type ChatReplyCard as X, type ChatReplyContext as Y, type ChatUploadAttachment as Z, type ChatWidgetStarter as _, AUTH_MUTATION as a, type EnrollAndLinkOrderInput as a$, type CheckSlotAvailabilityResult as a0, type CheckoutAddressInfo as a1, type CheckoutCartData as a2, type CheckoutCartItem as a3, type CheckoutCustomerInfo as a4, type CheckoutFormData as a5, type CheckoutInput as a6, type CheckoutMode as a7, type CheckoutOrderType as a8, type CheckoutPaymentMethod as a9, type DeliveryFeeResponse as aA, type DeliveryOption as aB, type DeliveryOptionsResponse as aC, DeliveryService as aD, type DepositResult as aE, type DeviceType as aF, type DismissMessageResponse as aG, ELEMENTS_AUTH_CONTACT_TYPES as aH, ELEMENTS_AUTH_MODES as aI, ELEMENTS_AUTH_PROMPTS as aJ, ELEMENT_TYPES as aK, EVENT_TYPES as aL, type ElementAppearance as aM, type ElementEventHandler as aN, type ElementEventType as aO, type ElementOptions as aP, type ElementType as aQ, type ElementsAuthContactType as aR, type ElementsAuthMode as aS, type ElementsAuthOptions as aT, type ElementsAuthPrompt as aU, type ElementsCheckoutData as aV, type ElementsCheckoutResult as aW, type ElementsCustomerInfo as aX, type ElementsOptions as aY, type EnrichedOrder as aZ, type EnrichedOrderItem as a_, type CheckoutResult as aa, CheckoutService as ab, type CheckoutStatus as ac, type CheckoutStatusContext as ad, type CheckoutStep as ae, CimplifyClient as af, type CimplifyConfig as ag, CimplifyElement as ah, CimplifyElements as ai, type ClaimConversationResult as aj, type ContactType as ak, type ContentType as al, type CreateAddressInput as am, type CreateMobileMoneyInput as an, type Customer as ao, type CustomerAddress as ap, type CustomerBooking as aq, type CustomerBookingServiceItem as ar, type CustomerLinkPreferences as as, type CustomerMobileMoney as at, type CustomerServicePreferences as au, DEFAULT_COUNTRY as av, DEFAULT_CURRENCY as aw, DEVICE_TYPE as ax, type DayAvailability as ay, type DeliveryFeeDetails as az, type AbortablePromise as b, type OrderHistory as b$, type EnrollAndLinkOrderResult as b0, type EnrollmentData as b1, type Err as b2, type FeeBearerType as b3, type FetchQuoteInput as b4, type FulfillmentLink as b5, type FulfillmentStatus as b6, type FulfillmentSummaryDTO as b7, type FulfillmentType as b8, type FxQuote as b9, type LocationBooking as bA, type LocationTaxBehavior as bB, type LocationTaxOverrides as bC, type LocationTimeProfile as bD, type LocationWithDetails as bE, MESSAGE_TYPES as bF, MOBILE_MONEY_PROVIDER as bG, type MobileMoneyData as bH, type MobileMoneyDetails as bI, type MobileMoneyProvider as bJ, type NextAction as bK, ORDER_MUTATION as bL, ORDER_TYPE as bM, type ObservabilityHooks as bN, type Ok as bO, type Order as bP, type OrderCustomerInfo as bQ, type OrderDiscountInfo as bR, type OrderFilter as bS, type OrderFulfillmentSummary as bT, type OrderGroup as bU, type OrderGroupDetails as bV, type OrderGroupPayment as bW, type OrderGroupPaymentState as bX, type OrderGroupPaymentStatus as bY, type OrderGroupPaymentSummary as bZ, type OrderGroupStatus as b_, type FxQuoteRequest as ba, type FxQuoteStatus as bb, type FxRateResponse as bc, FxService as bd, type GetAvailableSlotsInput as be, type GetDeliveryOptionsParams as bf, type GetOrdersOptions as bg, type GetProductsOptions as bh, type GroupOrderInfo as bi, type IframeToParentMessage as bj, InventoryService as bk, LINK_MUTATION as bl, LINK_QUERY as bm, type LifecyclePhase as bn, type LineItem as bo, type LineType as bp, type LinkData as bq, type LinkEnrollResult as br, LinkService as bs, type LinkSession as bt, type LinkStatusResult as bu, type LiteBootstrap as bv, type LiteDayHours as bw, type LiteHoursRange as bx, LiteService as by, type Location as bz, type ActivityRecommendation as c, type RevokeAllSessionsResult as c$, type OrderLineState as c0, type OrderLineStatus as c1, type OrderLocationInfo as c2, type OrderPaymentEvent as c3, type OrderPricingView as c4, OrderQueries as c5, type OrderSplitDetail as c6, type OrderStaffInfo as c7, type OrderStatus as c8, type OrderTimestampsDTO as c9, type QuoteStatus as cA, type QuoteUiMessage as cB, type ReadRequestOptions as cC, type RefreshQuoteInput as cD, type RefreshQuoteResult as cE, type RefundOrderInput as cF, type RelatedCandidate as cG, type RelatedProduct as cH, type RelatedProductsEnrichment as cI, type RelationType as cJ, type ReminderMethod as cK, type ReminderSettings as cL, type ReorderResult as cM, type RequestContext as cN, type RequestErrorEvent as cO, type RequestOptions as cP, type RequestOtpInput as cQ, type RequestSource as cR, type RequestStartEvent as cS, type RequestSuccessEvent as cT, type RescheduleBookingInput as cU, type RescheduleBookingResult as cV, type RescheduleHistoryRecord as cW, type ResourceAssignment as cX, type ResourceInfo as cY, type Result as cZ, type RetryEvent as c_, type OrderType as ca, type Origin as cb, type OriginActor as cc, type OriginChannel as cd, type OtpResult as ce, PAYMENT_METHOD as cf, PAYMENT_MUTATION as cg, PAYMENT_STATE as ch, PICKUP_TIME_TYPE as ci, type ParentToIframeMessage as cj, type PaymentInfoDTO as ck, type PaymentMethodInfo as cl, type PaymentState as cm, type PickupTime as cn, type PickupTimeType as co, type PlaceDetailsResponse as cp, PlacesService as cq, type PriceQuote as cr, type PricingOverrides as cs, type ProcessAndResolveOptions as ct, type ProcessCheckoutOptions as cu, type ProcessCheckoutResult as cv, type ProviderResolutionSource as cw, type QuoteBundleSelectionInput as cx, type QuoteCompositeSelectionInput as cy, type QuoteDynamicBuckets as cz, type ActivityRecommendationsResponse as d, type RevokeSessionResult as d0, type Room as d1, type SchedulingMetadata as d2, type SchedulingResult as d3, SchedulingService as d4, type SenderType as d5, type Service as d6, type ServiceAvailabilityParams as d7, type ServiceAvailabilityResult as d8, type ServiceCharge as d9, type UpdateAddressInput as dA, type UpdateOrderStatusInput as dB, type UpdateProfileInput as dC, type UploadInitResponse as dD, type UploadResult as dE, UploadService as dF, type VerifyOtpInput as dG, combine as dH, combineObject as dI, createCimplifyClient as dJ, createElements as dK, err as dL, flatMap as dM, fromPromise as dN, getOrElse as dO, isErr as dP, isOk as dQ, mapError as dR, mapResult as dS, ok as dT, toNullable as dU, tryCatch as dV, unwrap as dW, type ServiceNotes as da, type ServiceScheduleRequest as db, type ServiceStatus as dc, type SessionActivityData as dd, type SessionChangeEvent as de, type SessionMessage as df, type SlotResourceInfo as dg, type SlotStaffInfo as dh, type Staff as di, type StaffAssignment as dj, type StaffRole as dk, type StaffScheduleItem as dl, type StockLevel as dm, type StockStatus as dn, type StoreCreditBalance as dp, StoreCreditQueries as dq, type StorefrontBootstrap as dr, SubscriptionService as ds, SupportService as dt, type Table as du, type TimeRange as dv, type TimeRanges as dw, type TimeSlot as dx, type TrackCategoryViewOptions as dy, type TrackProductViewOptions as dz, ActivityService as e, type ActivityStateResponse as f, type AddressData as g, type AddressInfo as h, type AmountToPay as i, type AuthResponse as j, AuthService as k, type AuthStatus as l, type AuthenticatedCustomer as m, type AuthenticatedData as n, type AutocompletePrediction as o, type AutocompleteResponse as p, type AvailabilityResult as q, type AvailableSlot as r, type BookingModificationType as s, type BookingStatus as t, type BookingWithDetails as u, type BufferTimes as v, type Business as w, type BusinessDetailsDTO as x, type BusinessHours as y, type BusinessPreferences as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { af as CimplifyClient } from './client-
|
|
2
|
-
import { A as AppHandle, C as CreateAppOptions } from './server-
|
|
1
|
+
import { af as CimplifyClient } from './client-BTL9d_nN.mjs';
|
|
2
|
+
import { A as AppHandle, C as CreateAppOptions } from './server-BN9ZCAKT.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Test client + fixtures.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { af as CimplifyClient } from './client-
|
|
2
|
-
import { A as AppHandle, C as CreateAppOptions } from './server-
|
|
1
|
+
import { af as CimplifyClient } from './client-BX30FAWZ.js';
|
|
2
|
+
import { A as AppHandle, C as CreateAppOptions } from './server-DDGbfW_S.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Test client + fixtures.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { aO as Money, ad as CurrencyCode, aX as PricePathTaxInfo, aZ as Product, bb as ProductWithDetails, be as QuantityPricingTier } from './product-
|
|
2
|
-
import { P as ProductWithPrice } from './price-
|
|
3
|
-
import { b as PaymentErrorDetails, g as PaymentResponse, i as PaymentStatusResponse } from './payment-
|
|
1
|
+
import { aO as Money, ad as CurrencyCode, aX as PricePathTaxInfo, aZ as Product, bb as ProductWithDetails, be as QuantityPricingTier } from './product-O8-wcHSe.mjs';
|
|
2
|
+
import { P as ProductWithPrice } from './price-BvRtp6ak.mjs';
|
|
3
|
+
import { b as PaymentErrorDetails, g as PaymentResponse, i as PaymentStatusResponse } from './payment-pKPpaORI.mjs';
|
|
4
4
|
import { CountryCode } from 'libphonenumber-js';
|
|
5
5
|
|
|
6
6
|
declare const CURRENCY_SYMBOLS: Record<string, string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { aO as Money, ad as CurrencyCode, aX as PricePathTaxInfo, aZ as Product, bb as ProductWithDetails, be as QuantityPricingTier } from './product-
|
|
2
|
-
import { P as ProductWithPrice } from './price-
|
|
3
|
-
import { b as PaymentErrorDetails, g as PaymentResponse, i as PaymentStatusResponse } from './payment-
|
|
1
|
+
import { aO as Money, ad as CurrencyCode, aX as PricePathTaxInfo, aZ as Product, bb as ProductWithDetails, be as QuantityPricingTier } from './product-O8-wcHSe.js';
|
|
2
|
+
import { P as ProductWithPrice } from './price-23RNXftz.js';
|
|
3
|
+
import { b as PaymentErrorDetails, g as PaymentResponse, i as PaymentStatusResponse } from './payment-By0JidTe.js';
|
|
4
4
|
import { CountryCode } from 'libphonenumber-js';
|
|
5
5
|
|
|
6
6
|
declare const CURRENCY_SYMBOLS: Record<string, string>;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
1
|
+
import { X as ChatReplyCard } from './client-BTL9d_nN.mjs';
|
|
2
|
+
export { A as AUTHORIZATION_TYPE, a as AUTH_MUTATION, b as AbortablePromise, c as ActivityRecommendation, d as ActivityRecommendationsResponse, e as ActivityService, f as ActivityStateResponse, g as AddressData, h as AddressInfo, i as AmountToPay, j as AuthResponse, k as AuthService, l as AuthStatus, m as AuthenticatedCustomer, n as AuthenticatedData, o as AutocompletePrediction, p as AutocompleteResponse, q as AvailabilityResult, r as AvailableSlot, B as Booking, s as BookingModificationType, t as BookingStatus, u as BookingWithDetails, v as BufferTimes, w as Business, x as BusinessDetailsDTO, y as BusinessHours, z as BusinessPreferences, C as BusinessService, D as BusinessSettings, E as BusinessWithLocations, F as CHECKOUT_MODE, G as CHECKOUT_MUTATION, H as CHECKOUT_STEP, I as CONTACT_TYPE, J as CacheOptions, K as CancelBookingInput, L as CancelBookingResult, M as CancelOrderInput, N as CancellationPolicy, O as CartOperations, P as CatalogueQueries, Q as CatalogueResult, R as CatalogueSnapshot, S as CategoryInfo, T as ChatAttachment, U as ChatConversation, V as ChatConversationResponse, W as ChatMessage, Y as ChatReplyContext, Z as ChatUploadAttachment, _ as ChatWidgetStarter, $ as CheckSlotAvailabilityInput, a0 as CheckSlotAvailabilityResult, a1 as CheckoutAddressInfo, a2 as CheckoutCartData, a3 as CheckoutCartItem, a4 as CheckoutCustomerInfo, a5 as CheckoutFormData, a6 as CheckoutInput, a7 as CheckoutMode, ab as CheckoutOperations, a8 as CheckoutOrderType, a9 as CheckoutPaymentMethod, aa as CheckoutResult, ab as CheckoutService, ac as CheckoutStatus, ad as CheckoutStatusContext, ae as CheckoutStep, af as CimplifyClient, ag as CimplifyConfig, ah as CimplifyElement, ai as CimplifyElements, aj as ClaimConversationResult, ak as ContactType, al as ContentType, am as CreateAddressInput, an as CreateMobileMoneyInput, ao as Customer, ap as CustomerAddress, aq as CustomerBooking, ar as CustomerBookingServiceItem, as as CustomerLinkPreferences, at as CustomerMobileMoney, au as CustomerServicePreferences, av as DEFAULT_COUNTRY, aw as DEFAULT_CURRENCY, ax as DEVICE_TYPE, ay as DayAvailability, az as DeliveryFeeDetails, aA as DeliveryFeeResponse, aB as DeliveryOption, aC as DeliveryOptionsResponse, aD as DeliveryService, aE as DepositResult, aF as DeviceType, aG as DismissMessageResponse, aH as ELEMENTS_AUTH_CONTACT_TYPES, aI as ELEMENTS_AUTH_MODES, aJ as ELEMENTS_AUTH_PROMPTS, aK as ELEMENT_TYPES, aL as EVENT_TYPES, aM as ElementAppearance, aN as ElementEventHandler, aO as ElementEventType, aP as ElementOptions, aQ as ElementType, aR as ElementsAuthContactType, aS as ElementsAuthMode, aT as ElementsAuthOptions, aU as ElementsAuthPrompt, aV as ElementsCheckoutData, aW as ElementsCheckoutResult, aX as ElementsCustomerInfo, aY as ElementsOptions, aZ as EnrichedOrder, a_ as EnrichedOrderItem, a$ as EnrollAndLinkOrderInput, b0 as EnrollAndLinkOrderResult, b1 as EnrollmentData, b2 as Err, b3 as FeeBearerType, b4 as FetchQuoteInput, b5 as FulfillmentLink, b6 as FulfillmentStatus, b7 as FulfillmentSummaryDTO, b8 as FulfillmentType, b9 as FxQuote, ba as FxQuoteRequest, bb as FxQuoteStatus, bc as FxRateResponse, bd as FxService, be as GetAvailableSlotsInput, bf as GetDeliveryOptionsParams, bg as GetOrdersOptions, bh as GetProductsOptions, bi as GroupOrderInfo, bj as IframeToParentMessage, bk as InventoryService, bl as LINK_MUTATION, bm as LINK_QUERY, bn as LifecyclePhase, bo as LineItem, bp as LineType, bq as LinkData, br as LinkEnrollResult, bs as LinkService, bt as LinkSession, bu as LinkStatusResult, bv as LiteBootstrap, bw as LiteDayHours, bx as LiteHoursRange, by as LiteService, bz as Location, bA as LocationBooking, bB as LocationTaxBehavior, bC as LocationTaxOverrides, bD as LocationTimeProfile, bE as LocationWithDetails, bF as MESSAGE_TYPES, bG as MOBILE_MONEY_PROVIDER, bH as MobileMoneyData, bI as MobileMoneyDetails, bJ as MobileMoneyProvider, bK as NextAction, bL as ORDER_MUTATION, bM as ORDER_TYPE, bN as ObservabilityHooks, bO as Ok, bP as Order, bQ as OrderCustomerInfo, bR as OrderDiscountInfo, bS as OrderFilter, bT as OrderFulfillmentSummary, bU as OrderGroup, bV as OrderGroupDetails, bW as OrderGroupPayment, bX as OrderGroupPaymentState, bY as OrderGroupPaymentStatus, bZ as OrderGroupPaymentSummary, b_ as OrderGroupStatus, b$ as OrderHistory, c0 as OrderLineState, c1 as OrderLineStatus, c2 as OrderLocationInfo, c3 as OrderPaymentEvent, c4 as OrderPricingView, c5 as OrderQueries, c6 as OrderSplitDetail, c7 as OrderStaffInfo, c8 as OrderStatus, c9 as OrderTimestampsDTO, ca as OrderType, cb as Origin, cc as OriginActor, cd as OriginChannel, ce as OtpResult, cf as PAYMENT_METHOD, cg as PAYMENT_MUTATION, ch as PAYMENT_STATE, ci as PICKUP_TIME_TYPE, cj as ParentToIframeMessage, ck as PaymentInfoDTO, cl as PaymentMethodInfo, cm as PaymentState, cn as PickupTime, co as PickupTimeType, cp as PlaceDetailsResponse, cq as PlacesService, cr as PriceQuote, cs as PricingOverrides, ct as ProcessAndResolveOptions, cu as ProcessCheckoutOptions, cv as ProcessCheckoutResult, cw as ProviderResolutionSource, cx as QuoteBundleSelectionInput, cy as QuoteCompositeSelectionInput, cz as QuoteDynamicBuckets, cA as QuoteStatus, cB as QuoteUiMessage, cC as ReadRequestOptions, cD as RefreshQuoteInput, cE as RefreshQuoteResult, cF as RefundOrderInput, cG as RelatedCandidate, cH as RelatedProduct, cI as RelatedProductsEnrichment, cJ as RelationType, cK as ReminderMethod, cL as ReminderSettings, cM as ReorderResult, cN as RequestContext, cO as RequestErrorEvent, cP as RequestOptions, cQ as RequestOtpInput, cR as RequestSource, cS as RequestStartEvent, cT as RequestSuccessEvent, cU as RescheduleBookingInput, cV as RescheduleBookingResult, cW as RescheduleHistoryRecord, cX as ResourceAssignment, cY as ResourceInfo, cZ as Result, c_ as RetryEvent, c$ as RevokeAllSessionsResult, d0 as RevokeSessionResult, d1 as Room, d2 as SchedulingMetadata, d3 as SchedulingResult, d4 as SchedulingService, d5 as SenderType, d6 as Service, d7 as ServiceAvailabilityParams, d8 as ServiceAvailabilityResult, d9 as ServiceCharge, da as ServiceNotes, db as ServiceScheduleRequest, dc as ServiceStatus, dd as SessionActivityData, de as SessionChangeEvent, df as SessionMessage, dg as SlotResourceInfo, dh as SlotStaffInfo, di as Staff, dj as StaffAssignment, dk as StaffRole, dl as StaffScheduleItem, dm as StockLevel, dn as StockStatus, dp as StoreCreditBalance, dq as StoreCreditQueries, dr as StorefrontBootstrap, ds as SubscriptionService, dt as SupportService, du as Table, dv as TimeRange, dw as TimeRanges, dx as TimeSlot, dy as TrackCategoryViewOptions, dz as TrackProductViewOptions, dA as UpdateAddressInput, dB as UpdateOrderStatusInput, dC as UpdateProfileInput, dD as UploadInitResponse, dE as UploadResult, dF as UploadService, dG as VerifyOtpInput, dH as combine, dI as combineObject, dJ as createCimplifyClient, dK as createElements, dL as err, dM as flatMap, dN as fromPromise, dO as getOrElse, dP as isErr, dQ as isOk, dR as mapError, dS as mapResult, dT as ok, dU as toNullable, dV as tryCatch, dW as unwrap } from './client-BTL9d_nN.mjs';
|
|
3
|
+
import { bb as ProductWithDetails, aZ as Product, av as DurationUnit, j as ApiError } from './product-O8-wcHSe.mjs';
|
|
4
|
+
export { A as AddOn, a as AddOnDetails, b as AddOnGroupDetails, c as AddOnOption, d as AddOnOptionDetails, e as AddOnOptionPrice, f as AddOnWithOptions, g as AddToCartInput, h as AddressValue, i as AdjustmentType, k as AppliedDiscount, l as AttributeAppliesTo, m as AttributeType, n as AttributeValidationRules, o as AttributeVisibility, B as BOUNDARY_KIND, p as BenefitType, q as BillingFrequency, r as BillingMarkupType, s as BillingPlanType, t as BoundaryKind, u as Bundle, v as BundleComponentData, w as BundleComponentInfo, x as BundleComponentVariantView, y as BundleComponentView, z as BundlePriceType, C as BundleProduct, D as BundleSelectionData, E as BundleSelectionInput, F as BundleStoredSelection, G as BundleSummary, H as BundleWithDetails, I as Cart, J as CartAddOn, K as CartChannel, L as CartItem, M as CartItemDetails, N as CartMutationResult, O as CartNotice, P as CartStatus, Q as CartSummary, R as CartTotals, S as Category, T as CategorySummary, U as ChosenPrice, V as CimplifyError, W as Collection, X as CollectionProduct, Y as CollectionSummary, Z as ComponentGroup, _ as ComponentGroupWithComponents, $ as ComponentPriceBreakdown, a0 as ComponentSchedulingData, a1 as ComponentSelectionInput, a2 as ComponentSourceType, a3 as Composite, a4 as CompositeComponent, a5 as CompositeComponentView, a6 as CompositeGroupView, a7 as CompositePriceBreakdown, a8 as CompositePriceResult, a9 as CompositePricingMode, aa as CompositeSelectionData, a1 as CompositeSelectionInput, ab as CompositeStoredSelection, ac as CompositeWithDetails, ad as CurrencyCode, ae as CustomAttributeDefinition, af as CustomAttributeValue, ag as CustomerInputValue, ah as DURATION_UNIT, ai as DateRangeValue, aj as Deal, ak as DealBenefitType, al as DepositType, am as DigitalProductType, an as DiscountBreakdown, ao as DiscountDetails, ap as DiscountValidation, aq as DisplayAddOn, ar as DisplayAddOnOption, as as DisplayCart, at as DisplayCartItem, au as DisplayMode, aw as ERROR_HINTS, ax as EligiblePlansQuery, ay as ErrorCode, az as ErrorCodeType, aA as ErrorHint, aB as FacetValue, aC as FormattedPlanOption, aD as GroupPricingBehavior, aE as INPUT_FIELD_TYPE, aF as IdempotencyMismatchError, aG as InputFieldType, aH as InputFieldValidation, aI as InventoryType, aJ as KnowledgeArticle, aK as LineConfiguration, aL as LocationProductPrice, aM as LocationValue, aN as MeasurementValue, aO as Money, aP as PRODUCT_TYPE, aQ as Pagination, aR as PaginationParams, aS as PhoneValue, aT as Price, aU as PriceAdjustment, aV as PriceDecisionPath, aW as PriceEntryType, aX as PricePathTaxInfo, aY as PriceSource, a_ as ProductAddOn, a$ as ProductAvailability, b0 as ProductAvailabilityNow, b1 as ProductBillingPlan, b2 as ProductDealInfo, b3 as ProductInputField, b4 as ProductProperty, b5 as ProductRenderHint, b6 as ProductTaxonomy, b7 as ProductTimeProfile, b8 as ProductType, b9 as ProductVariant, ba as ProductVariantValue, bc as PropertyFacet, bd as PropertySource, be as QuantityPricingTier, bf as RENDER_HINT, bg as RelatedProductView, bh as SaleCapInfo, bi as SaleInfo, bj as SalesChannel, bk as SchedulingMode, bl as SelectedAddOnOption, bm as SemanticKind, bn as SignatureValue, bo as Subscription, bp as SubscriptionInvoice, bq as SubscriptionItem, br as SubscriptionStatus, bs as SubscriptionWithDetails, bt as Tag, bu as TagsResponse, bv as TaxPathComponent, bw as TaxonomyAttributeTemplate, bx as TaxonomyWithChildren, by as UICart, bz as UICartBusiness, bA as UICartCustomer, bB as UICartLocation, bC as UICartPricing, bD as UpcomingSale, bE as UpdateCartItemInput, bF as VariantAxis, bG as VariantAxisSelection, bH as VariantAxisValue, bI as VariantAxisValueView, bJ as VariantAxisView, bK as VariantAxisWithValues, bL as VariantDetails, bM as VariantDetailsDTO, bN as VariantDisplayAttribute, bO as VariantLocationAvailability, bP as VariantStrategy, bQ as VariantView, bR as ZERO, bT as currencyCode, bU as enrichError, bV as getErrorHint, bW as isCimplifyError, bX as isIdempotencyMismatchError, bY as isQuoteConflictRequiringConsent, bZ as isQuoteError, b_ as isRetryableError, b$ as isSupportedCurrency, c0 as money, c1 as moneyFromNumber } from './product-O8-wcHSe.mjs';
|
|
5
|
+
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, h as formatPriceRange, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, p as getPriceRange, q as getProductCurrency, r as getTaxAmount, s as getUnitPriceAtQuantity, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-BuNjyfaV.mjs';
|
|
5
6
|
export { A as AdConfig, a as AdContextValue, b as AdCreative, c as AdPosition, d as AdSlot, e as AdTheme, S as SignInOptions, g as getVariantDisplayName, s as startSignIn } from './sign-in-DQlIdqsi.mjs';
|
|
6
|
-
export { A as AddressAuthorizationData, a as AuthorizationType, I as InitializePaymentResult, P as Payment, b as PaymentErrorDetails, c as PaymentMethod, d as PaymentMethodType, e as PaymentProcessingState, f as PaymentProvider, g as PaymentResponse, h as PaymentStatus, i as PaymentStatusResponse, S as SubmitAuthorizationInput } from './payment-
|
|
7
|
-
export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-
|
|
7
|
+
export { A as AddressAuthorizationData, a as AuthorizationType, I as InitializePaymentResult, P as Payment, b as PaymentErrorDetails, c as PaymentMethod, d as PaymentMethodType, e as PaymentProcessingState, f as PaymentProvider, g as PaymentResponse, h as PaymentStatus, i as PaymentStatusResponse, S as SubmitAuthorizationInput } from './payment-pKPpaORI.mjs';
|
|
8
|
+
export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-BvRtp6ak.mjs';
|
|
8
9
|
export { generateIdempotencyKey } from './advanced.mjs';
|
|
9
10
|
import 'libphonenumber-js';
|
|
10
11
|
|
|
@@ -31,6 +32,11 @@ declare function resolveGallery(product: GalleryProduct, selectedVariantId?: str
|
|
|
31
32
|
*/
|
|
32
33
|
declare function allGalleryImages(product: GalleryProduct): GalleryImage[];
|
|
33
34
|
|
|
35
|
+
/** Reads structured card references an AI reply may carry in `metadata.cards`. */
|
|
36
|
+
declare function chatMessageCards(message: {
|
|
37
|
+
metadata: Record<string, unknown>;
|
|
38
|
+
}): ChatReplyCard[];
|
|
39
|
+
|
|
34
40
|
interface CustomerGroup {
|
|
35
41
|
id: string;
|
|
36
42
|
business_id: string;
|
|
@@ -64,6 +70,42 @@ interface CustomerPricingInfo {
|
|
|
64
70
|
items: QuantityBreak[];
|
|
65
71
|
}
|
|
66
72
|
|
|
73
|
+
type BasisFields = Pick<Product, "type" | "price_basis" | "duration_unit" | "scheduling_mode">;
|
|
74
|
+
/** Whether this service schedules whole stays (per-duration-unit billing
|
|
75
|
+
* default, unit reservations) rather than intraday slots. The server-resolved
|
|
76
|
+
* `scheduling_mode` wins; the duration-unit fallback mirrors the backend's
|
|
77
|
+
* `DurationUnit::scheduling_mode`. */
|
|
78
|
+
declare function isMultiDayService(product: BasisFields): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* What one unit of the display price buys — "night", "person", "week"… —
|
|
81
|
+
* or null when the price is simply the price (flat services, plain
|
|
82
|
+
* products, and intraday services that never declared a basis, which
|
|
83
|
+
* billed per person all along and don't need a new label).
|
|
84
|
+
*/
|
|
85
|
+
declare function priceBasisLabel(product: BasisFields): string | null;
|
|
86
|
+
/**
|
|
87
|
+
* How many billing periods a stay spans, counted in the service's duration
|
|
88
|
+
* unit — a faithful port of `LineConfiguration::service_periods`: whole UTC
|
|
89
|
+
* days between the dates (min 1), weeks round up, months/years by calendar
|
|
90
|
+
* with a partial period counting as one more.
|
|
91
|
+
*/
|
|
92
|
+
declare function stayPeriods(scheduledStart: string, scheduledEnd: string, durationUnit: DurationUnit | null | undefined): number;
|
|
93
|
+
/** "3 nights", "2 weeks" — the stay's billing length, spelled out. */
|
|
94
|
+
declare function stayLength(scheduledStart: string, scheduledEnd: string, durationUnit: DurationUnit | null | undefined): string;
|
|
95
|
+
/**
|
|
96
|
+
* The factor the server multiplies a service's unit price by — a faithful
|
|
97
|
+
* port of `LineConfiguration::billing_multiplier`: resolve the basis (an
|
|
98
|
+
* undeclared basis defaults per the scheduling mode), then flat = 1,
|
|
99
|
+
* per-person = party size, per-duration-unit = stay periods, all times units.
|
|
100
|
+
* Returns null for non-services — their total is plain price × quantity.
|
|
101
|
+
*/
|
|
102
|
+
declare function serviceBillingMultiplier(product: BasisFields, selection: {
|
|
103
|
+
quantity: number;
|
|
104
|
+
units?: number;
|
|
105
|
+
scheduledStart?: string | null;
|
|
106
|
+
scheduledEnd?: string | null;
|
|
107
|
+
}): number | null;
|
|
108
|
+
|
|
67
109
|
interface FrontendContext {
|
|
68
110
|
location_id?: string;
|
|
69
111
|
}
|
|
@@ -121,4 +163,4 @@ interface AssetUrlOptions extends AssetTransform {
|
|
|
121
163
|
declare function assetUrl(path: string, opts?: AssetUrlOptions): string;
|
|
122
164
|
declare function isCimplifyAsset(src: string, base?: string): boolean;
|
|
123
165
|
|
|
124
|
-
export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, type FrontendContext, type GalleryImage, type MutationRequest, type PriceListItem, ProductWithDetails, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, type SilentSignInOptions, type SilentSignInResult, allGalleryImages, assetUrl, isCimplifyAsset, resolveGallery, signInSilent };
|
|
166
|
+
export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, ChatReplyCard, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, DurationUnit, type FrontendContext, type GalleryImage, type MutationRequest, type PriceListItem, Product, ProductWithDetails, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, type SilentSignInOptions, type SilentSignInResult, allGalleryImages, assetUrl, chatMessageCards, isCimplifyAsset, isMultiDayService, priceBasisLabel, resolveGallery, serviceBillingMultiplier, signInSilent, stayLength, stayPeriods };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
1
|
+
import { X as ChatReplyCard } from './client-BX30FAWZ.js';
|
|
2
|
+
export { A as AUTHORIZATION_TYPE, a as AUTH_MUTATION, b as AbortablePromise, c as ActivityRecommendation, d as ActivityRecommendationsResponse, e as ActivityService, f as ActivityStateResponse, g as AddressData, h as AddressInfo, i as AmountToPay, j as AuthResponse, k as AuthService, l as AuthStatus, m as AuthenticatedCustomer, n as AuthenticatedData, o as AutocompletePrediction, p as AutocompleteResponse, q as AvailabilityResult, r as AvailableSlot, B as Booking, s as BookingModificationType, t as BookingStatus, u as BookingWithDetails, v as BufferTimes, w as Business, x as BusinessDetailsDTO, y as BusinessHours, z as BusinessPreferences, C as BusinessService, D as BusinessSettings, E as BusinessWithLocations, F as CHECKOUT_MODE, G as CHECKOUT_MUTATION, H as CHECKOUT_STEP, I as CONTACT_TYPE, J as CacheOptions, K as CancelBookingInput, L as CancelBookingResult, M as CancelOrderInput, N as CancellationPolicy, O as CartOperations, P as CatalogueQueries, Q as CatalogueResult, R as CatalogueSnapshot, S as CategoryInfo, T as ChatAttachment, U as ChatConversation, V as ChatConversationResponse, W as ChatMessage, Y as ChatReplyContext, Z as ChatUploadAttachment, _ as ChatWidgetStarter, $ as CheckSlotAvailabilityInput, a0 as CheckSlotAvailabilityResult, a1 as CheckoutAddressInfo, a2 as CheckoutCartData, a3 as CheckoutCartItem, a4 as CheckoutCustomerInfo, a5 as CheckoutFormData, a6 as CheckoutInput, a7 as CheckoutMode, ab as CheckoutOperations, a8 as CheckoutOrderType, a9 as CheckoutPaymentMethod, aa as CheckoutResult, ab as CheckoutService, ac as CheckoutStatus, ad as CheckoutStatusContext, ae as CheckoutStep, af as CimplifyClient, ag as CimplifyConfig, ah as CimplifyElement, ai as CimplifyElements, aj as ClaimConversationResult, ak as ContactType, al as ContentType, am as CreateAddressInput, an as CreateMobileMoneyInput, ao as Customer, ap as CustomerAddress, aq as CustomerBooking, ar as CustomerBookingServiceItem, as as CustomerLinkPreferences, at as CustomerMobileMoney, au as CustomerServicePreferences, av as DEFAULT_COUNTRY, aw as DEFAULT_CURRENCY, ax as DEVICE_TYPE, ay as DayAvailability, az as DeliveryFeeDetails, aA as DeliveryFeeResponse, aB as DeliveryOption, aC as DeliveryOptionsResponse, aD as DeliveryService, aE as DepositResult, aF as DeviceType, aG as DismissMessageResponse, aH as ELEMENTS_AUTH_CONTACT_TYPES, aI as ELEMENTS_AUTH_MODES, aJ as ELEMENTS_AUTH_PROMPTS, aK as ELEMENT_TYPES, aL as EVENT_TYPES, aM as ElementAppearance, aN as ElementEventHandler, aO as ElementEventType, aP as ElementOptions, aQ as ElementType, aR as ElementsAuthContactType, aS as ElementsAuthMode, aT as ElementsAuthOptions, aU as ElementsAuthPrompt, aV as ElementsCheckoutData, aW as ElementsCheckoutResult, aX as ElementsCustomerInfo, aY as ElementsOptions, aZ as EnrichedOrder, a_ as EnrichedOrderItem, a$ as EnrollAndLinkOrderInput, b0 as EnrollAndLinkOrderResult, b1 as EnrollmentData, b2 as Err, b3 as FeeBearerType, b4 as FetchQuoteInput, b5 as FulfillmentLink, b6 as FulfillmentStatus, b7 as FulfillmentSummaryDTO, b8 as FulfillmentType, b9 as FxQuote, ba as FxQuoteRequest, bb as FxQuoteStatus, bc as FxRateResponse, bd as FxService, be as GetAvailableSlotsInput, bf as GetDeliveryOptionsParams, bg as GetOrdersOptions, bh as GetProductsOptions, bi as GroupOrderInfo, bj as IframeToParentMessage, bk as InventoryService, bl as LINK_MUTATION, bm as LINK_QUERY, bn as LifecyclePhase, bo as LineItem, bp as LineType, bq as LinkData, br as LinkEnrollResult, bs as LinkService, bt as LinkSession, bu as LinkStatusResult, bv as LiteBootstrap, bw as LiteDayHours, bx as LiteHoursRange, by as LiteService, bz as Location, bA as LocationBooking, bB as LocationTaxBehavior, bC as LocationTaxOverrides, bD as LocationTimeProfile, bE as LocationWithDetails, bF as MESSAGE_TYPES, bG as MOBILE_MONEY_PROVIDER, bH as MobileMoneyData, bI as MobileMoneyDetails, bJ as MobileMoneyProvider, bK as NextAction, bL as ORDER_MUTATION, bM as ORDER_TYPE, bN as ObservabilityHooks, bO as Ok, bP as Order, bQ as OrderCustomerInfo, bR as OrderDiscountInfo, bS as OrderFilter, bT as OrderFulfillmentSummary, bU as OrderGroup, bV as OrderGroupDetails, bW as OrderGroupPayment, bX as OrderGroupPaymentState, bY as OrderGroupPaymentStatus, bZ as OrderGroupPaymentSummary, b_ as OrderGroupStatus, b$ as OrderHistory, c0 as OrderLineState, c1 as OrderLineStatus, c2 as OrderLocationInfo, c3 as OrderPaymentEvent, c4 as OrderPricingView, c5 as OrderQueries, c6 as OrderSplitDetail, c7 as OrderStaffInfo, c8 as OrderStatus, c9 as OrderTimestampsDTO, ca as OrderType, cb as Origin, cc as OriginActor, cd as OriginChannel, ce as OtpResult, cf as PAYMENT_METHOD, cg as PAYMENT_MUTATION, ch as PAYMENT_STATE, ci as PICKUP_TIME_TYPE, cj as ParentToIframeMessage, ck as PaymentInfoDTO, cl as PaymentMethodInfo, cm as PaymentState, cn as PickupTime, co as PickupTimeType, cp as PlaceDetailsResponse, cq as PlacesService, cr as PriceQuote, cs as PricingOverrides, ct as ProcessAndResolveOptions, cu as ProcessCheckoutOptions, cv as ProcessCheckoutResult, cw as ProviderResolutionSource, cx as QuoteBundleSelectionInput, cy as QuoteCompositeSelectionInput, cz as QuoteDynamicBuckets, cA as QuoteStatus, cB as QuoteUiMessage, cC as ReadRequestOptions, cD as RefreshQuoteInput, cE as RefreshQuoteResult, cF as RefundOrderInput, cG as RelatedCandidate, cH as RelatedProduct, cI as RelatedProductsEnrichment, cJ as RelationType, cK as ReminderMethod, cL as ReminderSettings, cM as ReorderResult, cN as RequestContext, cO as RequestErrorEvent, cP as RequestOptions, cQ as RequestOtpInput, cR as RequestSource, cS as RequestStartEvent, cT as RequestSuccessEvent, cU as RescheduleBookingInput, cV as RescheduleBookingResult, cW as RescheduleHistoryRecord, cX as ResourceAssignment, cY as ResourceInfo, cZ as Result, c_ as RetryEvent, c$ as RevokeAllSessionsResult, d0 as RevokeSessionResult, d1 as Room, d2 as SchedulingMetadata, d3 as SchedulingResult, d4 as SchedulingService, d5 as SenderType, d6 as Service, d7 as ServiceAvailabilityParams, d8 as ServiceAvailabilityResult, d9 as ServiceCharge, da as ServiceNotes, db as ServiceScheduleRequest, dc as ServiceStatus, dd as SessionActivityData, de as SessionChangeEvent, df as SessionMessage, dg as SlotResourceInfo, dh as SlotStaffInfo, di as Staff, dj as StaffAssignment, dk as StaffRole, dl as StaffScheduleItem, dm as StockLevel, dn as StockStatus, dp as StoreCreditBalance, dq as StoreCreditQueries, dr as StorefrontBootstrap, ds as SubscriptionService, dt as SupportService, du as Table, dv as TimeRange, dw as TimeRanges, dx as TimeSlot, dy as TrackCategoryViewOptions, dz as TrackProductViewOptions, dA as UpdateAddressInput, dB as UpdateOrderStatusInput, dC as UpdateProfileInput, dD as UploadInitResponse, dE as UploadResult, dF as UploadService, dG as VerifyOtpInput, dH as combine, dI as combineObject, dJ as createCimplifyClient, dK as createElements, dL as err, dM as flatMap, dN as fromPromise, dO as getOrElse, dP as isErr, dQ as isOk, dR as mapError, dS as mapResult, dT as ok, dU as toNullable, dV as tryCatch, dW as unwrap } from './client-BX30FAWZ.js';
|
|
3
|
+
import { bb as ProductWithDetails, aZ as Product, av as DurationUnit, j as ApiError } from './product-O8-wcHSe.js';
|
|
4
|
+
export { A as AddOn, a as AddOnDetails, b as AddOnGroupDetails, c as AddOnOption, d as AddOnOptionDetails, e as AddOnOptionPrice, f as AddOnWithOptions, g as AddToCartInput, h as AddressValue, i as AdjustmentType, k as AppliedDiscount, l as AttributeAppliesTo, m as AttributeType, n as AttributeValidationRules, o as AttributeVisibility, B as BOUNDARY_KIND, p as BenefitType, q as BillingFrequency, r as BillingMarkupType, s as BillingPlanType, t as BoundaryKind, u as Bundle, v as BundleComponentData, w as BundleComponentInfo, x as BundleComponentVariantView, y as BundleComponentView, z as BundlePriceType, C as BundleProduct, D as BundleSelectionData, E as BundleSelectionInput, F as BundleStoredSelection, G as BundleSummary, H as BundleWithDetails, I as Cart, J as CartAddOn, K as CartChannel, L as CartItem, M as CartItemDetails, N as CartMutationResult, O as CartNotice, P as CartStatus, Q as CartSummary, R as CartTotals, S as Category, T as CategorySummary, U as ChosenPrice, V as CimplifyError, W as Collection, X as CollectionProduct, Y as CollectionSummary, Z as ComponentGroup, _ as ComponentGroupWithComponents, $ as ComponentPriceBreakdown, a0 as ComponentSchedulingData, a1 as ComponentSelectionInput, a2 as ComponentSourceType, a3 as Composite, a4 as CompositeComponent, a5 as CompositeComponentView, a6 as CompositeGroupView, a7 as CompositePriceBreakdown, a8 as CompositePriceResult, a9 as CompositePricingMode, aa as CompositeSelectionData, a1 as CompositeSelectionInput, ab as CompositeStoredSelection, ac as CompositeWithDetails, ad as CurrencyCode, ae as CustomAttributeDefinition, af as CustomAttributeValue, ag as CustomerInputValue, ah as DURATION_UNIT, ai as DateRangeValue, aj as Deal, ak as DealBenefitType, al as DepositType, am as DigitalProductType, an as DiscountBreakdown, ao as DiscountDetails, ap as DiscountValidation, aq as DisplayAddOn, ar as DisplayAddOnOption, as as DisplayCart, at as DisplayCartItem, au as DisplayMode, aw as ERROR_HINTS, ax as EligiblePlansQuery, ay as ErrorCode, az as ErrorCodeType, aA as ErrorHint, aB as FacetValue, aC as FormattedPlanOption, aD as GroupPricingBehavior, aE as INPUT_FIELD_TYPE, aF as IdempotencyMismatchError, aG as InputFieldType, aH as InputFieldValidation, aI as InventoryType, aJ as KnowledgeArticle, aK as LineConfiguration, aL as LocationProductPrice, aM as LocationValue, aN as MeasurementValue, aO as Money, aP as PRODUCT_TYPE, aQ as Pagination, aR as PaginationParams, aS as PhoneValue, aT as Price, aU as PriceAdjustment, aV as PriceDecisionPath, aW as PriceEntryType, aX as PricePathTaxInfo, aY as PriceSource, a_ as ProductAddOn, a$ as ProductAvailability, b0 as ProductAvailabilityNow, b1 as ProductBillingPlan, b2 as ProductDealInfo, b3 as ProductInputField, b4 as ProductProperty, b5 as ProductRenderHint, b6 as ProductTaxonomy, b7 as ProductTimeProfile, b8 as ProductType, b9 as ProductVariant, ba as ProductVariantValue, bc as PropertyFacet, bd as PropertySource, be as QuantityPricingTier, bf as RENDER_HINT, bg as RelatedProductView, bh as SaleCapInfo, bi as SaleInfo, bj as SalesChannel, bk as SchedulingMode, bl as SelectedAddOnOption, bm as SemanticKind, bn as SignatureValue, bo as Subscription, bp as SubscriptionInvoice, bq as SubscriptionItem, br as SubscriptionStatus, bs as SubscriptionWithDetails, bt as Tag, bu as TagsResponse, bv as TaxPathComponent, bw as TaxonomyAttributeTemplate, bx as TaxonomyWithChildren, by as UICart, bz as UICartBusiness, bA as UICartCustomer, bB as UICartLocation, bC as UICartPricing, bD as UpcomingSale, bE as UpdateCartItemInput, bF as VariantAxis, bG as VariantAxisSelection, bH as VariantAxisValue, bI as VariantAxisValueView, bJ as VariantAxisView, bK as VariantAxisWithValues, bL as VariantDetails, bM as VariantDetailsDTO, bN as VariantDisplayAttribute, bO as VariantLocationAvailability, bP as VariantStrategy, bQ as VariantView, bR as ZERO, bT as currencyCode, bU as enrichError, bV as getErrorHint, bW as isCimplifyError, bX as isIdempotencyMismatchError, bY as isQuoteConflictRequiringConsent, bZ as isQuoteError, b_ as isRetryableError, b$ as isSupportedCurrency, c0 as money, c1 as moneyFromNumber } from './product-O8-wcHSe.js';
|
|
5
|
+
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, h as formatPriceRange, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, p as getPriceRange, q as getProductCurrency, r as getTaxAmount, s as getUnitPriceAtQuantity, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-D-w5h82t.js';
|
|
5
6
|
export { A as AdConfig, a as AdContextValue, b as AdCreative, c as AdPosition, d as AdSlot, e as AdTheme, S as SignInOptions, g as getVariantDisplayName, s as startSignIn } from './sign-in-DQlIdqsi.js';
|
|
6
|
-
export { A as AddressAuthorizationData, a as AuthorizationType, I as InitializePaymentResult, P as Payment, b as PaymentErrorDetails, c as PaymentMethod, d as PaymentMethodType, e as PaymentProcessingState, f as PaymentProvider, g as PaymentResponse, h as PaymentStatus, i as PaymentStatusResponse, S as SubmitAuthorizationInput } from './payment-
|
|
7
|
-
export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-
|
|
7
|
+
export { A as AddressAuthorizationData, a as AuthorizationType, I as InitializePaymentResult, P as Payment, b as PaymentErrorDetails, c as PaymentMethod, d as PaymentMethodType, e as PaymentProcessingState, f as PaymentProvider, g as PaymentResponse, h as PaymentStatus, i as PaymentStatusResponse, S as SubmitAuthorizationInput } from './payment-By0JidTe.js';
|
|
8
|
+
export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-23RNXftz.js';
|
|
8
9
|
export { generateIdempotencyKey } from './advanced.js';
|
|
9
10
|
import 'libphonenumber-js';
|
|
10
11
|
|
|
@@ -31,6 +32,11 @@ declare function resolveGallery(product: GalleryProduct, selectedVariantId?: str
|
|
|
31
32
|
*/
|
|
32
33
|
declare function allGalleryImages(product: GalleryProduct): GalleryImage[];
|
|
33
34
|
|
|
35
|
+
/** Reads structured card references an AI reply may carry in `metadata.cards`. */
|
|
36
|
+
declare function chatMessageCards(message: {
|
|
37
|
+
metadata: Record<string, unknown>;
|
|
38
|
+
}): ChatReplyCard[];
|
|
39
|
+
|
|
34
40
|
interface CustomerGroup {
|
|
35
41
|
id: string;
|
|
36
42
|
business_id: string;
|
|
@@ -64,6 +70,42 @@ interface CustomerPricingInfo {
|
|
|
64
70
|
items: QuantityBreak[];
|
|
65
71
|
}
|
|
66
72
|
|
|
73
|
+
type BasisFields = Pick<Product, "type" | "price_basis" | "duration_unit" | "scheduling_mode">;
|
|
74
|
+
/** Whether this service schedules whole stays (per-duration-unit billing
|
|
75
|
+
* default, unit reservations) rather than intraday slots. The server-resolved
|
|
76
|
+
* `scheduling_mode` wins; the duration-unit fallback mirrors the backend's
|
|
77
|
+
* `DurationUnit::scheduling_mode`. */
|
|
78
|
+
declare function isMultiDayService(product: BasisFields): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* What one unit of the display price buys — "night", "person", "week"… —
|
|
81
|
+
* or null when the price is simply the price (flat services, plain
|
|
82
|
+
* products, and intraday services that never declared a basis, which
|
|
83
|
+
* billed per person all along and don't need a new label).
|
|
84
|
+
*/
|
|
85
|
+
declare function priceBasisLabel(product: BasisFields): string | null;
|
|
86
|
+
/**
|
|
87
|
+
* How many billing periods a stay spans, counted in the service's duration
|
|
88
|
+
* unit — a faithful port of `LineConfiguration::service_periods`: whole UTC
|
|
89
|
+
* days between the dates (min 1), weeks round up, months/years by calendar
|
|
90
|
+
* with a partial period counting as one more.
|
|
91
|
+
*/
|
|
92
|
+
declare function stayPeriods(scheduledStart: string, scheduledEnd: string, durationUnit: DurationUnit | null | undefined): number;
|
|
93
|
+
/** "3 nights", "2 weeks" — the stay's billing length, spelled out. */
|
|
94
|
+
declare function stayLength(scheduledStart: string, scheduledEnd: string, durationUnit: DurationUnit | null | undefined): string;
|
|
95
|
+
/**
|
|
96
|
+
* The factor the server multiplies a service's unit price by — a faithful
|
|
97
|
+
* port of `LineConfiguration::billing_multiplier`: resolve the basis (an
|
|
98
|
+
* undeclared basis defaults per the scheduling mode), then flat = 1,
|
|
99
|
+
* per-person = party size, per-duration-unit = stay periods, all times units.
|
|
100
|
+
* Returns null for non-services — their total is plain price × quantity.
|
|
101
|
+
*/
|
|
102
|
+
declare function serviceBillingMultiplier(product: BasisFields, selection: {
|
|
103
|
+
quantity: number;
|
|
104
|
+
units?: number;
|
|
105
|
+
scheduledStart?: string | null;
|
|
106
|
+
scheduledEnd?: string | null;
|
|
107
|
+
}): number | null;
|
|
108
|
+
|
|
67
109
|
interface FrontendContext {
|
|
68
110
|
location_id?: string;
|
|
69
111
|
}
|
|
@@ -121,4 +163,4 @@ interface AssetUrlOptions extends AssetTransform {
|
|
|
121
163
|
declare function assetUrl(path: string, opts?: AssetUrlOptions): string;
|
|
122
164
|
declare function isCimplifyAsset(src: string, base?: string): boolean;
|
|
123
165
|
|
|
124
|
-
export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, type FrontendContext, type GalleryImage, type MutationRequest, type PriceListItem, ProductWithDetails, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, type SilentSignInOptions, type SilentSignInResult, allGalleryImages, assetUrl, isCimplifyAsset, resolveGallery, signInSilent };
|
|
166
|
+
export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, ChatReplyCard, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, DurationUnit, type FrontendContext, type GalleryImage, type MutationRequest, type PriceListItem, Product, ProductWithDetails, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, type SilentSignInOptions, type SilentSignInResult, allGalleryImages, assetUrl, chatMessageCards, isCimplifyAsset, isMultiDayService, priceBasisLabel, resolveGallery, serviceBillingMultiplier, signInSilent, stayLength, stayPeriods };
|