@cimplify/sdk 0.6.9 → 0.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y 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, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-vmXPt1j0.mjs';
1
+ export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y 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, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-BngAGN0v.mjs';
2
2
  import './payment-Cu75tmUc.mjs';
3
3
 
4
4
  type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
@@ -1,4 +1,4 @@
1
- export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y 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, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-COpV6Yuu.js';
1
+ export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y 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, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-DM3-ZG29.js';
2
2
  import './payment-Cu75tmUc.js';
3
3
 
4
4
  type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
@@ -3173,6 +3173,10 @@ declare function createElements(client: CimplifyClient, businessId?: string, opt
3173
3173
  interface CimplifyConfig {
3174
3174
  publicKey?: string;
3175
3175
  credentials?: RequestCredentials;
3176
+ /** Override storefront base URL (default auto-derives by hostname). */
3177
+ baseUrl?: string;
3178
+ /** Override Link/API base URL (default auto-derives by hostname). */
3179
+ linkApiUrl?: string;
3176
3180
  /** Disable console warning when no public key is provided (for Link REST-only portal usage). */
3177
3181
  suppressPublicKeyWarning?: boolean;
3178
3182
  /** Request timeout in milliseconds (default: 30000) */
@@ -3173,6 +3173,10 @@ declare function createElements(client: CimplifyClient, businessId?: string, opt
3173
3173
  interface CimplifyConfig {
3174
3174
  publicKey?: string;
3175
3175
  credentials?: RequestCredentials;
3176
+ /** Override storefront base URL (default auto-derives by hostname). */
3177
+ baseUrl?: string;
3178
+ /** Override Link/API base URL (default auto-derives by hostname). */
3179
+ linkApiUrl?: string;
3176
3180
  /** Disable console warning when no public key is provided (for Link REST-only portal usage). */
3177
3181
  suppressPublicKeyWarning?: boolean;
3178
3182
  /** Request timeout in milliseconds (default: 30000) */
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, aV as AddOn, bE as AddOnDetails, b_ as AddOnGroupDetails, aX as AddOnOption, bZ as AddOnOptionDetails, aY as AddOnOptionPrice, aW as AddOnWithOptions, c3 as AddToCartInput, dN as AddressData, ed as AddressInfo, bt as AdjustmentType, ch as AmountToPay, bA as AppliedDiscount, dY as AuthResponse, A as AuthService, m as AuthStatus, ef as AuthenticatedCustomer, eh as AuthenticatedData, dB as AvailabilityCheck, dC as AvailabilityResult, di as AvailableSlot, bz as BenefitType, dl as Booking, dc as BookingRequirementOverride, dk as BookingStatus, dm as BookingWithDetails, cB as BufferTimes, b4 as Bundle, b8 as BundleComponentData, b9 as BundleComponentInfo, b3 as BundlePriceType, b6 as BundleProduct, bJ as BundleSelectionData, bH as BundleSelectionInput, bI as BundleStoredSelection, b5 as BundleSummary, b7 as BundleWithDetails, cQ as Business, d2 as BusinessHours, cP as BusinessPreferences, B as BusinessService, d1 as BusinessSettings, cO as BusinessType, c$ as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, dr as CancelBookingInput, cv as CancelOrderInput, cD as CancellationPolicy, bO as Cart, bF as CartAddOn, br as CartChannel, bP as CartItem, c0 as CartItemDetails, i as CartOperations, bq as CartStatus, c5 as CartSummary, bQ as CartTotals, b as CatalogueQueries, a_ as Category, d3 as CategoryInfo, a$ as CategorySummary, o as ChangePasswordInput, dp as CheckSlotAvailabilityInput, d$ as CheckoutAddressInfo, e1 as CheckoutCustomerInfo, X as CheckoutFormData, ct as CheckoutInput, J as CheckoutMode, j as CheckoutOperations, N as CheckoutOrderType, V as CheckoutPaymentMethod, Y as CheckoutResult, j as CheckoutService, a0 as CheckoutStatus, a1 as CheckoutStatusContext, W as CheckoutStep, by as ChosenPrice, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, b0 as Collection, b2 as CollectionProduct, b1 as CollectionSummary, bf as ComponentGroup, bg as ComponentGroupWithComponents, bk as ComponentPriceBreakdown, bi as ComponentSelectionInput, bc as ComponentSourceType, bd as Composite, bh as CompositeComponent, bL as CompositePriceBreakdown, bj as CompositePriceResult, ba as CompositePricingMode, bM as CompositeSelectionData, bi as CompositeSelectionInput, bK as CompositeStoredSelection, be as CompositeWithDetails, a5 as ContactType, dJ as CreateAddressInput, dL as CreateMobileMoneyInput, dE as Customer, dF as CustomerAddress, dH as CustomerLinkPreferences, dG as CustomerMobileMoney, cA as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, dj as DayAvailability, cK as DepositResult, aJ as DepositType, a4 as DeviceType, aI as DigitalProductType, bB as DiscountBreakdown, bC as DiscountDetails, bT as DisplayAddOn, bU as DisplayAddOnOption, bR as DisplayCart, bS as DisplayCartItem, x as ELEMENT_TYPES, E as EVENT_TYPES, ec as ElementAppearance, em as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, ei as ElementsCheckoutData, ej as ElementsCheckoutResult, eg as ElementsCustomerInfo, y as ElementsOptions, dP as EnrollAndLinkOrderInput, dS as EnrollAndLinkOrderResult, dM as EnrollmentData, aq as Err, cg as FeeBearerType, F as FetchQuoteInput, ce as FulfillmentLink, cd as FulfillmentStatus, cc as FulfillmentType, e3 as FxQuote, e2 as FxQuoteRequest, e4 as FxRateResponse, r as FxService, dn as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, bb as GroupPricingBehavior, el as IframeToParentMessage, I as InventoryService, dD as InventorySummary, aG as InventoryType, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, bN as LineConfiguration, ci as LineItem, c9 as LineType, dI as LinkData, dR as LinkEnrollResult, L as LinkService, dT as LinkSession, dQ as LinkStatusResult, s as LiteBootstrap, q as LiteService, cT as Location, cN as LocationAppointment, bn as LocationProductPrice, dA as LocationStock, cR as LocationTaxBehavior, cS as LocationTaxOverrides, cW as LocationTimeProfile, d0 as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, dO as MobileMoneyData, e0 as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, eb as ObservabilityHooks, ap as Ok, cj as Order, c8 as OrderChannel, cs as OrderFilter, cf as OrderFulfillmentSummary, cm as OrderGroup, cq as OrderGroupDetails, cn as OrderGroupPayment, cl as OrderGroupPaymentState, cp as OrderGroupPaymentSummary, ck as OrderHistory, ca as OrderLineState, cb as OrderLineStatus, cr as OrderPaymentEvent, O as OrderQueries, co as OrderSplitDetail, c6 as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, ek as ParentToIframeMessage, ee as PaymentMethodInfo, c7 as PaymentState, d_ as PickupTime, dZ as PickupTimeType, bm as Price, bu as PriceAdjustment, bx as PriceDecisionPath, bl as PriceEntryType, bw as PricePathTaxInfo, P as PriceQuote, bs as PriceSource, cF as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, aL as Product, aZ as ProductAddOn, bo as ProductAvailability, dy as ProductStock, bp as ProductTimeProfile, aF as ProductType, aN as ProductVariant, aS as ProductVariantValue, aM as ProductWithDetails, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, cw as RefundOrderInput, cz as ReminderMethod, cC as ReminderSettings, e5 as RequestContext, e8 as RequestErrorEvent, dW as RequestOtpInput, e6 as RequestStartEvent, e7 as RequestSuccessEvent, dq as RescheduleBookingInput, cI as ResourceAssignment, d9 as ResourceAvailabilityException, d8 as ResourceAvailabilityRule, dd as ResourceType, ao as Result, e9 as RetryEvent, dV as RevokeAllSessionsResult, dU as RevokeSessionResult, cY as Room, aK as SalesChannel, cG as SchedulingMetadata, cJ as SchedulingResult, p as SchedulingService, S as SearchOptions, bD as SelectedAddOnOption, de as Service, d5 as ServiceAvailabilityException, ds as ServiceAvailabilityParams, dt as ServiceAvailabilityResult, d4 as ServiceAvailabilityRule, cZ as ServiceCharge, cE as ServiceNotes, cL as ServiceScheduleRequest, db as ServiceStaffRequirement, cx as ServiceStatus, df as ServiceWithStaff, ea as SessionChangeEvent, dg as Staff, cH as StaffAssignment, d7 as StaffAvailabilityException, d6 as StaffAvailabilityRule, da as StaffBookingProfile, cy as StaffRole, cM as StaffScheduleItem, dw as Stock, dx as StockLevel, du as StockOwnershipType, dv as StockStatus, c_ as StorefrontBootstrap, cX as Table, T as TableInfo, bv as TaxPathComponent, cU as TimeRange, cV as TimeRanges, dh as TimeSlot, c1 as UICart, bV as UICartBusiness, bX as UICartCustomer, bW as UICartLocation, bY as UICartPricing, c2 as UICartResponse, dK as UpdateAddressInput, c4 as UpdateCartItemInput, cu as UpdateOrderStatusInput, U as UpdateProfileInput, aP as VariantAxis, aU as VariantAxisSelection, aR as VariantAxisValue, aQ as VariantAxisWithValues, bG as VariantDetails, b$ as VariantDetailsDTO, aO as VariantDisplayAttribute, aT as VariantLocationAvailability, dz as VariantStock, aH as VariantStrategy, dX as VerifyOtpInput, aD as combine, aE as combineObject, c as createCimplifyClient, w as createElements, as as err, ax as flatMap, aB as fromPromise, k as generateIdempotencyKey, ay as getOrElse, au as isErr, at as isOk, aw as mapError, av as mapResult, ar as ok, aA as toNullable, aC as tryCatch, az as unwrap } from './client-vmXPt1j0.mjs';
1
+ export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, aV as AddOn, bE as AddOnDetails, b_ as AddOnGroupDetails, aX as AddOnOption, bZ as AddOnOptionDetails, aY as AddOnOptionPrice, aW as AddOnWithOptions, c3 as AddToCartInput, dN as AddressData, ed as AddressInfo, bt as AdjustmentType, ch as AmountToPay, bA as AppliedDiscount, dY as AuthResponse, A as AuthService, m as AuthStatus, ef as AuthenticatedCustomer, eh as AuthenticatedData, dB as AvailabilityCheck, dC as AvailabilityResult, di as AvailableSlot, bz as BenefitType, dl as Booking, dc as BookingRequirementOverride, dk as BookingStatus, dm as BookingWithDetails, cB as BufferTimes, b4 as Bundle, b8 as BundleComponentData, b9 as BundleComponentInfo, b3 as BundlePriceType, b6 as BundleProduct, bJ as BundleSelectionData, bH as BundleSelectionInput, bI as BundleStoredSelection, b5 as BundleSummary, b7 as BundleWithDetails, cQ as Business, d2 as BusinessHours, cP as BusinessPreferences, B as BusinessService, d1 as BusinessSettings, cO as BusinessType, c$ as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, dr as CancelBookingInput, cv as CancelOrderInput, cD as CancellationPolicy, bO as Cart, bF as CartAddOn, br as CartChannel, bP as CartItem, c0 as CartItemDetails, i as CartOperations, bq as CartStatus, c5 as CartSummary, bQ as CartTotals, b as CatalogueQueries, a_ as Category, d3 as CategoryInfo, a$ as CategorySummary, o as ChangePasswordInput, dp as CheckSlotAvailabilityInput, d$ as CheckoutAddressInfo, e1 as CheckoutCustomerInfo, X as CheckoutFormData, ct as CheckoutInput, J as CheckoutMode, j as CheckoutOperations, N as CheckoutOrderType, V as CheckoutPaymentMethod, Y as CheckoutResult, j as CheckoutService, a0 as CheckoutStatus, a1 as CheckoutStatusContext, W as CheckoutStep, by as ChosenPrice, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, b0 as Collection, b2 as CollectionProduct, b1 as CollectionSummary, bf as ComponentGroup, bg as ComponentGroupWithComponents, bk as ComponentPriceBreakdown, bi as ComponentSelectionInput, bc as ComponentSourceType, bd as Composite, bh as CompositeComponent, bL as CompositePriceBreakdown, bj as CompositePriceResult, ba as CompositePricingMode, bM as CompositeSelectionData, bi as CompositeSelectionInput, bK as CompositeStoredSelection, be as CompositeWithDetails, a5 as ContactType, dJ as CreateAddressInput, dL as CreateMobileMoneyInput, dE as Customer, dF as CustomerAddress, dH as CustomerLinkPreferences, dG as CustomerMobileMoney, cA as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, dj as DayAvailability, cK as DepositResult, aJ as DepositType, a4 as DeviceType, aI as DigitalProductType, bB as DiscountBreakdown, bC as DiscountDetails, bT as DisplayAddOn, bU as DisplayAddOnOption, bR as DisplayCart, bS as DisplayCartItem, x as ELEMENT_TYPES, E as EVENT_TYPES, ec as ElementAppearance, em as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, ei as ElementsCheckoutData, ej as ElementsCheckoutResult, eg as ElementsCustomerInfo, y as ElementsOptions, dP as EnrollAndLinkOrderInput, dS as EnrollAndLinkOrderResult, dM as EnrollmentData, aq as Err, cg as FeeBearerType, F as FetchQuoteInput, ce as FulfillmentLink, cd as FulfillmentStatus, cc as FulfillmentType, e3 as FxQuote, e2 as FxQuoteRequest, e4 as FxRateResponse, r as FxService, dn as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, bb as GroupPricingBehavior, el as IframeToParentMessage, I as InventoryService, dD as InventorySummary, aG as InventoryType, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, bN as LineConfiguration, ci as LineItem, c9 as LineType, dI as LinkData, dR as LinkEnrollResult, L as LinkService, dT as LinkSession, dQ as LinkStatusResult, s as LiteBootstrap, q as LiteService, cT as Location, cN as LocationAppointment, bn as LocationProductPrice, dA as LocationStock, cR as LocationTaxBehavior, cS as LocationTaxOverrides, cW as LocationTimeProfile, d0 as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, dO as MobileMoneyData, e0 as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, eb as ObservabilityHooks, ap as Ok, cj as Order, c8 as OrderChannel, cs as OrderFilter, cf as OrderFulfillmentSummary, cm as OrderGroup, cq as OrderGroupDetails, cn as OrderGroupPayment, cl as OrderGroupPaymentState, cp as OrderGroupPaymentSummary, ck as OrderHistory, ca as OrderLineState, cb as OrderLineStatus, cr as OrderPaymentEvent, O as OrderQueries, co as OrderSplitDetail, c6 as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, ek as ParentToIframeMessage, ee as PaymentMethodInfo, c7 as PaymentState, d_ as PickupTime, dZ as PickupTimeType, bm as Price, bu as PriceAdjustment, bx as PriceDecisionPath, bl as PriceEntryType, bw as PricePathTaxInfo, P as PriceQuote, bs as PriceSource, cF as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, aL as Product, aZ as ProductAddOn, bo as ProductAvailability, dy as ProductStock, bp as ProductTimeProfile, aF as ProductType, aN as ProductVariant, aS as ProductVariantValue, aM as ProductWithDetails, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, cw as RefundOrderInput, cz as ReminderMethod, cC as ReminderSettings, e5 as RequestContext, e8 as RequestErrorEvent, dW as RequestOtpInput, e6 as RequestStartEvent, e7 as RequestSuccessEvent, dq as RescheduleBookingInput, cI as ResourceAssignment, d9 as ResourceAvailabilityException, d8 as ResourceAvailabilityRule, dd as ResourceType, ao as Result, e9 as RetryEvent, dV as RevokeAllSessionsResult, dU as RevokeSessionResult, cY as Room, aK as SalesChannel, cG as SchedulingMetadata, cJ as SchedulingResult, p as SchedulingService, S as SearchOptions, bD as SelectedAddOnOption, de as Service, d5 as ServiceAvailabilityException, ds as ServiceAvailabilityParams, dt as ServiceAvailabilityResult, d4 as ServiceAvailabilityRule, cZ as ServiceCharge, cE as ServiceNotes, cL as ServiceScheduleRequest, db as ServiceStaffRequirement, cx as ServiceStatus, df as ServiceWithStaff, ea as SessionChangeEvent, dg as Staff, cH as StaffAssignment, d7 as StaffAvailabilityException, d6 as StaffAvailabilityRule, da as StaffBookingProfile, cy as StaffRole, cM as StaffScheduleItem, dw as Stock, dx as StockLevel, du as StockOwnershipType, dv as StockStatus, c_ as StorefrontBootstrap, cX as Table, T as TableInfo, bv as TaxPathComponent, cU as TimeRange, cV as TimeRanges, dh as TimeSlot, c1 as UICart, bV as UICartBusiness, bX as UICartCustomer, bW as UICartLocation, bY as UICartPricing, c2 as UICartResponse, dK as UpdateAddressInput, c4 as UpdateCartItemInput, cu as UpdateOrderStatusInput, U as UpdateProfileInput, aP as VariantAxis, aU as VariantAxisSelection, aR as VariantAxisValue, aQ as VariantAxisWithValues, bG as VariantDetails, b$ as VariantDetailsDTO, aO as VariantDisplayAttribute, aT as VariantLocationAvailability, dz as VariantStock, aH as VariantStrategy, dX as VerifyOtpInput, aD as combine, aE as combineObject, c as createCimplifyClient, w as createElements, as as err, ax as flatMap, aB as fromPromise, k as generateIdempotencyKey, ay as getOrElse, au as isErr, at as isOk, aw as mapError, av as mapResult, ar as ok, aA as toNullable, aC as tryCatch, az as unwrap } from './client-BngAGN0v.mjs';
2
2
  export { QueryBuilder, query } from './advanced.mjs';
3
3
  import { A as ApiError } from './payment-Cu75tmUc.mjs';
4
4
  export { q as AuthorizationType, h as CimplifyError, b as Currency, C as CurrencyCode, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, I as InitializePaymentResult, M as Money, d as Pagination, P as PaginationParams, t as Payment, w as PaymentErrorDetails, s as PaymentMethod, p as PaymentMethodType, r as PaymentProcessingState, o as PaymentProvider, u as PaymentResponse, n as PaymentStatus, v as PaymentStatusResponse, S as SubmitAuthorizationInput, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, i as isCimplifyError, l as isRetryableError, m as money, a as moneyFromNumber } from './payment-Cu75tmUc.mjs';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, aV as AddOn, bE as AddOnDetails, b_ as AddOnGroupDetails, aX as AddOnOption, bZ as AddOnOptionDetails, aY as AddOnOptionPrice, aW as AddOnWithOptions, c3 as AddToCartInput, dN as AddressData, ed as AddressInfo, bt as AdjustmentType, ch as AmountToPay, bA as AppliedDiscount, dY as AuthResponse, A as AuthService, m as AuthStatus, ef as AuthenticatedCustomer, eh as AuthenticatedData, dB as AvailabilityCheck, dC as AvailabilityResult, di as AvailableSlot, bz as BenefitType, dl as Booking, dc as BookingRequirementOverride, dk as BookingStatus, dm as BookingWithDetails, cB as BufferTimes, b4 as Bundle, b8 as BundleComponentData, b9 as BundleComponentInfo, b3 as BundlePriceType, b6 as BundleProduct, bJ as BundleSelectionData, bH as BundleSelectionInput, bI as BundleStoredSelection, b5 as BundleSummary, b7 as BundleWithDetails, cQ as Business, d2 as BusinessHours, cP as BusinessPreferences, B as BusinessService, d1 as BusinessSettings, cO as BusinessType, c$ as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, dr as CancelBookingInput, cv as CancelOrderInput, cD as CancellationPolicy, bO as Cart, bF as CartAddOn, br as CartChannel, bP as CartItem, c0 as CartItemDetails, i as CartOperations, bq as CartStatus, c5 as CartSummary, bQ as CartTotals, b as CatalogueQueries, a_ as Category, d3 as CategoryInfo, a$ as CategorySummary, o as ChangePasswordInput, dp as CheckSlotAvailabilityInput, d$ as CheckoutAddressInfo, e1 as CheckoutCustomerInfo, X as CheckoutFormData, ct as CheckoutInput, J as CheckoutMode, j as CheckoutOperations, N as CheckoutOrderType, V as CheckoutPaymentMethod, Y as CheckoutResult, j as CheckoutService, a0 as CheckoutStatus, a1 as CheckoutStatusContext, W as CheckoutStep, by as ChosenPrice, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, b0 as Collection, b2 as CollectionProduct, b1 as CollectionSummary, bf as ComponentGroup, bg as ComponentGroupWithComponents, bk as ComponentPriceBreakdown, bi as ComponentSelectionInput, bc as ComponentSourceType, bd as Composite, bh as CompositeComponent, bL as CompositePriceBreakdown, bj as CompositePriceResult, ba as CompositePricingMode, bM as CompositeSelectionData, bi as CompositeSelectionInput, bK as CompositeStoredSelection, be as CompositeWithDetails, a5 as ContactType, dJ as CreateAddressInput, dL as CreateMobileMoneyInput, dE as Customer, dF as CustomerAddress, dH as CustomerLinkPreferences, dG as CustomerMobileMoney, cA as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, dj as DayAvailability, cK as DepositResult, aJ as DepositType, a4 as DeviceType, aI as DigitalProductType, bB as DiscountBreakdown, bC as DiscountDetails, bT as DisplayAddOn, bU as DisplayAddOnOption, bR as DisplayCart, bS as DisplayCartItem, x as ELEMENT_TYPES, E as EVENT_TYPES, ec as ElementAppearance, em as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, ei as ElementsCheckoutData, ej as ElementsCheckoutResult, eg as ElementsCustomerInfo, y as ElementsOptions, dP as EnrollAndLinkOrderInput, dS as EnrollAndLinkOrderResult, dM as EnrollmentData, aq as Err, cg as FeeBearerType, F as FetchQuoteInput, ce as FulfillmentLink, cd as FulfillmentStatus, cc as FulfillmentType, e3 as FxQuote, e2 as FxQuoteRequest, e4 as FxRateResponse, r as FxService, dn as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, bb as GroupPricingBehavior, el as IframeToParentMessage, I as InventoryService, dD as InventorySummary, aG as InventoryType, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, bN as LineConfiguration, ci as LineItem, c9 as LineType, dI as LinkData, dR as LinkEnrollResult, L as LinkService, dT as LinkSession, dQ as LinkStatusResult, s as LiteBootstrap, q as LiteService, cT as Location, cN as LocationAppointment, bn as LocationProductPrice, dA as LocationStock, cR as LocationTaxBehavior, cS as LocationTaxOverrides, cW as LocationTimeProfile, d0 as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, dO as MobileMoneyData, e0 as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, eb as ObservabilityHooks, ap as Ok, cj as Order, c8 as OrderChannel, cs as OrderFilter, cf as OrderFulfillmentSummary, cm as OrderGroup, cq as OrderGroupDetails, cn as OrderGroupPayment, cl as OrderGroupPaymentState, cp as OrderGroupPaymentSummary, ck as OrderHistory, ca as OrderLineState, cb as OrderLineStatus, cr as OrderPaymentEvent, O as OrderQueries, co as OrderSplitDetail, c6 as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, ek as ParentToIframeMessage, ee as PaymentMethodInfo, c7 as PaymentState, d_ as PickupTime, dZ as PickupTimeType, bm as Price, bu as PriceAdjustment, bx as PriceDecisionPath, bl as PriceEntryType, bw as PricePathTaxInfo, P as PriceQuote, bs as PriceSource, cF as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, aL as Product, aZ as ProductAddOn, bo as ProductAvailability, dy as ProductStock, bp as ProductTimeProfile, aF as ProductType, aN as ProductVariant, aS as ProductVariantValue, aM as ProductWithDetails, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, cw as RefundOrderInput, cz as ReminderMethod, cC as ReminderSettings, e5 as RequestContext, e8 as RequestErrorEvent, dW as RequestOtpInput, e6 as RequestStartEvent, e7 as RequestSuccessEvent, dq as RescheduleBookingInput, cI as ResourceAssignment, d9 as ResourceAvailabilityException, d8 as ResourceAvailabilityRule, dd as ResourceType, ao as Result, e9 as RetryEvent, dV as RevokeAllSessionsResult, dU as RevokeSessionResult, cY as Room, aK as SalesChannel, cG as SchedulingMetadata, cJ as SchedulingResult, p as SchedulingService, S as SearchOptions, bD as SelectedAddOnOption, de as Service, d5 as ServiceAvailabilityException, ds as ServiceAvailabilityParams, dt as ServiceAvailabilityResult, d4 as ServiceAvailabilityRule, cZ as ServiceCharge, cE as ServiceNotes, cL as ServiceScheduleRequest, db as ServiceStaffRequirement, cx as ServiceStatus, df as ServiceWithStaff, ea as SessionChangeEvent, dg as Staff, cH as StaffAssignment, d7 as StaffAvailabilityException, d6 as StaffAvailabilityRule, da as StaffBookingProfile, cy as StaffRole, cM as StaffScheduleItem, dw as Stock, dx as StockLevel, du as StockOwnershipType, dv as StockStatus, c_ as StorefrontBootstrap, cX as Table, T as TableInfo, bv as TaxPathComponent, cU as TimeRange, cV as TimeRanges, dh as TimeSlot, c1 as UICart, bV as UICartBusiness, bX as UICartCustomer, bW as UICartLocation, bY as UICartPricing, c2 as UICartResponse, dK as UpdateAddressInput, c4 as UpdateCartItemInput, cu as UpdateOrderStatusInput, U as UpdateProfileInput, aP as VariantAxis, aU as VariantAxisSelection, aR as VariantAxisValue, aQ as VariantAxisWithValues, bG as VariantDetails, b$ as VariantDetailsDTO, aO as VariantDisplayAttribute, aT as VariantLocationAvailability, dz as VariantStock, aH as VariantStrategy, dX as VerifyOtpInput, aD as combine, aE as combineObject, c as createCimplifyClient, w as createElements, as as err, ax as flatMap, aB as fromPromise, k as generateIdempotencyKey, ay as getOrElse, au as isErr, at as isOk, aw as mapError, av as mapResult, ar as ok, aA as toNullable, aC as tryCatch, az as unwrap } from './client-COpV6Yuu.js';
1
+ export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, aV as AddOn, bE as AddOnDetails, b_ as AddOnGroupDetails, aX as AddOnOption, bZ as AddOnOptionDetails, aY as AddOnOptionPrice, aW as AddOnWithOptions, c3 as AddToCartInput, dN as AddressData, ed as AddressInfo, bt as AdjustmentType, ch as AmountToPay, bA as AppliedDiscount, dY as AuthResponse, A as AuthService, m as AuthStatus, ef as AuthenticatedCustomer, eh as AuthenticatedData, dB as AvailabilityCheck, dC as AvailabilityResult, di as AvailableSlot, bz as BenefitType, dl as Booking, dc as BookingRequirementOverride, dk as BookingStatus, dm as BookingWithDetails, cB as BufferTimes, b4 as Bundle, b8 as BundleComponentData, b9 as BundleComponentInfo, b3 as BundlePriceType, b6 as BundleProduct, bJ as BundleSelectionData, bH as BundleSelectionInput, bI as BundleStoredSelection, b5 as BundleSummary, b7 as BundleWithDetails, cQ as Business, d2 as BusinessHours, cP as BusinessPreferences, B as BusinessService, d1 as BusinessSettings, cO as BusinessType, c$ as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, dr as CancelBookingInput, cv as CancelOrderInput, cD as CancellationPolicy, bO as Cart, bF as CartAddOn, br as CartChannel, bP as CartItem, c0 as CartItemDetails, i as CartOperations, bq as CartStatus, c5 as CartSummary, bQ as CartTotals, b as CatalogueQueries, a_ as Category, d3 as CategoryInfo, a$ as CategorySummary, o as ChangePasswordInput, dp as CheckSlotAvailabilityInput, d$ as CheckoutAddressInfo, e1 as CheckoutCustomerInfo, X as CheckoutFormData, ct as CheckoutInput, J as CheckoutMode, j as CheckoutOperations, N as CheckoutOrderType, V as CheckoutPaymentMethod, Y as CheckoutResult, j as CheckoutService, a0 as CheckoutStatus, a1 as CheckoutStatusContext, W as CheckoutStep, by as ChosenPrice, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, b0 as Collection, b2 as CollectionProduct, b1 as CollectionSummary, bf as ComponentGroup, bg as ComponentGroupWithComponents, bk as ComponentPriceBreakdown, bi as ComponentSelectionInput, bc as ComponentSourceType, bd as Composite, bh as CompositeComponent, bL as CompositePriceBreakdown, bj as CompositePriceResult, ba as CompositePricingMode, bM as CompositeSelectionData, bi as CompositeSelectionInput, bK as CompositeStoredSelection, be as CompositeWithDetails, a5 as ContactType, dJ as CreateAddressInput, dL as CreateMobileMoneyInput, dE as Customer, dF as CustomerAddress, dH as CustomerLinkPreferences, dG as CustomerMobileMoney, cA as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, dj as DayAvailability, cK as DepositResult, aJ as DepositType, a4 as DeviceType, aI as DigitalProductType, bB as DiscountBreakdown, bC as DiscountDetails, bT as DisplayAddOn, bU as DisplayAddOnOption, bR as DisplayCart, bS as DisplayCartItem, x as ELEMENT_TYPES, E as EVENT_TYPES, ec as ElementAppearance, em as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, ei as ElementsCheckoutData, ej as ElementsCheckoutResult, eg as ElementsCustomerInfo, y as ElementsOptions, dP as EnrollAndLinkOrderInput, dS as EnrollAndLinkOrderResult, dM as EnrollmentData, aq as Err, cg as FeeBearerType, F as FetchQuoteInput, ce as FulfillmentLink, cd as FulfillmentStatus, cc as FulfillmentType, e3 as FxQuote, e2 as FxQuoteRequest, e4 as FxRateResponse, r as FxService, dn as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, bb as GroupPricingBehavior, el as IframeToParentMessage, I as InventoryService, dD as InventorySummary, aG as InventoryType, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, bN as LineConfiguration, ci as LineItem, c9 as LineType, dI as LinkData, dR as LinkEnrollResult, L as LinkService, dT as LinkSession, dQ as LinkStatusResult, s as LiteBootstrap, q as LiteService, cT as Location, cN as LocationAppointment, bn as LocationProductPrice, dA as LocationStock, cR as LocationTaxBehavior, cS as LocationTaxOverrides, cW as LocationTimeProfile, d0 as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, dO as MobileMoneyData, e0 as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, eb as ObservabilityHooks, ap as Ok, cj as Order, c8 as OrderChannel, cs as OrderFilter, cf as OrderFulfillmentSummary, cm as OrderGroup, cq as OrderGroupDetails, cn as OrderGroupPayment, cl as OrderGroupPaymentState, cp as OrderGroupPaymentSummary, ck as OrderHistory, ca as OrderLineState, cb as OrderLineStatus, cr as OrderPaymentEvent, O as OrderQueries, co as OrderSplitDetail, c6 as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, ek as ParentToIframeMessage, ee as PaymentMethodInfo, c7 as PaymentState, d_ as PickupTime, dZ as PickupTimeType, bm as Price, bu as PriceAdjustment, bx as PriceDecisionPath, bl as PriceEntryType, bw as PricePathTaxInfo, P as PriceQuote, bs as PriceSource, cF as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, aL as Product, aZ as ProductAddOn, bo as ProductAvailability, dy as ProductStock, bp as ProductTimeProfile, aF as ProductType, aN as ProductVariant, aS as ProductVariantValue, aM as ProductWithDetails, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, cw as RefundOrderInput, cz as ReminderMethod, cC as ReminderSettings, e5 as RequestContext, e8 as RequestErrorEvent, dW as RequestOtpInput, e6 as RequestStartEvent, e7 as RequestSuccessEvent, dq as RescheduleBookingInput, cI as ResourceAssignment, d9 as ResourceAvailabilityException, d8 as ResourceAvailabilityRule, dd as ResourceType, ao as Result, e9 as RetryEvent, dV as RevokeAllSessionsResult, dU as RevokeSessionResult, cY as Room, aK as SalesChannel, cG as SchedulingMetadata, cJ as SchedulingResult, p as SchedulingService, S as SearchOptions, bD as SelectedAddOnOption, de as Service, d5 as ServiceAvailabilityException, ds as ServiceAvailabilityParams, dt as ServiceAvailabilityResult, d4 as ServiceAvailabilityRule, cZ as ServiceCharge, cE as ServiceNotes, cL as ServiceScheduleRequest, db as ServiceStaffRequirement, cx as ServiceStatus, df as ServiceWithStaff, ea as SessionChangeEvent, dg as Staff, cH as StaffAssignment, d7 as StaffAvailabilityException, d6 as StaffAvailabilityRule, da as StaffBookingProfile, cy as StaffRole, cM as StaffScheduleItem, dw as Stock, dx as StockLevel, du as StockOwnershipType, dv as StockStatus, c_ as StorefrontBootstrap, cX as Table, T as TableInfo, bv as TaxPathComponent, cU as TimeRange, cV as TimeRanges, dh as TimeSlot, c1 as UICart, bV as UICartBusiness, bX as UICartCustomer, bW as UICartLocation, bY as UICartPricing, c2 as UICartResponse, dK as UpdateAddressInput, c4 as UpdateCartItemInput, cu as UpdateOrderStatusInput, U as UpdateProfileInput, aP as VariantAxis, aU as VariantAxisSelection, aR as VariantAxisValue, aQ as VariantAxisWithValues, bG as VariantDetails, b$ as VariantDetailsDTO, aO as VariantDisplayAttribute, aT as VariantLocationAvailability, dz as VariantStock, aH as VariantStrategy, dX as VerifyOtpInput, aD as combine, aE as combineObject, c as createCimplifyClient, w as createElements, as as err, ax as flatMap, aB as fromPromise, k as generateIdempotencyKey, ay as getOrElse, au as isErr, at as isOk, aw as mapError, av as mapResult, ar as ok, aA as toNullable, aC as tryCatch, az as unwrap } from './client-DM3-ZG29.js';
2
2
  export { QueryBuilder, query } from './advanced.js';
