@cimplify/sdk 0.105.0 → 0.106.1
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 +2 -2
- package/dist/advanced.d.ts +2 -2
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{catalogue-DjutZ0FC.d.mts → catalogue-CVKH9faR.d.mts} +5 -0
- package/dist/{catalogue-D1jkpGcr.d.ts → catalogue-ChBjPPME.d.ts} +5 -0
- package/dist/{chunk-37ZZCE7P.mjs → chunk-ABAK4YVY.mjs} +8 -50
- package/dist/{chunk-TINYV5E2.mjs → chunk-IWXVKW22.mjs} +28 -14
- package/dist/{chunk-Q5HX7LVE.mjs → chunk-L4XKIMUO.mjs} +1 -0
- package/dist/{chunk-PDTXSUHZ.js → chunk-LJSQ7TUV.js} +30 -16
- package/dist/{chunk-7PMMV5X4.js → chunk-NJK3THWT.js} +1 -0
- package/dist/{chunk-3IMPJEUI.js → chunk-QKL5L5IU.js} +92 -138
- package/dist/{chunk-XHVQDEVO.js → chunk-SFG2LMRD.js} +99 -12
- package/dist/{chunk-X7RPMALQ.mjs → chunk-YHR6LFQ7.mjs} +95 -13
- package/dist/{client-CZ8MjJ_o.d.mts → client-BfKFK7cn.d.mts} +12 -2
- package/dist/{client-BBZj15JJ.d.ts → client-DoczTJbs.d.ts} +12 -2
- package/dist/{index-DNxWfRHF.d.mts → index-DEUorPUO.d.mts} +1 -1
- package/dist/{index-CZjNWbQf.d.ts → index-Dn6xCpDe.d.ts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +67 -67
- package/dist/index.mjs +3 -3
- package/dist/mock/cli.mjs +1 -0
- package/dist/mock/library.js +1 -0
- package/dist/mock/library.mjs +1 -0
- package/dist/mock/msw.js +1 -0
- package/dist/mock/msw.mjs +1 -0
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +31 -31
- package/dist/react.mjs +2 -2
- package/dist/{server-C_RIDnHU.d.ts → server-7soMMUgP.d.ts} +2 -1
- package/dist/{server-Byr4d0hL.d.mts → server-DDEJ7e9s.d.mts} +2 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +7 -7
- package/dist/server.mjs +2 -2
- 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 +24 -23
- package/dist/testing/suite.mjs +5 -4
- package/dist/testing.d.mts +10 -4
- package/dist/testing.d.ts +10 -4
- package/dist/testing.js +116 -116
- package/dist/testing.mjs +5 -5
- package/package.json +1 -1
|
@@ -1612,7 +1612,7 @@ var CHECKOUT_CONFIRMATION_SCOPE_PREFIX = "checkout-confirm:";
|
|
|
1612
1612
|
var CHECKOUT_INTENT_RECOVERY_FINGERPRINT = "cart-intent-v1";
|
|
1613
1613
|
var ABORT_ERROR_NAME = "AbortError";
|
|
1614
1614
|
var AUTHORIZATION_POPUP_NAME = "cimplify-auth";
|
|
1615
|
-
var AUTHORIZATION_POPUP_FEATURES = "width=520,height=760
|
|
1615
|
+
var AUTHORIZATION_POPUP_FEATURES = "width=520,height=760";
|
|
1616
1616
|
var ORDER_TOKEN_QUERY_PARAMETER = "token";
|
|
1617
1617
|
var CHECKOUT_API_ROUTE = {
|
|
1618
1618
|
COLLECTION_OPTIONS: "/api/v1/payments/collection-options",
|
|
@@ -2146,7 +2146,7 @@ var CheckoutService = class {
|
|
|
2146
2146
|
window.location.assign(authorizationUrl);
|
|
2147
2147
|
} else {
|
|
2148
2148
|
const popup = window.open(
|
|
2149
|
-
|
|
2149
|
+
"",
|
|
2150
2150
|
AUTHORIZATION_POPUP_NAME,
|
|
2151
2151
|
AUTHORIZATION_POPUP_FEATURES
|
|
2152
2152
|
);
|
|
@@ -2158,6 +2158,8 @@ var CheckoutService = class {
|
|
|
2158
2158
|
};
|
|
2159
2159
|
return chunkAVXA4F6G_js.PURCHASE_INTENT_ACTION_DECISION.STOP;
|
|
2160
2160
|
}
|
|
2161
|
+
popup.opener = null;
|
|
2162
|
+
popup.location.replace(authorizationUrl);
|
|
2161
2163
|
}
|
|
2162
2164
|
}
|
|
2163
2165
|
actionFailure = {
|
|
@@ -3293,6 +3295,43 @@ function startRedirectSignIn(opts, authorizeEndpoint, pkce, state) {
|
|
|
3293
3295
|
}));
|
|
3294
3296
|
}
|
|
3295
3297
|
|
|
3298
|
+
// src/internal/events.ts
|
|
3299
|
+
var MUTATION_ERROR = "mutation:error";
|
|
3300
|
+
var AUTH_TOKEN_CHANGED = "auth:token-changed";
|
|
3301
|
+
var SESSION_CLAIMED = "session:claimed";
|
|
3302
|
+
var SESSION_CLEARED = "session:cleared";
|
|
3303
|
+
function createClientEvents() {
|
|
3304
|
+
const listeners = /* @__PURE__ */ new Map();
|
|
3305
|
+
return {
|
|
3306
|
+
on(name, listener) {
|
|
3307
|
+
let set = listeners.get(name);
|
|
3308
|
+
if (!set) {
|
|
3309
|
+
set = /* @__PURE__ */ new Set();
|
|
3310
|
+
listeners.set(name, set);
|
|
3311
|
+
}
|
|
3312
|
+
set.add(listener);
|
|
3313
|
+
return () => {
|
|
3314
|
+
set?.delete(listener);
|
|
3315
|
+
};
|
|
3316
|
+
},
|
|
3317
|
+
off(name, listener) {
|
|
3318
|
+
listeners.get(name)?.delete(listener);
|
|
3319
|
+
},
|
|
3320
|
+
emit(name, payload) {
|
|
3321
|
+
const set = listeners.get(name);
|
|
3322
|
+
if (!set) return;
|
|
3323
|
+
const snapshot = Array.from(set);
|
|
3324
|
+
for (const listener of snapshot) {
|
|
3325
|
+
try {
|
|
3326
|
+
listener(payload);
|
|
3327
|
+
} catch (err2) {
|
|
3328
|
+
console.error(`[Cimplify] event listener for "${name}" threw:`, err2);
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
};
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3296
3335
|
// src/elements.ts
|
|
3297
3336
|
function toCheckoutError(code, message, recoverable) {
|
|
3298
3337
|
const hint = chunkAVXA4F6G_js.getErrorHint(code);
|
|
@@ -3451,6 +3490,8 @@ var CimplifyElements = class {
|
|
|
3451
3490
|
this.authGeneration = 0;
|
|
3452
3491
|
this.activeCheckoutAbort = null;
|
|
3453
3492
|
this.businessIdResolvePromise = null;
|
|
3493
|
+
this.stopSessionSync = () => {
|
|
3494
|
+
};
|
|
3454
3495
|
this.client = client;
|
|
3455
3496
|
this.businessId = businessId ?? null;
|
|
3456
3497
|
this.linkUrl = options.linkUrl || DEFAULT_LINK_URL;
|
|
@@ -3459,6 +3500,9 @@ var CimplifyElements = class {
|
|
|
3459
3500
|
if (typeof window !== "undefined") {
|
|
3460
3501
|
window.addEventListener("message", this.boundHandleMessage);
|
|
3461
3502
|
}
|
|
3503
|
+
this.stopSessionSync = client.events.on(SESSION_CLAIMED, () => {
|
|
3504
|
+
if (!this.authInProgress && !this.authEstablishmentInProgress) this.syncHostSession();
|
|
3505
|
+
});
|
|
3462
3506
|
void this.restoreSession();
|
|
3463
3507
|
}
|
|
3464
3508
|
debug(...args) {
|
|
@@ -3466,6 +3510,20 @@ var CimplifyElements = class {
|
|
|
3466
3510
|
console.debug(...args);
|
|
3467
3511
|
}
|
|
3468
3512
|
}
|
|
3513
|
+
syncHostSession(element) {
|
|
3514
|
+
if (this.authEstablishmentInProgress) return;
|
|
3515
|
+
const sessionToken = this.client.getSessionToken();
|
|
3516
|
+
const token = this.client.getAccessToken() ?? this.accessToken;
|
|
3517
|
+
const targets = element ? [element] : Array.from(this.elements.values());
|
|
3518
|
+
for (const target of targets) {
|
|
3519
|
+
if (sessionToken) {
|
|
3520
|
+
target.sendMessage({ type: MESSAGE_TYPES.SET_SESSION, sessionToken });
|
|
3521
|
+
}
|
|
3522
|
+
if (token) {
|
|
3523
|
+
target.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
3524
|
+
}
|
|
3525
|
+
}
|
|
3526
|
+
}
|
|
3469
3527
|
create(type, options = {}) {
|
|
3470
3528
|
const existing = this.elements.get(type);
|
|
3471
3529
|
if (existing) return existing;
|
|
@@ -3489,6 +3547,9 @@ var CimplifyElements = class {
|
|
|
3489
3547
|
}
|
|
3490
3548
|
this.authInProgress = false;
|
|
3491
3549
|
this.authEstablishmentInProgress = false;
|
|
3550
|
+
this.stopSessionSync();
|
|
3551
|
+
this.stopSessionSync = () => {
|
|
3552
|
+
};
|
|
3492
3553
|
this.elements.forEach((element) => element.destroy());
|
|
3493
3554
|
this.elements.clear();
|
|
3494
3555
|
if (typeof window !== "undefined") {
|
|
@@ -3642,9 +3703,14 @@ var CimplifyElements = class {
|
|
|
3642
3703
|
account_id: this.accountId ?? void 0,
|
|
3643
3704
|
customer_id: this.customerId ?? void 0
|
|
3644
3705
|
};
|
|
3645
|
-
const
|
|
3706
|
+
const inactivityTimeoutMs = options.timeout_ms ?? 18e4;
|
|
3707
|
+
const shopperPendingStatuses = /* @__PURE__ */ new Set([
|
|
3708
|
+
chunkEV2EVOYS_js.CHECKOUT_STATUS.REVIEWING_TERMS,
|
|
3709
|
+
chunkEV2EVOYS_js.CHECKOUT_STATUS.AWAITING_AUTHORIZATION
|
|
3710
|
+
]);
|
|
3646
3711
|
return new Promise((resolve) => {
|
|
3647
3712
|
let settled = false;
|
|
3713
|
+
let timeout;
|
|
3648
3714
|
const cleanup = () => {
|
|
3649
3715
|
if (typeof window !== "undefined") {
|
|
3650
3716
|
window.removeEventListener("message", handleCheckoutMessage);
|
|
@@ -3661,15 +3727,23 @@ var CimplifyElements = class {
|
|
|
3661
3727
|
cleanup();
|
|
3662
3728
|
resolve(result);
|
|
3663
3729
|
};
|
|
3664
|
-
const
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3730
|
+
const armTimeout = () => {
|
|
3731
|
+
clearTimeout(timeout);
|
|
3732
|
+
timeout = setTimeout(() => {
|
|
3733
|
+
settle(
|
|
3734
|
+
toCheckoutError(
|
|
3735
|
+
chunkAVXA4F6G_js.ErrorCode.TIMEOUT,
|
|
3736
|
+
"Checkout timed out before receiving a terminal response.",
|
|
3737
|
+
true
|
|
3738
|
+
)
|
|
3739
|
+
);
|
|
3740
|
+
}, inactivityTimeoutMs);
|
|
3741
|
+
};
|
|
3742
|
+
const suspendTimeout = () => {
|
|
3743
|
+
clearTimeout(timeout);
|
|
3744
|
+
timeout = void 0;
|
|
3745
|
+
};
|
|
3746
|
+
armTimeout();
|
|
3673
3747
|
const handleCheckoutMessage = (event) => {
|
|
3674
3748
|
if (!isAllowedOrigin(event.origin)) {
|
|
3675
3749
|
return;
|
|
@@ -3682,10 +3756,16 @@ var CimplifyElements = class {
|
|
|
3682
3756
|
return;
|
|
3683
3757
|
}
|
|
3684
3758
|
if (message.type === MESSAGE_TYPES.CHECKOUT_STATUS) {
|
|
3759
|
+
if (shopperPendingStatuses.has(message.status)) {
|
|
3760
|
+
suspendTimeout();
|
|
3761
|
+
} else {
|
|
3762
|
+
armTimeout();
|
|
3763
|
+
}
|
|
3685
3764
|
options.on_status_change?.(message.status, message.context);
|
|
3686
3765
|
return;
|
|
3687
3766
|
}
|
|
3688
3767
|
if (message.type === MESSAGE_TYPES.TERMS_CHANGED) {
|
|
3768
|
+
suspendTimeout();
|
|
3689
3769
|
options.on_status_change?.(chunkEV2EVOYS_js.CHECKOUT_STATUS.REVIEWING_TERMS, {
|
|
3690
3770
|
intent_id: message.intent_id,
|
|
3691
3771
|
replacement_terms: message.replacement,
|
|
@@ -3694,6 +3774,7 @@ var CimplifyElements = class {
|
|
|
3694
3774
|
return;
|
|
3695
3775
|
}
|
|
3696
3776
|
if (message.type === MESSAGE_TYPES.SELECTION_UNAVAILABLE) {
|
|
3777
|
+
suspendTimeout();
|
|
3697
3778
|
options.on_status_change?.(chunkEV2EVOYS_js.CHECKOUT_STATUS.REVIEWING_TERMS, {
|
|
3698
3779
|
intent_id: message.intent_id,
|
|
3699
3780
|
unavailable_lines: message.lines
|
|
@@ -3740,6 +3821,7 @@ var CimplifyElements = class {
|
|
|
3740
3821
|
hasAddress: !!processMessage.address,
|
|
3741
3822
|
isUnifiedCheckout
|
|
3742
3823
|
});
|
|
3824
|
+
this.syncHostSession(checkoutElement);
|
|
3743
3825
|
checkoutElement.sendMessage(processMessage);
|
|
3744
3826
|
this.debug("[cimplify:checkout] postMessage sent, waiting for checkout_complete...");
|
|
3745
3827
|
});
|
|
@@ -4410,6 +4492,7 @@ function createElements(client, businessId, options) {
|
|
|
4410
4492
|
return new CimplifyElements(client, businessId, options);
|
|
4411
4493
|
}
|
|
4412
4494
|
|
|
4495
|
+
exports.AUTH_TOKEN_CHANGED = AUTH_TOKEN_CHANGED;
|
|
4413
4496
|
exports.AuthService = AuthService;
|
|
4414
4497
|
exports.BusinessService = BusinessService;
|
|
4415
4498
|
exports.CartOperations = CartOperations;
|
|
@@ -4428,6 +4511,7 @@ exports.InventoryService = InventoryService;
|
|
|
4428
4511
|
exports.LinkService = LinkService;
|
|
4429
4512
|
exports.LiteService = LiteService;
|
|
4430
4513
|
exports.MESSAGE_TYPES = MESSAGE_TYPES;
|
|
4514
|
+
exports.MUTATION_ERROR = MUTATION_ERROR;
|
|
4431
4515
|
exports.OrderQueries = OrderQueries;
|
|
4432
4516
|
exports.PAYMENT_AUTHORIZATION_OUTCOME_STATUS = PAYMENT_AUTHORIZATION_OUTCOME_STATUS;
|
|
4433
4517
|
exports.PAYMENT_AUTHORIZATION_PROVIDER = PAYMENT_AUTHORIZATION_PROVIDER;
|
|
@@ -4435,11 +4519,14 @@ exports.PKCE_COOKIE = PKCE_COOKIE;
|
|
|
4435
4519
|
exports.PKCE_COOKIE_PATH = PKCE_COOKIE_PATH;
|
|
4436
4520
|
exports.PaymentAuthorizationAdapterRegistry = PaymentAuthorizationAdapterRegistry;
|
|
4437
4521
|
exports.PaystackAuthorizationAdapter = PaystackAuthorizationAdapter;
|
|
4522
|
+
exports.SESSION_CLAIMED = SESSION_CLAIMED;
|
|
4523
|
+
exports.SESSION_CLEARED = SESSION_CLEARED;
|
|
4438
4524
|
exports.SchedulingService = SchedulingService;
|
|
4439
4525
|
exports.StripeAuthorizationAdapter = StripeAuthorizationAdapter;
|
|
4440
4526
|
exports.clearIntentIdempotencyKey = clearIntentIdempotencyKey;
|
|
4441
4527
|
exports.combine = combine;
|
|
4442
4528
|
exports.combineObject = combineObject;
|
|
4529
|
+
exports.createClientEvents = createClientEvents;
|
|
4443
4530
|
exports.createDefaultPaymentAuthorizationAdapterRegistry = createDefaultPaymentAuthorizationAdapterRegistry;
|
|
4444
4531
|
exports.createElements = createElements;
|
|
4445
4532
|
exports.createPurchaseIntentConfirmation = createPurchaseIntentConfirmation;
|
|
@@ -1610,7 +1610,7 @@ var CHECKOUT_CONFIRMATION_SCOPE_PREFIX = "checkout-confirm:";
|
|
|
1610
1610
|
var CHECKOUT_INTENT_RECOVERY_FINGERPRINT = "cart-intent-v1";
|
|
1611
1611
|
var ABORT_ERROR_NAME = "AbortError";
|
|
1612
1612
|
var AUTHORIZATION_POPUP_NAME = "cimplify-auth";
|
|
1613
|
-
var AUTHORIZATION_POPUP_FEATURES = "width=520,height=760
|
|
1613
|
+
var AUTHORIZATION_POPUP_FEATURES = "width=520,height=760";
|
|
1614
1614
|
var ORDER_TOKEN_QUERY_PARAMETER = "token";
|
|
1615
1615
|
var CHECKOUT_API_ROUTE = {
|
|
1616
1616
|
COLLECTION_OPTIONS: "/api/v1/payments/collection-options",
|
|
@@ -2144,7 +2144,7 @@ var CheckoutService = class {
|
|
|
2144
2144
|
window.location.assign(authorizationUrl);
|
|
2145
2145
|
} else {
|
|
2146
2146
|
const popup = window.open(
|
|
2147
|
-
|
|
2147
|
+
"",
|
|
2148
2148
|
AUTHORIZATION_POPUP_NAME,
|
|
2149
2149
|
AUTHORIZATION_POPUP_FEATURES
|
|
2150
2150
|
);
|
|
@@ -2156,6 +2156,8 @@ var CheckoutService = class {
|
|
|
2156
2156
|
};
|
|
2157
2157
|
return PURCHASE_INTENT_ACTION_DECISION.STOP;
|
|
2158
2158
|
}
|
|
2159
|
+
popup.opener = null;
|
|
2160
|
+
popup.location.replace(authorizationUrl);
|
|
2159
2161
|
}
|
|
2160
2162
|
}
|
|
2161
2163
|
actionFailure = {
|
|
@@ -3291,6 +3293,43 @@ function startRedirectSignIn(opts, authorizeEndpoint, pkce, state) {
|
|
|
3291
3293
|
}));
|
|
3292
3294
|
}
|
|
3293
3295
|
|
|
3296
|
+
// src/internal/events.ts
|
|
3297
|
+
var MUTATION_ERROR = "mutation:error";
|
|
3298
|
+
var AUTH_TOKEN_CHANGED = "auth:token-changed";
|
|
3299
|
+
var SESSION_CLAIMED = "session:claimed";
|
|
3300
|
+
var SESSION_CLEARED = "session:cleared";
|
|
3301
|
+
function createClientEvents() {
|
|
3302
|
+
const listeners = /* @__PURE__ */ new Map();
|
|
3303
|
+
return {
|
|
3304
|
+
on(name, listener) {
|
|
3305
|
+
let set = listeners.get(name);
|
|
3306
|
+
if (!set) {
|
|
3307
|
+
set = /* @__PURE__ */ new Set();
|
|
3308
|
+
listeners.set(name, set);
|
|
3309
|
+
}
|
|
3310
|
+
set.add(listener);
|
|
3311
|
+
return () => {
|
|
3312
|
+
set?.delete(listener);
|
|
3313
|
+
};
|
|
3314
|
+
},
|
|
3315
|
+
off(name, listener) {
|
|
3316
|
+
listeners.get(name)?.delete(listener);
|
|
3317
|
+
},
|
|
3318
|
+
emit(name, payload) {
|
|
3319
|
+
const set = listeners.get(name);
|
|
3320
|
+
if (!set) return;
|
|
3321
|
+
const snapshot = Array.from(set);
|
|
3322
|
+
for (const listener of snapshot) {
|
|
3323
|
+
try {
|
|
3324
|
+
listener(payload);
|
|
3325
|
+
} catch (err2) {
|
|
3326
|
+
console.error(`[Cimplify] event listener for "${name}" threw:`, err2);
|
|
3327
|
+
}
|
|
3328
|
+
}
|
|
3329
|
+
}
|
|
3330
|
+
};
|
|
3331
|
+
}
|
|
3332
|
+
|
|
3294
3333
|
// src/elements.ts
|
|
3295
3334
|
function toCheckoutError(code, message, recoverable) {
|
|
3296
3335
|
const hint = getErrorHint(code);
|
|
@@ -3449,6 +3488,8 @@ var CimplifyElements = class {
|
|
|
3449
3488
|
this.authGeneration = 0;
|
|
3450
3489
|
this.activeCheckoutAbort = null;
|
|
3451
3490
|
this.businessIdResolvePromise = null;
|
|
3491
|
+
this.stopSessionSync = () => {
|
|
3492
|
+
};
|
|
3452
3493
|
this.client = client;
|
|
3453
3494
|
this.businessId = businessId ?? null;
|
|
3454
3495
|
this.linkUrl = options.linkUrl || DEFAULT_LINK_URL;
|
|
@@ -3457,6 +3498,9 @@ var CimplifyElements = class {
|
|
|
3457
3498
|
if (typeof window !== "undefined") {
|
|
3458
3499
|
window.addEventListener("message", this.boundHandleMessage);
|
|
3459
3500
|
}
|
|
3501
|
+
this.stopSessionSync = client.events.on(SESSION_CLAIMED, () => {
|
|
3502
|
+
if (!this.authInProgress && !this.authEstablishmentInProgress) this.syncHostSession();
|
|
3503
|
+
});
|
|
3460
3504
|
void this.restoreSession();
|
|
3461
3505
|
}
|
|
3462
3506
|
debug(...args) {
|
|
@@ -3464,6 +3508,20 @@ var CimplifyElements = class {
|
|
|
3464
3508
|
console.debug(...args);
|
|
3465
3509
|
}
|
|
3466
3510
|
}
|
|
3511
|
+
syncHostSession(element) {
|
|
3512
|
+
if (this.authEstablishmentInProgress) return;
|
|
3513
|
+
const sessionToken = this.client.getSessionToken();
|
|
3514
|
+
const token = this.client.getAccessToken() ?? this.accessToken;
|
|
3515
|
+
const targets = element ? [element] : Array.from(this.elements.values());
|
|
3516
|
+
for (const target of targets) {
|
|
3517
|
+
if (sessionToken) {
|
|
3518
|
+
target.sendMessage({ type: MESSAGE_TYPES.SET_SESSION, sessionToken });
|
|
3519
|
+
}
|
|
3520
|
+
if (token) {
|
|
3521
|
+
target.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
}
|
|
3467
3525
|
create(type, options = {}) {
|
|
3468
3526
|
const existing = this.elements.get(type);
|
|
3469
3527
|
if (existing) return existing;
|
|
@@ -3487,6 +3545,9 @@ var CimplifyElements = class {
|
|
|
3487
3545
|
}
|
|
3488
3546
|
this.authInProgress = false;
|
|
3489
3547
|
this.authEstablishmentInProgress = false;
|
|
3548
|
+
this.stopSessionSync();
|
|
3549
|
+
this.stopSessionSync = () => {
|
|
3550
|
+
};
|
|
3490
3551
|
this.elements.forEach((element) => element.destroy());
|
|
3491
3552
|
this.elements.clear();
|
|
3492
3553
|
if (typeof window !== "undefined") {
|
|
@@ -3640,9 +3701,14 @@ var CimplifyElements = class {
|
|
|
3640
3701
|
account_id: this.accountId ?? void 0,
|
|
3641
3702
|
customer_id: this.customerId ?? void 0
|
|
3642
3703
|
};
|
|
3643
|
-
const
|
|
3704
|
+
const inactivityTimeoutMs = options.timeout_ms ?? 18e4;
|
|
3705
|
+
const shopperPendingStatuses = /* @__PURE__ */ new Set([
|
|
3706
|
+
CHECKOUT_STATUS.REVIEWING_TERMS,
|
|
3707
|
+
CHECKOUT_STATUS.AWAITING_AUTHORIZATION
|
|
3708
|
+
]);
|
|
3644
3709
|
return new Promise((resolve) => {
|
|
3645
3710
|
let settled = false;
|
|
3711
|
+
let timeout;
|
|
3646
3712
|
const cleanup = () => {
|
|
3647
3713
|
if (typeof window !== "undefined") {
|
|
3648
3714
|
window.removeEventListener("message", handleCheckoutMessage);
|
|
@@ -3659,15 +3725,23 @@ var CimplifyElements = class {
|
|
|
3659
3725
|
cleanup();
|
|
3660
3726
|
resolve(result);
|
|
3661
3727
|
};
|
|
3662
|
-
const
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3728
|
+
const armTimeout = () => {
|
|
3729
|
+
clearTimeout(timeout);
|
|
3730
|
+
timeout = setTimeout(() => {
|
|
3731
|
+
settle(
|
|
3732
|
+
toCheckoutError(
|
|
3733
|
+
ErrorCode.TIMEOUT,
|
|
3734
|
+
"Checkout timed out before receiving a terminal response.",
|
|
3735
|
+
true
|
|
3736
|
+
)
|
|
3737
|
+
);
|
|
3738
|
+
}, inactivityTimeoutMs);
|
|
3739
|
+
};
|
|
3740
|
+
const suspendTimeout = () => {
|
|
3741
|
+
clearTimeout(timeout);
|
|
3742
|
+
timeout = void 0;
|
|
3743
|
+
};
|
|
3744
|
+
armTimeout();
|
|
3671
3745
|
const handleCheckoutMessage = (event) => {
|
|
3672
3746
|
if (!isAllowedOrigin(event.origin)) {
|
|
3673
3747
|
return;
|
|
@@ -3680,10 +3754,16 @@ var CimplifyElements = class {
|
|
|
3680
3754
|
return;
|
|
3681
3755
|
}
|
|
3682
3756
|
if (message.type === MESSAGE_TYPES.CHECKOUT_STATUS) {
|
|
3757
|
+
if (shopperPendingStatuses.has(message.status)) {
|
|
3758
|
+
suspendTimeout();
|
|
3759
|
+
} else {
|
|
3760
|
+
armTimeout();
|
|
3761
|
+
}
|
|
3683
3762
|
options.on_status_change?.(message.status, message.context);
|
|
3684
3763
|
return;
|
|
3685
3764
|
}
|
|
3686
3765
|
if (message.type === MESSAGE_TYPES.TERMS_CHANGED) {
|
|
3766
|
+
suspendTimeout();
|
|
3687
3767
|
options.on_status_change?.(CHECKOUT_STATUS.REVIEWING_TERMS, {
|
|
3688
3768
|
intent_id: message.intent_id,
|
|
3689
3769
|
replacement_terms: message.replacement,
|
|
@@ -3692,6 +3772,7 @@ var CimplifyElements = class {
|
|
|
3692
3772
|
return;
|
|
3693
3773
|
}
|
|
3694
3774
|
if (message.type === MESSAGE_TYPES.SELECTION_UNAVAILABLE) {
|
|
3775
|
+
suspendTimeout();
|
|
3695
3776
|
options.on_status_change?.(CHECKOUT_STATUS.REVIEWING_TERMS, {
|
|
3696
3777
|
intent_id: message.intent_id,
|
|
3697
3778
|
unavailable_lines: message.lines
|
|
@@ -3738,6 +3819,7 @@ var CimplifyElements = class {
|
|
|
3738
3819
|
hasAddress: !!processMessage.address,
|
|
3739
3820
|
isUnifiedCheckout
|
|
3740
3821
|
});
|
|
3822
|
+
this.syncHostSession(checkoutElement);
|
|
3741
3823
|
checkoutElement.sendMessage(processMessage);
|
|
3742
3824
|
this.debug("[cimplify:checkout] postMessage sent, waiting for checkout_complete...");
|
|
3743
3825
|
});
|
|
@@ -4408,4 +4490,4 @@ function createElements(client, businessId, options) {
|
|
|
4408
4490
|
return new CimplifyElements(client, businessId, options);
|
|
4409
4491
|
}
|
|
4410
4492
|
|
|
4411
|
-
export { AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService, CimplifyElement, CimplifyElements, DEFAULT_ISSUER, ELEMENTS_AUTH_CONTACT_TYPES, ELEMENTS_AUTH_MODES, ELEMENTS_AUTH_PROMPTS, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, OrderQueries, PAYMENT_AUTHORIZATION_OUTCOME_STATUS, PAYMENT_AUTHORIZATION_PROVIDER, PKCE_COOKIE, PKCE_COOKIE_PATH, PaymentAuthorizationAdapterRegistry, PaystackAuthorizationAdapter, SchedulingService, StripeAuthorizationAdapter, clearIntentIdempotencyKey, combine, combineObject, createDefaultPaymentAuthorizationAdapterRegistry, createElements, createPurchaseIntentConfirmation, decodePkceState, err, flatMap, fromPromise, generateIdempotencyKey, generatePkce, generateState, getAuthorizationEndpoint, getOrElse, intentIdempotencyKey, isErr, isOk, mapError, mapResult, ok, purchaseIntentRequiresPaymentOption, safe, selectPurchaseIntentPaymentOption, startSignIn, toNullable, tryCatch, unwrap };
|
|
4493
|
+
export { AUTH_TOKEN_CHANGED, AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService, CimplifyElement, CimplifyElements, DEFAULT_ISSUER, ELEMENTS_AUTH_CONTACT_TYPES, ELEMENTS_AUTH_MODES, ELEMENTS_AUTH_PROMPTS, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, MUTATION_ERROR, OrderQueries, PAYMENT_AUTHORIZATION_OUTCOME_STATUS, PAYMENT_AUTHORIZATION_PROVIDER, PKCE_COOKIE, PKCE_COOKIE_PATH, PaymentAuthorizationAdapterRegistry, PaystackAuthorizationAdapter, SESSION_CLAIMED, SESSION_CLEARED, SchedulingService, StripeAuthorizationAdapter, clearIntentIdempotencyKey, combine, combineObject, createClientEvents, createDefaultPaymentAuthorizationAdapterRegistry, createElements, createPurchaseIntentConfirmation, decodePkceState, err, flatMap, fromPromise, generateIdempotencyKey, generatePkce, generateState, getAuthorizationEndpoint, getOrElse, intentIdempotencyKey, isErr, isOk, mapError, mapResult, ok, purchaseIntentRequiresPaymentOption, safe, selectPurchaseIntentPaymentOption, startSignIn, toNullable, tryCatch, unwrap };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CimplifyClient } from './catalogue-
|
|
2
|
-
import { A as AppHandle, C as CreateAppOptions } from './server-
|
|
1
|
+
import { C as CimplifyClient } from './catalogue-CVKH9faR.mjs';
|
|
2
|
+
import { A as AppHandle, C as CreateAppOptions } from './server-DDEJ7e9s.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Test client + fixtures.
|
|
@@ -71,6 +71,16 @@ declare const fixtures: {
|
|
|
71
71
|
name: string;
|
|
72
72
|
email: string;
|
|
73
73
|
phone: string;
|
|
74
|
+
save_details: boolean;
|
|
75
|
+
};
|
|
76
|
+
deliveryAddress(overrides?: Partial<{
|
|
77
|
+
street_address: string;
|
|
78
|
+
city: string;
|
|
79
|
+
region: string;
|
|
80
|
+
}>): {
|
|
81
|
+
street_address: string;
|
|
82
|
+
city: string;
|
|
83
|
+
region: string;
|
|
74
84
|
};
|
|
75
85
|
/**
|
|
76
86
|
* Run the full guest auth flow (request OTP → verify) and return
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CimplifyClient } from './catalogue-
|
|
2
|
-
import { A as AppHandle, C as CreateAppOptions } from './server-
|
|
1
|
+
import { C as CimplifyClient } from './catalogue-ChBjPPME.js';
|
|
2
|
+
import { A as AppHandle, C as CreateAppOptions } from './server-7soMMUgP.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Test client + fixtures.
|
|
@@ -71,6 +71,16 @@ declare const fixtures: {
|
|
|
71
71
|
name: string;
|
|
72
72
|
email: string;
|
|
73
73
|
phone: string;
|
|
74
|
+
save_details: boolean;
|
|
75
|
+
};
|
|
76
|
+
deliveryAddress(overrides?: Partial<{
|
|
77
|
+
street_address: string;
|
|
78
|
+
city: string;
|
|
79
|
+
region: string;
|
|
80
|
+
}>): {
|
|
81
|
+
street_address: string;
|
|
82
|
+
city: string;
|
|
83
|
+
region: string;
|
|
74
84
|
};
|
|
75
85
|
/**
|
|
76
86
|
* Run the full guest auth flow (request OTP → verify) and return
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PaymentAuthorizationAdapter, c as PaymentAuthorizationContext, d as PaymentAuthorizationOutcome, e as ChatReplyCard } from './catalogue-
|
|
2
|
-
export { A as ActivityRecommendation, f as ActivityRecommendationsResponse, g as ActivityService, h as ActivityStateResponse, i as AmountToPay, j as AuthService, k as AuthStatus, l as AuthorizeCardPopupOptions, m as AutocompletePrediction, n as AutocompleteResponse, o as AvailabilityResult, p as AvailableSlot, B as Booking, q as BookingModificationType, r as BookingStatus, s as BookingWithDetails, t as BufferTimes, u as Business, v as BusinessDetailsDTO, w as BusinessHours, x as BusinessPreferences, y as BusinessService, z as BusinessSettings, D as BusinessWithLocations, a as CacheOptions, E as CancelBookingInput, F as CancelBookingResult, G as CancelOrderInput, H as CancellationPolicy, I as CardPopupAction, J as CartOperations, K as CatalogueQueries, L as CatalogueResult, M as CatalogueSnapshot, N as CategoryInfo, O as ChatAttachment, Q as ChatConversation, S as ChatConversationResponse, T as ChatMessage, U as ChatReplyContext, V as ChatUploadAttachment, W as ChatWidgetStarter, X as CheckSlotAvailabilityInput, Y as CheckSlotAvailabilityResult, Z as CheckoutInput, _ as CheckoutOperations, _ as CheckoutService, C as CimplifyClient, $ as CimplifyConfig, a0 as CimplifyElement, a1 as CimplifyElements, a2 as ClaimConversationResult, a3 as ClaimExternalChatsResult, a4 as ContentType, a5 as CustomerBooking, a6 as CustomerBookingServiceItem, a7 as CustomerServicePreferences, a8 as DayAvailability, a9 as DeliveryFeeDetails, aa as DeliveryFeeResponse, ab as DeliveryFeeStatus, ac as DeliveryOption, ad as DeliveryOptionsQuery, ae as DeliveryOptionsResponse, af as DeliveryService, ag as DepositResult, ah as DismissMessageResponse, ai as EnrichedOrder, aj as EnrichedOrderItem, ak as Err, al as ExternalChatClaimAttempt, am as ExternalChatClaimDisposition, an as FeeBearerType, ao as FetchQuoteInput, ap as FulfillmentLink, aq as FulfillmentStatus, ar as FulfillmentSummaryDTO, as as FulfillmentType, at as FxQuote, au as FxQuoteRequest, av as FxQuoteStatus, aw as FxRateResponse, ax as FxService, ay as GetAvailableSlotsInput, az as GetDeliveryOptionsParams, aA as GetOrdersOptions, aB as GetProductsOptions, aC as GroupOrderInfo, aD as HostedPurchaseIntentService, aE as InventoryService, aF as LifecyclePhase, aG as LineItem, aH as LineType, aI as LinkService, aJ as LiteBootstrap, aK as LiteDayHours, aL as LiteHoursRange, aM as LiteService, aN as Location, aO as LocationBooking, aP as LocationTaxBehavior, aQ as LocationTaxOverrides, aR as LocationTimeProfile, aS as LocationWithDetails, aT as ObservabilityHooks, aU as Ok, aV as Order, aW as OrderCustomerInfo, aX as OrderDiscountInfo, aY as OrderFilter, aZ as OrderFulfillmentSummary, a_ as OrderGroup, a$ as OrderGroupDetails, b0 as OrderGroupPayment, b1 as OrderGroupPaymentState, b2 as OrderGroupPaymentStatus, b3 as OrderGroupPaymentSummary, b4 as OrderGroupStatus, b5 as OrderHistory, b6 as OrderLineState, b7 as OrderLineStatus, b8 as OrderLocationInfo, b9 as OrderPaymentEvent, ba as OrderPricingView, bb as OrderQueries, bc as OrderSplitDetail, bd as OrderStaffInfo, be as OrderStatus, bf as OrderTimestampsDTO, bg as Origin, bh as OriginActor, bi as OriginChannel, bj as OtpResult, bk as PAYMENT_AUTHORIZATION_OUTCOME_STATUS, bl as PAYMENT_AUTHORIZATION_PROVIDER, bm as PURCHASE_INTENT_ROUTE, bn as PaymentAuthorizationAdapterRegistry, bo as PaymentInfoDTO, bp as PaymentState, bq as PlaceDetailsResponse, br as PlacesService, bs as PriceQuote, bt as PricingOverrides, bu as ProviderResolutionSource, bv as PurchaseIntentActionDecision, bw as PurchaseIntentRequestOptions, bx as PurchaseIntentResolveOptions, by as PurchaseIntentResolveStatus, bz as PurchaseIntentResolver, bA as PurchaseIntentService, bB as PurchaseIntentTransport, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bE as QuoteDynamicBuckets, bF as QuoteStatus, bG as QuoteUiMessage, R as ReadRequestOptions, bH as RefreshQuoteInput, bI as RefreshQuoteResult, bJ as RefundOrderInput, bK as RelatedCandidate, bL as RelatedProduct, bM as RelatedProductsEnrichment, bN as RelationType, bO as ReminderMethod, bP as ReminderSettings, bQ as ReorderResult, bR as RequestContext, bS as RequestErrorEvent, bT as RequestOptions, bU as RequestRetryPolicy, bV as RequestSource, bW as RequestStartEvent, bX as RequestSuccessEvent, bY as RescheduleBookingInput, bZ as RescheduleBookingResult, b_ as RescheduleHistoryRecord, b$ as ResourceAssignment, c0 as ResourceInfo, b as Result, c1 as RetryEvent, c2 as Room, c3 as SESSION_CHANGE_SOURCE, c4 as SchedulingMetadata, c5 as SchedulingResult, c6 as SchedulingService, c7 as SenderType, c8 as Service, c9 as ServiceAvailabilityParams, ca as ServiceAvailabilityResult, cb as ServiceCharge, cc as ServiceNotes, cd as ServiceScheduleRequest, ce as ServiceStatus, cf as SessionActivityData, cg as SessionChangeEvent, ch as SessionChangeSource, ci as SessionMessage, cj as SlotResourceInfo, ck as SlotStaffInfo, cl as Staff, cm as StaffAssignment, cn as StaffRole, co as StaffScheduleItem, cp as StockLevel, cq as StockStatus, cr as StoreCreditBalance, cs as StoreCreditQueries, ct as StorefrontBootstrap, cu as SubscriptionService, cv as SupportService, cw as Table, cx as TimeRange, cy as TimeRanges, cz as TimeSlot, cA as TrackCategoryViewOptions, cB as TrackProductViewOptions, cC as UpdateOrderStatusInput, cD as UpdateProfileInput, cE as UploadInitResponse, cF as UploadResult, cG as UploadService, cH as combine, cI as combineObject, cJ as createCimplifyClient, cK as createDefaultPaymentAuthorizationAdapterRegistry, cL as createElements, cM as err, cN as flatMap, cO as fromPromise, cP as getOrElse, cQ as isErr, cR as isOk, cS as mapError, cT as mapResult, cU as ok, cV as toNullable, cW as tryCatch, cX as unwrap } from './catalogue-
|
|
3
|
-
export { c as clearPurchaseIntentIdempotencyKey, g as generateIdempotencyKey, i as purchaseIntentIdempotencyKey } from './index-
|
|
1
|
+
import { P as PaymentAuthorizationAdapter, c as PaymentAuthorizationContext, d as PaymentAuthorizationOutcome, e as ChatReplyCard } from './catalogue-CVKH9faR.mjs';
|
|
2
|
+
export { A as ActivityRecommendation, f as ActivityRecommendationsResponse, g as ActivityService, h as ActivityStateResponse, i as AmountToPay, j as AuthService, k as AuthStatus, l as AuthorizeCardPopupOptions, m as AutocompletePrediction, n as AutocompleteResponse, o as AvailabilityResult, p as AvailableSlot, B as Booking, q as BookingModificationType, r as BookingStatus, s as BookingWithDetails, t as BufferTimes, u as Business, v as BusinessDetailsDTO, w as BusinessHours, x as BusinessPreferences, y as BusinessService, z as BusinessSettings, D as BusinessWithLocations, a as CacheOptions, E as CancelBookingInput, F as CancelBookingResult, G as CancelOrderInput, H as CancellationPolicy, I as CardPopupAction, J as CartOperations, K as CatalogueQueries, L as CatalogueResult, M as CatalogueSnapshot, N as CategoryInfo, O as ChatAttachment, Q as ChatConversation, S as ChatConversationResponse, T as ChatMessage, U as ChatReplyContext, V as ChatUploadAttachment, W as ChatWidgetStarter, X as CheckSlotAvailabilityInput, Y as CheckSlotAvailabilityResult, Z as CheckoutInput, _ as CheckoutOperations, _ as CheckoutService, C as CimplifyClient, $ as CimplifyConfig, a0 as CimplifyElement, a1 as CimplifyElements, a2 as ClaimConversationResult, a3 as ClaimExternalChatsResult, a4 as ContentType, a5 as CustomerBooking, a6 as CustomerBookingServiceItem, a7 as CustomerServicePreferences, a8 as DayAvailability, a9 as DeliveryFeeDetails, aa as DeliveryFeeResponse, ab as DeliveryFeeStatus, ac as DeliveryOption, ad as DeliveryOptionsQuery, ae as DeliveryOptionsResponse, af as DeliveryService, ag as DepositResult, ah as DismissMessageResponse, ai as EnrichedOrder, aj as EnrichedOrderItem, ak as Err, al as ExternalChatClaimAttempt, am as ExternalChatClaimDisposition, an as FeeBearerType, ao as FetchQuoteInput, ap as FulfillmentLink, aq as FulfillmentStatus, ar as FulfillmentSummaryDTO, as as FulfillmentType, at as FxQuote, au as FxQuoteRequest, av as FxQuoteStatus, aw as FxRateResponse, ax as FxService, ay as GetAvailableSlotsInput, az as GetDeliveryOptionsParams, aA as GetOrdersOptions, aB as GetProductsOptions, aC as GroupOrderInfo, aD as HostedPurchaseIntentService, aE as InventoryService, aF as LifecyclePhase, aG as LineItem, aH as LineType, aI as LinkService, aJ as LiteBootstrap, aK as LiteDayHours, aL as LiteHoursRange, aM as LiteService, aN as Location, aO as LocationBooking, aP as LocationTaxBehavior, aQ as LocationTaxOverrides, aR as LocationTimeProfile, aS as LocationWithDetails, aT as ObservabilityHooks, aU as Ok, aV as Order, aW as OrderCustomerInfo, aX as OrderDiscountInfo, aY as OrderFilter, aZ as OrderFulfillmentSummary, a_ as OrderGroup, a$ as OrderGroupDetails, b0 as OrderGroupPayment, b1 as OrderGroupPaymentState, b2 as OrderGroupPaymentStatus, b3 as OrderGroupPaymentSummary, b4 as OrderGroupStatus, b5 as OrderHistory, b6 as OrderLineState, b7 as OrderLineStatus, b8 as OrderLocationInfo, b9 as OrderPaymentEvent, ba as OrderPricingView, bb as OrderQueries, bc as OrderSplitDetail, bd as OrderStaffInfo, be as OrderStatus, bf as OrderTimestampsDTO, bg as Origin, bh as OriginActor, bi as OriginChannel, bj as OtpResult, bk as PAYMENT_AUTHORIZATION_OUTCOME_STATUS, bl as PAYMENT_AUTHORIZATION_PROVIDER, bm as PURCHASE_INTENT_ROUTE, bn as PaymentAuthorizationAdapterRegistry, bo as PaymentInfoDTO, bp as PaymentState, bq as PlaceDetailsResponse, br as PlacesService, bs as PriceQuote, bt as PricingOverrides, bu as ProviderResolutionSource, bv as PurchaseIntentActionDecision, bw as PurchaseIntentRequestOptions, bx as PurchaseIntentResolveOptions, by as PurchaseIntentResolveStatus, bz as PurchaseIntentResolver, bA as PurchaseIntentService, bB as PurchaseIntentTransport, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bE as QuoteDynamicBuckets, bF as QuoteStatus, bG as QuoteUiMessage, R as ReadRequestOptions, bH as RefreshQuoteInput, bI as RefreshQuoteResult, bJ as RefundOrderInput, bK as RelatedCandidate, bL as RelatedProduct, bM as RelatedProductsEnrichment, bN as RelationType, bO as ReminderMethod, bP as ReminderSettings, bQ as ReorderResult, bR as RequestContext, bS as RequestErrorEvent, bT as RequestOptions, bU as RequestRetryPolicy, bV as RequestSource, bW as RequestStartEvent, bX as RequestSuccessEvent, bY as RescheduleBookingInput, bZ as RescheduleBookingResult, b_ as RescheduleHistoryRecord, b$ as ResourceAssignment, c0 as ResourceInfo, b as Result, c1 as RetryEvent, c2 as Room, c3 as SESSION_CHANGE_SOURCE, c4 as SchedulingMetadata, c5 as SchedulingResult, c6 as SchedulingService, c7 as SenderType, c8 as Service, c9 as ServiceAvailabilityParams, ca as ServiceAvailabilityResult, cb as ServiceCharge, cc as ServiceNotes, cd as ServiceScheduleRequest, ce as ServiceStatus, cf as SessionActivityData, cg as SessionChangeEvent, ch as SessionChangeSource, ci as SessionMessage, cj as SlotResourceInfo, ck as SlotStaffInfo, cl as Staff, cm as StaffAssignment, cn as StaffRole, co as StaffScheduleItem, cp as StockLevel, cq as StockStatus, cr as StoreCreditBalance, cs as StoreCreditQueries, ct as StorefrontBootstrap, cu as SubscriptionService, cv as SupportService, cw as Table, cx as TimeRange, cy as TimeRanges, cz as TimeSlot, cA as TrackCategoryViewOptions, cB as TrackProductViewOptions, cC as UpdateOrderStatusInput, cD as UpdateProfileInput, cE as UploadInitResponse, cF as UploadResult, cG as UploadService, cH as combine, cI as combineObject, cJ as createCimplifyClient, cK as createDefaultPaymentAuthorizationAdapterRegistry, cL as createElements, cM as err, cN as flatMap, cO as fromPromise, cP as getOrElse, cQ as isErr, cR as isOk, cS as mapError, cT as mapResult, cU as ok, cV as toNullable, cW as tryCatch, cX as unwrap } from './catalogue-CVKH9faR.mjs';
|
|
3
|
+
export { c as clearPurchaseIntentIdempotencyKey, g as generateIdempotencyKey, i as purchaseIntentIdempotencyKey } from './index-DEUorPUO.mjs';
|
|
4
4
|
import { f as CheckoutPaymentMethodKind, g as CheckoutTermsView, h as PaymentOptionView, i as ConfirmPurchaseIntentRequest, e as ProductWithDetails, T as TaxPriceDisplayMode, P as Product, D as DurationUnit, A as ApiError } from './checkout-XoV4HNg2.mjs';
|
|
5
5
|
export { j as AUTHORIZATION_TYPE, k as AUTH_MUTATION, l as AbortablePromise, m as AddOn, n as AddOnDetails, o as AddOnGroupDetails, p as AddOnOption, q as AddOnOptionDetails, r as AddOnOptionPrice, s as AddOnWithOptions, t as AddToCartInput, u as AddressAuthorizationData, v as AddressData, w as AddressInfo, x as AddressValue, y as AdjustmentType, z as AppliedDiscount, B as AttributeAppliesTo, E as AttributeType, F as AttributeValidationRules, G as AttributeVisibility, H as AuthResponse, I as AuthenticatedCustomer, J as AuthenticatedData, K as AuthorizationType, L as BOUNDARY_KIND, M as BenefitType, N as BillingFrequency, O as BillingMarkupType, Q as BillingPlanType, R as BoundaryKind, V as Bundle, W as BundleComponentData, X as BundleComponentInfo, Y as BundleComponentVariantView, Z as BundleComponentView, _ as BundlePriceType, $ as BundleProduct, a0 as BundleSelectionData, a1 as BundleSelectionInput, a2 as BundleStoredSelection, a3 as BundleSummary, a4 as BundleWithDetails, a5 as CHECKOUT_COMPLIANCE_LANE, a6 as CHECKOUT_COMPLIANCE_REASON, a7 as CHECKOUT_INVALIDATION_REASON, a8 as CHECKOUT_MATERIAL_TERMS_COMPONENT, a9 as CHECKOUT_MODE, aa as CHECKOUT_MUTATION, ab as CHECKOUT_NEXT_ACTION, ac as CHECKOUT_ORDER_RESULT_STATUS, ad as CHECKOUT_PROTECTION_STATUS, ae as CHECKOUT_PURCHASE_SURFACE, af as CHECKOUT_STATUS, ag as CHECKOUT_STEP, ah as CHECKOUT_TERMS_COMPONENT, ai as CHECKOUT_TERMS_DELTA_KIND, aj as CONTACT_TYPE, ak as CanonicalSourceAuthority, al as Cart, am as CartAddOn, an as CartChannel, ao as CartIntentCheckoutInput, ap as CartItem, aq as CartItemDetails, ar as CartMutationResult, as as CartNotice, at as CartStatus, au as CartSummary, av as CartTotals, b as Category, aw as CategorySummary, ax as CheckoutAddressInfo, ay as CheckoutCartData, az as CheckoutCartItem, aA as CheckoutCollectionMethod, aB as CheckoutCollectionOption, aC as CheckoutCollectionOptions, aD as CheckoutComplianceDecision, aE as CheckoutComplianceLane, aF as CheckoutComplianceReasonCode, aG as CheckoutCustomerInfo, aH as CheckoutDestinationInput, aI as CheckoutFormData, aJ as CheckoutInvalidationReason, aK as CheckoutMaterialTerms, aL as CheckoutMaterialTermsComponent, aM as CheckoutMode, aN as CheckoutMoneyComponents, aO as CheckoutOfferKind, aP as CheckoutOrderType, aQ as CheckoutPaymentMethod, aR as CheckoutProtectionStatus, aS as CheckoutProtectionView, aT as CheckoutPurchaseSurface, aU as CheckoutResult, aV as CheckoutSourceKind, aW as CheckoutStatus, aX as CheckoutStatusContext, aY as CheckoutStep, aZ as CheckoutTermsComponent, a_ as CheckoutTermsDelta, a as ChosenPrice, c as CimplifyError, d as Collection, a$ as CollectionProduct, b0 as CollectionSummary, b1 as ComponentGroup, b2 as ComponentGroupWithComponents, b3 as ComponentPriceBreakdown, b4 as ComponentSchedulingData, b5 as ComponentSelectionInput, b6 as ComponentSourceType, b7 as Composite, b8 as CompositeComponent, b9 as CompositeComponentView, ba as CompositeGroupView, bb as CompositePriceBreakdown, bc as CompositePriceResult, bd as CompositePricingMode, be as CompositeSelectionData, b5 as CompositeSelectionInput, bf as CompositeStoredSelection, bg as CompositeWithDetails, bh as ConfirmPurchaseIntentResponse, bi as ContactType, bj as CreateAddressInput, bk as CreateMobileMoneyInput, C as CurrencyCode, bl as CustomAttributeDefinition, bm as CustomAttributeValue, bn as Customer, bo as CustomerAddress, bp as CustomerInputValue, bq as CustomerLinkPreferences, br as CustomerMobileMoney, bs as DEFAULT_COUNTRY, bt as DEFAULT_CURRENCY, bu as DEVICE_TYPE, bv as DURATION_UNIT, bw as DateRangeValue, bx as Deal, by as DealBenefitType, bz as DepositType, bA as DestinationQuote, bB as DestinationQuoteAddress, bC as DestinationQuoteInput, bD as DeviceType, bE as DigitalProductType, bF as DiscountBreakdown, bG as DiscountDetails, bH as DiscountValidation, bI as DisplayAddOn, bJ as DisplayAddOnOption, bK as DisplayCart, bL as DisplayCartItem, bM as DisplayMode, bN as ELEMENTS_AUTH_CONTACT_TYPES, bO as ELEMENTS_AUTH_MODES, bP as ELEMENTS_AUTH_PROMPTS, bQ as ELEMENT_TYPES, bR as ERROR_HINTS, bS as EVENT_TYPES, bT as ElementAppearance, bU as ElementEventHandler, bV as ElementEventType, bW as ElementOptions, bX as ElementType, bY as ElementsAuthContactType, bZ as ElementsAuthMode, b_ as ElementsAuthOptions, b$ as ElementsAuthPrompt, c0 as ElementsCheckoutData, c1 as ElementsCheckoutResult, c2 as ElementsCustomerInfo, c3 as ElementsOptions, c4 as EligiblePlansQuery, c5 as EnrollAndLinkOrderInput, c6 as EnrollAndLinkOrderResult, c7 as EnrollmentData, c8 as ErrorCode, c9 as ErrorCodeType, ca as ErrorHint, cb as FacetValue, cc as FormattedPlanOption, cd as GroupPricingBehavior, ce as INPUT_FIELD_TYPE, cf as IdempotencyMismatchError, cg as IframeToParentMessage, ch as InitializePaymentResult, ci as InputFieldType, cj as InputFieldValidation, ck as InventoryType, cl as KnowledgeArticle, cm as LEGACY_CHECKOUT_PAYMENT_METHOD_ALIAS, cn as LEGACY_CHECKOUT_PAYMENT_STATUS, co as LINK_MUTATION, cp as LINK_QUERY, cq as LineConfiguration, cr as LinkData, cs as LinkEnrollResult, ct as LinkSession, cu as LinkStatusResult, cv as LocationProductPrice, cw as LocationValue, cx as MAX_PAYMENT_AUTHORIZATION_STEPS, cy as MESSAGE_TYPES, cz as MOBILE_MONEY_PROVIDER, cA as MOBILE_MONEY_TENDER_AUTHORITY_KIND, cB as MeasurementValue, cC as MintPurchaseIntentRequest, cD as MobileMoneyData, cE as MobileMoneyDetails, cF as MobileMoneyProvider, cG as MobileMoneyTenderPreference, cH as Money, cI as NATIVE_PURCHASE_PLATFORM, cJ as NativeAddOnSelection, cK as NativePurchasePlatform, cL as NextAction, cM as ORDER_MUTATION, cN as ORDER_TYPE, cO as OfferRef, cP as OrderType, cQ as PAYMENT_COLLECTION_MODE, cR as PAYMENT_INSTRUMENT_DISPLAY_KIND, cS as PAYMENT_METHOD, cT as PAYMENT_MUTATION, cU as PAYMENT_OPTION_NEXT_ACTION, cV as PAYMENT_OPTION_STATUS, cW as PAYMENT_STATE, cX as PICKUP_TIME_TYPE, cY as PRODUCT_TYPE, cZ as PURCHASE_DISPOSITION, c_ as PURCHASE_INTENT_ACTION_DECISION, c$ as PURCHASE_INTENT_CONFIRM_STATUS, d0 as PURCHASE_INTENT_ERROR_CODE, d1 as PURCHASE_INTENT_LINE_CONFIGURATION_KIND, d2 as PURCHASE_INTENT_MOBILE_MONEY_NETWORK, d3 as PURCHASE_INTENT_OFFER_KIND, d4 as PURCHASE_INTENT_PAYMENT_METHOD, d5 as PURCHASE_INTENT_PAYMENT_PROVIDER, d6 as PURCHASE_INTENT_RESOLUTION_KIND, d7 as PURCHASE_INTENT_RESOLVE_STATUS, d8 as PURCHASE_INTENT_SELLABLE_KIND, d9 as PURCHASE_INTENT_SOURCE_KIND, da as PURCHASE_INTENT_STATUS, db as PURCHASE_SURFACE, dc as PURCHASING_PRINCIPAL_KIND, dd as Pagination, de as PaginationParams, df as ParentToIframeMessage, dg as Payment, dh as PaymentAuthorizationKind, di as PaymentAuthorizationSubmission, dj as PaymentCollectionMode, dk as PaymentErrorDetails, dl as PaymentInstrumentDisplay, dm as PaymentMethod, dn as PaymentMethodInfo, dp as PaymentMethodType, dq as PaymentNextActionKind, dr as PaymentOptionStatus, ds as PaymentProcessingState, dt as PaymentProvider, du as PaymentProviderKind, dv as PaymentResponse, dw as PaymentStatus, dx as PaymentStatusResponse, dy as PhoneValue, dz as PickupTime, dA as PickupTimeType, dB as PreparePurchaseIntentRequest, dC as Price, dD as PriceAdjustment, dE as PriceDecisionPath, dF as PriceEntryType, dG as PricePathTaxInfo, dH as PriceSource, dI as ProcessAndResolveOptions, dJ as ProcessCheckoutOptions, dK as ProcessCheckoutResult, dL as ProductAddOn, dM as ProductAvailability, dN as ProductAvailabilityNow, dO as ProductBillingPlan, dP as ProductDealInfo, dQ as ProductInputField, dR as ProductProperty, dS as ProductRenderHint, dT as ProductTaxonomy, dU as ProductTimeProfile, dV as ProductType, dW as ProductVariant, dX as ProductVariantValue, dY as PropertyFacet, dZ as PropertySource, d_ as PurchaseDisposition, d$ as PurchaseIntentActionResponse, e0 as PurchaseIntentCustomerInput, e1 as PurchaseIntentLineConfiguration, e2 as PurchaseIntentLineInput, e3 as PurchaseIntentLinePricingView, e4 as PurchaseIntentLineView, e5 as PurchaseIntentMobileMoneyNetwork, e6 as PurchaseIntentResolution, e7 as PurchaseIntentReviewResponse, e8 as PurchaseIntentSimpleLineConfiguration, e9 as PurchaseIntentSourceInput, ea as PurchaseIntentStatus, eb as PurchaseIntentTenderPreference, ec as PurchaseIntentTerminalResponse, ed as PurchaseIntentView, ee as PurchasePolicyContext, ef as PurchaseSurface, eg as PurchasingPrincipal, eh as QuantityPricingTier, ei as RENDER_HINT, ej as RefreshCheckoutTermsRequest, ek as RelatedProductView, el as RequestOtpInput, em as RequestOtpResult, en as RevokeAllSessionsResult, eo as RevokeSessionResult, ep as SaleCapInfo, S as SaleInfo, eq as SalesChannel, er as SchedulingMode, es as SelectedAddOnOption, et as SellableKind, eu as SellableRef, ev as SemanticKind, ew as SignatureValue, ex as SubmitAuthorizationInput, ey as SubmitPurchaseIntentActionRequest, ez as Subscription, eA as SubscriptionInvoice, eB as SubscriptionItem, eC as SubscriptionStatus, eD as SubscriptionWithDetails, eE as Tag, eF as TagsResponse, eG as TaxPathComponent, eH as TaxonomyAttributeTemplate, eI as TaxonomyWithChildren, eJ as UICart, eK as UICartBusiness, eL as UICartCustomer, eM as UICartLocation, eN as UICartPricing, eO as UnavailableLine, U as UpcomingSale, eP as UpdateAddressInput, eQ as UpdateCartItemInput, eR as VariantAxis, eS as VariantAxisSelection, eT as VariantAxisValue, eU as VariantAxisValueView, eV as VariantAxisView, eW as VariantAxisWithValues, eX as VariantDetails, eY as VariantDetailsDTO, eZ as VariantDisplayAttribute, e_ as VariantLocationAvailability, e$ as VariantStrategy, f0 as VariantView, f1 as VerifyOtpInput, f2 as ZERO, f3 as currencyCode, f4 as enrichError, f5 as getErrorHint, f6 as isCimplifyError, f7 as isIdempotencyMismatchError, f8 as isQuoteConflictRequiringConsent, f9 as isQuoteError, fa as isRetryableError, fb as isSupportedCurrency, fc as money, fd as moneyFromNumber } from './checkout-XoV4HNg2.mjs';
|
|
6
6
|
export { C as CURRENCY_SYMBOLS, a as CanonicalMobileMoneyProvider, M as MOBILE_MONEY_PROVIDERS, P as PAYMENT_TERMINAL_FAILURE_STATUSES, c as canonicalMobileMoneyProvider, b as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, e as formatNumberCompact, g as formatPrice, h as formatPriceAdjustment, i as formatPriceCompact, j as formatPriceRange, k as formatPriceWithTax, l as formatProductPrice, m as getBasePrice, n as getCurrencySymbol, o as getDiscountPercentage, p as getDisplayPrice, q as getMarkupPercentage, r as getPriceRange, s as getProductCurrency, t as getTaxAmount, u as getUnitPriceAtQuantity, v as hasTaxInfo, w as isOnSale, x as isPaymentStatusFailure, y as isPaymentStatusRequiresAction, z as isPaymentStatusSuccess, A as isTaxInclusive, B as isValidPhoneForContext, D as normalizePaymentResponse, E as normalizePhoneToE164, F as normalizeStatusResponse, G as parsePrice, H as paymentAuthorizationUrl, I as purchaseIntentMobileMoneyNetwork, J as resolvePhoneCountryCode } from './index-DRMBo26v.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PaymentAuthorizationAdapter, c as PaymentAuthorizationContext, d as PaymentAuthorizationOutcome, e as ChatReplyCard } from './catalogue-
|
|
2
|
-
export { A as ActivityRecommendation, f as ActivityRecommendationsResponse, g as ActivityService, h as ActivityStateResponse, i as AmountToPay, j as AuthService, k as AuthStatus, l as AuthorizeCardPopupOptions, m as AutocompletePrediction, n as AutocompleteResponse, o as AvailabilityResult, p as AvailableSlot, B as Booking, q as BookingModificationType, r as BookingStatus, s as BookingWithDetails, t as BufferTimes, u as Business, v as BusinessDetailsDTO, w as BusinessHours, x as BusinessPreferences, y as BusinessService, z as BusinessSettings, D as BusinessWithLocations, a as CacheOptions, E as CancelBookingInput, F as CancelBookingResult, G as CancelOrderInput, H as CancellationPolicy, I as CardPopupAction, J as CartOperations, K as CatalogueQueries, L as CatalogueResult, M as CatalogueSnapshot, N as CategoryInfo, O as ChatAttachment, Q as ChatConversation, S as ChatConversationResponse, T as ChatMessage, U as ChatReplyContext, V as ChatUploadAttachment, W as ChatWidgetStarter, X as CheckSlotAvailabilityInput, Y as CheckSlotAvailabilityResult, Z as CheckoutInput, _ as CheckoutOperations, _ as CheckoutService, C as CimplifyClient, $ as CimplifyConfig, a0 as CimplifyElement, a1 as CimplifyElements, a2 as ClaimConversationResult, a3 as ClaimExternalChatsResult, a4 as ContentType, a5 as CustomerBooking, a6 as CustomerBookingServiceItem, a7 as CustomerServicePreferences, a8 as DayAvailability, a9 as DeliveryFeeDetails, aa as DeliveryFeeResponse, ab as DeliveryFeeStatus, ac as DeliveryOption, ad as DeliveryOptionsQuery, ae as DeliveryOptionsResponse, af as DeliveryService, ag as DepositResult, ah as DismissMessageResponse, ai as EnrichedOrder, aj as EnrichedOrderItem, ak as Err, al as ExternalChatClaimAttempt, am as ExternalChatClaimDisposition, an as FeeBearerType, ao as FetchQuoteInput, ap as FulfillmentLink, aq as FulfillmentStatus, ar as FulfillmentSummaryDTO, as as FulfillmentType, at as FxQuote, au as FxQuoteRequest, av as FxQuoteStatus, aw as FxRateResponse, ax as FxService, ay as GetAvailableSlotsInput, az as GetDeliveryOptionsParams, aA as GetOrdersOptions, aB as GetProductsOptions, aC as GroupOrderInfo, aD as HostedPurchaseIntentService, aE as InventoryService, aF as LifecyclePhase, aG as LineItem, aH as LineType, aI as LinkService, aJ as LiteBootstrap, aK as LiteDayHours, aL as LiteHoursRange, aM as LiteService, aN as Location, aO as LocationBooking, aP as LocationTaxBehavior, aQ as LocationTaxOverrides, aR as LocationTimeProfile, aS as LocationWithDetails, aT as ObservabilityHooks, aU as Ok, aV as Order, aW as OrderCustomerInfo, aX as OrderDiscountInfo, aY as OrderFilter, aZ as OrderFulfillmentSummary, a_ as OrderGroup, a$ as OrderGroupDetails, b0 as OrderGroupPayment, b1 as OrderGroupPaymentState, b2 as OrderGroupPaymentStatus, b3 as OrderGroupPaymentSummary, b4 as OrderGroupStatus, b5 as OrderHistory, b6 as OrderLineState, b7 as OrderLineStatus, b8 as OrderLocationInfo, b9 as OrderPaymentEvent, ba as OrderPricingView, bb as OrderQueries, bc as OrderSplitDetail, bd as OrderStaffInfo, be as OrderStatus, bf as OrderTimestampsDTO, bg as Origin, bh as OriginActor, bi as OriginChannel, bj as OtpResult, bk as PAYMENT_AUTHORIZATION_OUTCOME_STATUS, bl as PAYMENT_AUTHORIZATION_PROVIDER, bm as PURCHASE_INTENT_ROUTE, bn as PaymentAuthorizationAdapterRegistry, bo as PaymentInfoDTO, bp as PaymentState, bq as PlaceDetailsResponse, br as PlacesService, bs as PriceQuote, bt as PricingOverrides, bu as ProviderResolutionSource, bv as PurchaseIntentActionDecision, bw as PurchaseIntentRequestOptions, bx as PurchaseIntentResolveOptions, by as PurchaseIntentResolveStatus, bz as PurchaseIntentResolver, bA as PurchaseIntentService, bB as PurchaseIntentTransport, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bE as QuoteDynamicBuckets, bF as QuoteStatus, bG as QuoteUiMessage, R as ReadRequestOptions, bH as RefreshQuoteInput, bI as RefreshQuoteResult, bJ as RefundOrderInput, bK as RelatedCandidate, bL as RelatedProduct, bM as RelatedProductsEnrichment, bN as RelationType, bO as ReminderMethod, bP as ReminderSettings, bQ as ReorderResult, bR as RequestContext, bS as RequestErrorEvent, bT as RequestOptions, bU as RequestRetryPolicy, bV as RequestSource, bW as RequestStartEvent, bX as RequestSuccessEvent, bY as RescheduleBookingInput, bZ as RescheduleBookingResult, b_ as RescheduleHistoryRecord, b$ as ResourceAssignment, c0 as ResourceInfo, b as Result, c1 as RetryEvent, c2 as Room, c3 as SESSION_CHANGE_SOURCE, c4 as SchedulingMetadata, c5 as SchedulingResult, c6 as SchedulingService, c7 as SenderType, c8 as Service, c9 as ServiceAvailabilityParams, ca as ServiceAvailabilityResult, cb as ServiceCharge, cc as ServiceNotes, cd as ServiceScheduleRequest, ce as ServiceStatus, cf as SessionActivityData, cg as SessionChangeEvent, ch as SessionChangeSource, ci as SessionMessage, cj as SlotResourceInfo, ck as SlotStaffInfo, cl as Staff, cm as StaffAssignment, cn as StaffRole, co as StaffScheduleItem, cp as StockLevel, cq as StockStatus, cr as StoreCreditBalance, cs as StoreCreditQueries, ct as StorefrontBootstrap, cu as SubscriptionService, cv as SupportService, cw as Table, cx as TimeRange, cy as TimeRanges, cz as TimeSlot, cA as TrackCategoryViewOptions, cB as TrackProductViewOptions, cC as UpdateOrderStatusInput, cD as UpdateProfileInput, cE as UploadInitResponse, cF as UploadResult, cG as UploadService, cH as combine, cI as combineObject, cJ as createCimplifyClient, cK as createDefaultPaymentAuthorizationAdapterRegistry, cL as createElements, cM as err, cN as flatMap, cO as fromPromise, cP as getOrElse, cQ as isErr, cR as isOk, cS as mapError, cT as mapResult, cU as ok, cV as toNullable, cW as tryCatch, cX as unwrap } from './catalogue-
|
|
3
|
-
export { c as clearPurchaseIntentIdempotencyKey, g as generateIdempotencyKey, i as purchaseIntentIdempotencyKey } from './index-
|
|
1
|
+
import { P as PaymentAuthorizationAdapter, c as PaymentAuthorizationContext, d as PaymentAuthorizationOutcome, e as ChatReplyCard } from './catalogue-ChBjPPME.js';
|
|
2
|
+
export { A as ActivityRecommendation, f as ActivityRecommendationsResponse, g as ActivityService, h as ActivityStateResponse, i as AmountToPay, j as AuthService, k as AuthStatus, l as AuthorizeCardPopupOptions, m as AutocompletePrediction, n as AutocompleteResponse, o as AvailabilityResult, p as AvailableSlot, B as Booking, q as BookingModificationType, r as BookingStatus, s as BookingWithDetails, t as BufferTimes, u as Business, v as BusinessDetailsDTO, w as BusinessHours, x as BusinessPreferences, y as BusinessService, z as BusinessSettings, D as BusinessWithLocations, a as CacheOptions, E as CancelBookingInput, F as CancelBookingResult, G as CancelOrderInput, H as CancellationPolicy, I as CardPopupAction, J as CartOperations, K as CatalogueQueries, L as CatalogueResult, M as CatalogueSnapshot, N as CategoryInfo, O as ChatAttachment, Q as ChatConversation, S as ChatConversationResponse, T as ChatMessage, U as ChatReplyContext, V as ChatUploadAttachment, W as ChatWidgetStarter, X as CheckSlotAvailabilityInput, Y as CheckSlotAvailabilityResult, Z as CheckoutInput, _ as CheckoutOperations, _ as CheckoutService, C as CimplifyClient, $ as CimplifyConfig, a0 as CimplifyElement, a1 as CimplifyElements, a2 as ClaimConversationResult, a3 as ClaimExternalChatsResult, a4 as ContentType, a5 as CustomerBooking, a6 as CustomerBookingServiceItem, a7 as CustomerServicePreferences, a8 as DayAvailability, a9 as DeliveryFeeDetails, aa as DeliveryFeeResponse, ab as DeliveryFeeStatus, ac as DeliveryOption, ad as DeliveryOptionsQuery, ae as DeliveryOptionsResponse, af as DeliveryService, ag as DepositResult, ah as DismissMessageResponse, ai as EnrichedOrder, aj as EnrichedOrderItem, ak as Err, al as ExternalChatClaimAttempt, am as ExternalChatClaimDisposition, an as FeeBearerType, ao as FetchQuoteInput, ap as FulfillmentLink, aq as FulfillmentStatus, ar as FulfillmentSummaryDTO, as as FulfillmentType, at as FxQuote, au as FxQuoteRequest, av as FxQuoteStatus, aw as FxRateResponse, ax as FxService, ay as GetAvailableSlotsInput, az as GetDeliveryOptionsParams, aA as GetOrdersOptions, aB as GetProductsOptions, aC as GroupOrderInfo, aD as HostedPurchaseIntentService, aE as InventoryService, aF as LifecyclePhase, aG as LineItem, aH as LineType, aI as LinkService, aJ as LiteBootstrap, aK as LiteDayHours, aL as LiteHoursRange, aM as LiteService, aN as Location, aO as LocationBooking, aP as LocationTaxBehavior, aQ as LocationTaxOverrides, aR as LocationTimeProfile, aS as LocationWithDetails, aT as ObservabilityHooks, aU as Ok, aV as Order, aW as OrderCustomerInfo, aX as OrderDiscountInfo, aY as OrderFilter, aZ as OrderFulfillmentSummary, a_ as OrderGroup, a$ as OrderGroupDetails, b0 as OrderGroupPayment, b1 as OrderGroupPaymentState, b2 as OrderGroupPaymentStatus, b3 as OrderGroupPaymentSummary, b4 as OrderGroupStatus, b5 as OrderHistory, b6 as OrderLineState, b7 as OrderLineStatus, b8 as OrderLocationInfo, b9 as OrderPaymentEvent, ba as OrderPricingView, bb as OrderQueries, bc as OrderSplitDetail, bd as OrderStaffInfo, be as OrderStatus, bf as OrderTimestampsDTO, bg as Origin, bh as OriginActor, bi as OriginChannel, bj as OtpResult, bk as PAYMENT_AUTHORIZATION_OUTCOME_STATUS, bl as PAYMENT_AUTHORIZATION_PROVIDER, bm as PURCHASE_INTENT_ROUTE, bn as PaymentAuthorizationAdapterRegistry, bo as PaymentInfoDTO, bp as PaymentState, bq as PlaceDetailsResponse, br as PlacesService, bs as PriceQuote, bt as PricingOverrides, bu as ProviderResolutionSource, bv as PurchaseIntentActionDecision, bw as PurchaseIntentRequestOptions, bx as PurchaseIntentResolveOptions, by as PurchaseIntentResolveStatus, bz as PurchaseIntentResolver, bA as PurchaseIntentService, bB as PurchaseIntentTransport, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bE as QuoteDynamicBuckets, bF as QuoteStatus, bG as QuoteUiMessage, R as ReadRequestOptions, bH as RefreshQuoteInput, bI as RefreshQuoteResult, bJ as RefundOrderInput, bK as RelatedCandidate, bL as RelatedProduct, bM as RelatedProductsEnrichment, bN as RelationType, bO as ReminderMethod, bP as ReminderSettings, bQ as ReorderResult, bR as RequestContext, bS as RequestErrorEvent, bT as RequestOptions, bU as RequestRetryPolicy, bV as RequestSource, bW as RequestStartEvent, bX as RequestSuccessEvent, bY as RescheduleBookingInput, bZ as RescheduleBookingResult, b_ as RescheduleHistoryRecord, b$ as ResourceAssignment, c0 as ResourceInfo, b as Result, c1 as RetryEvent, c2 as Room, c3 as SESSION_CHANGE_SOURCE, c4 as SchedulingMetadata, c5 as SchedulingResult, c6 as SchedulingService, c7 as SenderType, c8 as Service, c9 as ServiceAvailabilityParams, ca as ServiceAvailabilityResult, cb as ServiceCharge, cc as ServiceNotes, cd as ServiceScheduleRequest, ce as ServiceStatus, cf as SessionActivityData, cg as SessionChangeEvent, ch as SessionChangeSource, ci as SessionMessage, cj as SlotResourceInfo, ck as SlotStaffInfo, cl as Staff, cm as StaffAssignment, cn as StaffRole, co as StaffScheduleItem, cp as StockLevel, cq as StockStatus, cr as StoreCreditBalance, cs as StoreCreditQueries, ct as StorefrontBootstrap, cu as SubscriptionService, cv as SupportService, cw as Table, cx as TimeRange, cy as TimeRanges, cz as TimeSlot, cA as TrackCategoryViewOptions, cB as TrackProductViewOptions, cC as UpdateOrderStatusInput, cD as UpdateProfileInput, cE as UploadInitResponse, cF as UploadResult, cG as UploadService, cH as combine, cI as combineObject, cJ as createCimplifyClient, cK as createDefaultPaymentAuthorizationAdapterRegistry, cL as createElements, cM as err, cN as flatMap, cO as fromPromise, cP as getOrElse, cQ as isErr, cR as isOk, cS as mapError, cT as mapResult, cU as ok, cV as toNullable, cW as tryCatch, cX as unwrap } from './catalogue-ChBjPPME.js';
|
|
3
|
+
export { c as clearPurchaseIntentIdempotencyKey, g as generateIdempotencyKey, i as purchaseIntentIdempotencyKey } from './index-Dn6xCpDe.js';
|
|
4
4
|
import { f as CheckoutPaymentMethodKind, g as CheckoutTermsView, h as PaymentOptionView, i as ConfirmPurchaseIntentRequest, e as ProductWithDetails, T as TaxPriceDisplayMode, P as Product, D as DurationUnit, A as ApiError } from './checkout-XoV4HNg2.js';
|
|
5
5
|
export { j as AUTHORIZATION_TYPE, k as AUTH_MUTATION, l as AbortablePromise, m as AddOn, n as AddOnDetails, o as AddOnGroupDetails, p as AddOnOption, q as AddOnOptionDetails, r as AddOnOptionPrice, s as AddOnWithOptions, t as AddToCartInput, u as AddressAuthorizationData, v as AddressData, w as AddressInfo, x as AddressValue, y as AdjustmentType, z as AppliedDiscount, B as AttributeAppliesTo, E as AttributeType, F as AttributeValidationRules, G as AttributeVisibility, H as AuthResponse, I as AuthenticatedCustomer, J as AuthenticatedData, K as AuthorizationType, L as BOUNDARY_KIND, M as BenefitType, N as BillingFrequency, O as BillingMarkupType, Q as BillingPlanType, R as BoundaryKind, V as Bundle, W as BundleComponentData, X as BundleComponentInfo, Y as BundleComponentVariantView, Z as BundleComponentView, _ as BundlePriceType, $ as BundleProduct, a0 as BundleSelectionData, a1 as BundleSelectionInput, a2 as BundleStoredSelection, a3 as BundleSummary, a4 as BundleWithDetails, a5 as CHECKOUT_COMPLIANCE_LANE, a6 as CHECKOUT_COMPLIANCE_REASON, a7 as CHECKOUT_INVALIDATION_REASON, a8 as CHECKOUT_MATERIAL_TERMS_COMPONENT, a9 as CHECKOUT_MODE, aa as CHECKOUT_MUTATION, ab as CHECKOUT_NEXT_ACTION, ac as CHECKOUT_ORDER_RESULT_STATUS, ad as CHECKOUT_PROTECTION_STATUS, ae as CHECKOUT_PURCHASE_SURFACE, af as CHECKOUT_STATUS, ag as CHECKOUT_STEP, ah as CHECKOUT_TERMS_COMPONENT, ai as CHECKOUT_TERMS_DELTA_KIND, aj as CONTACT_TYPE, ak as CanonicalSourceAuthority, al as Cart, am as CartAddOn, an as CartChannel, ao as CartIntentCheckoutInput, ap as CartItem, aq as CartItemDetails, ar as CartMutationResult, as as CartNotice, at as CartStatus, au as CartSummary, av as CartTotals, b as Category, aw as CategorySummary, ax as CheckoutAddressInfo, ay as CheckoutCartData, az as CheckoutCartItem, aA as CheckoutCollectionMethod, aB as CheckoutCollectionOption, aC as CheckoutCollectionOptions, aD as CheckoutComplianceDecision, aE as CheckoutComplianceLane, aF as CheckoutComplianceReasonCode, aG as CheckoutCustomerInfo, aH as CheckoutDestinationInput, aI as CheckoutFormData, aJ as CheckoutInvalidationReason, aK as CheckoutMaterialTerms, aL as CheckoutMaterialTermsComponent, aM as CheckoutMode, aN as CheckoutMoneyComponents, aO as CheckoutOfferKind, aP as CheckoutOrderType, aQ as CheckoutPaymentMethod, aR as CheckoutProtectionStatus, aS as CheckoutProtectionView, aT as CheckoutPurchaseSurface, aU as CheckoutResult, aV as CheckoutSourceKind, aW as CheckoutStatus, aX as CheckoutStatusContext, aY as CheckoutStep, aZ as CheckoutTermsComponent, a_ as CheckoutTermsDelta, a as ChosenPrice, c as CimplifyError, d as Collection, a$ as CollectionProduct, b0 as CollectionSummary, b1 as ComponentGroup, b2 as ComponentGroupWithComponents, b3 as ComponentPriceBreakdown, b4 as ComponentSchedulingData, b5 as ComponentSelectionInput, b6 as ComponentSourceType, b7 as Composite, b8 as CompositeComponent, b9 as CompositeComponentView, ba as CompositeGroupView, bb as CompositePriceBreakdown, bc as CompositePriceResult, bd as CompositePricingMode, be as CompositeSelectionData, b5 as CompositeSelectionInput, bf as CompositeStoredSelection, bg as CompositeWithDetails, bh as ConfirmPurchaseIntentResponse, bi as ContactType, bj as CreateAddressInput, bk as CreateMobileMoneyInput, C as CurrencyCode, bl as CustomAttributeDefinition, bm as CustomAttributeValue, bn as Customer, bo as CustomerAddress, bp as CustomerInputValue, bq as CustomerLinkPreferences, br as CustomerMobileMoney, bs as DEFAULT_COUNTRY, bt as DEFAULT_CURRENCY, bu as DEVICE_TYPE, bv as DURATION_UNIT, bw as DateRangeValue, bx as Deal, by as DealBenefitType, bz as DepositType, bA as DestinationQuote, bB as DestinationQuoteAddress, bC as DestinationQuoteInput, bD as DeviceType, bE as DigitalProductType, bF as DiscountBreakdown, bG as DiscountDetails, bH as DiscountValidation, bI as DisplayAddOn, bJ as DisplayAddOnOption, bK as DisplayCart, bL as DisplayCartItem, bM as DisplayMode, bN as ELEMENTS_AUTH_CONTACT_TYPES, bO as ELEMENTS_AUTH_MODES, bP as ELEMENTS_AUTH_PROMPTS, bQ as ELEMENT_TYPES, bR as ERROR_HINTS, bS as EVENT_TYPES, bT as ElementAppearance, bU as ElementEventHandler, bV as ElementEventType, bW as ElementOptions, bX as ElementType, bY as ElementsAuthContactType, bZ as ElementsAuthMode, b_ as ElementsAuthOptions, b$ as ElementsAuthPrompt, c0 as ElementsCheckoutData, c1 as ElementsCheckoutResult, c2 as ElementsCustomerInfo, c3 as ElementsOptions, c4 as EligiblePlansQuery, c5 as EnrollAndLinkOrderInput, c6 as EnrollAndLinkOrderResult, c7 as EnrollmentData, c8 as ErrorCode, c9 as ErrorCodeType, ca as ErrorHint, cb as FacetValue, cc as FormattedPlanOption, cd as GroupPricingBehavior, ce as INPUT_FIELD_TYPE, cf as IdempotencyMismatchError, cg as IframeToParentMessage, ch as InitializePaymentResult, ci as InputFieldType, cj as InputFieldValidation, ck as InventoryType, cl as KnowledgeArticle, cm as LEGACY_CHECKOUT_PAYMENT_METHOD_ALIAS, cn as LEGACY_CHECKOUT_PAYMENT_STATUS, co as LINK_MUTATION, cp as LINK_QUERY, cq as LineConfiguration, cr as LinkData, cs as LinkEnrollResult, ct as LinkSession, cu as LinkStatusResult, cv as LocationProductPrice, cw as LocationValue, cx as MAX_PAYMENT_AUTHORIZATION_STEPS, cy as MESSAGE_TYPES, cz as MOBILE_MONEY_PROVIDER, cA as MOBILE_MONEY_TENDER_AUTHORITY_KIND, cB as MeasurementValue, cC as MintPurchaseIntentRequest, cD as MobileMoneyData, cE as MobileMoneyDetails, cF as MobileMoneyProvider, cG as MobileMoneyTenderPreference, cH as Money, cI as NATIVE_PURCHASE_PLATFORM, cJ as NativeAddOnSelection, cK as NativePurchasePlatform, cL as NextAction, cM as ORDER_MUTATION, cN as ORDER_TYPE, cO as OfferRef, cP as OrderType, cQ as PAYMENT_COLLECTION_MODE, cR as PAYMENT_INSTRUMENT_DISPLAY_KIND, cS as PAYMENT_METHOD, cT as PAYMENT_MUTATION, cU as PAYMENT_OPTION_NEXT_ACTION, cV as PAYMENT_OPTION_STATUS, cW as PAYMENT_STATE, cX as PICKUP_TIME_TYPE, cY as PRODUCT_TYPE, cZ as PURCHASE_DISPOSITION, c_ as PURCHASE_INTENT_ACTION_DECISION, c$ as PURCHASE_INTENT_CONFIRM_STATUS, d0 as PURCHASE_INTENT_ERROR_CODE, d1 as PURCHASE_INTENT_LINE_CONFIGURATION_KIND, d2 as PURCHASE_INTENT_MOBILE_MONEY_NETWORK, d3 as PURCHASE_INTENT_OFFER_KIND, d4 as PURCHASE_INTENT_PAYMENT_METHOD, d5 as PURCHASE_INTENT_PAYMENT_PROVIDER, d6 as PURCHASE_INTENT_RESOLUTION_KIND, d7 as PURCHASE_INTENT_RESOLVE_STATUS, d8 as PURCHASE_INTENT_SELLABLE_KIND, d9 as PURCHASE_INTENT_SOURCE_KIND, da as PURCHASE_INTENT_STATUS, db as PURCHASE_SURFACE, dc as PURCHASING_PRINCIPAL_KIND, dd as Pagination, de as PaginationParams, df as ParentToIframeMessage, dg as Payment, dh as PaymentAuthorizationKind, di as PaymentAuthorizationSubmission, dj as PaymentCollectionMode, dk as PaymentErrorDetails, dl as PaymentInstrumentDisplay, dm as PaymentMethod, dn as PaymentMethodInfo, dp as PaymentMethodType, dq as PaymentNextActionKind, dr as PaymentOptionStatus, ds as PaymentProcessingState, dt as PaymentProvider, du as PaymentProviderKind, dv as PaymentResponse, dw as PaymentStatus, dx as PaymentStatusResponse, dy as PhoneValue, dz as PickupTime, dA as PickupTimeType, dB as PreparePurchaseIntentRequest, dC as Price, dD as PriceAdjustment, dE as PriceDecisionPath, dF as PriceEntryType, dG as PricePathTaxInfo, dH as PriceSource, dI as ProcessAndResolveOptions, dJ as ProcessCheckoutOptions, dK as ProcessCheckoutResult, dL as ProductAddOn, dM as ProductAvailability, dN as ProductAvailabilityNow, dO as ProductBillingPlan, dP as ProductDealInfo, dQ as ProductInputField, dR as ProductProperty, dS as ProductRenderHint, dT as ProductTaxonomy, dU as ProductTimeProfile, dV as ProductType, dW as ProductVariant, dX as ProductVariantValue, dY as PropertyFacet, dZ as PropertySource, d_ as PurchaseDisposition, d$ as PurchaseIntentActionResponse, e0 as PurchaseIntentCustomerInput, e1 as PurchaseIntentLineConfiguration, e2 as PurchaseIntentLineInput, e3 as PurchaseIntentLinePricingView, e4 as PurchaseIntentLineView, e5 as PurchaseIntentMobileMoneyNetwork, e6 as PurchaseIntentResolution, e7 as PurchaseIntentReviewResponse, e8 as PurchaseIntentSimpleLineConfiguration, e9 as PurchaseIntentSourceInput, ea as PurchaseIntentStatus, eb as PurchaseIntentTenderPreference, ec as PurchaseIntentTerminalResponse, ed as PurchaseIntentView, ee as PurchasePolicyContext, ef as PurchaseSurface, eg as PurchasingPrincipal, eh as QuantityPricingTier, ei as RENDER_HINT, ej as RefreshCheckoutTermsRequest, ek as RelatedProductView, el as RequestOtpInput, em as RequestOtpResult, en as RevokeAllSessionsResult, eo as RevokeSessionResult, ep as SaleCapInfo, S as SaleInfo, eq as SalesChannel, er as SchedulingMode, es as SelectedAddOnOption, et as SellableKind, eu as SellableRef, ev as SemanticKind, ew as SignatureValue, ex as SubmitAuthorizationInput, ey as SubmitPurchaseIntentActionRequest, ez as Subscription, eA as SubscriptionInvoice, eB as SubscriptionItem, eC as SubscriptionStatus, eD as SubscriptionWithDetails, eE as Tag, eF as TagsResponse, eG as TaxPathComponent, eH as TaxonomyAttributeTemplate, eI as TaxonomyWithChildren, eJ as UICart, eK as UICartBusiness, eL as UICartCustomer, eM as UICartLocation, eN as UICartPricing, eO as UnavailableLine, U as UpcomingSale, eP as UpdateAddressInput, eQ as UpdateCartItemInput, eR as VariantAxis, eS as VariantAxisSelection, eT as VariantAxisValue, eU as VariantAxisValueView, eV as VariantAxisView, eW as VariantAxisWithValues, eX as VariantDetails, eY as VariantDetailsDTO, eZ as VariantDisplayAttribute, e_ as VariantLocationAvailability, e$ as VariantStrategy, f0 as VariantView, f1 as VerifyOtpInput, f2 as ZERO, f3 as currencyCode, f4 as enrichError, f5 as getErrorHint, f6 as isCimplifyError, f7 as isIdempotencyMismatchError, f8 as isQuoteConflictRequiringConsent, f9 as isQuoteError, fa as isRetryableError, fb as isSupportedCurrency, fc as money, fd as moneyFromNumber } from './checkout-XoV4HNg2.js';
|
|
6
6
|
export { C as CURRENCY_SYMBOLS, a as CanonicalMobileMoneyProvider, M as MOBILE_MONEY_PROVIDERS, P as PAYMENT_TERMINAL_FAILURE_STATUSES, c as canonicalMobileMoneyProvider, b as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, e as formatNumberCompact, g as formatPrice, h as formatPriceAdjustment, i as formatPriceCompact, j as formatPriceRange, k as formatPriceWithTax, l as formatProductPrice, m as getBasePrice, n as getCurrencySymbol, o as getDiscountPercentage, p as getDisplayPrice, q as getMarkupPercentage, r as getPriceRange, s as getProductCurrency, t as getTaxAmount, u as getUnitPriceAtQuantity, v as hasTaxInfo, w as isOnSale, x as isPaymentStatusFailure, y as isPaymentStatusRequiresAction, z as isPaymentStatusSuccess, A as isTaxInclusive, B as isValidPhoneForContext, D as normalizePaymentResponse, E as normalizePhoneToE164, F as normalizeStatusResponse, G as parsePrice, H as paymentAuthorizationUrl, I as purchaseIntentMobileMoneyNetwork, J as resolvePhoneCountryCode } from './index-DweR60Cv.js';
|