@cimplify/sdk 0.100.6 → 0.102.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 (70) hide show
  1. package/dist/advanced.d.mts +3 -3
  2. package/dist/advanced.d.ts +3 -3
  3. package/dist/advanced.js +20 -20
  4. package/dist/advanced.mjs +1 -1
  5. package/dist/{chunk-QPRI2NII.js → chunk-2P4KXFB6.js} +6 -0
  6. package/dist/{chunk-4G5UWFC3.mjs → chunk-3V4DVXV3.mjs} +6 -1
  7. package/dist/{chunk-KLJLKT6C.mjs → chunk-4KNFBPV2.mjs} +10 -3
  8. package/dist/{chunk-RQPXLXB2.mjs → chunk-DCMXUKDQ.mjs} +30 -0
  9. package/dist/{chunk-BMFWQNYZ.mjs → chunk-DKLHCZ5M.mjs} +4 -1
  10. package/dist/{chunk-PNTINRAU.js → chunk-EAZGA7LD.js} +30 -0
  11. package/dist/{chunk-BSZJSR62.js → chunk-LOWSMGRT.js} +12 -4
  12. package/dist/{chunk-D3FWJB7Y.js → chunk-YDA46OZ6.js} +50 -47
  13. package/dist/{chunk-3HU5I5VG.js → chunk-YER7DIOM.js} +15 -0
  14. package/dist/{chunk-Z7M6GAHS.mjs → chunk-Z3K2D3TE.mjs} +15 -0
  15. package/dist/{client-BwRAAk4y.d.mts → client-B40KFazg.d.ts} +15 -2
  16. package/dist/{client-DGrvLiJv.d.mts → client-BdErclfU.d.mts} +2 -2
  17. package/dist/{client-CrPglBBz.d.ts → client-BizGfqB7.d.mts} +15 -2
  18. package/dist/{client-CPcZIrjC.d.ts → client-nsiMwuC1.d.ts} +2 -2
  19. package/dist/{index-D-LUYk1Y.d.mts → index-DpmnI__D.d.mts} +3 -3
  20. package/dist/{index-B_RYmvlF.d.ts → index-nEyXWIyR.d.ts} +3 -3
  21. package/dist/index.d.mts +19 -8
  22. package/dist/index.d.ts +19 -8
  23. package/dist/index.js +92 -88
  24. package/dist/index.mjs +4 -4
  25. package/dist/mock/cli.mjs +30 -0
  26. package/dist/mock/library.js +30 -0
  27. package/dist/mock/library.mjs +30 -0
  28. package/dist/mock/msw.js +30 -0
  29. package/dist/mock/msw.mjs +30 -0
  30. package/dist/{payment-BSzy7sly.d.mts → payment-l0rkieEQ.d.mts} +1 -1
  31. package/dist/{payment-jK8ztICx.d.ts → payment-vzNnIi1n.d.ts} +1 -1
  32. package/dist/{price-CJLfcYKd.d.ts → price-BstChV9a.d.ts} +1 -1
  33. package/dist/{price-D96h6c6L.d.mts → price-CS4E5zLS.d.mts} +1 -1
  34. package/dist/{product-CeV8euw4.d.mts → product-Byf0unSy.d.mts} +745 -625
  35. package/dist/{product-CeV8euw4.d.ts → product-Byf0unSy.d.ts} +745 -625
  36. package/dist/react.d.mts +9 -4
  37. package/dist/react.d.ts +9 -4
  38. package/dist/react.js +137 -92
  39. package/dist/react.mjs +58 -13
  40. package/dist/server/evict.d.mts +12 -8
  41. package/dist/server/evict.d.ts +12 -8
  42. package/dist/server/evict.js +53 -7
  43. package/dist/server/evict.mjs +53 -7
  44. package/dist/server/tanstack.d.mts +4 -2
  45. package/dist/server/tanstack.d.ts +4 -2
  46. package/dist/server/tanstack.js +53 -14
  47. package/dist/server/tanstack.mjs +53 -14
  48. package/dist/{server-zyrpzJVn.d.ts → server-Cj40R2ZD.d.ts} +13 -1
  49. package/dist/{server-DRAW2OOX.d.mts → server-DqbZh8Bk.d.mts} +13 -1
  50. package/dist/server.d.mts +4 -4
  51. package/dist/server.d.ts +4 -4
  52. package/dist/server.js +7 -7
  53. package/dist/server.mjs +2 -2
  54. package/dist/testing/msw.d.mts +2 -2
  55. package/dist/testing/msw.d.ts +2 -2
  56. package/dist/testing/msw.js +2 -2
  57. package/dist/testing/msw.mjs +1 -1
  58. package/dist/testing/suite.d.mts +6 -6
  59. package/dist/testing/suite.d.ts +6 -6
  60. package/dist/testing/suite.js +23 -23
  61. package/dist/testing/suite.mjs +4 -4
  62. package/dist/testing.d.mts +52 -21
  63. package/dist/testing.d.ts +52 -21
  64. package/dist/testing.js +83 -79
  65. package/dist/testing.mjs +5 -5
  66. package/dist/utils.d.mts +4 -4
  67. package/dist/utils.d.ts +4 -4
  68. package/package.json +1 -1
  69. package/registry/cart-summary.json +1 -1
  70. package/registry/chat-widget.json +1 -1
