@cimplify/sdk 0.76.0 → 0.78.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 (48) hide show
  1. package/dist/advanced.d.mts +3 -3
  2. package/dist/advanced.d.ts +3 -3
  3. package/dist/{chunk-OGQFDCZM.js → chunk-2SJUHD32.js} +24 -11
  4. package/dist/{chunk-BYWJSPT4.mjs → chunk-7EYA527E.mjs} +5 -2
  5. package/dist/{chunk-Y64AIRGW.js → chunk-EIJKO43W.js} +6 -3
  6. package/dist/{chunk-J7L5LHGK.mjs → chunk-XRJCLWJ2.mjs} +24 -11
  7. package/dist/{client-ciWgfgLw.d.ts → client-B1ix2-Og.d.mts} +10 -3
  8. package/dist/{client-DDWRDb9m.d.mts → client-BFuRYjAL.d.mts} +2 -2
  9. package/dist/{client-D7MP5Zi7.d.ts → client-BW82Vq-p.d.ts} +2 -2
  10. package/dist/{client-CBQJQn7E.d.mts → client-DxW_uHll.d.ts} +10 -3
  11. package/dist/{index-lt-fe29V.d.mts → index-Bu76UyFz.d.mts} +3 -3
  12. package/dist/{index-DTGS0QC1.d.ts → index-Moe4cGMB.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 +24 -11
  16. package/dist/mock/library.js +24 -11
  17. package/dist/mock/library.mjs +24 -11
  18. package/dist/mock/msw.js +24 -11
  19. package/dist/mock/msw.mjs +24 -11
  20. package/dist/{payment-C-2gApyQ.d.mts → payment-B7qzWdaJ.d.mts} +1 -1
  21. package/dist/{payment-CfemTORM.d.ts → payment-mVIJIJcq.d.ts} +1 -1
  22. package/dist/{price-CZBQw-Rh.d.mts → price-BfOaGqjx.d.mts} +1 -1
  23. package/dist/{price-DNeyoO7y.d.ts → price-CS1IsORZ.d.ts} +1 -1
  24. package/dist/{product-_GFoaPHU.d.mts → product-BgFOFmQw.d.mts} +7 -0
  25. package/dist/{product-_GFoaPHU.d.ts → product-BgFOFmQw.d.ts} +7 -0
  26. package/dist/react.d.mts +4 -4
  27. package/dist/react.d.ts +4 -4
  28. package/dist/react.js +4 -1
  29. package/dist/react.mjs +4 -1
  30. package/dist/{server-G8I4JtqK.d.mts → server-CGO4zneR.d.mts} +1 -1
  31. package/dist/{server-1hXIXH2k.d.ts → server-Daq42vK7.d.ts} +1 -1
  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 +20 -5
  43. package/dist/testing.d.ts +20 -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
@@ -1,6 +1,6 @@
1
- export { k as AuthService, C as BusinessService, P as CartOperations, Q as CatalogueQueries, a9 as CheckoutOperations, a9 as CheckoutService, af as CimplifyElement, ag as CimplifyElements, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aT as ElementsOptions, a$ as FetchQuoteInput, b7 as FxService, ba as GetProductsOptions, bd as InventoryService, bk as LinkService, bo as LiteService, bv as MESSAGE_TYPES, bY as OrderQueries, cf as PriceQuote, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cr as RefreshQuoteInput, cs as RefreshQuoteResult, cT as SchedulingService, dw as createElements } from './client-CBQJQn7E.mjs';
2
- import './product-_GFoaPHU.mjs';
3
- import './payment-C-2gApyQ.mjs';
1
+ export { k as AuthService, C as BusinessService, P as CartOperations, Q as CatalogueQueries, a9 as CheckoutOperations, a9 as CheckoutService, af as CimplifyElement, ag as CimplifyElements, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aT as ElementsOptions, a$ as FetchQuoteInput, b7 as FxService, ba as GetProductsOptions, bd as InventoryService, bk as LinkService, bo as LiteService, bv as MESSAGE_TYPES, bY as OrderQueries, cf as PriceQuote, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cr as RefreshQuoteInput, cs as RefreshQuoteResult, cT as SchedulingService, dw as createElements } from './client-B1ix2-Og.mjs';
2
+ import './product-BgFOFmQw.mjs';
3
+ import './payment-B7qzWdaJ.mjs';
4
4
 
5
5
  declare function generateIdempotencyKey(prefix?: string): string;
6
6
 
@@ -1,6 +1,6 @@
1
- export { k as AuthService, C as BusinessService, P as CartOperations, Q as CatalogueQueries, a9 as CheckoutOperations, a9 as CheckoutService, af as CimplifyElement, ag as CimplifyElements, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aT as ElementsOptions, a$ as FetchQuoteInput, b7 as FxService, ba as GetProductsOptions, bd as InventoryService, bk as LinkService, bo as LiteService, bv as MESSAGE_TYPES, bY as OrderQueries, cf as PriceQuote, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cr as RefreshQuoteInput, cs as RefreshQuoteResult, cT as SchedulingService, dw as createElements } from './client-ciWgfgLw.js';
2
- import './product-_GFoaPHU.js';
3
- import './payment-CfemTORM.js';
1
+ export { k as AuthService, C as BusinessService, P as CartOperations, Q as CatalogueQueries, a9 as CheckoutOperations, a9 as CheckoutService, af as CimplifyElement, ag as CimplifyElements, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aT as ElementsOptions, a$ as FetchQuoteInput, b7 as FxService, ba as GetProductsOptions, bd as InventoryService, bk as LinkService, bo as LiteService, bv as MESSAGE_TYPES, bY as OrderQueries, cf as PriceQuote, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cr as RefreshQuoteInput, cs as RefreshQuoteResult, cT as SchedulingService, dw as createElements } from './client-DxW_uHll.js';
2
+ import './product-BgFOFmQw.js';
3
+ import './payment-mVIJIJcq.js';
4
4
 
5
5
  declare function generateIdempotencyKey(prefix?: string): string;
6
6
 
@@ -4456,17 +4456,27 @@ function recalculateTotals(opts) {
4456
4456
  const lineTotal = multiply(add(item.price, item.add_ons_price), item.quantity);
4457
4457
  subtotal = add(subtotal, lineTotal);
4458
4458
  }
4459
- const totalDiscounts = opts.appliedCouponCodes.includes("WELCOME10") ? percent(subtotal, 10) : "0.00";
4460
- const afterDiscount = money(parseFloat(subtotal) - parseFloat(totalDiscounts));
4461
- const tax = "0.00";
4462
- const service = "0.00";
4463
- const total = add(add(afterDiscount, tax), service);
4459
+ const subtotalNum = parseFloat(subtotal);
4460
+ const rawDiscount = opts.appliedCouponCodes.includes("WELCOME10") ? parseFloat(percent(subtotal, 10)) : 0;
4461
+ const cappedDiscount = Math.min(rawDiscount, subtotalNum);
4462
+ const taxable = Math.max(subtotalNum - cappedDiscount, 0);
4463
+ const service = 0;
4464
+ const rate2 = opts.taxRatePct / 100;
4465
+ let tax;
4466
+ let total;
4467
+ if (opts.taxInclusive) {
4468
+ tax = 0;
4469
+ total = subtotalNum + service - cappedDiscount;
4470
+ } else {
4471
+ tax = (taxable + service) * rate2;
4472
+ total = subtotalNum + service + tax - cappedDiscount;
4473
+ }
4464
4474
  return {
4465
4475
  subtotal,
4466
- total_discounts: totalDiscounts,
4467
- tax_amount: tax,
4468
- service_charge: service,
4469
- total_price: total
4476
+ total_discounts: money(cappedDiscount),
4477
+ tax_amount: money(tax),
4478
+ service_charge: money(service),
4479
+ total_price: money(total)
4470
4480
  };
4471
4481
  }
