@cimplify/sdk 0.82.0 → 0.84.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.
Files changed (50) hide show
  1. package/dist/advanced.d.mts +3 -3
  2. package/dist/advanced.d.ts +3 -3
  3. package/dist/{chunk-SRJEMEVZ.js → chunk-FKBXZ2A6.js} +212 -6
  4. package/dist/{chunk-7PAQR3VC.mjs → chunk-I6RE4BKH.mjs} +4 -2
  5. package/dist/{chunk-IZDJEDR4.js → chunk-ODEPW244.js} +5 -3
  6. package/dist/{chunk-BRVIXGUW.mjs → chunk-PLTP6HWW.mjs} +212 -6
  7. package/dist/{client-DnHP_2Jw.d.mts → client-Ba4Hng9i.d.mts} +2 -2
  8. package/dist/{client-BSpVgule.d.mts → client-BjUJapti.d.mts} +2 -2
  9. package/dist/{client-xc2aQSB4.d.ts → client-CINi3Dw3.d.ts} +2 -2
  10. package/dist/{client-Dh-KIIX8.d.ts → client-D8AjO8jb.d.ts} +2 -2
  11. package/dist/{index-Dy8D3r9b.d.mts → index-9Bl-zBAI.d.mts} +3 -3
  12. package/dist/{index-C4xE31-D.d.ts → index-DCPxHjbj.d.ts} +3 -3
  13. package/dist/index.d.mts +6 -6
  14. package/dist/index.d.ts +6 -6
  15. package/dist/mock/cli.mjs +309 -19
  16. package/dist/mock/library.js +223 -6
  17. package/dist/mock/library.mjs +216 -7
  18. package/dist/mock/msw.js +212 -6
  19. package/dist/mock/msw.mjs +212 -6
  20. package/dist/{payment-nH9OCUg2.d.ts → payment-BVv9leS_.d.ts} +1 -1
  21. package/dist/{payment-T_0MUE9o.d.mts → payment-D61iGd0o.d.mts} +1 -1
  22. package/dist/{price-B8WMoldA.d.ts → price-BYWCHYO5.d.ts} +3 -1
  23. package/dist/{price-Bg7hujK_.d.mts → price-Cthq6nPb.d.mts} +3 -1
  24. package/dist/{product-DXhjLQ_w.d.mts → product-2MAoE0kZ.d.mts} +26 -1
  25. package/dist/{product-DXhjLQ_w.d.ts → product-2MAoE0kZ.d.ts} +26 -1
  26. package/dist/react.d.mts +36 -5
  27. package/dist/react.d.ts +36 -5
  28. package/dist/react.js +99 -11
  29. package/dist/react.mjs +99 -12
  30. package/dist/{server-tr993CPj.d.mts → server-BjQ0xWmc.d.mts} +87 -3
  31. package/dist/{server-wAB-qfyZ.d.ts → server-DDaQIYLa.d.ts} +87 -3
  32. package/dist/server.d.mts +4 -4
  33. package/dist/server.d.ts +4 -4
  34. package/dist/testing/msw.d.mts +2 -2
  35. package/dist/testing/msw.d.ts +2 -2
  36. package/dist/testing/msw.js +2 -2
  37. package/dist/testing/msw.mjs +1 -1
  38. package/dist/testing/suite.d.mts +6 -6
  39. package/dist/testing/suite.d.ts +6 -6
  40. package/dist/testing/suite.js +21 -21
  41. package/dist/testing/suite.mjs +2 -2
  42. package/dist/testing.d.mts +11 -5
  43. package/dist/testing.d.ts +11 -5
  44. package/dist/testing.js +77 -77
  45. package/dist/testing.mjs +3 -3
  46. package/dist/utils.d.mts +4 -4
  47. package/dist/utils.d.ts +4 -4
  48. package/package.json +1 -1
  49. package/registry/default-product-layout.json +1 -1
  50. package/registry/retail-product-card.json +1 -1
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
- export { A as AUTHORIZATION_TYPE, a as AUTH_MUTATION, b as AbortablePromise, c as ActivityRecommendation, d as ActivityRecommendationsResponse, e as ActivityService, f as ActivityStateResponse, g as AddressData, h as AddressInfo, i as AmountToPay, j as AuthResponse, k as AuthService, l as AuthStatus, m as AuthenticatedCustomer, n as AuthenticatedData, o as AutocompletePrediction, p as AutocompleteResponse, q as AvailabilityResult, r as AvailableSlot, B as Booking, s as BookingModificationType, t as BookingStatus, u as BookingWithDetails, v as BufferTimes, w as Business, x as BusinessDetailsDTO, y as BusinessHours, z as BusinessPreferences, C as BusinessService, D as BusinessSettings, E as BusinessType, F as BusinessWithLocations, G as CHECKOUT_MODE, H as CHECKOUT_MUTATION, I as CHECKOUT_STEP, J as CONTACT_TYPE, K as CacheOptions, L as CancelBookingInput, M as CancelBookingResult, N as CancelOrderInput, O as CancellationPolicy, P as CartOperations, Q as CatalogueQueries, R as CatalogueResult, S as CatalogueSnapshot, T as CategoryInfo, U as ChatAttachment, V as ChatConversation, W as ChatConversationResponse, X as ChatMessage, Y as ChatWidgetStarter, Z as CheckSlotAvailabilityInput, _ as CheckSlotAvailabilityResult, $ as CheckoutAddressInfo, a0 as CheckoutCartData, a1 as CheckoutCartItem, a2 as CheckoutCustomerInfo, a3 as CheckoutFormData, a4 as CheckoutInput, a5 as CheckoutMode, a9 as CheckoutOperations, a6 as CheckoutOrderType, a7 as CheckoutPaymentMethod, a8 as CheckoutResult, a9 as CheckoutService, aa as CheckoutStatus, ab as CheckoutStatusContext, ac as CheckoutStep, ad as CimplifyClient, ae as CimplifyConfig, af as CimplifyElement, ag as CimplifyElements, ah as ContactType, ai as ContentType, aj as CreateAddressInput, ak as CreateMobileMoneyInput, al as Customer, am as CustomerAddress, an as CustomerBooking, ao as CustomerBookingServiceItem, ap as CustomerLinkPreferences, aq as CustomerMobileMoney, ar as CustomerServicePreferences, as as DEFAULT_COUNTRY, at as DEFAULT_CURRENCY, au as DEVICE_TYPE, av as DayAvailability, aw as DeliveryFeeDetails, ax as DeliveryFeeResponse, ay as DeliveryOption, az as DeliveryOptionsResponse, aA as DeliveryService, aB as DepositResult, aC as DeviceType, aD as DismissMessageResponse, aE as ELEMENTS_AUTH_CONTACT_TYPES, aF as ELEMENTS_AUTH_MODES, aG as ELEMENTS_AUTH_PROMPTS, aH as ELEMENT_TYPES, aI as EVENT_TYPES, aJ as ElementAppearance, aK as ElementEventHandler, aL as ElementEventType, aM as ElementOptions, aN as ElementType, aO as ElementsAuthContactType, aP as ElementsAuthMode, aQ as ElementsAuthOptions, aR as ElementsAuthPrompt, aS as ElementsCheckoutData, aT as ElementsCheckoutResult, aU as ElementsCustomerInfo, aV as ElementsOptions, aW as EnrichedOrder, aX as EnrichedOrderItem, aY as EnrollAndLinkOrderInput, aZ as EnrollAndLinkOrderResult, a_ as EnrollmentData, a$ as Err, b0 as FeeBearerType, b1 as FetchQuoteInput, b2 as FulfillmentLink, b3 as FulfillmentStatus, b4 as FulfillmentSummaryDTO, b5 as FulfillmentType, b6 as FxQuote, b7 as FxQuoteRequest, b8 as FxRateResponse, b9 as FxService, ba as GetAvailableSlotsInput, bb as GetDeliveryOptionsParams, bc as GetOrdersOptions, bd as GetProductsOptions, be as GroupOrderInfo, bf as IframeToParentMessage, bg as InventoryService, bh as LINK_MUTATION, bi as LINK_QUERY, bj as LineItem, bk as LineType, bl as LinkData, bm as LinkEnrollResult, bn as LinkService, bo as LinkSession, bp as LinkStatusResult, bq as LiteBootstrap, br as LiteService, bs as Location, bt as LocationBooking, bu as LocationTaxBehavior, bv as LocationTaxOverrides, bw as LocationTimeProfile, bx as LocationWithDetails, by as MESSAGE_TYPES, bz as MOBILE_MONEY_PROVIDER, bA as MobileMoneyData, bB as MobileMoneyDetails, bC as MobileMoneyProvider, bD as NextAction, bE as ORDER_MUTATION, bF as ORDER_TYPE, bG as ObservabilityHooks, bH as Ok, bI as Order, bJ as OrderChannel, bK as OrderCustomerInfo, bL as OrderDiscountInfo, bM as OrderFilter, bN as OrderFulfillmentSummary, bO as OrderGroup, bP as OrderGroupDetails, bQ as OrderGroupPayment, bR as OrderGroupPaymentState, bS as OrderGroupPaymentStatus, bT as OrderGroupPaymentSummary, bU as OrderGroupStatus, bV as OrderHistory, bW as OrderLineState, bX as OrderLineStatus, bY as OrderLocationInfo, bZ as OrderPaymentEvent, b_ as OrderPricingView, b$ as OrderQueries, c0 as OrderSplitDetail, c1 as OrderStaffInfo, c2 as OrderStatus, c3 as OrderTimestampsDTO, c4 as OrderType, c5 as OtpResult, c6 as PAYMENT_METHOD, c7 as PAYMENT_MUTATION, c8 as PAYMENT_STATE, c9 as PICKUP_TIME_TYPE, ca as ParentToIframeMessage, cb as PaymentInfoDTO, cc as PaymentMethodInfo, cd as PaymentState, ce as PickupTime, cf as PickupTimeType, cg as PlaceDetailsResponse, ch as PlacesService, ci as PriceQuote, cj as PricingOverrides, ck as ProcessAndResolveOptions, cl as ProcessCheckoutOptions, cm as ProcessCheckoutResult, cn as ProviderResolutionSource, co as QuoteBundleSelectionInput, cp as QuoteCompositeSelectionInput, cq as QuoteDynamicBuckets, cr as QuoteStatus, cs as QuoteUiMessage, ct as ReadRequestOptions, cu as RefreshQuoteInput, cv as RefreshQuoteResult, cw as RefundOrderInput, cx as RelatedCandidate, cy as RelatedProduct, cz as RelatedProductsEnrichment, cA as RelationType, cB as ReminderMethod, cC as ReminderSettings, cD as ReorderResult, cE as RequestContext, cF as RequestErrorEvent, cG as RequestOptions, cH as RequestOtpInput, cI as RequestSource, cJ as RequestStartEvent, cK as RequestSuccessEvent, cL as RescheduleBookingInput, cM as RescheduleBookingResult, cN as RescheduleHistoryRecord, cO as ResourceAssignment, cP as Result, cQ as RetryEvent, cR as RevokeAllSessionsResult, cS as RevokeSessionResult, cT as Room, cU as SchedulingMetadata, cV as SchedulingResult, cW as SchedulingService, cX as SenderType, cY as Service, cZ as ServiceAvailabilityParams, c_ as ServiceAvailabilityResult, c$ as ServiceCharge, d0 as ServiceNotes, d1 as ServiceScheduleRequest, d2 as ServiceStatus, d3 as SessionActivityData, d4 as SessionChangeEvent, d5 as SessionMessage, d6 as SlotResourceInfo, d7 as SlotStaffInfo, d8 as Staff, d9 as StaffAssignment, da as StaffRole, db as StaffScheduleItem, dc as StockLevel, dd as StockStatus, de as StoreCreditBalance, df as StoreCreditQueries, dg as StorefrontBootstrap, dh as SubscriptionService, di as SupportService, dj as Table, dk as TableInfo, dl as TimeRange, dm as TimeRanges, dn as TimeSlot, dp as TrackCategoryViewOptions, dq as TrackProductViewOptions, dr as UpdateAddressInput, ds as UpdateOrderStatusInput, dt as UpdateProfileInput, du as UploadInitResponse, dv as UploadResult, dw as UploadService, dx as VerifyOtpInput, dy as combine, dz as combineObject, dA as createCimplifyClient, dB as createElements, dC as err, dD as flatMap, dE as fromPromise, dF as getOrElse, dG as isErr, dH as isOk, dI as mapError, dJ as mapResult, dK as ok, dL as toNullable, dM as tryCatch, dN as unwrap } from './client-DnHP_2Jw.mjs';
2
- import { b9 as ProductWithDetails, j as ApiError } from './product-DXhjLQ_w.mjs';
3
- export { A as AddOn, a as AddOnDetails, b as AddOnGroupDetails, c as AddOnOption, d as AddOnOptionDetails, e as AddOnOptionPrice, f as AddOnWithOptions, g as AddToCartInput, h as AddressValue, i as AdjustmentType, k as AppliedDiscount, l as AttributeAppliesTo, m as AttributeType, n as AttributeValidationRules, o as AttributeVisibility, B as BenefitType, p as BillingFrequency, q as BillingMarkupType, r as BillingPlanType, s as Bundle, t as BundleComponentData, u as BundleComponentInfo, v as BundleComponentVariantView, w as BundleComponentView, x as BundlePriceType, y as BundleProduct, z as BundleSelectionData, C as BundleSelectionInput, D as BundleStoredSelection, E as BundleSummary, F as BundleWithDetails, G as Cart, H as CartAddOn, I as CartChannel, J as CartItem, K as CartItemDetails, L as CartMutationResult, M as CartNotice, N as CartStatus, O as CartSummary, P as CartTotals, Q as Category, R as CategorySummary, S as ChosenPrice, T as CimplifyError, U as Collection, V as CollectionProduct, W as CollectionSummary, X as ComponentGroup, Y as ComponentGroupWithComponents, Z as ComponentPriceBreakdown, _ as ComponentSchedulingData, $ as ComponentSelectionInput, a0 as ComponentSourceType, a1 as Composite, a2 as CompositeComponent, a3 as CompositeComponentView, a4 as CompositeGroupView, a5 as CompositePriceBreakdown, a6 as CompositePriceResult, a7 as CompositePricingMode, a8 as CompositeSelectionData, $ as CompositeSelectionInput, a9 as CompositeStoredSelection, aa as CompositeWithDetails, ab as CurrencyCode, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ae as CustomerInputValue, af as DURATION_UNIT, ag as DateRangeValue, ah as Deal, ai as DealBenefitType, aj as DepositType, ak as DigitalProductType, al as DiscountBreakdown, am as DiscountDetails, an as DiscountValidation, ao as DisplayAddOn, ap as DisplayAddOnOption, aq as DisplayCart, ar as DisplayCartItem, as as DisplayMode, at as DurationUnit, au as ERROR_HINTS, av as EligiblePlansQuery, aw as ErrorCode, ax as ErrorCodeType, ay as ErrorHint, az as FacetValue, aA as FormattedPlanOption, aB as GroupPricingBehavior, aC as INPUT_FIELD_TYPE, aD as IdempotencyMismatchError, aE as InputFieldType, aF as InputFieldValidation, aG as InventoryType, aH as KnowledgeArticle, aI as LineConfiguration, aJ as LocationProductPrice, aK as LocationValue, aL as MeasurementValue, aM as Money, aN as PRODUCT_TYPE, aO as Pagination, aP as PaginationParams, aQ as PhoneValue, aR as Price, aS as PriceAdjustment, aT as PriceDecisionPath, aU as PriceEntryType, aV as PricePathTaxInfo, aW as PriceSource, aX as Product, aY as ProductAddOn, aZ as ProductAvailability, a_ as ProductAvailabilityNow, a$ as ProductBillingPlan, b0 as ProductDealInfo, b1 as ProductInputField, b2 as ProductProperty, b3 as ProductRenderHint, b4 as ProductTaxonomy, b5 as ProductTimeProfile, b6 as ProductType, b7 as ProductVariant, b8 as ProductVariantValue, ba as PropertyFacet, bb as PropertySource, bc as QuantityPricingTier, bd as RENDER_HINT, be as RelatedProductView, bf as SalesChannel, bg as SchedulingMode, bh as SelectedAddOnOption, bi as SemanticKind, bj as SignatureValue, bk as Subscription, bl as SubscriptionInvoice, bm as SubscriptionItem, bn as SubscriptionStatus, bo as SubscriptionWithDetails, bp as Tag, bq as TagsResponse, br as TaxPathComponent, bs as TaxonomyAttributeTemplate, bt as TaxonomyWithChildren, bu as UICart, bv as UICartBusiness, bw as UICartCustomer, bx as UICartLocation, by as UICartPricing, bz as UpdateCartItemInput, bA as VariantAxis, bB as VariantAxisSelection, bC as VariantAxisValue, bD as VariantAxisValueView, bE as VariantAxisView, bF as VariantAxisWithValues, bG as VariantDetails, bH as VariantDetailsDTO, bI as VariantDisplayAttribute, bJ as VariantLocationAvailability, bK as VariantStrategy, bL as VariantView, bM as ZERO, bN as currencyCode, bO as enrichError, bP as getErrorHint, bQ as isCimplifyError, bR as isIdempotencyMismatchError, bS as isQuoteConflictRequiringConsent, bT as isQuoteError, bU as isRetryableError, bV as isSupportedCurrency, bW as money, bX as moneyFromNumber } from './product-DXhjLQ_w.mjs';
4
- export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, h as formatPriceRange, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, p as getPriceRange, q as getProductCurrency, r as getTaxAmount, s as getUnitPriceAtQuantity, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-Dy8D3r9b.mjs';
1
+ export { A as AUTHORIZATION_TYPE, a as AUTH_MUTATION, b as AbortablePromise, c as ActivityRecommendation, d as ActivityRecommendationsResponse, e as ActivityService, f as ActivityStateResponse, g as AddressData, h as AddressInfo, i as AmountToPay, j as AuthResponse, k as AuthService, l as AuthStatus, m as AuthenticatedCustomer, n as AuthenticatedData, o as AutocompletePrediction, p as AutocompleteResponse, q as AvailabilityResult, r as AvailableSlot, B as Booking, s as BookingModificationType, t as BookingStatus, u as BookingWithDetails, v as BufferTimes, w as Business, x as BusinessDetailsDTO, y as BusinessHours, z as BusinessPreferences, C as BusinessService, D as BusinessSettings, E as BusinessType, F as BusinessWithLocations, G as CHECKOUT_MODE, H as CHECKOUT_MUTATION, I as CHECKOUT_STEP, J as CONTACT_TYPE, K as CacheOptions, L as CancelBookingInput, M as CancelBookingResult, N as CancelOrderInput, O as CancellationPolicy, P as CartOperations, Q as CatalogueQueries, R as CatalogueResult, S as CatalogueSnapshot, T as CategoryInfo, U as ChatAttachment, V as ChatConversation, W as ChatConversationResponse, X as ChatMessage, Y as ChatWidgetStarter, Z as CheckSlotAvailabilityInput, _ as CheckSlotAvailabilityResult, $ as CheckoutAddressInfo, a0 as CheckoutCartData, a1 as CheckoutCartItem, a2 as CheckoutCustomerInfo, a3 as CheckoutFormData, a4 as CheckoutInput, a5 as CheckoutMode, a9 as CheckoutOperations, a6 as CheckoutOrderType, a7 as CheckoutPaymentMethod, a8 as CheckoutResult, a9 as CheckoutService, aa as CheckoutStatus, ab as CheckoutStatusContext, ac as CheckoutStep, ad as CimplifyClient, ae as CimplifyConfig, af as CimplifyElement, ag as CimplifyElements, ah as ContactType, ai as ContentType, aj as CreateAddressInput, ak as CreateMobileMoneyInput, al as Customer, am as CustomerAddress, an as CustomerBooking, ao as CustomerBookingServiceItem, ap as CustomerLinkPreferences, aq as CustomerMobileMoney, ar as CustomerServicePreferences, as as DEFAULT_COUNTRY, at as DEFAULT_CURRENCY, au as DEVICE_TYPE, av as DayAvailability, aw as DeliveryFeeDetails, ax as DeliveryFeeResponse, ay as DeliveryOption, az as DeliveryOptionsResponse, aA as DeliveryService, aB as DepositResult, aC as DeviceType, aD as DismissMessageResponse, aE as ELEMENTS_AUTH_CONTACT_TYPES, aF as ELEMENTS_AUTH_MODES, aG as ELEMENTS_AUTH_PROMPTS, aH as ELEMENT_TYPES, aI as EVENT_TYPES, aJ as ElementAppearance, aK as ElementEventHandler, aL as ElementEventType, aM as ElementOptions, aN as ElementType, aO as ElementsAuthContactType, aP as ElementsAuthMode, aQ as ElementsAuthOptions, aR as ElementsAuthPrompt, aS as ElementsCheckoutData, aT as ElementsCheckoutResult, aU as ElementsCustomerInfo, aV as ElementsOptions, aW as EnrichedOrder, aX as EnrichedOrderItem, aY as EnrollAndLinkOrderInput, aZ as EnrollAndLinkOrderResult, a_ as EnrollmentData, a$ as Err, b0 as FeeBearerType, b1 as FetchQuoteInput, b2 as FulfillmentLink, b3 as FulfillmentStatus, b4 as FulfillmentSummaryDTO, b5 as FulfillmentType, b6 as FxQuote, b7 as FxQuoteRequest, b8 as FxRateResponse, b9 as FxService, ba as GetAvailableSlotsInput, bb as GetDeliveryOptionsParams, bc as GetOrdersOptions, bd as GetProductsOptions, be as GroupOrderInfo, bf as IframeToParentMessage, bg as InventoryService, bh as LINK_MUTATION, bi as LINK_QUERY, bj as LineItem, bk as LineType, bl as LinkData, bm as LinkEnrollResult, bn as LinkService, bo as LinkSession, bp as LinkStatusResult, bq as LiteBootstrap, br as LiteService, bs as Location, bt as LocationBooking, bu as LocationTaxBehavior, bv as LocationTaxOverrides, bw as LocationTimeProfile, bx as LocationWithDetails, by as MESSAGE_TYPES, bz as MOBILE_MONEY_PROVIDER, bA as MobileMoneyData, bB as MobileMoneyDetails, bC as MobileMoneyProvider, bD as NextAction, bE as ORDER_MUTATION, bF as ORDER_TYPE, bG as ObservabilityHooks, bH as Ok, bI as Order, bJ as OrderChannel, bK as OrderCustomerInfo, bL as OrderDiscountInfo, bM as OrderFilter, bN as OrderFulfillmentSummary, bO as OrderGroup, bP as OrderGroupDetails, bQ as OrderGroupPayment, bR as OrderGroupPaymentState, bS as OrderGroupPaymentStatus, bT as OrderGroupPaymentSummary, bU as OrderGroupStatus, bV as OrderHistory, bW as OrderLineState, bX as OrderLineStatus, bY as OrderLocationInfo, bZ as OrderPaymentEvent, b_ as OrderPricingView, b$ as OrderQueries, c0 as OrderSplitDetail, c1 as OrderStaffInfo, c2 as OrderStatus, c3 as OrderTimestampsDTO, c4 as OrderType, c5 as OtpResult, c6 as PAYMENT_METHOD, c7 as PAYMENT_MUTATION, c8 as PAYMENT_STATE, c9 as PICKUP_TIME_TYPE, ca as ParentToIframeMessage, cb as PaymentInfoDTO, cc as PaymentMethodInfo, cd as PaymentState, ce as PickupTime, cf as PickupTimeType, cg as PlaceDetailsResponse, ch as PlacesService, ci as PriceQuote, cj as PricingOverrides, ck as ProcessAndResolveOptions, cl as ProcessCheckoutOptions, cm as ProcessCheckoutResult, cn as ProviderResolutionSource, co as QuoteBundleSelectionInput, cp as QuoteCompositeSelectionInput, cq as QuoteDynamicBuckets, cr as QuoteStatus, cs as QuoteUiMessage, ct as ReadRequestOptions, cu as RefreshQuoteInput, cv as RefreshQuoteResult, cw as RefundOrderInput, cx as RelatedCandidate, cy as RelatedProduct, cz as RelatedProductsEnrichment, cA as RelationType, cB as ReminderMethod, cC as ReminderSettings, cD as ReorderResult, cE as RequestContext, cF as RequestErrorEvent, cG as RequestOptions, cH as RequestOtpInput, cI as RequestSource, cJ as RequestStartEvent, cK as RequestSuccessEvent, cL as RescheduleBookingInput, cM as RescheduleBookingResult, cN as RescheduleHistoryRecord, cO as ResourceAssignment, cP as Result, cQ as RetryEvent, cR as RevokeAllSessionsResult, cS as RevokeSessionResult, cT as Room, cU as SchedulingMetadata, cV as SchedulingResult, cW as SchedulingService, cX as SenderType, cY as Service, cZ as ServiceAvailabilityParams, c_ as ServiceAvailabilityResult, c$ as ServiceCharge, d0 as ServiceNotes, d1 as ServiceScheduleRequest, d2 as ServiceStatus, d3 as SessionActivityData, d4 as SessionChangeEvent, d5 as SessionMessage, d6 as SlotResourceInfo, d7 as SlotStaffInfo, d8 as Staff, d9 as StaffAssignment, da as StaffRole, db as StaffScheduleItem, dc as StockLevel, dd as StockStatus, de as StoreCreditBalance, df as StoreCreditQueries, dg as StorefrontBootstrap, dh as SubscriptionService, di as SupportService, dj as Table, dk as TableInfo, dl as TimeRange, dm as TimeRanges, dn as TimeSlot, dp as TrackCategoryViewOptions, dq as TrackProductViewOptions, dr as UpdateAddressInput, ds as UpdateOrderStatusInput, dt as UpdateProfileInput, du as UploadInitResponse, dv as UploadResult, dw as UploadService, dx as VerifyOtpInput, dy as combine, dz as combineObject, dA as createCimplifyClient, dB as createElements, dC as err, dD as flatMap, dE as fromPromise, dF as getOrElse, dG as isErr, dH as isOk, dI as mapError, dJ as mapResult, dK as ok, dL as toNullable, dM as tryCatch, dN as unwrap } from './client-Ba4Hng9i.mjs';
2
+ import { b9 as ProductWithDetails, j as ApiError } from './product-2MAoE0kZ.mjs';
3
+ export { A as AddOn, a as AddOnDetails, b as AddOnGroupDetails, c as AddOnOption, d as AddOnOptionDetails, e as AddOnOptionPrice, f as AddOnWithOptions, g as AddToCartInput, h as AddressValue, i as AdjustmentType, k as AppliedDiscount, l as AttributeAppliesTo, m as AttributeType, n as AttributeValidationRules, o as AttributeVisibility, B as BenefitType, p as BillingFrequency, q as BillingMarkupType, r as BillingPlanType, s as Bundle, t as BundleComponentData, u as BundleComponentInfo, v as BundleComponentVariantView, w as BundleComponentView, x as BundlePriceType, y as BundleProduct, z as BundleSelectionData, C as BundleSelectionInput, D as BundleStoredSelection, E as BundleSummary, F as BundleWithDetails, G as Cart, H as CartAddOn, I as CartChannel, J as CartItem, K as CartItemDetails, L as CartMutationResult, M as CartNotice, N as CartStatus, O as CartSummary, P as CartTotals, Q as Category, R as CategorySummary, S as ChosenPrice, T as CimplifyError, U as Collection, V as CollectionProduct, W as CollectionSummary, X as ComponentGroup, Y as ComponentGroupWithComponents, Z as ComponentPriceBreakdown, _ as ComponentSchedulingData, $ as ComponentSelectionInput, a0 as ComponentSourceType, a1 as Composite, a2 as CompositeComponent, a3 as CompositeComponentView, a4 as CompositeGroupView, a5 as CompositePriceBreakdown, a6 as CompositePriceResult, a7 as CompositePricingMode, a8 as CompositeSelectionData, $ as CompositeSelectionInput, a9 as CompositeStoredSelection, aa as CompositeWithDetails, ab as CurrencyCode, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ae as CustomerInputValue, af as DURATION_UNIT, ag as DateRangeValue, ah as Deal, ai as DealBenefitType, aj as DepositType, ak as DigitalProductType, al as DiscountBreakdown, am as DiscountDetails, an as DiscountValidation, ao as DisplayAddOn, ap as DisplayAddOnOption, aq as DisplayCart, ar as DisplayCartItem, as as DisplayMode, at as DurationUnit, au as ERROR_HINTS, av as EligiblePlansQuery, aw as ErrorCode, ax as ErrorCodeType, ay as ErrorHint, az as FacetValue, aA as FormattedPlanOption, aB as GroupPricingBehavior, aC as INPUT_FIELD_TYPE, aD as IdempotencyMismatchError, aE as InputFieldType, aF as InputFieldValidation, aG as InventoryType, aH as KnowledgeArticle, aI as LineConfiguration, aJ as LocationProductPrice, aK as LocationValue, aL as MeasurementValue, aM as Money, aN as PRODUCT_TYPE, aO as Pagination, aP as PaginationParams, aQ as PhoneValue, aR as Price, aS as PriceAdjustment, aT as PriceDecisionPath, aU as PriceEntryType, aV as PricePathTaxInfo, aW as PriceSource, aX as Product, aY as ProductAddOn, aZ as ProductAvailability, a_ as ProductAvailabilityNow, a$ as ProductBillingPlan, b0 as ProductDealInfo, b1 as ProductInputField, b2 as ProductProperty, b3 as ProductRenderHint, b4 as ProductTaxonomy, b5 as ProductTimeProfile, b6 as ProductType, b7 as ProductVariant, b8 as ProductVariantValue, ba as PropertyFacet, bb as PropertySource, bc as QuantityPricingTier, bd as RENDER_HINT, be as RelatedProductView, bf as SaleCapInfo, bg as SaleInfo, bh as SalesChannel, bi as SchedulingMode, bj as SelectedAddOnOption, bk as SemanticKind, bl as SignatureValue, bm as Subscription, bn as SubscriptionInvoice, bo as SubscriptionItem, bp as SubscriptionStatus, bq as SubscriptionWithDetails, br as Tag, bs as TagsResponse, bt as TaxPathComponent, bu as TaxonomyAttributeTemplate, bv as TaxonomyWithChildren, bw as UICart, bx as UICartBusiness, by as UICartCustomer, bz as UICartLocation, bA as UICartPricing, bB as UpdateCartItemInput, bC as VariantAxis, bD as VariantAxisSelection, bE as VariantAxisValue, bF as VariantAxisValueView, bG as VariantAxisView, bH as VariantAxisWithValues, bI as VariantDetails, bJ as VariantDetailsDTO, bK as VariantDisplayAttribute, bL as VariantLocationAvailability, bM as VariantStrategy, bN as VariantView, bO as ZERO, bP as currencyCode, bQ as enrichError, bR as getErrorHint, bS as isCimplifyError, bT as isIdempotencyMismatchError, bU as isQuoteConflictRequiringConsent, bV as isQuoteError, bW as isRetryableError, bX as isSupportedCurrency, bY as money, bZ as moneyFromNumber } from './product-2MAoE0kZ.mjs';
4
+ export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, h as formatPriceRange, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, p as getPriceRange, q as getProductCurrency, r as getTaxAmount, s as getUnitPriceAtQuantity, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-9Bl-zBAI.mjs';
5
5
  export { A as AdConfig, a as AdContextValue, b as AdCreative, c as AdPosition, d as AdSlot, e as AdTheme, S as SignInOptions, g as getVariantDisplayName, s as startSignIn } from './sign-in-DQlIdqsi.mjs';