@@ -1,6 +1,6 @@
1
- export { k as AuthService, C as BusinessService, O as CartOperations, P as CatalogueQueries, ab as CheckoutOperations, ab as CheckoutService, ah as CimplifyElement, ai as CimplifyElements, aL as ELEMENT_TYPES, aM as EVENT_TYPES, aP as ElementEventType, aQ as ElementOptions, aR as ElementType, aZ as ElementsOptions, b5 as FetchQuoteInput, be as FxService, bi as GetProductsOptions, bl as InventoryService, bt as LinkService, bz as LiteService, bG as MESSAGE_TYPES, c6 as OrderQueries, cs as PriceQuote, cy as QuoteBundleSelectionInput, cz as QuoteCompositeSelectionInput, cA as QuoteDynamicBuckets, cB as QuoteStatus, cC as QuoteUiMessage, cE as RefreshQuoteInput, cF as RefreshQuoteResult, d5 as SchedulingService, dL as createElements } from './client-BwRAAk4y.mjs';
2
- import './product-CeV8euw4.mjs';
3
- import './payment-BSzy7sly.mjs';
1
+ export { k as AuthService, C as BusinessService, O as CartOperations, P as CatalogueQueries, ab as CheckoutOperations, ab as CheckoutService, ah as CimplifyElement, ai as CimplifyElements, aL as ELEMENT_TYPES, aM as EVENT_TYPES, aP as ElementEventType, aQ as ElementOptions, aR as ElementType, aZ as ElementsOptions, b5 as FetchQuoteInput, be as FxService, bi as GetProductsOptions, bl as InventoryService, bt as LinkService, bz as LiteService, bG as MESSAGE_TYPES, c6 as OrderQueries, cs as PriceQuote, cy as QuoteBundleSelectionInput, cz as QuoteCompositeSelectionInput, cA as QuoteDynamicBuckets, cB as QuoteStatus, cC as QuoteUiMessage, cE as RefreshQuoteInput, cF as RefreshQuoteResult, d5 as SchedulingService, dL as createElements } from './client-BizGfqB7.mjs';
2
+ import './product-Byf0unSy.mjs';
3
+ import './payment-l0rkieEQ.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, O as CartOperations, P as CatalogueQueries, ab as CheckoutOperations, ab as CheckoutService, ah as CimplifyElement, ai as CimplifyElements, aL as ELEMENT_TYPES, aM as EVENT_TYPES, aP as ElementEventType, aQ as ElementOptions, aR as ElementType, aZ as ElementsOptions, b5 as FetchQuoteInput, be as FxService, bi as GetProductsOptions, bl as InventoryService, bt as LinkService, bz as LiteService, bG as MESSAGE_TYPES, c6 as OrderQueries, cs as PriceQuote, cy as QuoteBundleSelectionInput, cz as QuoteCompositeSelectionInput, cA as QuoteDynamicBuckets, cB as QuoteStatus, cC as QuoteUiMessage, cE as RefreshQuoteInput, cF as RefreshQuoteResult, d5 as SchedulingService, dL as createElements } from './client-CrPglBBz.js';
2
- import './product-CeV8euw4.js';
3
- import './payment-jK8ztICx.js';
1
+ export { k as AuthService, C as BusinessService, O as CartOperations, P as CatalogueQueries, ab as CheckoutOperations, ab as CheckoutService, ah as CimplifyElement, ai as CimplifyElements, aL as ELEMENT_TYPES, aM as EVENT_TYPES, aP as ElementEventType, aQ as ElementOptions, aR as ElementType, aZ as ElementsOptions, b5 as FetchQuoteInput, be as FxService, bi as GetProductsOptions, bl as InventoryService, bt as LinkService, bz as LiteService, bG as MESSAGE_TYPES, c6 as OrderQueries, cs as PriceQuote, cy as QuoteBundleSelectionInput, cz as QuoteCompositeSelectionInput, cA as QuoteDynamicBuckets, cB as QuoteStatus, cC as QuoteUiMessage, cE as RefreshQuoteInput, cF as RefreshQuoteResult, d5 as SchedulingService, dL as createElements } from './client-B40KFazg.js';
2
+ import './product-Byf0unSy.js';
3
+ import './payment-vzNnIi1n.js';
4
4
 
