@cimplify/sdk 0.94.1 → 0.95.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 +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/{chunk-BRYMPBEN.mjs → chunk-7TEMLVDT.mjs} +15 -4
- package/dist/{chunk-7A3YHBVW.mjs → chunk-BUPCMMRR.mjs} +2 -2
- package/dist/{chunk-XVOHMOGU.js → chunk-FECGCIVV.js} +15 -4
- package/dist/{chunk-QLGZIBRO.js → chunk-W5PH7SPK.js} +40 -6
- package/dist/{chunk-QL6VROSG.js → chunk-WEEGNH7K.js} +4 -4
- package/dist/{chunk-FKARGZK3.mjs → chunk-XMDLF5Y6.mjs} +40 -6
- package/dist/{client-BTL9d_nN.d.mts → client-BNfVL2IL.d.mts} +7 -6
- package/dist/{client-Bhe2TnFW.d.mts → client-BeMhSkRT.d.mts} +2 -2
- package/dist/{client-DrkuEK_I.d.ts → client-CCCOOaI3.d.ts} +2 -2
- package/dist/{client-BX30FAWZ.d.ts → client-CX59ew7C.d.ts} +7 -6
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -10
- package/dist/index.mjs +1 -1
- package/dist/mock/cli.mjs +15 -4
- package/dist/mock/library.js +15 -4
- package/dist/mock/library.mjs +15 -4
- package/dist/mock/msw.js +15 -4
- package/dist/mock/msw.mjs +15 -4
- package/dist/react.d.mts +2 -8
- package/dist/react.d.ts +2 -8
- package/dist/react.js +10 -43
- package/dist/react.mjs +4 -37
- package/dist/{server-BN9ZCAKT.d.mts → server-HVDbbqR9.d.mts} +6 -0
- package/dist/{server-DDGbfW_S.d.ts → server-JBuTPY-j.d.ts} +6 -0
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +2 -2
- package/dist/server.mjs +1 -1
- package/dist/testing/msw.d.mts +1 -1
- package/dist/testing/msw.d.ts +1 -1
- package/dist/testing/msw.js +2 -2
- package/dist/testing/msw.mjs +1 -1
- package/dist/testing/suite.d.mts +4 -4
- package/dist/testing/suite.d.ts +4 -4
- package/dist/testing/suite.js +22 -22
- package/dist/testing/suite.mjs +3 -3
- package/dist/testing.d.mts +18 -18
- package/dist/testing.d.ts +18 -18
- package/dist/testing.js +78 -78
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/registry/chat-widget.json +1 -1
package/dist/advanced.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { k as AuthService, C as BusinessService, O as CartOperations, P as CatalogueQueries, ab as CheckoutOperations, ab as CheckoutService, ah as CimplifyElement, ai as CimplifyElements, aK as ELEMENT_TYPES, aL as EVENT_TYPES, aO as ElementEventType, aP as ElementOptions, aQ as ElementType, aY as ElementsOptions, b4 as FetchQuoteInput, bd as FxService, bh as GetProductsOptions, bk as InventoryService, bs as LinkService, by as LiteService, bF as MESSAGE_TYPES, c5 as OrderQueries, cr as PriceQuote, cx as QuoteBundleSelectionInput, cy as QuoteCompositeSelectionInput, cz as QuoteDynamicBuckets, cA as QuoteStatus, cB as QuoteUiMessage, cD as RefreshQuoteInput, cE as RefreshQuoteResult, d4 as SchedulingService, dK as createElements } from './client-
|
|
1
|
+
export { k as AuthService, C as BusinessService, O as CartOperations, P as CatalogueQueries, ab as CheckoutOperations, ab as CheckoutService, ah as CimplifyElement, ai as CimplifyElements, aK as ELEMENT_TYPES, aL as EVENT_TYPES, aO as ElementEventType, aP as ElementOptions, aQ as ElementType, aY as ElementsOptions, b4 as FetchQuoteInput, bd as FxService, bh as GetProductsOptions, bk as InventoryService, bs as LinkService, by as LiteService, bF as MESSAGE_TYPES, c5 as OrderQueries, cr as PriceQuote, cx as QuoteBundleSelectionInput, cy as QuoteCompositeSelectionInput, cz as QuoteDynamicBuckets, cA as QuoteStatus, cB as QuoteUiMessage, cD as RefreshQuoteInput, cE as RefreshQuoteResult, d4 as SchedulingService, dK as createElements } from './client-BNfVL2IL.mjs';
|
|
2
2
|
import './product-O8-wcHSe.mjs';
|
|
3
3
|
import './payment-pKPpaORI.mjs';
|
|
4
4
|
|
package/dist/advanced.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { k as AuthService, C as BusinessService, O as CartOperations, P as CatalogueQueries, ab as CheckoutOperations, ab as CheckoutService, ah as CimplifyElement, ai as CimplifyElements, aK as ELEMENT_TYPES, aL as EVENT_TYPES, aO as ElementEventType, aP as ElementOptions, aQ as ElementType, aY as ElementsOptions, b4 as FetchQuoteInput, bd as FxService, bh as GetProductsOptions, bk as InventoryService, bs as LinkService, by as LiteService, bF as MESSAGE_TYPES, c5 as OrderQueries, cr as PriceQuote, cx as QuoteBundleSelectionInput, cy as QuoteCompositeSelectionInput, cz as QuoteDynamicBuckets, cA as QuoteStatus, cB as QuoteUiMessage, cD as RefreshQuoteInput, cE as RefreshQuoteResult, d4 as SchedulingService, dK as createElements } from './client-
|
|
1
|
+
export { k as AuthService, C as BusinessService, O as CartOperations, P as CatalogueQueries, ab as CheckoutOperations, ab as CheckoutService, ah as CimplifyElement, ai as CimplifyElements, aK as ELEMENT_TYPES, aL as EVENT_TYPES, aO as ElementEventType, aP as ElementOptions, aQ as ElementType, aY as ElementsOptions, b4 as FetchQuoteInput, bd as FxService, bh as GetProductsOptions, bk as InventoryService, bs as LinkService, by as LiteService, bF as MESSAGE_TYPES, c5 as OrderQueries, cr as PriceQuote, cx as QuoteBundleSelectionInput, cy as QuoteCompositeSelectionInput, cz as QuoteDynamicBuckets, cA as QuoteStatus, cB as QuoteUiMessage, cD as RefreshQuoteInput, cE as RefreshQuoteResult, d4 as SchedulingService, dK as createElements } from './client-CX59ew7C.js';
|
|
2
2
|
import './product-O8-wcHSe.js';
|
|
3
3
|
import './payment-By0JidTe.js';
|
|
4
4
|
|
|
@@ -2486,10 +2486,15 @@ function buildV1(deps) {
|
|
|
2486
2486
|
);
|
|
2487
2487
|
app.post("/support/conversation/messages", async (c) => {
|
|
2488
2488
|
const body = await c.req.json().catch(() => ({}));
|
|
2489
|
-
return tryRoute(
|
|
2490
|
-
c
|
|
2491
|
-
|
|
2492
|
-
|
|
2489
|
+
return tryRoute(c, () => {
|
|
2490
|
+
const conversationId = body.conversation_id || deps.support.ensureConversation(deps.defaultBusinessId, c.var.session.customer_id).id;
|
|
2491
|
+
return deps.support.sendMessage(conversationId, {
|
|
2492
|
+
content: body.content ?? "",
|
|
2493
|
+
content_type: body.content_type,
|
|
2494
|
+
sender_type: body.sender_type,
|
|
2495
|
+
reply_to_message_id: body.reply_to_message_id
|
|
2496
|
+
});
|
|
2497
|
+
});
|
|
2493
2498
|
});
|
|
2494
2499
|
app.get(
|
|
2495
2500
|
"/support/conversation/messages",
|
|
@@ -5482,6 +5487,12 @@ function createSupportService(opts) {
|
|
|
5482
5487
|
registry.conversations.put(id, conv);
|
|
5483
5488
|
return conv;
|
|
5484
5489
|
},
|
|
5490
|
+
ensureConversation(businessId, customerId) {
|
|
5491
|
+
const existing = registry.conversations.list(
|
|
5492
|
+
(c) => c.business_id === businessId && c.customer_id === customerId
|
|
5493
|
+
);
|
|
5494
|
+
return existing[existing.length - 1] ?? this.openConversation(businessId, customerId);
|
|
5495
|
+
},
|
|
5485
5496
|
peekConversation(businessId, customerId) {
|
|
5486
5497
|
const matches = registry.conversations.list(
|
|
5487
5498
|
(c) => c.business_id === businessId && c.customer_id === customerId
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createMockApp } from './chunk-
|
|
2
|
-
import { createCimplifyClient } from './chunk-
|
|
1
|
+
import { createMockApp } from './chunk-7TEMLVDT.mjs';
|
|
2
|
+
import { createCimplifyClient } from './chunk-XMDLF5Y6.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
var cimplifyRegistry = z.registry();
|
|
@@ -2488,10 +2488,15 @@ function buildV1(deps) {
|
|
|
2488
2488
|
);
|
|
2489
2489
|
app.post("/support/conversation/messages", async (c) => {
|
|
2490
2490
|
const body = await c.req.json().catch(() => ({}));
|
|
2491
|
-
return tryRoute(
|
|
2492
|
-
c
|
|
2493
|
-
|
|
2494
|
-
|
|
2491
|
+
return tryRoute(c, () => {
|
|
2492
|
+
const conversationId = body.conversation_id || deps.support.ensureConversation(deps.defaultBusinessId, c.var.session.customer_id).id;
|
|
2493
|
+
return deps.support.sendMessage(conversationId, {
|
|
2494
|
+
content: body.content ?? "",
|
|
2495
|
+
content_type: body.content_type,
|
|
2496
|
+
sender_type: body.sender_type,
|
|
2497
|
+
reply_to_message_id: body.reply_to_message_id
|
|
2498
|
+
});
|
|
2499
|
+
});
|
|
2495
2500
|
});
|
|
2496
2501
|
app.get(
|
|
2497
2502
|
"/support/conversation/messages",
|
|
@@ -5484,6 +5489,12 @@ function createSupportService(opts) {
|
|
|
5484
5489
|
registry.conversations.put(id, conv);
|
|
5485
5490
|
return conv;
|
|
5486
5491
|
},
|
|
5492
|
+
ensureConversation(businessId, customerId) {
|
|
5493
|
+
const existing = registry.conversations.list(
|
|
5494
|
+
(c) => c.business_id === businessId && c.customer_id === customerId
|
|
5495
|
+
);
|
|
5496
|
+
return existing[existing.length - 1] ?? this.openConversation(businessId, customerId);
|
|
5497
|
+
},
|
|
5487
5498
|
peekConversation(businessId, customerId) {
|
|
5488
5499
|
const matches = registry.conversations.list(
|
|
5489
5500
|
(c) => c.business_id === businessId && c.customer_id === customerId
|
|
@@ -74,12 +74,7 @@ var ActivityService = class {
|
|
|
74
74
|
is_new_visitor: isNewVisitor
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
/**
|
|
78
|
-
* Record a page the visitor landed on. Product and category views already
|
|
79
|
-
* imply one, so call this for everything else — home, listings, booking,
|
|
80
|
-
* checkout — or entry pages, exits and bounce rate are computed from
|
|
81
|
-
* product pages alone.
|
|
82
|
-
*/
|
|
77
|
+
/** Product/category views imply one; call this for every other page. */
|
|
83
78
|
trackPageView(options = {}) {
|
|
84
79
|
this.sendEvents([
|
|
85
80
|
{
|
|
@@ -125,6 +120,37 @@ var ActivityService = class {
|
|
|
125
120
|
this.client.post("/api/v1/activity/messages/dismiss", { code })
|
|
126
121
|
);
|
|
127
122
|
}
|
|
123
|
+
/** Records a page view now and on every route change; returns a stop fn. */
|
|
124
|
+
autoTrackPageViews() {
|
|
125
|
+
if (typeof window === "undefined") return () => {
|
|
126
|
+
};
|
|
127
|
+
let lastPath = null;
|
|
128
|
+
const record = () => {
|
|
129
|
+
const path = window.location.pathname;
|
|
130
|
+
if (path === lastPath) return;
|
|
131
|
+
lastPath = path;
|
|
132
|
+
try {
|
|
133
|
+
this.trackPageView({ pagePath: path });
|
|
134
|
+
} catch {
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const { pushState, replaceState } = window.history;
|
|
138
|
+
window.history.pushState = function(...args) {
|
|
139
|
+
pushState.apply(this, args);
|
|
140
|
+
record();
|
|
141
|
+
};
|
|
142
|
+
window.history.replaceState = function(...args) {
|
|
143
|
+
replaceState.apply(this, args);
|
|
144
|
+
record();
|
|
145
|
+
};
|
|
146
|
+
window.addEventListener("popstate", record);
|
|
147
|
+
record();
|
|
148
|
+
return () => {
|
|
149
|
+
window.history.pushState = pushState;
|
|
150
|
+
window.history.replaceState = replaceState;
|
|
151
|
+
window.removeEventListener("popstate", record);
|
|
152
|
+
};
|
|
153
|
+
}
|
|
128
154
|
sendEvents(events) {
|
|
129
155
|
this.startSession();
|
|
130
156
|
this.client.post("/api/v1/activity/events", { events }).catch(() => {
|
|
@@ -646,6 +672,7 @@ var CimplifyClient = class {
|
|
|
646
672
|
* consumer decides how to react.
|
|
647
673
|
*/
|
|
648
674
|
this.events = createClientEvents();
|
|
675
|
+
this.stopPageViewTracking = null;
|
|
649
676
|
this.publicKey = config.publicKey || getEnvPublicKey() || "";
|
|
650
677
|
const urls = deriveUrls();
|
|
651
678
|
this.baseUrl = config.baseUrl ? normalizeUrl(config.baseUrl) : urls.baseUrl;
|
|
@@ -663,6 +690,9 @@ var CimplifyClient = class {
|
|
|
663
690
|
'[Cimplify] No public key found. Set NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY in your environment, or pass { publicKey: "cpk_..." } to createCimplifyClient().'
|
|
664
691
|
);
|
|
665
692
|
}
|
|
693
|
+
if (config.trackPageViews !== false) {
|
|
694
|
+
this.stopPageViewTracking = this.activity.autoTrackPageViews();
|
|
695
|
+
}
|
|
666
696
|
}
|
|
667
697
|
buildUrl(base, path) {
|
|
668
698
|
const url = `${base}${path}`;
|
|
@@ -671,6 +701,10 @@ var CimplifyClient = class {
|
|
|
671
701
|
const separator = url.includes("?") ? "&" : "?";
|
|
672
702
|
return `${url}${separator}location_id=${encodeURIComponent(locationId)}`;
|
|
673
703
|
}
|
|
704
|
+
stopTrackingPageViews() {
|
|
705
|
+
this.stopPageViewTracking?.();
|
|
706
|
+
this.stopPageViewTracking = null;
|
|
707
|
+
}
|
|
674
708
|
getAccessToken() {
|
|
675
709
|
return this.accessToken;
|
|
676
710
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkFECGCIVV_js = require('./chunk-FECGCIVV.js');
|
|
4
|
+
var chunkW5PH7SPK_js = require('./chunk-W5PH7SPK.js');
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
|
|
7
7
|
var cimplifyRegistry = zod.z.registry();
|
|
@@ -600,7 +600,7 @@ async function toForwardedRequest(input, init) {
|
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
602
|
function createTestClient(options = {}) {
|
|
603
|
-
const mock =
|
|
603
|
+
const mock = chunkFECGCIVV_js.createMockApp(options);
|
|
604
604
|
let sessionToken;
|
|
605
605
|
const fetchImpl = async (input, init) => {
|
|
606
606
|
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
|
@@ -619,7 +619,7 @@ function createTestClient(options = {}) {
|
|
|
619
619
|
if (echoed) sessionToken = echoed;
|
|
620
620
|
return res;
|
|
621
621
|
};
|
|
622
|
-
const client =
|
|
622
|
+
const client = chunkW5PH7SPK_js.createCimplifyClient({
|
|
623
623
|
baseUrl: TEST_BASE_URL,
|
|
624
624
|
// Link mock lives at /v1/link on the same Hono app, so point the SDK's
|
|
625
625
|
// separate Link transport at the same TEST_BASE_URL.
|
|
@@ -72,12 +72,7 @@ var ActivityService = class {
|
|
|
72
72
|
is_new_visitor: isNewVisitor
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Record a page the visitor landed on. Product and category views already
|
|
77
|
-
* imply one, so call this for everything else — home, listings, booking,
|
|
78
|
-
* checkout — or entry pages, exits and bounce rate are computed from
|
|
79
|
-
* product pages alone.
|
|
80
|
-
*/
|
|
75
|
+
/** Product/category views imply one; call this for every other page. */
|
|
81
76
|
trackPageView(options = {}) {
|
|
82
77
|
this.sendEvents([
|
|
83
78
|
{
|
|
@@ -123,6 +118,37 @@ var ActivityService = class {
|
|
|
123
118
|
this.client.post("/api/v1/activity/messages/dismiss", { code })
|
|
124
119
|
);
|
|
125
120
|
}
|
|
121
|
+
/** Records a page view now and on every route change; returns a stop fn. */
|
|
122
|
+
autoTrackPageViews() {
|
|
123
|
+
if (typeof window === "undefined") return () => {
|
|
124
|
+
};
|
|
125
|
+
let lastPath = null;
|
|
126
|
+
const record = () => {
|
|
127
|
+
const path = window.location.pathname;
|
|
128
|
+
if (path === lastPath) return;
|
|
129
|
+
lastPath = path;
|
|
130
|
+
try {
|
|
131
|
+
this.trackPageView({ pagePath: path });
|
|
132
|
+
} catch {
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
const { pushState, replaceState } = window.history;
|
|
136
|
+
window.history.pushState = function(...args) {
|
|
137
|
+
pushState.apply(this, args);
|
|
138
|
+
record();
|
|
139
|
+
};
|
|
140
|
+
window.history.replaceState = function(...args) {
|
|
141
|
+
replaceState.apply(this, args);
|
|
142
|
+
record();
|
|
143
|
+
};
|
|
144
|
+
window.addEventListener("popstate", record);
|
|
145
|
+
record();
|
|
146
|
+
return () => {
|
|
147
|
+
window.history.pushState = pushState;
|
|
148
|
+
window.history.replaceState = replaceState;
|
|
149
|
+
window.removeEventListener("popstate", record);
|
|
150
|
+
};
|
|
151
|
+
}
|
|
126
152
|
sendEvents(events) {
|
|
127
153
|
this.startSession();
|
|
128
154
|
this.client.post("/api/v1/activity/events", { events }).catch(() => {
|
|
@@ -644,6 +670,7 @@ var CimplifyClient = class {
|
|
|
644
670
|
* consumer decides how to react.
|
|
645
671
|
*/
|
|
646
672
|
this.events = createClientEvents();
|
|
673
|
+
this.stopPageViewTracking = null;
|
|
647
674
|
this.publicKey = config.publicKey || getEnvPublicKey() || "";
|
|
648
675
|
const urls = deriveUrls();
|
|
649
676
|
this.baseUrl = config.baseUrl ? normalizeUrl(config.baseUrl) : urls.baseUrl;
|
|
@@ -661,6 +688,9 @@ var CimplifyClient = class {
|
|
|
661
688
|
'[Cimplify] No public key found. Set NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY in your environment, or pass { publicKey: "cpk_..." } to createCimplifyClient().'
|
|
662
689
|
);
|
|
663
690
|
}
|
|
691
|
+
if (config.trackPageViews !== false) {
|
|
692
|
+
this.stopPageViewTracking = this.activity.autoTrackPageViews();
|
|
693
|
+
}
|
|
664
694
|
}
|
|
665
695
|
buildUrl(base, path) {
|
|
666
696
|
const url = `${base}${path}`;
|
|
@@ -669,6 +699,10 @@ var CimplifyClient = class {
|
|
|
669
699
|
const separator = url.includes("?") ? "&" : "?";
|
|
670
700
|
return `${url}${separator}location_id=${encodeURIComponent(locationId)}`;
|
|
671
701
|
}
|
|
702
|
+
stopTrackingPageViews() {
|
|
703
|
+
this.stopPageViewTracking?.();
|
|
704
|
+
this.stopPageViewTracking = null;
|
|
705
|
+
}
|
|
672
706
|
getAccessToken() {
|
|
673
707
|
return this.accessToken;
|
|
674
708
|
}
|
|
@@ -2421,12 +2421,7 @@ declare class ActivityService {
|
|
|
2421
2421
|
*/
|
|
2422
2422
|
startSession(): void;
|
|
2423
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
|
-
*/
|
|
2424
|
+
/** Product/category views imply one; call this for every other page. */
|
|
2430
2425
|
trackPageView(options?: TrackPageViewOptions): void;
|
|
2431
2426
|
trackProductView(productId: string, options?: TrackProductViewOptions): void;
|
|
2432
2427
|
trackCategoryView(categoryId: string, options?: TrackCategoryViewOptions): void;
|
|
@@ -2436,6 +2431,8 @@ declare class ActivityService {
|
|
|
2436
2431
|
limit?: number;
|
|
2437
2432
|
}): Promise<Result<ActivityRecommendationsResponse, CimplifyError>>;
|
|
2438
2433
|
dismissMessage(code: string): Promise<Result<DismissMessageResponse, CimplifyError>>;
|
|
2434
|
+
/** Records a page view now and on every route change; returns a stop fn. */
|
|
2435
|
+
autoTrackPageViews(): () => void;
|
|
2439
2436
|
private sendEvents;
|
|
2440
2437
|
}
|
|
2441
2438
|
|
|
@@ -2829,6 +2826,8 @@ interface CimplifyConfig {
|
|
|
2829
2826
|
* fetch wrappers. Signature matches the global `fetch` exactly.
|
|
2830
2827
|
*/
|
|
2831
2828
|
fetch?: typeof fetch;
|
|
2829
|
+
/** Auto-record page views in the browser. Default true; false to gate on consent. */
|
|
2830
|
+
trackPageViews?: boolean;
|
|
2832
2831
|
}
|
|
2833
2832
|
declare class CimplifyClient {
|
|
2834
2833
|
private baseUrl;
|
|
@@ -2874,6 +2873,8 @@ declare class CimplifyClient {
|
|
|
2874
2873
|
private _delivery?;
|
|
2875
2874
|
private _support?;
|
|
2876
2875
|
constructor(config?: CimplifyConfig);
|
|
2876
|
+
private stopPageViewTracking;
|
|
2877
|
+
stopTrackingPageViews(): void;
|
|
2877
2878
|
getAccessToken(): string | null;
|
|
2878
2879
|
getPublicKey(): string;
|
|
2879
2880
|
getBaseUrl(): string;
|
|
@@ -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-BNfVL2IL.mjs';
|
|
2
|
+
import { A as AppHandle, C as CreateAppOptions } from './server-HVDbbqR9.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-CX59ew7C.js';
|
|
2
|
+
import { A as AppHandle, C as CreateAppOptions } from './server-JBuTPY-j.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Test client + fixtures.
|
|
@@ -2421,12 +2421,7 @@ declare class ActivityService {
|
|
|
2421
2421
|
*/
|
|
2422
2422
|
startSession(): void;
|
|
2423
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
|
-
*/
|
|
2424
|
+
/** Product/category views imply one; call this for every other page. */
|
|
2430
2425
|
trackPageView(options?: TrackPageViewOptions): void;
|
|
2431
2426
|
trackProductView(productId: string, options?: TrackProductViewOptions): void;
|
|
2432
2427
|
trackCategoryView(categoryId: string, options?: TrackCategoryViewOptions): void;
|
|
@@ -2436,6 +2431,8 @@ declare class ActivityService {
|
|
|
2436
2431
|
limit?: number;
|
|
2437
2432
|
}): Promise<Result<ActivityRecommendationsResponse, CimplifyError>>;
|
|
2438
2433
|
dismissMessage(code: string): Promise<Result<DismissMessageResponse, CimplifyError>>;
|
|
2434
|
+
/** Records a page view now and on every route change; returns a stop fn. */
|
|
2435
|
+
autoTrackPageViews(): () => void;
|
|
2439
2436
|
private sendEvents;
|
|
2440
2437
|
}
|
|
2441
2438
|
|
|
@@ -2829,6 +2826,8 @@ interface CimplifyConfig {
|
|
|
2829
2826
|
* fetch wrappers. Signature matches the global `fetch` exactly.
|
|
2830
2827
|
*/
|
|
2831
2828
|
fetch?: typeof fetch;
|
|
2829
|
+
/** Auto-record page views in the browser. Default true; false to gate on consent. */
|
|
2830
|
+
trackPageViews?: boolean;
|
|
2832
2831
|
}
|
|
2833
2832
|
declare class CimplifyClient {
|
|
2834
2833
|
private baseUrl;
|
|
@@ -2874,6 +2873,8 @@ declare class CimplifyClient {
|
|
|
2874
2873
|
private _delivery?;
|
|
2875
2874
|
private _support?;
|
|
2876
2875
|
constructor(config?: CimplifyConfig);
|
|
2876
|
+
private stopPageViewTracking;
|
|
2877
|
+
stopTrackingPageViews(): void;
|
|
2877
2878
|
getAccessToken(): string | null;
|
|
2878
2879
|
getPublicKey(): string;
|
|
2879
2880
|
getBaseUrl(): string;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { X as ChatReplyCard } from './client-
|
|
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-
|
|
1
|
+
import { X as ChatReplyCard } from './client-BNfVL2IL.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-BNfVL2IL.mjs';
|
|
3
3
|
import { bb as ProductWithDetails, aZ as Product, av as DurationUnit, j as ApiError } from './product-O8-wcHSe.mjs';
|
|
4
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
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';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { X as ChatReplyCard } from './client-
|
|
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-
|
|
1
|
+
import { X as ChatReplyCard } from './client-CX59ew7C.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-CX59ew7C.js';
|
|
3
3
|
import { bb as ProductWithDetails, aZ as Product, av as DurationUnit, j as ApiError } from './product-O8-wcHSe.js';
|
|
4
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
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';
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkHKN3YG76_js = require('./chunk-HKN3YG76.js');
|
|
4
4
|
var chunkL5GKVQVJ_js = require('./chunk-L5GKVQVJ.js');
|
|
5
|
-
var
|
|
5
|
+
var chunkW5PH7SPK_js = require('./chunk-W5PH7SPK.js');
|
|
6
6
|
var chunkVEOAMBEX_js = require('./chunk-VEOAMBEX.js');
|
|
7
7
|
var chunkPTPOQVXS_js = require('./chunk-PTPOQVXS.js');
|
|
8
8
|
var chunkAETVRBKI_js = require('./chunk-AETVRBKI.js');
|
|
@@ -185,39 +185,39 @@ Object.defineProperty(exports, "resolvePhoneCountryCode", {
|
|
|
185
185
|
});
|
|
186
186
|
Object.defineProperty(exports, "ActivityService", {
|
|
187
187
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkW5PH7SPK_js.ActivityService; }
|
|
189
189
|
});
|
|
190
190
|
Object.defineProperty(exports, "CimplifyClient", {
|
|
191
191
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkW5PH7SPK_js.CimplifyClient; }
|
|
193
193
|
});
|
|
194
194
|
Object.defineProperty(exports, "DeliveryService", {
|
|
195
195
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkW5PH7SPK_js.DeliveryService; }
|
|
197
197
|
});
|
|
198
198
|
Object.defineProperty(exports, "PlacesService", {
|
|
199
199
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkW5PH7SPK_js.PlacesService; }
|
|
201
201
|
});
|
|
202
202
|
Object.defineProperty(exports, "StoreCreditQueries", {
|
|
203
203
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkW5PH7SPK_js.StoreCreditQueries; }
|
|
205
205
|
});
|
|
206
206
|
Object.defineProperty(exports, "SubscriptionService", {
|
|
207
207
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkW5PH7SPK_js.SubscriptionService; }
|
|
209
209
|
});
|
|
210
210
|
Object.defineProperty(exports, "SupportService", {
|
|
211
211
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkW5PH7SPK_js.SupportService; }
|
|
213
213
|
});
|
|
214
214
|
Object.defineProperty(exports, "UploadService", {
|
|
215
215
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkW5PH7SPK_js.UploadService; }
|
|
217
217
|
});
|
|
218
218
|
Object.defineProperty(exports, "createCimplifyClient", {
|
|
219
219
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
220
|
+
get: function () { return chunkW5PH7SPK_js.createCimplifyClient; }
|
|
221
221
|
});
|
|
222
222
|
Object.defineProperty(exports, "AUTHORIZATION_TYPE", {
|
|
223
223
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { BOUNDARY_KIND, CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, allGalleryImages, assetUrl, getVariantDisplayName, isCimplifyAsset, isMultiDayService, priceBasisLabel, resolveGallery, serviceBillingMultiplier, stayLength, stayPeriods } from './chunk-RRBY35TJ.mjs';
|
|
2
2
|
export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-YOIVZ6OA.mjs';
|
|
3
|
-
export { ActivityService, CimplifyClient, DeliveryService, PlacesService, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-
|
|
3
|
+
export { ActivityService, CimplifyClient, DeliveryService, PlacesService, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-XMDLF5Y6.mjs';
|
|
4
4
|
import { getAuthorizationEndpoint, DEFAULT_ISSUER, generatePkce, generateState } from './chunk-VUSHG3HA.mjs';
|
|
5
5
|
export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CONTACT_TYPE, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, ELEMENTS_AUTH_CONTACT_TYPES, ELEMENTS_AUTH_MODES, ELEMENTS_AUTH_PROMPTS, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MESSAGE_TYPES, MOBILE_MONEY_PROVIDER, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, SchedulingService, combine, combineObject, createElements, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, startSignIn, toNullable, tryCatch, unwrap } from './chunk-VUSHG3HA.mjs';
|
|
6
6
|
export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceRange, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getPriceRange, getProductCurrency, getTaxAmount, getUnitPriceAtQuantity, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice } from './chunk-KFLGQGMC.mjs';
|
package/dist/mock/cli.mjs
CHANGED
|
@@ -3496,10 +3496,15 @@ function buildV1(deps) {
|
|
|
3496
3496
|
);
|
|
3497
3497
|
app.post("/support/conversation/messages", async (c) => {
|
|
3498
3498
|
const body = await c.req.json().catch(() => ({}));
|
|
3499
|
-
return tryRoute(
|
|
3500
|
-
c
|
|
3501
|
-
|
|
3502
|
-
|
|
3499
|
+
return tryRoute(c, () => {
|
|
3500
|
+
const conversationId = body.conversation_id || deps.support.ensureConversation(deps.defaultBusinessId, c.var.session.customer_id).id;
|
|
3501
|
+
return deps.support.sendMessage(conversationId, {
|
|
3502
|
+
content: body.content ?? "",
|
|
3503
|
+
content_type: body.content_type,
|
|
3504
|
+
sender_type: body.sender_type,
|
|
3505
|
+
reply_to_message_id: body.reply_to_message_id
|
|
3506
|
+
});
|
|
3507
|
+
});
|
|
3503
3508
|
});
|
|
3504
3509
|
app.get(
|
|
3505
3510
|
"/support/conversation/messages",
|
|
@@ -6514,6 +6519,12 @@ function createSupportService(opts) {
|
|
|
6514
6519
|
registry.conversations.put(id, conv);
|
|
6515
6520
|
return conv;
|
|
6516
6521
|
},
|
|
6522
|
+
ensureConversation(businessId, customerId) {
|
|
6523
|
+
const existing = registry.conversations.list(
|
|
6524
|
+
(c) => c.business_id === businessId && c.customer_id === customerId
|
|
6525
|
+
);
|
|
6526
|
+
return existing[existing.length - 1] ?? this.openConversation(businessId, customerId);
|
|
6527
|
+
},
|
|
6517
6528
|
peekConversation(businessId, customerId) {
|
|
6518
6529
|
const matches = registry.conversations.list(
|
|
6519
6530
|
(c) => c.business_id === businessId && c.customer_id === customerId
|
package/dist/mock/library.js
CHANGED
|
@@ -2558,10 +2558,15 @@ function buildV1(deps) {
|
|
|
2558
2558
|
);
|
|
2559
2559
|
app.post("/support/conversation/messages", async (c) => {
|
|
2560
2560
|
const body = await c.req.json().catch(() => ({}));
|
|
2561
|
-
return tryRoute(
|
|
2562
|
-
c
|
|
2563
|
-
|
|
2564
|
-
|
|
2561
|
+
return tryRoute(c, () => {
|
|
2562
|
+
const conversationId = body.conversation_id || deps.support.ensureConversation(deps.defaultBusinessId, c.var.session.customer_id).id;
|
|
2563
|
+
return deps.support.sendMessage(conversationId, {
|
|
2564
|
+
content: body.content ?? "",
|
|
2565
|
+
content_type: body.content_type,
|
|
2566
|
+
sender_type: body.sender_type,
|
|
2567
|
+
reply_to_message_id: body.reply_to_message_id
|
|
2568
|
+
});
|
|
2569
|
+
});
|
|
2565
2570
|
});
|
|
2566
2571
|
app.get(
|
|
2567
2572
|
"/support/conversation/messages",
|
|
@@ -5576,6 +5581,12 @@ function createSupportService(opts) {
|
|
|
5576
5581
|
registry.conversations.put(id, conv);
|
|
5577
5582
|
return conv;
|
|
5578
5583
|
},
|
|
5584
|
+
ensureConversation(businessId, customerId) {
|
|
5585
|
+
const existing = registry.conversations.list(
|
|
5586
|
+
(c) => c.business_id === businessId && c.customer_id === customerId
|
|
5587
|
+
);
|
|
5588
|
+
return existing[existing.length - 1] ?? this.openConversation(businessId, customerId);
|
|
5589
|
+
},
|
|
5579
5590
|
peekConversation(businessId, customerId) {
|
|
5580
5591
|
const matches = registry.conversations.list(
|
|
5581
5592
|
(c) => c.business_id === businessId && c.customer_id === customerId
|