@cimplify/sdk 0.7.8 → 0.7.10

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.
@@ -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-DsmJAS8Q.mjs';
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-Bj4y523g.mjs';
2
2
  import './payment-CLIWNMaP.mjs';
3
3
 
4
4
  type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
@@ -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-Rr78TLMS.js';
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-CUYaKDjB.js';
2
2
  import './payment-CLIWNMaP.js';
3
3
 
4
4
  type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
package/dist/advanced.js CHANGED
@@ -2158,6 +2158,7 @@ var MESSAGE_TYPES = {
2158
2158
  PAYMENT_METHOD_SELECTED: "payment_method_selected",
2159
2159
  TOKEN_REFRESHED: "token_refreshed",
2160
2160
  LOGOUT_COMPLETE: "logout_complete",
2161
+ CONTACT_PROVIDED: "contact_provided",
2161
2162
  CHECKOUT_STATUS: "checkout_status",
2162
2163
  CHECKOUT_COMPLETE: "checkout_complete"
2163
2164
  };
@@ -2228,7 +2229,6 @@ var CimplifyElements = class {
2228
2229
  this.paymentData = null;
2229
2230
  this.checkoutInProgress = false;
2230
2231
  this.activeCheckoutAbort = null;
2231
- this.hasWarnedMissingAuthElement = false;
2232
2232
  this.businessIdResolvePromise = null;
2233
2233
  this.client = client;
2234
2234
  this.businessId = businessId ?? null;
@@ -2324,12 +2324,6 @@ var CimplifyElements = class {
2324
2324
  );
2325
2325
  }
2326
2326
  const authElement = this.elements.get(ELEMENT_TYPES.AUTH);