6
- export { A as AddressAuthorizationData, a as AuthorizationType, I as InitializePaymentResult, P as Payment, b as PaymentErrorDetails, c as PaymentMethod, d as PaymentMethodType, e as PaymentProcessingState, f as PaymentProvider, g as PaymentResponse, h as PaymentStatus, i as PaymentStatusResponse, S as SubmitAuthorizationInput } from './payment-T_0MUE9o.mjs';
7
- export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-Bg7hujK_.mjs';
6
+ export { A as AddressAuthorizationData, a as AuthorizationType, I as InitializePaymentResult, P as Payment, b as PaymentErrorDetails, c as PaymentMethod, d as PaymentMethodType, e as PaymentProcessingState, f as PaymentProvider, g as PaymentResponse, h as PaymentStatus, i as PaymentStatusResponse, S as SubmitAuthorizationInput } from './payment-D61iGd0o.mjs';
7
+ export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-Cthq6nPb.mjs';
8
8
  export { generateIdempotencyKey } from './advanced.mjs';
9
9
  import 'libphonenumber-js';
10
10
 
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export { A as AUTHORIZATION_TYPE, a as AUTH_MUTATION, b as AbortablePromise, c as ActivityRecommendation, d as ActivityRecommendationsResponse, e as ActivityService, f as ActivityStateResponse, g as AddressData, h as AddressInfo, i as AmountToPay, j as AuthResponse, k as AuthService, l as AuthStatus, m as AuthenticatedCustomer, n as AuthenticatedData, o as AutocompletePrediction, p as AutocompleteResponse, q as AvailabilityResult, r as AvailableSlot, B as Booking, s as BookingModificationType, t as BookingStatus, u as BookingWithDetails, v as BufferTimes, w as Business, x as BusinessDetailsDTO, y as BusinessHours, z as BusinessPreferences, C as BusinessService, D as BusinessSettings, E as BusinessType, F as BusinessWithLocations, G as CHECKOUT_MODE, H as CHECKOUT_MUTATION, I as CHECKOUT_STEP, J as CONTACT_TYPE, K as CacheOptions, L as CancelBookingInput, M as CancelBookingResult, N as CancelOrderInput, O as CancellationPolicy, P as CartOperations, Q as CatalogueQueries, R as CatalogueResult, S as CatalogueSnapshot, T as CategoryInfo, U as ChatAttachment, V as ChatConversation, W as ChatConversationResponse, X as ChatMessage, Y as ChatWidgetStarter, Z as CheckSlotAvailabilityInput, _ as CheckSlotAvailabilityResult, $ as CheckoutAddressInfo, a0 as CheckoutCartData, a1 as CheckoutCartItem, a2 as CheckoutCustomerInfo, a3 as CheckoutFormData, a4 as CheckoutInput, a5 as CheckoutMode, a9 as CheckoutOperations, a6 as CheckoutOrderType, a7 as CheckoutPaymentMethod, a8 as CheckoutResult, a9 as CheckoutService, aa as CheckoutStatus, ab as CheckoutStatusContext, ac as CheckoutStep, ad as CimplifyClient, ae as CimplifyConfig, af as CimplifyElement, ag as CimplifyElements, ah as ContactType, ai as ContentType, aj as CreateAddressInput, ak as CreateMobileMoneyInput, al as Customer, am as CustomerAddress, an as CustomerBooking, ao as CustomerBookingServiceItem, ap as CustomerLinkPreferences, aq as CustomerMobileMoney, ar as CustomerServicePreferences, as as DEFAULT_COUNTRY, at as DEFAULT_CURRENCY, au as DEVICE_TYPE, av as DayAvailability, aw as DeliveryFeeDetails, ax as DeliveryFeeResponse, ay as DeliveryOption, az as DeliveryOptionsResponse, aA as DeliveryService, aB as DepositResult, aC as DeviceType, aD as DismissMessageResponse, aE as ELEMENTS_AUTH_CONTACT_TYPES, aF as ELEMENTS_AUTH_MODES, aG as ELEMENTS_AUTH_PROMPTS, aH as ELEMENT_TYPES, aI as EVENT_TYPES, aJ as ElementAppearance, aK as ElementEventHandler, aL as ElementEventType, aM as ElementOptions, aN as ElementType, aO as ElementsAuthContactType, aP as ElementsAuthMode, aQ as ElementsAuthOptions, aR as ElementsAuthPrompt, aS as ElementsCheckoutData, aT as ElementsCheckoutResult, aU as ElementsCustomerInfo, aV as ElementsOptions, aW as EnrichedOrder, aX as EnrichedOrderItem, aY as EnrollAndLinkOrderInput, aZ as EnrollAndLinkOrderResult, a_ as EnrollmentData, a$ as Err, b0 as FeeBearerType, b1 as FetchQuoteInput, b2 as FulfillmentLink, b3 as FulfillmentStatus, b4 as FulfillmentSummaryDTO, b5 as FulfillmentType, b6 as FxQuote, b7 as FxQuoteRequest, b8 as FxRateResponse, b9 as FxService, ba as GetAvailableSlotsInput, bb as GetDeliveryOptionsParams, bc as GetOrdersOptions, bd as GetProductsOptions, be as GroupOrderInfo, bf as IframeToParentMessage, bg as InventoryService, bh as LINK_MUTATION, bi as LINK_QUERY, bj as LineItem, bk as LineType, bl as LinkData, bm as LinkEnrollResult, bn as LinkService, bo as LinkSession, bp as LinkStatusResult, bq as LiteBootstrap, br as LiteService, bs as Location, bt as LocationBooking, bu as LocationTaxBehavior, bv as LocationTaxOverrides, bw as LocationTimeProfile, bx as LocationWithDetails, by as MESSAGE_TYPES, bz as MOBILE_MONEY_PROVIDER, bA as MobileMoneyData, bB as MobileMoneyDetails, bC as MobileMoneyProvider, bD as NextAction, bE as ORDER_MUTATION, bF as ORDER_TYPE, bG as ObservabilityHooks, bH as Ok, bI as Order, bJ as OrderChannel, bK as OrderCustomerInfo, bL as OrderDiscountInfo, bM as OrderFilter, bN as OrderFulfillmentSummary, bO as OrderGroup, bP as OrderGroupDetails, bQ as OrderGroupPayment, bR as OrderGroupPaymentState, bS as OrderGroupPaymentStatus, bT as OrderGroupPaymentSummary, bU as OrderGroupStatus, bV as OrderHistory, bW as OrderLineState, bX as OrderLineStatus, bY as OrderLocationInfo, bZ as OrderPaymentEvent, b_ as OrderPricingView, b$ as OrderQueries, c0 as OrderSplitDetail, c1 as OrderStaffInfo, c2 as OrderStatus, c3 as OrderTimestampsDTO, c4 as OrderType, c5 as OtpResult, c6 as PAYMENT_METHOD, c7 as PAYMENT_MUTATION, c8 as PAYMENT_STATE, c9 as PICKUP_TIME_TYPE, ca as ParentToIframeMessage, cb as PaymentInfoDTO, cc as PaymentMethodInfo, cd as PaymentState, ce as PickupTime, cf as PickupTimeType, cg as PlaceDetailsResponse, ch as PlacesService, ci as PriceQuote, cj as PricingOverrides, ck as ProcessAndResolveOptions, cl as ProcessCheckoutOptions, cm as ProcessCheckoutResult, cn as ProviderResolutionSource, co as QuoteBundleSelectionInput, cp as QuoteCompositeSelectionInput, cq as QuoteDynamicBuckets, cr as QuoteStatus, cs as QuoteUiMessage, ct as ReadRequestOptions, cu as RefreshQuoteInput, cv as RefreshQuoteResult, cw as RefundOrderInput, cx as RelatedCandidate, cy as RelatedProduct, cz as RelatedProductsEnrichment, cA as RelationType, cB as ReminderMethod, cC as ReminderSettings, cD as ReorderResult, cE as RequestContext, cF as RequestErrorEvent, cG as RequestOptions, cH as RequestOtpInput, cI as RequestSource, cJ as RequestStartEvent, cK as RequestSuccessEvent, cL as RescheduleBookingInput, cM as RescheduleBookingResult, cN as RescheduleHistoryRecord, cO as ResourceAssignment, cP as Result, cQ as RetryEvent, cR as RevokeAllSessionsResult, cS as RevokeSessionResult, cT as Room, cU as SchedulingMetadata, cV as SchedulingResult, cW as SchedulingService, cX as SenderType, cY as Service, cZ as ServiceAvailabilityParams, c_ as ServiceAvailabilityResult, c$ as ServiceCharge, d0 as ServiceNotes, d1 as ServiceScheduleRequest, d2 as ServiceStatus, d3 as SessionActivityData, d4 as SessionChangeEvent, d5 as SessionMessage, d6 as SlotResourceInfo, d7 as SlotStaffInfo, d8 as Staff, d9 as StaffAssignment, da as StaffRole, db as StaffScheduleItem, dc as StockLevel, dd as StockStatus, de as StoreCreditBalance, df as StoreCreditQueries, dg as StorefrontBootstrap, dh as SubscriptionService, di as SupportService, dj as Table, dk as TableInfo, dl as TimeRange, dm as TimeRanges, dn as TimeSlot, dp as TrackCategoryViewOptions, dq as TrackProductViewOptions, dr as UpdateAddressInput, ds as UpdateOrderStatusInput, dt as UpdateProfileInput, du as UploadInitResponse, dv as UploadResult, dw as UploadService, dx as VerifyOtpInput, dy as combine, dz as combineObject, dA as createCimplifyClient, dB as createElements, dC as err, dD as flatMap, dE as fromPromise, dF as getOrElse, dG as isErr, dH as isOk, dI as mapError, dJ as mapResult, dK as ok, dL as toNullable, dM as tryCatch, dN as unwrap } from './client-xc2aQSB4.js';
2
- import { b9 as ProductWithDetails, j as ApiError } from './product-DXhjLQ_w.js';
3
- export { A as AddOn, a as AddOnDetails, b as AddOnGroupDetails, c as AddOnOption, d as AddOnOptionDetails, e as AddOnOptionPrice, f as AddOnWithOptions, g as AddToCartInput, h as AddressValue, i as AdjustmentType, k as AppliedDiscount, l as AttributeAppliesTo, m as AttributeType, n as AttributeValidationRules, o as AttributeVisibility, B as BenefitType, p as BillingFrequency, q as BillingMarkupType, r as BillingPlanType, s as Bundle, t as BundleComponentData, u as BundleComponentInfo, v as BundleComponentVariantView, w as BundleComponentView, x as BundlePriceType, y as BundleProduct, z as BundleSelectionData, C as BundleSelectionInput, D as BundleStoredSelection, E as BundleSummary, F as BundleWithDetails, G as Cart, H as CartAddOn, I as CartChannel, J as CartItem, K as CartItemDetails, L as CartMutationResult, M as CartNotice, N as CartStatus, O as CartSummary, P as CartTotals, Q as Category, R as CategorySummary, S as ChosenPrice, T as CimplifyError, U as Collection, V as CollectionProduct, W as CollectionSummary, X as ComponentGroup, Y as ComponentGroupWithComponents, Z as ComponentPriceBreakdown, _ as ComponentSchedulingData, $ as ComponentSelectionInput, a0 as ComponentSourceType, a1 as Composite, a2 as CompositeComponent, a3 as CompositeComponentView, a4 as CompositeGroupView, a5 as CompositePriceBreakdown, a6 as CompositePriceResult, a7 as CompositePricingMode, a8 as CompositeSelectionData, $ as CompositeSelectionInput, a9 as CompositeStoredSelection, aa as CompositeWithDetails, ab as CurrencyCode, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ae as CustomerInputValue, af as DURATION_UNIT, ag as DateRangeValue, ah as Deal, ai as DealBenefitType, aj as DepositType, ak as DigitalProductType, al as DiscountBreakdown, am as DiscountDetails, an as DiscountValidation, ao as DisplayAddOn, ap as DisplayAddOnOption, aq as DisplayCart, ar as DisplayCartItem, as as DisplayMode, at as DurationUnit, au as ERROR_HINTS, av as EligiblePlansQuery, aw as ErrorCode, ax as ErrorCodeType, ay as ErrorHint, az as FacetValue, aA as FormattedPlanOption, aB as GroupPricingBehavior, aC as INPUT_FIELD_TYPE, aD as IdempotencyMismatchError, aE as InputFieldType, aF as InputFieldValidation, aG as InventoryType, aH as KnowledgeArticle, aI as LineConfiguration, aJ as LocationProductPrice, aK as LocationValue, aL as MeasurementValue, aM as Money, aN as PRODUCT_TYPE, aO as Pagination, aP as PaginationParams, aQ as PhoneValue, aR as Price, aS as PriceAdjustment, aT as PriceDecisionPath, aU as PriceEntryType, aV as PricePathTaxInfo, aW as PriceSource, aX as Product, aY as ProductAddOn, aZ as ProductAvailability, a_ as ProductAvailabilityNow, a$ as ProductBillingPlan, b0 as ProductDealInfo, b1 as ProductInputField, b2 as ProductProperty, b3 as ProductRenderHint, b4 as ProductTaxonomy, b5 as ProductTimeProfile, b6 as ProductType, b7 as ProductVariant, b8 as ProductVariantValue, ba as PropertyFacet, bb as PropertySource, bc as QuantityPricingTier, bd as RENDER_HINT, be as RelatedProductView, bf as SalesChannel, bg as SchedulingMode, bh as SelectedAddOnOption, bi as SemanticKind, bj as SignatureValue, bk as Subscription, bl as SubscriptionInvoice, bm as SubscriptionItem, bn as SubscriptionStatus, bo as SubscriptionWithDetails, bp as Tag, bq as TagsResponse, br as TaxPathComponent, bs as TaxonomyAttributeTemplate, bt as TaxonomyWithChildren, bu as UICart, bv as UICartBusiness, bw as UICartCustomer, bx as UICartLocation, by as UICartPricing, bz as UpdateCartItemInput, bA as VariantAxis, bB as VariantAxisSelection, bC as VariantAxisValue, bD as VariantAxisValueView, bE as VariantAxisView, bF as VariantAxisWithValues, bG as VariantDetails, bH as VariantDetailsDTO, bI as VariantDisplayAttribute, bJ as VariantLocationAvailability, bK as VariantStrategy, bL as VariantView, bM as ZERO, bN as currencyCode, bO as enrichError, bP as getErrorHint, bQ as isCimplifyError, bR as isIdempotencyMismatchError, bS as isQuoteConflictRequiringConsent, bT as isQuoteError, bU as isRetryableError, bV as isSupportedCurrency, bW as money, bX as moneyFromNumber } from './product-DXhjLQ_w.js';
4
- export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, h as formatPriceRange, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, p as getPriceRange, q as getProductCurrency, r as getTaxAmount, s as getUnitPriceAtQuantity, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-C4xE31-D.js';
1
+ export { A as AUTHORIZATION_TYPE, a as AUTH_MUTATION, b as AbortablePromise, c as ActivityRecommendation, d as ActivityRecommendationsResponse, e as ActivityService, f as ActivityStateResponse, g as AddressData, h as AddressInfo, i as AmountToPay, j as AuthResponse, k as AuthService, l as AuthStatus, m as AuthenticatedCustomer, n as AuthenticatedData, o as AutocompletePrediction, p as AutocompleteResponse, q as AvailabilityResult, r as AvailableSlot, B as Booking, s as BookingModificationType, t as BookingStatus, u as BookingWithDetails, v as BufferTimes, w as Business, x as BusinessDetailsDTO, y as BusinessHours, z as BusinessPreferences, C as BusinessService, D as BusinessSettings, E as BusinessType, F as BusinessWithLocations, G as CHECKOUT_MODE, H as CHECKOUT_MUTATION, I as CHECKOUT_STEP, J as CONTACT_TYPE, K as CacheOptions, L as CancelBookingInput, M as CancelBookingResult, N as CancelOrderInput, O as CancellationPolicy, P as CartOperations, Q as CatalogueQueries, R as CatalogueResult, S as CatalogueSnapshot, T as CategoryInfo, U as ChatAttachment, V as ChatConversation, W as ChatConversationResponse, X as ChatMessage, Y as ChatWidgetStarter, Z as CheckSlotAvailabilityInput, _ as CheckSlotAvailabilityResult, $ as CheckoutAddressInfo, a0 as CheckoutCartData, a1 as CheckoutCartItem, a2 as CheckoutCustomerInfo, a3 as CheckoutFormData, a4 as CheckoutInput, a5 as CheckoutMode, a9 as CheckoutOperations, a6 as CheckoutOrderType, a7 as CheckoutPaymentMethod, a8 as CheckoutResult, a9 as CheckoutService, aa as CheckoutStatus, ab as CheckoutStatusContext, ac as CheckoutStep, ad as CimplifyClient, ae as CimplifyConfig, af as CimplifyElement, ag as CimplifyElements, ah as ContactType, ai as ContentType, aj as CreateAddressInput, ak as CreateMobileMoneyInput, al as Customer, am as CustomerAddress, an as CustomerBooking, ao as CustomerBookingServiceItem, ap as CustomerLinkPreferences, aq as CustomerMobileMoney, ar as CustomerServicePreferences, as as DEFAULT_COUNTRY, at as DEFAULT_CURRENCY, au as DEVICE_TYPE, av as DayAvailability, aw as DeliveryFeeDetails, ax as DeliveryFeeResponse, ay as DeliveryOption, az as DeliveryOptionsResponse, aA as DeliveryService, aB as DepositResult, aC as DeviceType, aD as DismissMessageResponse, aE as ELEMENTS_AUTH_CONTACT_TYPES, aF as ELEMENTS_AUTH_MODES, aG as ELEMENTS_AUTH_PROMPTS, aH as ELEMENT_TYPES, aI as EVENT_TYPES, aJ as ElementAppearance, aK as ElementEventHandler, aL as ElementEventType, aM as ElementOptions, aN as ElementType, aO as ElementsAuthContactType, aP as ElementsAuthMode, aQ as ElementsAuthOptions, aR as ElementsAuthPrompt, aS as ElementsCheckoutData, aT as ElementsCheckoutResult, aU as ElementsCustomerInfo, aV as ElementsOptions, aW as EnrichedOrder, aX as EnrichedOrderItem, aY as EnrollAndLinkOrderInput, aZ as EnrollAndLinkOrderResult, a_ as EnrollmentData, a$ as Err, b0 as FeeBearerType, b1 as FetchQuoteInput, b2 as FulfillmentLink, b3 as FulfillmentStatus, b4 as FulfillmentSummaryDTO, b5 as FulfillmentType, b6 as FxQuote, b7 as FxQuoteRequest, b8 as FxRateResponse, b9 as FxService, ba as GetAvailableSlotsInput, bb as GetDeliveryOptionsParams, bc as GetOrdersOptions, bd as GetProductsOptions, be as GroupOrderInfo, bf as IframeToParentMessage, bg as InventoryService, bh as LINK_MUTATION, bi as LINK_QUERY, bj as LineItem, bk as LineType, bl as LinkData, bm as LinkEnrollResult, bn as LinkService, bo as LinkSession, bp as LinkStatusResult, bq as LiteBootstrap, br as LiteService, bs as Location, bt as LocationBooking, bu as LocationTaxBehavior, bv as LocationTaxOverrides, bw as LocationTimeProfile, bx as LocationWithDetails, by as MESSAGE_TYPES, bz as MOBILE_MONEY_PROVIDER, bA as MobileMoneyData, bB as MobileMoneyDetails, bC as MobileMoneyProvider, bD as NextAction, bE as ORDER_MUTATION, bF as ORDER_TYPE, bG as ObservabilityHooks, bH as Ok, bI as Order, bJ as OrderChannel, bK as OrderCustomerInfo, bL as OrderDiscountInfo, bM as OrderFilter, bN as OrderFulfillmentSummary, bO as OrderGroup, bP as OrderGroupDetails, bQ as OrderGroupPayment, bR as OrderGroupPaymentState, bS as OrderGroupPaymentStatus, bT as OrderGroupPaymentSummary, bU as OrderGroupStatus, bV as OrderHistory, bW as OrderLineState, bX as OrderLineStatus, bY as OrderLocationInfo, bZ as OrderPaymentEvent, b_ as OrderPricingView, b$ as OrderQueries, c0 as OrderSplitDetail, c1 as OrderStaffInfo, c2 as OrderStatus, c3 as OrderTimestampsDTO, c4 as OrderType, c5 as OtpResult, c6 as PAYMENT_METHOD, c7 as PAYMENT_MUTATION, c8 as PAYMENT_STATE, c9 as PICKUP_TIME_TYPE, ca as ParentToIframeMessage, cb as PaymentInfoDTO, cc as PaymentMethodInfo, cd as PaymentState, ce as PickupTime, cf as PickupTimeType, cg as PlaceDetailsResponse, ch as PlacesService, ci as PriceQuote, cj as PricingOverrides, ck as ProcessAndResolveOptions, cl as ProcessCheckoutOptions, cm as ProcessCheckoutResult, cn as ProviderResolutionSource, co as QuoteBundleSelectionInput, cp as QuoteCompositeSelectionInput, cq as QuoteDynamicBuckets, cr as QuoteStatus, cs as QuoteUiMessage, ct as ReadRequestOptions, cu as RefreshQuoteInput, cv as RefreshQuoteResult, cw as RefundOrderInput, cx as RelatedCandidate, cy as RelatedProduct, cz as RelatedProductsEnrichment, cA as RelationType, cB as ReminderMethod, cC as ReminderSettings, cD as ReorderResult, cE as RequestContext, cF as RequestErrorEvent, cG as RequestOptions, cH as RequestOtpInput, cI as RequestSource, cJ as RequestStartEvent, cK as RequestSuccessEvent, cL as RescheduleBookingInput, cM as RescheduleBookingResult, cN as RescheduleHistoryRecord, cO as ResourceAssignment, cP as Result, cQ as RetryEvent, cR as RevokeAllSessionsResult, cS as RevokeSessionResult, cT as Room, cU as SchedulingMetadata, cV as SchedulingResult, cW as SchedulingService, cX as SenderType, cY as Service, cZ as ServiceAvailabilityParams, c_ as ServiceAvailabilityResult, c$ as ServiceCharge, d0 as ServiceNotes, d1 as ServiceScheduleRequest, d2 as ServiceStatus, d3 as SessionActivityData, d4 as SessionChangeEvent, d5 as SessionMessage, d6 as SlotResourceInfo, d7 as SlotStaffInfo, d8 as Staff, d9 as StaffAssignment, da as StaffRole, db as StaffScheduleItem, dc as StockLevel, dd as StockStatus, de as StoreCreditBalance, df as StoreCreditQueries, dg as StorefrontBootstrap, dh as SubscriptionService, di as SupportService, dj as Table, dk as TableInfo, dl as TimeRange, dm as TimeRanges, dn as TimeSlot, dp as TrackCategoryViewOptions, dq as TrackProductViewOptions, dr as UpdateAddressInput, ds as UpdateOrderStatusInput, dt as UpdateProfileInput, du as UploadInitResponse, dv as UploadResult, dw as UploadService, dx as VerifyOtpInput, dy as combine, dz as combineObject, dA as createCimplifyClient, dB as createElements, dC as err, dD as flatMap, dE as fromPromise, dF as getOrElse, dG as isErr, dH as isOk, dI as mapError, dJ as mapResult, dK as ok, dL as toNullable, dM as tryCatch, dN as unwrap } from './client-CINi3Dw3.js';
2
+ import { b9 as ProductWithDetails, j as ApiError } from './product-2MAoE0kZ.js';
3
+ export { A as AddOn, a as AddOnDetails, b as AddOnGroupDetails, c as AddOnOption, d as AddOnOptionDetails, e as AddOnOptionPrice, f as AddOnWithOptions, g as AddToCartInput, h as AddressValue, i as AdjustmentType, k as AppliedDiscount, l as AttributeAppliesTo, m as AttributeType, n as AttributeValidationRules, o as AttributeVisibility, B as BenefitType, p as BillingFrequency, q as BillingMarkupType, r as BillingPlanType, s as Bundle, t as BundleComponentData, u as BundleComponentInfo, v as BundleComponentVariantView, w as BundleComponentView, x as BundlePriceType, y as BundleProduct, z as BundleSelectionData, C as BundleSelectionInput, D as BundleStoredSelection, E as BundleSummary, F as BundleWithDetails, G as Cart, H as CartAddOn, I as CartChannel, J as CartItem, K as CartItemDetails, L as CartMutationResult, M as CartNotice, N as CartStatus, O as CartSummary, P as CartTotals, Q as Category, R as CategorySummary, S as ChosenPrice, T as CimplifyError, U as Collection, V as CollectionProduct, W as CollectionSummary, X as ComponentGroup, Y as ComponentGroupWithComponents, Z as ComponentPriceBreakdown, _ as ComponentSchedulingData, $ as ComponentSelectionInput, a0 as ComponentSourceType, a1 as Composite, a2 as CompositeComponent, a3 as CompositeComponentView, a4 as CompositeGroupView, a5 as CompositePriceBreakdown, a6 as CompositePriceResult, a7 as CompositePricingMode, a8 as CompositeSelectionData, $ as CompositeSelectionInput, a9 as CompositeStoredSelection, aa as CompositeWithDetails, ab as CurrencyCode, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ae as CustomerInputValue, af as DURATION_UNIT, ag as DateRangeValue, ah as Deal, ai as DealBenefitType, aj as DepositType, ak as DigitalProductType, al as DiscountBreakdown, am as DiscountDetails, an as DiscountValidation, ao as DisplayAddOn, ap as DisplayAddOnOption, aq as DisplayCart, ar as DisplayCartItem, as as DisplayMode, at as DurationUnit, au as ERROR_HINTS, av as EligiblePlansQuery, aw as ErrorCode, ax as ErrorCodeType, ay as ErrorHint, az as FacetValue, aA as FormattedPlanOption, aB as GroupPricingBehavior, aC as INPUT_FIELD_TYPE, aD as IdempotencyMismatchError, aE as InputFieldType, aF as InputFieldValidation, aG as InventoryType, aH as KnowledgeArticle, aI as LineConfiguration, aJ as LocationProductPrice, aK as LocationValue, aL as MeasurementValue, aM as Money, aN as PRODUCT_TYPE, aO as Pagination, aP as PaginationParams, aQ as PhoneValue, aR as Price, aS as PriceAdjustment, aT as PriceDecisionPath, aU as PriceEntryType, aV as PricePathTaxInfo, aW as PriceSource, aX as Product, aY as ProductAddOn, aZ as ProductAvailability, a_ as ProductAvailabilityNow, a$ as ProductBillingPlan, b0 as ProductDealInfo, b1 as ProductInputField, b2 as ProductProperty, b3 as ProductRenderHint, b4 as ProductTaxonomy, b5 as ProductTimeProfile, b6 as ProductType, b7 as ProductVariant, b8 as ProductVariantValue, ba as PropertyFacet, bb as PropertySource, bc as QuantityPricingTier, bd as RENDER_HINT, be as RelatedProductView, bf as SaleCapInfo, bg as SaleInfo, bh as SalesChannel, bi as SchedulingMode, bj as SelectedAddOnOption, bk as SemanticKind, bl as SignatureValue, bm as Subscription, bn as SubscriptionInvoice, bo as SubscriptionItem, bp as SubscriptionStatus, bq as SubscriptionWithDetails, br as Tag, bs as TagsResponse, bt as TaxPathComponent, bu as TaxonomyAttributeTemplate, bv as TaxonomyWithChildren, bw as UICart, bx as UICartBusiness, by as UICartCustomer, bz as UICartLocation, bA as UICartPricing, bB as UpdateCartItemInput, bC as VariantAxis, bD as VariantAxisSelection, bE as VariantAxisValue, bF as VariantAxisValueView, bG as VariantAxisView, bH as VariantAxisWithValues, bI as VariantDetails, bJ as VariantDetailsDTO, bK as VariantDisplayAttribute, bL as VariantLocationAvailability, bM as VariantStrategy, bN as VariantView, bO as ZERO, bP as currencyCode, bQ as enrichError, bR as getErrorHint, bS as isCimplifyError, bT as isIdempotencyMismatchError, bU as isQuoteConflictRequiringConsent, bV as isQuoteError, bW as isRetryableError, bX as isSupportedCurrency, bY as money, bZ as moneyFromNumber } from './product-2MAoE0kZ.js';
4
+ export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, h as formatPriceRange, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, p as getPriceRange, q as getProductCurrency, r as getTaxAmount, s as getUnitPriceAtQuantity, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-DCPxHjbj.js';
5
5
  export { A as AdConfig, a as AdContextValue, b as AdCreative, c as AdPosition, d as AdSlot, e as AdTheme, S as SignInOptions, g as getVariantDisplayName, s as startSignIn } from './sign-in-DQlIdqsi.js';
