@cimplify/sdk 0.15.6 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- export { A as AuthService, B as BusinessService, j as CartOperations, b as CatalogueQueries, k as CheckoutOperations, k as CheckoutService, u as CimplifyElement, t as CimplifyElements, w as ELEMENT_TYPES, E as EVENT_TYPES, D as ElementEventType, y as ElementOptions, z as ElementType, x as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q 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, i as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, v as createElements, l as generateIdempotencyKey } from './client-BSrq89H1.mjs';
2
- import './payment-CrNyrc-D.mjs';
1
+ export { A as AuthService, B as BusinessService, j as CartOperations, b as CatalogueQueries, k as CheckoutOperations, k as CheckoutService, x as CimplifyElement, w as CimplifyElements, z as ELEMENT_TYPES, E as EVENT_TYPES, K as ElementEventType, H as ElementOptions, J as ElementType, D as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q 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, i as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, y as createElements, l as generateIdempotencyKey } from './client-wOQ8P1Ks.mjs';
2
+ import './payment-Dvd7nRmk.mjs';
3
3
 
4
4
  type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
5
5
  type SortOrder = "asc" | "desc";
@@ -1,5 +1,5 @@
1
- export { A as AuthService, B as BusinessService, j as CartOperations, b as CatalogueQueries, k as CheckoutOperations, k as CheckoutService, u as CimplifyElement, t as CimplifyElements, w as ELEMENT_TYPES, E as EVENT_TYPES, D as ElementEventType, y as ElementOptions, z as ElementType, x as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q 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, i as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, v as createElements, l as generateIdempotencyKey } from './client-xBhdHLq4.js';
2
- import './payment-CrNyrc-D.js';
1
+ export { A as AuthService, B as BusinessService, j as CartOperations, b as CatalogueQueries, k as CheckoutOperations, k as CheckoutService, x as CimplifyElement, w as CimplifyElements, z as ELEMENT_TYPES, E as EVENT_TYPES, K as ElementEventType, H as ElementOptions, J as ElementType, D as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q 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, i as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, y as createElements, l as generateIdempotencyKey } from './client-NdvQpCxU.js';
2
+ import './payment-Dvd7nRmk.js';
3
3
 
4
4
  type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
5
5
  type SortOrder = "asc" | "desc";
@@ -1,4 +1,4 @@
1
- import { L as Category, r as Product, G as AddOnWithOptions, b as Pagination, g as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, W as BundleSummary, U as Bundle, a7 as Composite, ae as ComponentSelectionInput, af as CompositePriceResult, aD as ChosenPrice, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, ao as ProductAvailabilityNow, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, au as TagsResponse, b6 as UICart, aT as Cart, aU as CartItem, ba as CartSummary, b8 as AddToCartInput, b9 as UpdateCartItemInput, aH as DiscountDetails, M as Money, C as CurrencyCode, aS as LineConfiguration, bf as AuthorizationType, bh as PaymentMethod, bj as InitializePaymentResult, bn as SubmitAuthorizationInput, bl as PaymentStatusResponse } from './payment-CrNyrc-D.mjs';
1
+ import { L as Category, r as Product, G as AddOnWithOptions, b as Pagination, g as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, W as BundleSummary, U as Bundle, a7 as Composite, ae as ComponentSelectionInput, af as CompositePriceResult, aD as ChosenPrice, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, ao as ProductAvailabilityNow, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, au as TagsResponse, b6 as UICart, aT as Cart, aU as CartItem, ba as CartSummary, b8 as AddToCartInput, b9 as UpdateCartItemInput, aH as DiscountDetails, M as Money, C as CurrencyCode, aS as LineConfiguration, bf as AuthorizationType, bh as PaymentMethod, bj as InitializePaymentResult, bn as SubmitAuthorizationInput, bl as PaymentStatusResponse } from './payment-Dvd7nRmk.js';
2
2
 