3
3
  import { A as ApiError } from './payment-Cu75tmUc.js';
4
4
  export { q as AuthorizationType, h as CimplifyError, b as Currency, C as CurrencyCode, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, I as InitializePaymentResult, M as Money, d as Pagination, P as PaginationParams, t as Payment, w as PaymentErrorDetails, s as PaymentMethod, p as PaymentMethodType, r as PaymentProcessingState, o as PaymentProvider, u as PaymentResponse, n as PaymentStatus, v as PaymentStatusResponse, S as SubmitAuthorizationInput, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, i as isCimplifyError, l as isRetryableError, m as money, a as moneyFromNumber } from './payment-Cu75tmUc.js';
package/dist/index.js CHANGED
@@ -3306,6 +3306,11 @@ function deriveUrls() {
3306
3306
  linkApiUrl: "https://api.cimplify.io"
3307
3307
  };
3308
3308
  }
3309
+ function normalizeUrl(url) {
3310
+ const trimmed = url.trim();
3311
+ if (!trimmed) return trimmed;
3312
+ return trimmed.replace(/\/+$/, "");
3313
+ }
3309
3314
  function getEnvPublicKey() {
3310
3315
  try {
3311
3316
  const env = globalThis.process;
@@ -3323,8 +3328,8 @@ var CimplifyClient = class {
3323
3328
  this.inflightRequests = /* @__PURE__ */ new Map();
3324
3329
  this.publicKey = config.publicKey || getEnvPublicKey() || "";
3325
3330
  const urls = deriveUrls();
3326
- this.baseUrl = urls.baseUrl;
3327
- this.linkApiUrl = urls.linkApiUrl;
3331
+ this.baseUrl = config.baseUrl ? normalizeUrl(config.baseUrl) : urls.baseUrl;
3332
+ this.linkApiUrl = config.linkApiUrl ? normalizeUrl(config.linkApiUrl) : urls.linkApiUrl;
3328
3333
  this.credentials = config.credentials || "include";
3329
3334
  this.timeout = config.timeout ?? DEFAULT_TIMEOUT_MS;
3330
3335
  this.maxRetries = config.maxRetries ?? DEFAULT_MAX_RETRIES;
package/dist/index.mjs CHANGED
@@ -3304,6 +3304,11 @@ function deriveUrls() {
3304
3304
  linkApiUrl: "https://api.cimplify.io"
3305
3305
  };
3306
3306
  }
3307
+ function normalizeUrl(url) {
3308
+ const trimmed = url.trim();
3309
+ if (!trimmed) return trimmed;
3310
+ return trimmed.replace(/\/+$/, "");
3311
+ }
3307
3312
  function getEnvPublicKey() {
3308
3313
  try {
3309
3314
  const env = globalThis.process;
@@ -3321,8 +3326,8 @@ var CimplifyClient = class {
3321
3326
  this.inflightRequests = /* @__PURE__ */ new Map();
3322
3327
  this.publicKey = config.publicKey || getEnvPublicKey() || "";
3323
3328
  const urls = deriveUrls();
3324
- this.baseUrl = urls.baseUrl;
3325
- this.linkApiUrl = urls.linkApiUrl;
3329
+ this.baseUrl = config.baseUrl ? normalizeUrl(config.baseUrl) : urls.baseUrl;
3330
+ this.linkApiUrl = config.linkApiUrl ? normalizeUrl(config.linkApiUrl) : urls.linkApiUrl;
3326
3331
  this.credentials = config.credentials || "include";
3327
3332
  this.timeout = config.timeout ?? DEFAULT_TIMEOUT_MS;
3328
3333
  this.maxRetries = config.maxRetries ?? DEFAULT_MAX_RETRIES;
package/dist/react.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, cT as Location, cQ as Business, aL as Product, aM as ProductWithDetails, a_ as Category, bH as BundleSelectionInput, bi as ComponentSelectionInput, cj as Order, b0 as Collection, b7 as BundleWithDetails, be as CompositeWithDetails, bj as CompositePriceResult, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, eh as AuthenticatedData, ed as AddressInfo, ee as PaymentMethodInfo, ej as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-vmXPt1j0.mjs';
1
+ import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, cT as Location, cQ as Business, aL as Product, aM as ProductWithDetails, a_ as Category, bH as BundleSelectionInput, bi as ComponentSelectionInput, cj as Order, b0 as Collection, b7 as BundleWithDetails, be as CompositeWithDetails, bj as CompositePriceResult, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, eh as AuthenticatedData, ed as AddressInfo, ee as PaymentMethodInfo, ej as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-BngAGN0v.mjs';
2
2
  import React, { ReactNode } from 'react';
3
3
  import { h as CimplifyError, C as CurrencyCode } from './payment-Cu75tmUc.mjs';
4
4
  import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.mjs';
package/dist/react.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, cT as Location, cQ as Business, aL as Product, aM as ProductWithDetails, a_ as Category, bH as BundleSelectionInput, bi as ComponentSelectionInput, cj as Order, b0 as Collection, b7 as BundleWithDetails, be as CompositeWithDetails, bj as CompositePriceResult, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, eh as AuthenticatedData, ed as AddressInfo, ee as PaymentMethodInfo, ej as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-COpV6Yuu.js';
1
+ import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, cT as Location, cQ as Business, aL as Product, aM as ProductWithDetails, a_ as Category, bH as BundleSelectionInput, bi as ComponentSelectionInput, cj as Order, b0 as Collection, b7 as BundleWithDetails, be as CompositeWithDetails, bj as CompositePriceResult, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, eh as AuthenticatedData, ed as AddressInfo, ee as PaymentMethodInfo, ej as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-DM3-ZG29.js';
2
2
  import React, { ReactNode } from 'react';
3
3
  import { h as CimplifyError, C as CurrencyCode } from './payment-Cu75tmUc.js';
4
4
  import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.js';
package/dist/react.js CHANGED
@@ -3438,6 +3438,11 @@ function deriveUrls() {
3438
3438
  linkApiUrl: "https://api.cimplify.io"
3439
3439
  };
3440
3440
  }
3441
+ function normalizeUrl(url) {
3442
+ const trimmed = url.trim();
3443
+ if (!trimmed) return trimmed;
3444
+ return trimmed.replace(/\/+$/, "");
3445
+ }
3441
3446
  function getEnvPublicKey() {
3442
3447
  try {
3443
3448
  const env = globalThis.process;
@@ -3455,8 +3460,8 @@ var CimplifyClient = class {
3455
3460
  this.inflightRequests = /* @__PURE__ */ new Map();
3456
3461
  this.publicKey = config.publicKey || getEnvPublicKey() || "";
3457
3462
  const urls = deriveUrls();
3458
- this.baseUrl = urls.baseUrl;
3459
- this.linkApiUrl = urls.linkApiUrl;
3463
+ this.baseUrl = config.baseUrl ? normalizeUrl(config.baseUrl) : urls.baseUrl;
3464
+ this.linkApiUrl = config.linkApiUrl ? normalizeUrl(config.linkApiUrl) : urls.linkApiUrl;
3460
3465
  this.credentials = config.credentials || "include";
3461
3466
  this.timeout = config.timeout ?? DEFAULT_TIMEOUT_MS;
3462
3467
  this.maxRetries = config.maxRetries ?? DEFAULT_MAX_RETRIES;
package/dist/react.mjs CHANGED
@@ -3436,6 +3436,11 @@ function deriveUrls() {
3436
3436
  linkApiUrl: "https://api.cimplify.io"
3437
3437
  };
3438
3438
  }
3439
+ function normalizeUrl(url) {
3440
+ const trimmed = url.trim();
3441
+ if (!trimmed) return trimmed;
3442
+ return trimmed.replace(/\/+$/, "");
3443
+ }
3439
3444
  function getEnvPublicKey() {
3440
3445
  try {
3441
3446
  const env = globalThis.process;
@@ -3453,8 +3458,8 @@ var CimplifyClient = class {
3453
3458
  this.inflightRequests = /* @__PURE__ */ new Map();
3454
3459
  this.publicKey = config.publicKey || getEnvPublicKey() || "";
3455
3460
  const urls = deriveUrls();
3456
- this.baseUrl = urls.baseUrl;
3457
- this.linkApiUrl = urls.linkApiUrl;
3461
+ this.baseUrl = config.baseUrl ? normalizeUrl(config.baseUrl) : urls.baseUrl;
3462
+ this.linkApiUrl = config.linkApiUrl ? normalizeUrl(config.linkApiUrl) : urls.linkApiUrl;
3458
3463
  this.credentials = config.credentials || "include";
3459
3464
  this.timeout = config.timeout ?? DEFAULT_TIMEOUT_MS;
3460
3465
  this.maxRetries = config.maxRetries ?? DEFAULT_MAX_RETRIES;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cimplify/sdk",
3
- "version": "0.6.9",
3
+ "version": "0.6.11",
4
4
  "description": "Cimplify Commerce SDK for storefronts",
5
5
  "keywords": [
6
6
  "cimplify",