2327
- if (!authElement && !this.hasWarnedMissingAuthElement) {
2328
- this.hasWarnedMissingAuthElement = true;
2329
- console.warn(
2330
- "[Cimplify] processCheckout() called without AuthElement mounted. For best conversion and Link enrollment, mount <AuthElement> before checkout."
2331
- );
2332
- }
2333
2327
  if (authElement && !this.accessToken) {
2334
2328
  return toCheckoutError(
2335
2329
  "AUTH_INCOMPLETE",
@@ -2533,6 +2527,16 @@ var CimplifyElements = class {
2533
2527
  case MESSAGE_TYPES.PAYMENT_METHOD_SELECTED:
2534
2528
  this.paymentData = message.method;
2535
2529
  break;
2530
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
2531
+ if (!this.customerData) {
2532
+ this.customerData = { name: "", email: null, phone: null };
2533
+ }
2534
+ if (message.contactType === "email") {
2535
+ this.customerData.email = message.contact;
2536
+ } else {
2537
+ this.customerData.phone = message.contact;
2538
+ }
2539
+ break;
2536
2540
  case MESSAGE_TYPES.LOGOUT_COMPLETE:
2537
2541
  if (this.checkoutInProgress && this.activeCheckoutAbort) {
2538
2542
  this.activeCheckoutAbort();
@@ -2553,6 +2557,16 @@ var CimplifyElements = class {
2553
2557
  _setPaymentData(data) {
2554
2558
  this.paymentData = data;
2555
2559
  }
2560
+ _setGuestContact(contact, contactType) {
2561
+ if (!this.customerData) {
2562
+ this.customerData = { name: "", email: null, phone: null };
2563
+ }
2564
+ if (contactType === "email") {
2565
+ this.customerData.email = contact;
2566
+ } else {
2567
+ this.customerData.phone = contact;
2568
+ }
2569
+ }
2556
2570
  };
2557
2571
  var CimplifyElement = class {
2558
2572
  constructor(type, businessId, linkUrl, options, parent) {
@@ -2661,6 +2675,7 @@ var CimplifyElement = class {
2661
2675
  iframe.style.width = "100%";
2662
2676
  iframe.style.display = "block";
2663
2677
  iframe.style.overflow = "hidden";
2678
+ iframe.style.background = "transparent";
2664
2679
  iframe.setAttribute("allowtransparency", "true");
2665
2680
  iframe.setAttribute("frameborder", "0");
2666
2681
  iframe.setAttribute(
@@ -2738,6 +2753,9 @@ var CimplifyElement = class {
2738
2753
  this.emit(EVENT_TYPES.CHANGE, { paymentMethod: message.method });
2739
2754
  this.resolveData(message.method);
2740
2755
  break;
2756
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
2757
+ this.parent._setGuestContact(message.contact, message.contactType);
2758
+ break;
2741
2759
  }
2742
2760
  }
2743
2761
  emit(event, data) {
package/dist/advanced.mjs CHANGED
@@ -2156,6 +2156,7 @@ var MESSAGE_TYPES = {
2156
2156
  PAYMENT_METHOD_SELECTED: "payment_method_selected",
2157
2157
  TOKEN_REFRESHED: "token_refreshed",
2158
2158
  LOGOUT_COMPLETE: "logout_complete",
2159
+ CONTACT_PROVIDED: "contact_provided",
2159
2160
  CHECKOUT_STATUS: "checkout_status",
2160
2161
  CHECKOUT_COMPLETE: "checkout_complete"
2161
2162
  };
@@ -2226,7 +2227,6 @@ var CimplifyElements = class {
2226
2227
  this.paymentData = null;
2227
2228
  this.checkoutInProgress = false;
2228
2229
  this.activeCheckoutAbort = null;
2229
- this.hasWarnedMissingAuthElement = false;
2230
2230
  this.businessIdResolvePromise = null;
2231
2231
  this.client = client;
2232
2232
  this.businessId = businessId ?? null;
@@ -2322,12 +2322,6 @@ var CimplifyElements = class {
2322
2322
  );
2323
2323
  }
2324
2324
  const authElement = this.elements.get(ELEMENT_TYPES.AUTH);
2325
- if (!authElement && !this.hasWarnedMissingAuthElement) {
2326
- this.hasWarnedMissingAuthElement = true;
2327
- console.warn(
2328
- "[Cimplify] processCheckout() called without AuthElement mounted. For best conversion and Link enrollment, mount <AuthElement> before checkout."
2329
- );
2330
- }
2331
2325
  if (authElement && !this.accessToken) {
2332
2326
  return toCheckoutError(
2333
2327
  "AUTH_INCOMPLETE",
@@ -2531,6 +2525,16 @@ var CimplifyElements = class {
2531
2525
  case MESSAGE_TYPES.PAYMENT_METHOD_SELECTED:
2532
2526
  this.paymentData = message.method;
2533
2527
  break;
2528
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
2529
+ if (!this.customerData) {
2530
+ this.customerData = { name: "", email: null, phone: null };
2531
+ }
2532
+ if (message.contactType === "email") {
2533
+ this.customerData.email = message.contact;
2534
+ } else {
2535
+ this.customerData.phone = message.contact;
2536
+ }
2537
+ break;
2534
2538
  case MESSAGE_TYPES.LOGOUT_COMPLETE:
2535
2539
  if (this.checkoutInProgress && this.activeCheckoutAbort) {
2536
2540
  this.activeCheckoutAbort();
@@ -2551,6 +2555,16 @@ var CimplifyElements = class {
2551
2555
  _setPaymentData(data) {
2552
2556
  this.paymentData = data;
2553
2557
  }
2558
+ _setGuestContact(contact, contactType) {
2559
+ if (!this.customerData) {
2560
+ this.customerData = { name: "", email: null, phone: null };
2561
+ }
2562
+ if (contactType === "email") {
2563
+ this.customerData.email = contact;
2564
+ } else {
2565
+ this.customerData.phone = contact;
2566
+ }
2567
+ }
2554
2568
  };
2555
2569
  var CimplifyElement = class {
2556
2570
  constructor(type, businessId, linkUrl, options, parent) {
@@ -2659,6 +2673,7 @@ var CimplifyElement = class {
2659
2673
  iframe.style.width = "100%";
2660
2674
  iframe.style.display = "block";
2661
2675
  iframe.style.overflow = "hidden";
2676
+ iframe.style.background = "transparent";
2662
2677
  iframe.setAttribute("allowtransparency", "true");
2663
2678
  iframe.setAttribute("frameborder", "0");
2664
2679
  iframe.setAttribute(
@@ -2736,6 +2751,9 @@ var CimplifyElement = class {
2736
2751
  this.emit(EVENT_TYPES.CHANGE, { paymentMethod: message.method });
2737
2752
  this.resolveData(message.method);
2738
2753
  break;
2754
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
2755
+ this.parent._setGuestContact(message.contact, message.contactType);
2756
+ break;
2739
2757
  }
2740
2758
  }
2741
2759
  emit(event, data) {
@@ -1907,6 +1907,7 @@ declare const MESSAGE_TYPES: {
1907
1907
  readonly PAYMENT_METHOD_SELECTED: "payment_method_selected";
1908
1908
  readonly TOKEN_REFRESHED: "token_refreshed";
1909
1909
  readonly LOGOUT_COMPLETE: "logout_complete";
1910
+ readonly CONTACT_PROVIDED: "contact_provided";
1910
1911
  readonly CHECKOUT_STATUS: "checkout_status";
1911
1912
  readonly CHECKOUT_COMPLETE: "checkout_complete";
1912
1913
  };
@@ -2031,6 +2032,10 @@ type IframeToParentMessage = {
2031
2032
  } | {
2032
2033
  type: typeof MESSAGE_TYPES.REQUIRES_OTP;
2033
2034
  contactMasked: string;
2035
+ } | {
2036
+ type: typeof MESSAGE_TYPES.CONTACT_PROVIDED;
2037
+ contact: string;
2038
+ contactType: "email" | "phone";
2034
2039
  } | {
2035
2040
  type: typeof MESSAGE_TYPES.ERROR;
2036
2041
  code: string;
@@ -2098,7 +2103,6 @@ declare class CimplifyElements {
2098
2103
  private paymentData;
2099
2104
  private checkoutInProgress;
2100
2105
  private activeCheckoutAbort;
2101
- private hasWarnedMissingAuthElement;
2102
2106
  private boundHandleMessage;
2103
2107
  private businessIdResolvePromise;
2104
2108
  constructor(client: CimplifyClient, businessId?: string, options?: ElementsOptions);
@@ -2117,6 +2121,7 @@ declare class CimplifyElements {
2117
2121
  private handleMessage;
2118
2122
  _setAddressData(data: AddressInfo): void;
2119
2123
  _setPaymentData(data: PaymentMethodInfo): void;
2124
+ _setGuestContact(contact: string, contactType: "email" | "phone"): void;
2120
2125
  }
2121
2126
  declare class CimplifyElement {
2122
2127
  private type;
@@ -1907,6 +1907,7 @@ declare const MESSAGE_TYPES: {
1907
1907
  readonly PAYMENT_METHOD_SELECTED: "payment_method_selected";
1908
1908
  readonly TOKEN_REFRESHED: "token_refreshed";
1909
1909
  readonly LOGOUT_COMPLETE: "logout_complete";
1910
+ readonly CONTACT_PROVIDED: "contact_provided";
1910
1911
  readonly CHECKOUT_STATUS: "checkout_status";
1911
1912
  readonly CHECKOUT_COMPLETE: "checkout_complete";
1912
1913
  };
@@ -2031,6 +2032,10 @@ type IframeToParentMessage = {
2031
2032
  } | {
2032
2033
  type: typeof MESSAGE_TYPES.REQUIRES_OTP;
2033
2034
  contactMasked: string;
2035
+ } | {
2036
+ type: typeof MESSAGE_TYPES.CONTACT_PROVIDED;
2037
+ contact: string;
2038
+ contactType: "email" | "phone";
2034
2039
  } | {
2035
2040
  type: typeof MESSAGE_TYPES.ERROR;
2036
2041
  code: string;
@@ -2098,7 +2103,6 @@ declare class CimplifyElements {
2098
2103
  private paymentData;
2099
2104
  private checkoutInProgress;
2100
2105
  private activeCheckoutAbort;
2101
- private hasWarnedMissingAuthElement;
2102
2106
  private boundHandleMessage;
2103
2107
  private businessIdResolvePromise;
2104
2108
  constructor(client: CimplifyClient, businessId?: string, options?: ElementsOptions);
@@ -2117,6 +2121,7 @@ declare class CimplifyElements {
2117
2121
  private handleMessage;
2118
2122
  _setAddressData(data: AddressInfo): void;
2119
2123
  _setPaymentData(data: PaymentMethodInfo): void;
2124
+ _setGuestContact(contact: string, contactType: "email" | "phone"): void;
2120
2125
  }
2121
2126
  declare class CimplifyElement {
2122
2127
  private type;
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, cE as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cG as AuthenticatedCustomer, cI 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, cD as ElementAppearance, cN as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cJ as ElementsCheckoutData, cK as ElementsCheckoutResult, cH 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, cM 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, n as OtpResult, a5 as PAYMENT_METHOD, ah as PAYMENT_MUTATION, a7 as PAYMENT_STATE, a8 as PICKUP_TIME_TYPE, cL as ParentToIframeMessage, cF 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-DsmJAS8Q.mjs';
1
+ export { aa as AUTHORIZATION_TYPE, af as AUTH_MUTATION, $ as AbortablePromise, cc as AddressData, cE as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cG as AuthenticatedCustomer, cI 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, cD as ElementAppearance, cN as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cJ as ElementsCheckoutData, cK as ElementsCheckoutResult, cH 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, cM 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, n as OtpResult, a5 as PAYMENT_METHOD, ah as PAYMENT_MUTATION, a7 as PAYMENT_STATE, a8 as PICKUP_TIME_TYPE, cL as ParentToIframeMessage, cF 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-Bj4y523g.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, cE as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cG as AuthenticatedCustomer, cI 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, cD as ElementAppearance, cN as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cJ as ElementsCheckoutData, cK as ElementsCheckoutResult, cH 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, cM 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, n as OtpResult, a5 as PAYMENT_METHOD, ah as PAYMENT_MUTATION, a7 as PAYMENT_STATE, a8 as PICKUP_TIME_TYPE, cL as ParentToIframeMessage, cF 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-Rr78TLMS.js';
1
+ export { aa as AUTHORIZATION_TYPE, af as AUTH_MUTATION, $ as AbortablePromise, cc as AddressData, cE as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cG as AuthenticatedCustomer, cI 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, cD as ElementAppearance, cN as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cJ as ElementsCheckoutData, cK as ElementsCheckoutResult, cH 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, cM 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, n as OtpResult, a5 as PAYMENT_METHOD, ah as PAYMENT_MUTATION, a7 as PAYMENT_STATE, a8 as PICKUP_TIME_TYPE, cL as ParentToIframeMessage, cF 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-CUYaKDjB.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
@@ -2606,6 +2606,7 @@ var MESSAGE_TYPES = {
2606
2606
  PAYMENT_METHOD_SELECTED: "payment_method_selected",
2607
2607
  TOKEN_REFRESHED: "token_refreshed",
2608
2608
  LOGOUT_COMPLETE: "logout_complete",
2609
+ CONTACT_PROVIDED: "contact_provided",
2609
2610
  CHECKOUT_STATUS: "checkout_status",
2610
2611
  CHECKOUT_COMPLETE: "checkout_complete"
2611
2612
  };
@@ -2676,7 +2677,6 @@ var CimplifyElements = class {
2676
2677
  this.paymentData = null;
2677
2678
  this.checkoutInProgress = false;
2678
2679
  this.activeCheckoutAbort = null;
2679
- this.hasWarnedMissingAuthElement = false;
2680
2680
  this.businessIdResolvePromise = null;
2681
2681
  this.client = client;
2682
2682
  this.businessId = businessId ?? null;
@@ -2772,12 +2772,6 @@ var CimplifyElements = class {
2772
2772
  );
2773
2773
  }
2774
2774
  const authElement = this.elements.get(ELEMENT_TYPES.AUTH);
2775
- if (!authElement && !this.hasWarnedMissingAuthElement) {
2776
- this.hasWarnedMissingAuthElement = true;
2777
- console.warn(
2778
- "[Cimplify] processCheckout() called without AuthElement mounted. For best conversion and Link enrollment, mount <AuthElement> before checkout."
2779
- );
2780
- }
2781
2775
  if (authElement && !this.accessToken) {
2782
2776
  return toCheckoutError(
2783
2777
  "AUTH_INCOMPLETE",
@@ -2981,6 +2975,16 @@ var CimplifyElements = class {
2981
2975
  case MESSAGE_TYPES.PAYMENT_METHOD_SELECTED:
2982
2976
  this.paymentData = message.method;
2983
2977
  break;
2978
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
2979
+ if (!this.customerData) {
2980
+ this.customerData = { name: "", email: null, phone: null };
2981
+ }
2982
+ if (message.contactType === "email") {
2983
+ this.customerData.email = message.contact;
2984
+ } else {
2985
+ this.customerData.phone = message.contact;
2986
+ }
2987
+ break;
2984
2988
  case MESSAGE_TYPES.LOGOUT_COMPLETE:
2985
2989
  if (this.checkoutInProgress && this.activeCheckoutAbort) {
2986
2990
  this.activeCheckoutAbort();
@@ -3001,6 +3005,16 @@ var CimplifyElements = class {
3001
3005
  _setPaymentData(data) {
3002
3006
  this.paymentData = data;
3003
3007
  }
3008
+ _setGuestContact(contact, contactType) {
3009
+ if (!this.customerData) {
3010
+ this.customerData = { name: "", email: null, phone: null };
3011
+ }
3012
+ if (contactType === "email") {
3013
+ this.customerData.email = contact;
3014
+ } else {
3015
+ this.customerData.phone = contact;
3016
+ }
3017
+ }
3004
3018
  };
3005
3019
  var CimplifyElement = class {
3006
3020
  constructor(type, businessId, linkUrl, options, parent) {
@@ -3109,6 +3123,7 @@ var CimplifyElement = class {
3109
3123
  iframe.style.width = "100%";
3110
3124
  iframe.style.display = "block";
3111
3125
  iframe.style.overflow = "hidden";
3126
+ iframe.style.background = "transparent";
3112
3127
  iframe.setAttribute("allowtransparency", "true");
3113
3128
  iframe.setAttribute("frameborder", "0");
3114
3129
  iframe.setAttribute(
@@ -3186,6 +3201,9 @@ var CimplifyElement = class {
3186
3201
  this.emit(EVENT_TYPES.CHANGE, { paymentMethod: message.method });
3187
3202
  this.resolveData(message.method);
3188
3203
  break;
3204
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
3205
+ this.parent._setGuestContact(message.contact, message.contactType);
3206
+ break;
3189
3207
  }
3190
3208
  }
3191
3209
  emit(event, data) {
package/dist/index.mjs CHANGED
@@ -2604,6 +2604,7 @@ var MESSAGE_TYPES = {
2604
2604
  PAYMENT_METHOD_SELECTED: "payment_method_selected",
2605
2605
  TOKEN_REFRESHED: "token_refreshed",
2606
2606
  LOGOUT_COMPLETE: "logout_complete",
2607
+ CONTACT_PROVIDED: "contact_provided",
2607
2608
  CHECKOUT_STATUS: "checkout_status",
2608
2609
  CHECKOUT_COMPLETE: "checkout_complete"
2609
2610
  };
@@ -2674,7 +2675,6 @@ var CimplifyElements = class {
2674
2675
  this.paymentData = null;
2675
2676
  this.checkoutInProgress = false;
2676
2677
  this.activeCheckoutAbort = null;
2677
- this.hasWarnedMissingAuthElement = false;
2678
2678
  this.businessIdResolvePromise = null;
2679
2679
  this.client = client;
2680
2680
  this.businessId = businessId ?? null;
@@ -2770,12 +2770,6 @@ var CimplifyElements = class {
2770
2770
  );
2771
2771
  }
2772
2772
  const authElement = this.elements.get(ELEMENT_TYPES.AUTH);
2773
- if (!authElement && !this.hasWarnedMissingAuthElement) {
2774
- this.hasWarnedMissingAuthElement = true;
2775
- console.warn(
2776
- "[Cimplify] processCheckout() called without AuthElement mounted. For best conversion and Link enrollment, mount <AuthElement> before checkout."
2777
- );
2778
- }
2779
2773
  if (authElement && !this.accessToken) {
2780
2774
  return toCheckoutError(
2781
2775
  "AUTH_INCOMPLETE",
@@ -2979,6 +2973,16 @@ var CimplifyElements = class {
2979
2973
  case MESSAGE_TYPES.PAYMENT_METHOD_SELECTED:
2980
2974
  this.paymentData = message.method;
2981
2975
  break;
2976
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
2977
+ if (!this.customerData) {
2978
+ this.customerData = { name: "", email: null, phone: null };
2979
+ }
2980
+ if (message.contactType === "email") {
2981
+ this.customerData.email = message.contact;
2982
+ } else {
2983
+ this.customerData.phone = message.contact;
2984
+ }
2985
+ break;
2982
2986
  case MESSAGE_TYPES.LOGOUT_COMPLETE:
2983
2987
  if (this.checkoutInProgress && this.activeCheckoutAbort) {
2984
2988
  this.activeCheckoutAbort();
@@ -2999,6 +3003,16 @@ var CimplifyElements = class {
2999
3003
  _setPaymentData(data) {
3000
3004
  this.paymentData = data;
3001
3005
  }
3006
+ _setGuestContact(contact, contactType) {
3007
+ if (!this.customerData) {
3008
+ this.customerData = { name: "", email: null, phone: null };
3009
+ }
3010
+ if (contactType === "email") {
3011
+ this.customerData.email = contact;
3012
+ } else {
3013
+ this.customerData.phone = contact;
3014
+ }
3015
+ }
3002
3016
  };
3003
3017
  var CimplifyElement = class {
3004
3018
  constructor(type, businessId, linkUrl, options, parent) {
@@ -3107,6 +3121,7 @@ var CimplifyElement = class {
3107
3121
  iframe.style.width = "100%";
3108
3122
  iframe.style.display = "block";
3109
3123
  iframe.style.overflow = "hidden";
3124
+ iframe.style.background = "transparent";
3110
3125
  iframe.setAttribute("allowtransparency", "true");
3111
3126
  iframe.setAttribute("frameborder", "0");
3112
3127
  iframe.setAttribute(
@@ -3184,6 +3199,9 @@ var CimplifyElement = class {
3184
3199
  this.emit(EVENT_TYPES.CHANGE, { paymentMethod: message.method });
3185
3200
  this.resolveData(message.method);
3186
3201
  break;
3202
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
3203
+ this.parent._setGuestContact(message.contact, message.contactType);
3204
+ break;
3187
3205
  }
3188
3206
  }
3189
3207
  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, cI as AuthenticatedData, cE as AddressInfo, cF as PaymentMethodInfo, cK as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-DsmJAS8Q.mjs';
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, cI as AuthenticatedData, cE as AddressInfo, cF as PaymentMethodInfo, cK as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-Bj4y523g.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, cI as AuthenticatedData, cE as AddressInfo, cF as PaymentMethodInfo, cK as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-Rr78TLMS.js';
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, cI as AuthenticatedData, cE as AddressInfo, cF as PaymentMethodInfo, cK as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-CUYaKDjB.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
@@ -29,6 +29,7 @@ var MESSAGE_TYPES = {
29
29
  PAYMENT_METHOD_SELECTED: "payment_method_selected",
30
30
  TOKEN_REFRESHED: "token_refreshed",
31
31
  LOGOUT_COMPLETE: "logout_complete",
32
+ CONTACT_PROVIDED: "contact_provided",
32
33
  CHECKOUT_STATUS: "checkout_status",
33
34
  CHECKOUT_COMPLETE: "checkout_complete"
34
35
  };
@@ -401,7 +402,6 @@ function CimplifyCheckout({
401
402
  const [errorMessage, setErrorMessage] = react.useState(null);
402
403
  const [resolvedBusinessId, setResolvedBusinessId] = react.useState(businessId ?? null);
403
404
  const [resolvedCartId, setResolvedCartId] = react.useState(cartId ?? null);
404
- const authMountRef = react.useRef(null);
405
405
  const addressMountRef = react.useRef(null);
406
406
  const paymentMountRef = react.useRef(null);
407
407
  const elementsRef = react.useRef(null);
@@ -524,12 +524,8 @@ function CimplifyCheckout({
524
524
  linkUrl
525
525
  });
526
526
  elementsRef.current = elements;
527
- const auth = elements.create("auth");
528
527
  const address = elements.create("address", { mode: "shipping" });
529
528
  const payment = elements.create("payment");
530
- if (authMountRef.current) {
531
- auth.mount(authMountRef.current);
532
- }
533
529
  if (addressMountRef.current) {
534
530
  address.mount(addressMountRef.current);
535
531
  }
@@ -655,7 +651,7 @@ function CimplifyCheckout({
655
651
  children: "Test mode - no real charges"
656
652
  }
657
653
  ),
658
- /* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-section": "auth", children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: isDemoCheckout ? void 0 : authMountRef }) }),
654
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-section": "payment", children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: isDemoCheckout ? void 0 : paymentMountRef }) }),
659
655
  /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-section": "order-type", style: { marginTop: "20px" }, children: [
660
656
  /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "13px", fontWeight: 500, color: isDark ? "#a1a1aa" : "#71717a", marginBottom: "8px" }, children: "Order type" }),
661
657
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -699,10 +695,6 @@ function CimplifyCheckout({
699
695
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: isDemoCheckout ? void 0 : addressMountRef })
700
696
  }
701
697
  ),
702
- /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-section": "payment", style: { marginTop: "20px" }, children: [
703
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "13px", fontWeight: 500, color: isDark ? "#a1a1aa" : "#71717a", marginBottom: "8px" }, children: "Payment method" }),
704
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: isDemoCheckout ? void 0 : paymentMountRef })
705
- ] }),
706
698
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: "24px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
707
699
  "button",
708
700
  {
@@ -2936,7 +2928,6 @@ var CimplifyElements = class {
2936
2928
  this.paymentData = null;
2937
2929
  this.checkoutInProgress = false;
2938
2930
  this.activeCheckoutAbort = null;
2939
- this.hasWarnedMissingAuthElement = false;
2940
2931
  this.businessIdResolvePromise = null;
2941
2932
  this.client = client;
2942
2933
  this.businessId = businessId ?? null;
@@ -3032,12 +3023,6 @@ var CimplifyElements = class {
3032
3023
  );
3033
3024
  }
3034
3025
  const authElement = this.elements.get(ELEMENT_TYPES.AUTH);
3035
- if (!authElement && !this.hasWarnedMissingAuthElement) {
3036
- this.hasWarnedMissingAuthElement = true;
3037
- console.warn(
3038
- "[Cimplify] processCheckout() called without AuthElement mounted. For best conversion and Link enrollment, mount <AuthElement> before checkout."
3039
- );
3040
- }
3041
3026
  if (authElement && !this.accessToken) {
3042
3027
  return toCheckoutError(
3043
3028
  "AUTH_INCOMPLETE",
@@ -3241,6 +3226,16 @@ var CimplifyElements = class {
3241
3226
  case MESSAGE_TYPES.PAYMENT_METHOD_SELECTED:
3242
3227
  this.paymentData = message.method;
3243
3228
  break;
3229
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
3230
+ if (!this.customerData) {
3231
+ this.customerData = { name: "", email: null, phone: null };
3232
+ }
3233
+ if (message.contactType === "email") {
3234
+ this.customerData.email = message.contact;
3235
+ } else {
3236
+ this.customerData.phone = message.contact;
3237
+ }
3238
+ break;
3244
3239
  case MESSAGE_TYPES.LOGOUT_COMPLETE:
3245
3240
  if (this.checkoutInProgress && this.activeCheckoutAbort) {
3246
3241
  this.activeCheckoutAbort();
@@ -3261,6 +3256,16 @@ var CimplifyElements = class {
3261
3256
  _setPaymentData(data) {
3262
3257
  this.paymentData = data;
3263
3258
  }
3259
+ _setGuestContact(contact, contactType) {
3260
+ if (!this.customerData) {
3261
+ this.customerData = { name: "", email: null, phone: null };
3262
+ }
3263
+ if (contactType === "email") {
3264
+ this.customerData.email = contact;
3265
+ } else {
3266
+ this.customerData.phone = contact;
3267
+ }
3268
+ }
3264
3269
  };
3265
3270
  var CimplifyElement = class {
3266
3271
  constructor(type, businessId, linkUrl, options, parent) {
@@ -3369,6 +3374,7 @@ var CimplifyElement = class {
3369
3374
  iframe.style.width = "100%";
3370
3375
  iframe.style.display = "block";
3371
3376
  iframe.style.overflow = "hidden";
3377
+ iframe.style.background = "transparent";
3372
3378
  iframe.setAttribute("allowtransparency", "true");
3373
3379
  iframe.setAttribute("frameborder", "0");
3374
3380
  iframe.setAttribute(
@@ -3446,6 +3452,9 @@ var CimplifyElement = class {
3446
3452
  this.emit(EVENT_TYPES.CHANGE, { paymentMethod: message.method });
3447
3453
  this.resolveData(message.method);
3448
3454
  break;
3455
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
3456
+ this.parent._setGuestContact(message.contact, message.contactType);
3457
+ break;
3449
3458
  }
3450
3459
  }
3451
3460
  emit(event, data) {
package/dist/react.mjs CHANGED
@@ -27,6 +27,7 @@ var MESSAGE_TYPES = {
27
27
  PAYMENT_METHOD_SELECTED: "payment_method_selected",
28
28
  TOKEN_REFRESHED: "token_refreshed",
29
29
  LOGOUT_COMPLETE: "logout_complete",
30
+ CONTACT_PROVIDED: "contact_provided",
30
31
  CHECKOUT_STATUS: "checkout_status",
31
32
  CHECKOUT_COMPLETE: "checkout_complete"
32
33
  };
@@ -399,7 +400,6 @@ function CimplifyCheckout({
399
400
  const [errorMessage, setErrorMessage] = useState(null);
400
401
  const [resolvedBusinessId, setResolvedBusinessId] = useState(businessId ?? null);
401
402
  const [resolvedCartId, setResolvedCartId] = useState(cartId ?? null);
402
- const authMountRef = useRef(null);
403
403
  const addressMountRef = useRef(null);
404
404
  const paymentMountRef = useRef(null);
405
405
  const elementsRef = useRef(null);
@@ -522,12 +522,8 @@ function CimplifyCheckout({
522
522
  linkUrl
523
523
  });
524
524
  elementsRef.current = elements;
525
- const auth = elements.create("auth");
526
525
  const address = elements.create("address", { mode: "shipping" });
527
526
  const payment = elements.create("payment");
528
- if (authMountRef.current) {
529
- auth.mount(authMountRef.current);
530
- }
531
527
  if (addressMountRef.current) {
532
528
  address.mount(addressMountRef.current);
533
529
  }
@@ -653,7 +649,7 @@ function CimplifyCheckout({
653
649
  children: "Test mode - no real charges"
654
650
  }
655
651
  ),
656
- /* @__PURE__ */ jsx("div", { "data-cimplify-section": "auth", children: /* @__PURE__ */ jsx("div", { ref: isDemoCheckout ? void 0 : authMountRef }) }),
652
+ /* @__PURE__ */ jsx("div", { "data-cimplify-section": "payment", children: /* @__PURE__ */ jsx("div", { ref: isDemoCheckout ? void 0 : paymentMountRef }) }),
657
653
  /* @__PURE__ */ jsxs("div", { "data-cimplify-section": "order-type", style: { marginTop: "20px" }, children: [
658
654
  /* @__PURE__ */ jsx("p", { style: { fontSize: "13px", fontWeight: 500, color: isDark ? "#a1a1aa" : "#71717a", marginBottom: "8px" }, children: "Order type" }),
659
655
  /* @__PURE__ */ jsx(
@@ -697,10 +693,6 @@ function CimplifyCheckout({
697
693
  children: /* @__PURE__ */ jsx("div", { ref: isDemoCheckout ? void 0 : addressMountRef })
698
694
  }
699
695
  ),
700
- /* @__PURE__ */ jsxs("div", { "data-cimplify-section": "payment", style: { marginTop: "20px" }, children: [
701
- /* @__PURE__ */ jsx("p", { style: { fontSize: "13px", fontWeight: 500, color: isDark ? "#a1a1aa" : "#71717a", marginBottom: "8px" }, children: "Payment method" }),
702
- /* @__PURE__ */ jsx("div", { ref: isDemoCheckout ? void 0 : paymentMountRef })
703
- ] }),
704
696
  /* @__PURE__ */ jsx("div", { style: { marginTop: "24px" }, children: /* @__PURE__ */ jsx(
705
697
  "button",
706
698
  {
@@ -2934,7 +2926,6 @@ var CimplifyElements = class {
2934
2926
  this.paymentData = null;
2935
2927
  this.checkoutInProgress = false;
2936
2928
  this.activeCheckoutAbort = null;
2937
- this.hasWarnedMissingAuthElement = false;
2938
2929
  this.businessIdResolvePromise = null;
2939
2930
  this.client = client;
2940
2931
  this.businessId = businessId ?? null;
@@ -3030,12 +3021,6 @@ var CimplifyElements = class {
3030
3021
  );
3031
3022
  }
3032
3023
  const authElement = this.elements.get(ELEMENT_TYPES.AUTH);
3033
- if (!authElement && !this.hasWarnedMissingAuthElement) {
3034
- this.hasWarnedMissingAuthElement = true;
3035
- console.warn(
3036
- "[Cimplify] processCheckout() called without AuthElement mounted. For best conversion and Link enrollment, mount <AuthElement> before checkout."
3037
- );
3038
- }
3039
3024
  if (authElement && !this.accessToken) {
3040
3025
  return toCheckoutError(
3041
3026
  "AUTH_INCOMPLETE",
@@ -3239,6 +3224,16 @@ var CimplifyElements = class {
3239
3224
  case MESSAGE_TYPES.PAYMENT_METHOD_SELECTED:
3240
3225
  this.paymentData = message.method;
3241
3226
  break;
3227
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
3228
+ if (!this.customerData) {
3229
+ this.customerData = { name: "", email: null, phone: null };
3230
+ }
3231
+ if (message.contactType === "email") {
3232
+ this.customerData.email = message.contact;
3233
+ } else {
3234
+ this.customerData.phone = message.contact;
3235
+ }
3236
+ break;
3242
3237
  case MESSAGE_TYPES.LOGOUT_COMPLETE:
3243
3238
  if (this.checkoutInProgress && this.activeCheckoutAbort) {
3244
3239
  this.activeCheckoutAbort();
@@ -3259,6 +3254,16 @@ var CimplifyElements = class {
3259
3254
  _setPaymentData(data) {
3260
3255
  this.paymentData = data;
3261
3256
  }
3257
+ _setGuestContact(contact, contactType) {
3258
+ if (!this.customerData) {
3259
+ this.customerData = { name: "", email: null, phone: null };
3260
+ }
3261
+ if (contactType === "email") {
3262
+ this.customerData.email = contact;
3263
+ } else {
3264
+ this.customerData.phone = contact;
3265
+ }
3266
+ }
3262
3267
  };
3263
3268
  var CimplifyElement = class {
3264
3269
  constructor(type, businessId, linkUrl, options, parent) {
@@ -3367,6 +3372,7 @@ var CimplifyElement = class {
3367
3372
  iframe.style.width = "100%";
3368
3373
  iframe.style.display = "block";
3369
3374
  iframe.style.overflow = "hidden";
3375
+ iframe.style.background = "transparent";
3370
3376
  iframe.setAttribute("allowtransparency", "true");
3371
3377
  iframe.setAttribute("frameborder", "0");
3372
3378
  iframe.setAttribute(
@@ -3444,6 +3450,9 @@ var CimplifyElement = class {
3444
3450
  this.emit(EVENT_TYPES.CHANGE, { paymentMethod: message.method });
3445
3451
  this.resolveData(message.method);
3446
3452
  break;
3453
+ case MESSAGE_TYPES.CONTACT_PROVIDED:
3454
+ this.parent._setGuestContact(message.contact, message.contactType);
3455
+ break;
3447
3456
  }
3448
3457
  }
3449
3458
  emit(event, data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cimplify/sdk",
3
- "version": "0.7.8",
3
+ "version": "0.7.10",
4
4
  "description": "Cimplify Commerce SDK for storefronts",
5
5
  "keywords": [
6
6
  "cimplify",