@cimplify/sdk 0.89.0 → 0.92.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-JHJTXAPS.js → chunk-3MBMIEWT.js} +4 -4
- package/dist/{chunk-DENWOZEA.mjs → chunk-3XD2FVP4.mjs} +163 -43
- package/dist/{chunk-M4ALCELT.mjs → chunk-54H2YYIW.mjs} +2 -2
- package/dist/{chunk-T2CJ67QV.js → chunk-DCRN67NO.js} +201 -78
- package/dist/{chunk-T7Z25EY4.js → chunk-HKN3YG76.js} +84 -0
- package/dist/{chunk-GHFDYM5K.js → chunk-IVJEUGWF.js} +10 -1
- package/dist/{chunk-ROBTTS3Q.js → chunk-OAHSF542.js} +40 -1
- package/dist/{chunk-APBLFZ2I.mjs → chunk-PYBFTMHI.mjs} +40 -1
- package/dist/{chunk-OZDDHSIB.mjs → chunk-RRBY35TJ.mjs} +80 -1
- package/dist/{chunk-ZU4ZRYUR.mjs → chunk-T7LDBZZZ.mjs} +10 -1
- package/dist/chunk-U4MW6PYU.mjs +23 -0
- package/dist/chunk-XREIZ56K.js +26 -0
- package/dist/{client-CqZgdUtw.d.ts → client-BQbSKlHS.d.mts} +165 -11
- package/dist/{client-CAY2NbRG.d.mts → client-Bw4HtLP1.d.mts} +2 -2
- package/dist/{client-D8ZFs-sq.d.mts → client-CeW3acve.d.ts} +165 -11
- package/dist/{client-CUbwb6Om.d.ts → client-Otzv_rgP.d.ts} +2 -2
- package/dist/{index-CmWOz9bi.d.mts → index-CmIboQjl.d.mts} +3 -3
- package/dist/{index-Bc5qUxAt.d.ts → index-DgoRwz8l.d.ts} +3 -3
- package/dist/index.d.mts +49 -7
- package/dist/index.d.ts +49 -7
- package/dist/index.js +109 -82
- package/dist/index.mjs +11 -5
- package/dist/mock/cli.mjs +61 -1
- package/dist/mock/library.js +61 -1
- package/dist/mock/library.mjs +61 -1
- package/dist/mock/msw.js +61 -1
- package/dist/mock/msw.mjs +61 -1
- package/dist/{payment-Dcgb9n1n.d.mts → payment-BFtLqiG2.d.mts} +1 -1
- package/dist/{payment-Xq0WDZXh.d.ts → payment-Cq8FT1B6.d.ts} +1 -1
- package/dist/{price-DAAjKgAp.d.ts → price-DaFXT-Lr.d.ts} +1 -1
- package/dist/{price--Ma_WO5_.d.mts → price-DleDWk_s.d.mts} +1 -1
- package/dist/{product-BakHcsP2.d.ts → product-bZ8G5Z8D.d.mts} +95 -2
- package/dist/{product-BakHcsP2.d.mts → product-bZ8G5Z8D.d.ts} +95 -2
- package/dist/react.d.mts +471 -8
- package/dist/react.d.ts +471 -8
- package/dist/react.js +2787 -402
- package/dist/react.mjs +2699 -337
- package/dist/{server-Bk_hlefX.d.mts → server-D-iK-bNt.d.mts} +8 -1
- package/dist/{server-Bei5lBrc.d.ts → server-DwsY9hlX.d.ts} +8 -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 +3 -2
- package/dist/testing/msw.mjs +2 -1
- package/dist/testing/suite.d.mts +6 -6
- package/dist/testing/suite.d.ts +6 -6
- package/dist/testing/suite.js +24 -23
- package/dist/testing/suite.mjs +5 -4
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.js +80 -79
- package/dist/testing.mjs +6 -5
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/package.json +4 -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-bZ8G5Z8D.js';
|
|
2
|
+
import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-Cq8FT1B6.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 {
|
|
@@ -2217,6 +2258,15 @@ declare class SchedulingService {
|
|
|
2217
2258
|
hasAvailabilityOn(serviceId: string, date: string): Promise<Result<boolean, CimplifyError>>;
|
|
2218
2259
|
}
|
|
2219
2260
|
|
|
2261
|
+
interface LiteHoursRange {
|
|
2262
|
+
start: string;
|
|
2263
|
+
end: string;
|
|
2264
|
+
}
|
|
2265
|
+
interface LiteDayHours {
|
|
2266
|
+
/** Day of week, 0 = Sunday. */
|
|
2267
|
+
day: number;
|
|
2268
|
+
ranges: LiteHoursRange[];
|
|
2269
|
+
}
|
|
2220
2270
|
interface LiteBootstrapBusiness {
|
|
2221
2271
|
id: string;
|
|
2222
2272
|
name: string;
|
|
@@ -2224,6 +2274,13 @@ interface LiteBootstrapBusiness {
|
|
|
2224
2274
|
logo?: string | null;
|
|
2225
2275
|
currency?: string | null;
|
|
2226
2276
|
is_open: boolean;
|
|
2277
|
+
description?: string | null;
|
|
2278
|
+
phone?: string | null;
|
|
2279
|
+
/** Next opening moment (RFC3339); present when the store is closed. */
|
|
2280
|
+
opens_at?: string | null;
|
|
2281
|
+
/** Current closing moment (RFC3339); present when the store is open. */
|
|
2282
|
+
closes_at?: string | null;
|
|
2283
|
+
hours?: LiteDayHours[];
|
|
2227
2284
|
}
|
|
2228
2285
|
interface LiteBootstrapCategory {
|
|
2229
2286
|
id: string;
|
|
@@ -2232,11 +2289,17 @@ interface LiteBootstrapCategory {
|
|
|
2232
2289
|
}
|
|
2233
2290
|
interface LiteBootstrapLocation {
|
|
2234
2291
|
id: string;
|
|
2292
|
+
name?: string | null;
|
|
2293
|
+
area?: string | null;
|
|
2235
2294
|
}
|
|
2236
2295
|
interface LiteBootstrap {
|
|
2237
2296
|
business: LiteBootstrapBusiness;
|
|
2238
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. */
|
|
2239
2300
|
location?: LiteBootstrapLocation | null;
|
|
2301
|
+
/** Every active branch — more than one means the customer can switch. */
|
|
2302
|
+
locations?: LiteBootstrapLocation[];
|
|
2240
2303
|
}
|
|
2241
2304
|
interface LiteResource {
|
|
2242
2305
|
id: string;
|
|
@@ -2480,7 +2543,8 @@ declare class DeliveryService {
|
|
|
2480
2543
|
}
|
|
2481
2544
|
|
|
2482
2545
|
type SenderType = "customer" | "agent" | "system" | "bot";
|
|
2483
|
-
|
|
2546
|
+
/** Mirrors the backend `ContentType` enum — the wire can send any of these. */
|
|
2547
|
+
type ContentType = "text" | "image" | "video" | "audio" | "voice" | "document" | "sticker" | "location" | "contact" | "reaction" | "interactive" | "story_mention" | "share";
|
|
2484
2548
|
interface ChatMessage {
|
|
2485
2549
|
id: string;
|
|
2486
2550
|
sender_type: SenderType;
|
|
@@ -2488,25 +2552,70 @@ interface ChatMessage {
|
|
|
2488
2552
|
content_type: ContentType;
|
|
2489
2553
|
attachments: ChatAttachment[];
|
|
2490
2554
|
metadata: Record<string, unknown>;
|
|
2555
|
+
/** Server-resolved quote context; absent when the message isn't a reply. */
|
|
2556
|
+
reply_to?: ChatReplyContext | null;
|
|
2491
2557
|
created_at: string;
|
|
2492
2558
|
}
|
|
2559
|
+
/**
|
|
2560
|
+
* Self-contained quote payload: the server resolves the reference and ships
|
|
2561
|
+
* the preview, so quotes render on first paint after any reload with zero
|
|
2562
|
+
* client-side lookup. `preview` is prose-only with GenUI fences elided.
|
|
2563
|
+
*/
|
|
2564
|
+
interface ChatReplyContext {
|
|
2565
|
+
id: string;
|
|
2566
|
+
sender_type: SenderType;
|
|
2567
|
+
preview: string;
|
|
2568
|
+
}
|
|
2493
2569
|
interface ChatAttachment {
|
|
2494
2570
|
url: string;
|
|
2495
2571
|
mime_type: string | null;
|
|
2496
2572
|
filename: string | null;
|
|
2573
|
+
size?: number | null;
|
|
2574
|
+
}
|
|
2575
|
+
/**
|
|
2576
|
+
* An upload being sent as an attachment: `upload_id` goes on the wire (the
|
|
2577
|
+
* server stores a durable storage ref and presigns at read time); the rest
|
|
2578
|
+
* renders the optimistic bubble.
|
|
2579
|
+
*/
|
|
2580
|
+
interface ChatUploadAttachment extends ChatAttachment {
|
|
2581
|
+
upload_id: string;
|
|
2497
2582
|
}
|
|
2498
2583
|
interface ChatConversation {
|
|
2499
2584
|
id: string;
|
|
2500
2585
|
status: "open" | "assigned" | "waiting" | "resolved" | "closed";
|
|
2501
2586
|
ai_enabled: boolean;
|
|
2587
|
+
/** The customer asked for a person (or the AI escalated). */
|
|
2588
|
+
needs_human_review?: boolean;
|
|
2502
2589
|
message_count: number;
|
|
2503
2590
|
created_at: string;
|
|
2504
2591
|
last_message_at: string | null;
|
|
2592
|
+
/** Team-wide read watermark; messages at or before it have been seen. */
|
|
2593
|
+
team_read_at?: string | null;
|
|
2505
2594
|
}
|
|
2595
|
+
/** Structured card references an AI reply may carry in `metadata.cards`. */
|
|
2596
|
+
type ChatReplyCard = {
|
|
2597
|
+
kind: "product";
|
|
2598
|
+
id: string;
|
|
2599
|
+
name: string;
|
|
2600
|
+
price?: string | number;
|
|
2601
|
+
image_url?: string;
|
|
2602
|
+
} | {
|
|
2603
|
+
kind: "order";
|
|
2604
|
+
order_id: string;
|
|
2605
|
+
order_number?: string;
|
|
2606
|
+
status?: string;
|
|
2607
|
+
};
|
|
2506
2608
|
interface ChatConversationResponse {
|
|
2507
2609
|
conversation: ChatConversation;
|
|
2508
2610
|
messages: ChatMessage[];
|
|
2509
2611
|
}
|
|
2612
|
+
interface ClaimConversationResult {
|
|
2613
|
+
/** The rotated, customer-bound session token; the SDK adopts it automatically. */
|
|
2614
|
+
session_token: string;
|
|
2615
|
+
/** The adopted (or merged-into) conversation; null when there was nothing to adopt. */
|
|
2616
|
+
thread_id?: string | null;
|
|
2617
|
+
customer_name: string;
|
|
2618
|
+
}
|
|
2510
2619
|
interface ChatWidgetStarter {
|
|
2511
2620
|
icon?: string;
|
|
2512
2621
|
text: string;
|
|
@@ -2517,7 +2626,23 @@ interface IdempotencyOption {
|
|
|
2517
2626
|
}
|
|
2518
2627
|
declare class SupportService {
|
|
2519
2628
|
private client;
|
|
2629
|
+
private claimInFlight;
|
|
2630
|
+
private lastClaimedAccessToken;
|
|
2631
|
+
private claimedName;
|
|
2520
2632
|
constructor(client: CimplifyClient);
|
|
2633
|
+
/** The verified customer this session's conversation was claimed for, null while anonymous. */
|
|
2634
|
+
get claimedCustomerName(): string | null;
|
|
2635
|
+
/**
|
|
2636
|
+
* Claim the anonymous session for the verified Link identity: the server
|
|
2637
|
+
* verifies the access token, rotates the session token (adopted here, so
|
|
2638
|
+
* every subsequent request rides the bound session), folds the guest cart
|
|
2639
|
+
* in, and adopts or merges the widget conversation.
|
|
2640
|
+
*
|
|
2641
|
+
* Idempotent and single-flight: concurrent calls share one request, and a
|
|
2642
|
+
* token already claimed by this instance short-circuits without a network
|
|
2643
|
+
* round trip. Emits `session:claimed` on the client's event channel.
|
|
2644
|
+
*/
|
|
2645
|
+
claimConversation(): Promise<Result<ClaimConversationResult, CimplifyError>>;
|
|
2521
2646
|
/** Open (or resume) the customer's widget conversation. */
|
|
2522
2647
|
openConversation(opts?: IdempotencyOption): Promise<Result<ChatConversationResponse, CimplifyError>>;
|
|
2523
2648
|
/**
|
|
@@ -2525,13 +2650,28 @@ declare class SupportService {
|
|
|
2525
2650
|
*
|
|
2526
2651
|
* The idempotency key doubles as the message `client_id`: the backend
|
|
2527
2652
|
* dedupes on it, so client retries of the same send never insert twice.
|
|
2653
|
+
* `replyToMessageId` quotes another message by its `ChatMessage.id`; the
|
|
2654
|
+
* server resolves it thread-scoped and echoes the quote as `reply_to`.
|
|
2655
|
+
*/
|
|
2656
|
+
sendMessage(content: string, opts?: IdempotencyOption & {
|
|
2657
|
+
replyToMessageId?: string;
|
|
2658
|
+
attachments?: ChatUploadAttachment[];
|
|
2659
|
+
}): Promise<Result<ChatMessage, CimplifyError>>;
|
|
2660
|
+
/**
|
|
2661
|
+
* Poll for messages. `after` pages forward (live updates); `before` pages
|
|
2662
|
+
* backward for scrollback into older history.
|
|
2528
2663
|
*/
|
|
2529
|
-
sendMessage(content: string, opts?: IdempotencyOption): Promise<Result<ChatMessage, CimplifyError>>;
|
|
2530
|
-
/** Poll for new messages since the given cursor. */
|
|
2531
2664
|
getMessages(options?: {
|
|
2532
2665
|
after?: string;
|
|
2666
|
+
before?: string;
|
|
2533
2667
|
limit?: number;
|
|
2534
2668
|
}): Promise<Result<ChatMessage[], CimplifyError>>;
|
|
2669
|
+
/** React to a message in the active conversation by its `ChatMessage.id`. */
|
|
2670
|
+
reactToMessage(messageId: string, emoji: string): Promise<Result<ChatMessage, CimplifyError>>;
|
|
2671
|
+
/** Ask for a person: flags the thread for the merchant's inbox. */
|
|
2672
|
+
requestHuman(opts?: IdempotencyOption): Promise<Result<{
|
|
2673
|
+
requested: boolean;
|
|
2674
|
+
}, CimplifyError>>;
|
|
2535
2675
|
}
|
|
2536
2676
|
|
|
2537
2677
|
declare class CimplifyElements {
|
|
@@ -2719,6 +2859,20 @@ declare class CimplifyClient {
|
|
|
2719
2859
|
getCredentialsMode(): RequestCredentials;
|
|
2720
2860
|
isTestMode(): boolean;
|
|
2721
2861
|
setAccessToken(token: string | null): void;
|
|
2862
|
+
/**
|
|
2863
|
+
* Zero-UI claim: a freshly verified customer identity (OTP verify, silent
|
|
2864
|
+
* refresh restore) binds the anonymous session so the conversation, cart
|
|
2865
|
+
* and orders survive a cleared browser. Best-effort by design — a failed
|
|
2866
|
+
* claim leaves the session anonymous, exactly as it was. Called by the
|
|
2867
|
+
* auth flows, never by the raw token setter.
|
|
2868
|
+
*/
|
|
2869
|
+
autoClaimChatIdentity(): void;
|
|
2870
|
+
/**
|
|
2871
|
+
* Adopt a server-rotated session token (claim flow). The old token stays
|
|
2872
|
+
* in flight-safe use until the next request; the storage swap makes the
|
|
2873
|
+
* rotation durable across reloads.
|
|
2874
|
+
*/
|
|
2875
|
+
adoptSessionToken(token: string): void;
|
|
2722
2876
|
clearSession(): void;
|
|
2723
2877
|
setOrderToken(orderId: string, token: string): void;
|
|
2724
2878
|
getOrderToken(orderId: string): string | null;
|
|
@@ -2778,4 +2932,4 @@ declare class CimplifyClient {
|
|
|
2778
2932
|
}
|
|
2779
2933
|
declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
|
|
2780
2934
|
|
|
2781
|
-
export { type
|
|
2935
|
+
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 {
|
|
2
|
-
import { A as AppHandle, C as CreateAppOptions } from './server-
|
|
1
|
+
import { af as CimplifyClient } from './client-CeW3acve.js';
|
|
2
|
+
import { A as AppHandle, C as CreateAppOptions } from './server-DwsY9hlX.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-bZ8G5Z8D.mjs';
|
|
2
|
+
import { P as ProductWithPrice } from './price-DleDWk_s.mjs';
|
|
3
|
+
import { b as PaymentErrorDetails, g as PaymentResponse, i as PaymentStatusResponse } from './payment-BFtLqiG2.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-bZ8G5Z8D.js';
|
|
2
|
+
import { P as ProductWithPrice } from './price-DaFXT-Lr.js';
|
|
3
|
+
import { b as PaymentErrorDetails, g as PaymentResponse, i as PaymentStatusResponse } from './payment-Cq8FT1B6.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-BQbSKlHS.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-BQbSKlHS.mjs';
|
|
3
|
+
import { bb as ProductWithDetails, aZ as Product, av as DurationUnit, j as ApiError } from './product-bZ8G5Z8D.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-bZ8G5Z8D.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-CmIboQjl.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-BFtLqiG2.mjs';
|
|
8
|
+
export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-DleDWk_s.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 };
|