6
- export { A as AddressAuthorizationData, a as AuthorizationType, I as InitializePaymentResult, P as Payment, b as PaymentErrorDetails, c as PaymentMethod, d as PaymentMethodType, e as PaymentProcessingState, f as PaymentProvider, g as PaymentResponse, h as PaymentStatus, i as PaymentStatusResponse, S as SubmitAuthorizationInput } from './payment-nH9OCUg2.js';
7
- export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-B8WMoldA.js';
6
+ export { A as AddressAuthorizationData, a as AuthorizationType, I as InitializePaymentResult, P as Payment, b as PaymentErrorDetails, c as PaymentMethod, d as PaymentMethodType, e as PaymentProcessingState, f as PaymentProvider, g as PaymentResponse, h as PaymentStatus, i as PaymentStatusResponse, S as SubmitAuthorizationInput } from './payment-BVv9leS_.js';
7
+ export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-BYWCHYO5.js';
8
8
  export { generateIdempotencyKey } from './advanced.js';
9
9
  import 'libphonenumber-js';
10
10
 
package/dist/mock/cli.mjs CHANGED
@@ -1,9 +1,11 @@
1
1
  #!/usr/bin/env node
2
+ import { writeFileSync, existsSync, readFileSync } from 'fs';
3
+ import { basename, isAbsolute, resolve } from 'path';
4
+ import { pathToFileURL } from 'url';
2
5
  import { createServer } from 'http';
