@cimplify/sdk 0.44.14 → 0.44.16

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 (75) hide show
  1. package/dist/advanced.d.mts +1 -1
  2. package/dist/advanced.d.ts +1 -1
  3. package/dist/advanced.js +21 -21
  4. package/dist/advanced.mjs +2 -2
  5. package/dist/{chunk-6TVQQYQ5.mjs → chunk-6AZZ6AOF.mjs} +21 -1
  6. package/dist/{chunk-EZK2FXTM.mjs → chunk-7NML226B.mjs} +1 -1
  7. package/dist/{chunk-BAWKQRIB.js → chunk-CFD4J32N.js} +21 -21
  8. package/dist/{chunk-OMAP327U.js → chunk-MBGQP6FZ.js} +62 -61
  9. package/dist/{chunk-V2O5AO7I.js → chunk-MNIKXG7W.js} +26 -0
  10. package/dist/{chunk-3WD6U5RD.mjs → chunk-UXLQ7WXI.mjs} +4 -3
  11. package/dist/chunk-XL4CX75J.js +9370 -0
  12. package/dist/chunk-ZLEFMQC6.mjs +9318 -0
  13. package/dist/cli/commands/deploy.mjs +9 -1
  14. package/dist/{client-lvLvB1_K.d.ts → client-D6ZisKco.d.ts} +7 -0
  15. package/dist/{client-CkGlXZRd.d.mts → client-Dh-bHyhU.d.mts} +7 -0
  16. package/dist/index.d.mts +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +106 -106
  19. package/dist/index.mjs +3 -3
  20. package/dist/mock/cli.mjs +2 -1
  21. package/dist/mock/library.js +2 -1
  22. package/dist/mock/library.mjs +2 -1
  23. package/dist/mock/msw.js +2 -1
  24. package/dist/mock/msw.mjs +2 -1
  25. package/dist/react.d.mts +1 -1
  26. package/dist/react.d.ts +1 -1
  27. package/dist/react.js +80 -80
  28. package/dist/react.mjs +3 -3
  29. package/dist/server-CWpUlLOQ.d.mts +1003 -0
  30. package/dist/server-CWpUlLOQ.d.ts +1003 -0
  31. package/dist/server.d.mts +2 -2
  32. package/dist/server.d.ts +2 -2
  33. package/dist/server.js +5 -5
  34. package/dist/server.mjs +3 -3
  35. package/dist/testing/suite.d.mts +60 -0
  36. package/dist/testing/suite.d.ts +60 -0
  37. package/dist/testing/suite.js +169 -0
  38. package/dist/testing/suite.mjs +165 -0
  39. package/dist/testing.d.mts +1359 -0
  40. package/dist/testing.d.ts +1359 -0
  41. package/dist/testing.js +213 -0
  42. package/dist/testing.mjs +4 -0
  43. package/dist/utils.js +28 -28
  44. package/dist/utils.mjs +1 -1
  45. package/package.json +18 -3
  46. package/templates/storefront-bakery/__tests__/brand.test.ts +4 -0
  47. package/templates/storefront-bakery/__tests__/cart-flow.test.ts +4 -0
  48. package/templates/storefront-bakery/__tests__/contract.test.ts +4 -0
  49. package/templates/storefront-bakery/package.json +11 -3
  50. package/templates/storefront-bakery/vitest.config.ts +9 -0
  51. package/templates/storefront-fashion/__tests__/brand.test.ts +4 -0
  52. package/templates/storefront-fashion/__tests__/cart-flow.test.ts +4 -0
  53. package/templates/storefront-fashion/__tests__/contract.test.ts +4 -0
  54. package/templates/storefront-fashion/package.json +11 -3
  55. package/templates/storefront-fashion/vitest.config.ts +9 -0
  56. package/templates/storefront-grocery/__tests__/brand.test.ts +4 -0
  57. package/templates/storefront-grocery/__tests__/cart-flow.test.ts +4 -0
  58. package/templates/storefront-grocery/__tests__/contract.test.ts +4 -0
  59. package/templates/storefront-grocery/package.json +11 -3
  60. package/templates/storefront-grocery/vitest.config.ts +9 -0
  61. package/templates/storefront-restaurant/__tests__/brand.test.ts +4 -0
  62. package/templates/storefront-restaurant/__tests__/cart-flow.test.ts +4 -0
  63. package/templates/storefront-restaurant/__tests__/contract.test.ts +4 -0
  64. package/templates/storefront-restaurant/package.json +11 -3
  65. package/templates/storefront-restaurant/vitest.config.ts +9 -0
  66. package/templates/storefront-retail/__tests__/brand.test.ts +4 -0
  67. package/templates/storefront-retail/__tests__/cart-flow.test.ts +4 -0
  68. package/templates/storefront-retail/__tests__/contract.test.ts +4 -0
  69. package/templates/storefront-retail/package.json +11 -3
  70. package/templates/storefront-retail/vitest.config.ts +9 -0
  71. package/templates/storefront-services/__tests__/brand.test.ts +4 -0
  72. package/templates/storefront-services/__tests__/cart-flow.test.ts +4 -0
  73. package/templates/storefront-services/__tests__/contract.test.ts +4 -0
  74. package/templates/storefront-services/package.json +11 -3
  75. package/templates/storefront-services/vitest.config.ts +9 -0