4472
4482
  function computeLineKey(opts) {
@@ -4599,7 +4609,8 @@ function toUICart(registry, cart) {
4599
4609
  total_price: cart.total_price,
4600
4610
  currency: cart.currency,
4601
4611
  tax_rate: cart.tax_rate,
4602
- service_charge_rate: cart.service_charge_rate
4612
+ service_charge_rate: cart.service_charge_rate,
4613
+ tax_inclusive: false
4603
4614
  },
4604
4615
  customer_info: {
4605
4616
  name: cart.customer_name,
@@ -4618,6 +4629,7 @@ function toUICart(registry, cart) {
4618
4629
 
4619
4630
  // src/mock/domain/cart/index.ts
4620
4631
  var CART_TTL_MS = 24 * 60 * 60 * 1e3;
4632
+ var TAX_RATE_PCT = 0;
4621
4633
  var ZERO2 = "0.00";
4622
4634
  function createCartService(opts) {
4623
4635
  const { registry, clock, ids, bus, inventory } = opts;
@@ -4659,7 +4671,8 @@ function createCartService(opts) {
4659
4671
  const recalc = (cart) => {
4660
4672
  const totals = recalculateTotals({
4661
4673
  items: cart.items,
4662
- appliedCouponCodes: cart.applied_discount_codes});
4674
+ appliedCouponCodes: cart.applied_discount_codes,
4675
+ taxRatePct: TAX_RATE_PCT});
4663
4676
  const updated = {
4664
4677
  ...cart,
4665
4678
  ...totals,
@@ -1,4 +1,4 @@
1
- import { createMockApp } from './chunk-J7L5LHGK.mjs';
1
+ import { createMockApp } from './chunk-XRJCLWJ2.mjs';
2
2
  import { createCimplifyClient } from './chunk-H337NF4O.mjs';
3
3
  import { z } from 'zod';
4
4
 
@@ -480,7 +480,10 @@ var CartPricingSchema = registerSchema(
480
480
  total_price: MoneySchema,
481
481
  currency: CurrencyCodeSchema,
482
482
  tax_rate: MoneySchema.optional(),
483
- service_charge_rate: MoneySchema.optional()
483
+ service_charge_rate: MoneySchema.optional(),
484
+ tax_inclusive: z.boolean(),
485
+ deposit_required: z.boolean(),
486
+ deposit_amount: MoneySchema
484
487
  }),
485
488
  {
486
489
  id: "CartPricing",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkOGQFDCZM_js = require('./chunk-OGQFDCZM.js');
3
+ var chunk2SJUHD32_js = require('./chunk-2SJUHD32.js');
4
4
  var chunkQS4XDVHI_js = require('./chunk-QS4XDVHI.js');
5
5
  var zod = require('zod');
6
6
 
@@ -482,7 +482,10 @@ var CartPricingSchema = registerSchema(
482
482
  total_price: MoneySchema,
483
483
  currency: CurrencyCodeSchema,
484
484
  tax_rate: MoneySchema.optional(),
485
- service_charge_rate: MoneySchema.optional()
485
+ service_charge_rate: MoneySchema.optional(),
486
+ tax_inclusive: zod.z.boolean(),
487
+ deposit_required: zod.z.boolean(),
488
+ deposit_amount: MoneySchema
486
489
  }),
487
490
  {
488
491
  id: "CartPricing",
@@ -595,7 +598,7 @@ async function toForwardedRequest(input, init) {
595
598
  };
596
599
  }
597
600
  function createTestClient(options = {}) {
598
- const mock = chunkOGQFDCZM_js.createMockApp(options);
601
+ const mock = chunk2SJUHD32_js.createMockApp(options);
599
602
  let sessionToken;
600
603
  const fetchImpl = async (input, init) => {
601
604
  const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
@@ -4454,17 +4454,27 @@ function recalculateTotals(opts) {
4454
4454
  const lineTotal = multiply(add(item.price, item.add_ons_price), item.quantity);
4455
4455
  subtotal = add(subtotal, lineTotal);
4456
4456
  }
4457
- const totalDiscounts = opts.appliedCouponCodes.includes("WELCOME10") ? percent(subtotal, 10) : "0.00";
4458
- const afterDiscount = money(parseFloat(subtotal) - parseFloat(totalDiscounts));
4459
- const tax = "0.00";
4460
- const service = "0.00";
4461
- const total = add(add(afterDiscount, tax), service);
4457
+ const subtotalNum = parseFloat(subtotal);
4458
+ const rawDiscount = opts.appliedCouponCodes.includes("WELCOME10") ? parseFloat(percent(subtotal, 10)) : 0;
4459
+ const cappedDiscount = Math.min(rawDiscount, subtotalNum);
4460
+ const taxable = Math.max(subtotalNum - cappedDiscount, 0);
4461
+ const service = 0;
4462
+ const rate2 = opts.taxRatePct / 100;
4463
+ let tax;
4464
+ let total;
4465
+ if (opts.taxInclusive) {
4466
+ tax = 0;
4467
+ total = subtotalNum + service - cappedDiscount;
4468
+ } else {
4469
+ tax = (taxable + service) * rate2;
4470
+ total = subtotalNum + service + tax - cappedDiscount;
4471
+ }
4462
4472
  return {
4463
4473
  subtotal,
4464
- total_discounts: totalDiscounts,
4465
- tax_amount: tax,
4466
- service_charge: service,
4467
- total_price: total
4474
+ total_discounts: money(cappedDiscount),
4475
+ tax_amount: money(tax),
4476
+ service_charge: money(service),
4477
+ total_price: money(total)
4468
4478
  };
4469
4479
  }
4470
4480
  function computeLineKey(opts) {
@@ -4597,7 +4607,8 @@ function toUICart(registry, cart) {
4597
4607
  total_price: cart.total_price,
4598
4608
  currency: cart.currency,
4599
4609
  tax_rate: cart.tax_rate,
4600
- service_charge_rate: cart.service_charge_rate
4610
+ service_charge_rate: cart.service_charge_rate,
4611
+ tax_inclusive: false
4601
4612
  },
4602
4613
  customer_info: {
4603
4614
  name: cart.customer_name,
@@ -4616,6 +4627,7 @@ function toUICart(registry, cart) {
4616
4627
 
4617
4628
  // src/mock/domain/cart/index.ts
4618
4629
  var CART_TTL_MS = 24 * 60 * 60 * 1e3;
4630
+ var TAX_RATE_PCT = 0;
4619
4631
  var ZERO2 = "0.00";
4620
4632
  function createCartService(opts) {
4621
4633
  const { registry, clock, ids, bus, inventory } = opts;
@@ -4657,7 +4669,8 @@ function createCartService(opts) {
4657
4669
  const recalc = (cart) => {
4658
4670
  const totals = recalculateTotals({
4659
4671
  items: cart.items,
4660
- appliedCouponCodes: cart.applied_discount_codes});
4672
+ appliedCouponCodes: cart.applied_discount_codes,
4673
+ taxRatePct: TAX_RATE_PCT});
4661
4674
  const updated = {
4662
4675
  ...cart,
4663
4676
  ...totals,
@@ -1,5 +1,5 @@
1
- import { T as CimplifyError, Q as Category, aX as Product, f as AddOnWithOptions, aO as Pagination, b9 as ProductWithDetails, b7 as ProductVariant, bA as VariantAxis, bB as VariantAxisSelection, A as AddOn, U as Collection, E as BundleSummary, s as Bundle, a1 as Composite, $ as ComponentSelectionInput, a6 as CompositePriceResult, S as ChosenPrice, b4 as ProductTaxonomy, bt as TaxonomyWithChildren, av as EligiblePlansQuery, a$ as ProductBillingPlan, b5 as ProductTimeProfile, a_ as ProductAvailabilityNow, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, bq as TagsResponse, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ba as PropertyFacet, bs as TaxonomyAttributeTemplate, aH as KnowledgeArticle, bu as UICart, J as CartItem, O as CartSummary, g as AddToCartInput, L as CartMutationResult, bz as UpdateCartItemInput, am as DiscountDetails, aM as Money, ab as CurrencyCode, aI as LineConfiguration, bG as VariantDetails, bH as VariantDetailsDTO, a as AddOnDetails, d as AddOnOptionDetails, b as AddOnGroupDetails, z as BundleSelectionData, a8 as CompositeSelectionData, ae as CustomerInputValue, bg as SchedulingMode, at as DurationUnit, bk as Subscription, bo as SubscriptionWithDetails } from './product-_GFoaPHU.js';
2
- import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-CfemTORM.js';
1
+ import { T as CimplifyError, Q as Category, aX as Product, f as AddOnWithOptions, aO as Pagination, b9 as ProductWithDetails, b7 as ProductVariant, bA as VariantAxis, bB as VariantAxisSelection, A as AddOn, U as Collection, E as BundleSummary, s as Bundle, a1 as Composite, $ as ComponentSelectionInput, a6 as CompositePriceResult, S as ChosenPrice, b4 as ProductTaxonomy, bt as TaxonomyWithChildren, av as EligiblePlansQuery, a$ as ProductBillingPlan, b5 as ProductTimeProfile, a_ as ProductAvailabilityNow, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, bq as TagsResponse, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ba as PropertyFacet, bs as TaxonomyAttributeTemplate, aH as KnowledgeArticle, bu as UICart, J as CartItem, O as CartSummary, g as AddToCartInput, L as CartMutationResult, bz as UpdateCartItemInput, am as DiscountDetails, aM as Money, ab as CurrencyCode, aI as LineConfiguration, bG as VariantDetails, bH as VariantDetailsDTO, a as AddOnDetails, d as AddOnOptionDetails, b as AddOnGroupDetails, z as BundleSelectionData, a8 as CompositeSelectionData, ae as CustomerInputValue, bg as SchedulingMode, at as DurationUnit, bk as Subscription, bo as SubscriptionWithDetails } from './product-BgFOFmQw.mjs';
2
+ import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-B7qzWdaJ.mjs';
3
3
 
4
4
  interface RequestContext {
5
5
  method: "GET" | "POST" | "PATCH" | "DELETE";
@@ -458,7 +458,6 @@ interface Order {
458
458
  latest_service_time?: string;
459
459
  deposit_required: boolean;
460
460
  deposit_amount: Money;
461
- deposit_paid_amount: Money;
462
461
  balance_due: Money;
463
462
  deposit_due_date?: string;
464
463
  final_payment_due_date?: string;
@@ -2342,6 +2341,14 @@ interface CheckoutCartData {
2342
2341
  service_charge: string;
2343
2342
  total: string;
2344
2343
  currency: string;
2344
+ /** Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is already
2345
+ * inside `subtotal`/`total`. Checkout labels it "included" rather than
2346
+ * summing it onto the total. */
2347
+ tax_inclusive: boolean;
2348
+ /** Deposit due now when the cart has deposit-eligible service items, so the
2349
+ * checkout can offer "pay deposit now, balance later". Absent/0 otherwise. */
2350
+ deposit_required?: boolean;
2351
+ deposit_amount?: string;
2345
2352
  }
2346
2353
  type ParentToIframeMessage = {
2347
2354
  type: typeof MESSAGE_TYPES.INIT;
@@ -1,5 +1,5 @@
1
- import { ad as CimplifyClient } from './client-CBQJQn7E.mjs';
2
- import { A as AppHandle, C as CreateAppOptions } from './server-G8I4JtqK.mjs';
1
+ import { ad as CimplifyClient } from './client-B1ix2-Og.mjs';
2
+ import { A as AppHandle, C as CreateAppOptions } from './server-CGO4zneR.mjs';
3
3
 
4
4
  /**
5
5
  * Test client + fixtures.
@@ -1,5 +1,5 @@
1
- import { ad as CimplifyClient } from './client-ciWgfgLw.js';
2
- import { A as AppHandle, C as CreateAppOptions } from './server-1hXIXH2k.js';
1
+ import { ad as CimplifyClient } from './client-DxW_uHll.js';
2
+ import { A as AppHandle, C as CreateAppOptions } from './server-Daq42vK7.js';
3
3
 
4
4
  /**
5
5
  * Test client + fixtures.
@@ -1,5 +1,5 @@
1
- import { T as CimplifyError, Q as Category, aX as Product, f as AddOnWithOptions, aO as Pagination, b9 as ProductWithDetails, b7 as ProductVariant, bA as VariantAxis, bB as VariantAxisSelection, A as AddOn, U as Collection, E as BundleSummary, s as Bundle, a1 as Composite, $ as ComponentSelectionInput, a6 as CompositePriceResult, S as ChosenPrice, b4 as ProductTaxonomy, bt as TaxonomyWithChildren, av as EligiblePlansQuery, a$ as ProductBillingPlan, b5 as ProductTimeProfile, a_ as ProductAvailabilityNow, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, bq as TagsResponse, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ba as PropertyFacet, bs as TaxonomyAttributeTemplate, aH as KnowledgeArticle, bu as UICart, J as CartItem, O as CartSummary, g as AddToCartInput, L as CartMutationResult, bz as UpdateCartItemInput, am as DiscountDetails, aM as Money, ab as CurrencyCode, aI as LineConfiguration, bG as VariantDetails, bH as VariantDetailsDTO, a as AddOnDetails, d as AddOnOptionDetails, b as AddOnGroupDetails, z as BundleSelectionData, a8 as CompositeSelectionData, ae as CustomerInputValue, bg as SchedulingMode, at as DurationUnit, bk as Subscription, bo as SubscriptionWithDetails } from './product-_GFoaPHU.mjs';
2
- import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-C-2gApyQ.mjs';
1
+ import { T as CimplifyError, Q as Category, aX as Product, f as AddOnWithOptions, aO as Pagination, b9 as ProductWithDetails, b7 as ProductVariant, bA as VariantAxis, bB as VariantAxisSelection, A as AddOn, U as Collection, E as BundleSummary, s as Bundle, a1 as Composite, $ as ComponentSelectionInput, a6 as CompositePriceResult, S as ChosenPrice, b4 as ProductTaxonomy, bt as TaxonomyWithChildren, av as EligiblePlansQuery, a$ as ProductBillingPlan, b5 as ProductTimeProfile, a_ as ProductAvailabilityNow, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, bq as TagsResponse, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ba as PropertyFacet, bs as TaxonomyAttributeTemplate, aH as KnowledgeArticle, bu as UICart, J as CartItem, O as CartSummary, g as AddToCartInput, L as CartMutationResult, bz as UpdateCartItemInput, am as DiscountDetails, aM as Money, ab as CurrencyCode, aI as LineConfiguration, bG as VariantDetails, bH as VariantDetailsDTO, a as AddOnDetails, d as AddOnOptionDetails, b as AddOnGroupDetails, z as BundleSelectionData, a8 as CompositeSelectionData, ae as CustomerInputValue, bg as SchedulingMode, at as DurationUnit, bk as Subscription, bo as SubscriptionWithDetails } from './product-BgFOFmQw.js';
2
+ import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-mVIJIJcq.js';
3
3
 
4
4
  interface RequestContext {
5
5
  method: "GET" | "POST" | "PATCH" | "DELETE";
@@ -458,7 +458,6 @@ interface Order {
458
458
  latest_service_time?: string;
459
459
  deposit_required: boolean;
460
460
  deposit_amount: Money;
461
- deposit_paid_amount: Money;
462
461
  balance_due: Money;
463
462
  deposit_due_date?: string;
464
463
  final_payment_due_date?: string;
@@ -2342,6 +2341,14 @@ interface CheckoutCartData {
2342
2341
  service_charge: string;
2343
2342
  total: string;
2344
2343
  currency: string;
2344
+ /** Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is already
2345
+ * inside `subtotal`/`total`. Checkout labels it "included" rather than
2346
+ * summing it onto the total. */
2347
+ tax_inclusive: boolean;
2348
+ /** Deposit due now when the cart has deposit-eligible service items, so the
2349
+ * checkout can offer "pay deposit now, balance later". Absent/0 otherwise. */
2350
+ deposit_required?: boolean;
2351
+ deposit_amount?: string;
2345
2352
  }
2346
2353
  type ParentToIframeMessage = {
2347
2354
  type: typeof MESSAGE_TYPES.INIT;
@@ -1,6 +1,6 @@
1
- import { aM as Money, ab as CurrencyCode, aV as PricePathTaxInfo, aX as Product, b9 as ProductWithDetails, bc as QuantityPricingTier } from './product-_GFoaPHU.mjs';
2
- import { P as ProductWithPrice } from './price-CZBQw-Rh.mjs';
3
- import { b as PaymentErrorDetails, g as PaymentResponse, i as PaymentStatusResponse } from './payment-C-2gApyQ.mjs';
1
+ import { aM as Money, ab as CurrencyCode, aV as PricePathTaxInfo, aX as Product, b9 as ProductWithDetails, bc as QuantityPricingTier } from './product-BgFOFmQw.mjs';
2
+ import { P as ProductWithPrice } from './price-BfOaGqjx.mjs';
3
+ import { b as PaymentErrorDetails, g as PaymentResponse, i as PaymentStatusResponse } from './payment-B7qzWdaJ.mjs';
4
4
  import { CountryCode } from 'libphonenumber-js';
5
5
 
6
6
  declare const CURRENCY_SYMBOLS: Record<string, string>;
@@ -1,6 +1,6 @@
1
- import { aM as Money, ab as CurrencyCode, aV as PricePathTaxInfo, aX as Product, b9 as ProductWithDetails, bc as QuantityPricingTier } from './product-_GFoaPHU.js';
2
- import { P as ProductWithPrice } from './price-DNeyoO7y.js';
3
- import { b as PaymentErrorDetails, g as PaymentResponse, i as PaymentStatusResponse } from './payment-CfemTORM.js';
1
+ import { aM as Money, ab as CurrencyCode, aV as PricePathTaxInfo, aX as Product, b9 as ProductWithDetails, bc as QuantityPricingTier } from './product-BgFOFmQw.js';
2
+ import { P as ProductWithPrice } from './price-CS1IsORZ.js';
3
+ import { b as PaymentErrorDetails, g as PaymentResponse, i as PaymentStatusResponse } from './payment-mVIJIJcq.js';
4
4
  import { CountryCode } from 'libphonenumber-js';
5
5
 
6
6
  declare const CURRENCY_SYMBOLS: Record<string, string>;
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 DeliveryService, az as DepositResult, aA as DeviceType, aB as DismissMessageResponse, aC as ELEMENTS_AUTH_CONTACT_TYPES, aD as ELEMENTS_AUTH_MODES, aE as ELEMENTS_AUTH_PROMPTS, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aH as ElementAppearance, aI as ElementEventHandler, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aM as ElementsAuthContactType, aN as ElementsAuthMode, aO as ElementsAuthOptions, aP as ElementsAuthPrompt, aQ as ElementsCheckoutData, aR as ElementsCheckoutResult, aS as ElementsCustomerInfo, aT as ElementsOptions, aU as EnrichedOrder, aV as EnrichedOrderItem, aW as EnrollAndLinkOrderInput, aX as EnrollAndLinkOrderResult, aY as EnrollmentData, aZ as Err, a_ as FeeBearerType, a$ as FetchQuoteInput, b0 as FulfillmentLink, b1 as FulfillmentStatus, b2 as FulfillmentSummaryDTO, b3 as FulfillmentType, b4 as FxQuote, b5 as FxQuoteRequest, b6 as FxRateResponse, b7 as FxService, b8 as GetAvailableSlotsInput, b9 as GetOrdersOptions, ba as GetProductsOptions, bb as GroupOrderInfo, bc as IframeToParentMessage, bd as InventoryService, be as LINK_MUTATION, bf as LINK_QUERY, bg as LineItem, bh as LineType, bi as LinkData, bj as LinkEnrollResult, bk as LinkService, bl as LinkSession, bm as LinkStatusResult, bn as LiteBootstrap, bo as LiteService, bp as Location, bq as LocationBooking, br as LocationTaxBehavior, bs as LocationTaxOverrides, bt as LocationTimeProfile, bu as LocationWithDetails, bv as MESSAGE_TYPES, bw as MOBILE_MONEY_PROVIDER, bx as MobileMoneyData, by as MobileMoneyDetails, bz as MobileMoneyProvider, bA as NextAction, bB as ORDER_MUTATION, bC as ORDER_TYPE, bD as ObservabilityHooks, bE as Ok, bF as Order, bG as OrderChannel, bH as OrderCustomerInfo, bI as OrderDiscountInfo, bJ as OrderFilter, bK as OrderFulfillmentSummary, bL as OrderGroup, bM as OrderGroupDetails, bN as OrderGroupPayment, bO as OrderGroupPaymentState, bP as OrderGroupPaymentStatus, bQ as OrderGroupPaymentSummary, bR as OrderGroupStatus, bS as OrderHistory, bT as OrderLineState, bU as OrderLineStatus, bV as OrderLocationInfo, bW as OrderPaymentEvent, bX as OrderPricingView, bY as OrderQueries, bZ as OrderSplitDetail, b_ as OrderStaffInfo, b$ as OrderStatus, c0 as OrderTimestampsDTO, c1 as OrderType, c2 as OtpResult, c3 as PAYMENT_METHOD, c4 as PAYMENT_MUTATION, c5 as PAYMENT_STATE, c6 as PICKUP_TIME_TYPE, c7 as ParentToIframeMessage, c8 as PaymentInfoDTO, c9 as PaymentMethodInfo, ca as PaymentState, cb as PickupTime, cc as PickupTimeType, cd as PlaceDetailsResponse, ce as PlacesService, cf as PriceQuote, cg as PricingOverrides, ch as ProcessAndResolveOptions, ci as ProcessCheckoutOptions, cj as ProcessCheckoutResult, ck as ProviderResolutionSource, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cq as ReadRequestOptions, cr as RefreshQuoteInput, cs as RefreshQuoteResult, ct as RefundOrderInput, cu as RelatedCandidate, cv as RelatedProduct, cw as RelatedProductsEnrichment, cx as RelationType, cy as ReminderMethod, cz as ReminderSettings, cA as ReorderResult, cB as RequestContext, cC as RequestErrorEvent, cD as RequestOptions, cE as RequestOtpInput, cF as RequestSource, cG as RequestStartEvent, cH as RequestSuccessEvent, cI as RescheduleBookingInput, cJ as RescheduleBookingResult, cK as RescheduleHistoryRecord, cL as ResourceAssignment, cM as Result, cN as RetryEvent, cO as RevokeAllSessionsResult, cP as RevokeSessionResult, cQ as Room, cR as SchedulingMetadata, cS as SchedulingResult, cT as SchedulingService, cU as SenderType, cV as Service, cW as ServiceAvailabilityParams, cX as ServiceAvailabilityResult, cY as ServiceCharge, cZ as ServiceNotes, c_ as ServiceScheduleRequest, c$ as ServiceStatus, d0 as SessionActivityData, d1 as SessionChangeEvent, d2 as SessionMessage, d3 as SlotResourceInfo, d4 as SlotStaffInfo, d5 as Staff, d6 as StaffAssignment, d7 as StaffRole, d8 as StaffScheduleItem, d9 as StockLevel, da as StockStatus, db as StorefrontBootstrap, dc as SubscriptionService, dd as SupportService, de as Table, df as TableInfo, dg as TimeRange, dh as TimeRanges, di as TimeSlot, dj as TrackCategoryViewOptions, dk as TrackProductViewOptions, dl as UpdateAddressInput, dm as UpdateOrderStatusInput, dn as UpdateProfileInput, dp as UploadInitResponse, dq as UploadResult, dr as UploadService, ds as VerifyOtpInput, dt as combine, du as combineObject, dv as createCimplifyClient, dw as createElements, dx as err, dy as flatMap, dz as fromPromise, dA as getOrElse, dB as isErr, dC as isOk, dD as mapError, dE as mapResult, dF as ok, dG as toNullable, dH as tryCatch, dI as unwrap } from './client-CBQJQn7E.mjs';
2
- import { b9 as ProductWithDetails, j as ApiError } from './product-_GFoaPHU.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-_GFoaPHU.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-lt-fe29V.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 DeliveryService, az as DepositResult, aA as DeviceType, aB as DismissMessageResponse, aC as ELEMENTS_AUTH_CONTACT_TYPES, aD as ELEMENTS_AUTH_MODES, aE as ELEMENTS_AUTH_PROMPTS, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aH as ElementAppearance, aI as ElementEventHandler, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aM as ElementsAuthContactType, aN as ElementsAuthMode, aO as ElementsAuthOptions, aP as ElementsAuthPrompt, aQ as ElementsCheckoutData, aR as ElementsCheckoutResult, aS as ElementsCustomerInfo, aT as ElementsOptions, aU as EnrichedOrder, aV as EnrichedOrderItem, aW as EnrollAndLinkOrderInput, aX as EnrollAndLinkOrderResult, aY as EnrollmentData, aZ as Err, a_ as FeeBearerType, a$ as FetchQuoteInput, b0 as FulfillmentLink, b1 as FulfillmentStatus, b2 as FulfillmentSummaryDTO, b3 as FulfillmentType, b4 as FxQuote, b5 as FxQuoteRequest, b6 as FxRateResponse, b7 as FxService, b8 as GetAvailableSlotsInput, b9 as GetOrdersOptions, ba as GetProductsOptions, bb as GroupOrderInfo, bc as IframeToParentMessage, bd as InventoryService, be as LINK_MUTATION, bf as LINK_QUERY, bg as LineItem, bh as LineType, bi as LinkData, bj as LinkEnrollResult, bk as LinkService, bl as LinkSession, bm as LinkStatusResult, bn as LiteBootstrap, bo as LiteService, bp as Location, bq as LocationBooking, br as LocationTaxBehavior, bs as LocationTaxOverrides, bt as LocationTimeProfile, bu as LocationWithDetails, bv as MESSAGE_TYPES, bw as MOBILE_MONEY_PROVIDER, bx as MobileMoneyData, by as MobileMoneyDetails, bz as MobileMoneyProvider, bA as NextAction, bB as ORDER_MUTATION, bC as ORDER_TYPE, bD as ObservabilityHooks, bE as Ok, bF as Order, bG as OrderChannel, bH as OrderCustomerInfo, bI as OrderDiscountInfo, bJ as OrderFilter, bK as OrderFulfillmentSummary, bL as OrderGroup, bM as OrderGroupDetails, bN as OrderGroupPayment, bO as OrderGroupPaymentState, bP as OrderGroupPaymentStatus, bQ as OrderGroupPaymentSummary, bR as OrderGroupStatus, bS as OrderHistory, bT as OrderLineState, bU as OrderLineStatus, bV as OrderLocationInfo, bW as OrderPaymentEvent, bX as OrderPricingView, bY as OrderQueries, bZ as OrderSplitDetail, b_ as OrderStaffInfo, b$ as OrderStatus, c0 as OrderTimestampsDTO, c1 as OrderType, c2 as OtpResult, c3 as PAYMENT_METHOD, c4 as PAYMENT_MUTATION, c5 as PAYMENT_STATE, c6 as PICKUP_TIME_TYPE, c7 as ParentToIframeMessage, c8 as PaymentInfoDTO, c9 as PaymentMethodInfo, ca as PaymentState, cb as PickupTime, cc as PickupTimeType, cd as PlaceDetailsResponse, ce as PlacesService, cf as PriceQuote, cg as PricingOverrides, ch as ProcessAndResolveOptions, ci as ProcessCheckoutOptions, cj as ProcessCheckoutResult, ck as ProviderResolutionSource, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cq as ReadRequestOptions, cr as RefreshQuoteInput, cs as RefreshQuoteResult, ct as RefundOrderInput, cu as RelatedCandidate, cv as RelatedProduct, cw as RelatedProductsEnrichment, cx as RelationType, cy as ReminderMethod, cz as ReminderSettings, cA as ReorderResult, cB as RequestContext, cC as RequestErrorEvent, cD as RequestOptions, cE as RequestOtpInput, cF as RequestSource, cG as RequestStartEvent, cH as RequestSuccessEvent, cI as RescheduleBookingInput, cJ as RescheduleBookingResult, cK as RescheduleHistoryRecord, cL as ResourceAssignment, cM as Result, cN as RetryEvent, cO as RevokeAllSessionsResult, cP as RevokeSessionResult, cQ as Room, cR as SchedulingMetadata, cS as SchedulingResult, cT as SchedulingService, cU as SenderType, cV as Service, cW as ServiceAvailabilityParams, cX as ServiceAvailabilityResult, cY as ServiceCharge, cZ as ServiceNotes, c_ as ServiceScheduleRequest, c$ as ServiceStatus, d0 as SessionActivityData, d1 as SessionChangeEvent, d2 as SessionMessage, d3 as SlotResourceInfo, d4 as SlotStaffInfo, d5 as Staff, d6 as StaffAssignment, d7 as StaffRole, d8 as StaffScheduleItem, d9 as StockLevel, da as StockStatus, db as StorefrontBootstrap, dc as SubscriptionService, dd as SupportService, de as Table, df as TableInfo, dg as TimeRange, dh as TimeRanges, di as TimeSlot, dj as TrackCategoryViewOptions, dk as TrackProductViewOptions, dl as UpdateAddressInput, dm as UpdateOrderStatusInput, dn as UpdateProfileInput, dp as UploadInitResponse, dq as UploadResult, dr as UploadService, ds as VerifyOtpInput, dt as combine, du as combineObject, dv as createCimplifyClient, dw as createElements, dx as err, dy as flatMap, dz as fromPromise, dA as getOrElse, dB as isErr, dC as isOk, dD as mapError, dE as mapResult, dF as ok, dG as toNullable, dH as tryCatch, dI as unwrap } from './client-B1ix2-Og.mjs';
2
+ import { b9 as ProductWithDetails, j as ApiError } from './product-BgFOFmQw.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-BgFOFmQw.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-Bu76UyFz.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-C-2gApyQ.mjs';
7
- export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-CZBQw-Rh.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-B7qzWdaJ.mjs';
7
+ export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-BfOaGqjx.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 DeliveryService, az as DepositResult, aA as DeviceType, aB as DismissMessageResponse, aC as ELEMENTS_AUTH_CONTACT_TYPES, aD as ELEMENTS_AUTH_MODES, aE as ELEMENTS_AUTH_PROMPTS, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aH as ElementAppearance, aI as ElementEventHandler, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aM as ElementsAuthContactType, aN as ElementsAuthMode, aO as ElementsAuthOptions, aP as ElementsAuthPrompt, aQ as ElementsCheckoutData, aR as ElementsCheckoutResult, aS as ElementsCustomerInfo, aT as ElementsOptions, aU as EnrichedOrder, aV as EnrichedOrderItem, aW as EnrollAndLinkOrderInput, aX as EnrollAndLinkOrderResult, aY as EnrollmentData, aZ as Err, a_ as FeeBearerType, a$ as FetchQuoteInput, b0 as FulfillmentLink, b1 as FulfillmentStatus, b2 as FulfillmentSummaryDTO, b3 as FulfillmentType, b4 as FxQuote, b5 as FxQuoteRequest, b6 as FxRateResponse, b7 as FxService, b8 as GetAvailableSlotsInput, b9 as GetOrdersOptions, ba as GetProductsOptions, bb as GroupOrderInfo, bc as IframeToParentMessage, bd as InventoryService, be as LINK_MUTATION, bf as LINK_QUERY, bg as LineItem, bh as LineType, bi as LinkData, bj as LinkEnrollResult, bk as LinkService, bl as LinkSession, bm as LinkStatusResult, bn as LiteBootstrap, bo as LiteService, bp as Location, bq as LocationBooking, br as LocationTaxBehavior, bs as LocationTaxOverrides, bt as LocationTimeProfile, bu as LocationWithDetails, bv as MESSAGE_TYPES, bw as MOBILE_MONEY_PROVIDER, bx as MobileMoneyData, by as MobileMoneyDetails, bz as MobileMoneyProvider, bA as NextAction, bB as ORDER_MUTATION, bC as ORDER_TYPE, bD as ObservabilityHooks, bE as Ok, bF as Order, bG as OrderChannel, bH as OrderCustomerInfo, bI as OrderDiscountInfo, bJ as OrderFilter, bK as OrderFulfillmentSummary, bL as OrderGroup, bM as OrderGroupDetails, bN as OrderGroupPayment, bO as OrderGroupPaymentState, bP as OrderGroupPaymentStatus, bQ as OrderGroupPaymentSummary, bR as OrderGroupStatus, bS as OrderHistory, bT as OrderLineState, bU as OrderLineStatus, bV as OrderLocationInfo, bW as OrderPaymentEvent, bX as OrderPricingView, bY as OrderQueries, bZ as OrderSplitDetail, b_ as OrderStaffInfo, b$ as OrderStatus, c0 as OrderTimestampsDTO, c1 as OrderType, c2 as OtpResult, c3 as PAYMENT_METHOD, c4 as PAYMENT_MUTATION, c5 as PAYMENT_STATE, c6 as PICKUP_TIME_TYPE, c7 as ParentToIframeMessage, c8 as PaymentInfoDTO, c9 as PaymentMethodInfo, ca as PaymentState, cb as PickupTime, cc as PickupTimeType, cd as PlaceDetailsResponse, ce as PlacesService, cf as PriceQuote, cg as PricingOverrides, ch as ProcessAndResolveOptions, ci as ProcessCheckoutOptions, cj as ProcessCheckoutResult, ck as ProviderResolutionSource, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cq as ReadRequestOptions, cr as RefreshQuoteInput, cs as RefreshQuoteResult, ct as RefundOrderInput, cu as RelatedCandidate, cv as RelatedProduct, cw as RelatedProductsEnrichment, cx as RelationType, cy as ReminderMethod, cz as ReminderSettings, cA as ReorderResult, cB as RequestContext, cC as RequestErrorEvent, cD as RequestOptions, cE as RequestOtpInput, cF as RequestSource, cG as RequestStartEvent, cH as RequestSuccessEvent, cI as RescheduleBookingInput, cJ as RescheduleBookingResult, cK as RescheduleHistoryRecord, cL as ResourceAssignment, cM as Result, cN as RetryEvent, cO as RevokeAllSessionsResult, cP as RevokeSessionResult, cQ as Room, cR as SchedulingMetadata, cS as SchedulingResult, cT as SchedulingService, cU as SenderType, cV as Service, cW as ServiceAvailabilityParams, cX as ServiceAvailabilityResult, cY as ServiceCharge, cZ as ServiceNotes, c_ as ServiceScheduleRequest, c$ as ServiceStatus, d0 as SessionActivityData, d1 as SessionChangeEvent, d2 as SessionMessage, d3 as SlotResourceInfo, d4 as SlotStaffInfo, d5 as Staff, d6 as StaffAssignment, d7 as StaffRole, d8 as StaffScheduleItem, d9 as StockLevel, da as StockStatus, db as StorefrontBootstrap, dc as SubscriptionService, dd as SupportService, de as Table, df as TableInfo, dg as TimeRange, dh as TimeRanges, di as TimeSlot, dj as TrackCategoryViewOptions, dk as TrackProductViewOptions, dl as UpdateAddressInput, dm as UpdateOrderStatusInput, dn as UpdateProfileInput, dp as UploadInitResponse, dq as UploadResult, dr as UploadService, ds as VerifyOtpInput, dt as combine, du as combineObject, dv as createCimplifyClient, dw as createElements, dx as err, dy as flatMap, dz as fromPromise, dA as getOrElse, dB as isErr, dC as isOk, dD as mapError, dE as mapResult, dF as ok, dG as toNullable, dH as tryCatch, dI as unwrap } from './client-ciWgfgLw.js';
2
- import { b9 as ProductWithDetails, j as ApiError } from './product-_GFoaPHU.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-_GFoaPHU.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-DTGS0QC1.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 DeliveryService, az as DepositResult, aA as DeviceType, aB as DismissMessageResponse, aC as ELEMENTS_AUTH_CONTACT_TYPES, aD as ELEMENTS_AUTH_MODES, aE as ELEMENTS_AUTH_PROMPTS, aF as ELEMENT_TYPES, aG as EVENT_TYPES, aH as ElementAppearance, aI as ElementEventHandler, aJ as ElementEventType, aK as ElementOptions, aL as ElementType, aM as ElementsAuthContactType, aN as ElementsAuthMode, aO as ElementsAuthOptions, aP as ElementsAuthPrompt, aQ as ElementsCheckoutData, aR as ElementsCheckoutResult, aS as ElementsCustomerInfo, aT as ElementsOptions, aU as EnrichedOrder, aV as EnrichedOrderItem, aW as EnrollAndLinkOrderInput, aX as EnrollAndLinkOrderResult, aY as EnrollmentData, aZ as Err, a_ as FeeBearerType, a$ as FetchQuoteInput, b0 as FulfillmentLink, b1 as FulfillmentStatus, b2 as FulfillmentSummaryDTO, b3 as FulfillmentType, b4 as FxQuote, b5 as FxQuoteRequest, b6 as FxRateResponse, b7 as FxService, b8 as GetAvailableSlotsInput, b9 as GetOrdersOptions, ba as GetProductsOptions, bb as GroupOrderInfo, bc as IframeToParentMessage, bd as InventoryService, be as LINK_MUTATION, bf as LINK_QUERY, bg as LineItem, bh as LineType, bi as LinkData, bj as LinkEnrollResult, bk as LinkService, bl as LinkSession, bm as LinkStatusResult, bn as LiteBootstrap, bo as LiteService, bp as Location, bq as LocationBooking, br as LocationTaxBehavior, bs as LocationTaxOverrides, bt as LocationTimeProfile, bu as LocationWithDetails, bv as MESSAGE_TYPES, bw as MOBILE_MONEY_PROVIDER, bx as MobileMoneyData, by as MobileMoneyDetails, bz as MobileMoneyProvider, bA as NextAction, bB as ORDER_MUTATION, bC as ORDER_TYPE, bD as ObservabilityHooks, bE as Ok, bF as Order, bG as OrderChannel, bH as OrderCustomerInfo, bI as OrderDiscountInfo, bJ as OrderFilter, bK as OrderFulfillmentSummary, bL as OrderGroup, bM as OrderGroupDetails, bN as OrderGroupPayment, bO as OrderGroupPaymentState, bP as OrderGroupPaymentStatus, bQ as OrderGroupPaymentSummary, bR as OrderGroupStatus, bS as OrderHistory, bT as OrderLineState, bU as OrderLineStatus, bV as OrderLocationInfo, bW as OrderPaymentEvent, bX as OrderPricingView, bY as OrderQueries, bZ as OrderSplitDetail, b_ as OrderStaffInfo, b$ as OrderStatus, c0 as OrderTimestampsDTO, c1 as OrderType, c2 as OtpResult, c3 as PAYMENT_METHOD, c4 as PAYMENT_MUTATION, c5 as PAYMENT_STATE, c6 as PICKUP_TIME_TYPE, c7 as ParentToIframeMessage, c8 as PaymentInfoDTO, c9 as PaymentMethodInfo, ca as PaymentState, cb as PickupTime, cc as PickupTimeType, cd as PlaceDetailsResponse, ce as PlacesService, cf as PriceQuote, cg as PricingOverrides, ch as ProcessAndResolveOptions, ci as ProcessCheckoutOptions, cj as ProcessCheckoutResult, ck as ProviderResolutionSource, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cn as QuoteDynamicBuckets, co as QuoteStatus, cp as QuoteUiMessage, cq as ReadRequestOptions, cr as RefreshQuoteInput, cs as RefreshQuoteResult, ct as RefundOrderInput, cu as RelatedCandidate, cv as RelatedProduct, cw as RelatedProductsEnrichment, cx as RelationType, cy as ReminderMethod, cz as ReminderSettings, cA as ReorderResult, cB as RequestContext, cC as RequestErrorEvent, cD as RequestOptions, cE as RequestOtpInput, cF as RequestSource, cG as RequestStartEvent, cH as RequestSuccessEvent, cI as RescheduleBookingInput, cJ as RescheduleBookingResult, cK as RescheduleHistoryRecord, cL as ResourceAssignment, cM as Result, cN as RetryEvent, cO as RevokeAllSessionsResult, cP as RevokeSessionResult, cQ as Room, cR as SchedulingMetadata, cS as SchedulingResult, cT as SchedulingService, cU as SenderType, cV as Service, cW as ServiceAvailabilityParams, cX as ServiceAvailabilityResult, cY as ServiceCharge, cZ as ServiceNotes, c_ as ServiceScheduleRequest, c$ as ServiceStatus, d0 as SessionActivityData, d1 as SessionChangeEvent, d2 as SessionMessage, d3 as SlotResourceInfo, d4 as SlotStaffInfo, d5 as Staff, d6 as StaffAssignment, d7 as StaffRole, d8 as StaffScheduleItem, d9 as StockLevel, da as StockStatus, db as StorefrontBootstrap, dc as SubscriptionService, dd as SupportService, de as Table, df as TableInfo, dg as TimeRange, dh as TimeRanges, di as TimeSlot, dj as TrackCategoryViewOptions, dk as TrackProductViewOptions, dl as UpdateAddressInput, dm as UpdateOrderStatusInput, dn as UpdateProfileInput, dp as UploadInitResponse, dq as UploadResult, dr as UploadService, ds as VerifyOtpInput, dt as combine, du as combineObject, dv as createCimplifyClient, dw as createElements, dx as err, dy as flatMap, dz as fromPromise, dA as getOrElse, dB as isErr, dC as isOk, dD as mapError, dE as mapResult, dF as ok, dG as toNullable, dH as tryCatch, dI as unwrap } from './client-DxW_uHll.js';
2
+ import { b9 as ProductWithDetails, j as ApiError } from './product-BgFOFmQw.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-BgFOFmQw.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-Moe4cGMB.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-CfemTORM.js';
7
- export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-DNeyoO7y.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-mVIJIJcq.js';
7
+ export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPrice } from './price-CS1IsORZ.js';
8
8
  export { generateIdempotencyKey } from './advanced.js';
9
9
  import 'libphonenumber-js';
10
10
 
package/dist/mock/cli.mjs CHANGED
@@ -5159,17 +5159,27 @@ function recalculateTotals(opts) {
5159
5159
  const lineTotal = multiply(add(item.price, item.add_ons_price), item.quantity);
5160
5160
  subtotal = add(subtotal, lineTotal);
5161
5161
  }
5162
- const totalDiscounts = opts.appliedCouponCodes.includes("WELCOME10") ? percent(subtotal, 10) : "0.00";
5163
- const afterDiscount = money(parseFloat(subtotal) - parseFloat(totalDiscounts));
5164
- const tax = "0.00";
5165
- const service = "0.00";
5166
- const total = add(add(afterDiscount, tax), service);
5162
+ const subtotalNum = parseFloat(subtotal);
5163
+ const rawDiscount = opts.appliedCouponCodes.includes("WELCOME10") ? parseFloat(percent(subtotal, 10)) : 0;
5164
+ const cappedDiscount = Math.min(rawDiscount, subtotalNum);
5165
+ const taxable = Math.max(subtotalNum - cappedDiscount, 0);
5166
+ const service = 0;
5167
+ const rate2 = opts.taxRatePct / 100;
5168
+ let tax;
5169
+ let total;
5170
+ if (opts.taxInclusive) {
5171
+ tax = 0;
5172
+ total = subtotalNum + service - cappedDiscount;
5173
+ } else {
5174
+ tax = (taxable + service) * rate2;
5175
+ total = subtotalNum + service + tax - cappedDiscount;
5176
+ }
5167
5177
  return {
5168
5178
  subtotal,
5169
- total_discounts: totalDiscounts,
5170
- tax_amount: tax,
5171
- service_charge: service,
5172
- total_price: total
5179
+ total_discounts: money(cappedDiscount),
5180
+ tax_amount: money(tax),
5181
+ service_charge: money(service),
5182
+ total_price: money(total)
5173
5183
  };
5174
5184
  }
5175
5185
  function computeLineKey(opts) {
@@ -5302,7 +5312,8 @@ function toUICart(registry, cart) {
5302
5312
  total_price: cart.total_price,
5303
5313
  currency: cart.currency,
5304
5314
  tax_rate: cart.tax_rate,
5305
- service_charge_rate: cart.service_charge_rate
5315
+ service_charge_rate: cart.service_charge_rate,
5316
+ tax_inclusive: false
5306
5317
  },
5307
5318
  customer_info: {
5308
5319
  name: cart.customer_name,
@@ -5321,6 +5332,7 @@ function toUICart(registry, cart) {
5321
5332
 
5322
5333
  // src/mock/domain/cart/index.ts
5323
5334
  var CART_TTL_MS = 24 * 60 * 60 * 1e3;
5335
+ var TAX_RATE_PCT = 0;
5324
5336
  var ZERO2 = "0.00";
5325
5337
  function createCartService(opts) {
5326
5338
  const { registry, clock, ids, bus, inventory } = opts;
@@ -5362,7 +5374,8 @@ function createCartService(opts) {
5362
5374
  const recalc = (cart) => {
5363
5375
  const totals = recalculateTotals({
5364
5376
  items: cart.items,
5365
- appliedCouponCodes: cart.applied_discount_codes});
5377
+ appliedCouponCodes: cart.applied_discount_codes,
5378
+ taxRatePct: TAX_RATE_PCT});
5366
5379
  const updated = {
5367
5380
  ...cart,
5368
5381
  ...totals,
@@ -4527,17 +4527,27 @@ function recalculateTotals(opts) {
4527
4527
  const lineTotal = multiply(add(item.price, item.add_ons_price), item.quantity);
4528
4528
  subtotal = add(subtotal, lineTotal);
4529
4529
  }
4530
- const totalDiscounts = opts.appliedCouponCodes.includes("WELCOME10") ? percent(subtotal, 10) : "0.00";
4531
- const afterDiscount = money(parseFloat(subtotal) - parseFloat(totalDiscounts));
4532
- const tax = "0.00";
4533
- const service = "0.00";
4534
- const total = add(add(afterDiscount, tax), service);
4530
+ const subtotalNum = parseFloat(subtotal);
4531
+ const rawDiscount = opts.appliedCouponCodes.includes("WELCOME10") ? parseFloat(percent(subtotal, 10)) : 0;
4532
+ const cappedDiscount = Math.min(rawDiscount, subtotalNum);
4533
+ const taxable = Math.max(subtotalNum - cappedDiscount, 0);
4534
+ const service = 0;
4535
+ const rate2 = opts.taxRatePct / 100;
4536
+ let tax;
4537
+ let total;
4538
+ if (opts.taxInclusive) {
4539
+ tax = 0;
4540
+ total = subtotalNum + service - cappedDiscount;
4541
+ } else {
4542
+ tax = (taxable + service) * rate2;
4543
+ total = subtotalNum + service + tax - cappedDiscount;
4544
+ }
4535
4545
  return {
4536
4546
  subtotal,
4537
- total_discounts: totalDiscounts,
4538
- tax_amount: tax,
4539
- service_charge: service,
4540
- total_price: total
4547
+ total_discounts: money(cappedDiscount),
4548
+ tax_amount: money(tax),
4549
+ service_charge: money(service),
4550
+ total_price: money(total)
4541
4551
  };
4542
4552
  }
4543
4553
  function computeLineKey(opts) {
@@ -4670,7 +4680,8 @@ function toUICart(registry, cart) {
4670
4680
  total_price: cart.total_price,
4671
4681
  currency: cart.currency,
4672
4682
  tax_rate: cart.tax_rate,
4673
- service_charge_rate: cart.service_charge_rate
4683
+ service_charge_rate: cart.service_charge_rate,
4684
+ tax_inclusive: false
4674
4685
  },
4675
4686
  customer_info: {
4676
4687
  name: cart.customer_name,
@@ -4689,6 +4700,7 @@ function toUICart(registry, cart) {
4689
4700
 
4690
4701
  // src/mock/domain/cart/index.ts
4691
4702
  var CART_TTL_MS = 24 * 60 * 60 * 1e3;
4703
+ var TAX_RATE_PCT = 0;
4692
4704
  var ZERO2 = "0.00";
4693
4705
  function createCartService(opts) {
4694
4706
  const { registry, clock, ids, bus, inventory } = opts;
@@ -4730,7 +4742,8 @@ function createCartService(opts) {
4730
4742
  const recalc = (cart) => {
4731
4743
  const totals = recalculateTotals({
4732
4744
  items: cart.items,
4733
- appliedCouponCodes: cart.applied_discount_codes});
4745
+ appliedCouponCodes: cart.applied_discount_codes,
4746
+ taxRatePct: TAX_RATE_PCT});
4734
4747
  const updated = {
4735
4748
  ...cart,
4736
4749
  ...totals,