@cimplify/sdk 0.65.0 → 0.66.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-PKYZBKZD.mjs → chunk-227XTAEB.mjs} +51 -24
- package/dist/{chunk-2AU263DK.mjs → chunk-3Z3FQH7X.mjs} +1 -1
- package/dist/{chunk-XSOYJLMZ.mjs → chunk-7BKKBJQM.mjs} +10 -3
- package/dist/{chunk-6DMHVQ42.js → chunk-GDAGM26J.js} +4 -4
- package/dist/{chunk-VKID3QUE.js → chunk-H6DBPHMZ.js} +2 -2
- package/dist/{chunk-VAMZPBA4.js → chunk-J3MGY6AU.js} +51 -24
- package/dist/{chunk-DKT62WQW.js → chunk-KWYI2TTA.js} +10 -3
- package/dist/{chunk-WDTFIIY6.mjs → chunk-MWI5GAUF.mjs} +1 -1
- package/dist/{client-QTrsv6Gu.d.ts → client-Bo5rujc2.d.ts} +3 -2
- package/dist/{client-XoswXzib.d.mts → client-CUrA1uQ0.d.mts} +1 -1
- package/dist/{client-p1Iofyc9.d.ts → client-DasPHOJh.d.ts} +1 -1
- package/dist/{client-BS5lNWWH.d.mts → client-Dka2cGhu.d.mts} +3 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -26
- package/dist/index.mjs +4 -4
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +50 -50
- package/dist/react.mjs +4 -4
- package/dist/server.d.mts +18 -3
- package/dist/server.d.ts +18 -3
- package/dist/server.js +166 -27
- package/dist/server.mjs +158 -23
- package/dist/styles.css +1 -1
- package/dist/testing/suite.d.mts +2 -2
- package/dist/testing/suite.d.ts +2 -2
- package/dist/testing/suite.js +21 -21
- package/dist/testing/suite.mjs +2 -2
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +77 -77
- package/dist/testing.mjs +3 -3
- package/package.json +1 -1
package/dist/advanced.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { k as AuthService, z as BusinessService, O as CartOperations, P as CatalogueQueries, a8 as CheckoutOperations, a8 as CheckoutService, ae as CimplifyElement, af as CimplifyElements, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aL as ElementsOptions, aR as FetchQuoteInput, aY as FxService, a$ as GetProductsOptions, b1 as InventoryService, b8 as LinkService, bc as LiteService, bj as MESSAGE_TYPES, bI as OrderQueries, bY as PriceQuote, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, cA as SchedulingService, dc as createElements } from './client-
|
|
1
|
+
export { k as AuthService, z as BusinessService, O as CartOperations, P as CatalogueQueries, a8 as CheckoutOperations, a8 as CheckoutService, ae as CimplifyElement, af as CimplifyElements, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aL as ElementsOptions, aR as FetchQuoteInput, aY as FxService, a$ as GetProductsOptions, b1 as InventoryService, b8 as LinkService, bc as LiteService, bj as MESSAGE_TYPES, bI as OrderQueries, bY as PriceQuote, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, cA as SchedulingService, dc as createElements } from './client-Dka2cGhu.mjs';
|
|
2
2
|
import './product-B_kS4Oxa.mjs';
|
|
3
3
|
import './payment-DVS7ZUEp.mjs';
|
|
4
4
|
|
package/dist/advanced.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { k as AuthService, z as BusinessService, O as CartOperations, P as CatalogueQueries, a8 as CheckoutOperations, a8 as CheckoutService, ae as CimplifyElement, af as CimplifyElements, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aL as ElementsOptions, aR as FetchQuoteInput, aY as FxService, a$ as GetProductsOptions, b1 as InventoryService, b8 as LinkService, bc as LiteService, bj as MESSAGE_TYPES, bI as OrderQueries, bY as PriceQuote, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, cA as SchedulingService, dc as createElements } from './client-
|
|
1
|
+
export { k as AuthService, z as BusinessService, O as CartOperations, P as CatalogueQueries, a8 as CheckoutOperations, a8 as CheckoutService, ae as CimplifyElement, af as CimplifyElements, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aL as ElementsOptions, aR as FetchQuoteInput, aY as FxService, a$ as GetProductsOptions, b1 as InventoryService, b8 as LinkService, bc as LiteService, bj as MESSAGE_TYPES, bI as OrderQueries, bY as PriceQuote, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, cA as SchedulingService, dc as createElements } from './client-Bo5rujc2.js';
|
|
2
2
|
import './product-B_kS4Oxa.js';
|
|
3
3
|
import './payment-sn-yGL7v.js';
|
|
4
4
|
|
|
@@ -271,10 +271,10 @@ function createClientEvents() {
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
// src/client.ts
|
|
274
|
-
var ACCESS_TOKEN_STORAGE_KEY = "cimplify_access_token";
|
|
275
274
|
var SESSION_TOKEN_STORAGE_KEY = "cimplify_session_token";
|
|
276
275
|
var ORDER_TOKEN_PREFIX = "cimplify_ot_";
|
|
277
276
|
var SESSION_TOKEN_HEADER = "x-session-token";
|
|
277
|
+
var REFRESH_ENDPOINT = "/v1/link/elements/refresh";
|
|
278
278
|
var ORDER_TOKEN_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
279
279
|
var DEFAULT_TIMEOUT_MS = 5e3;
|
|
280
280
|
var DEFAULT_MAX_RETRIES = 3;
|
|
@@ -382,6 +382,7 @@ var CimplifyClient = class {
|
|
|
382
382
|
this.context = {};
|
|
383
383
|
this.businessId = null;
|
|
384
384
|
this.businessIdResolvePromise = null;
|
|
385
|
+
this.refreshInflight = null;
|
|
385
386
|
this.inflightRequests = /* @__PURE__ */ new Map();
|
|
386
387
|
/**
|
|
387
388
|
* App-level event channel. Subscribe to surface mutation rollbacks, outbox
|
|
@@ -400,7 +401,6 @@ var CimplifyClient = class {
|
|
|
400
401
|
this.retryDelay = config.retryDelay ?? DEFAULT_RETRY_DELAY_MS;
|
|
401
402
|
this.hooks = config.hooks ?? {};
|
|
402
403
|
this.fetchImpl = (config.fetch ?? globalThis.fetch).bind(globalThis);
|
|
403
|
-
this.accessToken = this.loadAccessToken();
|
|
404
404
|
this.sessionToken = this.loadSessionToken();
|
|
405
405
|
if (!this.publicKey && !config.suppressPublicKeyWarning) {
|
|
406
406
|
console.warn(
|
|
@@ -427,7 +427,6 @@ var CimplifyClient = class {
|
|
|
427
427
|
setAccessToken(token) {
|
|
428
428
|
const previous = this.accessToken;
|
|
429
429
|
this.accessToken = token;
|
|
430
|
-
this.saveAccessToken(token);
|
|
431
430
|
this.hooks.onSessionChange?.({
|
|
432
431
|
previousToken: previous,
|
|
433
432
|
newToken: token,
|
|
@@ -438,7 +437,6 @@ var CimplifyClient = class {
|
|
|
438
437
|
const previous = this.accessToken;
|
|
439
438
|
this.accessToken = null;
|
|
440
439
|
this.sessionToken = null;
|
|
441
|
-
this.saveAccessToken(null);
|
|
442
440
|
if (typeof window !== "undefined" && window.localStorage) {
|
|
443
441
|
localStorage.removeItem(SESSION_TOKEN_STORAGE_KEY);
|
|
444
442
|
}
|
|
@@ -531,23 +529,52 @@ var CimplifyClient = class {
|
|
|
531
529
|
this.businessIdResolvePromise = null;
|
|
532
530
|
}
|
|
533
531
|
}
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
return
|
|
539
|
-
|
|
540
|
-
saveAccessToken(token) {
|
|
541
|
-
if (typeof window !== "undefined" && window.localStorage) {
|
|
532
|
+
// Browser-only (the server is handed a token directly). Concurrent 401s share
|
|
533
|
+
// one in-flight refresh so the rotating cookie rotates once, not N times.
|
|
534
|
+
async refreshAccessToken() {
|
|
535
|
+
if (typeof window === "undefined") return false;
|
|
536
|
+
if (this.refreshInflight) return this.refreshInflight;
|
|
537
|
+
this.refreshInflight = (async () => {
|
|
542
538
|
try {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
539
|
+
const headers = { "Content-Type": "application/json" };
|
|
540
|
+
const trimmedPublicKey = this.publicKey.trim();
|
|
541
|
+
if (trimmedPublicKey) headers["X-API-Key"] = trimmedPublicKey;
|
|
542
|
+
const res = await this.fetchImpl(`${this.linkApiUrl}${REFRESH_ENDPOINT}`, {
|
|
543
|
+
method: "POST",
|
|
544
|
+
credentials: this.credentials,
|
|
545
|
+
headers,
|
|
546
|
+
body: "{}"
|
|
547
|
+
});
|
|
548
|
+
if (!res.ok) return false;
|
|
549
|
+
const json = await res.json();
|
|
550
|
+
const token = json?.data?.token ?? json?.token;
|
|
551
|
+
if (typeof token === "string" && token.length > 0) {
|
|
552
|
+
this.setAccessToken(token);
|
|
553
|
+
return true;
|
|
547
554
|
}
|
|
555
|
+
return false;
|
|
548
556
|
} catch {
|
|
557
|
+
return false;
|
|
558
|
+
} finally {
|
|
559
|
+
this.refreshInflight = null;
|
|
549
560
|
}
|
|
550
|
-
}
|
|
561
|
+
})();
|
|
562
|
+
return this.refreshInflight;
|
|
563
|
+
}
|
|
564
|
+
// On 401, refresh from the session cookie once and retry — re-establishes a
|
|
565
|
+
// session after a reload without persisting any token.
|
|
566
|
+
async authedFetch(url, options) {
|
|
567
|
+
const response = await this.resilientFetch(url, options);
|
|
568
|
+
if (response.status !== 401 || typeof window === "undefined" || url.includes(REFRESH_ENDPOINT)) {
|
|
569
|
+
return response;
|
|
570
|
+
}
|
|
571
|
+
const refreshed = await this.refreshAccessToken();
|
|
572
|
+
if (!refreshed) return response;
|
|
573
|
+
const retryHeaders = {
|
|
574
|
+
...options.headers,
|
|
575
|
+
Authorization: `Bearer ${this.accessToken}`
|
|
576
|
+
};
|
|
577
|
+
return this.resilientFetch(url, { ...options, headers: retryHeaders });
|
|
551
578
|
}
|
|
552
579
|
loadSessionToken() {
|
|
553
580
|
if (typeof window !== "undefined" && window.localStorage) {
|
|
@@ -724,7 +751,7 @@ var CimplifyClient = class {
|
|
|
724
751
|
async get(path, opts) {
|
|
725
752
|
const key = this.getDedupeKey("get", path, opts?.cacheOptions);
|
|
726
753
|
return this.deduplicatedRequest(key, async () => {
|
|
727
|
-
const response = await this.
|
|
754
|
+
const response = await this.authedFetch(this.buildUrl(this.baseUrl, path), {
|
|
728
755
|
method: "GET",
|
|
729
756
|
credentials: this.credentials,
|
|
730
757
|
headers: this.getHeaders(),
|
|
@@ -734,7 +761,7 @@ var CimplifyClient = class {
|
|
|
734
761
|
});
|
|
735
762
|
}
|
|
736
763
|
async post(path, body, opts) {
|
|
737
|
-
const response = await this.
|
|
764
|
+
const response = await this.authedFetch(this.buildUrl(this.baseUrl, path), {
|
|
738
765
|
method: "POST",
|
|
739
766
|
credentials: this.credentials,
|
|
740
767
|
headers: mergeOptionHeaders(this.getHeaders(), opts),
|
|
@@ -743,7 +770,7 @@ var CimplifyClient = class {
|
|
|
743
770
|
return this.handleRestResponse(response);
|
|
744
771
|
}
|
|
745
772
|
async patch(path, body, opts) {
|
|
746
|
-
const response = await this.
|
|
773
|
+
const response = await this.authedFetch(this.buildUrl(this.baseUrl, path), {
|
|
747
774
|
method: "PATCH",
|
|
748
775
|
credentials: this.credentials,
|
|
749
776
|
headers: mergeOptionHeaders(this.getHeaders(), opts),
|
|
@@ -752,7 +779,7 @@ var CimplifyClient = class {
|
|
|
752
779
|
return this.handleRestResponse(response);
|
|
753
780
|
}
|
|
754
781
|
async delete(path, opts) {
|
|
755
|
-
const response = await this.
|
|
782
|
+
const response = await this.authedFetch(this.buildUrl(this.baseUrl, path), {
|
|
756
783
|
method: "DELETE",
|
|
757
784
|
credentials: this.credentials,
|
|
758
785
|
headers: mergeOptionHeaders(this.getHeaders(), opts)
|
|
@@ -762,7 +789,7 @@ var CimplifyClient = class {
|
|
|
762
789
|
async linkGet(path, opts) {
|
|
763
790
|
const key = this.getDedupeKey("linkGet", path, opts?.cacheOptions);
|
|
764
791
|
return this.deduplicatedRequest(key, async () => {
|
|
765
|
-
const response = await this.
|
|
792
|
+
const response = await this.authedFetch(`${this.linkApiUrl}${path}`, {
|
|
766
793
|
method: "GET",
|
|
767
794
|
credentials: this.credentials,
|
|
768
795
|
headers: this.getHeaders(),
|
|
@@ -772,7 +799,7 @@ var CimplifyClient = class {
|
|
|
772
799
|
});
|
|
773
800
|
}
|
|
774
801
|
async linkPost(path, body, opts) {
|
|
775
|
-
const response = await this.
|
|
802
|
+
const response = await this.authedFetch(`${this.linkApiUrl}${path}`, {
|
|
776
803
|
method: "POST",
|
|
777
804
|
credentials: this.credentials,
|
|
778
805
|
headers: mergeOptionHeaders(this.getHeaders(), opts),
|
|
@@ -781,7 +808,7 @@ var CimplifyClient = class {
|
|
|
781
808
|
return this.handleRestResponse(response);
|
|
782
809
|
}
|
|
783
810
|
async linkDelete(path, opts) {
|
|
784
|
-
const response = await this.
|
|
811
|
+
const response = await this.authedFetch(`${this.linkApiUrl}${path}`, {
|
|
785
812
|
method: "DELETE",
|
|
786
813
|
credentials: this.credentials,
|
|
787
814
|
headers: mergeOptionHeaders(this.getHeaders(), opts)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { encodePkceState, PKCE_COOKIE, PKCE_COOKIE_PATH, PKCE_COOKIE_MAX_AGE_SECONDS, getAuthorizationEndpoint, DEFAULT_ISSUER } from './chunk-
|
|
1
|
+
import { encodePkceState, PKCE_COOKIE, PKCE_COOKIE_PATH, PKCE_COOKIE_MAX_AGE_SECONDS, getAuthorizationEndpoint, DEFAULT_ISSUER } from './chunk-7BKKBJQM.mjs';
|
|
2
2
|
|
|
3
3
|
// src/gallery.ts
|
|
4
4
|
function dedupe(urls) {
|
|
@@ -18,7 +18,13 @@ function decodePkceState(raw) {
|
|
|
18
18
|
|
|
19
19
|
// src/internal/discovery.ts
|
|
20
20
|
var DEFAULT_ISSUER = "https://api.cimplify.io";
|
|
21
|
-
var
|
|
21
|
+
var DEFAULT_AUTHORIZATION_ENDPOINT = "https://auth.cimplify.io/oauth/authorize";
|
|
22
|
+
function fallbackAuthorizationEndpoint(issuerBase) {
|
|
23
|
+
if (issuerBase === DEFAULT_ISSUER) return DEFAULT_AUTHORIZATION_ENDPOINT;
|
|
24
|
+
throw new Error(
|
|
25
|
+
`OIDC discovery for "${issuerBase}" is unreachable and no fallback authorize endpoint is known for it. Make discovery reachable (enable CORS) or pass authUrl.`
|
|
26
|
+
);
|
|
27
|
+
}
|
|
22
28
|
var cache = /* @__PURE__ */ new Map();
|
|
23
29
|
function fetchDiscovery(issuer) {
|
|
24
30
|
const base = issuer.replace(/\/$/, "");
|
|
@@ -34,12 +40,13 @@ function fetchDiscovery(issuer) {
|
|
|
34
40
|
return pending;
|
|
35
41
|
}
|
|
36
42
|
async function getAuthorizationEndpoint(issuer) {
|
|
43
|
+
const base = issuer.replace(/\/$/, "");
|
|
37
44
|
try {
|
|
38
|
-
const doc = await fetchDiscovery(
|
|
45
|
+
const doc = await fetchDiscovery(base);
|
|
39
46
|
if (doc.authorization_endpoint) return doc.authorization_endpoint;
|
|
40
47
|
} catch {
|
|
41
48
|
}
|
|
42
|
-
return
|
|
49
|
+
return fallbackAuthorizationEndpoint(base);
|
|
43
50
|
}
|
|
44
51
|
|
|
45
52
|
export { DEFAULT_ISSUER, PKCE_COOKIE, PKCE_COOKIE_MAX_AGE_SECONDS, PKCE_COOKIE_PATH, decodePkceState, encodePkceState, getAuthorizationEndpoint };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKWYI2TTA_js = require('./chunk-KWYI2TTA.js');
|
|
4
4
|
|
|
5
5
|
// src/gallery.ts
|
|
6
6
|
function dedupe(urls) {
|
|
@@ -197,7 +197,7 @@ function resolveAuthorizeEndpoint(opts) {
|
|
|
197
197
|
if (opts.authUrl) {
|
|
198
198
|
return Promise.resolve(`${opts.authUrl.replace(/\/$/, "")}/oauth/authorize`);
|
|
199
199
|
}
|
|
200
|
-
return
|
|
200
|
+
return chunkKWYI2TTA_js.getAuthorizationEndpoint(opts.issuer ?? chunkKWYI2TTA_js.DEFAULT_ISSUER);
|
|
201
201
|
}
|
|
202
202
|
async function startSignIn(opts) {
|
|
203
203
|
const callbackUri = opts.callbackUri ?? "/auth/callback";
|
|
@@ -268,9 +268,9 @@ async function startSignIn(opts) {
|
|
|
268
268
|
}
|
|
269
269
|
function startRedirectSignIn(opts, authorizeEndpoint, pkce, state) {
|
|
270
270
|
const returnTo = opts.returnTo ?? window.location.pathname + window.location.search;
|
|
271
|
-
const cookieValue =
|
|
271
|
+
const cookieValue = chunkKWYI2TTA_js.encodePkceState({ verifier: pkce.verifier, state, returnTo });
|
|
272
272
|
const secure = window.location.protocol === "https:" ? "; Secure" : "";
|
|
273
|
-
document.cookie = `${
|
|
273
|
+
document.cookie = `${chunkKWYI2TTA_js.PKCE_COOKIE}=${cookieValue}; Path=${chunkKWYI2TTA_js.PKCE_COOKIE_PATH}; Max-Age=${chunkKWYI2TTA_js.PKCE_COOKIE_MAX_AGE_SECONDS}; SameSite=Lax${secure}`;
|
|
274
274
|
const params = new URLSearchParams({
|
|
275
275
|
response_type: "code",
|
|
276
276
|
response_mode: "query",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkHCZTBWU4_js = require('./chunk-HCZTBWU4.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkJ3MGY6AU_js = require('./chunk-J3MGY6AU.js');
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
|
|
7
7
|
var cimplifyRegistry = zod.z.registry();
|
|
@@ -614,7 +614,7 @@ function createTestClient(options = {}) {
|
|
|
614
614
|
if (echoed) sessionToken = echoed;
|
|
615
615
|
return res;
|
|
616
616
|
};
|
|
617
|
-
const client =
|
|
617
|
+
const client = chunkJ3MGY6AU_js.createCimplifyClient({
|
|
618
618
|
baseUrl: TEST_BASE_URL,
|
|
619
619
|
// Link mock lives at /v1/link on the same Hono app, so point the SDK's
|
|
620
620
|
// separate Link transport at the same TEST_BASE_URL.
|
|
@@ -273,10 +273,10 @@ function createClientEvents() {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
// src/client.ts
|
|
276
|
-
var ACCESS_TOKEN_STORAGE_KEY = "cimplify_access_token";
|
|
277
276
|
var SESSION_TOKEN_STORAGE_KEY = "cimplify_session_token";
|
|
278
277
|
var ORDER_TOKEN_PREFIX = "cimplify_ot_";
|
|
279
278
|
var SESSION_TOKEN_HEADER = "x-session-token";
|
|
279
|
+
var REFRESH_ENDPOINT = "/v1/link/elements/refresh";
|
|
280
280
|
var ORDER_TOKEN_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
281
281
|
var DEFAULT_TIMEOUT_MS = 5e3;
|
|
282
282
|
var DEFAULT_MAX_RETRIES = 3;
|
|
@@ -384,6 +384,7 @@ var CimplifyClient = class {
|
|
|
384
384
|
this.context = {};
|
|
385
385
|
this.businessId = null;
|
|
386
386
|
this.businessIdResolvePromise = null;
|
|
387
|
+
this.refreshInflight = null;
|
|
387
388
|
this.inflightRequests = /* @__PURE__ */ new Map();
|
|
388
389
|
/**
|
|
389
390
|
* App-level event channel. Subscribe to surface mutation rollbacks, outbox
|
|
@@ -402,7 +403,6 @@ var CimplifyClient = class {
|
|
|
402
403
|
this.retryDelay = config.retryDelay ?? DEFAULT_RETRY_DELAY_MS;
|
|
403
404
|
this.hooks = config.hooks ?? {};
|
|
404
405
|
this.fetchImpl = (config.fetch ?? globalThis.fetch).bind(globalThis);
|
|
405
|
-
this.accessToken = this.loadAccessToken();
|
|
406
406
|
this.sessionToken = this.loadSessionToken();
|
|
407
407
|
if (!this.publicKey && !config.suppressPublicKeyWarning) {
|
|
408
408
|
console.warn(
|
|
@@ -429,7 +429,6 @@ var CimplifyClient = class {
|
|
|
429
429
|
setAccessToken(token) {
|
|
430
430
|
const previous = this.accessToken;
|
|
431
431
|
this.accessToken = token;
|
|
432
|
-
this.saveAccessToken(token);
|
|
433
432
|
this.hooks.onSessionChange?.({
|
|
434
433
|
previousToken: previous,
|
|
435
434
|
newToken: token,
|
|
@@ -440,7 +439,6 @@ var CimplifyClient = class {
|
|
|
440
439
|
const previous = this.accessToken;
|
|
441
440
|
this.accessToken = null;
|
|
442
441
|
this.sessionToken = null;
|
|
443
|
-
this.saveAccessToken(null);
|
|
444
442
|
if (typeof window !== "undefined" && window.localStorage) {
|
|
445
443
|
localStorage.removeItem(SESSION_TOKEN_STORAGE_KEY);
|
|
446
444
|
}
|
|
@@ -533,23 +531,52 @@ var CimplifyClient = class {
|
|
|
533
531
|
this.businessIdResolvePromise = null;
|
|
534
532
|
}
|
|
535
533
|
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
return
|
|
541
|
-
|
|
542
|
-
saveAccessToken(token) {
|
|
543
|
-
if (typeof window !== "undefined" && window.localStorage) {
|
|
534
|
+
// Browser-only (the server is handed a token directly). Concurrent 401s share
|
|
535
|
+
// one in-flight refresh so the rotating cookie rotates once, not N times.
|
|
536
|
+
async refreshAccessToken() {
|
|
537
|
+
if (typeof window === "undefined") return false;
|
|
538
|
+
if (this.refreshInflight) return this.refreshInflight;
|
|
539
|
+
this.refreshInflight = (async () => {
|
|
544
540
|
try {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
541
|
+
const headers = { "Content-Type": "application/json" };
|
|
542
|
+
const trimmedPublicKey = this.publicKey.trim();
|
|
543
|
+
if (trimmedPublicKey) headers["X-API-Key"] = trimmedPublicKey;
|
|
544
|
+
const res = await this.fetchImpl(`${this.linkApiUrl}${REFRESH_ENDPOINT}`, {
|
|
545
|
+
method: "POST",
|
|
546
|
+
credentials: this.credentials,
|
|
547
|
+
headers,
|
|
548
|
+
body: "{}"
|
|
549
|
+
});
|
|
550
|
+
if (!res.ok) return false;
|
|
551
|
+
const json = await res.json();
|
|
552
|
+
const token = json?.data?.token ?? json?.token;
|
|
553
|
+
if (typeof token === "string" && token.length > 0) {
|
|
554
|
+
this.setAccessToken(token);
|
|
555
|
+
return true;
|
|
549
556
|
}
|
|
557
|
+
return false;
|
|
550
558
|
} catch {
|
|
559
|
+
return false;
|
|
560
|
+
} finally {
|
|
561
|
+
this.refreshInflight = null;
|
|
551
562
|
}
|
|
552
|
-
}
|
|
563
|
+
})();
|
|
564
|
+
return this.refreshInflight;
|
|
565
|
+
}
|
|
566
|
+
// On 401, refresh from the session cookie once and retry — re-establishes a
|
|
567
|
+
// session after a reload without persisting any token.
|
|
568
|
+
async authedFetch(url, options) {
|
|
569
|
+
const response = await this.resilientFetch(url, options);
|
|
570
|
+
if (response.status !== 401 || typeof window === "undefined" || url.includes(REFRESH_ENDPOINT)) {
|
|
571
|
+
return response;
|
|
572
|
+
}
|
|
573
|
+
const refreshed = await this.refreshAccessToken();
|
|
574
|
+
if (!refreshed) return response;
|
|
575
|
+
const retryHeaders = {
|
|
576
|
+
...options.headers,
|
|
577
|
+
Authorization: `Bearer ${this.accessToken}`
|
|
578
|
+
};
|
|
579
|
+
return this.resilientFetch(url, { ...options, headers: retryHeaders });
|
|
553
580
|
}
|
|
554
581
|
loadSessionToken() {
|
|
555
582
|
if (typeof window !== "undefined" && window.localStorage) {
|
|
@@ -726,7 +753,7 @@ var CimplifyClient = class {
|
|
|
726
753
|
async get(path, opts) {
|
|
727
754
|
const key = this.getDedupeKey("get", path, opts?.cacheOptions);
|
|
728
755
|
return this.deduplicatedRequest(key, async () => {
|
|
729
|
-
const response = await this.
|
|
756
|
+
const response = await this.authedFetch(this.buildUrl(this.baseUrl, path), {
|
|
730
757
|
method: "GET",
|
|
731
758
|
credentials: this.credentials,
|
|
732
759
|
headers: this.getHeaders(),
|
|
@@ -736,7 +763,7 @@ var CimplifyClient = class {
|
|
|
736
763
|
});
|
|
737
764
|
}
|
|
738
765
|
async post(path, body, opts) {
|
|
739
|
-
const response = await this.
|
|
766
|
+
const response = await this.authedFetch(this.buildUrl(this.baseUrl, path), {
|
|
740
767
|
method: "POST",
|
|
741
768
|
credentials: this.credentials,
|
|
742
769
|
headers: mergeOptionHeaders(this.getHeaders(), opts),
|
|
@@ -745,7 +772,7 @@ var CimplifyClient = class {
|
|
|
745
772
|
return this.handleRestResponse(response);
|
|
746
773
|
}
|
|
747
774
|
async patch(path, body, opts) {
|
|
748
|
-
const response = await this.
|
|
775
|
+
const response = await this.authedFetch(this.buildUrl(this.baseUrl, path), {
|
|
749
776
|
method: "PATCH",
|
|
750
777
|
credentials: this.credentials,
|
|
751
778
|
headers: mergeOptionHeaders(this.getHeaders(), opts),
|
|
@@ -754,7 +781,7 @@ var CimplifyClient = class {
|
|
|
754
781
|
return this.handleRestResponse(response);
|
|
755
782
|
}
|
|
756
783
|
async delete(path, opts) {
|
|
757
|
-
const response = await this.
|
|
784
|
+
const response = await this.authedFetch(this.buildUrl(this.baseUrl, path), {
|
|
758
785
|
method: "DELETE",
|
|
759
786
|
credentials: this.credentials,
|
|
760
787
|
headers: mergeOptionHeaders(this.getHeaders(), opts)
|
|
@@ -764,7 +791,7 @@ var CimplifyClient = class {
|
|
|
764
791
|
async linkGet(path, opts) {
|
|
765
792
|
const key = this.getDedupeKey("linkGet", path, opts?.cacheOptions);
|
|
766
793
|
return this.deduplicatedRequest(key, async () => {
|
|
767
|
-
const response = await this.
|
|
794
|
+
const response = await this.authedFetch(`${this.linkApiUrl}${path}`, {
|
|
768
795
|
method: "GET",
|
|
769
796
|
credentials: this.credentials,
|
|
770
797
|
headers: this.getHeaders(),
|
|
@@ -774,7 +801,7 @@ var CimplifyClient = class {
|
|
|
774
801
|
});
|
|
775
802
|
}
|
|
776
803
|
async linkPost(path, body, opts) {
|
|
777
|
-
const response = await this.
|
|
804
|
+
const response = await this.authedFetch(`${this.linkApiUrl}${path}`, {
|
|
778
805
|
method: "POST",
|
|
779
806
|
credentials: this.credentials,
|
|
780
807
|
headers: mergeOptionHeaders(this.getHeaders(), opts),
|
|
@@ -783,7 +810,7 @@ var CimplifyClient = class {
|
|
|
783
810
|
return this.handleRestResponse(response);
|
|
784
811
|
}
|
|
785
812
|
async linkDelete(path, opts) {
|
|
786
|
-
const response = await this.
|
|
813
|
+
const response = await this.authedFetch(`${this.linkApiUrl}${path}`, {
|
|
787
814
|
method: "DELETE",
|
|
788
815
|
credentials: this.credentials,
|
|
789
816
|
headers: mergeOptionHeaders(this.getHeaders(), opts)
|
|
@@ -20,7 +20,13 @@ function decodePkceState(raw) {
|
|
|
20
20
|
|
|
21
21
|
// src/internal/discovery.ts
|
|
22
22
|
var DEFAULT_ISSUER = "https://api.cimplify.io";
|
|
23
|
-
var
|
|
23
|
+
var DEFAULT_AUTHORIZATION_ENDPOINT = "https://auth.cimplify.io/oauth/authorize";
|
|
24
|
+
function fallbackAuthorizationEndpoint(issuerBase) {
|
|
25
|
+
if (issuerBase === DEFAULT_ISSUER) return DEFAULT_AUTHORIZATION_ENDPOINT;
|
|
26
|
+
throw new Error(
|
|
27
|
+
`OIDC discovery for "${issuerBase}" is unreachable and no fallback authorize endpoint is known for it. Make discovery reachable (enable CORS) or pass authUrl.`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
24
30
|
var cache = /* @__PURE__ */ new Map();
|
|
25
31
|
function fetchDiscovery(issuer) {
|
|
26
32
|
const base = issuer.replace(/\/$/, "");
|
|
@@ -36,12 +42,13 @@ function fetchDiscovery(issuer) {
|
|
|
36
42
|
return pending;
|
|
37
43
|
}
|
|
38
44
|
async function getAuthorizationEndpoint(issuer) {
|
|
45
|
+
const base = issuer.replace(/\/$/, "");
|
|
39
46
|
try {
|
|
40
|
-
const doc = await fetchDiscovery(
|
|
47
|
+
const doc = await fetchDiscovery(base);
|
|
41
48
|
if (doc.authorization_endpoint) return doc.authorization_endpoint;
|
|
42
49
|
} catch {
|
|
43
50
|
}
|
|
44
|
-
return
|
|
51
|
+
return fallbackAuthorizationEndpoint(base);
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
exports.DEFAULT_ISSUER = DEFAULT_ISSUER;
|
|
@@ -2397,6 +2397,7 @@ declare class CimplifyClient {
|
|
|
2397
2397
|
private context;
|
|
2398
2398
|
private businessId;
|
|
2399
2399
|
private businessIdResolvePromise;
|
|
2400
|
+
private refreshInflight;
|
|
2400
2401
|
private inflightRequests;
|
|
2401
2402
|
/**
|
|
2402
2403
|
* App-level event channel. Subscribe to surface mutation rollbacks, outbox
|
|
@@ -2437,8 +2438,8 @@ declare class CimplifyClient {
|
|
|
2437
2438
|
setBusinessId(businessId: string): void;
|
|
2438
2439
|
getBusinessId(): string | null;
|
|
2439
2440
|
resolveBusinessId(): Promise<string>;
|
|
2440
|
-
private
|
|
2441
|
-
private
|
|
2441
|
+
private refreshAccessToken;
|
|
2442
|
+
private authedFetch;
|
|
2442
2443
|
private loadSessionToken;
|
|
2443
2444
|
private saveSessionToken;
|
|
2444
2445
|
private captureSessionToken;
|
|
@@ -2397,6 +2397,7 @@ declare class CimplifyClient {
|
|
|
2397
2397
|
private context;
|
|
2398
2398
|
private businessId;
|
|
2399
2399
|
private businessIdResolvePromise;
|
|
2400
|
+
private refreshInflight;
|
|
2400
2401
|
private inflightRequests;
|
|
2401
2402
|
/**
|
|
2402
2403
|
* App-level event channel. Subscribe to surface mutation rollbacks, outbox
|
|
@@ -2437,8 +2438,8 @@ declare class CimplifyClient {
|
|
|
2437
2438
|
setBusinessId(businessId: string): void;
|
|
2438
2439
|
getBusinessId(): string | null;
|
|
2439
2440
|
resolveBusinessId(): Promise<string>;
|
|
2440
|
-
private
|
|
2441
|
-
private
|
|
2441
|
+
private refreshAccessToken;
|
|
2442
|
+
private authedFetch;
|
|
2442
2443
|
private loadSessionToken;
|
|
2443
2444
|
private saveSessionToken;
|
|
2444
2445
|
private captureSessionToken;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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 BusinessHours, y as BusinessPreferences, z as BusinessService, C as BusinessSettings, D as BusinessType, 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, X as ChatWidgetStarter, Y as CheckSlotAvailabilityInput, Z as CheckSlotAvailabilityResult, _ as CheckoutAddressInfo, $ as CheckoutCartData, a0 as CheckoutCartItem, a1 as CheckoutCustomerInfo, a2 as CheckoutFormData, a3 as CheckoutInput, a4 as CheckoutMode, a8 as CheckoutOperations, a5 as CheckoutOrderType, a6 as CheckoutPaymentMethod, a7 as CheckoutResult, a8 as CheckoutService, a9 as CheckoutStatus, aa as CheckoutStatusContext, ab as CheckoutStep, ac as CimplifyClient, ad as CimplifyConfig, ae as CimplifyElement, af as CimplifyElements, ag as ContactType, ah as ContentType, ai as CreateAddressInput, aj as CreateMobileMoneyInput, ak as Customer, al as CustomerAddress, am as CustomerBooking, an as CustomerBookingServiceItem, ao as CustomerLinkPreferences, ap as CustomerMobileMoney, aq as CustomerServicePreferences, ar as DEFAULT_COUNTRY, as as DEFAULT_CURRENCY, at as DEVICE_TYPE, au as DayAvailability, av as DeliveryFeeDetails, aw as DeliveryFeeResponse, ax as DeliveryService, ay as DepositResult, az as DeviceType, aA as DismissMessageResponse, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aD as ElementAppearance, aE as ElementEventHandler, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aI as ElementsCheckoutData, aJ as ElementsCheckoutResult, aK as ElementsCustomerInfo, aL as ElementsOptions, aM as EnrollAndLinkOrderInput, aN as EnrollAndLinkOrderResult, aO as EnrollmentData, aP as Err, aQ as FeeBearerType, aR as FetchQuoteInput, aS as FulfillmentLink, aT as FulfillmentStatus, aU as FulfillmentType, aV as FxQuote, aW as FxQuoteRequest, aX as FxRateResponse, aY as FxService, aZ as GetAvailableSlotsInput, a_ as GetOrdersOptions, a$ as GetProductsOptions, b0 as IframeToParentMessage, b1 as InventoryService, b2 as LINK_MUTATION, b3 as LINK_QUERY, b4 as LineItem, b5 as LineType, b6 as LinkData, b7 as LinkEnrollResult, b8 as LinkService, b9 as LinkSession, ba as LinkStatusResult, bb as LiteBootstrap, bc as LiteService, bd as Location, be as LocationBooking, bf as LocationTaxBehavior, bg as LocationTaxOverrides, bh as LocationTimeProfile, bi as LocationWithDetails, bj as MESSAGE_TYPES, bk as MOBILE_MONEY_PROVIDER, bl as MobileMoneyData, bm as MobileMoneyDetails, bn as MobileMoneyProvider, bo as NextAction, bp as ORDER_MUTATION, bq as ORDER_TYPE, br as ObservabilityHooks, bs as Ok, bt as Order, bu as OrderChannel, bv as OrderFilter, bw as OrderFulfillmentSummary, bx as OrderGroup, by as OrderGroupDetails, bz as OrderGroupPayment, bA as OrderGroupPaymentState, bB as OrderGroupPaymentStatus, bC as OrderGroupPaymentSummary, bD as OrderGroupStatus, bE as OrderHistory, bF as OrderLineState, bG as OrderLineStatus, bH as OrderPaymentEvent, bI as OrderQueries, bJ as OrderSplitDetail, bK as OrderStatus, bL as OrderType, bM as OtpResult, bN as PAYMENT_METHOD, bO as PAYMENT_MUTATION, bP as PAYMENT_STATE, bQ as PICKUP_TIME_TYPE, bR as ParentToIframeMessage, bS as PaymentMethodInfo, bT as PaymentState, bU as PickupTime, bV as PickupTimeType, bW as PlaceDetailsResponse, bX as PlacesService, bY as PriceQuote, bZ as PricingOverrides, b_ as ProcessAndResolveOptions, b$ as ProcessCheckoutOptions, c0 as ProcessCheckoutResult, c1 as ProviderResolutionSource, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c7 as ReadRequestOptions, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, ca as RefundOrderInput, cb as RelatedCandidate, cc as RelatedProduct, cd as RelatedProductsEnrichment, ce as RelationType, cf as ReminderMethod, cg as ReminderSettings, ch as ReorderResult, ci as RequestContext, cj as RequestErrorEvent, ck as RequestOptions, cl as RequestOtpInput, cm as RequestSource, cn as RequestStartEvent, co as RequestSuccessEvent, cp as RescheduleBookingInput, cq as RescheduleBookingResult, cr as RescheduleHistoryRecord, cs as ResourceAssignment, ct as Result, cu as RetryEvent, cv as RevokeAllSessionsResult, cw as RevokeSessionResult, cx as Room, cy as SchedulingMetadata, cz as SchedulingResult, cA as SchedulingService, cB as SenderType, cC as Service, cD as ServiceAvailabilityParams, cE as ServiceAvailabilityResult, cF as ServiceCharge, cG as ServiceNotes, cH as ServiceScheduleRequest, cI as ServiceStatus, cJ as SessionActivityData, cK as SessionChangeEvent, cL as SessionMessage, cM as SlotResourceInfo, cN as SlotStaffInfo, cO as Staff, cP as StaffAssignment, cQ as StaffRole, cR as StaffScheduleItem, cS as StockLevel, cT as StockStatus, cU as StorefrontBootstrap, cV as SubscriptionService, cW as SupportService, cX as Table, cY as TableInfo, cZ as TimeRange, c_ as TimeRanges, c$ as TimeSlot, d0 as TrackCategoryViewOptions, d1 as TrackProductViewOptions, d2 as UpdateAddressInput, d3 as UpdateOrderStatusInput, d4 as UpdateProfileInput, d5 as UploadInitResponse, d6 as UploadResult, d7 as UploadService, d8 as VerifyOtpInput, d9 as combine, da as combineObject, db as createCimplifyClient, dc as createElements, dd as err, de as flatMap, df as fromPromise, dg as getOrElse, dh as isErr, di as isOk, dj as mapError, dk as mapResult, dl as ok, dm as toNullable, dn as tryCatch, dp as unwrap } from './client-
|
|
1
|
+
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 BusinessHours, y as BusinessPreferences, z as BusinessService, C as BusinessSettings, D as BusinessType, 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, X as ChatWidgetStarter, Y as CheckSlotAvailabilityInput, Z as CheckSlotAvailabilityResult, _ as CheckoutAddressInfo, $ as CheckoutCartData, a0 as CheckoutCartItem, a1 as CheckoutCustomerInfo, a2 as CheckoutFormData, a3 as CheckoutInput, a4 as CheckoutMode, a8 as CheckoutOperations, a5 as CheckoutOrderType, a6 as CheckoutPaymentMethod, a7 as CheckoutResult, a8 as CheckoutService, a9 as CheckoutStatus, aa as CheckoutStatusContext, ab as CheckoutStep, ac as CimplifyClient, ad as CimplifyConfig, ae as CimplifyElement, af as CimplifyElements, ag as ContactType, ah as ContentType, ai as CreateAddressInput, aj as CreateMobileMoneyInput, ak as Customer, al as CustomerAddress, am as CustomerBooking, an as CustomerBookingServiceItem, ao as CustomerLinkPreferences, ap as CustomerMobileMoney, aq as CustomerServicePreferences, ar as DEFAULT_COUNTRY, as as DEFAULT_CURRENCY, at as DEVICE_TYPE, au as DayAvailability, av as DeliveryFeeDetails, aw as DeliveryFeeResponse, ax as DeliveryService, ay as DepositResult, az as DeviceType, aA as DismissMessageResponse, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aD as ElementAppearance, aE as ElementEventHandler, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aI as ElementsCheckoutData, aJ as ElementsCheckoutResult, aK as ElementsCustomerInfo, aL as ElementsOptions, aM as EnrollAndLinkOrderInput, aN as EnrollAndLinkOrderResult, aO as EnrollmentData, aP as Err, aQ as FeeBearerType, aR as FetchQuoteInput, aS as FulfillmentLink, aT as FulfillmentStatus, aU as FulfillmentType, aV as FxQuote, aW as FxQuoteRequest, aX as FxRateResponse, aY as FxService, aZ as GetAvailableSlotsInput, a_ as GetOrdersOptions, a$ as GetProductsOptions, b0 as IframeToParentMessage, b1 as InventoryService, b2 as LINK_MUTATION, b3 as LINK_QUERY, b4 as LineItem, b5 as LineType, b6 as LinkData, b7 as LinkEnrollResult, b8 as LinkService, b9 as LinkSession, ba as LinkStatusResult, bb as LiteBootstrap, bc as LiteService, bd as Location, be as LocationBooking, bf as LocationTaxBehavior, bg as LocationTaxOverrides, bh as LocationTimeProfile, bi as LocationWithDetails, bj as MESSAGE_TYPES, bk as MOBILE_MONEY_PROVIDER, bl as MobileMoneyData, bm as MobileMoneyDetails, bn as MobileMoneyProvider, bo as NextAction, bp as ORDER_MUTATION, bq as ORDER_TYPE, br as ObservabilityHooks, bs as Ok, bt as Order, bu as OrderChannel, bv as OrderFilter, bw as OrderFulfillmentSummary, bx as OrderGroup, by as OrderGroupDetails, bz as OrderGroupPayment, bA as OrderGroupPaymentState, bB as OrderGroupPaymentStatus, bC as OrderGroupPaymentSummary, bD as OrderGroupStatus, bE as OrderHistory, bF as OrderLineState, bG as OrderLineStatus, bH as OrderPaymentEvent, bI as OrderQueries, bJ as OrderSplitDetail, bK as OrderStatus, bL as OrderType, bM as OtpResult, bN as PAYMENT_METHOD, bO as PAYMENT_MUTATION, bP as PAYMENT_STATE, bQ as PICKUP_TIME_TYPE, bR as ParentToIframeMessage, bS as PaymentMethodInfo, bT as PaymentState, bU as PickupTime, bV as PickupTimeType, bW as PlaceDetailsResponse, bX as PlacesService, bY as PriceQuote, bZ as PricingOverrides, b_ as ProcessAndResolveOptions, b$ as ProcessCheckoutOptions, c0 as ProcessCheckoutResult, c1 as ProviderResolutionSource, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c7 as ReadRequestOptions, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, ca as RefundOrderInput, cb as RelatedCandidate, cc as RelatedProduct, cd as RelatedProductsEnrichment, ce as RelationType, cf as ReminderMethod, cg as ReminderSettings, ch as ReorderResult, ci as RequestContext, cj as RequestErrorEvent, ck as RequestOptions, cl as RequestOtpInput, cm as RequestSource, cn as RequestStartEvent, co as RequestSuccessEvent, cp as RescheduleBookingInput, cq as RescheduleBookingResult, cr as RescheduleHistoryRecord, cs as ResourceAssignment, ct as Result, cu as RetryEvent, cv as RevokeAllSessionsResult, cw as RevokeSessionResult, cx as Room, cy as SchedulingMetadata, cz as SchedulingResult, cA as SchedulingService, cB as SenderType, cC as Service, cD as ServiceAvailabilityParams, cE as ServiceAvailabilityResult, cF as ServiceCharge, cG as ServiceNotes, cH as ServiceScheduleRequest, cI as ServiceStatus, cJ as SessionActivityData, cK as SessionChangeEvent, cL as SessionMessage, cM as SlotResourceInfo, cN as SlotStaffInfo, cO as Staff, cP as StaffAssignment, cQ as StaffRole, cR as StaffScheduleItem, cS as StockLevel, cT as StockStatus, cU as StorefrontBootstrap, cV as SubscriptionService, cW as SupportService, cX as Table, cY as TableInfo, cZ as TimeRange, c_ as TimeRanges, c$ as TimeSlot, d0 as TrackCategoryViewOptions, d1 as TrackProductViewOptions, d2 as UpdateAddressInput, d3 as UpdateOrderStatusInput, d4 as UpdateProfileInput, d5 as UploadInitResponse, d6 as UploadResult, d7 as UploadService, d8 as VerifyOtpInput, d9 as combine, da as combineObject, db as createCimplifyClient, dc as createElements, dd as err, de as flatMap, df as fromPromise, dg as getOrElse, dh as isErr, di as isOk, dj as mapError, dk as mapResult, dl as ok, dm as toNullable, dn as tryCatch, dp as unwrap } from './client-Dka2cGhu.mjs';
|
|
2
2
|
import { b9 as ProductWithDetails, j as ApiError } from './product-B_kS4Oxa.mjs';
|
|
3
3
|
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 BenefitType, p as BillingFrequency, q as BillingMarkupType, r as BillingPlanType, s as Bundle, t as BundleComponentData, u as BundleComponentInfo, v as BundleComponentVariantView, w as BundleComponentView, x as BundlePriceType, y as BundleProduct, z as BundleSelectionData, C as BundleSelectionInput, D as BundleStoredSelection, E as BundleSummary, F as BundleWithDetails, G as Cart, H as CartAddOn, I as CartChannel, J as CartItem, K as CartItemDetails, L as CartMutationResult, M as CartNotice, N as CartStatus, O as CartSummary, P as CartTotals, Q as Category, R as CategorySummary, S as ChosenPrice, T as CimplifyError, U as Collection, V as CollectionProduct, W as CollectionSummary, X as ComponentGroup, Y as ComponentGroupWithComponents, Z as ComponentPriceBreakdown, _ as ComponentSchedulingData, $ as ComponentSelectionInput, a0 as ComponentSourceType, a1 as Composite, a2 as CompositeComponent, a3 as CompositeComponentView, a4 as CompositeGroupView, a5 as CompositePriceBreakdown, a6 as CompositePriceResult, a7 as CompositePricingMode, a8 as CompositeSelectionData, $ as CompositeSelectionInput, a9 as CompositeStoredSelection, aa as CompositeWithDetails, ab as CurrencyCode, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ae as CustomerInputValue, af as DURATION_UNIT, ag as DateRangeValue, ah as Deal, ai as DealBenefitType, aj as DepositType, ak as DigitalProductType, al as DiscountBreakdown, am as DiscountDetails, an as DiscountValidation, ao as DisplayAddOn, ap as DisplayAddOnOption, aq as DisplayCart, ar as DisplayCartItem, as as DisplayMode, at as DurationUnit, au as ERROR_HINTS, av as EligiblePlansQuery, aw as ErrorCode, ax as ErrorCodeType, ay as ErrorHint, az as FacetValue, aA as FormattedPlanOption, aB as GroupPricingBehavior, aC as INPUT_FIELD_TYPE, aD as IdempotencyMismatchError, aE as InputFieldType, aF as InputFieldValidation, aG as InventoryType, aH as KnowledgeArticle, aI as LineConfiguration, aJ as LocationProductPrice, aK as LocationValue, aL as MeasurementValue, aM as Money, aN as PRODUCT_TYPE, aO as Pagination, aP as PaginationParams, aQ as PhoneValue, aR as Price, aS as PriceAdjustment, aT as PriceDecisionPath, aU as PriceEntryType, aV as PricePathTaxInfo, aW as PriceSource, aX as Product, aY as ProductAddOn, aZ as ProductAvailability, a_ as ProductAvailabilityNow, a$ as ProductBillingPlan, b0 as ProductDealInfo, b1 as ProductInputField, b2 as ProductProperty, b3 as ProductRenderHint, b4 as ProductTaxonomy, b5 as ProductTimeProfile, b6 as ProductType, b7 as ProductVariant, b8 as ProductVariantValue, ba as PropertyFacet, bb as PropertySource, bc as QuantityPricingTier, bd as RENDER_HINT, be as RelatedProductView, bf as SalesChannel, bg as SchedulingMode, bh as SelectedAddOnOption, bi as SemanticKind, bj as SignatureValue, bk as Subscription, bl as SubscriptionInvoice, bm as SubscriptionItem, bn as SubscriptionStatus, bo as SubscriptionWithDetails, bp as Tag, bq as TagsResponse, br as TaxPathComponent, bs as TaxonomyAttributeTemplate, bt as TaxonomyWithChildren, bu as UICart, bv as UICartBusiness, bw as UICartCustomer, bx as UICartLocation, by as UICartPricing, bz as UpdateCartItemInput, bA as VariantAxis, bB as VariantAxisSelection, bC as VariantAxisValue, bD as VariantAxisValueView, bE as VariantAxisView, bF as VariantAxisWithValues, bG as VariantDetails, bH as VariantDetailsDTO, bI as VariantDisplayAttribute, bJ as VariantLocationAvailability, bK as VariantStrategy, bL as VariantView, bM as ZERO, bN as currencyCode, bO as enrichError, bP as getErrorHint, bQ as isCimplifyError, bR as isIdempotencyMismatchError, bS as isQuoteConflictRequiringConsent, bT as isQuoteError, bU as isRetryableError, bV as isSupportedCurrency, bW as money, bX as moneyFromNumber } from './product-B_kS4Oxa.mjs';
|
|
4
4
|
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-D8vnKlOQ.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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 BusinessHours, y as BusinessPreferences, z as BusinessService, C as BusinessSettings, D as BusinessType, 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, X as ChatWidgetStarter, Y as CheckSlotAvailabilityInput, Z as CheckSlotAvailabilityResult, _ as CheckoutAddressInfo, $ as CheckoutCartData, a0 as CheckoutCartItem, a1 as CheckoutCustomerInfo, a2 as CheckoutFormData, a3 as CheckoutInput, a4 as CheckoutMode, a8 as CheckoutOperations, a5 as CheckoutOrderType, a6 as CheckoutPaymentMethod, a7 as CheckoutResult, a8 as CheckoutService, a9 as CheckoutStatus, aa as CheckoutStatusContext, ab as CheckoutStep, ac as CimplifyClient, ad as CimplifyConfig, ae as CimplifyElement, af as CimplifyElements, ag as ContactType, ah as ContentType, ai as CreateAddressInput, aj as CreateMobileMoneyInput, ak as Customer, al as CustomerAddress, am as CustomerBooking, an as CustomerBookingServiceItem, ao as CustomerLinkPreferences, ap as CustomerMobileMoney, aq as CustomerServicePreferences, ar as DEFAULT_COUNTRY, as as DEFAULT_CURRENCY, at as DEVICE_TYPE, au as DayAvailability, av as DeliveryFeeDetails, aw as DeliveryFeeResponse, ax as DeliveryService, ay as DepositResult, az as DeviceType, aA as DismissMessageResponse, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aD as ElementAppearance, aE as ElementEventHandler, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aI as ElementsCheckoutData, aJ as ElementsCheckoutResult, aK as ElementsCustomerInfo, aL as ElementsOptions, aM as EnrollAndLinkOrderInput, aN as EnrollAndLinkOrderResult, aO as EnrollmentData, aP as Err, aQ as FeeBearerType, aR as FetchQuoteInput, aS as FulfillmentLink, aT as FulfillmentStatus, aU as FulfillmentType, aV as FxQuote, aW as FxQuoteRequest, aX as FxRateResponse, aY as FxService, aZ as GetAvailableSlotsInput, a_ as GetOrdersOptions, a$ as GetProductsOptions, b0 as IframeToParentMessage, b1 as InventoryService, b2 as LINK_MUTATION, b3 as LINK_QUERY, b4 as LineItem, b5 as LineType, b6 as LinkData, b7 as LinkEnrollResult, b8 as LinkService, b9 as LinkSession, ba as LinkStatusResult, bb as LiteBootstrap, bc as LiteService, bd as Location, be as LocationBooking, bf as LocationTaxBehavior, bg as LocationTaxOverrides, bh as LocationTimeProfile, bi as LocationWithDetails, bj as MESSAGE_TYPES, bk as MOBILE_MONEY_PROVIDER, bl as MobileMoneyData, bm as MobileMoneyDetails, bn as MobileMoneyProvider, bo as NextAction, bp as ORDER_MUTATION, bq as ORDER_TYPE, br as ObservabilityHooks, bs as Ok, bt as Order, bu as OrderChannel, bv as OrderFilter, bw as OrderFulfillmentSummary, bx as OrderGroup, by as OrderGroupDetails, bz as OrderGroupPayment, bA as OrderGroupPaymentState, bB as OrderGroupPaymentStatus, bC as OrderGroupPaymentSummary, bD as OrderGroupStatus, bE as OrderHistory, bF as OrderLineState, bG as OrderLineStatus, bH as OrderPaymentEvent, bI as OrderQueries, bJ as OrderSplitDetail, bK as OrderStatus, bL as OrderType, bM as OtpResult, bN as PAYMENT_METHOD, bO as PAYMENT_MUTATION, bP as PAYMENT_STATE, bQ as PICKUP_TIME_TYPE, bR as ParentToIframeMessage, bS as PaymentMethodInfo, bT as PaymentState, bU as PickupTime, bV as PickupTimeType, bW as PlaceDetailsResponse, bX as PlacesService, bY as PriceQuote, bZ as PricingOverrides, b_ as ProcessAndResolveOptions, b$ as ProcessCheckoutOptions, c0 as ProcessCheckoutResult, c1 as ProviderResolutionSource, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c7 as ReadRequestOptions, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, ca as RefundOrderInput, cb as RelatedCandidate, cc as RelatedProduct, cd as RelatedProductsEnrichment, ce as RelationType, cf as ReminderMethod, cg as ReminderSettings, ch as ReorderResult, ci as RequestContext, cj as RequestErrorEvent, ck as RequestOptions, cl as RequestOtpInput, cm as RequestSource, cn as RequestStartEvent, co as RequestSuccessEvent, cp as RescheduleBookingInput, cq as RescheduleBookingResult, cr as RescheduleHistoryRecord, cs as ResourceAssignment, ct as Result, cu as RetryEvent, cv as RevokeAllSessionsResult, cw as RevokeSessionResult, cx as Room, cy as SchedulingMetadata, cz as SchedulingResult, cA as SchedulingService, cB as SenderType, cC as Service, cD as ServiceAvailabilityParams, cE as ServiceAvailabilityResult, cF as ServiceCharge, cG as ServiceNotes, cH as ServiceScheduleRequest, cI as ServiceStatus, cJ as SessionActivityData, cK as SessionChangeEvent, cL as SessionMessage, cM as SlotResourceInfo, cN as SlotStaffInfo, cO as Staff, cP as StaffAssignment, cQ as StaffRole, cR as StaffScheduleItem, cS as StockLevel, cT as StockStatus, cU as StorefrontBootstrap, cV as SubscriptionService, cW as SupportService, cX as Table, cY as TableInfo, cZ as TimeRange, c_ as TimeRanges, c$ as TimeSlot, d0 as TrackCategoryViewOptions, d1 as TrackProductViewOptions, d2 as UpdateAddressInput, d3 as UpdateOrderStatusInput, d4 as UpdateProfileInput, d5 as UploadInitResponse, d6 as UploadResult, d7 as UploadService, d8 as VerifyOtpInput, d9 as combine, da as combineObject, db as createCimplifyClient, dc as createElements, dd as err, de as flatMap, df as fromPromise, dg as getOrElse, dh as isErr, di as isOk, dj as mapError, dk as mapResult, dl as ok, dm as toNullable, dn as tryCatch, dp as unwrap } from './client-
|
|
1
|
+
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 BusinessHours, y as BusinessPreferences, z as BusinessService, C as BusinessSettings, D as BusinessType, 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, X as ChatWidgetStarter, Y as CheckSlotAvailabilityInput, Z as CheckSlotAvailabilityResult, _ as CheckoutAddressInfo, $ as CheckoutCartData, a0 as CheckoutCartItem, a1 as CheckoutCustomerInfo, a2 as CheckoutFormData, a3 as CheckoutInput, a4 as CheckoutMode, a8 as CheckoutOperations, a5 as CheckoutOrderType, a6 as CheckoutPaymentMethod, a7 as CheckoutResult, a8 as CheckoutService, a9 as CheckoutStatus, aa as CheckoutStatusContext, ab as CheckoutStep, ac as CimplifyClient, ad as CimplifyConfig, ae as CimplifyElement, af as CimplifyElements, ag as ContactType, ah as ContentType, ai as CreateAddressInput, aj as CreateMobileMoneyInput, ak as Customer, al as CustomerAddress, am as CustomerBooking, an as CustomerBookingServiceItem, ao as CustomerLinkPreferences, ap as CustomerMobileMoney, aq as CustomerServicePreferences, ar as DEFAULT_COUNTRY, as as DEFAULT_CURRENCY, at as DEVICE_TYPE, au as DayAvailability, av as DeliveryFeeDetails, aw as DeliveryFeeResponse, ax as DeliveryService, ay as DepositResult, az as DeviceType, aA as DismissMessageResponse, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aD as ElementAppearance, aE as ElementEventHandler, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aI as ElementsCheckoutData, aJ as ElementsCheckoutResult, aK as ElementsCustomerInfo, aL as ElementsOptions, aM as EnrollAndLinkOrderInput, aN as EnrollAndLinkOrderResult, aO as EnrollmentData, aP as Err, aQ as FeeBearerType, aR as FetchQuoteInput, aS as FulfillmentLink, aT as FulfillmentStatus, aU as FulfillmentType, aV as FxQuote, aW as FxQuoteRequest, aX as FxRateResponse, aY as FxService, aZ as GetAvailableSlotsInput, a_ as GetOrdersOptions, a$ as GetProductsOptions, b0 as IframeToParentMessage, b1 as InventoryService, b2 as LINK_MUTATION, b3 as LINK_QUERY, b4 as LineItem, b5 as LineType, b6 as LinkData, b7 as LinkEnrollResult, b8 as LinkService, b9 as LinkSession, ba as LinkStatusResult, bb as LiteBootstrap, bc as LiteService, bd as Location, be as LocationBooking, bf as LocationTaxBehavior, bg as LocationTaxOverrides, bh as LocationTimeProfile, bi as LocationWithDetails, bj as MESSAGE_TYPES, bk as MOBILE_MONEY_PROVIDER, bl as MobileMoneyData, bm as MobileMoneyDetails, bn as MobileMoneyProvider, bo as NextAction, bp as ORDER_MUTATION, bq as ORDER_TYPE, br as ObservabilityHooks, bs as Ok, bt as Order, bu as OrderChannel, bv as OrderFilter, bw as OrderFulfillmentSummary, bx as OrderGroup, by as OrderGroupDetails, bz as OrderGroupPayment, bA as OrderGroupPaymentState, bB as OrderGroupPaymentStatus, bC as OrderGroupPaymentSummary, bD as OrderGroupStatus, bE as OrderHistory, bF as OrderLineState, bG as OrderLineStatus, bH as OrderPaymentEvent, bI as OrderQueries, bJ as OrderSplitDetail, bK as OrderStatus, bL as OrderType, bM as OtpResult, bN as PAYMENT_METHOD, bO as PAYMENT_MUTATION, bP as PAYMENT_STATE, bQ as PICKUP_TIME_TYPE, bR as ParentToIframeMessage, bS as PaymentMethodInfo, bT as PaymentState, bU as PickupTime, bV as PickupTimeType, bW as PlaceDetailsResponse, bX as PlacesService, bY as PriceQuote, bZ as PricingOverrides, b_ as ProcessAndResolveOptions, b$ as ProcessCheckoutOptions, c0 as ProcessCheckoutResult, c1 as ProviderResolutionSource, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c7 as ReadRequestOptions, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, ca as RefundOrderInput, cb as RelatedCandidate, cc as RelatedProduct, cd as RelatedProductsEnrichment, ce as RelationType, cf as ReminderMethod, cg as ReminderSettings, ch as ReorderResult, ci as RequestContext, cj as RequestErrorEvent, ck as RequestOptions, cl as RequestOtpInput, cm as RequestSource, cn as RequestStartEvent, co as RequestSuccessEvent, cp as RescheduleBookingInput, cq as RescheduleBookingResult, cr as RescheduleHistoryRecord, cs as ResourceAssignment, ct as Result, cu as RetryEvent, cv as RevokeAllSessionsResult, cw as RevokeSessionResult, cx as Room, cy as SchedulingMetadata, cz as SchedulingResult, cA as SchedulingService, cB as SenderType, cC as Service, cD as ServiceAvailabilityParams, cE as ServiceAvailabilityResult, cF as ServiceCharge, cG as ServiceNotes, cH as ServiceScheduleRequest, cI as ServiceStatus, cJ as SessionActivityData, cK as SessionChangeEvent, cL as SessionMessage, cM as SlotResourceInfo, cN as SlotStaffInfo, cO as Staff, cP as StaffAssignment, cQ as StaffRole, cR as StaffScheduleItem, cS as StockLevel, cT as StockStatus, cU as StorefrontBootstrap, cV as SubscriptionService, cW as SupportService, cX as Table, cY as TableInfo, cZ as TimeRange, c_ as TimeRanges, c$ as TimeSlot, d0 as TrackCategoryViewOptions, d1 as TrackProductViewOptions, d2 as UpdateAddressInput, d3 as UpdateOrderStatusInput, d4 as UpdateProfileInput, d5 as UploadInitResponse, d6 as UploadResult, d7 as UploadService, d8 as VerifyOtpInput, d9 as combine, da as combineObject, db as createCimplifyClient, dc as createElements, dd as err, de as flatMap, df as fromPromise, dg as getOrElse, dh as isErr, di as isOk, dj as mapError, dk as mapResult, dl as ok, dm as toNullable, dn as tryCatch, dp as unwrap } from './client-Bo5rujc2.js';
|
|
2
2
|
import { b9 as ProductWithDetails, j as ApiError } from './product-B_kS4Oxa.js';
|
|
3
3
|
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 BenefitType, p as BillingFrequency, q as BillingMarkupType, r as BillingPlanType, s as Bundle, t as BundleComponentData, u as BundleComponentInfo, v as BundleComponentVariantView, w as BundleComponentView, x as BundlePriceType, y as BundleProduct, z as BundleSelectionData, C as BundleSelectionInput, D as BundleStoredSelection, E as BundleSummary, F as BundleWithDetails, G as Cart, H as CartAddOn, I as CartChannel, J as CartItem, K as CartItemDetails, L as CartMutationResult, M as CartNotice, N as CartStatus, O as CartSummary, P as CartTotals, Q as Category, R as CategorySummary, S as ChosenPrice, T as CimplifyError, U as Collection, V as CollectionProduct, W as CollectionSummary, X as ComponentGroup, Y as ComponentGroupWithComponents, Z as ComponentPriceBreakdown, _ as ComponentSchedulingData, $ as ComponentSelectionInput, a0 as ComponentSourceType, a1 as Composite, a2 as CompositeComponent, a3 as CompositeComponentView, a4 as CompositeGroupView, a5 as CompositePriceBreakdown, a6 as CompositePriceResult, a7 as CompositePricingMode, a8 as CompositeSelectionData, $ as CompositeSelectionInput, a9 as CompositeStoredSelection, aa as CompositeWithDetails, ab as CurrencyCode, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ae as CustomerInputValue, af as DURATION_UNIT, ag as DateRangeValue, ah as Deal, ai as DealBenefitType, aj as DepositType, ak as DigitalProductType, al as DiscountBreakdown, am as DiscountDetails, an as DiscountValidation, ao as DisplayAddOn, ap as DisplayAddOnOption, aq as DisplayCart, ar as DisplayCartItem, as as DisplayMode, at as DurationUnit, au as ERROR_HINTS, av as EligiblePlansQuery, aw as ErrorCode, ax as ErrorCodeType, ay as ErrorHint, az as FacetValue, aA as FormattedPlanOption, aB as GroupPricingBehavior, aC as INPUT_FIELD_TYPE, aD as IdempotencyMismatchError, aE as InputFieldType, aF as InputFieldValidation, aG as InventoryType, aH as KnowledgeArticle, aI as LineConfiguration, aJ as LocationProductPrice, aK as LocationValue, aL as MeasurementValue, aM as Money, aN as PRODUCT_TYPE, aO as Pagination, aP as PaginationParams, aQ as PhoneValue, aR as Price, aS as PriceAdjustment, aT as PriceDecisionPath, aU as PriceEntryType, aV as PricePathTaxInfo, aW as PriceSource, aX as Product, aY as ProductAddOn, aZ as ProductAvailability, a_ as ProductAvailabilityNow, a$ as ProductBillingPlan, b0 as ProductDealInfo, b1 as ProductInputField, b2 as ProductProperty, b3 as ProductRenderHint, b4 as ProductTaxonomy, b5 as ProductTimeProfile, b6 as ProductType, b7 as ProductVariant, b8 as ProductVariantValue, ba as PropertyFacet, bb as PropertySource, bc as QuantityPricingTier, bd as RENDER_HINT, be as RelatedProductView, bf as SalesChannel, bg as SchedulingMode, bh as SelectedAddOnOption, bi as SemanticKind, bj as SignatureValue, bk as Subscription, bl as SubscriptionInvoice, bm as SubscriptionItem, bn as SubscriptionStatus, bo as SubscriptionWithDetails, bp as Tag, bq as TagsResponse, br as TaxPathComponent, bs as TaxonomyAttributeTemplate, bt as TaxonomyWithChildren, bu as UICart, bv as UICartBusiness, bw as UICartCustomer, bx as UICartLocation, by as UICartPricing, bz as UpdateCartItemInput, bA as VariantAxis, bB as VariantAxisSelection, bC as VariantAxisValue, bD as VariantAxisValueView, bE as VariantAxisView, bF as VariantAxisWithValues, bG as VariantDetails, bH as VariantDetailsDTO, bI as VariantDisplayAttribute, bJ as VariantLocationAvailability, bK as VariantStrategy, bL as VariantView, bM as ZERO, bN as currencyCode, bO as enrichError, bP as getErrorHint, bQ as isCimplifyError, bR as isIdempotencyMismatchError, bS as isQuoteConflictRequiringConsent, bT as isQuoteError, bU as isRetryableError, bV as isSupportedCurrency, bW as money, bX as moneyFromNumber } from './product-B_kS4Oxa.js';
|
|
4
4
|
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-DIIlPUOC.js';
|