3
3
  interface RequestContext {
4
4
  method: "GET" | "POST" | "PATCH" | "DELETE";
@@ -152,6 +152,9 @@ interface PriceQuote {
152
152
  location_id?: string;
153
153
  source: RequestSource;
154
154
  customer_id?: string;
155
+ customer_segment_id?: string;
156
+ storefront_id?: string;
157
+ attribution_id?: string;
155
158
  quantity: number;
156
159
  currency?: string;
157
160
  snapshot_id?: string;
@@ -394,7 +397,7 @@ interface OrderHistory {
394
397
  modified_at: string;
395
398
  metadata?: Record<string, unknown>;
396
399
  }
397
- type OrderGroupPaymentState = "not_paid" | "partially_paid" | "fully_paid" | "refunded";
400
+ type OrderGroupPaymentState = "not_paid" | "partially_paid" | "fully_paid" | "partially_refunded" | "refunded";
398
401
  interface OrderGroup {
399
402
  id: string;
400
403
  business_id: string;
@@ -1598,6 +1601,24 @@ declare class FxService {
1598
1601
  lockQuote(request: FxQuoteRequest): Promise<Result<FxQuote, CimplifyError>>;
1599
1602
  }
1600
1603
 
1604
+ interface TrackProductViewOptions {
1605
+ productName?: string;
1606
+ categoryId?: string;
1607
+ price?: string;
1608
+ pagePath?: string;
1609
+ }
1610
+ interface TrackCategoryViewOptions {
1611
+ categoryName?: string;
1612
+ pagePath?: string;
1613
+ }
1614
+ declare class ActivityService {
1615
+ private client;
1616
+ constructor(client: CimplifyClient);
1617
+ trackProductView(productId: string, options?: TrackProductViewOptions): void;
1618
+ trackCategoryView(categoryId: string, options?: TrackCategoryViewOptions): void;
1619
+ private sendEvents;
1620
+ }
1621
+
1601
1622
  type OrderType = "delivery" | "pickup" | "dine_in";
1602
1623
  declare const ELEMENT_TYPES: {
1603
1624
  readonly AUTH: "auth";
@@ -1963,6 +1984,7 @@ declare class CimplifyClient {
1963
1984
  private _scheduling?;
1964
1985
  private _lite?;
1965
1986
  private _fx?;
1987
+ private _activity?;
1966
1988
  constructor(config?: CimplifyConfig);
1967
1989
  getAccessToken(): string | null;
1968
1990
  getPublicKey(): string;
@@ -2005,8 +2027,9 @@ declare class CimplifyClient {
2005
2027
  get scheduling(): SchedulingService;
2006
2028
  get lite(): LiteService;
2007
2029
  get fx(): FxService;
2030
+ get activity(): ActivityService;
2008
2031
  elements(businessId?: string, options?: ElementsOptions): CimplifyElements;
2009
2032
  }
2010
2033
  declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
2011
2034
 
2012
- export { type CheckoutStatus as $, AuthService as A, BusinessService as B, CimplifyClient as C, type ElementEventType as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type CheckoutMode as H, InventoryService as I, type CheckoutOrderType as J, type CheckoutPaymentMethod as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutStep as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutFormData as V, type CheckoutResult as W, type NextAction as X, type ProcessCheckoutOptions as Y, type ProcessCheckoutResult as Z, type ProcessAndResolveOptions as _, type CimplifyConfig as a, type OrderPaymentEvent as a$, type CheckoutStatusContext as a0, type AbortablePromise as a1, type MobileMoneyProvider as a2, type DeviceType as a3, type ContactType as a4, CHECKOUT_MODE as a5, ORDER_TYPE as a6, PAYMENT_METHOD as a7, CHECKOUT_STEP as a8, PAYMENT_STATE as a9, fromPromise as aA, tryCatch as aB, combine as aC, combineObject as aD, type CatalogueResult as aE, type CatalogueSnapshot as aF, type OrderStatus as aG, type PaymentState as aH, type OrderChannel as aI, type LineType as aJ, type OrderLineState as aK, type OrderLineStatus as aL, type FulfillmentType as aM, type FulfillmentStatus as aN, type FulfillmentLink as aO, type OrderFulfillmentSummary as aP, type FeeBearerType as aQ, type AmountToPay as aR, type LineItem as aS, type Order as aT, type OrderHistory as aU, type OrderGroupPaymentState as aV, type OrderGroup as aW, type OrderGroupPayment as aX, type OrderSplitDetail as aY, type OrderGroupPaymentSummary as aZ, type OrderGroupDetails as a_, PICKUP_TIME_TYPE as aa, MOBILE_MONEY_PROVIDER as ab, AUTHORIZATION_TYPE as ac, DEVICE_TYPE as ad, CONTACT_TYPE as ae, LINK_QUERY as af, LINK_MUTATION as ag, AUTH_MUTATION as ah, CHECKOUT_MUTATION as ai, PAYMENT_MUTATION as aj, ORDER_MUTATION as ak, DEFAULT_CURRENCY as al, DEFAULT_COUNTRY as am, type Result as an, type Ok as ao, type Err as ap, ok as aq, err as ar, isOk as as, isErr as at, mapResult as au, mapError as av, flatMap as aw, getOrElse as ax, unwrap as ay, toNullable as az, CatalogueQueries as b, type LocationStock as b$, type OrderFilter as b0, type CheckoutInput as b1, type UpdateOrderStatusInput as b2, type CancelOrderInput as b3, type RefundOrderInput as b4, type ServiceStatus as b5, type StaffRole as b6, type ReminderMethod as b7, type CustomerServicePreferences as b8, type BufferTimes as b9, type LocationWithDetails as bA, type BusinessSettings as bB, type BusinessHours as bC, type CategoryInfo as bD, type Service as bE, type Staff as bF, type TimeSlot as bG, type AvailableSlot as bH, type DayAvailability as bI, type BookingStatus as bJ, type Booking as bK, type BookingWithDetails as bL, type CustomerBookingServiceItem as bM, type CustomerBooking as bN, type GetAvailableSlotsInput as bO, type CheckSlotAvailabilityInput as bP, type CheckSlotAvailabilityResult as bQ, type RescheduleBookingInput as bR, type CancelBookingInput as bS, type CancelBookingResult as bT, type RescheduleBookingResult as bU, type ServiceAvailabilityParams as bV, type ServiceAvailabilityResult as bW, type StockStatus as bX, type StockLevel as bY, type ProductStock as bZ, type VariantStock as b_, type ReminderSettings as ba, type CancellationPolicy as bb, type ServiceNotes as bc, type PricingOverrides as bd, type SchedulingMetadata as be, type StaffAssignment as bf, type ResourceAssignment as bg, type SchedulingResult as bh, type DepositResult as bi, type ServiceScheduleRequest as bj, type StaffScheduleItem as bk, type LocationAppointment as bl, type BusinessType as bm, type BusinessPreferences as bn, type Business as bo, type LocationTaxBehavior as bp, type LocationTaxOverrides as bq, type Location as br, type TimeRange as bs, type TimeRanges as bt, type LocationTimeProfile as bu, type Table as bv, type Room as bw, type ServiceCharge as bx, type StorefrontBootstrap as by, type BusinessWithLocations as bz, createCimplifyClient as c, type AvailabilityResult as c0, type Customer as c1, type CustomerAddress as c2, type CustomerMobileMoney as c3, type CustomerLinkPreferences as c4, type LinkData as c5, type CreateAddressInput as c6, type UpdateAddressInput as c7, type CreateMobileMoneyInput as c8, type EnrollmentData as c9, type ObservabilityHooks as cA, type OrderType as cB, type ElementAppearance as cC, type AddressInfo as cD, type PaymentMethodInfo as cE, type AuthenticatedCustomer as cF, type ElementsCustomerInfo as cG, type AuthenticatedData as cH, type ElementsCheckoutData as cI, type ElementsCheckoutResult as cJ, type CheckoutCartItem as cK, type CheckoutCartData as cL, type ParentToIframeMessage as cM, type IframeToParentMessage as cN, type ElementEventHandler as cO, type AddressData as ca, type MobileMoneyData as cb, type EnrollAndLinkOrderInput as cc, type LinkStatusResult as cd, type LinkEnrollResult as ce, type EnrollAndLinkOrderResult as cf, type LinkSession as cg, type RevokeSessionResult as ch, type RevokeAllSessionsResult as ci, type RequestOtpInput as cj, type VerifyOtpInput as ck, type AuthResponse as cl, type PickupTimeType as cm, type PickupTime as cn, type CheckoutAddressInfo as co, type MobileMoneyDetails as cp, type CheckoutCustomerInfo as cq, type FxQuoteRequest as cr, type FxQuote as cs, type FxRateResponse as ct, type RequestContext as cu, type RequestStartEvent as cv, type RequestSuccessEvent as cw, type RequestErrorEvent as cx, type RetryEvent as cy, type SessionChangeEvent as cz, type QuoteBundleSelectionInput as d, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RequestSource as h, type RefreshQuoteResult as i, CartOperations as j, CheckoutService as k, generateIdempotencyKey as l, type GetOrdersOptions as m, type AuthStatus as n, type OtpResult as o, SchedulingService as p, LiteService as q, FxService as r, type LiteBootstrap as s, CimplifyElements as t, CimplifyElement as u, createElements as v, ELEMENT_TYPES as w, type ElementsOptions as x, type ElementOptions as y, type ElementType as z };
2035
+ export { type ProcessCheckoutOptions as $, AuthService as A, BusinessService as B, CimplifyClient as C, type ElementsOptions as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type ElementOptions as H, InventoryService as I, type ElementType as J, type ElementEventType as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutMode as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TrackProductViewOptions as T, type UpdateProfileInput as U, type CheckoutOrderType as V, type CheckoutPaymentMethod as W, type CheckoutStep as X, type CheckoutFormData as Y, type CheckoutResult as Z, type NextAction as _, type CimplifyConfig as a, type OrderSplitDetail as a$, type ProcessCheckoutResult as a0, type ProcessAndResolveOptions as a1, type CheckoutStatus as a2, type CheckoutStatusContext as a3, type AbortablePromise as a4, type MobileMoneyProvider as a5, type DeviceType as a6, type ContactType as a7, CHECKOUT_MODE as a8, ORDER_TYPE as a9, getOrElse as aA, unwrap as aB, toNullable as aC, fromPromise as aD, tryCatch as aE, combine as aF, combineObject as aG, type CatalogueResult as aH, type CatalogueSnapshot as aI, type OrderStatus as aJ, type PaymentState as aK, type OrderChannel as aL, type LineType as aM, type OrderLineState as aN, type OrderLineStatus as aO, type FulfillmentType as aP, type FulfillmentStatus as aQ, type FulfillmentLink as aR, type OrderFulfillmentSummary as aS, type FeeBearerType as aT, type AmountToPay as aU, type LineItem as aV, type Order as aW, type OrderHistory as aX, type OrderGroupPaymentState as aY, type OrderGroup as aZ, type OrderGroupPayment as a_, PAYMENT_METHOD as aa, CHECKOUT_STEP as ab, PAYMENT_STATE as ac, PICKUP_TIME_TYPE as ad, MOBILE_MONEY_PROVIDER as ae, AUTHORIZATION_TYPE as af, DEVICE_TYPE as ag, CONTACT_TYPE as ah, LINK_QUERY as ai, LINK_MUTATION as aj, AUTH_MUTATION as ak, CHECKOUT_MUTATION as al, PAYMENT_MUTATION as am, ORDER_MUTATION as an, DEFAULT_CURRENCY as ao, DEFAULT_COUNTRY as ap, type Result as aq, type Ok as ar, type Err as as, ok as at, err as au, isOk as av, isErr as aw, mapResult as ax, mapError as ay, flatMap as az, CatalogueQueries as b, type StockLevel as b$, type OrderGroupPaymentSummary as b0, type OrderGroupDetails as b1, type OrderPaymentEvent as b2, type OrderFilter as b3, type CheckoutInput as b4, type UpdateOrderStatusInput as b5, type CancelOrderInput as b6, type RefundOrderInput as b7, type ServiceStatus as b8, type StaffRole as b9, type ServiceCharge as bA, type StorefrontBootstrap as bB, type BusinessWithLocations as bC, type LocationWithDetails as bD, type BusinessSettings as bE, type BusinessHours as bF, type CategoryInfo as bG, type Service as bH, type Staff as bI, type TimeSlot as bJ, type AvailableSlot as bK, type DayAvailability as bL, type BookingStatus as bM, type Booking as bN, type BookingWithDetails as bO, type CustomerBookingServiceItem as bP, type CustomerBooking as bQ, type GetAvailableSlotsInput as bR, type CheckSlotAvailabilityInput as bS, type CheckSlotAvailabilityResult as bT, type RescheduleBookingInput as bU, type CancelBookingInput as bV, type CancelBookingResult as bW, type RescheduleBookingResult as bX, type ServiceAvailabilityParams as bY, type ServiceAvailabilityResult as bZ, type StockStatus as b_, type ReminderMethod as ba, type CustomerServicePreferences as bb, type BufferTimes as bc, type ReminderSettings as bd, type CancellationPolicy as be, type ServiceNotes as bf, type PricingOverrides as bg, type SchedulingMetadata as bh, type StaffAssignment as bi, type ResourceAssignment as bj, type SchedulingResult as bk, type DepositResult as bl, type ServiceScheduleRequest as bm, type StaffScheduleItem as bn, type LocationAppointment as bo, type BusinessType as bp, type BusinessPreferences as bq, type Business as br, type LocationTaxBehavior as bs, type LocationTaxOverrides as bt, type Location as bu, type TimeRange as bv, type TimeRanges as bw, type LocationTimeProfile as bx, type Table as by, type Room as bz, createCimplifyClient as c, type ProductStock as c0, type VariantStock as c1, type LocationStock as c2, type AvailabilityResult as c3, type Customer as c4, type CustomerAddress as c5, type CustomerMobileMoney as c6, type CustomerLinkPreferences as c7, type LinkData as c8, type CreateAddressInput as c9, type RequestErrorEvent as cA, type RetryEvent as cB, type SessionChangeEvent as cC, type ObservabilityHooks as cD, type OrderType as cE, type ElementAppearance as cF, type AddressInfo as cG, type PaymentMethodInfo as cH, type AuthenticatedCustomer as cI, type ElementsCustomerInfo as cJ, type AuthenticatedData as cK, type ElementsCheckoutData as cL, type ElementsCheckoutResult as cM, type CheckoutCartItem as cN, type CheckoutCartData as cO, type ParentToIframeMessage as cP, type IframeToParentMessage as cQ, type ElementEventHandler as cR, type UpdateAddressInput as ca, type CreateMobileMoneyInput as cb, type EnrollmentData as cc, type AddressData as cd, type MobileMoneyData as ce, type EnrollAndLinkOrderInput as cf, type LinkStatusResult as cg, type LinkEnrollResult as ch, type EnrollAndLinkOrderResult as ci, type LinkSession as cj, type RevokeSessionResult as ck, type RevokeAllSessionsResult as cl, type RequestOtpInput as cm, type VerifyOtpInput as cn, type AuthResponse as co, type PickupTimeType as cp, type PickupTime as cq, type CheckoutAddressInfo as cr, type MobileMoneyDetails as cs, type CheckoutCustomerInfo as ct, type FxQuoteRequest as cu, type FxQuote as cv, type FxRateResponse as cw, type RequestContext as cx, type RequestStartEvent as cy, type RequestSuccessEvent as cz, type QuoteBundleSelectionInput as d, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RequestSource as h, type RefreshQuoteResult as i, CartOperations as j, CheckoutService as k, generateIdempotencyKey as l, type GetOrdersOptions as m, type AuthStatus as n, type OtpResult as o, SchedulingService as p, LiteService as q, FxService as r, ActivityService as s, type TrackCategoryViewOptions as t, type LiteBootstrap as u, type TableInfo as v, CimplifyElements as w, CimplifyElement as x, createElements as y, ELEMENT_TYPES as z };
@@ -1,4 +1,4 @@
1
- import { L as Category, r as Product, G as AddOnWithOptions, b as Pagination, g as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, W as BundleSummary, U as Bundle, a7 as Composite, ae as ComponentSelectionInput, af as CompositePriceResult, aD as ChosenPrice, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, ao as ProductAvailabilityNow, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, au as TagsResponse, b6 as UICart, aT as Cart, aU as CartItem, ba as CartSummary, b8 as AddToCartInput, b9 as UpdateCartItemInput, aH as DiscountDetails, M as Money, C as CurrencyCode, aS as LineConfiguration, bf as AuthorizationType, bh as PaymentMethod, bj as InitializePaymentResult, bn as SubmitAuthorizationInput, bl as PaymentStatusResponse } from './payment-CrNyrc-D.js';
1
+ import { L as Category, r as Product, G as AddOnWithOptions, b as Pagination, g as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, W as BundleSummary, U as Bundle, a7 as Composite, ae as ComponentSelectionInput, af as CompositePriceResult, aD as ChosenPrice, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, ao as ProductAvailabilityNow, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, au as TagsResponse, b6 as UICart, aT as Cart, aU as CartItem, ba as CartSummary, b8 as AddToCartInput, b9 as UpdateCartItemInput, aH as DiscountDetails, M as Money, C as CurrencyCode, aS as LineConfiguration, bf as AuthorizationType, bh as PaymentMethod, bj as InitializePaymentResult, bn as SubmitAuthorizationInput, bl as PaymentStatusResponse } from './payment-Dvd7nRmk.mjs';
2
2
 
3
3
  interface RequestContext {
4
4
  method: "GET" | "POST" | "PATCH" | "DELETE";
@@ -152,6 +152,9 @@ interface PriceQuote {
152
152
  location_id?: string;
153
153
  source: RequestSource;
154
154
  customer_id?: string;
155
+ customer_segment_id?: string;
156
+ storefront_id?: string;
157
+ attribution_id?: string;
155
158
  quantity: number;
156
159
  currency?: string;
157
160
  snapshot_id?: string;
@@ -394,7 +397,7 @@ interface OrderHistory {
394
397
  modified_at: string;
395
398
  metadata?: Record<string, unknown>;
396
399
  }
397
- type OrderGroupPaymentState = "not_paid" | "partially_paid" | "fully_paid" | "refunded";
400
+ type OrderGroupPaymentState = "not_paid" | "partially_paid" | "fully_paid" | "partially_refunded" | "refunded";
398
401
  interface OrderGroup {
399
402
  id: string;
400
403
  business_id: string;
@@ -1598,6 +1601,24 @@ declare class FxService {
1598
1601
  lockQuote(request: FxQuoteRequest): Promise<Result<FxQuote, CimplifyError>>;
1599
1602
  }
1600
1603
 
1604
+ interface TrackProductViewOptions {
1605
+ productName?: string;
1606
+ categoryId?: string;
1607
+ price?: string;
1608
+ pagePath?: string;
1609
+ }
1610
+ interface TrackCategoryViewOptions {
1611
+ categoryName?: string;
1612
+ pagePath?: string;
1613
+ }
1614
+ declare class ActivityService {
1615
+ private client;
1616
+ constructor(client: CimplifyClient);
1617
+ trackProductView(productId: string, options?: TrackProductViewOptions): void;
1618
+ trackCategoryView(categoryId: string, options?: TrackCategoryViewOptions): void;
1619
+ private sendEvents;
1620
+ }
1621
+
1601
1622
  type OrderType = "delivery" | "pickup" | "dine_in";
1602
1623
  declare const ELEMENT_TYPES: {
1603
1624
  readonly AUTH: "auth";
@@ -1963,6 +1984,7 @@ declare class CimplifyClient {
1963
1984
  private _scheduling?;
1964
1985
  private _lite?;
1965
1986
  private _fx?;
1987
+ private _activity?;
1966
1988
  constructor(config?: CimplifyConfig);
1967
1989
  getAccessToken(): string | null;
1968
1990
  getPublicKey(): string;
@@ -2005,8 +2027,9 @@ declare class CimplifyClient {
2005
2027
  get scheduling(): SchedulingService;
2006
2028
  get lite(): LiteService;
2007
2029
  get fx(): FxService;
2030
+ get activity(): ActivityService;
2008
2031
  elements(businessId?: string, options?: ElementsOptions): CimplifyElements;
2009
2032
  }
2010
2033
  declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
2011
2034
 
2012
- export { type CheckoutStatus as $, AuthService as A, BusinessService as B, CimplifyClient as C, type ElementEventType as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type CheckoutMode as H, InventoryService as I, type CheckoutOrderType as J, type CheckoutPaymentMethod as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutStep as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutFormData as V, type CheckoutResult as W, type NextAction as X, type ProcessCheckoutOptions as Y, type ProcessCheckoutResult as Z, type ProcessAndResolveOptions as _, type CimplifyConfig as a, type OrderPaymentEvent as a$, type CheckoutStatusContext as a0, type AbortablePromise as a1, type MobileMoneyProvider as a2, type DeviceType as a3, type ContactType as a4, CHECKOUT_MODE as a5, ORDER_TYPE as a6, PAYMENT_METHOD as a7, CHECKOUT_STEP as a8, PAYMENT_STATE as a9, fromPromise as aA, tryCatch as aB, combine as aC, combineObject as aD, type CatalogueResult as aE, type CatalogueSnapshot as aF, type OrderStatus as aG, type PaymentState as aH, type OrderChannel as aI, type LineType as aJ, type OrderLineState as aK, type OrderLineStatus as aL, type FulfillmentType as aM, type FulfillmentStatus as aN, type FulfillmentLink as aO, type OrderFulfillmentSummary as aP, type FeeBearerType as aQ, type AmountToPay as aR, type LineItem as aS, type Order as aT, type OrderHistory as aU, type OrderGroupPaymentState as aV, type OrderGroup as aW, type OrderGroupPayment as aX, type OrderSplitDetail as aY, type OrderGroupPaymentSummary as aZ, type OrderGroupDetails as a_, PICKUP_TIME_TYPE as aa, MOBILE_MONEY_PROVIDER as ab, AUTHORIZATION_TYPE as ac, DEVICE_TYPE as ad, CONTACT_TYPE as ae, LINK_QUERY as af, LINK_MUTATION as ag, AUTH_MUTATION as ah, CHECKOUT_MUTATION as ai, PAYMENT_MUTATION as aj, ORDER_MUTATION as ak, DEFAULT_CURRENCY as al, DEFAULT_COUNTRY as am, type Result as an, type Ok as ao, type Err as ap, ok as aq, err as ar, isOk as as, isErr as at, mapResult as au, mapError as av, flatMap as aw, getOrElse as ax, unwrap as ay, toNullable as az, CatalogueQueries as b, type LocationStock as b$, type OrderFilter as b0, type CheckoutInput as b1, type UpdateOrderStatusInput as b2, type CancelOrderInput as b3, type RefundOrderInput as b4, type ServiceStatus as b5, type StaffRole as b6, type ReminderMethod as b7, type CustomerServicePreferences as b8, type BufferTimes as b9, type LocationWithDetails as bA, type BusinessSettings as bB, type BusinessHours as bC, type CategoryInfo as bD, type Service as bE, type Staff as bF, type TimeSlot as bG, type AvailableSlot as bH, type DayAvailability as bI, type BookingStatus as bJ, type Booking as bK, type BookingWithDetails as bL, type CustomerBookingServiceItem as bM, type CustomerBooking as bN, type GetAvailableSlotsInput as bO, type CheckSlotAvailabilityInput as bP, type CheckSlotAvailabilityResult as bQ, type RescheduleBookingInput as bR, type CancelBookingInput as bS, type CancelBookingResult as bT, type RescheduleBookingResult as bU, type ServiceAvailabilityParams as bV, type ServiceAvailabilityResult as bW, type StockStatus as bX, type StockLevel as bY, type ProductStock as bZ, type VariantStock as b_, type ReminderSettings as ba, type CancellationPolicy as bb, type ServiceNotes as bc, type PricingOverrides as bd, type SchedulingMetadata as be, type StaffAssignment as bf, type ResourceAssignment as bg, type SchedulingResult as bh, type DepositResult as bi, type ServiceScheduleRequest as bj, type StaffScheduleItem as bk, type LocationAppointment as bl, type BusinessType as bm, type BusinessPreferences as bn, type Business as bo, type LocationTaxBehavior as bp, type LocationTaxOverrides as bq, type Location as br, type TimeRange as bs, type TimeRanges as bt, type LocationTimeProfile as bu, type Table as bv, type Room as bw, type ServiceCharge as bx, type StorefrontBootstrap as by, type BusinessWithLocations as bz, createCimplifyClient as c, type AvailabilityResult as c0, type Customer as c1, type CustomerAddress as c2, type CustomerMobileMoney as c3, type CustomerLinkPreferences as c4, type LinkData as c5, type CreateAddressInput as c6, type UpdateAddressInput as c7, type CreateMobileMoneyInput as c8, type EnrollmentData as c9, type ObservabilityHooks as cA, type OrderType as cB, type ElementAppearance as cC, type AddressInfo as cD, type PaymentMethodInfo as cE, type AuthenticatedCustomer as cF, type ElementsCustomerInfo as cG, type AuthenticatedData as cH, type ElementsCheckoutData as cI, type ElementsCheckoutResult as cJ, type CheckoutCartItem as cK, type CheckoutCartData as cL, type ParentToIframeMessage as cM, type IframeToParentMessage as cN, type ElementEventHandler as cO, type AddressData as ca, type MobileMoneyData as cb, type EnrollAndLinkOrderInput as cc, type LinkStatusResult as cd, type LinkEnrollResult as ce, type EnrollAndLinkOrderResult as cf, type LinkSession as cg, type RevokeSessionResult as ch, type RevokeAllSessionsResult as ci, type RequestOtpInput as cj, type VerifyOtpInput as ck, type AuthResponse as cl, type PickupTimeType as cm, type PickupTime as cn, type CheckoutAddressInfo as co, type MobileMoneyDetails as cp, type CheckoutCustomerInfo as cq, type FxQuoteRequest as cr, type FxQuote as cs, type FxRateResponse as ct, type RequestContext as cu, type RequestStartEvent as cv, type RequestSuccessEvent as cw, type RequestErrorEvent as cx, type RetryEvent as cy, type SessionChangeEvent as cz, type QuoteBundleSelectionInput as d, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RequestSource as h, type RefreshQuoteResult as i, CartOperations as j, CheckoutService as k, generateIdempotencyKey as l, type GetOrdersOptions as m, type AuthStatus as n, type OtpResult as o, SchedulingService as p, LiteService as q, FxService as r, type LiteBootstrap as s, CimplifyElements as t, CimplifyElement as u, createElements as v, ELEMENT_TYPES as w, type ElementsOptions as x, type ElementOptions as y, type ElementType as z };
2035
+ export { type ProcessCheckoutOptions as $, AuthService as A, BusinessService as B, CimplifyClient as C, type ElementsOptions as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type ElementOptions as H, InventoryService as I, type ElementType as J, type ElementEventType as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutMode as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TrackProductViewOptions as T, type UpdateProfileInput as U, type CheckoutOrderType as V, type CheckoutPaymentMethod as W, type CheckoutStep as X, type CheckoutFormData as Y, type CheckoutResult as Z, type NextAction as _, type CimplifyConfig as a, type OrderSplitDetail as a$, type ProcessCheckoutResult as a0, type ProcessAndResolveOptions as a1, type CheckoutStatus as a2, type CheckoutStatusContext as a3, type AbortablePromise as a4, type MobileMoneyProvider as a5, type DeviceType as a6, type ContactType as a7, CHECKOUT_MODE as a8, ORDER_TYPE as a9, getOrElse as aA, unwrap as aB, toNullable as aC, fromPromise as aD, tryCatch as aE, combine as aF, combineObject as aG, type CatalogueResult as aH, type CatalogueSnapshot as aI, type OrderStatus as aJ, type PaymentState as aK, type OrderChannel as aL, type LineType as aM, type OrderLineState as aN, type OrderLineStatus as aO, type FulfillmentType as aP, type FulfillmentStatus as aQ, type FulfillmentLink as aR, type OrderFulfillmentSummary as aS, type FeeBearerType as aT, type AmountToPay as aU, type LineItem as aV, type Order as aW, type OrderHistory as aX, type OrderGroupPaymentState as aY, type OrderGroup as aZ, type OrderGroupPayment as a_, PAYMENT_METHOD as aa, CHECKOUT_STEP as ab, PAYMENT_STATE as ac, PICKUP_TIME_TYPE as ad, MOBILE_MONEY_PROVIDER as ae, AUTHORIZATION_TYPE as af, DEVICE_TYPE as ag, CONTACT_TYPE as ah, LINK_QUERY as ai, LINK_MUTATION as aj, AUTH_MUTATION as ak, CHECKOUT_MUTATION as al, PAYMENT_MUTATION as am, ORDER_MUTATION as an, DEFAULT_CURRENCY as ao, DEFAULT_COUNTRY as ap, type Result as aq, type Ok as ar, type Err as as, ok as at, err as au, isOk as av, isErr as aw, mapResult as ax, mapError as ay, flatMap as az, CatalogueQueries as b, type StockLevel as b$, type OrderGroupPaymentSummary as b0, type OrderGroupDetails as b1, type OrderPaymentEvent as b2, type OrderFilter as b3, type CheckoutInput as b4, type UpdateOrderStatusInput as b5, type CancelOrderInput as b6, type RefundOrderInput as b7, type ServiceStatus as b8, type StaffRole as b9, type ServiceCharge as bA, type StorefrontBootstrap as bB, type BusinessWithLocations as bC, type LocationWithDetails as bD, type BusinessSettings as bE, type BusinessHours as bF, type CategoryInfo as bG, type Service as bH, type Staff as bI, type TimeSlot as bJ, type AvailableSlot as bK, type DayAvailability as bL, type BookingStatus as bM, type Booking as bN, type BookingWithDetails as bO, type CustomerBookingServiceItem as bP, type CustomerBooking as bQ, type GetAvailableSlotsInput as bR, type CheckSlotAvailabilityInput as bS, type CheckSlotAvailabilityResult as bT, type RescheduleBookingInput as bU, type CancelBookingInput as bV, type CancelBookingResult as bW, type RescheduleBookingResult as bX, type ServiceAvailabilityParams as bY, type ServiceAvailabilityResult as bZ, type StockStatus as b_, type ReminderMethod as ba, type CustomerServicePreferences as bb, type BufferTimes as bc, type ReminderSettings as bd, type CancellationPolicy as be, type ServiceNotes as bf, type PricingOverrides as bg, type SchedulingMetadata as bh, type StaffAssignment as bi, type ResourceAssignment as bj, type SchedulingResult as bk, type DepositResult as bl, type ServiceScheduleRequest as bm, type StaffScheduleItem as bn, type LocationAppointment as bo, type BusinessType as bp, type BusinessPreferences as bq, type Business as br, type LocationTaxBehavior as bs, type LocationTaxOverrides as bt, type Location as bu, type TimeRange as bv, type TimeRanges as bw, type LocationTimeProfile as bx, type Table as by, type Room as bz, createCimplifyClient as c, type ProductStock as c0, type VariantStock as c1, type LocationStock as c2, type AvailabilityResult as c3, type Customer as c4, type CustomerAddress as c5, type CustomerMobileMoney as c6, type CustomerLinkPreferences as c7, type LinkData as c8, type CreateAddressInput as c9, type RequestErrorEvent as cA, type RetryEvent as cB, type SessionChangeEvent as cC, type ObservabilityHooks as cD, type OrderType as cE, type ElementAppearance as cF, type AddressInfo as cG, type PaymentMethodInfo as cH, type AuthenticatedCustomer as cI, type ElementsCustomerInfo as cJ, type AuthenticatedData as cK, type ElementsCheckoutData as cL, type ElementsCheckoutResult as cM, type CheckoutCartItem as cN, type CheckoutCartData as cO, type ParentToIframeMessage as cP, type IframeToParentMessage as cQ, type ElementEventHandler as cR, type UpdateAddressInput as ca, type CreateMobileMoneyInput as cb, type EnrollmentData as cc, type AddressData as cd, type MobileMoneyData as ce, type EnrollAndLinkOrderInput as cf, type LinkStatusResult as cg, type LinkEnrollResult as ch, type EnrollAndLinkOrderResult as ci, type LinkSession as cj, type RevokeSessionResult as ck, type RevokeAllSessionsResult as cl, type RequestOtpInput as cm, type VerifyOtpInput as cn, type AuthResponse as co, type PickupTimeType as cp, type PickupTime as cq, type CheckoutAddressInfo as cr, type MobileMoneyDetails as cs, type CheckoutCustomerInfo as ct, type FxQuoteRequest as cu, type FxQuote as cv, type FxRateResponse as cw, type RequestContext as cx, type RequestStartEvent as cy, type RequestSuccessEvent as cz, type QuoteBundleSelectionInput as d, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RequestSource as h, type RefreshQuoteResult as i, CartOperations as j, CheckoutService as k, generateIdempotencyKey as l, type GetOrdersOptions as m, type AuthStatus as n, type OtpResult as o, SchedulingService as p, LiteService as q, FxService as r, ActivityService as s, type TrackCategoryViewOptions as t, type LiteBootstrap as u, type TableInfo as v, CimplifyElements as w, CimplifyElement as x, createElements as y, ELEMENT_TYPES as z };
package/dist/index.d.mts CHANGED
@@ -1,10 +1,11 @@
1
- export { ac as AUTHORIZATION_TYPE, ah as AUTH_MUTATION, a1 as AbortablePromise, ca as AddressData, cD as AddressInfo, aR as AmountToPay, cl as AuthResponse, A as AuthService, n as AuthStatus, cF as AuthenticatedCustomer, cH as AuthenticatedData, c0 as AvailabilityResult, bH as AvailableSlot, bK as Booking, bJ as BookingStatus, bL as BookingWithDetails, b9 as BufferTimes, bo as Business, bC as BusinessHours, bn as BusinessPreferences, B as BusinessService, bB as BusinessSettings, bm as BusinessType, bz as BusinessWithLocations, a5 as CHECKOUT_MODE, ai as CHECKOUT_MUTATION, a8 as CHECKOUT_STEP, ae as CONTACT_TYPE, bS as CancelBookingInput, bT as CancelBookingResult, b3 as CancelOrderInput, bb as CancellationPolicy, j as CartOperations, b as CatalogueQueries, aE as CatalogueResult, aF as CatalogueSnapshot, bD as CategoryInfo, bP as CheckSlotAvailabilityInput, bQ as CheckSlotAvailabilityResult, co as CheckoutAddressInfo, cL as CheckoutCartData, cK as CheckoutCartItem, cq as CheckoutCustomerInfo, V as CheckoutFormData, b1 as CheckoutInput, H as CheckoutMode, k as CheckoutOperations, J as CheckoutOrderType, K as CheckoutPaymentMethod, W as CheckoutResult, k as CheckoutService, $ as CheckoutStatus, a0 as CheckoutStatusContext, N as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, u as CimplifyElement, t as CimplifyElements, a4 as ContactType, c6 as CreateAddressInput, c8 as CreateMobileMoneyInput, c1 as Customer, c2 as CustomerAddress, bN as CustomerBooking, bM as CustomerBookingServiceItem, c4 as CustomerLinkPreferences, c3 as CustomerMobileMoney, b8 as CustomerServicePreferences, am as DEFAULT_COUNTRY, al as DEFAULT_CURRENCY, ad as DEVICE_TYPE, bI as DayAvailability, bi as DepositResult, a3 as DeviceType, w as ELEMENT_TYPES, E as EVENT_TYPES, cC as ElementAppearance, cO as ElementEventHandler, D as ElementEventType, y as ElementOptions, z as ElementType, cI as ElementsCheckoutData, cJ as ElementsCheckoutResult, cG as ElementsCustomerInfo, x as ElementsOptions, cc as EnrollAndLinkOrderInput, cf as EnrollAndLinkOrderResult, c9 as EnrollmentData, ap as Err, aQ as FeeBearerType, F as FetchQuoteInput, aO as FulfillmentLink, aN as FulfillmentStatus, aM as FulfillmentType, cs as FxQuote, cr as FxQuoteRequest, ct as FxRateResponse, r as FxService, bO as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, cN as IframeToParentMessage, I as InventoryService, ag as LINK_MUTATION, af as LINK_QUERY, aS as LineItem, aJ as LineType, c5 as LinkData, ce as LinkEnrollResult, L as LinkService, cg as LinkSession, cd as LinkStatusResult, s as LiteBootstrap, q as LiteService, br as Location, bl as LocationAppointment, b$ as LocationStock, bp as LocationTaxBehavior, bq as LocationTaxOverrides, bu as LocationTimeProfile, bA as LocationWithDetails, M as MESSAGE_TYPES, ab as MOBILE_MONEY_PROVIDER, cb as MobileMoneyData, cp as MobileMoneyDetails, a2 as MobileMoneyProvider, X as NextAction, ak as ORDER_MUTATION, a6 as ORDER_TYPE, cA as ObservabilityHooks, ao as Ok, aT as Order, aI as OrderChannel, b0 as OrderFilter, aP as OrderFulfillmentSummary, aW as OrderGroup, a_ as OrderGroupDetails, aX as OrderGroupPayment, aV as OrderGroupPaymentState, aZ as OrderGroupPaymentSummary, aU as OrderHistory, aK as OrderLineState, aL as OrderLineStatus, a$ as OrderPaymentEvent, O as OrderQueries, aY as OrderSplitDetail, aG as OrderStatus, cB as OrderType, o as OtpResult, a7 as PAYMENT_METHOD, aj as PAYMENT_MUTATION, a9 as PAYMENT_STATE, aa as PICKUP_TIME_TYPE, cM as ParentToIframeMessage, cE as PaymentMethodInfo, aH as PaymentState, cn as PickupTime, cm as PickupTimeType, P as PriceQuote, bd as PricingOverrides, _ as ProcessAndResolveOptions, Y as ProcessCheckoutOptions, Z as ProcessCheckoutResult, bZ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, b4 as RefundOrderInput, b7 as ReminderMethod, ba as ReminderSettings, cu as RequestContext, cx as RequestErrorEvent, cj as RequestOtpInput, h as RequestSource, cv as RequestStartEvent, cw as RequestSuccessEvent, bR as RescheduleBookingInput, bU as RescheduleBookingResult, bg as ResourceAssignment, an as Result, cy as RetryEvent, ci as RevokeAllSessionsResult, ch as RevokeSessionResult, bw as Room, be as SchedulingMetadata, bh as SchedulingResult, p as SchedulingService, S as SearchOptions, bE as Service, bV as ServiceAvailabilityParams, bW as ServiceAvailabilityResult, bx as ServiceCharge, bc as ServiceNotes, bj as ServiceScheduleRequest, b5 as ServiceStatus, cz as SessionChangeEvent, bF as Staff, bf as StaffAssignment, b6 as StaffRole, bk as StaffScheduleItem, bY as StockLevel, bX as StockStatus, by as StorefrontBootstrap, bv as Table, T as TableInfo, bs as TimeRange, bt as TimeRanges, bG as TimeSlot, c7 as UpdateAddressInput, b2 as UpdateOrderStatusInput, U as UpdateProfileInput, b_ as VariantStock, ck as VerifyOtpInput, aC as combine, aD as combineObject, c as createCimplifyClient, v as createElements, ar as err, aw as flatMap, aA as fromPromise, l as generateIdempotencyKey, ax as getOrElse, at as isErr, as as isOk, av as mapError, au as mapResult, aq as ok, az as toNullable, aB as tryCatch, ay as unwrap } from './client-BSrq89H1.mjs';
1
+ export { af as AUTHORIZATION_TYPE, ak as AUTH_MUTATION, a4 as AbortablePromise, s as ActivityService, cd as AddressData, cG as AddressInfo, aU as AmountToPay, co as AuthResponse, A as AuthService, n as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c3 as AvailabilityResult, bK as AvailableSlot, bN as Booking, bM as BookingStatus, bO as BookingWithDetails, bc as BufferTimes, br as Business, bF as BusinessHours, bq as BusinessPreferences, B as BusinessService, bE as BusinessSettings, bp as BusinessType, bC as BusinessWithLocations, a8 as CHECKOUT_MODE, al as CHECKOUT_MUTATION, ab as CHECKOUT_STEP, ah as CONTACT_TYPE, bV as CancelBookingInput, bW as CancelBookingResult, b6 as CancelOrderInput, be as CancellationPolicy, j as CartOperations, b as CatalogueQueries, aH as CatalogueResult, aI as CatalogueSnapshot, bG as CategoryInfo, bS as CheckSlotAvailabilityInput, bT as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, Y as CheckoutFormData, b4 as CheckoutInput, N as CheckoutMode, k as CheckoutOperations, V as CheckoutOrderType, W as CheckoutPaymentMethod, Z as CheckoutResult, k as CheckoutService, a2 as CheckoutStatus, a3 as CheckoutStatusContext, X as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, x as CimplifyElement, w as CimplifyElements, a7 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bQ as CustomerBooking, bP as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, bb as CustomerServicePreferences, ap as DEFAULT_COUNTRY, ao as DEFAULT_CURRENCY, ag as DEVICE_TYPE, bL as DayAvailability, bl as DepositResult, a6 as DeviceType, z as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, K as ElementEventType, H as ElementOptions, J as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, D as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, as as Err, aT as FeeBearerType, F as FetchQuoteInput, aR as FulfillmentLink, aQ as FulfillmentStatus, aP as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, r as FxService, bR as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, aj as LINK_MUTATION, ai as LINK_QUERY, aV as LineItem, aM as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, u as LiteBootstrap, q as LiteService, bu as Location, bo as LocationAppointment, c2 as LocationStock, bs as LocationTaxBehavior, bt as LocationTaxOverrides, bx as LocationTimeProfile, bD as LocationWithDetails, M as MESSAGE_TYPES, ae as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a5 as MobileMoneyProvider, _ as NextAction, an as ORDER_MUTATION, a9 as ORDER_TYPE, cD as ObservabilityHooks, ar as Ok, aW as Order, aL as OrderChannel, b3 as OrderFilter, aS as OrderFulfillmentSummary, aZ as OrderGroup, b1 as OrderGroupDetails, a_ as OrderGroupPayment, aY as OrderGroupPaymentState, b0 as OrderGroupPaymentSummary, aX as OrderHistory, aN as OrderLineState, aO as OrderLineStatus, b2 as OrderPaymentEvent, O as OrderQueries, a$ as OrderSplitDetail, aJ as OrderStatus, cE as OrderType, o as OtpResult, aa as PAYMENT_METHOD, am as PAYMENT_MUTATION, ac as PAYMENT_STATE, ad as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aK as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bg as PricingOverrides, a1 as ProcessAndResolveOptions, $ as ProcessCheckoutOptions, a0 as ProcessCheckoutResult, c0 as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, b7 as RefundOrderInput, ba as ReminderMethod, bd as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, h as RequestSource, cy as RequestStartEvent, cz as RequestSuccessEvent, bU as RescheduleBookingInput, bX as RescheduleBookingResult, bj as ResourceAssignment, aq as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bz as Room, bh as SchedulingMetadata, bk as SchedulingResult, p as SchedulingService, S as SearchOptions, bH as Service, bY as ServiceAvailabilityParams, bZ as ServiceAvailabilityResult, bA as ServiceCharge, bf as ServiceNotes, bm as ServiceScheduleRequest, b8 as ServiceStatus, cC as SessionChangeEvent, bI as Staff, bi as StaffAssignment, b9 as StaffRole, bn as StaffScheduleItem, b$ as StockLevel, b_ as StockStatus, bB as StorefrontBootstrap, by as Table, v as TableInfo, bv as TimeRange, bw as TimeRanges, bJ as TimeSlot, t as TrackCategoryViewOptions, T as TrackProductViewOptions, ca as UpdateAddressInput, b5 as UpdateOrderStatusInput, U as UpdateProfileInput, c1 as VariantStock, cn as VerifyOtpInput, aF as combine, aG as combineObject, c as createCimplifyClient, y as createElements, au as err, az as flatMap, aD as fromPromise, l as generateIdempotencyKey, aA as getOrElse, aw as isErr, av as isOk, ay as mapError, ax as mapResult, at as ok, aC as toNullable, aE as tryCatch, aB as unwrap } from './client-wOQ8P1Ks.mjs';
2
2
  export { QueryBuilder, query } from './advanced.mjs';
3
- import { A as ApiError } from './payment-CrNyrc-D.mjs';
4
- export { F as AddOn, aJ as AddOnDetails, b3 as AddOnGroupDetails, H as AddOnOption, b2 as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, b8 as AddToCartInput, be as AddressAuthorizationData, ay as AdjustmentType, aF as AppliedDiscount, bf as AuthorizationType, aE as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, a1 as BundleComponentVariantView, a0 as BundleComponentView, T as BundlePriceType, X as BundleProduct, aO as BundleSelectionData, aM as BundleSelectionInput, aN as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aT as Cart, aK as CartAddOn, aw as CartChannel, aU as CartItem, b5 as CartItemDetails, av as CartStatus, ba as CartSummary, aV as CartTotals, L as Category, N as CategorySummary, aD as ChosenPrice, g as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a9 as ComponentGroup, aa as ComponentGroupWithComponents, ag as ComponentPriceBreakdown, ae as ComponentSelectionInput, a6 as ComponentSourceType, a7 as Composite, ad as CompositeComponent, ac as CompositeComponentView, ab as CompositeGroupView, aQ as CompositePriceBreakdown, af as CompositePriceResult, a4 as CompositePricingMode, aR as CompositeSelectionData, ae as CompositeSelectionInput, aP as CompositeStoredSelection, a8 as CompositeWithDetails, C as CurrencyCode, aq as Deal, ap as DealBenefitType, q as DepositType, p as DigitalProductType, aG as DiscountBreakdown, aH as DiscountDetails, as as DiscountValidation, aY as DisplayAddOn, aZ as DisplayAddOnOption, aW as DisplayCart, aX as DisplayCartItem, D as DisplayMode, f as ERROR_HINTS, E as ErrorCode, d as ErrorCodeType, e as ErrorHint, a5 as GroupPricingBehavior, bj as InitializePaymentResult, I as InventoryType, aS as LineConfiguration, aj as LocationProductPrice, M as Money, b as Pagination, P as PaginationParams, bi as Payment, bm as PaymentErrorDetails, bh as PaymentMethod, bd as PaymentMethodType, bg as PaymentProcessingState, bc as PaymentProvider, bk as PaymentResponse, bb as PaymentStatus, bl as PaymentStatusResponse, ai as Price, az as PriceAdjustment, aC as PriceDecisionPath, ah as PriceEntryType, aB as PricePathTaxInfo, ax as PriceSource, r as Product, K as ProductAddOn, ak as ProductAvailability, ao as ProductAvailabilityNow, ar as ProductDealInfo, o as ProductRenderHint, am as ProductTaxonomy, al as ProductTimeProfile, n as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, aI as SelectedAddOnOption, bn as SubmitAuthorizationInput, at as Tag, au as TagsResponse, aA as TaxPathComponent, an as TaxonomyWithChildren, b6 as UICart, a_ as UICartBusiness, b0 as UICartCustomer, a$ as UICartLocation, b1 as UICartPricing, b7 as UICartResponse, b9 as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, a3 as VariantAxisValueView, a2 as VariantAxisView, w as VariantAxisWithValues, aL as VariantDetails, b4 as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, h as isCimplifyError, l as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-CrNyrc-D.mjs';
5
- export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, getTaxAmount, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice } from './utils.mjs';
3
+ import { A as ApiError } from './payment-Dvd7nRmk.mjs';
4
+ export { F as AddOn, aJ as AddOnDetails, b3 as AddOnGroupDetails, H as AddOnOption, b2 as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, b8 as AddToCartInput, be as AddressAuthorizationData, ay as AdjustmentType, aF as AppliedDiscount, bf as AuthorizationType, aE as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, a1 as BundleComponentVariantView, a0 as BundleComponentView, T as BundlePriceType, X as BundleProduct, aO as BundleSelectionData, aM as BundleSelectionInput, aN as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aT as Cart, aK as CartAddOn, aw as CartChannel, aU as CartItem, b5 as CartItemDetails, av as CartStatus, ba as CartSummary, aV as CartTotals, L as Category, N as CategorySummary, aD as ChosenPrice, g as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a9 as ComponentGroup, aa as ComponentGroupWithComponents, ag as ComponentPriceBreakdown, ae as ComponentSelectionInput, a6 as ComponentSourceType, a7 as Composite, ad as CompositeComponent, ac as CompositeComponentView, ab as CompositeGroupView, aQ as CompositePriceBreakdown, af as CompositePriceResult, a4 as CompositePricingMode, aR as CompositeSelectionData, ae as CompositeSelectionInput, aP as CompositeStoredSelection, a8 as CompositeWithDetails, C as CurrencyCode, aq as Deal, ap as DealBenefitType, q as DepositType, p as DigitalProductType, aG as DiscountBreakdown, aH as DiscountDetails, as as DiscountValidation, aY as DisplayAddOn, aZ as DisplayAddOnOption, aW as DisplayCart, aX as DisplayCartItem, D as DisplayMode, f as ERROR_HINTS, E as ErrorCode, d as ErrorCodeType, e as ErrorHint, a5 as GroupPricingBehavior, bj as InitializePaymentResult, I as InventoryType, aS as LineConfiguration, aj as LocationProductPrice, M as Money, b as Pagination, P as PaginationParams, bi as Payment, bm as PaymentErrorDetails, bh as PaymentMethod, bd as PaymentMethodType, bg as PaymentProcessingState, bc as PaymentProvider, bk as PaymentResponse, bb as PaymentStatus, bl as PaymentStatusResponse, ai as Price, az as PriceAdjustment, aC as PriceDecisionPath, ah as PriceEntryType, aB as PricePathTaxInfo, ax as PriceSource, r as Product, K as ProductAddOn, ak as ProductAvailability, ao as ProductAvailabilityNow, ar as ProductDealInfo, o as ProductRenderHint, am as ProductTaxonomy, al as ProductTimeProfile, n as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, aI as SelectedAddOnOption, bn as SubmitAuthorizationInput, at as Tag, au as TagsResponse, aA as TaxPathComponent, an as TaxonomyWithChildren, b6 as UICart, a_ as UICartBusiness, b0 as UICartCustomer, a$ as UICartLocation, b1 as UICartPricing, b7 as UICartResponse, b9 as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, a3 as VariantAxisValueView, a2 as VariantAxisView, w as VariantAxisWithValues, aL as VariantDetails, b4 as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, h as isCimplifyError, l as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-Dvd7nRmk.mjs';
5
+ export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, getTaxAmount, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, isValidPhoneForContext, normalizePaymentResponse, normalizePhoneToE164, normalizeStatusResponse, parsePrice, resolvePhoneCountryCode } from './utils.mjs';
6
6
  export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme, g as getVariantDisplayName } from './ads-BxbWrwqp.mjs';
7
- export { a as FormatCompactOptions, F as FormatPriceOptions, P as ProductWithPrice } from './price-C9Z-hr49.mjs';
7
+ export { a as FormatCompactOptions, F as FormatPriceOptions, P as ProductWithPrice } from './price-BDZNXiLS.mjs';
8
+ import 'libphonenumber-js';
8
9
 
9
10
  interface FrontendContext {
10
11
  location_id?: string;
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- export { ac as AUTHORIZATION_TYPE, ah as AUTH_MUTATION, a1 as AbortablePromise, ca as AddressData, cD as AddressInfo, aR as AmountToPay, cl as AuthResponse, A as AuthService, n as AuthStatus, cF as AuthenticatedCustomer, cH as AuthenticatedData, c0 as AvailabilityResult, bH as AvailableSlot, bK as Booking, bJ as BookingStatus, bL as BookingWithDetails, b9 as BufferTimes, bo as Business, bC as BusinessHours, bn as BusinessPreferences, B as BusinessService, bB as BusinessSettings, bm as BusinessType, bz as BusinessWithLocations, a5 as CHECKOUT_MODE, ai as CHECKOUT_MUTATION, a8 as CHECKOUT_STEP, ae as CONTACT_TYPE, bS as CancelBookingInput, bT as CancelBookingResult, b3 as CancelOrderInput, bb as CancellationPolicy, j as CartOperations, b as CatalogueQueries, aE as CatalogueResult, aF as CatalogueSnapshot, bD as CategoryInfo, bP as CheckSlotAvailabilityInput, bQ as CheckSlotAvailabilityResult, co as CheckoutAddressInfo, cL as CheckoutCartData, cK as CheckoutCartItem, cq as CheckoutCustomerInfo, V as CheckoutFormData, b1 as CheckoutInput, H as CheckoutMode, k as CheckoutOperations, J as CheckoutOrderType, K as CheckoutPaymentMethod, W as CheckoutResult, k as CheckoutService, $ as CheckoutStatus, a0 as CheckoutStatusContext, N as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, u as CimplifyElement, t as CimplifyElements, a4 as ContactType, c6 as CreateAddressInput, c8 as CreateMobileMoneyInput, c1 as Customer, c2 as CustomerAddress, bN as CustomerBooking, bM as CustomerBookingServiceItem, c4 as CustomerLinkPreferences, c3 as CustomerMobileMoney, b8 as CustomerServicePreferences, am as DEFAULT_COUNTRY, al as DEFAULT_CURRENCY, ad as DEVICE_TYPE, bI as DayAvailability, bi as DepositResult, a3 as DeviceType, w as ELEMENT_TYPES, E as EVENT_TYPES, cC as ElementAppearance, cO as ElementEventHandler, D as ElementEventType, y as ElementOptions, z as ElementType, cI as ElementsCheckoutData, cJ as ElementsCheckoutResult, cG as ElementsCustomerInfo, x as ElementsOptions, cc as EnrollAndLinkOrderInput, cf as EnrollAndLinkOrderResult, c9 as EnrollmentData, ap as Err, aQ as FeeBearerType, F as FetchQuoteInput, aO as FulfillmentLink, aN as FulfillmentStatus, aM as FulfillmentType, cs as FxQuote, cr as FxQuoteRequest, ct as FxRateResponse, r as FxService, bO as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, cN as IframeToParentMessage, I as InventoryService, ag as LINK_MUTATION, af as LINK_QUERY, aS as LineItem, aJ as LineType, c5 as LinkData, ce as LinkEnrollResult, L as LinkService, cg as LinkSession, cd as LinkStatusResult, s as LiteBootstrap, q as LiteService, br as Location, bl as LocationAppointment, b$ as LocationStock, bp as LocationTaxBehavior, bq as LocationTaxOverrides, bu as LocationTimeProfile, bA as LocationWithDetails, M as MESSAGE_TYPES, ab as MOBILE_MONEY_PROVIDER, cb as MobileMoneyData, cp as MobileMoneyDetails, a2 as MobileMoneyProvider, X as NextAction, ak as ORDER_MUTATION, a6 as ORDER_TYPE, cA as ObservabilityHooks, ao as Ok, aT as Order, aI as OrderChannel, b0 as OrderFilter, aP as OrderFulfillmentSummary, aW as OrderGroup, a_ as OrderGroupDetails, aX as OrderGroupPayment, aV as OrderGroupPaymentState, aZ as OrderGroupPaymentSummary, aU as OrderHistory, aK as OrderLineState, aL as OrderLineStatus, a$ as OrderPaymentEvent, O as OrderQueries, aY as OrderSplitDetail, aG as OrderStatus, cB as OrderType, o as OtpResult, a7 as PAYMENT_METHOD, aj as PAYMENT_MUTATION, a9 as PAYMENT_STATE, aa as PICKUP_TIME_TYPE, cM as ParentToIframeMessage, cE as PaymentMethodInfo, aH as PaymentState, cn as PickupTime, cm as PickupTimeType, P as PriceQuote, bd as PricingOverrides, _ as ProcessAndResolveOptions, Y as ProcessCheckoutOptions, Z as ProcessCheckoutResult, bZ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, b4 as RefundOrderInput, b7 as ReminderMethod, ba as ReminderSettings, cu as RequestContext, cx as RequestErrorEvent, cj as RequestOtpInput, h as RequestSource, cv as RequestStartEvent, cw as RequestSuccessEvent, bR as RescheduleBookingInput, bU as RescheduleBookingResult, bg as ResourceAssignment, an as Result, cy as RetryEvent, ci as RevokeAllSessionsResult, ch as RevokeSessionResult, bw as Room, be as SchedulingMetadata, bh as SchedulingResult, p as SchedulingService, S as SearchOptions, bE as Service, bV as ServiceAvailabilityParams, bW as ServiceAvailabilityResult, bx as ServiceCharge, bc as ServiceNotes, bj as ServiceScheduleRequest, b5 as ServiceStatus, cz as SessionChangeEvent, bF as Staff, bf as StaffAssignment, b6 as StaffRole, bk as StaffScheduleItem, bY as StockLevel, bX as StockStatus, by as StorefrontBootstrap, bv as Table, T as TableInfo, bs as TimeRange, bt as TimeRanges, bG as TimeSlot, c7 as UpdateAddressInput, b2 as UpdateOrderStatusInput, U as UpdateProfileInput, b_ as VariantStock, ck as VerifyOtpInput, aC as combine, aD as combineObject, c as createCimplifyClient, v as createElements, ar as err, aw as flatMap, aA as fromPromise, l as generateIdempotencyKey, ax as getOrElse, at as isErr, as as isOk, av as mapError, au as mapResult, aq as ok, az as toNullable, aB as tryCatch, ay as unwrap } from './client-xBhdHLq4.js';
1
+ export { af as AUTHORIZATION_TYPE, ak as AUTH_MUTATION, a4 as AbortablePromise, s as ActivityService, cd as AddressData, cG as AddressInfo, aU as AmountToPay, co as AuthResponse, A as AuthService, n as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c3 as AvailabilityResult, bK as AvailableSlot, bN as Booking, bM as BookingStatus, bO as BookingWithDetails, bc as BufferTimes, br as Business, bF as BusinessHours, bq as BusinessPreferences, B as BusinessService, bE as BusinessSettings, bp as BusinessType, bC as BusinessWithLocations, a8 as CHECKOUT_MODE, al as CHECKOUT_MUTATION, ab as CHECKOUT_STEP, ah as CONTACT_TYPE, bV as CancelBookingInput, bW as CancelBookingResult, b6 as CancelOrderInput, be as CancellationPolicy, j as CartOperations, b as CatalogueQueries, aH as CatalogueResult, aI as CatalogueSnapshot, bG as CategoryInfo, bS as CheckSlotAvailabilityInput, bT as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, Y as CheckoutFormData, b4 as CheckoutInput, N as CheckoutMode, k as CheckoutOperations, V as CheckoutOrderType, W as CheckoutPaymentMethod, Z as CheckoutResult, k as CheckoutService, a2 as CheckoutStatus, a3 as CheckoutStatusContext, X as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, x as CimplifyElement, w as CimplifyElements, a7 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bQ as CustomerBooking, bP as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, bb as CustomerServicePreferences, ap as DEFAULT_COUNTRY, ao as DEFAULT_CURRENCY, ag as DEVICE_TYPE, bL as DayAvailability, bl as DepositResult, a6 as DeviceType, z as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, K as ElementEventType, H as ElementOptions, J as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, D as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, as as Err, aT as FeeBearerType, F as FetchQuoteInput, aR as FulfillmentLink, aQ as FulfillmentStatus, aP as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, r as FxService, bR as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, aj as LINK_MUTATION, ai as LINK_QUERY, aV as LineItem, aM as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, u as LiteBootstrap, q as LiteService, bu as Location, bo as LocationAppointment, c2 as LocationStock, bs as LocationTaxBehavior, bt as LocationTaxOverrides, bx as LocationTimeProfile, bD as LocationWithDetails, M as MESSAGE_TYPES, ae as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a5 as MobileMoneyProvider, _ as NextAction, an as ORDER_MUTATION, a9 as ORDER_TYPE, cD as ObservabilityHooks, ar as Ok, aW as Order, aL as OrderChannel, b3 as OrderFilter, aS as OrderFulfillmentSummary, aZ as OrderGroup, b1 as OrderGroupDetails, a_ as OrderGroupPayment, aY as OrderGroupPaymentState, b0 as OrderGroupPaymentSummary, aX as OrderHistory, aN as OrderLineState, aO as OrderLineStatus, b2 as OrderPaymentEvent, O as OrderQueries, a$ as OrderSplitDetail, aJ as OrderStatus, cE as OrderType, o as OtpResult, aa as PAYMENT_METHOD, am as PAYMENT_MUTATION, ac as PAYMENT_STATE, ad as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aK as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bg as PricingOverrides, a1 as ProcessAndResolveOptions, $ as ProcessCheckoutOptions, a0 as ProcessCheckoutResult, c0 as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, b7 as RefundOrderInput, ba as ReminderMethod, bd as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, h as RequestSource, cy as RequestStartEvent, cz as RequestSuccessEvent, bU as RescheduleBookingInput, bX as RescheduleBookingResult, bj as ResourceAssignment, aq as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bz as Room, bh as SchedulingMetadata, bk as SchedulingResult, p as SchedulingService, S as SearchOptions, bH as Service, bY as ServiceAvailabilityParams, bZ as ServiceAvailabilityResult, bA as ServiceCharge, bf as ServiceNotes, bm as ServiceScheduleRequest, b8 as ServiceStatus, cC as SessionChangeEvent, bI as Staff, bi as StaffAssignment, b9 as StaffRole, bn as StaffScheduleItem, b$ as StockLevel, b_ as StockStatus, bB as StorefrontBootstrap, by as Table, v as TableInfo, bv as TimeRange, bw as TimeRanges, bJ as TimeSlot, t as TrackCategoryViewOptions, T as TrackProductViewOptions, ca as UpdateAddressInput, b5 as UpdateOrderStatusInput, U as UpdateProfileInput, c1 as VariantStock, cn as VerifyOtpInput, aF as combine, aG as combineObject, c as createCimplifyClient, y as createElements, au as err, az as flatMap, aD as fromPromise, l as generateIdempotencyKey, aA as getOrElse, aw as isErr, av as isOk, ay as mapError, ax as mapResult, at as ok, aC as toNullable, aE as tryCatch, aB as unwrap } from './client-NdvQpCxU.js';
2
2
  export { QueryBuilder, query } from './advanced.js';
3
- import { A as ApiError } from './payment-CrNyrc-D.js';
4
- export { F as AddOn, aJ as AddOnDetails, b3 as AddOnGroupDetails, H as AddOnOption, b2 as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, b8 as AddToCartInput, be as AddressAuthorizationData, ay as AdjustmentType, aF as AppliedDiscount, bf as AuthorizationType, aE as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, a1 as BundleComponentVariantView, a0 as BundleComponentView, T as BundlePriceType, X as BundleProduct, aO as BundleSelectionData, aM as BundleSelectionInput, aN as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aT as Cart, aK as CartAddOn, aw as CartChannel, aU as CartItem, b5 as CartItemDetails, av as CartStatus, ba as CartSummary, aV as CartTotals, L as Category, N as CategorySummary, aD as ChosenPrice, g as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a9 as ComponentGroup, aa as ComponentGroupWithComponents, ag as ComponentPriceBreakdown, ae as ComponentSelectionInput, a6 as ComponentSourceType, a7 as Composite, ad as CompositeComponent, ac as CompositeComponentView, ab as CompositeGroupView, aQ as CompositePriceBreakdown, af as CompositePriceResult, a4 as CompositePricingMode, aR as CompositeSelectionData, ae as CompositeSelectionInput, aP as CompositeStoredSelection, a8 as CompositeWithDetails, C as CurrencyCode, aq as Deal, ap as DealBenefitType, q as DepositType, p as DigitalProductType, aG as DiscountBreakdown, aH as DiscountDetails, as as DiscountValidation, aY as DisplayAddOn, aZ as DisplayAddOnOption, aW as DisplayCart, aX as DisplayCartItem, D as DisplayMode, f as ERROR_HINTS, E as ErrorCode, d as ErrorCodeType, e as ErrorHint, a5 as GroupPricingBehavior, bj as InitializePaymentResult, I as InventoryType, aS as LineConfiguration, aj as LocationProductPrice, M as Money, b as Pagination, P as PaginationParams, bi as Payment, bm as PaymentErrorDetails, bh as PaymentMethod, bd as PaymentMethodType, bg as PaymentProcessingState, bc as PaymentProvider, bk as PaymentResponse, bb as PaymentStatus, bl as PaymentStatusResponse, ai as Price, az as PriceAdjustment, aC as PriceDecisionPath, ah as PriceEntryType, aB as PricePathTaxInfo, ax as PriceSource, r as Product, K as ProductAddOn, ak as ProductAvailability, ao as ProductAvailabilityNow, ar as ProductDealInfo, o as ProductRenderHint, am as ProductTaxonomy, al as ProductTimeProfile, n as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, aI as SelectedAddOnOption, bn as SubmitAuthorizationInput, at as Tag, au as TagsResponse, aA as TaxPathComponent, an as TaxonomyWithChildren, b6 as UICart, a_ as UICartBusiness, b0 as UICartCustomer, a$ as UICartLocation, b1 as UICartPricing, b7 as UICartResponse, b9 as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, a3 as VariantAxisValueView, a2 as VariantAxisView, w as VariantAxisWithValues, aL as VariantDetails, b4 as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, h as isCimplifyError, l as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-CrNyrc-D.js';
5
- export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, getTaxAmount, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice } from './utils.js';
3
+ import { A as ApiError } from './payment-Dvd7nRmk.js';
4
+ export { F as AddOn, aJ as AddOnDetails, b3 as AddOnGroupDetails, H as AddOnOption, b2 as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, b8 as AddToCartInput, be as AddressAuthorizationData, ay as AdjustmentType, aF as AppliedDiscount, bf as AuthorizationType, aE as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, a1 as BundleComponentVariantView, a0 as BundleComponentView, T as BundlePriceType, X as BundleProduct, aO as BundleSelectionData, aM as BundleSelectionInput, aN as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aT as Cart, aK as CartAddOn, aw as CartChannel, aU as CartItem, b5 as CartItemDetails, av as CartStatus, ba as CartSummary, aV as CartTotals, L as Category, N as CategorySummary, aD as ChosenPrice, g as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a9 as ComponentGroup, aa as ComponentGroupWithComponents, ag as ComponentPriceBreakdown, ae as ComponentSelectionInput, a6 as ComponentSourceType, a7 as Composite, ad as CompositeComponent, ac as CompositeComponentView, ab as CompositeGroupView, aQ as CompositePriceBreakdown, af as CompositePriceResult, a4 as CompositePricingMode, aR as CompositeSelectionData, ae as CompositeSelectionInput, aP as CompositeStoredSelection, a8 as CompositeWithDetails, C as CurrencyCode, aq as Deal, ap as DealBenefitType, q as DepositType, p as DigitalProductType, aG as DiscountBreakdown, aH as DiscountDetails, as as DiscountValidation, aY as DisplayAddOn, aZ as DisplayAddOnOption, aW as DisplayCart, aX as DisplayCartItem, D as DisplayMode, f as ERROR_HINTS, E as ErrorCode, d as ErrorCodeType, e as ErrorHint, a5 as GroupPricingBehavior, bj as InitializePaymentResult, I as InventoryType, aS as LineConfiguration, aj as LocationProductPrice, M as Money, b as Pagination, P as PaginationParams, bi as Payment, bm as PaymentErrorDetails, bh as PaymentMethod, bd as PaymentMethodType, bg as PaymentProcessingState, bc as PaymentProvider, bk as PaymentResponse, bb as PaymentStatus, bl as PaymentStatusResponse, ai as Price, az as PriceAdjustment, aC as PriceDecisionPath, ah as PriceEntryType, aB as PricePathTaxInfo, ax as PriceSource, r as Product, K as ProductAddOn, ak as ProductAvailability, ao as ProductAvailabilityNow, ar as ProductDealInfo, o as ProductRenderHint, am as ProductTaxonomy, al as ProductTimeProfile, n as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, aI as SelectedAddOnOption, bn as SubmitAuthorizationInput, at as Tag, au as TagsResponse, aA as TaxPathComponent, an as TaxonomyWithChildren, b6 as UICart, a_ as UICartBusiness, b0 as UICartCustomer, a$ as UICartLocation, b1 as UICartPricing, b7 as UICartResponse, b9 as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, a3 as VariantAxisValueView, a2 as VariantAxisView, w as VariantAxisWithValues, aL as VariantDetails, b4 as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, h as isCimplifyError, l as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-Dvd7nRmk.js';
5
+ export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, getTaxAmount, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, isValidPhoneForContext, normalizePaymentResponse, normalizePhoneToE164, normalizeStatusResponse, parsePrice, resolvePhoneCountryCode } from './utils.js';
6
6
  export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme, g as getVariantDisplayName } from './ads-BxbWrwqp.js';
7
- export { a as FormatCompactOptions, F as FormatPriceOptions, P as ProductWithPrice } from './price-RKKoTz-9.js';
7
+ export { a as FormatCompactOptions, F as FormatPriceOptions, P as ProductWithPrice } from './price-DrfhwHpw.js';
8
+ import 'libphonenumber-js';
8
9
 
9
10
  interface FrontendContext {
10
11
  location_id?: string;
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var libphonenumberJs = require('libphonenumber-js');
4
+
3
5
  // src/types/common.ts
4
6
  function money(value) {
5
7
  return typeof value === "string" ? parseFloat(value) || 0 : value;
@@ -2832,6 +2834,46 @@ var FxService = class {
2832
2834
  }
2833
2835
  };
2834
2836
 
2837
+ // src/activity.ts
2838
+ var ActivityService = class {
2839
+ constructor(client) {
2840
+ this.client = client;
2841
+ }
2842
+ trackProductView(productId, options = {}) {
2843
+ const event = {
2844
+ type: "product_view",
2845
+ product_id: productId,
2846
+ product_name: options.productName,
2847
+ category_id: options.categoryId,
2848
+ price: options.price,
2849
+ page_path: options.pagePath ?? currentPath()
2850
+ };
2851
+ this.sendEvents([event]);
2852
+ }
2853
+ trackCategoryView(categoryId, options = {}) {
2854
+ const event = {
2855
+ type: "category_view",
2856
+ category_id: categoryId,
2857
+ category_name: options.categoryName,
2858
+ page_path: options.pagePath ?? currentPath()
2859
+ };
2860
+ this.sendEvents([event]);
2861
+ }
2862
+ sendEvents(events) {
2863
+ try {
2864
+ this.client.post("/api/v1/activity/events", { events }).catch(() => {
2865
+ });
2866
+ } catch {
2867
+ }
2868
+ }
2869
+ };
2870
+ function currentPath() {
2871
+ if (typeof window !== "undefined") {
2872
+ return window.location.pathname;
2873
+ }
2874
+ return void 0;
2875
+ }
2876
+
2835
2877
  // src/types/elements.ts
2836
2878
  var ELEMENT_TYPES = {
2837
2879
  AUTH: "auth",
@@ -4124,6 +4166,12 @@ var CimplifyClient = class {
4124
4166
  }
4125
4167
  return this._fx;
4126
4168
  }
4169
+ get activity() {
4170
+ if (!this._activity) {
4171
+ this._activity = new ActivityService(this);
4172
+ }
4173
+ return this._activity;
4174
+ }
4127
4175
  elements(businessId, options) {
4128
4176
  if (businessId) {
4129
4177
  this.setBusinessId(businessId);
@@ -4239,9 +4287,171 @@ function getVariantDisplayName(variant, productName) {
4239
4287
  }
4240
4288
  return productName || (variant.is_default ? "Default" : "Option");
4241
4289
  }
4290
+ var ISO3_TO_COUNTRY_CODE = {
4291
+ AGO: "AO",
4292
+ ARE: "AE",
4293
+ AUS: "AU",
4294
+ BDI: "BI",
4295
+ BRA: "BR",
4296
+ BWA: "BW",
4297
+ CAN: "CA",
4298
+ CHE: "CH",
4299
+ CHN: "CN",
4300
+ COD: "CD",
4301
+ EGY: "EG",
4302
+ ETH: "ET",
4303
+ GHA: "GH",
4304
+ GIN: "GN",
4305
+ GMB: "GM",
4306
+ GBR: "GB",
4307
+ HKG: "HK",
4308
+ IDN: "ID",
4309
+ IND: "IN",
4310
+ ISR: "IL",
4311
+ JPN: "JP",
4312
+ KEN: "KE",
4313
+ KOR: "KR",
4314
+ LBR: "LR",
4315
+ MUS: "MU",
4316
+ MEX: "MX",
4317
+ MOZ: "MZ",
4318
+ MWI: "MW",
4319
+ MYS: "MY",
4320
+ NAM: "NA",
4321
+ NGA: "NG",
4322
+ PHL: "PH",
4323
+ RWA: "RW",
4324
+ SAU: "SA",
4325
+ SGP: "SG",
4326
+ SLE: "SL",
4327
+ THA: "TH",
4328
+ TUR: "TR",
4329
+ TWN: "TW",
4330
+ TZA: "TZ",
4331
+ UGA: "UG",
4332
+ USA: "US",
4333
+ VNM: "VN",
4334
+ ZAF: "ZA",
4335
+ ZMB: "ZM"
4336
+ };
4337
+ var CURRENCY_TO_COUNTRY_CODE = {
4338
+ AED: "AE",
4339
+ AOA: "AO",
4340
+ AUD: "AU",
4341
+ BIF: "BI",
4342
+ BWP: "BW",
4343
+ BRL: "BR",
4344
+ CAD: "CA",
4345
+ CDF: "CD",
4346
+ CHF: "CH",
4347
+ CNY: "CN",
4348
+ EGP: "EG",
4349
+ ETB: "ET",
4350
+ GHS: "GH",
4351
+ GMD: "GM",
4352
+ GNF: "GN",
4353
+ GBP: "GB",
4354
+ HKD: "HK",
4355
+ IDR: "ID",
4356
+ ILS: "IL",
4357
+ INR: "IN",
4358
+ JPY: "JP",
4359
+ KES: "KE",
4360
+ KRW: "KR",
4361
+ LRD: "LR",
4362
+ MUR: "MU",
4363
+ MWK: "MW",
4364
+ MXN: "MX",
4365
+ MYR: "MY",
4366
+ MZN: "MZ",
4367
+ NAD: "NA",
4368
+ NGN: "NG",
4369
+ PHP: "PH",
4370
+ RWF: "RW",
4371
+ SAR: "SA",
4372
+ SGD: "SG",
4373
+ SLL: "SL",
4374
+ THB: "TH",
4375
+ TRY: "TR",
4376
+ TWD: "TW",
4377
+ TZS: "TZ",
4378
+ UGX: "UG",
4379
+ USD: "US",
4380
+ VND: "VN",
4381
+ ZAR: "ZA",
4382
+ ZMW: "ZM"
4383
+ };
4384
+ function normalizeCountryCode(value) {
4385
+ const normalized = value?.trim().toUpperCase();
4386
+ if (!normalized) {
4387
+ return void 0;
4388
+ }
4389
+ if (normalized.length === 2) {
4390
+ return normalized;
4391
+ }
4392
+ return ISO3_TO_COUNTRY_CODE[normalized];
4393
+ }
4394
+ function parsePhoneCandidate(value, country) {
4395
+ try {
4396
+ return country ? libphonenumberJs.parsePhoneNumberFromString(value, country) : libphonenumberJs.parsePhoneNumberFromString(value);
4397
+ } catch {
4398
+ return void 0;
4399
+ }
4400
+ }
4401
+ function resolvePhoneCountryCode(options = {}) {
4402
+ const explicitCountry = normalizeCountryCode(options.country);
4403
+ if (explicitCountry) {
4404
+ return explicitCountry;
4405
+ }
4406
+ const currency = options.currency?.trim().toUpperCase();
4407
+ if (!currency) {
4408
+ return void 0;
4409
+ }
4410
+ return CURRENCY_TO_COUNTRY_CODE[currency];
4411
+ }
4412
+ function normalizePhoneToE164(raw, options = {}) {
4413
+ const trimmed = raw.trim();
4414
+ if (!trimmed) {
4415
+ return null;
4416
+ }
4417
+ const country = resolvePhoneCountryCode(options);
4418
+ const digits = trimmed.replace(/\D/g, "");
4419
+ const internationalDigits = digits.startsWith("00") ? digits.slice(2) : digits;
4420
+ const attempts = [];
4421
+ const seen = /* @__PURE__ */ new Set();
4422
+ function addAttempt(value, nextCountry) {
4423
+ const key = `${nextCountry || ""}:${value}`;
4424
+ if (seen.has(key)) {
4425
+ return;
4426
+ }
4427
+ seen.add(key);
4428
+ attempts.push({ value, country: nextCountry });
4429
+ }
4430
+ if (country) {
4431
+ addAttempt(trimmed, country);
4432
+ }
4433
+ addAttempt(trimmed);
4434
+ if (country && digits) {
4435
+ addAttempt(digits, country);
4436
+ }
4437
+ if (internationalDigits) {
4438
+ addAttempt(`+${internationalDigits}`);
4439
+ }
4440
+ for (const attempt of attempts) {
4441
+ const parsed = parsePhoneCandidate(attempt.value, attempt.country);
4442
+ if (parsed?.isValid()) {
4443
+ return parsed.format("E.164");
4444
+ }
4445
+ }
4446
+ return null;
4447
+ }
4448
+ function isValidPhoneForContext(raw, options = {}) {
4449
+ return normalizePhoneToE164(raw, options) !== null;
4450
+ }
4242
4451
 
4243
4452
  exports.AUTHORIZATION_TYPE = AUTHORIZATION_TYPE;
4244
4453
  exports.AUTH_MUTATION = AUTH_MUTATION;
4454
+ exports.ActivityService = ActivityService;
4245
4455
  exports.AuthService = AuthService;
4246
4456
  exports.BusinessService = BusinessService;
4247
4457
  exports.CHECKOUT_MODE = CHECKOUT_MODE;
@@ -4323,15 +4533,18 @@ exports.isPaymentStatusSuccess = isPaymentStatusSuccess;
4323
4533
  exports.isRetryableError = isRetryableError;
4324
4534
  exports.isSupportedCurrency = isSupportedCurrency;
4325
4535
  exports.isTaxInclusive = isTaxInclusive;
4536
+ exports.isValidPhoneForContext = isValidPhoneForContext;
4326
4537
  exports.mapError = mapError;
4327
4538
  exports.mapResult = mapResult;
4328
4539
  exports.money = money;
4329
4540
  exports.moneyFromNumber = moneyFromNumber;
4330
4541
  exports.normalizePaymentResponse = normalizePaymentResponse;
4542
+ exports.normalizePhoneToE164 = normalizePhoneToE164;
4331
4543
  exports.normalizeStatusResponse = normalizeStatusResponse;
4332
4544
  exports.ok = ok;
4333
4545
  exports.parsePrice = parsePrice;
4334
4546
  exports.query = query;
4547
+ exports.resolvePhoneCountryCode = resolvePhoneCountryCode;
4335
4548
  exports.toNullable = toNullable;
4336
4549
  exports.tryCatch = tryCatch;
4337
4550
  exports.unwrap = unwrap;