5
5
  declare function generateIdempotencyKey(prefix?: string): string;
6
6
 
package/dist/advanced.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk3HU5I5VG_js = require('./chunk-3HU5I5VG.js');
3
+ var chunkYER7DIOM_js = require('./chunk-YER7DIOM.js');
4
4
  require('./chunk-WMEC5JWN.js');
5
5
  require('./chunk-NIOUSKQQ.js');
6
6
  require('./chunk-OWW5GUSB.js');
@@ -9,77 +9,77 @@ require('./chunk-OWW5GUSB.js');
9
9
 
10
10
  Object.defineProperty(exports, "AuthService", {
11
11
  enumerable: true,
12
- get: function () { return chunk3HU5I5VG_js.AuthService; }
12
+ get: function () { return chunkYER7DIOM_js.AuthService; }
13
13
  });
14
14
  Object.defineProperty(exports, "BusinessService", {
15
15
  enumerable: true,
16
- get: function () { return chunk3HU5I5VG_js.BusinessService; }
16
+ get: function () { return chunkYER7DIOM_js.BusinessService; }
17
17
  });
18
18
  Object.defineProperty(exports, "CartOperations", {
19
19
  enumerable: true,
20
- get: function () { return chunk3HU5I5VG_js.CartOperations; }
20
+ get: function () { return chunkYER7DIOM_js.CartOperations; }
21
21
  });
22
22
  Object.defineProperty(exports, "CatalogueQueries", {
23
23
  enumerable: true,
24
- get: function () { return chunk3HU5I5VG_js.CatalogueQueries; }
24
+ get: function () { return chunkYER7DIOM_js.CatalogueQueries; }
25
25
  });
26
26
  Object.defineProperty(exports, "CheckoutOperations", {
27
27
  enumerable: true,
28
- get: function () { return chunk3HU5I5VG_js.CheckoutService; }
28
+ get: function () { return chunkYER7DIOM_js.CheckoutService; }
29
29
  });
30
30
  Object.defineProperty(exports, "CheckoutService", {
31
31
  enumerable: true,
32
- get: function () { return chunk3HU5I5VG_js.CheckoutService; }
32
+ get: function () { return chunkYER7DIOM_js.CheckoutService; }
33
33
  });
34
34
  Object.defineProperty(exports, "CimplifyElement", {
35
35
  enumerable: true,
36
- get: function () { return chunk3HU5I5VG_js.CimplifyElement; }
36
+ get: function () { return chunkYER7DIOM_js.CimplifyElement; }
37
37
  });
38
38
  Object.defineProperty(exports, "CimplifyElements", {
39
39
  enumerable: true,
40
- get: function () { return chunk3HU5I5VG_js.CimplifyElements; }
40
+ get: function () { return chunkYER7DIOM_js.CimplifyElements; }
41
41
  });
