@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
package/dist/mock/msw.js CHANGED
@@ -2376,6 +2376,10 @@ function buildV1(deps) {
2376
2376
  app.delete("/cart/items/:cart_item_id", (c) => tryRoute(c, () => deps.cart.removeItem(c.var.session, c.req.param("cart_item_id"))));
2377
2377
  app.get("/cart/count", (c) => tryRoute(c, () => deps.cart.getCount(c.var.session)));
2378
2378
  app.get("/cart/total", (c) => tryRoute(c, () => deps.cart.getTotal(c.var.session)));
2379
+ app.post("/cart/destination-quote", async (c) => {
2380
+ const body = await c.req.json();
2381
+ return tryRoute(c, () => deps.cart.quoteDestination(c.var.session, body));
2382
+ });
2379
2383
  app.post("/cart/coupons", async (c) => {
2380
2384
  const body = await c.req.json().catch(() => ({}));
2381
2385
  return tryRoute(c, () => deps.cart.applyCoupon(c.var.session, body.coupon_code ?? ""));
@@ -4725,6 +4729,7 @@ function toUICart(registry, cart) {
4725
4729
  tax_rate: cart.tax_rate,
4726
4730
  service_charge_rate: cart.service_charge_rate,
4727
4731
  tax_inclusive: false,
4732
+ price_display_mode: "unspecified",
4728
4733
  deposit_required: false,
4729
4734
  deposit_amount: "0.00"
4730
4735
  },
@@ -4864,6 +4869,31 @@ function createCartService(opts) {
4864
4869
  getTotal(session) {
4865
4870
  return findOrCreate(session).total_price;
4866
4871
  },
4872
+ quoteDestination(session, body) {
4873
+ const cart = findOrCreate(session);
4874
+ const city = body.address_info.city?.trim();
4875
+ const region = body.address_info.region?.trim();
4876
+ const label = city && region ? `${city}, ${region}` : city ?? region ?? "";
4877
+ const deliveryFee = body.order_type === "delivery" ? "5.00" : "0.00";
4878
+ const total = (Number(cart.total_price) + Number(deliveryFee)).toFixed(2);
4879
+ return {
4880
+ subtotal: cart.subtotal,
4881
+ tax_amount: cart.tax_amount,
4882
+ service_charge: cart.service_charge,
4883
+ total_discounts: cart.total_discounts,
4884
+ delivery_fee: deliveryFee,
4885
+ statutory_charge_total: "0.00",
4886
+ statutory_charges: [],
4887
+ total,
4888
+ currency: cart.currency,
4889
+ tax_jurisdiction_label: label,
4890
+ tax_inclusive: false,
4891
+ tax_rate: cart.tax_rate,
4892
+ price_display_mode: "unspecified",
4893
+ delivery_fee_details: null,
4894
+ address_info: body.address_info
4895
+ };
4896
+ },
4867
4897
  toUICart(cart) {
4868
4898
  return toUICart(registry, cart);
4869
4899
  },
package/dist/mock/msw.mjs CHANGED
@@ -2374,6 +2374,10 @@ function buildV1(deps) {
2374
2374
  app.delete("/cart/items/:cart_item_id", (c) => tryRoute(c, () => deps.cart.removeItem(c.var.session, c.req.param("cart_item_id"))));
2375
2375
  app.get("/cart/count", (c) => tryRoute(c, () => deps.cart.getCount(c.var.session)));
2376
2376
  app.get("/cart/total", (c) => tryRoute(c, () => deps.cart.getTotal(c.var.session)));
2377
+ app.post("/cart/destination-quote", async (c) => {
2378
+ const body = await c.req.json();
2379
+ return tryRoute(c, () => deps.cart.quoteDestination(c.var.session, body));
2380
+ });
2377
2381
  app.post("/cart/coupons", async (c) => {
2378
2382
  const body = await c.req.json().catch(() => ({}));
2379
2383
  return tryRoute(c, () => deps.cart.applyCoupon(c.var.session, body.coupon_code ?? ""));
@@ -4723,6 +4727,7 @@ function toUICart(registry, cart) {
4723
4727
  tax_rate: cart.tax_rate,
4724
4728
  service_charge_rate: cart.service_charge_rate,
4725
4729
  tax_inclusive: false,
4730
+ price_display_mode: "unspecified",
4726
4731
  deposit_required: false,
4727
4732
  deposit_amount: "0.00"
4728
4733
  },
@@ -4862,6 +4867,31 @@ function createCartService(opts) {
4862
4867
  getTotal(session) {
4863
4868
  return findOrCreate(session).total_price;
4864
4869
  },
4870
+ quoteDestination(session, body) {
4871
+ const cart = findOrCreate(session);
4872
+ const city = body.address_info.city?.trim();
4873
+ const region = body.address_info.region?.trim();
4874
+ const label = city && region ? `${city}, ${region}` : city ?? region ?? "";
4875
+ const deliveryFee = body.order_type === "delivery" ? "5.00" : "0.00";
4876
+ const total = (Number(cart.total_price) + Number(deliveryFee)).toFixed(2);
4877
+ return {
4878
+ subtotal: cart.subtotal,
4879
+ tax_amount: cart.tax_amount,
4880
+ service_charge: cart.service_charge,
4881
+ total_discounts: cart.total_discounts,
4882
+ delivery_fee: deliveryFee,
4883
+ statutory_charge_total: "0.00",
4884
+ statutory_charges: [],
4885
+ total,
4886
+ currency: cart.currency,
4887
+ tax_jurisdiction_label: label,
4888
+ tax_inclusive: false,
4889
+ tax_rate: cart.tax_rate,
4890
+ price_display_mode: "unspecified",
4891
+ delivery_fee_details: null,
4892
+ address_info: body.address_info
4893
+ };
4894
+ },
4865
4895
  toUICart(cart) {
4866
4896
  return toUICart(registry, cart);
4867
4897
  },
@@ -1,4 +1,4 @@
1
- import { aO as Money, ad as CurrencyCode } from './product-CeV8euw4.mjs';
1
+ import { aR as Money, ad as CurrencyCode } from './product-Byf0unSy.mjs';
2
2
 
3
3
  type PaymentStatus = "initialized" | "pending" | "processing" | "authorized" | "captured" | "not_required" | "failed" | "cancelled" | "refunded" | "unknown" | "voided" | "requires_action" | "abandoned" | "reversed" | "disputed" | "refund_pending";
4
4
  type PaymentProvider = "stripe" | "paystack" | "cellulant" | "mtn_momo" | "offline" | "mtn" | "vodafone" | "airtel" | "cash" | "manual";
@@ -1,4 +1,4 @@
1
- import { aO as Money, ad as CurrencyCode } from './product-CeV8euw4.js';
1
+ import { aR as Money, ad as CurrencyCode } from './product-Byf0unSy.js';
2
2
 
3
3
  type PaymentStatus = "initialized" | "pending" | "processing" | "authorized" | "captured" | "not_required" | "failed" | "cancelled" | "refunded" | "unknown" | "voided" | "requires_action" | "abandoned" | "reversed" | "disputed" | "refund_pending";
4
4
  type PaymentProvider = "stripe" | "paystack" | "cellulant" | "mtn_momo" | "offline" | "mtn" | "vodafone" | "airtel" | "cash" | "manual";
@@ -1,4 +1,4 @@
1
- import { ad as CurrencyCode, U as ChosenPrice, bi as SaleInfo, bD as UpcomingSale } from './product-CeV8euw4.js';
1
+ import { ad as CurrencyCode, U as ChosenPrice, bl as SaleInfo, bH as UpcomingSale } from './product-Byf0unSy.js';
2
2
 
3
3
  interface ProductWithPrice {
4
4
  price_info?: ChosenPrice;
@@ -1,4 +1,4 @@
1
- import { ad as CurrencyCode, U as ChosenPrice, bi as SaleInfo, bD as UpcomingSale } from './product-CeV8euw4.mjs';
1
+ import { ad as CurrencyCode, U as ChosenPrice, bl as SaleInfo, bH as UpcomingSale } from './product-Byf0unSy.mjs';
2
2
 
3
3
  interface ProductWithPrice {
4
4
  price_info?: ChosenPrice;