@@ -0,0 +1,1359 @@
1
+ import { z } from 'zod';
2
+ import { C as CimplifyClient } from './client-Dh-bHyhU.mjs';
3
+ import { C as CreateAppOptions, A as AppHandle } from './server-CWpUlLOQ.mjs';
4
+ import './payment-DA1i5hhk.mjs';
5
+ import 'hono';
6
+
7
+ /**
8
+ * Schema version. Increment when making a breaking change to any
9
+ * schema in this directory. Consumer tests can pin to a version
10
+ * to detect drift between SDK upgrades.
11
+ */
12
+ declare const SCHEMA_VERSION: "2026-05-07.1";
13
+ /**
14
+ * Strict money — exactly two decimal places. Backend always serializes
15
+ * decimals to 2dp; consumer code that produces "12.5" or "12.555" is wrong.
16
+ *
17
+ * If you have a code path that legitimately needs unbounded precision
18
+ * (rare; usually FX / tax-rate display), use `MoneyLooseSchema`.
19
+ */
20
+ declare const MoneySchema: z.ZodString;
21
+ /**
22
+ * Loose money — any decimal precision. Use for tax rates and FX rates
23
+ * where precision varies. Prefer `MoneySchema` for all amounts.
24
+ */
25
+ declare const MoneyLooseSchema: z.ZodString;
26
+ /** Strict ISO 8601 date-time. */
27
+ declare const IsoDateTimeSchema: z.ZodISODateTime;
28
+ /**
29
+ * Permissive timestamp — accepts ISO 8601 OR any non-empty string.
30
+ * Useful at boundaries where downstream systems serialize timestamps
31
+ * inconsistently. Prefer `IsoDateTimeSchema` for new code.
32
+ */
33
+ declare const TimestampSchema: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
34
+ /** ISO 4217 currency code (3 letters). */
35
+ declare const CurrencyCodeSchema: z.ZodString;
36
+ /** ISO 3166-1 alpha-2 country code. */
37
+ declare const CountryCodeSchema: z.ZodString;
38
+ /** BCP-47-ish locale (e.g. "en", "en_GH", "fr_FR"). */
39
+ declare const LocaleSchema: z.ZodString;
40
+ /** E.164-ish phone — digits with optional leading `+`. */
41
+ declare const PhoneE164Schema: z.ZodString;
42
+ declare const SeedNameSchema: z.ZodEnum<{
43
+ empty: "empty";
44
+ default: "default";
45
+ "reesa-storefront": "reesa-storefront";
46
+ restaurant: "restaurant";
47
+ retail: "retail";
48
+ services: "services";
49
+ grocery: "grocery";
50
+ fashion: "fashion";
51
+ }>;
52
+ declare const ProductTypeSchema: z.ZodEnum<{
53
+ product: "product";
54
+ service: "service";
55
+ digital: "digital";
56
+ bundle: "bundle";
57
+ composite: "composite";
58
+ }>;
59
+ declare const LineTypeSchema: z.ZodEnum<{
60
+ simple: "simple";
61
+ service: "service";
62
+ digital: "digital";
63
+ bundle: "bundle";
64
+ composite: "composite";
65
+ }>;
66
+ declare const ServiceStatusSchema: z.ZodEnum<{
67
+ pending: "pending";
68
+ confirmed: "confirmed";
69
+ completed: "completed";
70
+ cancelled: "cancelled";
71
+ }>;
72
+ /**
73
+ * Build a typed assertion from any zod schema. Single source of the
74
+ * "parse → format issues → throw helpful Error" pattern.
75
+ *
76
+ * const assertCart = makeAssertion(CartSchema, "cart");
77
+ * assertCart(value); // throws with field paths if invalid
78
+ */
79
+ declare function makeAssertion<T>(schema: z.ZodType<T>, label: string): (value: unknown) => asserts value is T;
80
+ /**
81
+ * Structured error thrown by every `assertX` helper. Agents can catch
82
+ * this and surface the issue list directly (e.g. in a toast or log).
83
+ */
84
+ declare class SchemaViolationError extends Error {
85
+ readonly issues: Array<{
86
+ path: string[];
87
+ message: string;
88
+ }>;
89
+ readonly name = "SchemaViolationError";
90
+ constructor(message: string, issues: Array<{
91
+ path: string[];
92
+ message: string;
93
+ }>);
94
+ }
95
+
96
+ /**
97
+ * Brand schema — the contract for `lib/brand.ts` in every storefront.
98
+ *
99
+ * Templates that need extra fields (fashion's `lookbook`, services'
100
+ * `bookingPolicy`) should `BrandSchema.extend({ … })` rather than
101
+ * fork this schema.
102
+ */
103
+
104
+ declare const BrandSocialSchema: z.ZodObject<{
105
+ label: z.ZodString;
106
+ href: z.ZodString;
107
+ icon: z.ZodOptional<z.ZodString>;
108
+ }, z.core.$strip>;
109
+ declare const BrandNavLinkSchema: z.ZodObject<{
110
+ label: z.ZodString;
111
+ href: z.ZodString;
112
+ }, z.core.$strip>;
113
+ declare const BrandPolicySectionSchema: z.ZodObject<{
114
+ heading: z.ZodString;
115
+ body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
116
+ intro: z.ZodString;
117
+ bullets: z.ZodArray<z.ZodString>;
118
+ }, z.core.$strip>]>;
119
+ }, z.core.$strip>;
120
+ declare const BrandPolicyPageSchema: z.ZodObject<{
121
+ eyebrow: z.ZodString;
122
+ title: z.ZodString;
123
+ lastUpdated: z.ZodString;
124
+ sections: z.ZodArray<z.ZodObject<{
125
+ heading: z.ZodString;
126
+ body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
127
+ intro: z.ZodString;
128
+ bullets: z.ZodArray<z.ZodString>;
129
+ }, z.core.$strip>]>;
130
+ }, z.core.$strip>>;
131
+ }, z.core.$strip>;
132
+ declare const BrandContactSchema: z.ZodObject<{
133
+ email: z.ZodString;
134
+ phone: z.ZodString;
135
+ phoneTel: z.ZodString;
136
+ streetAddress: z.ZodString;
137
+ city: z.ZodString;
138
+ countryCode: z.ZodString;
139
+ hours: z.ZodOptional<z.ZodString>;
140
+ }, z.core.$strip>;
141
+ declare const BrandHeroSchema: z.ZodObject<{
142
+ badge: z.ZodOptional<z.ZodString>;
143
+ title: z.ZodString;
144
+ subtitle: z.ZodString;
145
+ primaryCta: z.ZodOptional<z.ZodObject<{
146
+ label: z.ZodString;
147
+ href: z.ZodString;
148
+ }, z.core.$strip>>;
149
+ secondaryCta: z.ZodOptional<z.ZodObject<{
150
+ label: z.ZodString;
151
+ href: z.ZodString;
152
+ }, z.core.$strip>>;
153
+ }, z.core.$strip>;
154
+ declare const BrandFaqSchema: z.ZodObject<{
155
+ eyebrow: z.ZodOptional<z.ZodString>;
156
+ title: z.ZodString;
157
+ sections: z.ZodArray<z.ZodObject<{
158
+ title: z.ZodString;
159
+ items: z.ZodArray<z.ZodObject<{
160
+ q: z.ZodString;
161
+ a: z.ZodString;
162
+ }, z.core.$strip>>;
163
+ }, z.core.$strip>>;
164
+ }, z.core.$strip>;
165
+ declare const BrandSchema: z.ZodObject<{
166
+ name: z.ZodString;
167
+ shortName: z.ZodString;
168
+ microTag: z.ZodString;
169
+ description: z.ZodString;
170
+ schemaType: z.ZodString;
171
+ currency: z.ZodString;
172
+ locale: z.ZodString;
173
+ contact: z.ZodObject<{
174
+ email: z.ZodString;
175
+ phone: z.ZodString;
176
+ phoneTel: z.ZodString;
177
+ streetAddress: z.ZodString;
178
+ city: z.ZodString;
179
+ countryCode: z.ZodString;
180
+ hours: z.ZodOptional<z.ZodString>;
181
+ }, z.core.$strip>;
182
+ socials: z.ZodArray<z.ZodObject<{
183
+ label: z.ZodString;
184
+ href: z.ZodString;
185
+ icon: z.ZodOptional<z.ZodString>;
186
+ }, z.core.$strip>>;
187
+ header: z.ZodObject<{
188
+ nav: z.ZodArray<z.ZodObject<{
189
+ label: z.ZodString;
190
+ href: z.ZodString;
191
+ }, z.core.$strip>>;
192
+ }, z.core.$strip>;
193
+ hero: z.ZodObject<{
194
+ badge: z.ZodOptional<z.ZodString>;
195
+ title: z.ZodString;
196
+ subtitle: z.ZodString;
197
+ primaryCta: z.ZodOptional<z.ZodObject<{
198
+ label: z.ZodString;
199
+ href: z.ZodString;
200
+ }, z.core.$strip>>;
201
+ secondaryCta: z.ZodOptional<z.ZodObject<{
202
+ label: z.ZodString;
203
+ href: z.ZodString;
204
+ }, z.core.$strip>>;
205
+ }, z.core.$strip>;
206
+ trustItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
207
+ title: z.ZodString;
208
+ body: z.ZodString;
209
+ }, z.core.$strip>>>;
210
+ brandStrip: z.ZodOptional<z.ZodObject<{
211
+ headline: z.ZodString;
212
+ logos: z.ZodArray<z.ZodString>;
213
+ }, z.core.$strip>>;
214
+ promo: z.ZodOptional<z.ZodObject<{
215
+ eyebrow: z.ZodOptional<z.ZodString>;
216
+ title: z.ZodString;
217
+ cta: z.ZodObject<{
218
+ label: z.ZodString;
219
+ href: z.ZodString;
220
+ }, z.core.$strip>;
221
+ }, z.core.$strip>>;
222
+ terms: z.ZodObject<{
223
+ eyebrow: z.ZodString;
224
+ title: z.ZodString;
225
+ lastUpdated: z.ZodString;
226
+ sections: z.ZodArray<z.ZodObject<{
227
+ heading: z.ZodString;
228
+ body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
229
+ intro: z.ZodString;
230
+ bullets: z.ZodArray<z.ZodString>;
231
+ }, z.core.$strip>]>;
232
+ }, z.core.$strip>>;
233
+ }, z.core.$strip>;
234
+ privacy: z.ZodObject<{
235
+ eyebrow: z.ZodString;
236
+ title: z.ZodString;
237
+ lastUpdated: z.ZodString;
238
+ sections: z.ZodArray<z.ZodObject<{
239
+ heading: z.ZodString;
240
+ body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
241
+ intro: z.ZodString;
242
+ bullets: z.ZodArray<z.ZodString>;
243
+ }, z.core.$strip>]>;
244
+ }, z.core.$strip>>;
245
+ }, z.core.$strip>;
246
+ shipping: z.ZodObject<{
247
+ eyebrow: z.ZodString;
248
+ title: z.ZodString;
249
+ lastUpdated: z.ZodString;
250
+ sections: z.ZodArray<z.ZodObject<{
251
+ heading: z.ZodString;
252
+ body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
253
+ intro: z.ZodString;
254
+ bullets: z.ZodArray<z.ZodString>;
255
+ }, z.core.$strip>]>;
256
+ }, z.core.$strip>>;
257
+ }, z.core.$strip>;
258
+ returns: z.ZodObject<{
259
+ eyebrow: z.ZodString;
260
+ title: z.ZodString;
261
+ lastUpdated: z.ZodString;
262
+ sections: z.ZodArray<z.ZodObject<{
263
+ heading: z.ZodString;
264
+ body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
265
+ intro: z.ZodString;
266
+ bullets: z.ZodArray<z.ZodString>;
267
+ }, z.core.$strip>]>;
268
+ }, z.core.$strip>>;
269
+ }, z.core.$strip>;
270
+ accessibility: z.ZodObject<{
271
+ eyebrow: z.ZodString;
272
+ title: z.ZodString;
273
+ lastUpdated: z.ZodString;
274
+ sections: z.ZodArray<z.ZodObject<{
275
+ heading: z.ZodString;
276
+ body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
277
+ intro: z.ZodString;
278
+ bullets: z.ZodArray<z.ZodString>;
279
+ }, z.core.$strip>]>;
280
+ }, z.core.$strip>>;
281
+ }, z.core.$strip>;
282
+ newsletter: z.ZodObject<{
283
+ eyebrow: z.ZodOptional<z.ZodString>;
284
+ title: z.ZodString;
285
+ body: z.ZodString;
286
+ }, z.core.$strip>;
287
+ about: z.ZodObject<{
288
+ eyebrow: z.ZodOptional<z.ZodString>;
289
+ title: z.ZodString;
290
+ body: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
291
+ }, z.core.$strip>;
292
+ faq: z.ZodObject<{
293
+ eyebrow: z.ZodOptional<z.ZodString>;
294
+ title: z.ZodString;
295
+ sections: z.ZodArray<z.ZodObject<{
296
+ title: z.ZodString;
297
+ items: z.ZodArray<z.ZodObject<{
298
+ q: z.ZodString;
299
+ a: z.ZodString;
300
+ }, z.core.$strip>>;
301
+ }, z.core.$strip>>;
302
+ }, z.core.$strip>;
303
+ account: z.ZodObject<{
304
+ eyebrow: z.ZodOptional<z.ZodString>;
305
+ title: z.ZodString;
306
+ signin: z.ZodOptional<z.ZodObject<{
307
+ eyebrow: z.ZodOptional<z.ZodString>;
308
+ title: z.ZodString;
309
+ }, z.core.$strip>>;
310
+ signup: z.ZodOptional<z.ZodObject<{
311
+ eyebrow: z.ZodOptional<z.ZodString>;
312
+ title: z.ZodString;
313
+ }, z.core.$strip>>;
314
+ }, z.core.$strip>;
315
+ contactPage: z.ZodObject<{
316
+ eyebrow: z.ZodOptional<z.ZodString>;
317
+ title: z.ZodString;
318
+ body: z.ZodString;
319
+ }, z.core.$strip>;
320
+ trackOrder: z.ZodObject<{
321
+ eyebrow: z.ZodOptional<z.ZodString>;
322
+ title: z.ZodString;
323
+ body: z.ZodString;
324
+ }, z.core.$strip>;
325
+ footer: z.ZodObject<{
326
+ sitemap: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
327
+ poweredBy: z.ZodOptional<z.ZodString>;
328
+ }, z.core.$strip>;
329
+ llms: z.ZodObject<{
330
+ summary: z.ZodString;
331
+ }, z.core.$strip>;
332
+ mock: z.ZodObject<{
333
+ seed: z.ZodEnum<{
334
+ empty: "empty";
335
+ default: "default";
336
+ "reesa-storefront": "reesa-storefront";
337
+ restaurant: "restaurant";
338
+ retail: "retail";
339
+ services: "services";
340
+ grocery: "grocery";
341
+ fashion: "fashion";
342
+ }>;
343
+ businessId: z.ZodString;
344
+ }, z.core.$strip>;
345
+ }, z.core.$strip>;
346
+ type Brand = z.infer<typeof BrandSchema>;
347
+ declare const assertBrand: (value: unknown) => asserts value is {
348
+ name: string;
349
+ shortName: string;
350
+ microTag: string;
351
+ description: string;
352
+ schemaType: string;
353
+ currency: string;
354
+ locale: string;
355
+ contact: {
356
+ email: string;
357
+ phone: string;
358
+ phoneTel: string;
359
+ streetAddress: string;
360
+ city: string;
361
+ countryCode: string;
362
+ hours?: string | undefined;
363
+ };
364
+ socials: {
365
+ label: string;
366
+ href: string;
367
+ icon?: string | undefined;
368
+ }[];
369
+ header: {
370
+ nav: {
371
+ label: string;
372
+ href: string;
373
+ }[];
374
+ };
375
+ hero: {
376
+ title: string;
377
+ subtitle: string;
378
+ badge?: string | undefined;
379
+ primaryCta?: {
380
+ label: string;
381
+ href: string;
382
+ } | undefined;
383
+ secondaryCta?: {
384
+ label: string;
385
+ href: string;
386
+ } | undefined;
387
+ };
388
+ terms: {
389
+ eyebrow: string;
390
+ title: string;
391
+ lastUpdated: string;
392
+ sections: {
393
+ heading: string;
394
+ body: string | {
395
+ intro: string;
396
+ bullets: string[];
397
+ };
398
+ }[];
399
+ };
400
+ privacy: {
401
+ eyebrow: string;
402
+ title: string;
403
+ lastUpdated: string;
404
+ sections: {
405
+ heading: string;
406
+ body: string | {
407
+ intro: string;
408
+ bullets: string[];
409
+ };
410
+ }[];
411
+ };
412
+ shipping: {
413
+ eyebrow: string;
414
+ title: string;
415
+ lastUpdated: string;
416
+ sections: {
417
+ heading: string;
418
+ body: string | {
419
+ intro: string;
420
+ bullets: string[];
421
+ };
422
+ }[];
423
+ };
424
+ returns: {
425
+ eyebrow: string;
426
+ title: string;
427
+ lastUpdated: string;
428
+ sections: {
429
+ heading: string;
430
+ body: string | {
431
+ intro: string;
432
+ bullets: string[];
433
+ };
434
+ }[];
435
+ };
436
+ accessibility: {
437
+ eyebrow: string;
438
+ title: string;
439
+ lastUpdated: string;
440
+ sections: {
441
+ heading: string;
442
+ body: string | {
443
+ intro: string;
444
+ bullets: string[];
445
+ };
446
+ }[];
447
+ };
448
+ newsletter: {
449
+ title: string;
450
+ body: string;
451
+ eyebrow?: string | undefined;
452
+ };
453
+ about: {
454
+ title: string;
455
+ body: string | string[];
456
+ eyebrow?: string | undefined;
457
+ };
458
+ faq: {
459
+ title: string;
460
+ sections: {
461
+ title: string;
462
+ items: {
463
+ q: string;
464
+ a: string;
465
+ }[];
466
+ }[];
467
+ eyebrow?: string | undefined;
468
+ };
469
+ account: {
470
+ title: string;
471
+ eyebrow?: string | undefined;
472
+ signin?: {
473
+ title: string;
474
+ eyebrow?: string | undefined;
475
+ } | undefined;
476
+ signup?: {
477
+ title: string;
478
+ eyebrow?: string | undefined;
479
+ } | undefined;
480
+ };
481
+ contactPage: {
482
+ title: string;
483
+ body: string;
484
+ eyebrow?: string | undefined;
485
+ };
486
+ trackOrder: {
487
+ title: string;
488
+ body: string;
489
+ eyebrow?: string | undefined;
490
+ };
491
+ footer: {
492
+ sitemap?: unknown[] | undefined;
493
+ poweredBy?: string | undefined;
494
+ };
495
+ llms: {
496
+ summary: string;
497
+ };
498
+ mock: {
499
+ seed: "empty" | "default" | "reesa-storefront" | "restaurant" | "retail" | "services" | "grocery" | "fashion";
500
+ businessId: string;
501
+ };
502
+ trustItems?: {
503
+ title: string;
504
+ body: string;
505
+ }[] | undefined;
506
+ brandStrip?: {
507
+ headline: string;
508
+ logos: string[];
509
+ } | undefined;
510
+ promo?: {
511
+ title: string;
512
+ cta: {
513
+ label: string;
514
+ href: string;
515
+ };
516
+ eyebrow?: string | undefined;
517
+ } | undefined;
518
+ };
519
+
520
+ /**
521
+ * Cart schemas — the SDK ↔ mock ↔ backend contract for cart
522
+ * mutations and the canonical cart response shape.
523
+ */
524
+
525
+ declare const BundleSelectionInputSchema: z.ZodObject<{
526
+ component_id: z.ZodString;
527
+ variant_id: z.ZodOptional<z.ZodString>;
528
+ quantity: z.ZodNumber;
529
+ scheduled_start: z.ZodOptional<z.ZodString>;
530
+ scheduled_end: z.ZodOptional<z.ZodString>;
531
+ }, z.core.$strip>;
532
+ declare const CompositeSelectionInputSchema: z.ZodObject<{
533
+ component_id: z.ZodOptional<z.ZodString>;
534
+ source_product_id: z.ZodOptional<z.ZodString>;
535
+ source_stock_id: z.ZodOptional<z.ZodString>;
536
+ source_type: z.ZodOptional<z.ZodEnum<{
537
+ product: "product";
538
+ stock: "stock";
539
+ add_on: "add_on";
540
+ standalone: "standalone";
541
+ }>>;
542
+ quantity: z.ZodOptional<z.ZodNumber>;
543
+ }, z.core.$strip>;
544
+ declare const CustomerInputValueSchema: z.ZodObject<{
545
+ field_id: z.ZodString;
546
+ field_name: z.ZodOptional<z.ZodString>;
547
+ field_type: z.ZodOptional<z.ZodString>;
548
+ value: z.ZodUnknown;
549
+ }, z.core.$strip>;
550
+ declare const AddItemPayloadSchema: z.ZodObject<{
551
+ item_id: z.ZodString;
552
+ quantity: z.ZodNumber;
553
+ variant_id: z.ZodOptional<z.ZodString>;
554
+ quote_id: z.ZodOptional<z.ZodString>;
555
+ add_on_options: z.ZodOptional<z.ZodArray<z.ZodString>>;
556
+ bundle_selections: z.ZodOptional<z.ZodArray<z.ZodObject<{
557
+ component_id: z.ZodString;
558
+ variant_id: z.ZodOptional<z.ZodString>;
559
+ quantity: z.ZodNumber;
560
+ scheduled_start: z.ZodOptional<z.ZodString>;
561
+ scheduled_end: z.ZodOptional<z.ZodString>;
562
+ }, z.core.$strip>>>;
563
+ composite_selections: z.ZodOptional<z.ZodArray<z.ZodObject<{
564
+ component_id: z.ZodOptional<z.ZodString>;
565
+ source_product_id: z.ZodOptional<z.ZodString>;
566
+ source_stock_id: z.ZodOptional<z.ZodString>;
567
+ source_type: z.ZodOptional<z.ZodEnum<{
568
+ product: "product";
569
+ stock: "stock";
570
+ add_on: "add_on";
571
+ standalone: "standalone";
572
+ }>>;
573
+ quantity: z.ZodOptional<z.ZodNumber>;
574
+ }, z.core.$strip>>>;
575
+ scheduled_start: z.ZodOptional<z.ZodString>;
576
+ scheduled_end: z.ZodOptional<z.ZodString>;
577
+ staff_id: z.ZodOptional<z.ZodString>;
578
+ resource_id: z.ZodOptional<z.ZodString>;
579
+ special_instructions: z.ZodOptional<z.ZodString>;
580
+ customer_inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
581
+ field_id: z.ZodString;
582
+ field_name: z.ZodOptional<z.ZodString>;
583
+ field_type: z.ZodOptional<z.ZodString>;
584
+ value: z.ZodUnknown;
585
+ }, z.core.$strip>>>;
586
+ billing_plan_id: z.ZodOptional<z.ZodString>;
587
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
588
+ }, z.core.$strip>;
589
+ type AddItemPayload = z.infer<typeof AddItemPayloadSchema>;
590
+ declare const assertAddItemPayload: (value: unknown) => asserts value is {
591
+ item_id: string;
592
+ quantity: number;
593
+ variant_id?: string | undefined;
594
+ quote_id?: string | undefined;
595
+ add_on_options?: string[] | undefined;
596
+ bundle_selections?: {
597
+ component_id: string;
598
+ quantity: number;
599
+ variant_id?: string | undefined;
600
+ scheduled_start?: string | undefined;
601
+ scheduled_end?: string | undefined;
602
+ }[] | undefined;
603
+ composite_selections?: {
604
+ component_id?: string | undefined;
605
+ source_product_id?: string | undefined;
606
+ source_stock_id?: string | undefined;
607
+ source_type?: "product" | "stock" | "add_on" | "standalone" | undefined;
608
+ quantity?: number | undefined;
609
+ }[] | undefined;
610
+ scheduled_start?: string | undefined;
611
+ scheduled_end?: string | undefined;
612
+ staff_id?: string | undefined;
613
+ resource_id?: string | undefined;
614
+ special_instructions?: string | undefined;
615
+ customer_inputs?: {
616
+ field_id: string;
617
+ value: unknown;
618
+ field_name?: string | undefined;
619
+ field_type?: string | undefined;
620
+ }[] | undefined;
621
+ billing_plan_id?: string | undefined;
622
+ metadata?: Record<string, unknown> | undefined;
623
+ };
624
+ declare const VariantDisplayAttributeSchema: z.ZodObject<{
625
+ axis_id: z.ZodString;
626
+ axis_name: z.ZodString;
627
+ value_id: z.ZodString;
628
+ value_name: z.ZodString;
629
+ }, z.core.$strip>;
630
+ declare const VariantInfoSchema: z.ZodObject<{
631
+ id: z.ZodString;
632
+ name: z.ZodString;
633
+ sku: z.ZodOptional<z.ZodString>;
634
+ price_adjustment: z.ZodString;
635
+ display_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
636
+ axis_id: z.ZodString;
637
+ axis_name: z.ZodString;
638
+ value_id: z.ZodString;
639
+ value_name: z.ZodString;
640
+ }, z.core.$strip>>>;
641
+ images: z.ZodOptional<z.ZodArray<z.ZodString>>;
642
+ }, z.core.$strip>;
643
+ declare const VariantDetailsSchema: z.ZodObject<{
644
+ variant_id: z.ZodString;
645
+ sku: z.ZodOptional<z.ZodString>;
646
+ properties: z.ZodRecord<z.ZodString, z.ZodString>;
647
+ }, z.core.$strip>;
648
+ declare const ChosenPriceSchema: z.ZodObject<{
649
+ base_price: z.ZodString;
650
+ final_price: z.ZodString;
651
+ markup_percentage: z.ZodString;
652
+ markup_amount: z.ZodString;
653
+ markup_discount_percentage: z.ZodString;
654
+ markup_discount_amount: z.ZodString;
655
+ }, z.core.$strip>;
656
+ declare const AddOnDetailsSchema: z.ZodObject<{
657
+ selected_options: z.ZodArray<z.ZodUnknown>;
658
+ total_add_on_price: z.ZodString;
659
+ add_ons: z.ZodArray<z.ZodUnknown>;
660
+ }, z.core.$strip>;
661
+ declare const BundleResolvedSchema: z.ZodObject<{
662
+ bundle_id: z.ZodString;
663
+ selections: z.ZodArray<z.ZodUnknown>;
664
+ }, z.core.$loose>;
665
+ declare const CompositeResolvedSchema: z.ZodObject<{
666
+ composite_id: z.ZodString;
667
+ selections: z.ZodArray<z.ZodUnknown>;
668
+ breakdown: z.ZodOptional<z.ZodObject<{
669
+ base_price: z.ZodString;
670
+ components_total: z.ZodString;
671
+ final_price: z.ZodString;
672
+ tier_applied: z.ZodOptional<z.ZodString>;
673
+ }, z.core.$strip>>;
674
+ }, z.core.$loose>;
675
+ declare const DiscountDetailsSchema: z.ZodObject<{
676
+ applied_count: z.ZodNumber;
677
+ total_amount: z.ZodString;
678
+ discount_ids: z.ZodArray<z.ZodString>;
679
+ }, z.core.$strip>;
680
+ declare const CartItemSchema: z.ZodObject<{
681
+ id: z.ZodString;
682
+ cart_id: z.ZodString;
683
+ item_id: z.ZodString;
684
+ quantity: z.ZodNumber;
685
+ line_key: z.ZodString;
686
+ line_type: z.ZodEnum<{
687
+ simple: "simple";
688
+ service: "service";
689
+ digital: "digital";
690
+ bundle: "bundle";
691
+ composite: "composite";
692
+ }>;
693
+ name: z.ZodString;
694
+ description: z.ZodOptional<z.ZodString>;
695
+ image_url: z.ZodOptional<z.ZodString>;
696
+ category_id: z.ZodOptional<z.ZodString>;
697
+ category_name: z.ZodOptional<z.ZodString>;
698
+ is_available: z.ZodBoolean;
699
+ variant_id: z.ZodOptional<z.ZodString>;
700
+ variant_name: z.ZodOptional<z.ZodString>;
701
+ variant_info: z.ZodOptional<z.ZodObject<{
702
+ id: z.ZodString;
703
+ name: z.ZodString;
704
+ sku: z.ZodOptional<z.ZodString>;
705
+ price_adjustment: z.ZodString;
706
+ display_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
707
+ axis_id: z.ZodString;
708
+ axis_name: z.ZodString;
709
+ value_id: z.ZodString;
710
+ value_name: z.ZodString;
711
+ }, z.core.$strip>>>;
712
+ images: z.ZodOptional<z.ZodArray<z.ZodString>>;
713
+ }, z.core.$strip>>;
714
+ variant_details: z.ZodOptional<z.ZodObject<{
715
+ variant_id: z.ZodString;
716
+ sku: z.ZodOptional<z.ZodString>;
717
+ properties: z.ZodRecord<z.ZodString, z.ZodString>;
718
+ }, z.core.$strip>>;
719
+ base_price: z.ZodString;
720
+ add_ons_price: z.ZodString;
721
+ total_price: z.ZodString;
722
+ item_discount_amount: z.ZodString;
723
+ price_info: z.ZodObject<{
724
+ base_price: z.ZodString;
725
+ final_price: z.ZodString;
726
+ markup_percentage: z.ZodString;
727
+ markup_amount: z.ZodString;
728
+ markup_discount_percentage: z.ZodString;
729
+ markup_discount_amount: z.ZodString;
730
+ }, z.core.$strip>;
731
+ add_on_option_ids: z.ZodArray<z.ZodString>;
732
+ add_on_ids: z.ZodArray<z.ZodString>;
733
+ add_on_details: z.ZodObject<{
734
+ selected_options: z.ZodArray<z.ZodUnknown>;
735
+ total_add_on_price: z.ZodString;
736
+ add_ons: z.ZodArray<z.ZodUnknown>;
737
+ }, z.core.$strip>;
738
+ add_on_options: z.ZodArray<z.ZodUnknown>;
739
+ add_ons: z.ZodArray<z.ZodUnknown>;
740
+ scheduled_start: z.ZodOptional<z.ZodString>;
741
+ scheduled_end: z.ZodOptional<z.ZodString>;
742
+ staff_id: z.ZodOptional<z.ZodString>;
743
+ resource_id: z.ZodOptional<z.ZodString>;
744
+ service_status: z.ZodOptional<z.ZodEnum<{
745
+ pending: "pending";
746
+ confirmed: "confirmed";
747
+ completed: "completed";
748
+ cancelled: "cancelled";
749
+ }>>;
750
+ confirmation_code: z.ZodOptional<z.ZodString>;
751
+ special_instructions: z.ZodOptional<z.ZodString>;
752
+ customer_inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
753
+ field_id: z.ZodString;
754
+ field_name: z.ZodOptional<z.ZodString>;
755
+ field_type: z.ZodOptional<z.ZodString>;
756
+ value: z.ZodUnknown;
757
+ }, z.core.$strip>>>;
758
+ bundle_selections: z.ZodOptional<z.ZodUnknown>;
759
+ bundle_resolved: z.ZodOptional<z.ZodObject<{
760
+ bundle_id: z.ZodString;
761
+ selections: z.ZodArray<z.ZodUnknown>;
762
+ }, z.core.$loose>>;
763
+ composite_selections: z.ZodOptional<z.ZodUnknown>;
764
+ composite_resolved: z.ZodOptional<z.ZodObject<{
765
+ composite_id: z.ZodString;
766
+ selections: z.ZodArray<z.ZodUnknown>;
767
+ breakdown: z.ZodOptional<z.ZodObject<{
768
+ base_price: z.ZodString;
769
+ components_total: z.ZodString;
770
+ final_price: z.ZodString;
771
+ tier_applied: z.ZodOptional<z.ZodString>;
772
+ }, z.core.$strip>>;
773
+ }, z.core.$loose>>;
774
+ billing_plan_id: z.ZodOptional<z.ZodString>;
775
+ applied_discount_ids: z.ZodArray<z.ZodString>;
776
+ discount_details: z.ZodOptional<z.ZodObject<{
777
+ applied_count: z.ZodNumber;
778
+ total_amount: z.ZodString;
779
+ discount_ids: z.ZodArray<z.ZodString>;
780
+ }, z.core.$strip>>;
781
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
782
+ created_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
783
+ updated_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
784
+ }, z.core.$strip>;
785
+ type CartItem = z.infer<typeof CartItemSchema>;
786
+ declare const assertCartItem: (value: unknown) => asserts value is {
787
+ id: string;
788
+ cart_id: string;
789
+ item_id: string;
790
+ quantity: number;
791
+ line_key: string;
792
+ line_type: "simple" | "service" | "digital" | "bundle" | "composite";
793
+ name: string;
794
+ is_available: boolean;
795
+ base_price: string;
796
+ add_ons_price: string;
797
+ total_price: string;
798
+ item_discount_amount: string;
799
+ price_info: {
800
+ base_price: string;
801
+ final_price: string;
802
+ markup_percentage: string;
803
+ markup_amount: string;
804
+ markup_discount_percentage: string;
805
+ markup_discount_amount: string;
806
+ };
807
+ add_on_option_ids: string[];
808
+ add_on_ids: string[];
809
+ add_on_details: {
810
+ selected_options: unknown[];
811
+ total_add_on_price: string;
812
+ add_ons: unknown[];
813
+ };
814
+ add_on_options: unknown[];
815
+ add_ons: unknown[];
816
+ applied_discount_ids: string[];
817
+ created_at: string;
818
+ updated_at: string;
819
+ description?: string | undefined;
820
+ image_url?: string | undefined;
821
+ category_id?: string | undefined;
822
+ category_name?: string | undefined;
823
+ variant_id?: string | undefined;
824
+ variant_name?: string | undefined;
825
+ variant_info?: {
826
+ id: string;
827
+ name: string;
828
+ price_adjustment: string;
829
+ sku?: string | undefined;
830
+ display_attributes?: {
831
+ axis_id: string;
832
+ axis_name: string;
833
+ value_id: string;
834
+ value_name: string;
835
+ }[] | undefined;
836
+ images?: string[] | undefined;
837
+ } | undefined;
838
+ variant_details?: {
839
+ variant_id: string;
840
+ properties: Record<string, string>;
841
+ sku?: string | undefined;
842
+ } | undefined;
843
+ scheduled_start?: string | undefined;
844
+ scheduled_end?: string | undefined;
845
+ staff_id?: string | undefined;
846
+ resource_id?: string | undefined;
847
+ service_status?: "pending" | "confirmed" | "completed" | "cancelled" | undefined;
848
+ confirmation_code?: string | undefined;
849
+ special_instructions?: string | undefined;
850
+ customer_inputs?: {
851
+ field_id: string;
852
+ value: unknown;
853
+ field_name?: string | undefined;
854
+ field_type?: string | undefined;
855
+ }[] | undefined;
856
+ bundle_selections?: unknown;
857
+ bundle_resolved?: {
858
+ [x: string]: unknown;
859
+ bundle_id: string;
860
+ selections: unknown[];
861
+ } | undefined;
862
+ composite_selections?: unknown;
863
+ composite_resolved?: {
864
+ [x: string]: unknown;
865
+ composite_id: string;
866
+ selections: unknown[];
867
+ breakdown?: {
868
+ base_price: string;
869
+ components_total: string;
870
+ final_price: string;
871
+ tier_applied?: string | undefined;
872
+ } | undefined;
873
+ } | undefined;
874
+ billing_plan_id?: string | undefined;
875
+ discount_details?: {
876
+ applied_count: number;
877
+ total_amount: string;
878
+ discount_ids: string[];
879
+ } | undefined;
880
+ metadata?: Record<string, unknown> | undefined;
881
+ };
882
+ declare const CartPricingSchema: z.ZodObject<{
883
+ subtotal: z.ZodString;
884
+ total_discounts: z.ZodString;
885
+ tax_amount: z.ZodString;
886
+ service_charge: z.ZodString;
887
+ total_price: z.ZodString;
888
+ currency: z.ZodString;
889
+ tax_rate: z.ZodOptional<z.ZodString>;
890
+ service_charge_rate: z.ZodOptional<z.ZodString>;
891
+ }, z.core.$strip>;
892
+ declare const CartSchema: z.ZodObject<{
893
+ id: z.ZodString;
894
+ business_id: z.ZodString;
895
+ items: z.ZodArray<z.ZodObject<{
896
+ id: z.ZodString;
897
+ cart_id: z.ZodString;
898
+ item_id: z.ZodString;
899
+ quantity: z.ZodNumber;
900
+ line_key: z.ZodString;
901
+ line_type: z.ZodEnum<{
902
+ simple: "simple";
903
+ service: "service";
904
+ digital: "digital";
905
+ bundle: "bundle";
906
+ composite: "composite";
907
+ }>;
908
+ name: z.ZodString;
909
+ description: z.ZodOptional<z.ZodString>;
910
+ image_url: z.ZodOptional<z.ZodString>;
911
+ category_id: z.ZodOptional<z.ZodString>;
912
+ category_name: z.ZodOptional<z.ZodString>;
913
+ is_available: z.ZodBoolean;
914
+ variant_id: z.ZodOptional<z.ZodString>;
915
+ variant_name: z.ZodOptional<z.ZodString>;
916
+ variant_info: z.ZodOptional<z.ZodObject<{
917
+ id: z.ZodString;
918
+ name: z.ZodString;
919
+ sku: z.ZodOptional<z.ZodString>;
920
+ price_adjustment: z.ZodString;
921
+ display_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
922
+ axis_id: z.ZodString;
923
+ axis_name: z.ZodString;
924
+ value_id: z.ZodString;
925
+ value_name: z.ZodString;
926
+ }, z.core.$strip>>>;
927
+ images: z.ZodOptional<z.ZodArray<z.ZodString>>;
928
+ }, z.core.$strip>>;
929
+ variant_details: z.ZodOptional<z.ZodObject<{
930
+ variant_id: z.ZodString;
931
+ sku: z.ZodOptional<z.ZodString>;
932
+ properties: z.ZodRecord<z.ZodString, z.ZodString>;
933
+ }, z.core.$strip>>;
934
+ base_price: z.ZodString;
935
+ add_ons_price: z.ZodString;
936
+ total_price: z.ZodString;
937
+ item_discount_amount: z.ZodString;
938
+ price_info: z.ZodObject<{
939
+ base_price: z.ZodString;
940
+ final_price: z.ZodString;
941
+ markup_percentage: z.ZodString;
942
+ markup_amount: z.ZodString;
943
+ markup_discount_percentage: z.ZodString;
944
+ markup_discount_amount: z.ZodString;
945
+ }, z.core.$strip>;
946
+ add_on_option_ids: z.ZodArray<z.ZodString>;
947
+ add_on_ids: z.ZodArray<z.ZodString>;
948
+ add_on_details: z.ZodObject<{
949
+ selected_options: z.ZodArray<z.ZodUnknown>;
950
+ total_add_on_price: z.ZodString;
951
+ add_ons: z.ZodArray<z.ZodUnknown>;
952
+ }, z.core.$strip>;
953
+ add_on_options: z.ZodArray<z.ZodUnknown>;
954
+ add_ons: z.ZodArray<z.ZodUnknown>;
955
+ scheduled_start: z.ZodOptional<z.ZodString>;
956
+ scheduled_end: z.ZodOptional<z.ZodString>;
957
+ staff_id: z.ZodOptional<z.ZodString>;
958
+ resource_id: z.ZodOptional<z.ZodString>;
959
+ service_status: z.ZodOptional<z.ZodEnum<{
960
+ pending: "pending";
961
+ confirmed: "confirmed";
962
+ completed: "completed";
963
+ cancelled: "cancelled";
964
+ }>>;
965
+ confirmation_code: z.ZodOptional<z.ZodString>;
966
+ special_instructions: z.ZodOptional<z.ZodString>;
967
+ customer_inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
968
+ field_id: z.ZodString;
969
+ field_name: z.ZodOptional<z.ZodString>;
970
+ field_type: z.ZodOptional<z.ZodString>;
971
+ value: z.ZodUnknown;
972
+ }, z.core.$strip>>>;
973
+ bundle_selections: z.ZodOptional<z.ZodUnknown>;
974
+ bundle_resolved: z.ZodOptional<z.ZodObject<{
975
+ bundle_id: z.ZodString;
976
+ selections: z.ZodArray<z.ZodUnknown>;
977
+ }, z.core.$loose>>;
978
+ composite_selections: z.ZodOptional<z.ZodUnknown>;
979
+ composite_resolved: z.ZodOptional<z.ZodObject<{
980
+ composite_id: z.ZodString;
981
+ selections: z.ZodArray<z.ZodUnknown>;
982
+ breakdown: z.ZodOptional<z.ZodObject<{
983
+ base_price: z.ZodString;
984
+ components_total: z.ZodString;
985
+ final_price: z.ZodString;
986
+ tier_applied: z.ZodOptional<z.ZodString>;
987
+ }, z.core.$strip>>;
988
+ }, z.core.$loose>>;
989
+ billing_plan_id: z.ZodOptional<z.ZodString>;
990
+ applied_discount_ids: z.ZodArray<z.ZodString>;
991
+ discount_details: z.ZodOptional<z.ZodObject<{
992
+ applied_count: z.ZodNumber;
993
+ total_amount: z.ZodString;
994
+ discount_ids: z.ZodArray<z.ZodString>;
995
+ }, z.core.$strip>>;
996
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
997
+ created_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
998
+ updated_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
999
+ }, z.core.$strip>>;
1000
+ pricing: z.ZodObject<{
1001
+ subtotal: z.ZodString;
1002
+ total_discounts: z.ZodString;
1003
+ tax_amount: z.ZodString;
1004
+ service_charge: z.ZodString;
1005
+ total_price: z.ZodString;
1006
+ currency: z.ZodString;
1007
+ tax_rate: z.ZodOptional<z.ZodString>;
1008
+ service_charge_rate: z.ZodOptional<z.ZodString>;
1009
+ }, z.core.$strip>;
1010
+ customer_info: z.ZodObject<{
1011
+ name: z.ZodString;
1012
+ email: z.ZodOptional<z.ZodString>;
1013
+ phone: z.ZodOptional<z.ZodString>;
1014
+ address: z.ZodOptional<z.ZodString>;
1015
+ }, z.core.$strip>;
1016
+ created_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
1017
+ updated_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
1018
+ expires_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
1019
+ status: z.ZodString;
1020
+ source: z.ZodString;
1021
+ channel: z.ZodString;
1022
+ }, z.core.$strip>;
1023
+ type Cart = z.infer<typeof CartSchema>;
1024
+ declare const assertCart: (value: unknown) => asserts value is {
1025
+ id: string;
1026
+ business_id: string;
1027
+ items: {
1028
+ id: string;
1029
+ cart_id: string;
1030
+ item_id: string;
1031
+ quantity: number;
1032
+ line_key: string;
1033
+ line_type: "simple" | "service" | "digital" | "bundle" | "composite";
1034
+ name: string;
1035
+ is_available: boolean;
1036
+ base_price: string;
1037
+ add_ons_price: string;
1038
+ total_price: string;
1039
+ item_discount_amount: string;
1040
+ price_info: {
1041
+ base_price: string;
1042
+ final_price: string;
1043
+ markup_percentage: string;
1044
+ markup_amount: string;
1045
+ markup_discount_percentage: string;
1046
+ markup_discount_amount: string;
1047
+ };
1048
+ add_on_option_ids: string[];
1049
+ add_on_ids: string[];
1050
+ add_on_details: {
1051
+ selected_options: unknown[];
1052
+ total_add_on_price: string;
1053
+ add_ons: unknown[];
1054
+ };
1055
+ add_on_options: unknown[];
1056
+ add_ons: unknown[];
1057
+ applied_discount_ids: string[];
1058
+ created_at: string;
1059
+ updated_at: string;
1060
+ description?: string | undefined;
1061
+ image_url?: string | undefined;
1062
+ category_id?: string | undefined;
1063
+ category_name?: string | undefined;
1064
+ variant_id?: string | undefined;
1065
+ variant_name?: string | undefined;
1066
+ variant_info?: {
1067
+ id: string;
1068
+ name: string;
1069
+ price_adjustment: string;
1070
+ sku?: string | undefined;
1071
+ display_attributes?: {
1072
+ axis_id: string;
1073
+ axis_name: string;
1074
+ value_id: string;
1075
+ value_name: string;
1076
+ }[] | undefined;
1077
+ images?: string[] | undefined;
1078
+ } | undefined;
1079
+ variant_details?: {
1080
+ variant_id: string;
1081
+ properties: Record<string, string>;
1082
+ sku?: string | undefined;
1083
+ } | undefined;
1084
+ scheduled_start?: string | undefined;
1085
+ scheduled_end?: string | undefined;
1086
+ staff_id?: string | undefined;
1087
+ resource_id?: string | undefined;
1088
+ service_status?: "pending" | "confirmed" | "completed" | "cancelled" | undefined;
1089
+ confirmation_code?: string | undefined;
1090
+ special_instructions?: string | undefined;
1091
+ customer_inputs?: {
1092
+ field_id: string;
1093
+ value: unknown;
1094
+ field_name?: string | undefined;
1095
+ field_type?: string | undefined;
1096
+ }[] | undefined;
1097
+ bundle_selections?: unknown;
1098
+ bundle_resolved?: {
1099
+ [x: string]: unknown;
1100
+ bundle_id: string;
1101
+ selections: unknown[];
1102
+ } | undefined;
1103
+ composite_selections?: unknown;
1104
+ composite_resolved?: {
1105
+ [x: string]: unknown;
1106
+ composite_id: string;
1107
+ selections: unknown[];
1108
+ breakdown?: {
1109
+ base_price: string;
1110
+ components_total: string;
1111
+ final_price: string;
1112
+ tier_applied?: string | undefined;
1113
+ } | undefined;
1114
+ } | undefined;
1115
+ billing_plan_id?: string | undefined;
1116
+ discount_details?: {
1117
+ applied_count: number;
1118
+ total_amount: string;
1119
+ discount_ids: string[];
1120
+ } | undefined;
1121
+ metadata?: Record<string, unknown> | undefined;
1122
+ }[];
1123
+ pricing: {
1124
+ subtotal: string;
1125
+ total_discounts: string;
1126
+ tax_amount: string;
1127
+ service_charge: string;
1128
+ total_price: string;
1129
+ currency: string;
1130
+ tax_rate?: string | undefined;
1131
+ service_charge_rate?: string | undefined;
1132
+ };
1133
+ customer_info: {
1134
+ name: string;
1135
+ email?: string | undefined;
1136
+ phone?: string | undefined;
1137
+ address?: string | undefined;
1138
+ };
1139
+ created_at: string;
1140
+ updated_at: string;
1141
+ expires_at: string;
1142
+ status: string;
1143
+ source: string;
1144
+ channel: string;
1145
+ };
1146
+
1147
+ /**
1148
+ * Checkout schemas — request body and response shapes for `POST /checkout`
1149
+ * and the subsequent `POST /payments/authorization` flow.
1150
+ */
1151
+
1152
+ declare const CheckoutCustomerSchema: z.ZodObject<{
1153
+ name: z.ZodString;
1154
+ email: z.ZodString;
1155
+ phone: z.ZodString;
1156
+ notes: z.ZodOptional<z.ZodString>;
1157
+ save_details: z.ZodOptional<z.ZodBoolean>;
1158
+ }, z.core.$strip>;
1159
+ declare const CheckoutBodySchema: z.ZodObject<{
1160
+ cart_id: z.ZodString;
1161
+ location_id: z.ZodOptional<z.ZodString>;
1162
+ customer: z.ZodObject<{
1163
+ name: z.ZodString;
1164
+ email: z.ZodString;
1165
+ phone: z.ZodString;
1166
+ notes: z.ZodOptional<z.ZodString>;
1167
+ save_details: z.ZodOptional<z.ZodBoolean>;
1168
+ }, z.core.$strip>;
1169
+ order_type: z.ZodString;
1170
+ address_info: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1171
+ payment_method: z.ZodString;
1172
+ mobile_money_details: z.ZodOptional<z.ZodObject<{
1173
+ phone_number: z.ZodString;
1174
+ provider: z.ZodString;
1175
+ }, z.core.$strip>>;
1176
+ special_instructions: z.ZodOptional<z.ZodString>;
1177
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1178
+ pay_currency: z.ZodOptional<z.ZodString>;
1179
+ fx_quote_id: z.ZodOptional<z.ZodString>;
1180
+ }, z.core.$strip>;
1181
+ type CheckoutBody = z.infer<typeof CheckoutBodySchema>;
1182
+ declare const assertCheckoutBody: (value: unknown) => asserts value is {
1183
+ cart_id: string;
1184
+ customer: {
1185
+ name: string;
1186
+ email: string;
1187
+ phone: string;
1188
+ notes?: string | undefined;
1189
+ save_details?: boolean | undefined;
1190
+ };
1191
+ order_type: string;
1192
+ payment_method: string;
1193
+ location_id?: string | undefined;
1194
+ address_info?: Record<string, unknown> | undefined;
1195
+ mobile_money_details?: {
1196
+ phone_number: string;
1197
+ provider: string;
1198
+ } | undefined;
1199
+ special_instructions?: string | undefined;
1200
+ metadata?: Record<string, unknown> | undefined;
1201
+ pay_currency?: string | undefined;
1202
+ fx_quote_id?: string | undefined;
1203
+ };
1204
+ declare const AuthorizationTypeSchema: z.ZodEnum<{
1205
+ phone: "phone";
1206
+ otp: "otp";
1207
+ pin: "pin";
1208
+ birthday: "birthday";
1209
+ address: "address";
1210
+ }>;
1211
+ declare const NextActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1212
+ type: z.ZodLiteral<"none">;
1213
+ }, z.core.$strip>, z.ZodObject<{
1214
+ type: z.ZodLiteral<"redirect">;
1215
+ authorization_url: z.ZodString;
1216
+ }, z.core.$strip>, z.ZodObject<{
1217
+ type: z.ZodLiteral<"authorization">;
1218
+ authorization_type: z.ZodString;
1219
+ display_text: z.ZodOptional<z.ZodString>;
1220
+ }, z.core.$strip>], "type">;
1221
+ declare const CheckoutResponseSchema: z.ZodObject<{
1222
+ order_id: z.ZodString;
1223
+ order_number: z.ZodString;
1224
+ payment_status: z.ZodString;
1225
+ payment_reference: z.ZodOptional<z.ZodString>;
1226
+ requires_authorization: z.ZodBoolean;
1227
+ authorization_type: z.ZodOptional<z.ZodEnum<{
1228
+ phone: "phone";
1229
+ otp: "otp";
1230
+ pin: "pin";
1231
+ birthday: "birthday";
1232
+ address: "address";
1233
+ }>>;
1234
+ next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
1235
+ type: z.ZodLiteral<"none">;
1236
+ }, z.core.$strip>, z.ZodObject<{
1237
+ type: z.ZodLiteral<"redirect">;
1238
+ authorization_url: z.ZodString;
1239
+ }, z.core.$strip>, z.ZodObject<{
1240
+ type: z.ZodLiteral<"authorization">;
1241
+ authorization_type: z.ZodString;
1242
+ display_text: z.ZodOptional<z.ZodString>;
1243
+ }, z.core.$strip>], "type">;
1244
+ provider: z.ZodOptional<z.ZodString>;
1245
+ authorization_url: z.ZodOptional<z.ZodString>;
1246
+ display_text: z.ZodOptional<z.ZodString>;
1247
+ bill_token: z.ZodOptional<z.ZodString>;
1248
+ client_secret: z.ZodOptional<z.ZodString>;
1249
+ public_key: z.ZodOptional<z.ZodString>;
1250
+ }, z.core.$strip>;
1251
+ type CheckoutResponse = z.infer<typeof CheckoutResponseSchema>;
1252
+ declare const assertCheckoutResponse: (value: unknown) => asserts value is {
1253
+ order_id: string;
1254
+ order_number: string;
1255
+ payment_status: string;
1256
+ requires_authorization: boolean;
1257
+ next_action: {
1258
+ type: "none";
1259
+ } | {
1260
+ type: "redirect";
1261
+ authorization_url: string;
1262
+ } | {
1263
+ type: "authorization";
1264
+ authorization_type: string;
1265
+ display_text?: string | undefined;
1266
+ };
1267
+ payment_reference?: string | undefined;
1268
+ authorization_type?: "phone" | "otp" | "pin" | "birthday" | "address" | undefined;
1269
+ provider?: string | undefined;
1270
+ authorization_url?: string | undefined;
1271
+ display_text?: string | undefined;
1272
+ bill_token?: string | undefined;
1273
+ client_secret?: string | undefined;
1274
+ public_key?: string | undefined;
1275
+ };
1276
+
1277
+ /**
1278
+ * Test client + fixtures.
1279
+ *
1280
+ * Spins up an in-process Hono mock and a typed SDK client wired to it
1281
+ * via the SDK's first-class `fetch` injection — no global mutation,
1282
+ * no port, no MSW. Tests in the same module run in parallel safely.
1283
+ *
1284
+ * import { createTestClient, fixtures } from "@cimplify/sdk/testing";
1285
+ *
1286
+ * const handle = createTestClient({ seed: "fashion" });
1287
+ * try {
1288
+ * const item = await fixtures.addFirstProduct(handle.client);
1289
+ * expect(item.product.name).toBeTruthy();
1290
+ * } finally {
1291
+ * handle.dispose();
1292
+ * }
1293
+ */
1294
+
1295
+ interface TestClientHandle {
1296
+ /** Typed SDK client routed to the in-process mock. */
1297
+ client: CimplifyClient;
1298
+ /** Direct access to the mock — registry, deps, request shortcut. */
1299
+ mock: AppHandle;
1300
+ /** Reset all in-memory state (cart, orders, sessions). Token persists. */
1301
+ reset: () => void;
1302
+ /** Drop all state + session. Always safe to call multiple times. */
1303
+ dispose: () => void;
1304
+ }
1305
+ /**
1306
+ * Create an in-process mock + a typed SDK client wired to it.
1307
+ *
1308
+ * Each call gets its OWN session token — tests in the same module
1309
+ * run safely in parallel because there's no shared global state.
1310
+ */
1311
+ declare function createTestClient(options?: CreateAppOptions): TestClientHandle;
1312
+ interface ProductSummary {
1313
+ id: string;
1314
+ name: string;
1315
+ slug: string;
1316
+ type?: string;
1317
+ }
1318
+ interface AddFirstProductOptions {
1319
+ /** Pick a specific product by slug instead of "first". */
1320
+ slug?: string;
1321
+ /** Auto-pick the first available variant if the product has variants. Default true. */
1322
+ withVariant?: boolean;
1323
+ }
1324
+ interface AddFirstProductResult {
1325
+ product: ProductSummary;
1326
+ variantId?: string;
1327
+ }
1328
+ /**
1329
+ * Pre-baked fixture functions for common test setup. Use these to keep
1330
+ * tests focused on the assertion you care about, not on plumbing.
1331
+ */
1332
+ declare const fixtures: {
1333
+ /**
1334
+ * Add the first available product (or a named one) to the cart.
1335
+ * Picks the first variant if the product has variants.
1336
+ */
1337
+ addFirstProduct(client: CimplifyClient, opts?: AddFirstProductOptions): Promise<AddFirstProductResult>;
1338
+ /** A minimal valid customer object for checkout. */
1339
+ customer(overrides?: Partial<{
1340
+ name: string;
1341
+ email: string;
1342
+ phone: string;
1343
+ }>): {
1344
+ name: string;
1345
+ email: string;
1346
+ phone: string;
1347
+ };
1348
+ /**
1349
+ * Run the full guest auth flow (request OTP → verify) and return
1350
+ * the new session token. The mock's permissive auth mode echoes
1351
+ * the code in `request_otp`, so we don't need to read it.
1352
+ */
1353
+ authenticate(client: CimplifyClient, contact?: string, code?: string): Promise<{
1354
+ token: string;
1355
+ customerId: string;
1356
+ }>;
1357
+ };
1358
+
1359
+ export { type AddFirstProductOptions, type AddFirstProductResult, type AddItemPayload, AddItemPayloadSchema, AddOnDetailsSchema, 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, CompositeResolvedSchema, CompositeSelectionInputSchema, CountryCodeSchema, CurrencyCodeSchema, CustomerInputValueSchema, DiscountDetailsSchema, IsoDateTimeSchema, LineTypeSchema, LocaleSchema, MoneyLooseSchema, MoneySchema, NextActionSchema, PhoneE164Schema, type ProductSummary, ProductTypeSchema, SCHEMA_VERSION, SchemaViolationError, SeedNameSchema, ServiceStatusSchema, type TestClientHandle, TimestampSchema, VariantDetailsSchema, VariantDisplayAttributeSchema, VariantInfoSchema, assertAddItemPayload, assertBrand, assertCart, assertCartItem, assertCheckoutBody, assertCheckoutResponse, createTestClient, fixtures, makeAssertion };