42
42
  Object.defineProperty(exports, "ELEMENT_TYPES", {
43
43
  enumerable: true,
44
- get: function () { return chunk3HU5I5VG_js.ELEMENT_TYPES; }
44
+ get: function () { return chunkYER7DIOM_js.ELEMENT_TYPES; }
45
45
  });
46
46
  Object.defineProperty(exports, "EVENT_TYPES", {
47
47
  enumerable: true,
48
- get: function () { return chunk3HU5I5VG_js.EVENT_TYPES; }
48
+ get: function () { return chunkYER7DIOM_js.EVENT_TYPES; }
49
49
  });
50
50
  Object.defineProperty(exports, "FxService", {
51
51
  enumerable: true,
52
- get: function () { return chunk3HU5I5VG_js.FxService; }
52
+ get: function () { return chunkYER7DIOM_js.FxService; }
53
53
  });
54
54
  Object.defineProperty(exports, "InventoryService", {
55
55
  enumerable: true,
56
- get: function () { return chunk3HU5I5VG_js.InventoryService; }
56
+ get: function () { return chunkYER7DIOM_js.InventoryService; }
57
57
  });
58
58
  Object.defineProperty(exports, "LinkService", {
59
59
  enumerable: true,
60
- get: function () { return chunk3HU5I5VG_js.LinkService; }
60
+ get: function () { return chunkYER7DIOM_js.LinkService; }
61
61
  });
62
62
  Object.defineProperty(exports, "LiteService", {
63
63
  enumerable: true,
64
- get: function () { return chunk3HU5I5VG_js.LiteService; }
64
+ get: function () { return chunkYER7DIOM_js.LiteService; }
65
65
  });
66
66
  Object.defineProperty(exports, "MESSAGE_TYPES", {
67
67
  enumerable: true,
68
- get: function () { return chunk3HU5I5VG_js.MESSAGE_TYPES; }
68
+ get: function () { return chunkYER7DIOM_js.MESSAGE_TYPES; }
69
69
  });
70
70
  Object.defineProperty(exports, "OrderQueries", {
71
71
  enumerable: true,
72
- get: function () { return chunk3HU5I5VG_js.OrderQueries; }
72
+ get: function () { return chunkYER7DIOM_js.OrderQueries; }
73
73
  });
74
74
  Object.defineProperty(exports, "SchedulingService", {
75
75
  enumerable: true,
76
- get: function () { return chunk3HU5I5VG_js.SchedulingService; }
76
+ get: function () { return chunkYER7DIOM_js.SchedulingService; }
77
77
  });
78
78
  Object.defineProperty(exports, "createElements", {
79
79
  enumerable: true,
80
- get: function () { return chunk3HU5I5VG_js.createElements; }
80
+ get: function () { return chunkYER7DIOM_js.createElements; }
81
81
  });
82
82
  Object.defineProperty(exports, "generateIdempotencyKey", {
83
83
  enumerable: true,
84
- get: function () { return chunk3HU5I5VG_js.generateIdempotencyKey; }
84
+ get: function () { return chunkYER7DIOM_js.generateIdempotencyKey; }
85
85
  });
package/dist/advanced.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, OrderQueries, SchedulingService, createElements, generateIdempotencyKey } from './chunk-Z7M6GAHS.mjs';
1
+ export { AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, OrderQueries, SchedulingService, createElements, generateIdempotencyKey } from './chunk-Z3K2D3TE.mjs';
2
2
  import './chunk-DLW3RWRK.mjs';
3
3
  import './chunk-O3YUHLZL.mjs';
4
4
  import './chunk-3G6RQLXK.mjs';
@@ -80,6 +80,11 @@ function getVariantDisplayName(variant, productName) {
80
80
  return productName || (variant.is_default ? "Default" : "Option");
81
81
  }
82
82
 
83
+ // src/utils/tax-display.ts
84
+ function displaysGrossPrices(pricing) {
85
+ return pricing.tax_inclusive || pricing.price_display_mode === "gross_required";
86
+ }
87
+
83
88
  // src/utils/price-basis.ts
