@cimplify/sdk 0.8.0 → 0.8.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 +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +9 -3
- package/dist/advanced.mjs +9 -3
- package/dist/{client-tMD3aBuM.d.ts → client-BJFeYCB2.d.ts} +5 -0
- package/dist/{client-I-utsHva.d.mts → client-bq-xxzM7.d.mts} +5 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -3
- package/dist/index.mjs +9 -3
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +16 -26
- package/dist/react.mjs +16 -26
- 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-bq-xxzM7.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-BJFeYCB2.js';
|
|
2
2
|
import './payment-CLIWNMaP.js';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
package/dist/advanced.js
CHANGED
|
@@ -2162,7 +2162,8 @@ var MESSAGE_TYPES = {
|
|
|
2162
2162
|
CONTACT_PROVIDED: "contact_provided",
|
|
2163
2163
|
CHECKOUT_STATUS: "checkout_status",
|
|
2164
2164
|
CHECKOUT_COMPLETE: "checkout_complete",
|
|
2165
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2165
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2166
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2166
2167
|
};
|
|
2167
2168
|
var EVENT_TYPES = {
|
|
2168
2169
|
READY: "ready",
|
|
@@ -2172,7 +2173,8 @@ var EVENT_TYPES = {
|
|
|
2172
2173
|
CHANGE: "change",
|
|
2173
2174
|
BLUR: "blur",
|
|
2174
2175
|
FOCUS: "focus",
|
|
2175
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2176
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2177
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2176
2178
|
};
|
|
2177
2179
|
|
|
2178
2180
|
// src/elements.ts
|
|
@@ -2730,7 +2732,8 @@ var CimplifyElement = class {
|
|
|
2730
2732
|
prefillEmail: this.options.prefillEmail,
|
|
2731
2733
|
appearance: this.parent.getAppearance(),
|
|
2732
2734
|
orderTypes: this.options.orderTypes,
|
|
2733
|
-
defaultOrderType: this.options.defaultOrderType
|
|
2735
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
2736
|
+
renderSubmitButton: true
|
|
2734
2737
|
});
|
|
2735
2738
|
const token = this.parent.getAccessToken();
|
|
2736
2739
|
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
@@ -2797,6 +2800,9 @@ var CimplifyElement = class {
|
|
|
2797
2800
|
case MESSAGE_TYPES.ORDER_TYPE_CHANGED:
|
|
2798
2801
|
this.emit(EVENT_TYPES.ORDER_TYPE_CHANGED, { orderType: message.orderType });
|
|
2799
2802
|
break;
|
|
2803
|
+
case MESSAGE_TYPES.REQUEST_SUBMIT:
|
|
2804
|
+
this.emit(EVENT_TYPES.REQUEST_SUBMIT, {});
|
|
2805
|
+
break;
|
|
2800
2806
|
}
|
|
2801
2807
|
}
|
|
2802
2808
|
emit(event, data) {
|
package/dist/advanced.mjs
CHANGED
|
@@ -2160,7 +2160,8 @@ var MESSAGE_TYPES = {
|
|
|
2160
2160
|
CONTACT_PROVIDED: "contact_provided",
|
|
2161
2161
|
CHECKOUT_STATUS: "checkout_status",
|
|
2162
2162
|
CHECKOUT_COMPLETE: "checkout_complete",
|
|
2163
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2163
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2164
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2164
2165
|
};
|
|
2165
2166
|
var EVENT_TYPES = {
|
|
2166
2167
|
READY: "ready",
|
|
@@ -2170,7 +2171,8 @@ var EVENT_TYPES = {
|
|
|
2170
2171
|
CHANGE: "change",
|
|
2171
2172
|
BLUR: "blur",
|
|
2172
2173
|
FOCUS: "focus",
|
|
2173
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2174
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2175
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2174
2176
|
};
|
|
2175
2177
|
|
|
2176
2178
|
// src/elements.ts
|
|
@@ -2728,7 +2730,8 @@ var CimplifyElement = class {
|
|
|
2728
2730
|
prefillEmail: this.options.prefillEmail,
|
|
2729
2731
|
appearance: this.parent.getAppearance(),
|
|
2730
2732
|
orderTypes: this.options.orderTypes,
|
|
2731
|
-
defaultOrderType: this.options.defaultOrderType
|
|
2733
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
2734
|
+
renderSubmitButton: true
|
|
2732
2735
|
});
|
|
2733
2736
|
const token = this.parent.getAccessToken();
|
|
2734
2737
|
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
@@ -2795,6 +2798,9 @@ var CimplifyElement = class {
|
|
|
2795
2798
|
case MESSAGE_TYPES.ORDER_TYPE_CHANGED:
|
|
2796
2799
|
this.emit(EVENT_TYPES.ORDER_TYPE_CHANGED, { orderType: message.orderType });
|
|
2797
2800
|
break;
|
|
2801
|
+
case MESSAGE_TYPES.REQUEST_SUBMIT:
|
|
2802
|
+
this.emit(EVENT_TYPES.REQUEST_SUBMIT, {});
|
|
2803
|
+
break;
|
|
2798
2804
|
}
|
|
2799
2805
|
}
|
|
2800
2806
|
emit(event, data) {
|
|
@@ -1913,6 +1913,7 @@ declare const MESSAGE_TYPES: {
|
|
|
1913
1913
|
readonly CHECKOUT_STATUS: "checkout_status";
|
|
1914
1914
|
readonly CHECKOUT_COMPLETE: "checkout_complete";
|
|
1915
1915
|
readonly ORDER_TYPE_CHANGED: "order_type_changed";
|
|
1916
|
+
readonly REQUEST_SUBMIT: "request_submit";
|
|
1916
1917
|
};
|
|
1917
1918
|
interface ElementsOptions {
|
|
1918
1919
|
linkUrl?: string;
|
|
@@ -1998,6 +1999,7 @@ type ParentToIframeMessage = {
|
|
|
1998
1999
|
appearance?: ElementAppearance;
|
|
1999
2000
|
orderTypes?: OrderType[];
|
|
2000
2001
|
defaultOrderType?: OrderType;
|
|
2002
|
+
renderSubmitButton?: boolean;
|
|
2001
2003
|
} | {
|
|
2002
2004
|
type: typeof MESSAGE_TYPES.SET_TOKEN;
|
|
2003
2005
|
token: string;
|
|
@@ -2086,6 +2088,8 @@ type IframeToParentMessage = {
|
|
|
2086
2088
|
} | {
|
|
2087
2089
|
type: typeof MESSAGE_TYPES.ORDER_TYPE_CHANGED;
|
|
2088
2090
|
orderType: OrderType;
|
|
2091
|
+
} | {
|
|
2092
|
+
type: typeof MESSAGE_TYPES.REQUEST_SUBMIT;
|
|
2089
2093
|
};
|
|
2090
2094
|
declare const EVENT_TYPES: {
|
|
2091
2095
|
readonly READY: "ready";
|
|
@@ -2096,6 +2100,7 @@ declare const EVENT_TYPES: {
|
|
|
2096
2100
|
readonly BLUR: "blur";
|
|
2097
2101
|
readonly FOCUS: "focus";
|
|
2098
2102
|
readonly ORDER_TYPE_CHANGED: "order_type_changed";
|
|
2103
|
+
readonly REQUEST_SUBMIT: "request_submit";
|
|
2099
2104
|
};
|
|
2100
2105
|
type ElementEventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES];
|
|
2101
2106
|
type ElementEventHandler<T = unknown> = (data: T) => void;
|
|
@@ -1913,6 +1913,7 @@ declare const MESSAGE_TYPES: {
|
|
|
1913
1913
|
readonly CHECKOUT_STATUS: "checkout_status";
|
|
1914
1914
|
readonly CHECKOUT_COMPLETE: "checkout_complete";
|
|
1915
1915
|
readonly ORDER_TYPE_CHANGED: "order_type_changed";
|
|
1916
|
+
readonly REQUEST_SUBMIT: "request_submit";
|
|
1916
1917
|
};
|
|
1917
1918
|
interface ElementsOptions {
|
|
1918
1919
|
linkUrl?: string;
|
|
@@ -1998,6 +1999,7 @@ type ParentToIframeMessage = {
|
|
|
1998
1999
|
appearance?: ElementAppearance;
|
|
1999
2000
|
orderTypes?: OrderType[];
|
|
2000
2001
|
defaultOrderType?: OrderType;
|
|
2002
|
+
renderSubmitButton?: boolean;
|
|
2001
2003
|
} | {
|
|
2002
2004
|
type: typeof MESSAGE_TYPES.SET_TOKEN;
|
|
2003
2005
|
token: string;
|
|
@@ -2086,6 +2088,8 @@ type IframeToParentMessage = {
|
|
|
2086
2088
|
} | {
|
|
2087
2089
|
type: typeof MESSAGE_TYPES.ORDER_TYPE_CHANGED;
|
|
2088
2090
|
orderType: OrderType;
|
|
2091
|
+
} | {
|
|
2092
|
+
type: typeof MESSAGE_TYPES.REQUEST_SUBMIT;
|
|
2089
2093
|
};
|
|
2090
2094
|
declare const EVENT_TYPES: {
|
|
2091
2095
|
readonly READY: "ready";
|
|
@@ -2096,6 +2100,7 @@ declare const EVENT_TYPES: {
|
|
|
2096
2100
|
readonly BLUR: "blur";
|
|
2097
2101
|
readonly FOCUS: "focus";
|
|
2098
2102
|
readonly ORDER_TYPE_CHANGED: "order_type_changed";
|
|
2103
|
+
readonly REQUEST_SUBMIT: "request_submit";
|
|
2099
2104
|
};
|
|
2100
2105
|
type ElementEventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES];
|
|
2101
2106
|
type ElementEventHandler<T = unknown> = (data: T) => void;
|
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, cO 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, cN 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, cM 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-
|
|
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, cO 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, cN 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, cM 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-bq-xxzM7.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, cO 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, cN 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, cM 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-
|
|
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, cO 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, cN 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, cM 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-BJFeYCB2.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';
|
package/dist/index.js
CHANGED
|
@@ -2610,7 +2610,8 @@ var MESSAGE_TYPES = {
|
|
|
2610
2610
|
CONTACT_PROVIDED: "contact_provided",
|
|
2611
2611
|
CHECKOUT_STATUS: "checkout_status",
|
|
2612
2612
|
CHECKOUT_COMPLETE: "checkout_complete",
|
|
2613
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2613
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2614
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2614
2615
|
};
|
|
2615
2616
|
var EVENT_TYPES = {
|
|
2616
2617
|
READY: "ready",
|
|
@@ -2620,7 +2621,8 @@ var EVENT_TYPES = {
|
|
|
2620
2621
|
CHANGE: "change",
|
|
2621
2622
|
BLUR: "blur",
|
|
2622
2623
|
FOCUS: "focus",
|
|
2623
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2624
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2625
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2624
2626
|
};
|
|
2625
2627
|
|
|
2626
2628
|
// src/elements.ts
|
|
@@ -3178,7 +3180,8 @@ var CimplifyElement = class {
|
|
|
3178
3180
|
prefillEmail: this.options.prefillEmail,
|
|
3179
3181
|
appearance: this.parent.getAppearance(),
|
|
3180
3182
|
orderTypes: this.options.orderTypes,
|
|
3181
|
-
defaultOrderType: this.options.defaultOrderType
|
|
3183
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
3184
|
+
renderSubmitButton: true
|
|
3182
3185
|
});
|
|
3183
3186
|
const token = this.parent.getAccessToken();
|
|
3184
3187
|
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
@@ -3245,6 +3248,9 @@ var CimplifyElement = class {
|
|
|
3245
3248
|
case MESSAGE_TYPES.ORDER_TYPE_CHANGED:
|
|
3246
3249
|
this.emit(EVENT_TYPES.ORDER_TYPE_CHANGED, { orderType: message.orderType });
|
|
3247
3250
|
break;
|
|
3251
|
+
case MESSAGE_TYPES.REQUEST_SUBMIT:
|
|
3252
|
+
this.emit(EVENT_TYPES.REQUEST_SUBMIT, {});
|
|
3253
|
+
break;
|
|
3248
3254
|
}
|
|
3249
3255
|
}
|
|
3250
3256
|
emit(event, data) {
|
package/dist/index.mjs
CHANGED
|
@@ -2608,7 +2608,8 @@ var MESSAGE_TYPES = {
|
|
|
2608
2608
|
CONTACT_PROVIDED: "contact_provided",
|
|
2609
2609
|
CHECKOUT_STATUS: "checkout_status",
|
|
2610
2610
|
CHECKOUT_COMPLETE: "checkout_complete",
|
|
2611
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2611
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2612
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2612
2613
|
};
|
|
2613
2614
|
var EVENT_TYPES = {
|
|
2614
2615
|
READY: "ready",
|
|
@@ -2618,7 +2619,8 @@ var EVENT_TYPES = {
|
|
|
2618
2619
|
CHANGE: "change",
|
|
2619
2620
|
BLUR: "blur",
|
|
2620
2621
|
FOCUS: "focus",
|
|
2621
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
2622
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
2623
|
+
REQUEST_SUBMIT: "request_submit"
|
|
2622
2624
|
};
|
|
2623
2625
|
|
|
2624
2626
|
// src/elements.ts
|
|
@@ -3176,7 +3178,8 @@ var CimplifyElement = class {
|
|
|
3176
3178
|
prefillEmail: this.options.prefillEmail,
|
|
3177
3179
|
appearance: this.parent.getAppearance(),
|
|
3178
3180
|
orderTypes: this.options.orderTypes,
|
|
3179
|
-
defaultOrderType: this.options.defaultOrderType
|
|
3181
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
3182
|
+
renderSubmitButton: true
|
|
3180
3183
|
});
|
|
3181
3184
|
const token = this.parent.getAccessToken();
|
|
3182
3185
|
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
@@ -3243,6 +3246,9 @@ var CimplifyElement = class {
|
|
|
3243
3246
|
case MESSAGE_TYPES.ORDER_TYPE_CHANGED:
|
|
3244
3247
|
this.emit(EVENT_TYPES.ORDER_TYPE_CHANGED, { orderType: message.orderType });
|
|
3245
3248
|
break;
|
|
3249
|
+
case MESSAGE_TYPES.REQUEST_SUBMIT:
|
|
3250
|
+
this.emit(EVENT_TYPES.REQUEST_SUBMIT, {});
|
|
3251
|
+
break;
|
|
3246
3252
|
}
|
|
3247
3253
|
}
|
|
3248
3254
|
emit(event, data) {
|
package/dist/react.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CimplifyClient, X as ProcessCheckoutResult, Z as CheckoutStatus, _ as CheckoutStatusContext, bp as Location, bm as Business, aR as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, s as CimplifyElements, w as ElementsOptions, cJ as AuthenticatedData, cF as AddressInfo, cG as PaymentMethodInfo, cL as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-
|
|
1
|
+
import { C as CimplifyClient, X as ProcessCheckoutResult, Z as CheckoutStatus, _ as CheckoutStatusContext, bp as Location, bm as Business, aR as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, s as CimplifyElements, w as ElementsOptions, cJ as AuthenticatedData, cF as AddressInfo, cG as PaymentMethodInfo, cL as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-bq-xxzM7.mjs';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { q as Product, d as Pagination, h as CimplifyError, r as ProductWithDetails, K as Category, aw as BundleSelectionInput, a7 as ComponentSelectionInput, N as Collection, X as BundleWithDetails, a3 as CompositeWithDetails, a8 as CompositePriceResult, C as CurrencyCode } from './payment-CLIWNMaP.mjs';
|
|
4
4
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.mjs';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CimplifyClient, X as ProcessCheckoutResult, Z as CheckoutStatus, _ as CheckoutStatusContext, bp as Location, bm as Business, aR as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, s as CimplifyElements, w as ElementsOptions, cJ as AuthenticatedData, cF as AddressInfo, cG as PaymentMethodInfo, cL as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-
|
|
1
|
+
import { C as CimplifyClient, X as ProcessCheckoutResult, Z as CheckoutStatus, _ as CheckoutStatusContext, bp as Location, bm as Business, aR as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, s as CimplifyElements, w as ElementsOptions, cJ as AuthenticatedData, cF as AddressInfo, cG as PaymentMethodInfo, cL as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-BJFeYCB2.js';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { q as Product, d as Pagination, h as CimplifyError, r as ProductWithDetails, K as Category, aw as BundleSelectionInput, a7 as ComponentSelectionInput, N as Collection, X as BundleWithDetails, a3 as CompositeWithDetails, a8 as CompositePriceResult, C as CurrencyCode } from './payment-CLIWNMaP.js';
|
|
4
4
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.js';
|
package/dist/react.js
CHANGED
|
@@ -33,7 +33,8 @@ var MESSAGE_TYPES = {
|
|
|
33
33
|
CONTACT_PROVIDED: "contact_provided",
|
|
34
34
|
CHECKOUT_STATUS: "checkout_status",
|
|
35
35
|
CHECKOUT_COMPLETE: "checkout_complete",
|
|
36
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
36
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
37
|
+
REQUEST_SUBMIT: "request_submit"
|
|
37
38
|
};
|
|
38
39
|
var EVENT_TYPES = {
|
|
39
40
|
READY: "ready",
|
|
@@ -41,7 +42,8 @@ var EVENT_TYPES = {
|
|
|
41
42
|
REQUIRES_OTP: "requires_otp",
|
|
42
43
|
ERROR: "error",
|
|
43
44
|
CHANGE: "change",
|
|
44
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
45
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
46
|
+
REQUEST_SUBMIT: "request_submit"
|
|
45
47
|
};
|
|
46
48
|
|
|
47
49
|
// src/ads/identity.ts
|
|
@@ -343,7 +345,7 @@ function Ad({
|
|
|
343
345
|
}
|
|
344
346
|
);
|
|
345
347
|
}
|
|
346
|
-
var SPACE = { sm: 8
|
|
348
|
+
var SPACE = { sm: 8};
|
|
347
349
|
function shellColors(isDark, primaryColor) {
|
|
348
350
|
return {
|
|
349
351
|
text: isDark ? "#f4f4f5" : "#1a1a1a",
|
|
@@ -419,6 +421,8 @@ function CimplifyCheckout({
|
|
|
419
421
|
const onCompleteRef = react.useRef(onComplete);
|
|
420
422
|
const onErrorRef = react.useRef(onError);
|
|
421
423
|
const onStatusChangeRef = react.useRef(onStatusChange);
|
|
424
|
+
const handleSubmitRef = react.useRef(async () => {
|
|
425
|
+
});
|
|
422
426
|
onCompleteRef.current = onComplete;
|
|
423
427
|
onErrorRef.current = onError;
|
|
424
428
|
onStatusChangeRef.current = onStatusChange;
|
|
@@ -549,6 +553,9 @@ function CimplifyCheckout({
|
|
|
549
553
|
setOrderType(typed.orderType);
|
|
550
554
|
}
|
|
551
555
|
});
|
|
556
|
+
checkout.on("request_submit", () => {
|
|
557
|
+
void handleSubmitRef.current();
|
|
558
|
+
});
|
|
552
559
|
return () => {
|
|
553
560
|
activeCheckoutRef.current?.abort();
|
|
554
561
|
activeCheckoutRef.current = null;
|
|
@@ -646,6 +653,7 @@ function CimplifyCheckout({
|
|
|
646
653
|
locationId,
|
|
647
654
|
orderType
|
|
648
655
|
]);
|
|
656
|
+
handleSubmitRef.current = handleSubmit;
|
|
649
657
|
const colors = shellColors(isDark ?? false, primaryColor);
|
|
650
658
|
if (isInitializing) {
|
|
651
659
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, "data-cimplify-checkout": "", children: /* @__PURE__ */ jsxRuntime.jsx("p", { "data-cimplify-status": "", style: { fontSize: 13, color: colors.textSecondary }, children: "Preparing checkout..." }) });
|
|
@@ -668,28 +676,6 @@ function CimplifyCheckout({
|
|
|
668
676
|
}
|
|
669
677
|
),
|
|
670
678
|
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-section": "checkout", children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: isDemoCheckout ? void 0 : checkoutMountRef }) }),
|
|
671
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: SPACE.xl }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
672
|
-
"button",
|
|
673
|
-
{
|
|
674
|
-
type: "button",
|
|
675
|
-
onClick: handleSubmit,
|
|
676
|
-
disabled: isSubmitting,
|
|
677
|
-
style: {
|
|
678
|
-
width: "100%",
|
|
679
|
-
padding: `${SPACE.md}px ${SPACE.lg}px`,
|
|
680
|
-
borderRadius: 8,
|
|
681
|
-
border: "none",
|
|
682
|
-
background: isSubmitting ? colors.textMuted : primaryColor,
|
|
683
|
-
color: "#ffffff",
|
|
684
|
-
cursor: isSubmitting ? "not-allowed" : "pointer",
|
|
685
|
-
fontWeight: 600,
|
|
686
|
-
fontSize: 16,
|
|
687
|
-
transition: "all 150ms ease",
|
|
688
|
-
WebkitTapHighlightColor: "transparent"
|
|
689
|
-
},
|
|
690
|
-
children: isSubmitting ? "Processing..." : "Complete Order"
|
|
691
|
-
}
|
|
692
|
-
) }),
|
|
693
679
|
status && /* @__PURE__ */ jsxRuntime.jsx("p", { "data-cimplify-status": "", style: { marginTop: SPACE.sm, fontSize: 13, color: colors.textSecondary }, children: statusText || statusToLabel(status) }),
|
|
694
680
|
errorMessage && /* @__PURE__ */ jsxRuntime.jsx("p", { "data-cimplify-error": "", style: { marginTop: SPACE.sm, fontSize: 13, color: colors.error }, children: errorMessage })
|
|
695
681
|
] });
|
|
@@ -3398,7 +3384,8 @@ var CimplifyElement = class {
|
|
|
3398
3384
|
prefillEmail: this.options.prefillEmail,
|
|
3399
3385
|
appearance: this.parent.getAppearance(),
|
|
3400
3386
|
orderTypes: this.options.orderTypes,
|
|
3401
|
-
defaultOrderType: this.options.defaultOrderType
|
|
3387
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
3388
|
+
renderSubmitButton: true
|
|
3402
3389
|
});
|
|
3403
3390
|
const token = this.parent.getAccessToken();
|
|
3404
3391
|
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
@@ -3465,6 +3452,9 @@ var CimplifyElement = class {
|
|
|
3465
3452
|
case MESSAGE_TYPES.ORDER_TYPE_CHANGED:
|
|
3466
3453
|
this.emit(EVENT_TYPES.ORDER_TYPE_CHANGED, { orderType: message.orderType });
|
|
3467
3454
|
break;
|
|
3455
|
+
case MESSAGE_TYPES.REQUEST_SUBMIT:
|
|
3456
|
+
this.emit(EVENT_TYPES.REQUEST_SUBMIT, {});
|
|
3457
|
+
break;
|
|
3468
3458
|
}
|
|
3469
3459
|
}
|
|
3470
3460
|
emit(event, data) {
|
package/dist/react.mjs
CHANGED
|
@@ -31,7 +31,8 @@ var MESSAGE_TYPES = {
|
|
|
31
31
|
CONTACT_PROVIDED: "contact_provided",
|
|
32
32
|
CHECKOUT_STATUS: "checkout_status",
|
|
33
33
|
CHECKOUT_COMPLETE: "checkout_complete",
|
|
34
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
34
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
35
|
+
REQUEST_SUBMIT: "request_submit"
|
|
35
36
|
};
|
|
36
37
|
var EVENT_TYPES = {
|
|
37
38
|
READY: "ready",
|
|
@@ -39,7 +40,8 @@ var EVENT_TYPES = {
|
|
|
39
40
|
REQUIRES_OTP: "requires_otp",
|
|
40
41
|
ERROR: "error",
|
|
41
42
|
CHANGE: "change",
|
|
42
|
-
ORDER_TYPE_CHANGED: "order_type_changed"
|
|
43
|
+
ORDER_TYPE_CHANGED: "order_type_changed",
|
|
44
|
+
REQUEST_SUBMIT: "request_submit"
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
// src/ads/identity.ts
|
|
@@ -341,7 +343,7 @@ function Ad({
|
|
|
341
343
|
}
|
|
342
344
|
);
|
|
343
345
|
}
|
|
344
|
-
var SPACE = { sm: 8
|
|
346
|
+
var SPACE = { sm: 8};
|
|
345
347
|
function shellColors(isDark, primaryColor) {
|
|
346
348
|
return {
|
|
347
349
|
text: isDark ? "#f4f4f5" : "#1a1a1a",
|
|
@@ -417,6 +419,8 @@ function CimplifyCheckout({
|
|
|
417
419
|
const onCompleteRef = useRef(onComplete);
|
|
418
420
|
const onErrorRef = useRef(onError);
|
|
419
421
|
const onStatusChangeRef = useRef(onStatusChange);
|
|
422
|
+
const handleSubmitRef = useRef(async () => {
|
|
423
|
+
});
|
|
420
424
|
onCompleteRef.current = onComplete;
|
|
421
425
|
onErrorRef.current = onError;
|
|
422
426
|
onStatusChangeRef.current = onStatusChange;
|
|
@@ -547,6 +551,9 @@ function CimplifyCheckout({
|
|
|
547
551
|
setOrderType(typed.orderType);
|
|
548
552
|
}
|
|
549
553
|
});
|
|
554
|
+
checkout.on("request_submit", () => {
|
|
555
|
+
void handleSubmitRef.current();
|
|
556
|
+
});
|
|
550
557
|
return () => {
|
|
551
558
|
activeCheckoutRef.current?.abort();
|
|
552
559
|
activeCheckoutRef.current = null;
|
|
@@ -644,6 +651,7 @@ function CimplifyCheckout({
|
|
|
644
651
|
locationId,
|
|
645
652
|
orderType
|
|
646
653
|
]);
|
|
654
|
+
handleSubmitRef.current = handleSubmit;
|
|
647
655
|
const colors = shellColors(isDark ?? false, primaryColor);
|
|
648
656
|
if (isInitializing) {
|
|
649
657
|
return /* @__PURE__ */ jsx("div", { className, "data-cimplify-checkout": "", children: /* @__PURE__ */ jsx("p", { "data-cimplify-status": "", style: { fontSize: 13, color: colors.textSecondary }, children: "Preparing checkout..." }) });
|
|
@@ -666,28 +674,6 @@ function CimplifyCheckout({
|
|
|
666
674
|
}
|
|
667
675
|
),
|
|
668
676
|
/* @__PURE__ */ jsx("div", { "data-cimplify-section": "checkout", children: /* @__PURE__ */ jsx("div", { ref: isDemoCheckout ? void 0 : checkoutMountRef }) }),
|
|
669
|
-
/* @__PURE__ */ jsx("div", { style: { marginTop: SPACE.xl }, children: /* @__PURE__ */ jsx(
|
|
670
|
-
"button",
|
|
671
|
-
{
|
|
672
|
-
type: "button",
|
|
673
|
-
onClick: handleSubmit,
|
|
674
|
-
disabled: isSubmitting,
|
|
675
|
-
style: {
|
|
676
|
-
width: "100%",
|
|
677
|
-
padding: `${SPACE.md}px ${SPACE.lg}px`,
|
|
678
|
-
borderRadius: 8,
|
|
679
|
-
border: "none",
|
|
680
|
-
background: isSubmitting ? colors.textMuted : primaryColor,
|
|
681
|
-
color: "#ffffff",
|
|
682
|
-
cursor: isSubmitting ? "not-allowed" : "pointer",
|
|
683
|
-
fontWeight: 600,
|
|
684
|
-
fontSize: 16,
|
|
685
|
-
transition: "all 150ms ease",
|
|
686
|
-
WebkitTapHighlightColor: "transparent"
|
|
687
|
-
},
|
|
688
|
-
children: isSubmitting ? "Processing..." : "Complete Order"
|
|
689
|
-
}
|
|
690
|
-
) }),
|
|
691
677
|
status && /* @__PURE__ */ jsx("p", { "data-cimplify-status": "", style: { marginTop: SPACE.sm, fontSize: 13, color: colors.textSecondary }, children: statusText || statusToLabel(status) }),
|
|
692
678
|
errorMessage && /* @__PURE__ */ jsx("p", { "data-cimplify-error": "", style: { marginTop: SPACE.sm, fontSize: 13, color: colors.error }, children: errorMessage })
|
|
693
679
|
] });
|
|
@@ -3396,7 +3382,8 @@ var CimplifyElement = class {
|
|
|
3396
3382
|
prefillEmail: this.options.prefillEmail,
|
|
3397
3383
|
appearance: this.parent.getAppearance(),
|
|
3398
3384
|
orderTypes: this.options.orderTypes,
|
|
3399
|
-
defaultOrderType: this.options.defaultOrderType
|
|
3385
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
3386
|
+
renderSubmitButton: true
|
|
3400
3387
|
});
|
|
3401
3388
|
const token = this.parent.getAccessToken();
|
|
3402
3389
|
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
@@ -3463,6 +3450,9 @@ var CimplifyElement = class {
|
|
|
3463
3450
|
case MESSAGE_TYPES.ORDER_TYPE_CHANGED:
|
|
3464
3451
|
this.emit(EVENT_TYPES.ORDER_TYPE_CHANGED, { orderType: message.orderType });
|
|
3465
3452
|
break;
|
|
3453
|
+
case MESSAGE_TYPES.REQUEST_SUBMIT:
|
|
3454
|
+
this.emit(EVENT_TYPES.REQUEST_SUBMIT, {});
|
|
3455
|
+
break;
|
|
3466
3456
|
}
|
|
3467
3457
|
}
|
|
3468
3458
|
emit(event, data) {
|