@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/server.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import { af as CimplifyClient } from './client-BwRAAk4y.mjs';
2
- export { J as CacheOptions, cD as ReadRequestOptions, c_ as Result } from './client-BwRAAk4y.mjs';
3
- export { S as Category, V as CimplifyError, W as Collection, aZ as Product, bb as ProductWithDetails } from './product-CeV8euw4.mjs';
1
+ import { af as CimplifyClient } from './client-BizGfqB7.mjs';
2
+ export { J as CacheOptions, cD as ReadRequestOptions, c_ as Result } from './client-BizGfqB7.mjs';
3
+ export { S as Category, V as CimplifyError, W as Collection, b0 as Product, be as ProductWithDetails } from './product-Byf0unSy.mjs';
4
4
  import { JWTVerifyResult } from 'jose';
5
- import './payment-BSzy7sly.mjs';
5
+ import './payment-l0rkieEQ.mjs';
6
6
 
7
7
  interface ServerClientOptions {
8
8
  /**
package/dist/server.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { af as CimplifyClient } from './client-CrPglBBz.js';
2
- export { J as CacheOptions, cD as ReadRequestOptions, c_ as Result } from './client-CrPglBBz.js';
3
- export { S as Category, V as CimplifyError, W as Collection, aZ as Product, bb as ProductWithDetails } from './product-CeV8euw4.js';
1
+ import { af as CimplifyClient } from './client-B40KFazg.js';
2
+ export { J as CacheOptions, cD as ReadRequestOptions, c_ as Result } from './client-B40KFazg.js';
3
+ export { S as Category, V as CimplifyError, W as Collection, b0 as Product, be as ProductWithDetails } from './product-Byf0unSy.js';
4
4
  import { JWTVerifyResult } from 'jose';
5
- import './payment-jK8ztICx.js';
5
+ import './payment-vzNnIi1n.js';
6
6
 
7
7
  interface ServerClientOptions {
8
8
  /**
package/dist/server.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkD3FWJB7Y_js = require('./chunk-D3FWJB7Y.js');
4
- var chunk3HU5I5VG_js = require('./chunk-3HU5I5VG.js');
3
+ var chunkYDA46OZ6_js = require('./chunk-YDA46OZ6.js');
4
+ var chunkYER7DIOM_js = require('./chunk-YER7DIOM.js');
5
5
  require('./chunk-WMEC5JWN.js');
6
6
  var chunkNIOUSKQQ_js = require('./chunk-NIOUSKQQ.js');
7
7
  require('./chunk-OWW5GUSB.js');
@@ -26,7 +26,7 @@ function readEnv(...keys) {
26
26
  var getServerClient = react.cache((opts = {}) => {
27
27
  const baseUrl = opts.apiUrl ?? readEnv("CIMPLIFY_API_URL", "NEXT_PUBLIC_CIMPLIFY_API_URL") ?? defaultBaseUrl();
28
28
  const publicKey = opts.secretKey ?? readEnv("CIMPLIFY_SECRET_KEY", "NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY") ?? "mock-dev";
29
- const client = chunkD3FWJB7Y_js.createCimplifyClient({
29
+ const client = chunkYDA46OZ6_js.createCimplifyClient({
30
30
  baseUrl,
31
31
  publicKey,
32
32
  suppressPublicKeyWarning: true
@@ -250,7 +250,7 @@ var QUERY_AUTH_ERROR = "cimplify_auth_error";
250
250
  var discoveryCache = /* @__PURE__ */ new Map();
251
251
  var jwksCache = /* @__PURE__ */ new Map();
252
252
  function issuerBase(cfg) {
253
- return (cfg.issuer ?? cfg.authUrl ?? chunk3HU5I5VG_js.DEFAULT_ISSUER).replace(/\/$/, "");
253
+ return (cfg.issuer ?? cfg.authUrl ?? chunkYER7DIOM_js.DEFAULT_ISSUER).replace(/\/$/, "");
254
254
  }
255
255
  function cookieName(cfg) {
256
256
  return cfg.cookieName ?? SESSION_COOKIE;
@@ -465,12 +465,12 @@ async function handleOidcCallback(req, opts) {
465
465
  }
466
466
  function readPkceCookie(cookieHeader) {
467
467
  if (!cookieHeader) return null;
468
- const match = cookieHeader.split(/;\s*/).find((p) => p.startsWith(`${chunk3HU5I5VG_js.PKCE_COOKIE}=`));
468
+ const match = cookieHeader.split(/;\s*/).find((p) => p.startsWith(`${chunkYER7DIOM_js.PKCE_COOKIE}=`));
469
469
  if (!match) return null;
470
- return chunk3HU5I5VG_js.decodePkceState(match.slice(chunk3HU5I5VG_js.PKCE_COOKIE.length + 1));
470
+ return chunkYER7DIOM_js.decodePkceState(match.slice(chunkYER7DIOM_js.PKCE_COOKIE.length + 1));
471
471
  }
472
472
  function buildPkceClearCookie() {
473
- return `${chunk3HU5I5VG_js.PKCE_COOKIE}=; Path=${chunk3HU5I5VG_js.PKCE_COOKIE_PATH}; Max-Age=0; Secure; SameSite=Lax`;
473
+ return `${chunkYER7DIOM_js.PKCE_COOKIE}=; Path=${chunkYER7DIOM_js.PKCE_COOKIE_PATH}; Max-Age=0; Secure; SameSite=Lax`;
474
474
  }
475
475
  function safeReturnPath(returnTo, fallback) {
476
476
  if (returnTo && returnTo.startsWith("/") && !returnTo.startsWith("//")) return returnTo;
package/dist/server.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { createCimplifyClient } from './chunk-BMFWQNYZ.mjs';
2
- import { PKCE_COOKIE, decodePkceState, PKCE_COOKIE_PATH, DEFAULT_ISSUER } from './chunk-Z7M6GAHS.mjs';
1
+ import { createCimplifyClient } from './chunk-DKLHCZ5M.mjs';
2
+ import { PKCE_COOKIE, decodePkceState, PKCE_COOKIE_PATH, DEFAULT_ISSUER } from './chunk-Z3K2D3TE.mjs';
3
3
  import './chunk-DLW3RWRK.mjs';
4
4
  export { CimplifyError } from './chunk-O3YUHLZL.mjs';
5
5
  import './chunk-3G6RQLXK.mjs';
@@ -1,6 +1,6 @@
1
- import { A as AppHandle, C as CreateAppOptions } from '../server-DRAW2OOX.mjs';
1
+ import { A as AppHandle, C as CreateAppOptions } from '../server-DqbZh8Bk.mjs';
2
2
  import 'hono';
3
- import '../product-CeV8euw4.mjs';
3
+ import '../product-Byf0unSy.mjs';
4
4
 
5
5
  interface MswHandlerSetup {
6
6
  handlers: unknown[];
@@ -1,6 +1,6 @@
1
- import { A as AppHandle, C as CreateAppOptions } from '../server-zyrpzJVn.js';
1
+ import { A as AppHandle, C as CreateAppOptions } from '../server-Cj40R2ZD.js';
2
2
  import 'hono';
3
- import '../product-CeV8euw4.js';
3
+ import '../product-Byf0unSy.js';
4
4
 
5
5
  interface MswHandlerSetup {
6
6
  handlers: unknown[];
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkPNTINRAU_js = require('../chunk-PNTINRAU.js');
3
+ var chunkEAZGA7LD_js = require('../chunk-EAZGA7LD.js');
4
4
  require('../chunk-XREIZ56K.js');
5
5
  require('../chunk-NIOUSKQQ.js');
6
6
  require('../chunk-OWW5GUSB.js');
@@ -8,7 +8,7 @@ require('../chunk-OWW5GUSB.js');
8
8
  // src/mock/msw.ts
9
9
  async function createMswHandlers(options = {}) {
10
10
  const baseUrl = options.baseUrl ?? "http://localhost:8787";
11
- const handle = chunkPNTINRAU_js.createMockApp(options);
11
+ const handle = chunkEAZGA7LD_js.createMockApp(options);
12
12
  const msw = await import('msw').catch(() => {
13
13
  throw new Error("msw is required to use @cimplify/sdk/mock/msw \u2014 install it as a peer dependency");
14
14
  });
@@ -1,4 +1,4 @@
1
- import { createMockApp } from '../chunk-RQPXLXB2.mjs';
1
+ import { createMockApp } from '../chunk-DCMXUKDQ.mjs';
2
2
  import '../chunk-U4MW6PYU.mjs';
3
3
  import '../chunk-O3YUHLZL.mjs';
4
4
  import '../chunk-3G6RQLXK.mjs';
@@ -1,10 +1,10 @@
1
1
  import { TestAPI } from 'vitest';
2
- import { T as TestClientHandle } from '../client-DGrvLiJv.mjs';
3
- import { C as CreateAppOptions } from '../server-DRAW2OOX.mjs';
4
- export { S as SeedName } from '../server-DRAW2OOX.mjs';
5
- import '../client-BwRAAk4y.mjs';
6
- import '../product-CeV8euw4.mjs';
7
- import '../payment-BSzy7sly.mjs';
2
+ import { T as TestClientHandle } from '../client-BdErclfU.mjs';
3
+ import { C as CreateAppOptions } from '../server-DqbZh8Bk.mjs';
4
+ export { S as SeedName } from '../server-DqbZh8Bk.mjs';
5
+ import '../client-BizGfqB7.mjs';
6
+ import '../product-Byf0unSy.mjs';
7
+ import '../payment-l0rkieEQ.mjs';
8
8
  import 'hono';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  import { TestAPI } from 'vitest';
2
- import { T as TestClientHandle } from '../client-CPcZIrjC.js';
3
- import { C as CreateAppOptions } from '../server-zyrpzJVn.js';
4
- export { S as SeedName } from '../server-zyrpzJVn.js';
5
- import '../client-CrPglBBz.js';
6
- import '../product-CeV8euw4.js';
7
- import '../payment-jK8ztICx.js';
2
+ import { T as TestClientHandle } from '../client-nsiMwuC1.js';
3
+ import { C as CreateAppOptions } from '../server-Cj40R2ZD.js';
4
+ export { S as SeedName } from '../server-Cj40R2ZD.js';
5
+ import '../client-B40KFazg.js';
6
+ import '../product-Byf0unSy.js';
7
+ import '../payment-vzNnIi1n.js';
8
8
  import 'hono';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkBSZJSR62_js = require('../chunk-BSZJSR62.js');
4
- require('../chunk-PNTINRAU.js');
3
+ var chunkLOWSMGRT_js = require('../chunk-LOWSMGRT.js');
4
+ require('../chunk-EAZGA7LD.js');
5
5
  require('../chunk-XREIZ56K.js');
6
- require('../chunk-D3FWJB7Y.js');
7
- require('../chunk-3HU5I5VG.js');
6
+ require('../chunk-YDA46OZ6.js');
7
+ require('../chunk-YER7DIOM.js');
8
8
  require('../chunk-WMEC5JWN.js');
9
9
  require('../chunk-NIOUSKQQ.js');
10
10
  require('../chunk-OWW5GUSB.js');
@@ -21,11 +21,11 @@ var PLACEHOLDER_PHRASES = [
21
21
  function createBrandSuite(opts) {
22
22
  vitest.describe(opts.label ?? "brand schema", () => {
23
23
  vitest.it("conforms to the Cimplify brand contract", () => {
24
- vitest.expect(() => chunkBSZJSR62_js.assertBrand(opts.brand)).not.toThrow();
24
+ vitest.expect(() => chunkLOWSMGRT_js.assertBrand(opts.brand)).not.toThrow();
25
25
  });
26
26
  vitest.it("declares a known mock seed", () => {
27
27
  const b = opts.brand;
28
- vitest.expect(chunkBSZJSR62_js.SeedNameSchema.safeParse(b.mock?.seed).success).toBe(true);
28
+ vitest.expect(chunkLOWSMGRT_js.SeedNameSchema.safeParse(b.mock?.seed).success).toBe(true);
29
29
  });
30
30
  vitest.it("has no placeholder copy left in", () => {
31
31
  const offenders = [];
@@ -57,7 +57,7 @@ ${msg}`);
57
57
  vitest.expect(b.mock?.businessId).toMatch(/^bus_/);
58
58
  });
59
59
  vitest.it("zod-parses cleanly", () => {
60
- const result = chunkBSZJSR62_js.BrandSchema.safeParse(opts.brand);
60
+ const result = chunkLOWSMGRT_js.BrandSchema.safeParse(opts.brand);
61
61
  if (!result.success) {
62
62
  throw new Error(
63
63
  "Brand schema violations:\n" + result.error.issues.map((i) => ` \u2022 brand.${i.path.join(".")}: ${i.message}`).join("\n")
@@ -72,23 +72,23 @@ function createCartFlowSuite(opts = {}) {
72
72
  vitest.describe(opts.label ?? "cart flow against in-process mock", () => {
73
73
  let h;
74
74
  vitest.beforeEach(() => {
75
- h = chunkBSZJSR62_js.createTestClient(opts);
75
+ h = chunkLOWSMGRT_js.createTestClient(opts);
76
76
  });
77
77
  vitest.afterEach(() => h.dispose());
78
78
  vitest.it("starts with an empty cart matching the canonical shape", async () => {
79
79
  const res = await h.client.cart.get();
80
80
  vitest.expect(res.ok).toBe(true);
81
81
  if (!res.ok) return;
82
- vitest.expect(() => chunkBSZJSR62_js.assertCart(res.value)).not.toThrow();
82
+ vitest.expect(() => chunkLOWSMGRT_js.assertCart(res.value)).not.toThrow();
83
83
  vitest.expect(res.value.items).toHaveLength(0);
84
84
  });
85
85
  vitest.it("adds the first product, persists it, and returns a shape-valid cart", async () => {
86
- const { product, variantId } = await chunkBSZJSR62_js.fixtures.addFirstProduct(h.client);
86
+ const { product, variantId } = await chunkLOWSMGRT_js.fixtures.addFirstProduct(h.client);
87
87
  vitest.expect(product.id).toBeTruthy();
88
88
  const get = await h.client.cart.get();
89
89
  vitest.expect(get.ok).toBe(true);
90
90
  if (!get.ok) return;
91
- vitest.expect(() => chunkBSZJSR62_js.assertCart(get.value)).not.toThrow();
91
+ vitest.expect(() => chunkLOWSMGRT_js.assertCart(get.value)).not.toThrow();
92
92
  vitest.expect(get.value.items).toHaveLength(1);
93
93
  vitest.expect(get.value.items[0]?.item_id).toBe(product.id);
94
94
  if (variantId) {
@@ -99,8 +99,8 @@ function createCartFlowSuite(opts = {}) {
99
99
  vitest.expect(parseFloat(String(get.value.pricing.subtotal))).toBeGreaterThan(0);
100
100
  });
101
101
  vitest.it("dedupes by line_key when adding the same product twice", async () => {
102
- await chunkBSZJSR62_js.fixtures.addFirstProduct(h.client);
103
- await chunkBSZJSR62_js.fixtures.addFirstProduct(h.client);
102
+ await chunkLOWSMGRT_js.fixtures.addFirstProduct(h.client);
103
+ await chunkLOWSMGRT_js.fixtures.addFirstProduct(h.client);
104
104
  const res = await h.client.cart.get();
105
105
  vitest.expect(res.ok).toBe(true);
106
106
  if (!res.ok) return;
@@ -108,7 +108,7 @@ function createCartFlowSuite(opts = {}) {
108
108
  vitest.expect(res.value.items[0]?.quantity).toBe(2);
109
109
  });
110
110
  vitest.it("removes items and zeroes the subtotal", async () => {
111
- await chunkBSZJSR62_js.fixtures.addFirstProduct(h.client);
111
+ await chunkLOWSMGRT_js.fixtures.addFirstProduct(h.client);
112
112
  const before = await h.client.cart.get();
113
113
  if (!before.ok) throw before.error;
114
114
  const itemId = before.value.items[0]?.id;
@@ -134,28 +134,28 @@ function createContractSuite(opts = {}) {
134
134
  vitest.describe(opts.label ?? "SDK \u2194 mock contract", () => {
135
135
  let h;
136
136
  vitest.beforeEach(() => {
137
- h = chunkBSZJSR62_js.createTestClient(opts);
137
+ h = chunkLOWSMGRT_js.createTestClient(opts);
138
138
  });
139
139
  vitest.afterEach(() => h.dispose());
140
140
  vitest.it("AddItemPayload schema accepts a minimal valid body", () => {
141
- const result = chunkBSZJSR62_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: 1 });
141
+ const result = chunkLOWSMGRT_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: 1 });
142
142
  vitest.expect(result.success).toBe(true);
143
143
  });
144
144
  vitest.it("AddItemPayload schema rejects negative quantity", () => {
145
- const result = chunkBSZJSR62_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: -1 });
145
+ const result = chunkLOWSMGRT_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: -1 });
146
146
  vitest.expect(result.success).toBe(false);
147
147
  });
148
148
  vitest.it("AddItemPayload schema rejects empty item_id", () => {
149
- const result = chunkBSZJSR62_js.AddItemPayloadSchema.safeParse({ item_id: "", quantity: 1 });
149
+ const result = chunkLOWSMGRT_js.AddItemPayloadSchema.safeParse({ item_id: "", quantity: 1 });
150
150
  vitest.expect(result.success).toBe(false);
151
151
  });
152
152
  vitest.it("Cart line items returned by the mock match CartItemSchema", async () => {
153
- const { product } = await chunkBSZJSR62_js.fixtures.addFirstProduct(h.client);
153
+ const { product } = await chunkLOWSMGRT_js.fixtures.addFirstProduct(h.client);
154
154
  const get = await h.client.cart.get();
155
155
  if (!get.ok) throw get.error;
156
156
  vitest.expect(get.value.items.length).toBeGreaterThan(0);
157
157
  for (const item of get.value.items) {
158
- const result = chunkBSZJSR62_js.CartItemSchema.safeParse(item);
158
+ const result = chunkLOWSMGRT_js.CartItemSchema.safeParse(item);
159
159
  if (!result.success) {
160
160
  const issues = result.error.issues.map((i) => ` \u2022 ${i.path.join(".")}: ${i.message}`).join("\n");
161
161
  throw new Error(`Cart item shape mismatch for ${product.name}:
@@ -165,19 +165,19 @@ ${issues}`);
165
165
  }
166
166
  });
167
167
  vitest.it("CheckoutResponse from the mock includes bill_token", async () => {
168
- await chunkBSZJSR62_js.fixtures.addFirstProduct(h.client);
168
+ await chunkLOWSMGRT_js.fixtures.addFirstProduct(h.client);
169
169
  const cartRes = await h.client.cart.get();
170
170
  if (!cartRes.ok) throw cartRes.error;
171
171
  const checkout = await h.client.checkout.process({
172
172
  cart_id: cartRes.value.id,
173
- customer: chunkBSZJSR62_js.fixtures.customer(),
173
+ customer: chunkLOWSMGRT_js.fixtures.customer(),
174
174
  order_type: "delivery",
175
175
  payment_method: "mobile_money",
176
176
  mobile_money_details: { phone_number: "+233244000000", provider: "mtn" }
177
177
  });
178
178
  vitest.expect(checkout.ok).toBe(true);
179
179
  if (!checkout.ok) return;
180
- const result = chunkBSZJSR62_js.CheckoutResponseSchema.safeParse(checkout.value);
180
+ const result = chunkLOWSMGRT_js.CheckoutResponseSchema.safeParse(checkout.value);
181
181
  if (!result.success) {
182
182
  const issues = result.error.issues.map((i) => ` \u2022 ${i.path.join(".")}: ${i.message}`).join("\n");
183
183
  throw new Error(`CheckoutResponse shape mismatch:
@@ -1,8 +1,8 @@
1
- import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-KLJLKT6C.mjs';
2
- import '../chunk-RQPXLXB2.mjs';
1
+ import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-4KNFBPV2.mjs';
2
+ import '../chunk-DCMXUKDQ.mjs';
3
3
  import '../chunk-U4MW6PYU.mjs';
4
- import '../chunk-BMFWQNYZ.mjs';
5
- import '../chunk-Z7M6GAHS.mjs';
4
+ import '../chunk-DKLHCZ5M.mjs';
5
+ import '../chunk-Z3K2D3TE.mjs';
6
6
  import '../chunk-DLW3RWRK.mjs';
7
7
  import '../chunk-O3YUHLZL.mjs';
8
8
  import '../chunk-3G6RQLXK.mjs';
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { $ZodType } from 'zod/v4/core';
3
- export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-DGrvLiJv.mjs';
4
- import './client-BwRAAk4y.mjs';
5
- import './product-CeV8euw4.mjs';
6
- import './payment-BSzy7sly.mjs';
7
- import './server-DRAW2OOX.mjs';
3
+ export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-BdErclfU.mjs';
4
+ import './client-BizGfqB7.mjs';
5
+ import './product-Byf0unSy.mjs';
6
+ import './payment-l0rkieEQ.mjs';
7
+ import './server-DqbZh8Bk.mjs';
8
8
  import 'hono';
9
9
 
10
10
  /**
@@ -54,8 +54,8 @@ declare const CountryCodeSchema: z.ZodString;
54
54
  declare const LocaleSchema: z.ZodString;
55
55
  declare const PhoneE164Schema: z.ZodString;
56
56
  declare const SeedNameSchema: z.ZodEnum<{
57
- default: "default";
58
57
  empty: "empty";
58
+ default: "default";
59
59
  "reesa-storefront": "reesa-storefront";
60
60
  restaurant: "restaurant";
61
61
  retail: "retail";
@@ -71,11 +71,11 @@ declare const ProductTypeSchema: z.ZodEnum<{
71
71
  composite: "composite";
72
72
  }>;
73
73
  declare const LineTypeSchema: z.ZodEnum<{
74
+ simple: "simple";
74
75
  service: "service";
75
76
  digital: "digital";
76
77
  bundle: "bundle";
77
78
  composite: "composite";
78
- simple: "simple";
79
79
  }>;
80
80
  declare const ServiceStatusSchema: z.ZodEnum<{
81
81
  pending: "pending";
@@ -365,8 +365,8 @@ declare const BrandSchema: z.ZodObject<{
365
365
  }, z.core.$strip>;
366
366
  mock: z.ZodObject<{
367
367
  seed: z.ZodEnum<{
368
- default: "default";
369
368
  empty: "empty";
369
+ default: "default";
370
370
  "reesa-storefront": "reesa-storefront";
371
371
  restaurant: "restaurant";
372
372
  retail: "retail";
@@ -531,7 +531,7 @@ declare const assertBrand: (value: unknown) => asserts value is {
531
531
  summary: string;
532
532
  };
533
533
  mock: {
534
- seed: "default" | "empty" | "reesa-storefront" | "restaurant" | "retail" | "services" | "grocery" | "fashion";
534
+ seed: "empty" | "default" | "reesa-storefront" | "restaurant" | "retail" | "services" | "grocery" | "fashion";
535
535
  businessId: string;
536
536
  };
537
537
  trustItems?: {
@@ -780,11 +780,11 @@ declare const CartItemSchema: z.ZodObject<{
780
780
  quantity: z.ZodNumber;
781
781
  line_key: z.ZodString;
782
782
  line_type: z.ZodEnum<{
783
+ simple: "simple";
783
784
  service: "service";
784
785
  digital: "digital";
785
786
  bundle: "bundle";
786
787
  composite: "composite";
787
- simple: "simple";
788
788
  }>;
789
789
  name: z.ZodString;
790
790
  description: z.ZodOptional<z.ZodString>;
@@ -926,7 +926,7 @@ declare const assertCartItem: (value: unknown) => asserts value is {
926
926
  item_id: string;
927
927
  quantity: number;
928
928
  line_key: string;
929
- line_type: "service" | "digital" | "bundle" | "composite" | "simple";
929
+ line_type: "simple" | "service" | "digital" | "bundle" | "composite";
930
930
  name: string;
931
931
  is_available: boolean;
932
932
  base_price: string;
@@ -1056,6 +1056,12 @@ declare const assertCartItem: (value: unknown) => asserts value is {
1056
1056
  } | undefined;
1057
1057
  metadata?: Record<string, unknown> | undefined;
1058
1058
  };
1059
+ declare const TaxPriceDisplayModeSchema: z.ZodEnum<{
1060
+ unspecified: "unspecified";
1061
+ gross_required: "gross_required";
1062
+ gross_and_net: "gross_and_net";
1063
+ net_allowed: "net_allowed";
1064
+ }>;
1059
1065
  declare const CartPricingSchema: z.ZodObject<{
1060
1066
  subtotal: z.ZodString;
1061
1067
  total_discounts: z.ZodString;
@@ -1066,6 +1072,12 @@ declare const CartPricingSchema: z.ZodObject<{
1066
1072
  tax_rate: z.ZodOptional<z.ZodString>;
1067
1073
  service_charge_rate: z.ZodOptional<z.ZodString>;
1068
1074
  tax_inclusive: z.ZodBoolean;
1075
+ price_display_mode: z.ZodOptional<z.ZodEnum<{
1076
+ unspecified: "unspecified";
1077
+ gross_required: "gross_required";
1078
+ gross_and_net: "gross_and_net";
1079
+ net_allowed: "net_allowed";
1080
+ }>>;
1069
1081
  deposit_required: z.ZodBoolean;
1070
1082
  deposit_amount: z.ZodString;
1071
1083
  }, z.core.$strip>;
@@ -1079,11 +1091,11 @@ declare const CartSchema: z.ZodObject<{
1079
1091
  quantity: z.ZodNumber;
1080
1092
  line_key: z.ZodString;
1081
1093
  line_type: z.ZodEnum<{
1094
+ simple: "simple";
1082
1095
  service: "service";
1083
1096
  digital: "digital";
1084
1097
  bundle: "bundle";
1085
1098
  composite: "composite";
1086
- simple: "simple";
1087
1099
  }>;
1088
1100
  name: z.ZodString;
1089
1101
  description: z.ZodOptional<z.ZodString>;
@@ -1227,6 +1239,12 @@ declare const CartSchema: z.ZodObject<{
1227
1239
  tax_rate: z.ZodOptional<z.ZodString>;
1228
1240
  service_charge_rate: z.ZodOptional<z.ZodString>;
1229
1241
  tax_inclusive: z.ZodBoolean;
1242
+ price_display_mode: z.ZodOptional<z.ZodEnum<{
1243
+ unspecified: "unspecified";
1244
+ gross_required: "gross_required";
1245
+ gross_and_net: "gross_and_net";
1246
+ net_allowed: "net_allowed";
1247
+ }>>;
1230
1248
  deposit_required: z.ZodBoolean;
1231
1249
  deposit_amount: z.ZodString;
1232
1250
  }, z.core.$strip>;
@@ -1256,7 +1274,7 @@ declare const assertCart: (value: unknown) => asserts value is {
1256
1274
  item_id: string;
1257
1275
  quantity: number;
1258
1276
  line_key: string;
1259
- line_type: "service" | "digital" | "bundle" | "composite" | "simple";
1277
+ line_type: "simple" | "service" | "digital" | "bundle" | "composite";
1260
1278
  name: string;
1261
1279
  is_available: boolean;
1262
1280
  base_price: string;
@@ -1398,6 +1416,7 @@ declare const assertCart: (value: unknown) => asserts value is {
1398
1416
  deposit_amount: string;
1399
1417
  tax_rate?: string | undefined;
1400
1418
  service_charge_rate?: string | undefined;
1419
+ price_display_mode?: "unspecified" | "gross_required" | "gross_and_net" | "net_allowed" | undefined;
1401
1420
  };
1402
1421
  customer_info: {
1403
1422
  name: string;
@@ -1475,10 +1494,10 @@ declare const assertCheckoutBody: (value: unknown) => asserts value is {
1475
1494
  };
1476
1495
  declare const AuthorizationTypeSchema: z.ZodEnum<{
1477
1496
  phone: "phone";
1478
- address: "address";
1479
1497
  otp: "otp";
1480
1498
  pin: "pin";
1481
1499
  birthday: "birthday";
1500
+ address: "address";
1482
1501
  }>;
1483
1502
  declare const NextActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1484
1503
  type: z.ZodLiteral<"none">;
@@ -1498,10 +1517,10 @@ declare const CheckoutResponseSchema: z.ZodObject<{
1498
1517
  requires_authorization: z.ZodBoolean;
1499
1518
  authorization_type: z.ZodOptional<z.ZodEnum<{
1500
1519
  phone: "phone";
1501
- address: "address";
1502
1520
  otp: "otp";
1503
1521
  pin: "pin";
1504
1522
  birthday: "birthday";
1523
+ address: "address";
1505
1524
  }>>;
1506
1525
  next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
1507
1526
  type: z.ZodLiteral<"none">;
@@ -1538,7 +1557,7 @@ declare const assertCheckoutResponse: (value: unknown) => asserts value is {
1538
1557
  display_text?: string | undefined;
1539
1558
  };
1540
1559
  payment_reference?: string | undefined;
1541
- authorization_type?: "phone" | "address" | "otp" | "pin" | "birthday" | undefined;
1560
+ authorization_type?: "phone" | "otp" | "pin" | "birthday" | "address" | undefined;
1542
1561
  provider?: string | undefined;
1543
1562
  authorization_url?: string | undefined;
1544
1563
  display_text?: string | undefined;
@@ -1737,8 +1756,8 @@ declare const PUBLIC_SCHEMAS: {
1737
1756
  }, z.core.$strip>;
1738
1757
  mock: z.ZodObject<{
1739
1758
  seed: z.ZodEnum<{
1740
- default: "default";
1741
1759
  empty: "empty";
1760
+ default: "default";
1742
1761
  "reesa-storefront": "reesa-storefront";
1743
1762
  restaurant: "restaurant";
1744
1763
  retail: "retail";
@@ -1798,11 +1817,11 @@ declare const PUBLIC_SCHEMAS: {
1798
1817
  quantity: z.ZodNumber;
1799
1818
  line_key: z.ZodString;
1800
1819
  line_type: z.ZodEnum<{
1820
+ simple: "simple";
1801
1821
  service: "service";
1802
1822
  digital: "digital";
1803
1823
  bundle: "bundle";
1804
1824
  composite: "composite";
1805
- simple: "simple";
1806
1825
  }>;
1807
1826
  name: z.ZodString;
1808
1827
  description: z.ZodOptional<z.ZodString>;
@@ -1946,6 +1965,12 @@ declare const PUBLIC_SCHEMAS: {
1946
1965
  tax_rate: z.ZodOptional<z.ZodString>;
1947
1966
  service_charge_rate: z.ZodOptional<z.ZodString>;
1948
1967
  tax_inclusive: z.ZodBoolean;
1968
+ price_display_mode: z.ZodOptional<z.ZodEnum<{
1969
+ unspecified: "unspecified";
1970
+ gross_required: "gross_required";
1971
+ gross_and_net: "gross_and_net";
1972
+ net_allowed: "net_allowed";
1973
+ }>>;
1949
1974
  deposit_required: z.ZodBoolean;
1950
1975
  deposit_amount: z.ZodString;
1951
1976
  }, z.core.$strip>;
@@ -1970,11 +1995,11 @@ declare const PUBLIC_SCHEMAS: {
1970
1995
  quantity: z.ZodNumber;
1971
1996
  line_key: z.ZodString;
1972
1997
  line_type: z.ZodEnum<{
1998
+ simple: "simple";
1973
1999
  service: "service";
1974
2000
  digital: "digital";
1975
2001
  bundle: "bundle";
1976
2002
  composite: "composite";
1977
- simple: "simple";
1978
2003
  }>;
1979
2004
  name: z.ZodString;
1980
2005
  description: z.ZodOptional<z.ZodString>;
@@ -2118,6 +2143,12 @@ declare const PUBLIC_SCHEMAS: {
2118
2143
  tax_rate: z.ZodOptional<z.ZodString>;
2119
2144
  service_charge_rate: z.ZodOptional<z.ZodString>;
2120
2145
  tax_inclusive: z.ZodBoolean;
2146
+ price_display_mode: z.ZodOptional<z.ZodEnum<{
2147
+ unspecified: "unspecified";
2148
+ gross_required: "gross_required";
2149
+ gross_and_net: "gross_and_net";
2150
+ net_allowed: "net_allowed";
2151
+ }>>;
2121
2152
  deposit_required: z.ZodBoolean;
2122
2153
  deposit_amount: z.ZodString;
2123
2154
  }, z.core.$strip>;
@@ -2152,10 +2183,10 @@ declare const PUBLIC_SCHEMAS: {
2152
2183
  requires_authorization: z.ZodBoolean;
2153
2184
  authorization_type: z.ZodOptional<z.ZodEnum<{
2154
2185
  phone: "phone";
2155
- address: "address";
2156
2186
  otp: "otp";
2157
2187
  pin: "pin";
2158
2188
  birthday: "birthday";
2189
+ address: "address";
2159
2190
  }>>;
2160
2191
  next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
2161
2192
  type: z.ZodLiteral<"none">;
@@ -2207,4 +2238,4 @@ declare function listRegisteredSchemas(): Array<{
2207
2238
  meta: CimplifySchemaMeta;
2208
2239
  }>;
2209
2240
 
2210
- export { type AddItemPayload, AddItemPayloadSchema, AddOnDetailsSchema, AddOnGroupDetailsSchema, AddOnInDetailsSchema, AddOnOptionDetailsSchema, AuthorizationTypeSchema, type Brand, BrandContactSchema, BrandFaqSchema, BrandHeroSchema, BrandNavLinkSchema, BrandPolicyPageSchema, BrandPolicySectionSchema, BrandSchema, BrandSocialSchema, BundleResolvedSchema, BundleSelectionInputSchema, type Cart, type CartItem, CartItemSchema, CartPricingSchema, CartSchema, type CheckoutBody, CheckoutBodySchema, CheckoutCustomerSchema, type CheckoutResponse, CheckoutResponseSchema, ChosenPriceSchema, type CimplifySchemaMeta, CompositeResolvedSchema, CompositeSelectionInputSchema, CountryCodeSchema, CurrencyCodeSchema, CustomerInputValueSchema, DiscountDetailsSchema, IsoDateTimeSchema, LineTypeSchema, LocaleSchema, MoneyLooseSchema, MoneySchema, NextActionSchema, PhoneE164Schema, ProductTypeSchema, type PublicSchemaName, SchemaViolationError, SeedNameSchema, SelectedAddOnOptionSchema, ServiceStatusSchema, TimestampSchema, VariantDetailsSchema, VariantDisplayAttributeSchema, VariantInfoSchema, assertAddItemPayload, assertBrand, assertCart, assertCartItem, assertCheckoutBody, assertCheckoutResponse, cimplifyRegistry, exportJsonSchemas, listRegisteredSchemas, makeAssertion, registerSchema };
2241
+ export { type AddItemPayload, AddItemPayloadSchema, AddOnDetailsSchema, AddOnGroupDetailsSchema, AddOnInDetailsSchema, AddOnOptionDetailsSchema, AuthorizationTypeSchema, type Brand, BrandContactSchema, BrandFaqSchema, BrandHeroSchema, BrandNavLinkSchema, BrandPolicyPageSchema, BrandPolicySectionSchema, BrandSchema, BrandSocialSchema, BundleResolvedSchema, BundleSelectionInputSchema, type Cart, type CartItem, CartItemSchema, CartPricingSchema, CartSchema, type CheckoutBody, CheckoutBodySchema, CheckoutCustomerSchema, type CheckoutResponse, CheckoutResponseSchema, ChosenPriceSchema, type CimplifySchemaMeta, CompositeResolvedSchema, CompositeSelectionInputSchema, CountryCodeSchema, CurrencyCodeSchema, CustomerInputValueSchema, DiscountDetailsSchema, IsoDateTimeSchema, LineTypeSchema, LocaleSchema, MoneyLooseSchema, MoneySchema, NextActionSchema, PhoneE164Schema, ProductTypeSchema, type PublicSchemaName, SchemaViolationError, SeedNameSchema, SelectedAddOnOptionSchema, ServiceStatusSchema, TaxPriceDisplayModeSchema, TimestampSchema, VariantDetailsSchema, VariantDisplayAttributeSchema, VariantInfoSchema, assertAddItemPayload, assertBrand, assertCart, assertCartItem, assertCheckoutBody, assertCheckoutResponse, cimplifyRegistry, exportJsonSchemas, listRegisteredSchemas, makeAssertion, registerSchema };