84
89
  var MULTI_DAY_UNITS = /* @__PURE__ */ new Set([
85
90
  "days",
@@ -258,6 +263,7 @@ exports.RENDER_HINT = RENDER_HINT;
258
263
  exports.allGalleryImages = allGalleryImages;
259
264
  exports.assetUrl = assetUrl;
260
265
  exports.chatMessageCards = chatMessageCards;
266
+ exports.displaysGrossPrices = displaysGrossPrices;
261
267
  exports.getVariantDisplayName = getVariantDisplayName;
262
268
  exports.isCimplifyAsset = isCimplifyAsset;
263
269
  exports.isMultiDayService = isMultiDayService;
@@ -78,6 +78,11 @@ function getVariantDisplayName(variant, productName) {
78
78
  return productName || (variant.is_default ? "Default" : "Option");
79
79
  }
80
80
 
81
+ // src/utils/tax-display.ts
82
+ function displaysGrossPrices(pricing) {
83
+ return pricing.tax_inclusive || pricing.price_display_mode === "gross_required";
84
+ }
85
+
81
86
  // src/utils/price-basis.ts
82
87
  var MULTI_DAY_UNITS = /* @__PURE__ */ new Set([
83
88
  "days",
@@ -246,4 +251,4 @@ function appendTransform(url, t) {
246
251
  return `${url}${url.includes("?") ? "&" : "?"}${query}`;
247
252
  }
248
253
 
249
- export { BOUNDARY_KIND, CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, allGalleryImages, assetUrl, chatMessageCards, getVariantDisplayName, isCimplifyAsset, isMultiDayService, priceBasisLabel, resolveGallery, serviceBillingMultiplier, stayLength, stayPeriods };
254
+ export { BOUNDARY_KIND, CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, allGalleryImages, assetUrl, chatMessageCards, displaysGrossPrices, getVariantDisplayName, isCimplifyAsset, isMultiDayService, priceBasisLabel, resolveGallery, serviceBillingMultiplier, stayLength, stayPeriods };
@@ -1,5 +1,5 @@
1
- import { createMockApp } from './chunk-RQPXLXB2.mjs';
2
- import { createCimplifyClient } from './chunk-BMFWQNYZ.mjs';
1
+ import { createMockApp } from './chunk-DCMXUKDQ.mjs';
2
+ import { createCimplifyClient } from './chunk-DKLHCZ5M.mjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  var cimplifyRegistry = z.registry();
@@ -471,6 +471,12 @@ var CartItemSchema = registerSchema(
471
471
  }
472
472
  );
473
473
  var assertCartItem = makeAssertion(CartItemSchema, "cartItem");
474
+ var TaxPriceDisplayModeSchema = z.enum([
475
+ "unspecified",
476
+ "gross_required",
477
+ "gross_and_net",
478
+ "net_allowed"
479
+ ]);
474
480
  var CartPricingSchema = registerSchema(
475
481
  z.object({
476
482
  subtotal: MoneySchema,
@@ -482,6 +488,7 @@ var CartPricingSchema = registerSchema(
482
488
  tax_rate: MoneySchema.optional(),
483
489
  service_charge_rate: MoneySchema.optional(),
484
490
  tax_inclusive: z.boolean(),
491
+ price_display_mode: TaxPriceDisplayModeSchema.optional(),
485
492
  deposit_required: z.boolean(),
486
493
  deposit_amount: MoneySchema
487
494
  }),
@@ -697,4 +704,4 @@ var fixtures = {
697
704
  }
698
705
  };
699
706
 
700
- export { AddItemPayloadSchema, AddOnDetailsSchema, AddOnGroupDetailsSchema, AddOnInDetailsSchema, AddOnOptionDetailsSchema, AuthorizationTypeSchema, BrandContactSchema, BrandFaqSchema, BrandHeroSchema, BrandNavLinkSchema, BrandPolicyPageSchema, BrandPolicySectionSchema, BrandSchema, BrandSocialSchema, BundleResolvedSchema, BundleSelectionInputSchema, CartItemSchema, CartPricingSchema, CartSchema, CheckoutBodySchema, CheckoutCustomerSchema, CheckoutResponseSchema, ChosenPriceSchema, CompositeResolvedSchema, CompositeSelectionInputSchema, CountryCodeSchema, CurrencyCodeSchema, CustomerInputValueSchema, DiscountDetailsSchema, IsoDateTimeSchema, LineTypeSchema, LocaleSchema, MoneyLooseSchema, MoneySchema, NextActionSchema, PhoneE164Schema, ProductTypeSchema, SchemaViolationError, SeedNameSchema, SelectedAddOnOptionSchema, ServiceStatusSchema, TimestampSchema, VariantDetailsSchema, VariantDisplayAttributeSchema, VariantInfoSchema, assertAddItemPayload, assertBrand, assertCart, assertCartItem, assertCheckoutBody, assertCheckoutResponse, cimplifyRegistry, createTestClient, fixtures, makeAssertion, registerSchema };
707
+ export { AddItemPayloadSchema, AddOnDetailsSchema, AddOnGroupDetailsSchema, AddOnInDetailsSchema, AddOnOptionDetailsSchema, AuthorizationTypeSchema, BrandContactSchema, BrandFaqSchema, BrandHeroSchema, BrandNavLinkSchema, BrandPolicyPageSchema, BrandPolicySectionSchema, BrandSchema, BrandSocialSchema, BundleResolvedSchema, BundleSelectionInputSchema, CartItemSchema, CartPricingSchema, CartSchema, CheckoutBodySchema, CheckoutCustomerSchema, CheckoutResponseSchema, ChosenPriceSchema, CompositeResolvedSchema, CompositeSelectionInputSchema, CountryCodeSchema, CurrencyCodeSchema, CustomerInputValueSchema, DiscountDetailsSchema, IsoDateTimeSchema, LineTypeSchema, LocaleSchema, MoneyLooseSchema, MoneySchema, NextActionSchema, PhoneE164Schema, ProductTypeSchema, SchemaViolationError, SeedNameSchema, SelectedAddOnOptionSchema, ServiceStatusSchema, TaxPriceDisplayModeSchema, TimestampSchema, VariantDetailsSchema, VariantDisplayAttributeSchema, VariantInfoSchema, assertAddItemPayload, assertBrand, assertCart, assertCartItem, assertCheckoutBody, assertCheckoutResponse, cimplifyRegistry, createTestClient, fixtures, makeAssertion, registerSchema };
@@ -2306,6 +2306,10 @@ function buildV1(deps) {
2306
2306
  app.delete("/cart/items/:cart_item_id", (c) => tryRoute(c, () => deps.cart.removeItem(c.var.session, c.req.param("cart_item_id"))));
2307
2307
  app.get("/cart/count", (c) => tryRoute(c, () => deps.cart.getCount(c.var.session)));
2308
2308
  app.get("/cart/total", (c) => tryRoute(c, () => deps.cart.getTotal(c.var.session)));
2309
+ app.post("/cart/destination-quote", async (c) => {
2310
+ const body = await c.req.json();
2311
+ return tryRoute(c, () => deps.cart.quoteDestination(c.var.session, body));
2312
+ });
2309
2313
  app.post("/cart/coupons", async (c) => {
2310
2314
  const body = await c.req.json().catch(() => ({}));
2311
2315
  return tryRoute(c, () => deps.cart.applyCoupon(c.var.session, body.coupon_code ?? ""));
@@ -4655,6 +4659,7 @@ function toUICart(registry, cart) {
4655
4659
  tax_rate: cart.tax_rate,
4656
4660
  service_charge_rate: cart.service_charge_rate,
4657
4661
  tax_inclusive: false,
4662
+ price_display_mode: "unspecified",
4658
4663
  deposit_required: false,
4659
4664
  deposit_amount: "0.00"
4660
4665
  },
@@ -4794,6 +4799,31 @@ function createCartService(opts) {
4794
4799
  getTotal(session) {
4795
4800
  return findOrCreate(session).total_price;
4796
4801
  },
4802
+ quoteDestination(session, body) {
4803
+ const cart = findOrCreate(session);
4804
+ const city = body.address_info.city?.trim();
4805
+ const region = body.address_info.region?.trim();
4806
+ const label = city && region ? `${city}, ${region}` : city ?? region ?? "";
4807
+ const deliveryFee = body.order_type === "delivery" ? "5.00" : "0.00";
4808
+ const total = (Number(cart.total_price) + Number(deliveryFee)).toFixed(2);
4809
+ return {
4810
+ subtotal: cart.subtotal,
4811
+ tax_amount: cart.tax_amount,
4812
+ service_charge: cart.service_charge,
4813
+ total_discounts: cart.total_discounts,
4814
+ delivery_fee: deliveryFee,
4815
+ statutory_charge_total: "0.00",
4816
+ statutory_charges: [],
4817
+ total,
4818
+ currency: cart.currency,
4819
+ tax_jurisdiction_label: label,
4820
+ tax_inclusive: false,
4821
+ tax_rate: cart.tax_rate,
4822
+ price_display_mode: "unspecified",
4823
+ delivery_fee_details: null,
4824
+ address_info: body.address_info
4825
+ };
4826
+ },
4797
4827
  toUICart(cart) {
4798
4828
  return toUICart(registry, cart);
4799
4829
  },
@@ -1,4 +1,4 @@
1
- import { safe, generateIdempotencyKey, err, ok, CatalogueQueries, CartOperations, CheckoutService, OrderQueries, LinkService, AuthService, BusinessService, InventoryService, SchedulingService, LiteService, FxService, createElements } from './chunk-Z7M6GAHS.mjs';
1
+ import { safe, generateIdempotencyKey, err, ok, CatalogueQueries, CartOperations, CheckoutService, OrderQueries, LinkService, AuthService, BusinessService, InventoryService, SchedulingService, LiteService, FxService, createElements } from './chunk-Z3K2D3TE.mjs';
2
2
  import { CimplifyError, ErrorCode, IdempotencyMismatchError, enrichError } from './chunk-O3YUHLZL.mjs';
3
3
 
4
4
  // src/store-credit.ts
@@ -970,6 +970,9 @@ var CimplifyClient = class {
970
970
  getSessionEpoch() {
971
971
  return this.sessionEpoch;
972
972
  }
973
+ getSessionToken() {
974
+ return this.sessionToken;
975
+ }
973
976
  publishSessionClaimed(customerName) {
974
977
  if (!this.sessionToken) return;
975
978
  this.broadcastSessionSync({
@@ -2308,6 +2308,10 @@ function buildV1(deps) {
2308
2308
  app.delete("/cart/items/:cart_item_id", (c) => tryRoute(c, () => deps.cart.removeItem(c.var.session, c.req.param("cart_item_id"))));
2309
2309
  app.get("/cart/count", (c) => tryRoute(c, () => deps.cart.getCount(c.var.session)));
2310
2310
  app.get("/cart/total", (c) => tryRoute(c, () => deps.cart.getTotal(c.var.session)));
2311
+ app.post("/cart/destination-quote", async (c) => {
2312
+ const body = await c.req.json();
2313
+ return tryRoute(c, () => deps.cart.quoteDestination(c.var.session, body));
2314
+ });
2311
2315
  app.post("/cart/coupons", async (c) => {
2312
2316
  const body = await c.req.json().catch(() => ({}));
2313
2317
  return tryRoute(c, () => deps.cart.applyCoupon(c.var.session, body.coupon_code ?? ""));
@@ -4657,6 +4661,7 @@ function toUICart(registry, cart) {
4657
4661
  tax_rate: cart.tax_rate,
4658
4662
  service_charge_rate: cart.service_charge_rate,
4659
4663
  tax_inclusive: false,
4664
+ price_display_mode: "unspecified",
4660
4665
  deposit_required: false,
4661
4666
  deposit_amount: "0.00"
4662
4667
  },
@@ -4796,6 +4801,31 @@ function createCartService(opts) {
4796
4801
  getTotal(session) {
4797
4802
  return findOrCreate(session).total_price;
4798
4803
  },
4804
+ quoteDestination(session, body) {
4805
+ const cart = findOrCreate(session);
4806
+ const city = body.address_info.city?.trim();
4807
+ const region = body.address_info.region?.trim();
4808
+ const label = city && region ? `${city}, ${region}` : city ?? region ?? "";
4809
+ const deliveryFee = body.order_type === "delivery" ? "5.00" : "0.00";
4810
+ const total = (Number(cart.total_price) + Number(deliveryFee)).toFixed(2);
4811
+ return {
4812
+ subtotal: cart.subtotal,
4813
+ tax_amount: cart.tax_amount,
4814
+ service_charge: cart.service_charge,
4815
+ total_discounts: cart.total_discounts,
4816
+ delivery_fee: deliveryFee,
4817
+ statutory_charge_total: "0.00",
4818
+ statutory_charges: [],
4819
+ total,
4820
+ currency: cart.currency,
4821
+ tax_jurisdiction_label: label,
4822
+ tax_inclusive: false,
4823
+ tax_rate: cart.tax_rate,
4824
+ price_display_mode: "unspecified",
4825
+ delivery_fee_details: null,
4826
+ address_info: body.address_info
4827
+ };
4828
+ },
4799
4829
  toUICart(cart) {
4800
4830
  return toUICart(registry, cart);
4801
4831
  },
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkPNTINRAU_js = require('./chunk-PNTINRAU.js');
4
- var chunkD3FWJB7Y_js = require('./chunk-D3FWJB7Y.js');
3
+ var chunkEAZGA7LD_js = require('./chunk-EAZGA7LD.js');
4
+ var chunkYDA46OZ6_js = require('./chunk-YDA46OZ6.js');
5
5
  var zod = require('zod');
6
6
 
7
7
  var cimplifyRegistry = zod.z.registry();
@@ -473,6 +473,12 @@ var CartItemSchema = registerSchema(
473
473
  }
474
474
  );
475
475
  var assertCartItem = makeAssertion(CartItemSchema, "cartItem");
476
+ var TaxPriceDisplayModeSchema = zod.z.enum([
477
+ "unspecified",
478
+ "gross_required",
479
+ "gross_and_net",
480
+ "net_allowed"
481
+ ]);
476
482
  var CartPricingSchema = registerSchema(
477
483
  zod.z.object({
478
484
  subtotal: MoneySchema,
@@ -484,6 +490,7 @@ var CartPricingSchema = registerSchema(
484
490
  tax_rate: MoneySchema.optional(),
485
491
  service_charge_rate: MoneySchema.optional(),
486
492
  tax_inclusive: zod.z.boolean(),
493
+ price_display_mode: TaxPriceDisplayModeSchema.optional(),
487
494
  deposit_required: zod.z.boolean(),
488
495
  deposit_amount: MoneySchema
489
496
  }),
@@ -600,7 +607,7 @@ async function toForwardedRequest(input, init) {
600
607
  };
601
608
  }
602
609
  function createTestClient(options = {}) {
603
- const mock = chunkPNTINRAU_js.createMockApp(options);
610
+ const mock = chunkEAZGA7LD_js.createMockApp(options);
604
611
  let sessionToken;
605
612
  const fetchImpl = async (input, init) => {
606
613
  const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
@@ -619,7 +626,7 @@ function createTestClient(options = {}) {
619
626
  if (echoed) sessionToken = echoed;
620
627
  return res;
621
628
  };
622
- const client = chunkD3FWJB7Y_js.createCimplifyClient({
629
+ const client = chunkYDA46OZ6_js.createCimplifyClient({
623
630
  baseUrl: TEST_BASE_URL,
624
631
  // Link mock lives at /v1/link on the same Hono app, so point the SDK's
625
632
  // separate Link transport at the same TEST_BASE_URL.
@@ -740,6 +747,7 @@ exports.SchemaViolationError = SchemaViolationError;
740
747
  exports.SeedNameSchema = SeedNameSchema;
741
748
  exports.SelectedAddOnOptionSchema = SelectedAddOnOptionSchema;
742
749
  exports.ServiceStatusSchema = ServiceStatusSchema;
750
+ exports.TaxPriceDisplayModeSchema = TaxPriceDisplayModeSchema;
743
751
  exports.TimestampSchema = TimestampSchema;
744
752
  exports.VariantDetailsSchema = VariantDetailsSchema;
745
753
  exports.VariantDisplayAttributeSchema = VariantDisplayAttributeSchema;