3
6
  import { Http2ServerRequest, constants } from 'http2';
4
7
  import { Readable } from 'stream';
5
8
  import crypto, { createHmac } from 'crypto';
6
- import { existsSync, readFileSync, writeFileSync } from 'fs';
7
9
 
8
10
  var RequestError = class extends Error {
9
11
  constructor(message, options) {
@@ -490,7 +492,7 @@ var responseViaResponseObject = async (res, outgoing, options = {}) => {
490
492
  });
491
493
  if (!chunk) {
492
494
  if (i === 1) {
493
- await new Promise((resolve) => setTimeout(resolve));
495
+ await new Promise((resolve2) => setTimeout(resolve2));
494
496
  maxReadCount = 3;
495
497
  continue;
496
498
  }
@@ -6533,6 +6535,14 @@ function createLinkService({ clock, ids }) {
6533
6535
  };
6534
6536
  }
6535
6537
 
6538
+ // src/mock/state/snapshot.ts
6539
+ function applySnapshot(reg, data) {
6540
+ for (const [k, v] of Object.entries(data)) {
6541
+ const store = reg[k];
6542
+ if (store) store.loadJSON(v);
6543
+ }
6544
+ }
6545
+
6536
6546
  // src/mock/seeds/image.ts
6537
6547
  var CDN_BASE_URL = "https://static-tmp.cimplify.io";
6538
6548
  function seedImage(industry, slug) {
@@ -10900,15 +10910,214 @@ function applySeed(registry, name) {
10900
10910
  return fn(registry);
10901
10911
  }
10902
10912
 
10913
+ // src/mock/seeds/context.ts
10914
+ var SEED_ISO = "2026-01-01T00:00:00.000Z";
10915
+ var ID_PREFIX = {
10916
+ business: "bus_",
10917
+ category: "cat_",
10918
+ collection: "col_",
10919
+ product: "prod_",
10920
+ service: "svc_"
10921
+ };
10922
+ var DEFAULT_CURRENCY = "GHS";
10923
+ function slugify(value) {
10924
+ return value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
10925
+ }
10926
+ function makeSeedContext(registry) {
10927
+ let current;
10928
+ const requireBusiness = () => {
10929
+ if (current) return current;
10930
+ const sole = registry.businesses.list();
10931
+ if (sole.length === 1) {
10932
+ current = sole[0];
10933
+ return current;
10934
+ }
10935
+ throw new Error("Seed must create a business (ctx.business) before adding child records.");
10936
+ };
10937
+ const resolveCategoryId = (cat) => {
10938
+ if (!cat) return void 0;
10939
+ if (typeof cat !== "string") return cat.id;
10940
+ if (registry.categories.get(cat)) return cat;
10941
+ return registry.categories.list().find((c) => c.slug === cat)?.id;
10942
+ };
10943
+ const resolveCollectionId = (col) => {
10944
+ if (!col) return void 0;
10945
+ if (typeof col !== "string") return col.id;
10946
+ if (registry.collections.get(col)) return col;
10947
+ return registry.collections.list().find((c) => c.slug === col)?.id;
10948
+ };
10949
+ return {
10950
+ registry,
10951
+ business(input) {
10952
+ const handle = input.handle ?? slugify(input.name);
10953
+ const id = `${ID_PREFIX.business}${slugify(handle)}`;
10954
+ const business = {
10955
+ business_type: "other",
10956
+ email: `hello@${handle}.test`,
10957
+ default_currency: DEFAULT_CURRENCY,
10958
+ default_offers_table_service: false,
10959
+ default_accepts_online_orders: true,
10960
+ status: "active",
10961
+ created_by: "seed",
10962
+ preferences: {},
10963
+ is_online_only: true,
10964
+ enabled_payment_types: ["mobile_money"],
10965
+ default_location_settings: {},
10966
+ country_code: "GH",
10967
+ timezone: "Africa/Accra",
10968
+ ...input,
10969
+ id,
10970
+ handle,
10971
+ created_at: input.created_at ?? SEED_ISO,
10972
+ updated_at: input.updated_at ?? SEED_ISO
10973
+ };
10974
+ registry.businesses.put(id, business);
10975
+ current = business;
10976
+ return business;
10977
+ },
10978
+ category(input) {
10979
+ const business = requireBusiness();
10980
+ const slug = input.slug ?? slugify(input.name);
10981
+ const id = `${ID_PREFIX.category}${slug}`;
10982
+ const category = {
10983
+ id,
10984
+ business_id: business.id,
10985
+ name: input.name,
10986
+ slug,
10987
+ description: input.description,
10988
+ image: input.image,
10989
+ product_ids: [],
10990
+ display_order: input.displayOrder ?? 0,
10991
+ is_active: true,
10992
+ created_at: SEED_ISO,
10993
+ updated_at: SEED_ISO
10994
+ };
10995
+ registry.categories.put(id, category);
10996
+ return category;
10997
+ },
10998
+ collection(input) {
10999
+ const business = requireBusiness();
11000
+ const slug = input.slug ?? slugify(input.name);
11001
+ const id = `${ID_PREFIX.collection}${slug}`;
11002
+ const collection = {
11003
+ id,
11004
+ business_id: business.id,
11005
+ name: input.name,
11006
+ slug,
11007
+ description: input.description,
11008
+ product_ids: [],
11009
+ is_active: true,
11010
+ created_at: SEED_ISO,
11011
+ updated_at: SEED_ISO
11012
+ };
11013
+ registry.collections.put(id, collection);
11014
+ return collection;
11015
+ },
11016
+ product(input) {
11017
+ const business = requireBusiness();
11018
+ const slug = input.slug ?? slugify(input.name);
11019
+ const id = `${ID_PREFIX.product}${slug}`;
11020
+ const categoryId = resolveCategoryId(input.category);
11021
+ const collectionId = resolveCollectionId(input.collection);
11022
+ const product = {
11023
+ id,
11024
+ business_id: business.id,
11025
+ name: input.name,
11026
+ slug,
11027
+ description: input.description,
11028
+ product_type: input.productType ?? "product",
11029
+ base_price: input.price,
11030
+ currency: input.currency ?? business.default_currency,
11031
+ image: input.image,
11032
+ images: input.images ?? (input.image ? [input.image] : []),
11033
+ is_available: true,
11034
+ category_ids: categoryId ? [categoryId] : [],
11035
+ collection_ids: collectionId ? [collectionId] : [],
11036
+ add_on_ids: [],
11037
+ variant_ids: [],
11038
+ tags: input.tags ?? [],
11039
+ calories: input.calories,
11040
+ allergies: input.allergies ?? [],
11041
+ ingredients: input.ingredients ?? [],
11042
+ pairings: [],
11043
+ is_signature: input.isSignature ?? false,
11044
+ is_new: input.isNew ?? false,
11045
+ duration_minutes: input.durationMinutes,
11046
+ metadata: input.metadata,
11047
+ created_at: SEED_ISO,
11048
+ updated_at: SEED_ISO
11049
+ };
11050
+ registry.products.put(id, product);
11051
+ if (categoryId) {
11052
+ const cat = registry.categories.get(categoryId);
11053
+ if (cat && !cat.product_ids.includes(id)) cat.product_ids.push(id);
11054
+ }
11055
+ if (collectionId) {
11056
+ const col = registry.collections.get(collectionId);
11057
+ if (col && !col.product_ids.includes(id)) col.product_ids.push(id);
11058
+ }
11059
+ return product;
11060
+ },
11061
+ service(input) {
11062
+ const business = requireBusiness();
11063
+ const id = `${ID_PREFIX.service}${slugify(input.name)}`;
11064
+ const service = {
11065
+ id,
11066
+ business_id: business.id,
11067
+ name: input.name,
11068
+ description: input.description,
11069
+ duration_minutes: input.durationMinutes,
11070
+ price: input.price,
11071
+ is_available: true
11072
+ };
11073
+ registry.services.put(id, service);
11074
+ return service;
11075
+ },
11076
+ image: seedImage,
11077
+ extend(name) {
11078
+ const result = applySeed(registry, name);
11079
+ current = registry.businesses.get(result.businessId) ?? current;
11080
+ return result;
11081
+ }
11082
+ };
11083
+ }
11084
+
11085
+ // src/mock/seeds/source.ts
11086
+ var SNAPSHOT_META_KEY = "__meta";
11087
+ function loadSnapshot(registry, data, businessId) {
11088
+ applySnapshot(registry, data);
11089
+ if (businessId) return { businessId };
11090
+ const meta = data[SNAPSHOT_META_KEY];
11091
+ if (meta?.defaultBusinessId) return { businessId: meta.defaultBusinessId };
11092
+ const businesses = registry.businesses.list();
11093
+ if (businesses.length === 1) return { businessId: businesses[0].id };
11094
+ if (businesses.length === 0) {
11095
+ throw new Error("Seed snapshot has no business. Add one, or set __meta.defaultBusinessId.");
11096
+ }
11097
+ throw new Error(
11098
+ `Seed snapshot has ${businesses.length} businesses; set __meta.defaultBusinessId to pick one.`
11099
+ );
11100
+ }
11101
+ function resolveSeed(registry, source) {
11102
+ if (typeof source === "string") return applySeed(registry, source);
11103
+ switch (source.kind) {
11104
+ case "builtin":
11105
+ return applySeed(registry, source.name);
11106
+ case "json":
11107
+ return loadSnapshot(registry, source.data, source.businessId);
11108
+ case "fn":
11109
+ return source.seed(makeSeedContext(registry));
11110
+ }
11111
+ }
11112
+
10903
11113
  // src/mock/deps.ts
10904
11114
  function createDeps(options = {}) {
10905
11115
  const clock = createClock({ frozenAt: options.frozenAt });
10906
11116
  const ids = createIdGen(options.rngSeed);
10907
11117
  const bus = createBus({ idGen: () => ids.raw("evt"), clock: () => clock.now() });
10908
11118
  const registry = createStateRegistry();
10909
- const seedName = options.seed ?? "default";
10910
- const seedResult = applySeed(registry, seedName);
10911
- let defaultBusinessId = seedResult.businessId;
11119
+ const seedSource = options.seed ?? "default";
11120
+ let defaultBusinessId = resolveSeed(registry, seedSource).businessId;
10912
11121
  const auth = createAuthService({
10913
11122
  registry,
10914
11123
  clock,
@@ -10962,11 +11171,10 @@ function createDeps(options = {}) {
10962
11171
  return defaultBusinessId;
10963
11172
  },
10964
11173
  chaos,
10965
- resetAll(newSeed) {
11174
+ resetAll(next) {
10966
11175
  for (const store of Object.values(registry)) store.reset();
10967
11176
  bus.clear();
10968
- const r = applySeed(registry, newSeed ?? seedName);
10969
- defaultBusinessId = r.businessId;
11177
+ defaultBusinessId = resolveSeed(registry, next ?? seedSource).businessId;
10970
11178
  return defaultBusinessId;
10971
11179
  }
10972
11180
  };
@@ -11042,11 +11250,7 @@ function createMockApp(options = {}) {
11042
11250
  function loadFromFile(reg, path) {
11043
11251
  if (!existsSync(path)) return false;
11044
11252
  try {
11045
- const data = JSON.parse(readFileSync(path, "utf8"));
11046
- for (const [k, v] of Object.entries(data)) {
11047
- const store = reg[k];
11048
- if (store) store.loadJSON(v);
11049
- }
11253
+ applySnapshot(reg, JSON.parse(readFileSync(path, "utf8")));
11050
11254
  return true;
11051
11255
  } catch {
11052
11256
  return false;
@@ -11109,11 +11313,18 @@ function setupWebhooks(bus, opts) {
11109
11313
  }
11110
11314
 
11111
11315
  // src/mock/cli.ts
11316
+ var CONVENTION_FILES = [
11317
+ "cimplify.seed.json",
11318
+ "cimplify.seed.mjs",
11319
+ "cimplify.seed.js",
11320
+ "cimplify.seed.ts"
11321
+ ];
11112
11322
  function parseArgs(argv) {
11113
11323
  const opts = {
11114
11324
  port: Number(process.env.CIMPLIFY_MOCK_PORT) || 8787,
11115
11325
  host: process.env.CIMPLIFY_MOCK_HOST ?? "127.0.0.1",
11116
11326
  seed: "default",
11327
+ seedExplicit: false,
11117
11328
  authMode: "permissive",
11118
11329
  defaultOtp: "123456",
11119
11330
  cors: "*",
@@ -11132,6 +11343,16 @@ function parseArgs(argv) {
11132
11343
  break;
11133
11344
  case "--seed":
11134
11345
  opts.seed = next();
11346
+ opts.seedExplicit = true;
11347
+ break;
11348
+ case "--seed-file":
11349
+ opts.seedFile = next();
11350
+ break;
11351
+ case "--seed-module":
11352
+ opts.seedModule = next();
11353
+ break;
11354
+ case "--dump":
11355
+ opts.dump = next();
11135
11356
  break;
11136
11357
  case "--auth-mode":
11137
11358
  opts.authMode = next();
@@ -11185,14 +11406,24 @@ function printHelp() {
11185
11406
  Usage:
11186
11407
  cimplify-mock [flags]
11187
11408
 
11188
- Flags:
11409
+ Seed (choose one; flags win over a cimplify.seed.* file in the cwd):
11410
+ --seed <name> Built-in seed: default | empty | restaurant | retail |
11411
+ services | grocery | fashion | pharmacy | auto |
11412
+ reesa-storefront
11413
+ --seed-file <file.json> Boot from a JSON snapshot (dump one with --dump, edit, reload)
11414
+ --seed-module <file> Boot from a module default-exporting a seed function
11415
+ (.mjs/.js anywhere; .ts needs bun)
11416
+ --dump <file.json> Seed, write the state snapshot to <file>, and exit
11417
+ (convention) With no seed flag, a cimplify.seed.{json,mjs,js,ts} in
11418
+ the cwd is loaded automatically
11419
+
11420
+ Server:
11189
11421
  --port, -p <num> Port to listen on (default 8787)
11190
11422
  --host <host> Host to bind (default 127.0.0.1)
11191
- --seed <name> default | restaurant | retail | services | grocery | fashion | reesa-storefront | empty
11192
11423
  --auth-mode <mode> permissive (auto-mint sessions) | strict
11193
11424
  --otp <code> Default OTP code (default 123456)
11194
11425
  --seed-rng <n> Deterministic RNG seed
11195
- --persist <file> Persist state to JSON file
11426
+ --persist <file> Persist live state to a JSON file (restore on restart)
11196
11427
  --cors <origins> CORS origins (comma-separated, or '*')
11197
11428
  --webhook-url <url> Send mock events to this URL
11198
11429
  --webhook-secret <key> HMAC secret for webhook signatures
@@ -11202,16 +11433,75 @@ Flags:
11202
11433
  --help, -h
11203
11434
  `);
11204
11435
  }
11436
+ function resolvePath(file) {
11437
+ return isAbsolute(file) ? file : resolve(process.cwd(), file);
11438
+ }
11439
+ function readSnapshot(file) {
11440
+ const abs = resolvePath(file);
11441
+ if (!existsSync(abs)) throw new Error(`Seed file not found: ${file}`);
11442
+ return JSON.parse(readFileSync(abs, "utf8"));
11443
+ }
11444
+ async function loadSeedModule(file) {
11445
+ const abs = resolvePath(file);
11446
+ if (!existsSync(abs)) throw new Error(`Seed module not found: ${file}`);
11447
+ let mod;
11448
+ try {
11449
+ mod = await import(pathToFileURL(abs).href);
11450
+ } catch (err) {
11451
+ if (abs.endsWith(".ts") && /Unknown file extension|UNKNOWN_FILE_EXTENSION/i.test(String(err))) {
11452
+ throw new Error(
11453
+ `TypeScript seed modules need a TS-capable runtime. Run via bun (\`bunx @cimplify/sdk mock --seed-module ${file}\`), or use a .mjs/.js/.json seed.`
11454
+ );
11455
+ }
11456
+ throw err;
11457
+ }
11458
+ const seed = mod.default ?? mod.seed;
11459
+ if (typeof seed !== "function") {
11460
+ throw new Error(`Seed module ${file} must default-export a seed function (see defineSeed).`);
11461
+ }
11462
+ return seed;
11463
+ }
11464
+ function discoverConventionSeed() {
11465
+ for (const name of CONVENTION_FILES) {
11466
+ const abs = resolve(process.cwd(), name);
11467
+ if (existsSync(abs)) return abs;
11468
+ }
11469
+ return null;
11470
+ }
11471
+ async function resolveSeedSource(opts) {
11472
+ if (opts.seedFile) {
11473
+ return { source: { kind: "json", data: readSnapshot(opts.seedFile) }, label: `file: ${opts.seedFile}` };
11474
+ }
11475
+ if (opts.seedModule) {
11476
+ return { source: { kind: "fn", seed: await loadSeedModule(opts.seedModule) }, label: `module: ${opts.seedModule}` };
11477
+ }
11478
+ if (!opts.seedExplicit) {
11479
+ const found = discoverConventionSeed();
11480
+ if (found) {
11481
+ const label = `convention: ${basename(found)}`;
11482
+ if (found.endsWith(".json")) return { source: { kind: "json", data: readSnapshot(found) }, label };
11483
+ return { source: { kind: "fn", seed: await loadSeedModule(found) }, label };
11484
+ }
11485
+ }
11486
+ return { source: opts.seed, label: opts.seed };
11487
+ }
11205
11488
  async function main() {
11206
11489
  const opts = parseArgs(process.argv.slice(2));
11490
+ const { source, label } = await resolveSeedSource(opts);
11207
11491
  const handle = createMockApp({
11208
- seed: opts.seed,
11492
+ seed: source,
11209
11493
  authMode: opts.authMode,
11210
11494
  defaultOtp: opts.defaultOtp,
11211
11495
  rngSeed: opts.rngSeed,
11212
11496
  cors: opts.cors,
11213
11497
  frozenAt: opts.frozenAt
11214
11498
  });
11499
+ if (opts.dump) {
11500
+ const out = resolvePath(opts.dump);
11501
+ persistToFile(handle.deps.registry, out);
11502
+ console.log(`dumped ${label} \u2192 ${opts.dump} (business: ${handle.deps.defaultBusinessId})`);
11503
+ return;
11504
+ }
11215
11505
  if (opts.persist) {
11216
11506
  const loaded = loadFromFile(handle.deps.registry, opts.persist);
11217
11507
  autoPersist(handle.deps.registry, opts.persist);
@@ -11232,7 +11522,7 @@ async function main() {
11232
11522
  }
11233
11523
  serve({ fetch: handle.app.fetch, port: opts.port, hostname: opts.host }, () => {
11234
11524
  console.log(`@cimplify/sdk/mock listening on http://${opts.host}:${opts.port}`);
11235
- console.log(` seed: ${opts.seed} (business: ${handle.deps.defaultBusinessId})`);
11525
+ console.log(` seed: ${label} (business: ${handle.deps.defaultBusinessId})`);
11236
11526
  console.log(` state: ${opts.persist ? `persisted at ${opts.persist}` : "in-memory"}`);
11237
11527
  console.log(` admin: http://${opts.host}:${opts.port}/_mock`);
11238
11528
  console.log(` events: http://${opts.host}:${opts.port}/_mock/events/stream (SSE)`);
@@ -11241,6 +11531,6 @@ async function main() {
11241
11531
  });
11242
11532
  }
11243
11533
  main().catch((err) => {
11244
- console.error("Failed to start:", err);
11534
+ console.error("Failed to start:", err instanceof Error ? err.message : err);
11245
11535
  process.exit(1);
11246
11536
  });