@cimplify/sdk 0.8.0 → 0.8.2
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/advanced.js +41 -5
- package/dist/advanced.mjs +41 -5
- package/dist/{client-tMD3aBuM.d.ts → client-1fzEx2NA.d.ts} +41 -1
- package/dist/{client-I-utsHva.d.mts → client-Bm2VkZJq.d.mts} +41 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +171 -110
- package/dist/index.mjs +171 -110
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +419 -301
- package/dist/react.mjs +208 -94
- package/package.json +1 -1
package/dist/advanced.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-Bm2VkZJq.mjs';
|
|
2
2
|
import './payment-CLIWNMaP.mjs';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
package/dist/advanced.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-1fzEx2NA.js';
|
|
2
2
|
import './payment-CLIWNMaP.js';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
package/dist/advanced.js
CHANGED
|
@@ -601,6 +601,13 @@ var CartOperations = class {
|
|
|
601
601
|
}
|
|
602
602
|
};
|
|
603
603
|
|
|
604
|
+
// src/constants.ts
|
|
605
|
+
var MOBILE_MONEY_PROVIDER = {
|
|
606
|
+
MTN: "mtn",
|
|
607
|
+
VODAFONE: "vodafone",
|
|
608
|
+
AIRTEL: "airtel"
|
|
609
|
+
};
|
|
610
|
+
|
|
604
611
|
// src/utils/payment.ts
|
|
605
612
|
var PAYMENT_SUCCESS_STATUSES = /* @__PURE__ */ new Set([
|
|
606
613
|
"success",
|
|
@@ -826,6 +833,10 @@ async function openCardPopup(provider, checkoutResult, email, currency, signal)
|
|
|
826
833
|
}
|
|
827
834
|
return { success: false, error: "PROVIDER_UNAVAILABLE" };
|
|
828
835
|
}
|
|
836
|
+
var VALID_MOBILE_MONEY_PROVIDERS = new Set(Object.values(MOBILE_MONEY_PROVIDER));
|
|
837
|
+
function isValidMobileMoneyProvider(value) {
|
|
838
|
+
return VALID_MOBILE_MONEY_PROVIDERS.has(value);
|
|
839
|
+
}
|
|
829
840
|
function normalizeAuthorizationType(value) {
|
|
830
841
|
return value === "otp" || value === "pin" ? value : void 0;
|
|
831
842
|
}
|
|
@@ -1058,6 +1069,16 @@ var CheckoutResolver = class {
|
|
|
1058
1069
|
}
|
|
1059
1070
|
await this.wait(this.pollIntervalMs);
|
|
1060
1071
|
}
|
|
1072
|
+
try {
|
|
1073
|
+
const finalResult = await this.client.checkout.pollPaymentStatus(input.orderId);
|
|
1074
|
+
if (finalResult.ok) {
|
|
1075
|
+
const normalized = normalizeStatusResponse(finalResult.value);
|
|
1076
|
+
if (normalized.paid || isPaymentStatusSuccess(normalized.status)) {
|
|
1077
|
+
return this.finalizeSuccess(latestCheckoutResult);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
} catch {
|
|
1081
|
+
}
|
|
1061
1082
|
return this.fail(
|
|
1062
1083
|
"PAYMENT_TIMEOUT",
|
|
1063
1084
|
"Payment confirmation timed out. Please retry checkout.",
|
|
@@ -1188,7 +1209,7 @@ var CheckoutResolver = class {
|
|
|
1188
1209
|
};
|
|
1189
1210
|
}
|
|
1190
1211
|
getEnrollmentMobileMoney() {
|
|
1191
|
-
if (this.paymentData?.type === "mobile_money" && this.paymentData.phone_number && this.paymentData.provider) {
|
|
1212
|
+
if (this.paymentData?.type === "mobile_money" && this.paymentData.phone_number && this.paymentData.provider && isValidMobileMoneyProvider(this.paymentData.provider)) {
|
|
1192
1213
|
return {
|
|
1193
1214
|
phone_number: this.paymentData.phone_number,
|
|
1194
1215
|
provider: this.paymentData.provider,
|
|
@@ -2143,6 +2164,7 @@ var MESSAGE_TYPES = {
|
|
|
2143
2164
|
// Parent → Iframe
|
|
2144
2165
|
INIT: "init",
|
|
2145
2166
|
SET_TOKEN: "set_token",
|
|
2167
|
+
SET_CART: "set_cart",
|
|
2146
2168
|
GET_DATA: "get_data",
|
|
2147
2169
|
REFRESH_TOKEN: "refresh_token",
|
|
2148
2170
|
LOGOUT: "logout",
|
|
@@ -2162,7 +2184,8 @@ var MESSAGE_TYPES = {
|
|
|
2162
2184
|
CONTACT_PROVIDED: "contact_provided",
|
|
2163
2185
|
CHECKOUT_STATUS: "checkout_status",
|
|
2164
2186
|
CHECKOUT_COMPLETE: "checkout_complete",
|
|
2165
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2187
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2188
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2166
2189
|
};
|
|
2167
2190
|
var EVENT_TYPES = {
|
|
2168
2191
|
READY: "ready",
|
|
@@ -2172,7 +2195,8 @@ var EVENT_TYPES = {
|
|
|
2172
2195
|
CHANGE: "change",
|
|
2173
2196
|
BLUR: "blur",
|
|
2174
2197
|
FOCUS: "focus",
|
|
2175
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2198
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2199
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2176
2200
|
};
|
|
2177
2201
|
|
|
2178
2202
|
// src/elements.ts
|
|
@@ -2305,8 +2329,10 @@ var CimplifyElements = class {
|
|
|
2305
2329
|
false
|
|
2306
2330
|
);
|
|
2307
2331
|
}
|
|
2332
|
+
this.checkoutInProgress = true;
|
|
2308
2333
|
if (!options.cart_id) {
|
|
2309
2334
|
console.debug("[cimplify:checkout] BLOCKED: no cart_id");
|
|
2335
|
+
this.checkoutInProgress = false;
|
|
2310
2336
|
return toCheckoutError(
|
|
2311
2337
|
"INVALID_CART",
|
|
2312
2338
|
"A valid cart is required before checkout can start.",
|
|
@@ -2315,6 +2341,7 @@ var CimplifyElements = class {
|
|
|
2315
2341
|
}
|
|
2316
2342
|
if (!options.order_type) {
|
|
2317
2343
|
console.debug("[cimplify:checkout] BLOCKED: no order_type");
|
|
2344
|
+
this.checkoutInProgress = false;
|
|
2318
2345
|
return toCheckoutError(
|
|
2319
2346
|
"ORDER_TYPE_REQUIRED",
|
|
2320
2347
|
"Order type is required before checkout can start.",
|
|
@@ -2324,6 +2351,7 @@ var CimplifyElements = class {
|
|
|
2324
2351
|
const checkoutElement = this.elements.get(ELEMENT_TYPES.CHECKOUT) || this.elements.get(ELEMENT_TYPES.PAYMENT);
|
|
2325
2352
|
if (!checkoutElement) {
|
|
2326
2353
|
console.debug("[cimplify:checkout] BLOCKED: no checkout element");
|
|
2354
|
+
this.checkoutInProgress = false;
|
|
2327
2355
|
return toCheckoutError(
|
|
2328
2356
|
"NO_PAYMENT_ELEMENT",
|
|
2329
2357
|
"Checkout element must be mounted before checkout.",
|
|
@@ -2332,6 +2360,7 @@ var CimplifyElements = class {
|
|
|
2332
2360
|
}
|
|
2333
2361
|
if (!checkoutElement.isMounted()) {
|
|
2334
2362
|
console.debug("[cimplify:checkout] BLOCKED: checkout element not mounted");
|
|
2363
|
+
this.checkoutInProgress = false;
|
|
2335
2364
|
return toCheckoutError(
|
|
2336
2365
|
"PAYMENT_NOT_MOUNTED",
|
|
2337
2366
|
"Checkout element must be mounted before checkout.",
|
|
@@ -2343,6 +2372,7 @@ var CimplifyElements = class {
|
|
|
2343
2372
|
const authElement = this.elements.get(ELEMENT_TYPES.AUTH);
|
|
2344
2373
|
if (authElement && !this.accessToken) {
|
|
2345
2374
|
console.debug("[cimplify:checkout] BLOCKED: auth incomplete");
|
|
2375
|
+
this.checkoutInProgress = false;
|
|
2346
2376
|
return toCheckoutError(
|
|
2347
2377
|
"AUTH_INCOMPLETE",
|
|
2348
2378
|
"Authentication must complete before checkout can start.",
|
|
@@ -2380,7 +2410,6 @@ var CimplifyElements = class {
|
|
|
2380
2410
|
};
|
|
2381
2411
|
const timeoutMs = options.timeout_ms ?? 18e4;
|
|
2382
2412
|
const paymentWindow = checkoutElement.getContentWindow();
|
|
2383
|
-
this.checkoutInProgress = true;
|
|
2384
2413
|
return new Promise((resolve) => {
|
|
2385
2414
|
let settled = false;
|
|
2386
2415
|
const cleanup = () => {
|
|
@@ -2675,6 +2704,9 @@ var CimplifyElement = class {
|
|
|
2675
2704
|
this.sendMessage({ type: MESSAGE_TYPES.GET_DATA });
|
|
2676
2705
|
});
|
|
2677
2706
|
}
|
|
2707
|
+
setCart(cart) {
|
|
2708
|
+
this.sendMessage({ type: MESSAGE_TYPES.SET_CART, cart });
|
|
2709
|
+
}
|
|
2678
2710
|
sendMessage(message) {
|
|
2679
2711
|
if (this.iframe?.contentWindow) {
|
|
2680
2712
|
this.iframe.contentWindow.postMessage(message, this.linkUrl);
|
|
@@ -2730,7 +2762,8 @@ var CimplifyElement = class {
|
|
|
2730
2762
|
prefillEmail: this.options.prefillEmail,
|
|
2731
2763
|
appearance: this.parent.getAppearance(),
|
|
2732
2764
|
orderTypes: this.options.orderTypes,
|
|
2733
|
-
defaultOrderType: this.options.defaultOrderType
|
|
2765
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
2766
|
+
renderSubmitButton: true
|
|
2734
2767
|
});
|
|
2735
2768
|
const token = this.parent.getAccessToken();
|
|
2736
2769
|
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
@@ -2797,6 +2830,9 @@ var CimplifyElement = class {
|
|
|
2797
2830
|
case MESSAGE_TYPES.ORDER_TYPE_CHANGED:
|
|
2798
2831
|
this.emit(EVENT_TYPES.ORDER_TYPE_CHANGED, { orderType: message.orderType });
|
|
2799
2832
|
break;
|
|
2833
|
+
case MESSAGE_TYPES.REQUEST_SUBMIT:
|
|
2834
|
+
this.emit(EVENT_TYPES.REQUEST_SUBMIT, {});
|
|
2835
|
+
break;
|
|
2800
2836
|
}
|
|
2801
2837
|
}
|
|
2802
2838
|
emit(event, data) {
|
package/dist/advanced.mjs
CHANGED
|
@@ -599,6 +599,13 @@ var CartOperations = class {
|
|
|
599
599
|
}
|
|
600
600
|
};
|
|
601
601
|
|
|
602
|
+
// src/constants.ts
|
|
603
|
+
var MOBILE_MONEY_PROVIDER = {
|
|
604
|
+
MTN: "mtn",
|
|
605
|
+
VODAFONE: "vodafone",
|
|
606
|
+
AIRTEL: "airtel"
|
|
607
|
+
};
|
|
608
|
+
|
|
602
609
|
// src/utils/payment.ts
|
|
603
610
|
var PAYMENT_SUCCESS_STATUSES = /* @__PURE__ */ new Set([
|
|
604
611
|
"success",
|
|
@@ -824,6 +831,10 @@ async function openCardPopup(provider, checkoutResult, email, currency, signal)
|
|
|
824
831
|
}
|
|
825
832
|
return { success: false, error: "PROVIDER_UNAVAILABLE" };
|
|
826
833
|
}
|
|
834
|
+
var VALID_MOBILE_MONEY_PROVIDERS = new Set(Object.values(MOBILE_MONEY_PROVIDER));
|
|
835
|
+
function isValidMobileMoneyProvider(value) {
|
|
836
|
+
return VALID_MOBILE_MONEY_PROVIDERS.has(value);
|
|
837
|
+
}
|
|
827
838
|
function normalizeAuthorizationType(value) {
|
|
828
839
|
return value === "otp" || value === "pin" ? value : void 0;
|
|
829
840
|
}
|
|
@@ -1056,6 +1067,16 @@ var CheckoutResolver = class {
|
|
|
1056
1067
|
}
|
|
1057
1068
|
await this.wait(this.pollIntervalMs);
|
|
1058
1069
|
}
|
|
1070
|
+
try {
|
|
1071
|
+
const finalResult = await this.client.checkout.pollPaymentStatus(input.orderId);
|
|
1072
|
+
if (finalResult.ok) {
|
|
1073
|
+
const normalized = normalizeStatusResponse(finalResult.value);
|
|
1074
|
+
if (normalized.paid || isPaymentStatusSuccess(normalized.status)) {
|
|
1075
|
+
return this.finalizeSuccess(latestCheckoutResult);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
} catch {
|
|
1079
|
+
}
|
|
1059
1080
|
return this.fail(
|
|
1060
1081
|
"PAYMENT_TIMEOUT",
|
|
1061
1082
|
"Payment confirmation timed out. Please retry checkout.",
|
|
@@ -1186,7 +1207,7 @@ var CheckoutResolver = class {
|
|
|
1186
1207
|
};
|
|
1187
1208
|
}
|
|
1188
1209
|
getEnrollmentMobileMoney() {
|
|
1189
|
-
if (this.paymentData?.type === "mobile_money" && this.paymentData.phone_number && this.paymentData.provider) {
|
|
1210
|
+
if (this.paymentData?.type === "mobile_money" && this.paymentData.phone_number && this.paymentData.provider && isValidMobileMoneyProvider(this.paymentData.provider)) {
|
|
1190
1211
|
return {
|
|
1191
1212
|
phone_number: this.paymentData.phone_number,
|
|
1192
1213
|
provider: this.paymentData.provider,
|
|
@@ -2141,6 +2162,7 @@ var MESSAGE_TYPES = {
|
|
|
2141
2162
|
// Parent → Iframe
|
|
2142
2163
|
INIT: "init",
|
|
2143
2164
|
SET_TOKEN: "set_token",
|
|
2165
|
+
SET_CART: "set_cart",
|
|
2144
2166
|
GET_DATA: "get_data",
|
|
2145
2167
|
REFRESH_TOKEN: "refresh_token",
|
|
2146
2168
|
LOGOUT: "logout",
|
|
@@ -2160,7 +2182,8 @@ var MESSAGE_TYPES = {
|
|
|
2160
2182
|
CONTACT_PROVIDED: "contact_provided",
|
|
2161
2183
|
CHECKOUT_STATUS: "checkout_status",
|
|
2162
2184
|
CHECKOUT_COMPLETE: "checkout_complete",
|
|
2163
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2185
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2186
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2164
2187
|
};
|
|
2165
2188
|
var EVENT_TYPES = {
|
|
2166
2189
|
READY: "ready",
|
|
@@ -2170,7 +2193,8 @@ var EVENT_TYPES = {
|
|
|
2170
2193
|
CHANGE: "change",
|
|
2171
2194
|
BLUR: "blur",
|
|
2172
2195
|
FOCUS: "focus",
|
|
2173
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2196
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2197
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2174
2198
|
};
|
|
2175
2199
|
|
|
2176
2200
|
// src/elements.ts
|
|
@@ -2303,8 +2327,10 @@ var CimplifyElements = class {
|
|
|
2303
2327
|
false
|
|
2304
2328
|
);
|
|
2305
2329
|
}
|
|
2330
|
+
this.checkoutInProgress = true;
|
|
2306
2331
|
if (!options.cart_id) {
|
|
2307
2332
|
console.debug("[cimplify:checkout] BLOCKED: no cart_id");
|
|
2333
|
+
this.checkoutInProgress = false;
|
|
2308
2334
|
return toCheckoutError(
|
|
2309
2335
|
"INVALID_CART",
|
|
2310
2336
|
"A valid cart is required before checkout can start.",
|
|
@@ -2313,6 +2339,7 @@ var CimplifyElements = class {
|
|
|
2313
2339
|
}
|
|
2314
2340
|
if (!options.order_type) {
|
|
2315
2341
|
console.debug("[cimplify:checkout] BLOCKED: no order_type");
|
|
2342
|
+
this.checkoutInProgress = false;
|
|
2316
2343
|
return toCheckoutError(
|
|
2317
2344
|
"ORDER_TYPE_REQUIRED",
|
|
2318
2345
|
"Order type is required before checkout can start.",
|
|
@@ -2322,6 +2349,7 @@ var CimplifyElements = class {
|
|
|
2322
2349
|
const checkoutElement = this.elements.get(ELEMENT_TYPES.CHECKOUT) || this.elements.get(ELEMENT_TYPES.PAYMENT);
|
|
2323
2350
|
if (!checkoutElement) {
|
|
2324
2351
|
console.debug("[cimplify:checkout] BLOCKED: no checkout element");
|
|
2352
|
+
this.checkoutInProgress = false;
|
|
2325
2353
|
return toCheckoutError(
|
|
2326
2354
|
"NO_PAYMENT_ELEMENT",
|
|
2327
2355
|
"Checkout element must be mounted before checkout.",
|
|
@@ -2330,6 +2358,7 @@ var CimplifyElements = class {
|
|
|
2330
2358
|
}
|
|
2331
2359
|
if (!checkoutElement.isMounted()) {
|
|
2332
2360
|
console.debug("[cimplify:checkout] BLOCKED: checkout element not mounted");
|
|
2361
|
+
this.checkoutInProgress = false;
|
|
2333
2362
|
return toCheckoutError(
|
|
2334
2363
|
"PAYMENT_NOT_MOUNTED",
|
|
2335
2364
|
"Checkout element must be mounted before checkout.",
|
|
@@ -2341,6 +2370,7 @@ var CimplifyElements = class {
|
|
|
2341
2370
|
const authElement = this.elements.get(ELEMENT_TYPES.AUTH);
|
|
2342
2371
|
if (authElement && !this.accessToken) {
|
|
2343
2372
|
console.debug("[cimplify:checkout] BLOCKED: auth incomplete");
|
|
2373
|
+
this.checkoutInProgress = false;
|
|
2344
2374
|
return toCheckoutError(
|
|
2345
2375
|
"AUTH_INCOMPLETE",
|
|
2346
2376
|
"Authentication must complete before checkout can start.",
|
|
@@ -2378,7 +2408,6 @@ var CimplifyElements = class {
|
|
|
2378
2408
|
};
|
|
2379
2409
|
const timeoutMs = options.timeout_ms ?? 18e4;
|
|
2380
2410
|
const paymentWindow = checkoutElement.getContentWindow();
|
|
2381
|
-
this.checkoutInProgress = true;
|
|
2382
2411
|
return new Promise((resolve) => {
|
|
2383
2412
|
let settled = false;
|
|
2384
2413
|
const cleanup = () => {
|
|
@@ -2673,6 +2702,9 @@ var CimplifyElement = class {
|
|
|
2673
2702
|
this.sendMessage({ type: MESSAGE_TYPES.GET_DATA });
|
|
2674
2703
|
});
|
|
2675
2704
|
}
|
|
2705
|
+
setCart(cart) {
|
|
2706
|
+
this.sendMessage({ type: MESSAGE_TYPES.SET_CART, cart });
|
|
2707
|
+
}
|
|
2676
2708
|
sendMessage(message) {
|
|
2677
2709
|
if (this.iframe?.contentWindow) {
|
|
2678
2710
|
this.iframe.contentWindow.postMessage(message, this.linkUrl);
|
|
@@ -2728,7 +2760,8 @@ var CimplifyElement = class {
|
|
|
2728
2760
|
prefillEmail: this.options.prefillEmail,
|
|
2729
2761
|
appearance: this.parent.getAppearance(),
|
|
2730
2762
|
orderTypes: this.options.orderTypes,
|
|
2731
|
-
defaultOrderType: this.options.defaultOrderType
|
|
2763
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
2764
|
+
renderSubmitButton: true
|
|
2732
2765
|
});
|
|
2733
2766
|
const token = this.parent.getAccessToken();
|
|
2734
2767
|
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
@@ -2795,6 +2828,9 @@ var CimplifyElement = class {
|
|
|
2795
2828
|
case MESSAGE_TYPES.ORDER_TYPE_CHANGED:
|
|
2796
2829
|
this.emit(EVENT_TYPES.ORDER_TYPE_CHANGED, { orderType: message.orderType });
|
|
2797
2830
|
break;
|
|
2831
|
+
case MESSAGE_TYPES.REQUEST_SUBMIT:
|
|
2832
|
+
this.emit(EVENT_TYPES.REQUEST_SUBMIT, {});
|
|
2833
|
+
break;
|
|
2798
2834
|
}
|
|
2799
2835
|
}
|
|
2800
2836
|
emit(event, data) {
|
|
@@ -1894,6 +1894,7 @@ type ElementType = (typeof ELEMENT_TYPES)[keyof typeof ELEMENT_TYPES];
|
|
|
1894
1894
|
declare const MESSAGE_TYPES: {
|
|
1895
1895
|
readonly INIT: "init";
|
|
1896
1896
|
readonly SET_TOKEN: "set_token";
|
|
1897
|
+
readonly SET_CART: "set_cart";
|
|
1897
1898
|
readonly GET_DATA: "get_data";
|
|
1898
1899
|
readonly REFRESH_TOKEN: "refresh_token";
|
|
1899
1900
|
readonly LOGOUT: "logout";
|
|
@@ -1913,6 +1914,7 @@ declare const MESSAGE_TYPES: {
|
|
|
1913
1914
|
readonly CHECKOUT_STATUS: "checkout_status";
|
|
1914
1915
|
readonly CHECKOUT_COMPLETE: "checkout_complete";
|
|
1915
1916
|
readonly ORDER_TYPE_CHANGED: "order_type_changed";
|
|
1917
|
+
readonly REQUEST_SUBMIT: "request_submit";
|
|
1916
1918
|
};
|
|
1917
1919
|
interface ElementsOptions {
|
|
1918
1920
|
linkUrl?: string;
|
|
@@ -1989,6 +1991,36 @@ interface ElementsCheckoutResult {
|
|
|
1989
1991
|
message: string;
|
|
1990
1992
|
};
|
|
1991
1993
|
}
|
|
1994
|
+
interface CheckoutCartItem {
|
|
1995
|
+
name: string;
|
|
1996
|
+
quantity: number;
|
|
1997
|
+
unit_price: string;
|
|
1998
|
+
total_price: string;
|
|
1999
|
+
image_url?: string;
|
|
2000
|
+
line_type: "simple" | "service" | "bundle" | "composite" | "digital";
|
|
2001
|
+
variant_name?: string;
|
|
2002
|
+
scheduled_start?: string;
|
|
2003
|
+
scheduled_end?: string;
|
|
2004
|
+
selections?: {
|
|
2005
|
+
name: string;
|
|
2006
|
+
quantity: number;
|
|
2007
|
+
variant_name?: string;
|
|
2008
|
+
}[];
|
|
2009
|
+
add_ons?: {
|
|
2010
|
+
name: string;
|
|
2011
|
+
price: string;
|
|
2012
|
+
}[];
|
|
2013
|
+
special_instructions?: string;
|
|
2014
|
+
}
|
|
2015
|
+
interface CheckoutCartData {
|
|
2016
|
+
items: CheckoutCartItem[];
|
|
2017
|
+
subtotal: string;
|
|
2018
|
+
tax_amount: string;
|
|
2019
|
+
total_discounts: string;
|
|
2020
|
+
service_charge: string;
|
|
2021
|
+
total: string;
|
|
2022
|
+
currency: string;
|
|
2023
|
+
}
|
|
1992
2024
|
type ParentToIframeMessage = {
|
|
1993
2025
|
type: typeof MESSAGE_TYPES.INIT;
|
|
1994
2026
|
businessId: string;
|
|
@@ -1998,9 +2030,13 @@ type ParentToIframeMessage = {
|
|
|
1998
2030
|
appearance?: ElementAppearance;
|
|
1999
2031
|
orderTypes?: OrderType[];
|
|
2000
2032
|
defaultOrderType?: OrderType;
|
|
2033
|
+
renderSubmitButton?: boolean;
|
|
2001
2034
|
} | {
|
|
2002
2035
|
type: typeof MESSAGE_TYPES.SET_TOKEN;
|
|
2003
2036
|
token: string;
|
|
2037
|
+
} | {
|
|
2038
|
+
type: typeof MESSAGE_TYPES.SET_CART;
|
|
2039
|
+
cart: CheckoutCartData;
|
|
2004
2040
|
} | {
|
|
2005
2041
|
type: typeof MESSAGE_TYPES.GET_DATA;
|
|
2006
2042
|
} | {
|
|
@@ -2086,6 +2122,8 @@ type IframeToParentMessage = {
|
|
|
2086
2122
|
} | {
|
|
2087
2123
|
type: typeof MESSAGE_TYPES.ORDER_TYPE_CHANGED;
|
|
2088
2124
|
orderType: OrderType;
|
|
2125
|
+
} | {
|
|
2126
|
+
type: typeof MESSAGE_TYPES.REQUEST_SUBMIT;
|
|
2089
2127
|
};
|
|
2090
2128
|
declare const EVENT_TYPES: {
|
|
2091
2129
|
readonly READY: "ready";
|
|
@@ -2096,6 +2134,7 @@ declare const EVENT_TYPES: {
|
|
|
2096
2134
|
readonly BLUR: "blur";
|
|
2097
2135
|
readonly FOCUS: "focus";
|
|
2098
2136
|
readonly ORDER_TYPE_CHANGED: "order_type_changed";
|
|
2137
|
+
readonly REQUEST_SUBMIT: "request_submit";
|
|
2099
2138
|
};
|
|
2100
2139
|
type ElementEventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES];
|
|
2101
2140
|
type ElementEventHandler<T = unknown> = (data: T) => void;
|
|
@@ -2155,6 +2194,7 @@ declare class CimplifyElement {
|
|
|
2155
2194
|
on(event: ElementEventType, handler: ElementEventHandler): void;
|
|
2156
2195
|
off(event: ElementEventType, handler: ElementEventHandler): void;
|
|
2157
2196
|
getData(): Promise<unknown>;
|
|
2197
|
+
setCart(cart: CheckoutCartData): void;
|
|
2158
2198
|
sendMessage(message: ParentToIframeMessage): void;
|
|
2159
2199
|
getContentWindow(): Window | null;
|
|
2160
2200
|
isMounted(): boolean;
|
|
@@ -2280,4 +2320,4 @@ declare class CimplifyClient {
|
|
|
2280
2320
|
}
|
|
2281
2321
|
declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
|
|
2282
2322
|
|
|
2283
|
-
export { type AbortablePromise as $, AuthService as A, BusinessService as B, CimplifyClient as C, type CheckoutMode as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type CheckoutOrderType as H, InventoryService as I, type CheckoutPaymentMethod as J, type CheckoutStep as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutFormData as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutResult as V, type ProcessCheckoutOptions as W, type ProcessCheckoutResult as X, type ProcessAndResolveOptions as Y, type CheckoutStatus as Z, type CheckoutStatusContext as _, type CimplifyConfig as a, type CheckoutInput as a$, type MobileMoneyProvider as a0, type DeviceType as a1, type ContactType as a2, CHECKOUT_MODE as a3, ORDER_TYPE as a4, PAYMENT_METHOD as a5, CHECKOUT_STEP as a6, PAYMENT_STATE as a7, PICKUP_TIME_TYPE as a8, MOBILE_MONEY_PROVIDER as a9, combine as aA, combineObject as aB, type CatalogueResult as aC, type CatalogueSnapshot as aD, type OrderStatus as aE, type PaymentState as aF, type OrderChannel as aG, type LineType as aH, type OrderLineState as aI, type OrderLineStatus as aJ, type FulfillmentType as aK, type FulfillmentStatus as aL, type FulfillmentLink as aM, type OrderFulfillmentSummary as aN, type FeeBearerType as aO, type AmountToPay as aP, type LineItem as aQ, type Order as aR, type OrderHistory as aS, type OrderGroupPaymentState as aT, type OrderGroup as aU, type OrderGroupPayment as aV, type OrderSplitDetail as aW, type OrderGroupPaymentSummary as aX, type OrderGroupDetails as aY, type OrderPaymentEvent as aZ, type OrderFilter as a_, AUTHORIZATION_TYPE as aa, DEVICE_TYPE as ab, CONTACT_TYPE as ac, LINK_QUERY as ad, LINK_MUTATION as ae, AUTH_MUTATION as af, CHECKOUT_MUTATION as ag, PAYMENT_MUTATION as ah, ORDER_MUTATION as ai, DEFAULT_CURRENCY as aj, DEFAULT_COUNTRY as ak, type Result as al, type Ok as am, type Err as an, ok as ao, err as ap, isOk as aq, isErr as ar, mapResult as as, mapError as at, flatMap as au, getOrElse as av, unwrap as aw, toNullable as ax, fromPromise as ay, tryCatch as az, CatalogueQueries as b, type LocationStock as b$, type UpdateOrderStatusInput as b0, type CancelOrderInput as b1, type RefundOrderInput as b2, type ServiceStatus as b3, type StaffRole as b4, type ReminderMethod as b5, type CustomerServicePreferences as b6, type BufferTimes as b7, type ReminderSettings as b8, type CancellationPolicy as b9, type BusinessHours as bA, type CategoryInfo as bB, type Service as bC, type Staff as bD, type TimeSlot as bE, type AvailableSlot as bF, type DayAvailability as bG, type BookingStatus as bH, type Booking as bI, type BookingWithDetails as bJ, type CustomerBookingServiceItem as bK, type CustomerBooking as bL, type GetAvailableSlotsInput as bM, type CheckSlotAvailabilityInput as bN, type CheckSlotAvailabilityResult as bO, type RescheduleBookingInput as bP, type CancelBookingInput as bQ, type CancelBookingResult as bR, type RescheduleBookingResult as bS, type ServiceAvailabilityParams as bT, type ServiceAvailabilityResult as bU, type StockOwnershipType as bV, type StockStatus as bW, type Stock as bX, type StockLevel as bY, type ProductStock as bZ, type VariantStock as b_, type ServiceNotes as ba, type PricingOverrides as bb, type SchedulingMetadata as bc, type StaffAssignment as bd, type ResourceAssignment as be, type SchedulingResult as bf, type DepositResult as bg, type ServiceScheduleRequest as bh, type StaffScheduleItem as bi, type LocationAppointment as bj, type BusinessType as bk, type BusinessPreferences as bl, type Business as bm, type LocationTaxBehavior as bn, type LocationTaxOverrides as bo, type Location as bp, type TimeRange as bq, type TimeRanges as br, type LocationTimeProfile as bs, type Table as bt, type Room as bu, type ServiceCharge as bv, type StorefrontBootstrap as bw, type BusinessWithLocations as bx, type LocationWithDetails as by, type BusinessSettings as bz, createCimplifyClient as c, type AvailabilityCheck as c0, type AvailabilityResult as c1, type InventorySummary as c2, type Customer as c3, type CustomerAddress as c4, type CustomerMobileMoney as c5, type CustomerLinkPreferences as c6, type LinkData as c7, type CreateAddressInput as c8, type UpdateAddressInput as c9, type RetryEvent as cA, type SessionChangeEvent as cB, type ObservabilityHooks as cC, type OrderType as cD, type ElementAppearance as cE, type AddressInfo as cF, type PaymentMethodInfo as cG, type AuthenticatedCustomer as cH, type ElementsCustomerInfo as cI, type AuthenticatedData as cJ, type ElementsCheckoutData as cK, type ElementsCheckoutResult as cL, type
|
|
2323
|
+
export { type AbortablePromise as $, AuthService as A, BusinessService as B, CimplifyClient as C, type CheckoutMode as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type CheckoutOrderType as H, InventoryService as I, type CheckoutPaymentMethod as J, type CheckoutStep as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutFormData as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutResult as V, type ProcessCheckoutOptions as W, type ProcessCheckoutResult as X, type ProcessAndResolveOptions as Y, type CheckoutStatus as Z, type CheckoutStatusContext as _, type CimplifyConfig as a, type CheckoutInput as a$, type MobileMoneyProvider as a0, type DeviceType as a1, type ContactType as a2, CHECKOUT_MODE as a3, ORDER_TYPE as a4, PAYMENT_METHOD as a5, CHECKOUT_STEP as a6, PAYMENT_STATE as a7, PICKUP_TIME_TYPE as a8, MOBILE_MONEY_PROVIDER as a9, combine as aA, combineObject as aB, type CatalogueResult as aC, type CatalogueSnapshot as aD, type OrderStatus as aE, type PaymentState as aF, type OrderChannel as aG, type LineType as aH, type OrderLineState as aI, type OrderLineStatus as aJ, type FulfillmentType as aK, type FulfillmentStatus as aL, type FulfillmentLink as aM, type OrderFulfillmentSummary as aN, type FeeBearerType as aO, type AmountToPay as aP, type LineItem as aQ, type Order as aR, type OrderHistory as aS, type OrderGroupPaymentState as aT, type OrderGroup as aU, type OrderGroupPayment as aV, type OrderSplitDetail as aW, type OrderGroupPaymentSummary as aX, type OrderGroupDetails as aY, type OrderPaymentEvent as aZ, type OrderFilter as a_, AUTHORIZATION_TYPE as aa, DEVICE_TYPE as ab, CONTACT_TYPE as ac, LINK_QUERY as ad, LINK_MUTATION as ae, AUTH_MUTATION as af, CHECKOUT_MUTATION as ag, PAYMENT_MUTATION as ah, ORDER_MUTATION as ai, DEFAULT_CURRENCY as aj, DEFAULT_COUNTRY as ak, type Result as al, type Ok as am, type Err as an, ok as ao, err as ap, isOk as aq, isErr as ar, mapResult as as, mapError as at, flatMap as au, getOrElse as av, unwrap as aw, toNullable as ax, fromPromise as ay, tryCatch as az, CatalogueQueries as b, type LocationStock as b$, type UpdateOrderStatusInput as b0, type CancelOrderInput as b1, type RefundOrderInput as b2, type ServiceStatus as b3, type StaffRole as b4, type ReminderMethod as b5, type CustomerServicePreferences as b6, type BufferTimes as b7, type ReminderSettings as b8, type CancellationPolicy as b9, type BusinessHours as bA, type CategoryInfo as bB, type Service as bC, type Staff as bD, type TimeSlot as bE, type AvailableSlot as bF, type DayAvailability as bG, type BookingStatus as bH, type Booking as bI, type BookingWithDetails as bJ, type CustomerBookingServiceItem as bK, type CustomerBooking as bL, type GetAvailableSlotsInput as bM, type CheckSlotAvailabilityInput as bN, type CheckSlotAvailabilityResult as bO, type RescheduleBookingInput as bP, type CancelBookingInput as bQ, type CancelBookingResult as bR, type RescheduleBookingResult as bS, type ServiceAvailabilityParams as bT, type ServiceAvailabilityResult as bU, type StockOwnershipType as bV, type StockStatus as bW, type Stock as bX, type StockLevel as bY, type ProductStock as bZ, type VariantStock as b_, type ServiceNotes as ba, type PricingOverrides as bb, type SchedulingMetadata as bc, type StaffAssignment as bd, type ResourceAssignment as be, type SchedulingResult as bf, type DepositResult as bg, type ServiceScheduleRequest as bh, type StaffScheduleItem as bi, type LocationAppointment as bj, type BusinessType as bk, type BusinessPreferences as bl, type Business as bm, type LocationTaxBehavior as bn, type LocationTaxOverrides as bo, type Location as bp, type TimeRange as bq, type TimeRanges as br, type LocationTimeProfile as bs, type Table as bt, type Room as bu, type ServiceCharge as bv, type StorefrontBootstrap as bw, type BusinessWithLocations as bx, type LocationWithDetails as by, type BusinessSettings as bz, createCimplifyClient as c, type AvailabilityCheck as c0, type AvailabilityResult as c1, type InventorySummary as c2, type Customer as c3, type CustomerAddress as c4, type CustomerMobileMoney as c5, type CustomerLinkPreferences as c6, type LinkData as c7, type CreateAddressInput as c8, type UpdateAddressInput as c9, type RetryEvent as cA, type SessionChangeEvent as cB, type ObservabilityHooks as cC, type OrderType as cD, type ElementAppearance as cE, type AddressInfo as cF, type PaymentMethodInfo as cG, type AuthenticatedCustomer as cH, type ElementsCustomerInfo as cI, type AuthenticatedData as cJ, type ElementsCheckoutData as cK, type ElementsCheckoutResult as cL, type CheckoutCartItem as cM, type CheckoutCartData as cN, type ParentToIframeMessage as cO, type IframeToParentMessage as cP, type ElementEventHandler as cQ, type CreateMobileMoneyInput as ca, type EnrollmentData as cb, type AddressData as cc, type MobileMoneyData as cd, type EnrollAndLinkOrderInput as ce, type LinkStatusResult as cf, type LinkEnrollResult as cg, type EnrollAndLinkOrderResult as ch, type LinkSession as ci, type RevokeSessionResult as cj, type RevokeAllSessionsResult as ck, type RequestOtpInput as cl, type VerifyOtpInput as cm, type AuthResponse as cn, type PickupTimeType as co, type PickupTime as cp, type CheckoutAddressInfo as cq, type MobileMoneyDetails as cr, type CheckoutCustomerInfo as cs, type FxQuoteRequest as ct, type FxQuote as cu, type FxRateResponse as cv, type RequestContext as cw, type RequestStartEvent as cx, type RequestSuccessEvent as cy, type RequestErrorEvent as cz, type QuoteBundleSelectionInput as d, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RefreshQuoteResult as h, CartOperations as i, CheckoutService as j, generateIdempotencyKey as k, type GetOrdersOptions as l, type AuthStatus as m, type OtpResult as n, SchedulingService as o, LiteService as p, FxService as q, type LiteBootstrap as r, CimplifyElements as s, CimplifyElement as t, createElements as u, ELEMENT_TYPES as v, type ElementsOptions as w, type ElementOptions as x, type ElementType as y, type ElementEventType as z };
|
|
@@ -1894,6 +1894,7 @@ type ElementType = (typeof ELEMENT_TYPES)[keyof typeof ELEMENT_TYPES];
|
|
|
1894
1894
|
declare const MESSAGE_TYPES: {
|
|
1895
1895
|
readonly INIT: "init";
|
|
1896
1896
|
readonly SET_TOKEN: "set_token";
|
|
1897
|
+
readonly SET_CART: "set_cart";
|
|
1897
1898
|
readonly GET_DATA: "get_data";
|
|
1898
1899
|
readonly REFRESH_TOKEN: "refresh_token";
|
|
1899
1900
|
readonly LOGOUT: "logout";
|
|
@@ -1913,6 +1914,7 @@ declare const MESSAGE_TYPES: {
|
|
|
1913
1914
|
readonly CHECKOUT_STATUS: "checkout_status";
|
|
1914
1915
|
readonly CHECKOUT_COMPLETE: "checkout_complete";
|
|
1915
1916
|
readonly ORDER_TYPE_CHANGED: "order_type_changed";
|
|
1917
|
+
readonly REQUEST_SUBMIT: "request_submit";
|
|
1916
1918
|
};
|
|
1917
1919
|
interface ElementsOptions {
|
|
1918
1920
|
linkUrl?: string;
|
|
@@ -1989,6 +1991,36 @@ interface ElementsCheckoutResult {
|
|
|
1989
1991
|
message: string;
|
|
1990
1992
|
};
|
|
1991
1993
|
}
|
|
1994
|
+
interface CheckoutCartItem {
|
|
1995
|
+
name: string;
|
|
1996
|
+
quantity: number;
|
|
1997
|
+
unit_price: string;
|
|
1998
|
+
total_price: string;
|
|
1999
|
+
image_url?: string;
|
|
2000
|
+
line_type: "simple" | "service" | "bundle" | "composite" | "digital";
|
|
2001
|
+
variant_name?: string;
|
|
2002
|
+
scheduled_start?: string;
|
|
2003
|
+
scheduled_end?: string;
|
|
2004
|
+
selections?: {
|
|
2005
|
+
name: string;
|
|
2006
|
+
quantity: number;
|
|
2007
|
+
variant_name?: string;
|
|
2008
|
+
}[];
|
|
2009
|
+
add_ons?: {
|
|
2010
|
+
name: string;
|
|
2011
|
+
price: string;
|
|
2012
|
+
}[];
|
|
2013
|
+
special_instructions?: string;
|
|
2014
|
+
}
|
|
2015
|
+
interface CheckoutCartData {
|
|
2016
|
+
items: CheckoutCartItem[];
|
|
2017
|
+
subtotal: string;
|
|
2018
|
+
tax_amount: string;
|
|
2019
|
+
total_discounts: string;
|
|
2020
|
+
service_charge: string;
|
|
2021
|
+
total: string;
|
|
2022
|
+
currency: string;
|
|
2023
|
+
}
|
|
1992
2024
|
type ParentToIframeMessage = {
|
|
1993
2025
|
type: typeof MESSAGE_TYPES.INIT;
|
|
1994
2026
|
businessId: string;
|
|
@@ -1998,9 +2030,13 @@ type ParentToIframeMessage = {
|
|
|
1998
2030
|
appearance?: ElementAppearance;
|
|
1999
2031
|
orderTypes?: OrderType[];
|
|
2000
2032
|
defaultOrderType?: OrderType;
|
|
2033
|
+
renderSubmitButton?: boolean;
|
|
2001
2034
|
} | {
|
|
2002
2035
|
type: typeof MESSAGE_TYPES.SET_TOKEN;
|
|
2003
2036
|
token: string;
|
|
2037
|
+
} | {
|
|
2038
|
+
type: typeof MESSAGE_TYPES.SET_CART;
|
|
2039
|
+
cart: CheckoutCartData;
|
|
2004
2040
|
} | {
|
|
2005
2041
|
type: typeof MESSAGE_TYPES.GET_DATA;
|
|
2006
2042
|
} | {
|
|
@@ -2086,6 +2122,8 @@ type IframeToParentMessage = {
|
|
|
2086
2122
|
} | {
|
|
2087
2123
|
type: typeof MESSAGE_TYPES.ORDER_TYPE_CHANGED;
|
|
2088
2124
|
orderType: OrderType;
|
|
2125
|
+
} | {
|
|
2126
|
+
type: typeof MESSAGE_TYPES.REQUEST_SUBMIT;
|
|
2089
2127
|
};
|
|
2090
2128
|
declare const EVENT_TYPES: {
|
|
2091
2129
|
readonly READY: "ready";
|
|
@@ -2096,6 +2134,7 @@ declare const EVENT_TYPES: {
|
|
|
2096
2134
|
readonly BLUR: "blur";
|
|
2097
2135
|
readonly FOCUS: "focus";
|
|
2098
2136
|
readonly ORDER_TYPE_CHANGED: "order_type_changed";
|
|
2137
|
+
readonly REQUEST_SUBMIT: "request_submit";
|
|
2099
2138
|
};
|
|
2100
2139
|
type ElementEventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES];
|
|
2101
2140
|
type ElementEventHandler<T = unknown> = (data: T) => void;
|
|
@@ -2155,6 +2194,7 @@ declare class CimplifyElement {
|
|
|
2155
2194
|
on(event: ElementEventType, handler: ElementEventHandler): void;
|
|
2156
2195
|
off(event: ElementEventType, handler: ElementEventHandler): void;
|
|
2157
2196
|
getData(): Promise<unknown>;
|
|
2197
|
+
setCart(cart: CheckoutCartData): void;
|
|
2158
2198
|
sendMessage(message: ParentToIframeMessage): void;
|
|
2159
2199
|
getContentWindow(): Window | null;
|
|
2160
2200
|
isMounted(): boolean;
|
|
@@ -2280,4 +2320,4 @@ declare class CimplifyClient {
|
|
|
2280
2320
|
}
|
|
2281
2321
|
declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
|
|
2282
2322
|
|
|
2283
|
-
export { type AbortablePromise as $, AuthService as A, BusinessService as B, CimplifyClient as C, type CheckoutMode as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type CheckoutOrderType as H, InventoryService as I, type CheckoutPaymentMethod as J, type CheckoutStep as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutFormData as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutResult as V, type ProcessCheckoutOptions as W, type ProcessCheckoutResult as X, type ProcessAndResolveOptions as Y, type CheckoutStatus as Z, type CheckoutStatusContext as _, type CimplifyConfig as a, type CheckoutInput as a$, type MobileMoneyProvider as a0, type DeviceType as a1, type ContactType as a2, CHECKOUT_MODE as a3, ORDER_TYPE as a4, PAYMENT_METHOD as a5, CHECKOUT_STEP as a6, PAYMENT_STATE as a7, PICKUP_TIME_TYPE as a8, MOBILE_MONEY_PROVIDER as a9, combine as aA, combineObject as aB, type CatalogueResult as aC, type CatalogueSnapshot as aD, type OrderStatus as aE, type PaymentState as aF, type OrderChannel as aG, type LineType as aH, type OrderLineState as aI, type OrderLineStatus as aJ, type FulfillmentType as aK, type FulfillmentStatus as aL, type FulfillmentLink as aM, type OrderFulfillmentSummary as aN, type FeeBearerType as aO, type AmountToPay as aP, type LineItem as aQ, type Order as aR, type OrderHistory as aS, type OrderGroupPaymentState as aT, type OrderGroup as aU, type OrderGroupPayment as aV, type OrderSplitDetail as aW, type OrderGroupPaymentSummary as aX, type OrderGroupDetails as aY, type OrderPaymentEvent as aZ, type OrderFilter as a_, AUTHORIZATION_TYPE as aa, DEVICE_TYPE as ab, CONTACT_TYPE as ac, LINK_QUERY as ad, LINK_MUTATION as ae, AUTH_MUTATION as af, CHECKOUT_MUTATION as ag, PAYMENT_MUTATION as ah, ORDER_MUTATION as ai, DEFAULT_CURRENCY as aj, DEFAULT_COUNTRY as ak, type Result as al, type Ok as am, type Err as an, ok as ao, err as ap, isOk as aq, isErr as ar, mapResult as as, mapError as at, flatMap as au, getOrElse as av, unwrap as aw, toNullable as ax, fromPromise as ay, tryCatch as az, CatalogueQueries as b, type LocationStock as b$, type UpdateOrderStatusInput as b0, type CancelOrderInput as b1, type RefundOrderInput as b2, type ServiceStatus as b3, type StaffRole as b4, type ReminderMethod as b5, type CustomerServicePreferences as b6, type BufferTimes as b7, type ReminderSettings as b8, type CancellationPolicy as b9, type BusinessHours as bA, type CategoryInfo as bB, type Service as bC, type Staff as bD, type TimeSlot as bE, type AvailableSlot as bF, type DayAvailability as bG, type BookingStatus as bH, type Booking as bI, type BookingWithDetails as bJ, type CustomerBookingServiceItem as bK, type CustomerBooking as bL, type GetAvailableSlotsInput as bM, type CheckSlotAvailabilityInput as bN, type CheckSlotAvailabilityResult as bO, type RescheduleBookingInput as bP, type CancelBookingInput as bQ, type CancelBookingResult as bR, type RescheduleBookingResult as bS, type ServiceAvailabilityParams as bT, type ServiceAvailabilityResult as bU, type StockOwnershipType as bV, type StockStatus as bW, type Stock as bX, type StockLevel as bY, type ProductStock as bZ, type VariantStock as b_, type ServiceNotes as ba, type PricingOverrides as bb, type SchedulingMetadata as bc, type StaffAssignment as bd, type ResourceAssignment as be, type SchedulingResult as bf, type DepositResult as bg, type ServiceScheduleRequest as bh, type StaffScheduleItem as bi, type LocationAppointment as bj, type BusinessType as bk, type BusinessPreferences as bl, type Business as bm, type LocationTaxBehavior as bn, type LocationTaxOverrides as bo, type Location as bp, type TimeRange as bq, type TimeRanges as br, type LocationTimeProfile as bs, type Table as bt, type Room as bu, type ServiceCharge as bv, type StorefrontBootstrap as bw, type BusinessWithLocations as bx, type LocationWithDetails as by, type BusinessSettings as bz, createCimplifyClient as c, type AvailabilityCheck as c0, type AvailabilityResult as c1, type InventorySummary as c2, type Customer as c3, type CustomerAddress as c4, type CustomerMobileMoney as c5, type CustomerLinkPreferences as c6, type LinkData as c7, type CreateAddressInput as c8, type UpdateAddressInput as c9, type RetryEvent as cA, type SessionChangeEvent as cB, type ObservabilityHooks as cC, type OrderType as cD, type ElementAppearance as cE, type AddressInfo as cF, type PaymentMethodInfo as cG, type AuthenticatedCustomer as cH, type ElementsCustomerInfo as cI, type AuthenticatedData as cJ, type ElementsCheckoutData as cK, type ElementsCheckoutResult as cL, type
|
|
2323
|
+
export { type AbortablePromise as $, AuthService as A, BusinessService as B, CimplifyClient as C, type CheckoutMode as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type CheckoutOrderType as H, InventoryService as I, type CheckoutPaymentMethod as J, type CheckoutStep as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutFormData as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutResult as V, type ProcessCheckoutOptions as W, type ProcessCheckoutResult as X, type ProcessAndResolveOptions as Y, type CheckoutStatus as Z, type CheckoutStatusContext as _, type CimplifyConfig as a, type CheckoutInput as a$, type MobileMoneyProvider as a0, type DeviceType as a1, type ContactType as a2, CHECKOUT_MODE as a3, ORDER_TYPE as a4, PAYMENT_METHOD as a5, CHECKOUT_STEP as a6, PAYMENT_STATE as a7, PICKUP_TIME_TYPE as a8, MOBILE_MONEY_PROVIDER as a9, combine as aA, combineObject as aB, type CatalogueResult as aC, type CatalogueSnapshot as aD, type OrderStatus as aE, type PaymentState as aF, type OrderChannel as aG, type LineType as aH, type OrderLineState as aI, type OrderLineStatus as aJ, type FulfillmentType as aK, type FulfillmentStatus as aL, type FulfillmentLink as aM, type OrderFulfillmentSummary as aN, type FeeBearerType as aO, type AmountToPay as aP, type LineItem as aQ, type Order as aR, type OrderHistory as aS, type OrderGroupPaymentState as aT, type OrderGroup as aU, type OrderGroupPayment as aV, type OrderSplitDetail as aW, type OrderGroupPaymentSummary as aX, type OrderGroupDetails as aY, type OrderPaymentEvent as aZ, type OrderFilter as a_, AUTHORIZATION_TYPE as aa, DEVICE_TYPE as ab, CONTACT_TYPE as ac, LINK_QUERY as ad, LINK_MUTATION as ae, AUTH_MUTATION as af, CHECKOUT_MUTATION as ag, PAYMENT_MUTATION as ah, ORDER_MUTATION as ai, DEFAULT_CURRENCY as aj, DEFAULT_COUNTRY as ak, type Result as al, type Ok as am, type Err as an, ok as ao, err as ap, isOk as aq, isErr as ar, mapResult as as, mapError as at, flatMap as au, getOrElse as av, unwrap as aw, toNullable as ax, fromPromise as ay, tryCatch as az, CatalogueQueries as b, type LocationStock as b$, type UpdateOrderStatusInput as b0, type CancelOrderInput as b1, type RefundOrderInput as b2, type ServiceStatus as b3, type StaffRole as b4, type ReminderMethod as b5, type CustomerServicePreferences as b6, type BufferTimes as b7, type ReminderSettings as b8, type CancellationPolicy as b9, type BusinessHours as bA, type CategoryInfo as bB, type Service as bC, type Staff as bD, type TimeSlot as bE, type AvailableSlot as bF, type DayAvailability as bG, type BookingStatus as bH, type Booking as bI, type BookingWithDetails as bJ, type CustomerBookingServiceItem as bK, type CustomerBooking as bL, type GetAvailableSlotsInput as bM, type CheckSlotAvailabilityInput as bN, type CheckSlotAvailabilityResult as bO, type RescheduleBookingInput as bP, type CancelBookingInput as bQ, type CancelBookingResult as bR, type RescheduleBookingResult as bS, type ServiceAvailabilityParams as bT, type ServiceAvailabilityResult as bU, type StockOwnershipType as bV, type StockStatus as bW, type Stock as bX, type StockLevel as bY, type ProductStock as bZ, type VariantStock as b_, type ServiceNotes as ba, type PricingOverrides as bb, type SchedulingMetadata as bc, type StaffAssignment as bd, type ResourceAssignment as be, type SchedulingResult as bf, type DepositResult as bg, type ServiceScheduleRequest as bh, type StaffScheduleItem as bi, type LocationAppointment as bj, type BusinessType as bk, type BusinessPreferences as bl, type Business as bm, type LocationTaxBehavior as bn, type LocationTaxOverrides as bo, type Location as bp, type TimeRange as bq, type TimeRanges as br, type LocationTimeProfile as bs, type Table as bt, type Room as bu, type ServiceCharge as bv, type StorefrontBootstrap as bw, type BusinessWithLocations as bx, type LocationWithDetails as by, type BusinessSettings as bz, createCimplifyClient as c, type AvailabilityCheck as c0, type AvailabilityResult as c1, type InventorySummary as c2, type Customer as c3, type CustomerAddress as c4, type CustomerMobileMoney as c5, type CustomerLinkPreferences as c6, type LinkData as c7, type CreateAddressInput as c8, type UpdateAddressInput as c9, type RetryEvent as cA, type SessionChangeEvent as cB, type ObservabilityHooks as cC, type OrderType as cD, type ElementAppearance as cE, type AddressInfo as cF, type PaymentMethodInfo as cG, type AuthenticatedCustomer as cH, type ElementsCustomerInfo as cI, type AuthenticatedData as cJ, type ElementsCheckoutData as cK, type ElementsCheckoutResult as cL, type CheckoutCartItem as cM, type CheckoutCartData as cN, type ParentToIframeMessage as cO, type IframeToParentMessage as cP, type ElementEventHandler as cQ, type CreateMobileMoneyInput as ca, type EnrollmentData as cb, type AddressData as cc, type MobileMoneyData as cd, type EnrollAndLinkOrderInput as ce, type LinkStatusResult as cf, type LinkEnrollResult as cg, type EnrollAndLinkOrderResult as ch, type LinkSession as ci, type RevokeSessionResult as cj, type RevokeAllSessionsResult as ck, type RequestOtpInput as cl, type VerifyOtpInput as cm, type AuthResponse as cn, type PickupTimeType as co, type PickupTime as cp, type CheckoutAddressInfo as cq, type MobileMoneyDetails as cr, type CheckoutCustomerInfo as cs, type FxQuoteRequest as ct, type FxQuote as cu, type FxRateResponse as cv, type RequestContext as cw, type RequestStartEvent as cx, type RequestSuccessEvent as cy, type RequestErrorEvent as cz, type QuoteBundleSelectionInput as d, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RefreshQuoteResult as h, CartOperations as i, CheckoutService as j, generateIdempotencyKey as k, type GetOrdersOptions as l, type AuthStatus as m, type OtpResult as n, SchedulingService as o, LiteService as p, FxService as q, type LiteBootstrap as r, CimplifyElements as s, CimplifyElement as t, createElements as u, ELEMENT_TYPES as v, type ElementsOptions as w, type ElementOptions as x, type ElementType as y, type ElementEventType as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aa as AUTHORIZATION_TYPE, af as AUTH_MUTATION, $ as AbortablePromise, cc as AddressData, cF as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cH as AuthenticatedCustomer, cJ as AuthenticatedData, c0 as AvailabilityCheck, c1 as AvailabilityResult, bF as AvailableSlot, bI as Booking, bH as BookingStatus, bJ as BookingWithDetails, b7 as BufferTimes, bm as Business, bA as BusinessHours, bl as BusinessPreferences, B as BusinessService, bz as BusinessSettings, bk as BusinessType, bx as BusinessWithLocations, a3 as CHECKOUT_MODE, ag as CHECKOUT_MUTATION, a6 as CHECKOUT_STEP, ac as CONTACT_TYPE, bQ as CancelBookingInput, bR as CancelBookingResult, b1 as CancelOrderInput, b9 as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aC as CatalogueResult, aD as CatalogueSnapshot, bB as CategoryInfo, bN as CheckSlotAvailabilityInput, bO as CheckSlotAvailabilityResult, cq as CheckoutAddressInfo, cs as CheckoutCustomerInfo, N as CheckoutFormData, a$ as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, Z as CheckoutStatus, _ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a2 as ContactType, c8 as CreateAddressInput, ca as CreateMobileMoneyInput, c3 as Customer, c4 as CustomerAddress, bL as CustomerBooking, bK as CustomerBookingServiceItem, c6 as CustomerLinkPreferences, c5 as CustomerMobileMoney, b6 as CustomerServicePreferences, ak as DEFAULT_COUNTRY, aj as DEFAULT_CURRENCY, ab as DEVICE_TYPE, bG as DayAvailability, bg as DepositResult, a1 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cE as ElementAppearance,
|
|
1
|
+
export { aa as AUTHORIZATION_TYPE, af as AUTH_MUTATION, $ as AbortablePromise, cc as AddressData, cF as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cH as AuthenticatedCustomer, cJ as AuthenticatedData, c0 as AvailabilityCheck, c1 as AvailabilityResult, bF as AvailableSlot, bI as Booking, bH as BookingStatus, bJ as BookingWithDetails, b7 as BufferTimes, bm as Business, bA as BusinessHours, bl as BusinessPreferences, B as BusinessService, bz as BusinessSettings, bk as BusinessType, bx as BusinessWithLocations, a3 as CHECKOUT_MODE, ag as CHECKOUT_MUTATION, a6 as CHECKOUT_STEP, ac as CONTACT_TYPE, bQ as CancelBookingInput, bR as CancelBookingResult, b1 as CancelOrderInput, b9 as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aC as CatalogueResult, aD as CatalogueSnapshot, bB as CategoryInfo, bN as CheckSlotAvailabilityInput, bO as CheckSlotAvailabilityResult, cq as CheckoutAddressInfo, cN as CheckoutCartData, cM as CheckoutCartItem, cs as CheckoutCustomerInfo, N as CheckoutFormData, a$ as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, Z as CheckoutStatus, _ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a2 as ContactType, c8 as CreateAddressInput, ca as CreateMobileMoneyInput, c3 as Customer, c4 as CustomerAddress, bL as CustomerBooking, bK as CustomerBookingServiceItem, c6 as CustomerLinkPreferences, c5 as CustomerMobileMoney, b6 as CustomerServicePreferences, ak as DEFAULT_COUNTRY, aj as DEFAULT_CURRENCY, ab as DEVICE_TYPE, bG as DayAvailability, bg as DepositResult, a1 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cE as ElementAppearance, cQ as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cK as ElementsCheckoutData, cL as ElementsCheckoutResult, cI as ElementsCustomerInfo, w as ElementsOptions, ce as EnrollAndLinkOrderInput, ch as EnrollAndLinkOrderResult, cb as EnrollmentData, an as Err, aO as FeeBearerType, F as FetchQuoteInput, aM as FulfillmentLink, aL as FulfillmentStatus, aK as FulfillmentType, cu as FxQuote, ct as FxQuoteRequest, cv as FxRateResponse, q as FxService, bM as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cP as IframeToParentMessage, I as InventoryService, c2 as InventorySummary, ae as LINK_MUTATION, ad as LINK_QUERY, aQ as LineItem, aH as LineType, c7 as LinkData, cg as LinkEnrollResult, L as LinkService, ci as LinkSession, cf as LinkStatusResult, r as LiteBootstrap, p as LiteService, bp as Location, bj as LocationAppointment, b$ as LocationStock, bn as LocationTaxBehavior, bo as LocationTaxOverrides, bs as LocationTimeProfile, by as LocationWithDetails, M as MESSAGE_TYPES, a9 as MOBILE_MONEY_PROVIDER, cd as MobileMoneyData, cr as MobileMoneyDetails, a0 as MobileMoneyProvider, ai as ORDER_MUTATION, a4 as ORDER_TYPE, cC as ObservabilityHooks, am as Ok, aR as Order, aG as OrderChannel, a_ as OrderFilter, aN as OrderFulfillmentSummary, aU as OrderGroup, aY as OrderGroupDetails, aV as OrderGroupPayment, aT as OrderGroupPaymentState, aX as OrderGroupPaymentSummary, aS as OrderHistory, aI as OrderLineState, aJ as OrderLineStatus, aZ as OrderPaymentEvent, O as OrderQueries, aW as OrderSplitDetail, aE as OrderStatus, cD as OrderType, n as OtpResult, a5 as PAYMENT_METHOD, ah as PAYMENT_MUTATION, a7 as PAYMENT_STATE, a8 as PICKUP_TIME_TYPE, cO as ParentToIframeMessage, cG as PaymentMethodInfo, aF as PaymentState, cp as PickupTime, co as PickupTimeType, P as PriceQuote, bb as PricingOverrides, Y as ProcessAndResolveOptions, W as ProcessCheckoutOptions, X as ProcessCheckoutResult, bZ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b2 as RefundOrderInput, b5 as ReminderMethod, b8 as ReminderSettings, cw as RequestContext, cz as RequestErrorEvent, cl as RequestOtpInput, cx as RequestStartEvent, cy as RequestSuccessEvent, bP as RescheduleBookingInput, bS as RescheduleBookingResult, be as ResourceAssignment, al as Result, cA as RetryEvent, ck as RevokeAllSessionsResult, cj as RevokeSessionResult, bu as Room, bc as SchedulingMetadata, bf as SchedulingResult, o as SchedulingService, S as SearchOptions, bC as Service, bT as ServiceAvailabilityParams, bU as ServiceAvailabilityResult, bv as ServiceCharge, ba as ServiceNotes, bh as ServiceScheduleRequest, b3 as ServiceStatus, cB as SessionChangeEvent, bD as Staff, bd as StaffAssignment, b4 as StaffRole, bi as StaffScheduleItem, bX as Stock, bY as StockLevel, bV as StockOwnershipType, bW as StockStatus, bw as StorefrontBootstrap, bt as Table, T as TableInfo, bq as TimeRange, br as TimeRanges, bE as TimeSlot, c9 as UpdateAddressInput, b0 as UpdateOrderStatusInput, U as UpdateProfileInput, b_ as VariantStock, cm as VerifyOtpInput, aA as combine, aB as combineObject, c as createCimplifyClient, u as createElements, ap as err, au as flatMap, ay as fromPromise, k as generateIdempotencyKey, av as getOrElse, ar as isErr, aq as isOk, at as mapError, as as mapResult, ao as ok, ax as toNullable, az as tryCatch, aw as unwrap } from './client-Bm2VkZJq.mjs';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.mjs';
|
|
3
3
|
import { A as ApiError } from './payment-CLIWNMaP.mjs';
|
|
4
4
|
export { B as AddOn, at as AddOnDetails, aP as AddOnGroupDetails, G as AddOnOption, aO as AddOnOptionDetails, H as AddOnOptionPrice, F as AddOnWithOptions, aU as AddToCartInput, ai as AdjustmentType, ap as AppliedDiscount, a_ as AuthorizationType, ao as BenefitType, T as Bundle, Y as BundleComponentData, _ as BundleComponentInfo, R as BundlePriceType, W as BundleProduct, ay as BundleSelectionData, aw as BundleSelectionInput, ax as BundleStoredSelection, U as BundleSummary, X as BundleWithDetails, aD as Cart, au as CartAddOn, ag as CartChannel, aE as CartItem, aR as CartItemDetails, af as CartStatus, aW as CartSummary, aF as CartTotals, K as Category, L as CategorySummary, an as ChosenPrice, h as CimplifyError, N as Collection, Q as CollectionProduct, O as CollectionSummary, a4 as ComponentGroup, a5 as ComponentGroupWithComponents, a9 as ComponentPriceBreakdown, a7 as ComponentSelectionInput, a1 as ComponentSourceType, a2 as Composite, a6 as CompositeComponent, aA as CompositePriceBreakdown, a8 as CompositePriceResult, $ as CompositePricingMode, aB as CompositeSelectionData, a7 as CompositeSelectionInput, az as CompositeStoredSelection, a3 as CompositeWithDetails, b as Currency, C as CurrencyCode, p as DepositType, D as DigitalProductType, aq as DiscountBreakdown, ar as DiscountDetails, aI as DisplayAddOn, aJ as DisplayAddOnOption, aG as DisplayCart, aH as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a0 as GroupPricingBehavior, b2 as InitializePaymentResult, I as InventoryType, aC as LineConfiguration, ac as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b1 as Payment, b5 as PaymentErrorDetails, b0 as PaymentMethod, aZ as PaymentMethodType, a$ as PaymentProcessingState, aY as PaymentProvider, b3 as PaymentResponse, aX as PaymentStatus, b4 as PaymentStatusResponse, ab as Price, aj as PriceAdjustment, am as PriceDecisionPath, aa as PriceEntryType, al as PricePathTaxInfo, ah as PriceSource, q as Product, J as ProductAddOn, ad as ProductAvailability, o as ProductRenderHint, ae as ProductTimeProfile, n as ProductType, s as ProductVariant, x as ProductVariantValue, r as ProductWithDetails, S as SalesChannel, as as SelectedAddOnOption, b6 as SubmitAuthorizationInput, ak as TaxPathComponent, aS as UICart, aK as UICartBusiness, aM as UICartCustomer, aL as UICartLocation, aN as UICartPricing, aT as UICartResponse, aV as UpdateCartItemInput, u as VariantAxis, z as VariantAxisSelection, w as VariantAxisValue, v as VariantAxisWithValues, av as VariantDetails, aQ as VariantDetailsDTO, t as VariantDisplayAttribute, y as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, i as isCimplifyError, l as isRetryableError, m as money, a as moneyFromNumber } from './payment-CLIWNMaP.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aa as AUTHORIZATION_TYPE, af as AUTH_MUTATION, $ as AbortablePromise, cc as AddressData, cF as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cH as AuthenticatedCustomer, cJ as AuthenticatedData, c0 as AvailabilityCheck, c1 as AvailabilityResult, bF as AvailableSlot, bI as Booking, bH as BookingStatus, bJ as BookingWithDetails, b7 as BufferTimes, bm as Business, bA as BusinessHours, bl as BusinessPreferences, B as BusinessService, bz as BusinessSettings, bk as BusinessType, bx as BusinessWithLocations, a3 as CHECKOUT_MODE, ag as CHECKOUT_MUTATION, a6 as CHECKOUT_STEP, ac as CONTACT_TYPE, bQ as CancelBookingInput, bR as CancelBookingResult, b1 as CancelOrderInput, b9 as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aC as CatalogueResult, aD as CatalogueSnapshot, bB as CategoryInfo, bN as CheckSlotAvailabilityInput, bO as CheckSlotAvailabilityResult, cq as CheckoutAddressInfo, cs as CheckoutCustomerInfo, N as CheckoutFormData, a$ as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, Z as CheckoutStatus, _ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a2 as ContactType, c8 as CreateAddressInput, ca as CreateMobileMoneyInput, c3 as Customer, c4 as CustomerAddress, bL as CustomerBooking, bK as CustomerBookingServiceItem, c6 as CustomerLinkPreferences, c5 as CustomerMobileMoney, b6 as CustomerServicePreferences, ak as DEFAULT_COUNTRY, aj as DEFAULT_CURRENCY, ab as DEVICE_TYPE, bG as DayAvailability, bg as DepositResult, a1 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cE as ElementAppearance,
|
|
1
|
+
export { aa as AUTHORIZATION_TYPE, af as AUTH_MUTATION, $ as AbortablePromise, cc as AddressData, cF as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cH as AuthenticatedCustomer, cJ as AuthenticatedData, c0 as AvailabilityCheck, c1 as AvailabilityResult, bF as AvailableSlot, bI as Booking, bH as BookingStatus, bJ as BookingWithDetails, b7 as BufferTimes, bm as Business, bA as BusinessHours, bl as BusinessPreferences, B as BusinessService, bz as BusinessSettings, bk as BusinessType, bx as BusinessWithLocations, a3 as CHECKOUT_MODE, ag as CHECKOUT_MUTATION, a6 as CHECKOUT_STEP, ac as CONTACT_TYPE, bQ as CancelBookingInput, bR as CancelBookingResult, b1 as CancelOrderInput, b9 as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aC as CatalogueResult, aD as CatalogueSnapshot, bB as CategoryInfo, bN as CheckSlotAvailabilityInput, bO as CheckSlotAvailabilityResult, cq as CheckoutAddressInfo, cN as CheckoutCartData, cM as CheckoutCartItem, cs as CheckoutCustomerInfo, N as CheckoutFormData, a$ as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, Z as CheckoutStatus, _ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a2 as ContactType, c8 as CreateAddressInput, ca as CreateMobileMoneyInput, c3 as Customer, c4 as CustomerAddress, bL as CustomerBooking, bK as CustomerBookingServiceItem, c6 as CustomerLinkPreferences, c5 as CustomerMobileMoney, b6 as CustomerServicePreferences, ak as DEFAULT_COUNTRY, aj as DEFAULT_CURRENCY, ab as DEVICE_TYPE, bG as DayAvailability, bg as DepositResult, a1 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cE as ElementAppearance, cQ as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cK as ElementsCheckoutData, cL as ElementsCheckoutResult, cI as ElementsCustomerInfo, w as ElementsOptions, ce as EnrollAndLinkOrderInput, ch as EnrollAndLinkOrderResult, cb as EnrollmentData, an as Err, aO as FeeBearerType, F as FetchQuoteInput, aM as FulfillmentLink, aL as FulfillmentStatus, aK as FulfillmentType, cu as FxQuote, ct as FxQuoteRequest, cv as FxRateResponse, q as FxService, bM as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cP as IframeToParentMessage, I as InventoryService, c2 as InventorySummary, ae as LINK_MUTATION, ad as LINK_QUERY, aQ as LineItem, aH as LineType, c7 as LinkData, cg as LinkEnrollResult, L as LinkService, ci as LinkSession, cf as LinkStatusResult, r as LiteBootstrap, p as LiteService, bp as Location, bj as LocationAppointment, b$ as LocationStock, bn as LocationTaxBehavior, bo as LocationTaxOverrides, bs as LocationTimeProfile, by as LocationWithDetails, M as MESSAGE_TYPES, a9 as MOBILE_MONEY_PROVIDER, cd as MobileMoneyData, cr as MobileMoneyDetails, a0 as MobileMoneyProvider, ai as ORDER_MUTATION, a4 as ORDER_TYPE, cC as ObservabilityHooks, am as Ok, aR as Order, aG as OrderChannel, a_ as OrderFilter, aN as OrderFulfillmentSummary, aU as OrderGroup, aY as OrderGroupDetails, aV as OrderGroupPayment, aT as OrderGroupPaymentState, aX as OrderGroupPaymentSummary, aS as OrderHistory, aI as OrderLineState, aJ as OrderLineStatus, aZ as OrderPaymentEvent, O as OrderQueries, aW as OrderSplitDetail, aE as OrderStatus, cD as OrderType, n as OtpResult, a5 as PAYMENT_METHOD, ah as PAYMENT_MUTATION, a7 as PAYMENT_STATE, a8 as PICKUP_TIME_TYPE, cO as ParentToIframeMessage, cG as PaymentMethodInfo, aF as PaymentState, cp as PickupTime, co as PickupTimeType, P as PriceQuote, bb as PricingOverrides, Y as ProcessAndResolveOptions, W as ProcessCheckoutOptions, X as ProcessCheckoutResult, bZ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b2 as RefundOrderInput, b5 as ReminderMethod, b8 as ReminderSettings, cw as RequestContext, cz as RequestErrorEvent, cl as RequestOtpInput, cx as RequestStartEvent, cy as RequestSuccessEvent, bP as RescheduleBookingInput, bS as RescheduleBookingResult, be as ResourceAssignment, al as Result, cA as RetryEvent, ck as RevokeAllSessionsResult, cj as RevokeSessionResult, bu as Room, bc as SchedulingMetadata, bf as SchedulingResult, o as SchedulingService, S as SearchOptions, bC as Service, bT as ServiceAvailabilityParams, bU as ServiceAvailabilityResult, bv as ServiceCharge, ba as ServiceNotes, bh as ServiceScheduleRequest, b3 as ServiceStatus, cB as SessionChangeEvent, bD as Staff, bd as StaffAssignment, b4 as StaffRole, bi as StaffScheduleItem, bX as Stock, bY as StockLevel, bV as StockOwnershipType, bW as StockStatus, bw as StorefrontBootstrap, bt as Table, T as TableInfo, bq as TimeRange, br as TimeRanges, bE as TimeSlot, c9 as UpdateAddressInput, b0 as UpdateOrderStatusInput, U as UpdateProfileInput, b_ as VariantStock, cm as VerifyOtpInput, aA as combine, aB as combineObject, c as createCimplifyClient, u as createElements, ap as err, au as flatMap, ay as fromPromise, k as generateIdempotencyKey, av as getOrElse, ar as isErr, aq as isOk, at as mapError, as as mapResult, ao as ok, ax as toNullable, az as tryCatch, aw as unwrap } from './client-1fzEx2NA.js';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.js';
|
|
3
3
|
import { A as ApiError } from './payment-CLIWNMaP.js';
|
|
4
4
|
export { B as AddOn, at as AddOnDetails, aP as AddOnGroupDetails, G as AddOnOption, aO as AddOnOptionDetails, H as AddOnOptionPrice, F as AddOnWithOptions, aU as AddToCartInput, ai as AdjustmentType, ap as AppliedDiscount, a_ as AuthorizationType, ao as BenefitType, T as Bundle, Y as BundleComponentData, _ as BundleComponentInfo, R as BundlePriceType, W as BundleProduct, ay as BundleSelectionData, aw as BundleSelectionInput, ax as BundleStoredSelection, U as BundleSummary, X as BundleWithDetails, aD as Cart, au as CartAddOn, ag as CartChannel, aE as CartItem, aR as CartItemDetails, af as CartStatus, aW as CartSummary, aF as CartTotals, K as Category, L as CategorySummary, an as ChosenPrice, h as CimplifyError, N as Collection, Q as CollectionProduct, O as CollectionSummary, a4 as ComponentGroup, a5 as ComponentGroupWithComponents, a9 as ComponentPriceBreakdown, a7 as ComponentSelectionInput, a1 as ComponentSourceType, a2 as Composite, a6 as CompositeComponent, aA as CompositePriceBreakdown, a8 as CompositePriceResult, $ as CompositePricingMode, aB as CompositeSelectionData, a7 as CompositeSelectionInput, az as CompositeStoredSelection, a3 as CompositeWithDetails, b as Currency, C as CurrencyCode, p as DepositType, D as DigitalProductType, aq as DiscountBreakdown, ar as DiscountDetails, aI as DisplayAddOn, aJ as DisplayAddOnOption, aG as DisplayCart, aH as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a0 as GroupPricingBehavior, b2 as InitializePaymentResult, I as InventoryType, aC as LineConfiguration, ac as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b1 as Payment, b5 as PaymentErrorDetails, b0 as PaymentMethod, aZ as PaymentMethodType, a$ as PaymentProcessingState, aY as PaymentProvider, b3 as PaymentResponse, aX as PaymentStatus, b4 as PaymentStatusResponse, ab as Price, aj as PriceAdjustment, am as PriceDecisionPath, aa as PriceEntryType, al as PricePathTaxInfo, ah as PriceSource, q as Product, J as ProductAddOn, ad as ProductAvailability, o as ProductRenderHint, ae as ProductTimeProfile, n as ProductType, s as ProductVariant, x as ProductVariantValue, r as ProductWithDetails, S as SalesChannel, as as SelectedAddOnOption, b6 as SubmitAuthorizationInput, ak as TaxPathComponent, aS as UICart, aK as UICartBusiness, aM as UICartCustomer, aL as UICartLocation, aN as UICartPricing, aT as UICartResponse, aV as UpdateCartItemInput, u as VariantAxis, z as VariantAxisSelection, w as VariantAxisValue, v as VariantAxisWithValues, av as VariantDetails, aQ as VariantDetailsDTO, t as VariantDisplayAttribute, y as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, i as isCimplifyError, l as isRetryableError, m as money, a as moneyFromNumber } from './payment-CLIWNMaP.js';
|