@cimplify/sdk 0.44.16 → 0.44.19
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.
- package/dist/advanced.js +22 -21
- package/dist/advanced.mjs +3 -2
- package/dist/{chunk-MBGQP6FZ.js → chunk-3FS3ZDKX.js} +60 -60
- package/dist/{chunk-UXLQ7WXI.mjs → chunk-5OK3YDZC.mjs} +2 -2
- package/dist/{chunk-MNIKXG7W.js → chunk-BN2CXGMO.js} +5 -272
- package/dist/chunk-GLOO4HUN.mjs +676 -0
- package/dist/{chunk-CFD4J32N.js → chunk-HBRCVJL4.js} +22 -21
- package/dist/{chunk-ZLEFMQC6.mjs → chunk-KSKZAXG2.mjs} +4 -498
- package/dist/{chunk-6AZZ6AOF.mjs → chunk-NRT6PVW5.mjs} +4 -251
- package/dist/{chunk-XL4CX75J.js → chunk-PGSM3NQ2.js} +237 -781
- package/dist/chunk-Q4I7JRGO.js +733 -0
- package/dist/chunk-QBQCMQ4F.js +271 -0
- package/dist/chunk-XPXAZXF2.mjs +250 -0
- package/dist/{chunk-7NML226B.mjs → chunk-XZPO5GEM.mjs} +2 -1
- package/dist/client-B_Ei3ENB.d.mts +86 -0
- package/dist/client-Bep2FooI.d.ts +86 -0
- package/dist/index.js +145 -144
- package/dist/index.mjs +4 -3
- package/dist/mock/cli.mjs +2 -0
- package/dist/mock/library.js +2 -0
- package/dist/mock/library.mjs +2 -0
- package/dist/mock/msw.js +2 -0
- package/dist/mock/msw.mjs +2 -0
- package/dist/react.js +81 -80
- package/dist/react.mjs +4 -3
- package/dist/server.js +6 -5
- package/dist/server.mjs +4 -3
- package/dist/testing/msw.d.mts +17 -0
- package/dist/testing/msw.d.ts +17 -0
- package/dist/testing/msw.js +42 -0
- package/dist/testing/msw.mjs +40 -0
- package/dist/testing/suite.d.mts +25 -0
- package/dist/testing/suite.d.ts +25 -0
- package/dist/testing/suite.js +28 -23
- package/dist/testing/suite.mjs +9 -4
- package/dist/testing.d.mts +963 -135
- package/dist/testing.d.ts +963 -135
- package/dist/testing.js +123 -59
- package/dist/testing.mjs +51 -4
- package/dist/utils.js +29 -28
- package/dist/utils.mjs +2 -1
- package/package.json +11 -2
package/dist/testing.d.ts
CHANGED
|
@@ -1,15 +1,42 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
|
|
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-Bep2FooI.js';
|
|
4
|
+
import './client-D6ZisKco.js';
|
|
4
5
|
import './payment-DA1i5hhk.js';
|
|
6
|
+
import './server-CWpUlLOQ.js';
|
|
5
7
|
import 'hono';
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
10
|
+
* Cimplify schema registry. Every public schema in this directory is
|
|
11
|
+
* registered here with `id`, `description`, and `version` metadata.
|
|
12
|
+
*
|
|
13
|
+
* import { cimplifyRegistry } from "@cimplify/sdk/testing";
|
|
14
|
+
* const meta = cimplifyRegistry.get(CartSchema); // { id, description, version }
|
|
15
|
+
*
|
|
16
|
+
* Per-schema versions let consumers pin to a specific shape and detect
|
|
17
|
+
* drift when only one schema changes (vs a single global SCHEMA_VERSION
|
|
18
|
+
* which gives false positives on every release).
|
|
19
|
+
*
|
|
20
|
+
* The registry feeds `z.toJSONSchema()` so emitted JSON Schemas have
|
|
21
|
+
* proper `$id` / `description` / clean `$defs` for downstream tooling
|
|
22
|
+
* (OpenAPI, agent prompts, codegen).
|
|
23
|
+
*/
|
|
24
|
+
interface CimplifySchemaMeta {
|
|
25
|
+
id: string;
|
|
26
|
+
description: string;
|
|
27
|
+
/** Bump when the shape of THIS schema changes in a breaking way. */
|
|
28
|
+
version: string;
|
|
29
|
+
}
|
|
30
|
+
declare const cimplifyRegistry: z.core.$ZodRegistry<CimplifySchemaMeta, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
31
|
+
/**
|
|
32
|
+
* Helper: register a schema with metadata and return it. Pattern is:
|
|
33
|
+
*
|
|
34
|
+
* export const MoneySchema = registerSchema(
|
|
35
|
+
* z.string().regex(...),
|
|
36
|
+
* { id: "Money", description: "Decimal money string", version: "1.0.0" },
|
|
37
|
+
* );
|
|
11
38
|
*/
|
|
12
|
-
declare
|
|
39
|
+
declare function registerSchema<T extends $ZodType>(schema: T, meta: CimplifySchemaMeta): T;
|
|
13
40
|
/**
|
|
14
41
|
* Strict money — exactly two decimal places. Backend always serializes
|
|
15
42
|
* decimals to 2dp; consumer code that produces "12.5" or "12.555" is wrong.
|
|
@@ -18,30 +45,16 @@ declare const SCHEMA_VERSION: "2026-05-07.1";
|
|
|
18
45
|
* (rare; usually FX / tax-rate display), use `MoneyLooseSchema`.
|
|
19
46
|
*/
|
|
20
47
|
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
48
|
declare const MoneyLooseSchema: z.ZodString;
|
|
26
|
-
/** Strict ISO 8601 date-time. */
|
|
27
49
|
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
50
|
declare const TimestampSchema: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
34
|
-
/** ISO 4217 currency code (3 letters). */
|
|
35
51
|
declare const CurrencyCodeSchema: z.ZodString;
|
|
36
|
-
/** ISO 3166-1 alpha-2 country code. */
|
|
37
52
|
declare const CountryCodeSchema: z.ZodString;
|
|
38
|
-
/** BCP-47-ish locale (e.g. "en", "en_GH", "fr_FR"). */
|
|
39
53
|
declare const LocaleSchema: z.ZodString;
|
|
40
|
-
/** E.164-ish phone — digits with optional leading `+`. */
|
|
41
54
|
declare const PhoneE164Schema: z.ZodString;
|
|
42
55
|
declare const SeedNameSchema: z.ZodEnum<{
|
|
43
|
-
empty: "empty";
|
|
44
56
|
default: "default";
|
|
57
|
+
empty: "empty";
|
|
45
58
|
"reesa-storefront": "reesa-storefront";
|
|
46
59
|
restaurant: "restaurant";
|
|
47
60
|
retail: "retail";
|
|
@@ -57,11 +70,11 @@ declare const ProductTypeSchema: z.ZodEnum<{
|
|
|
57
70
|
composite: "composite";
|
|
58
71
|
}>;
|
|
59
72
|
declare const LineTypeSchema: z.ZodEnum<{
|
|
60
|
-
simple: "simple";
|
|
61
73
|
service: "service";
|
|
62
74
|
digital: "digital";
|
|
63
75
|
bundle: "bundle";
|
|
64
76
|
composite: "composite";
|
|
77
|
+
simple: "simple";
|
|
65
78
|
}>;
|
|
66
79
|
declare const ServiceStatusSchema: z.ZodEnum<{
|
|
67
80
|
pending: "pending";
|
|
@@ -69,29 +82,52 @@ declare const ServiceStatusSchema: z.ZodEnum<{
|
|
|
69
82
|
completed: "completed";
|
|
70
83
|
cancelled: "cancelled";
|
|
71
84
|
}>;
|
|
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
85
|
/**
|
|
81
86
|
* Structured error thrown by every `assertX` helper. Agents can catch
|
|
82
87
|
* this and surface the issue list directly (e.g. in a toast or log).
|
|
88
|
+
*
|
|
89
|
+
* Compatible with RFC 7807 Problem Details: `toJSON()` produces a
|
|
90
|
+
* `{ type, title, status, detail, errors }` envelope where `errors`
|
|
91
|
+
* is the typed zod issue array.
|
|
83
92
|
*/
|
|
84
93
|
declare class SchemaViolationError extends Error {
|
|
85
|
-
readonly
|
|
94
|
+
readonly label: string;
|
|
95
|
+
readonly issues: ReadonlyArray<{
|
|
86
96
|
path: string[];
|
|
87
97
|
message: string;
|
|
98
|
+
code?: string;
|
|
88
99
|
}>;
|
|
89
100
|
readonly name = "SchemaViolationError";
|
|
90
|
-
constructor(message: string, issues:
|
|
101
|
+
constructor(message: string, label: string, issues: ReadonlyArray<{
|
|
91
102
|
path: string[];
|
|
92
103
|
message: string;
|
|
104
|
+
code?: string;
|
|
93
105
|
}>);
|
|
106
|
+
toJSON(): {
|
|
107
|
+
type: string;
|
|
108
|
+
title: string;
|
|
109
|
+
status: number;
|
|
110
|
+
detail: string;
|
|
111
|
+
errors: ReadonlyArray<{
|
|
112
|
+
path: string[];
|
|
113
|
+
message: string;
|
|
114
|
+
code?: string;
|
|
115
|
+
}>;
|
|
116
|
+
};
|
|
94
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Build a typed assertion from any zod schema. Single source of the
|
|
120
|
+
* "parse → format → throw" pattern. Powered by zod 4's built-in
|
|
121
|
+
* `z.prettifyError` for human-readable output.
|
|
122
|
+
*
|
|
123
|
+
* const assertCart = makeAssertion(CartSchema, "cart");
|
|
124
|
+
* assertCart(value); // throws SchemaViolationError with structured issues
|
|
125
|
+
*
|
|
126
|
+
* Generic over `$ZodType` (zod/v4/core), so both classic Zod schemas
|
|
127
|
+
* and Zod Mini schemas work — required for library authors per the
|
|
128
|
+
* official Zod 4 guidance.
|
|
129
|
+
*/
|
|
130
|
+
declare function makeAssertion<T extends $ZodType>(schema: T, label: string): (value: unknown) => asserts value is z.infer<T>;
|
|
95
131
|
|
|
96
132
|
/**
|
|
97
133
|
* Brand schema — the contract for `lib/brand.ts` in every storefront.
|
|
@@ -331,8 +367,8 @@ declare const BrandSchema: z.ZodObject<{
|
|
|
331
367
|
}, z.core.$strip>;
|
|
332
368
|
mock: z.ZodObject<{
|
|
333
369
|
seed: z.ZodEnum<{
|
|
334
|
-
empty: "empty";
|
|
335
370
|
default: "default";
|
|
371
|
+
empty: "empty";
|
|
336
372
|
"reesa-storefront": "reesa-storefront";
|
|
337
373
|
restaurant: "restaurant";
|
|
338
374
|
retail: "retail";
|
|
@@ -496,7 +532,7 @@ declare const assertBrand: (value: unknown) => asserts value is {
|
|
|
496
532
|
summary: string;
|
|
497
533
|
};
|
|
498
534
|
mock: {
|
|
499
|
-
seed: "
|
|
535
|
+
seed: "default" | "empty" | "reesa-storefront" | "restaurant" | "retail" | "services" | "grocery" | "fashion";
|
|
500
536
|
businessId: string;
|
|
501
537
|
};
|
|
502
538
|
trustItems?: {
|
|
@@ -631,7 +667,9 @@ declare const VariantInfoSchema: z.ZodObject<{
|
|
|
631
667
|
id: z.ZodString;
|
|
632
668
|
name: z.ZodString;
|
|
633
669
|
sku: z.ZodOptional<z.ZodString>;
|
|
670
|
+
price: z.ZodString;
|
|
634
671
|
price_adjustment: z.ZodString;
|
|
672
|
+
is_default: z.ZodBoolean;
|
|
635
673
|
display_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
636
674
|
axis_id: z.ZodString;
|
|
637
675
|
axis_name: z.ZodString;
|
|
@@ -653,10 +691,68 @@ declare const ChosenPriceSchema: z.ZodObject<{
|
|
|
653
691
|
markup_discount_percentage: z.ZodString;
|
|
654
692
|
markup_discount_amount: z.ZodString;
|
|
655
693
|
}, z.core.$strip>;
|
|
694
|
+
declare const SelectedAddOnOptionSchema: z.ZodObject<{
|
|
695
|
+
option_id: z.ZodString;
|
|
696
|
+
add_on_id: z.ZodString;
|
|
697
|
+
name: z.ZodString;
|
|
698
|
+
price: z.ZodString;
|
|
699
|
+
quantity: z.ZodNumber;
|
|
700
|
+
is_required: z.ZodBoolean;
|
|
701
|
+
selected_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
702
|
+
price_info: z.ZodOptional<z.ZodUnknown>;
|
|
703
|
+
}, z.core.$strip>;
|
|
704
|
+
declare const AddOnInDetailsSchema: z.ZodObject<{
|
|
705
|
+
add_on_id: z.ZodString;
|
|
706
|
+
name: z.ZodString;
|
|
707
|
+
min_selections: z.ZodNumber;
|
|
708
|
+
max_selections: z.ZodNumber;
|
|
709
|
+
selected_options: z.ZodArray<z.ZodString>;
|
|
710
|
+
is_required: z.ZodBoolean;
|
|
711
|
+
}, z.core.$strip>;
|
|
656
712
|
declare const AddOnDetailsSchema: z.ZodObject<{
|
|
657
|
-
selected_options: z.ZodArray<z.
|
|
713
|
+
selected_options: z.ZodArray<z.ZodObject<{
|
|
714
|
+
option_id: z.ZodString;
|
|
715
|
+
add_on_id: z.ZodString;
|
|
716
|
+
name: z.ZodString;
|
|
717
|
+
price: z.ZodString;
|
|
718
|
+
quantity: z.ZodNumber;
|
|
719
|
+
is_required: z.ZodBoolean;
|
|
720
|
+
selected_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
721
|
+
price_info: z.ZodOptional<z.ZodUnknown>;
|
|
722
|
+
}, z.core.$strip>>;
|
|
658
723
|
total_add_on_price: z.ZodString;
|
|
659
|
-
add_ons: z.ZodArray<z.
|
|
724
|
+
add_ons: z.ZodArray<z.ZodObject<{
|
|
725
|
+
add_on_id: z.ZodString;
|
|
726
|
+
name: z.ZodString;
|
|
727
|
+
min_selections: z.ZodNumber;
|
|
728
|
+
max_selections: z.ZodNumber;
|
|
729
|
+
selected_options: z.ZodArray<z.ZodString>;
|
|
730
|
+
is_required: z.ZodBoolean;
|
|
731
|
+
}, z.core.$strip>>;
|
|
732
|
+
}, z.core.$strip>;
|
|
733
|
+
declare const AddOnOptionDetailsSchema: z.ZodObject<{
|
|
734
|
+
id: z.ZodString;
|
|
735
|
+
name: z.ZodString;
|
|
736
|
+
is_required: z.ZodBoolean;
|
|
737
|
+
description: z.ZodOptional<z.ZodString>;
|
|
738
|
+
price: z.ZodOptional<z.ZodString>;
|
|
739
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
740
|
+
}, z.core.$strip>;
|
|
741
|
+
declare const AddOnGroupDetailsSchema: z.ZodObject<{
|
|
742
|
+
id: z.ZodString;
|
|
743
|
+
name: z.ZodString;
|
|
744
|
+
is_multiple_allowed: z.ZodBoolean;
|
|
745
|
+
min_selections: z.ZodNumber;
|
|
746
|
+
max_selections: z.ZodNumber;
|
|
747
|
+
required: z.ZodBoolean;
|
|
748
|
+
options: z.ZodArray<z.ZodObject<{
|
|
749
|
+
id: z.ZodString;
|
|
750
|
+
name: z.ZodString;
|
|
751
|
+
is_required: z.ZodBoolean;
|
|
752
|
+
description: z.ZodOptional<z.ZodString>;
|
|
753
|
+
price: z.ZodOptional<z.ZodString>;
|
|
754
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
755
|
+
}, z.core.$strip>>;
|
|
660
756
|
}, z.core.$strip>;
|
|
661
757
|
declare const BundleResolvedSchema: z.ZodObject<{
|
|
662
758
|
bundle_id: z.ZodString;
|
|
@@ -684,11 +780,11 @@ declare const CartItemSchema: z.ZodObject<{
|
|
|
684
780
|
quantity: z.ZodNumber;
|
|
685
781
|
line_key: z.ZodString;
|
|
686
782
|
line_type: z.ZodEnum<{
|
|
687
|
-
simple: "simple";
|
|
688
783
|
service: "service";
|
|
689
784
|
digital: "digital";
|
|
690
785
|
bundle: "bundle";
|
|
691
786
|
composite: "composite";
|
|
787
|
+
simple: "simple";
|
|
692
788
|
}>;
|
|
693
789
|
name: z.ZodString;
|
|
694
790
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -702,7 +798,9 @@ declare const CartItemSchema: z.ZodObject<{
|
|
|
702
798
|
id: z.ZodString;
|
|
703
799
|
name: z.ZodString;
|
|
704
800
|
sku: z.ZodOptional<z.ZodString>;
|
|
801
|
+
price: z.ZodString;
|
|
705
802
|
price_adjustment: z.ZodString;
|
|
803
|
+
is_default: z.ZodBoolean;
|
|
706
804
|
display_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
707
805
|
axis_id: z.ZodString;
|
|
708
806
|
axis_name: z.ZodString;
|
|
@@ -731,12 +829,50 @@ declare const CartItemSchema: z.ZodObject<{
|
|
|
731
829
|
add_on_option_ids: z.ZodArray<z.ZodString>;
|
|
732
830
|
add_on_ids: z.ZodArray<z.ZodString>;
|
|
733
831
|
add_on_details: z.ZodObject<{
|
|
734
|
-
selected_options: z.ZodArray<z.
|
|
832
|
+
selected_options: z.ZodArray<z.ZodObject<{
|
|
833
|
+
option_id: z.ZodString;
|
|
834
|
+
add_on_id: z.ZodString;
|
|
835
|
+
name: z.ZodString;
|
|
836
|
+
price: z.ZodString;
|
|
837
|
+
quantity: z.ZodNumber;
|
|
838
|
+
is_required: z.ZodBoolean;
|
|
839
|
+
selected_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
840
|
+
price_info: z.ZodOptional<z.ZodUnknown>;
|
|
841
|
+
}, z.core.$strip>>;
|
|
735
842
|
total_add_on_price: z.ZodString;
|
|
736
|
-
add_ons: z.ZodArray<z.
|
|
843
|
+
add_ons: z.ZodArray<z.ZodObject<{
|
|
844
|
+
add_on_id: z.ZodString;
|
|
845
|
+
name: z.ZodString;
|
|
846
|
+
min_selections: z.ZodNumber;
|
|
847
|
+
max_selections: z.ZodNumber;
|
|
848
|
+
selected_options: z.ZodArray<z.ZodString>;
|
|
849
|
+
is_required: z.ZodBoolean;
|
|
850
|
+
}, z.core.$strip>>;
|
|
737
851
|
}, z.core.$strip>;
|
|
738
|
-
add_on_options: z.ZodArray<z.
|
|
739
|
-
|
|
852
|
+
add_on_options: z.ZodArray<z.ZodObject<{
|
|
853
|
+
id: z.ZodString;
|
|
854
|
+
name: z.ZodString;
|
|
855
|
+
is_required: z.ZodBoolean;
|
|
856
|
+
description: z.ZodOptional<z.ZodString>;
|
|
857
|
+
price: z.ZodOptional<z.ZodString>;
|
|
858
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
859
|
+
}, z.core.$strip>>;
|
|
860
|
+
add_ons: z.ZodArray<z.ZodObject<{
|
|
861
|
+
id: z.ZodString;
|
|
862
|
+
name: z.ZodString;
|
|
863
|
+
is_multiple_allowed: z.ZodBoolean;
|
|
864
|
+
min_selections: z.ZodNumber;
|
|
865
|
+
max_selections: z.ZodNumber;
|
|
866
|
+
required: z.ZodBoolean;
|
|
867
|
+
options: z.ZodArray<z.ZodObject<{
|
|
868
|
+
id: z.ZodString;
|
|
869
|
+
name: z.ZodString;
|
|
870
|
+
is_required: z.ZodBoolean;
|
|
871
|
+
description: z.ZodOptional<z.ZodString>;
|
|
872
|
+
price: z.ZodOptional<z.ZodString>;
|
|
873
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
874
|
+
}, z.core.$strip>>;
|
|
875
|
+
}, z.core.$strip>>;
|
|
740
876
|
scheduled_start: z.ZodOptional<z.ZodString>;
|
|
741
877
|
scheduled_end: z.ZodOptional<z.ZodString>;
|
|
742
878
|
staff_id: z.ZodOptional<z.ZodString>;
|
|
@@ -781,15 +917,16 @@ declare const CartItemSchema: z.ZodObject<{
|
|
|
781
917
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
782
918
|
created_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
783
919
|
updated_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
784
|
-
}, z.core.$
|
|
920
|
+
}, z.core.$loose>;
|
|
785
921
|
type CartItem = z.infer<typeof CartItemSchema>;
|
|
786
922
|
declare const assertCartItem: (value: unknown) => asserts value is {
|
|
923
|
+
[x: string]: unknown;
|
|
787
924
|
id: string;
|
|
788
925
|
cart_id: string;
|
|
789
926
|
item_id: string;
|
|
790
927
|
quantity: number;
|
|
791
928
|
line_key: string;
|
|
792
|
-
line_type: "
|
|
929
|
+
line_type: "service" | "digital" | "bundle" | "composite" | "simple";
|
|
793
930
|
name: string;
|
|
794
931
|
is_available: boolean;
|
|
795
932
|
base_price: string;
|
|
@@ -807,12 +944,50 @@ declare const assertCartItem: (value: unknown) => asserts value is {
|
|
|
807
944
|
add_on_option_ids: string[];
|
|
808
945
|
add_on_ids: string[];
|
|
809
946
|
add_on_details: {
|
|
810
|
-
selected_options:
|
|
947
|
+
selected_options: {
|
|
948
|
+
option_id: string;
|
|
949
|
+
add_on_id: string;
|
|
950
|
+
name: string;
|
|
951
|
+
price: string;
|
|
952
|
+
quantity: number;
|
|
953
|
+
is_required: boolean;
|
|
954
|
+
selected_at: string;
|
|
955
|
+
price_info?: unknown;
|
|
956
|
+
}[];
|
|
811
957
|
total_add_on_price: string;
|
|
812
|
-
add_ons:
|
|
958
|
+
add_ons: {
|
|
959
|
+
add_on_id: string;
|
|
960
|
+
name: string;
|
|
961
|
+
min_selections: number;
|
|
962
|
+
max_selections: number;
|
|
963
|
+
selected_options: string[];
|
|
964
|
+
is_required: boolean;
|
|
965
|
+
}[];
|
|
813
966
|
};
|
|
814
|
-
add_on_options:
|
|
815
|
-
|
|
967
|
+
add_on_options: {
|
|
968
|
+
id: string;
|
|
969
|
+
name: string;
|
|
970
|
+
is_required: boolean;
|
|
971
|
+
description?: string | undefined;
|
|
972
|
+
price?: string | undefined;
|
|
973
|
+
image_url?: string | undefined;
|
|
974
|
+
}[];
|
|
975
|
+
add_ons: {
|
|
976
|
+
id: string;
|
|
977
|
+
name: string;
|
|
978
|
+
is_multiple_allowed: boolean;
|
|
979
|
+
min_selections: number;
|
|
980
|
+
max_selections: number;
|
|
981
|
+
required: boolean;
|
|
982
|
+
options: {
|
|
983
|
+
id: string;
|
|
984
|
+
name: string;
|
|
985
|
+
is_required: boolean;
|
|
986
|
+
description?: string | undefined;
|
|
987
|
+
price?: string | undefined;
|
|
988
|
+
image_url?: string | undefined;
|
|
989
|
+
}[];
|
|
990
|
+
}[];
|
|
816
991
|
applied_discount_ids: string[];
|
|
817
992
|
created_at: string;
|
|
818
993
|
updated_at: string;
|
|
@@ -825,7 +1000,9 @@ declare const assertCartItem: (value: unknown) => asserts value is {
|
|
|
825
1000
|
variant_info?: {
|
|
826
1001
|
id: string;
|
|
827
1002
|
name: string;
|
|
1003
|
+
price: string;
|
|
828
1004
|
price_adjustment: string;
|
|
1005
|
+
is_default: boolean;
|
|
829
1006
|
sku?: string | undefined;
|
|
830
1007
|
display_attributes?: {
|
|
831
1008
|
axis_id: string;
|
|
@@ -899,11 +1076,11 @@ declare const CartSchema: z.ZodObject<{
|
|
|
899
1076
|
quantity: z.ZodNumber;
|
|
900
1077
|
line_key: z.ZodString;
|
|
901
1078
|
line_type: z.ZodEnum<{
|
|
902
|
-
simple: "simple";
|
|
903
1079
|
service: "service";
|
|
904
1080
|
digital: "digital";
|
|
905
1081
|
bundle: "bundle";
|
|
906
1082
|
composite: "composite";
|
|
1083
|
+
simple: "simple";
|
|
907
1084
|
}>;
|
|
908
1085
|
name: z.ZodString;
|
|
909
1086
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -917,7 +1094,9 @@ declare const CartSchema: z.ZodObject<{
|
|
|
917
1094
|
id: z.ZodString;
|
|
918
1095
|
name: z.ZodString;
|
|
919
1096
|
sku: z.ZodOptional<z.ZodString>;
|
|
1097
|
+
price: z.ZodString;
|
|
920
1098
|
price_adjustment: z.ZodString;
|
|
1099
|
+
is_default: z.ZodBoolean;
|
|
921
1100
|
display_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
922
1101
|
axis_id: z.ZodString;
|
|
923
1102
|
axis_name: z.ZodString;
|
|
@@ -946,12 +1125,50 @@ declare const CartSchema: z.ZodObject<{
|
|
|
946
1125
|
add_on_option_ids: z.ZodArray<z.ZodString>;
|
|
947
1126
|
add_on_ids: z.ZodArray<z.ZodString>;
|
|
948
1127
|
add_on_details: z.ZodObject<{
|
|
949
|
-
selected_options: z.ZodArray<z.
|
|
1128
|
+
selected_options: z.ZodArray<z.ZodObject<{
|
|
1129
|
+
option_id: z.ZodString;
|
|
1130
|
+
add_on_id: z.ZodString;
|
|
1131
|
+
name: z.ZodString;
|
|
1132
|
+
price: z.ZodString;
|
|
1133
|
+
quantity: z.ZodNumber;
|
|
1134
|
+
is_required: z.ZodBoolean;
|
|
1135
|
+
selected_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
1136
|
+
price_info: z.ZodOptional<z.ZodUnknown>;
|
|
1137
|
+
}, z.core.$strip>>;
|
|
950
1138
|
total_add_on_price: z.ZodString;
|
|
951
|
-
add_ons: z.ZodArray<z.
|
|
1139
|
+
add_ons: z.ZodArray<z.ZodObject<{
|
|
1140
|
+
add_on_id: z.ZodString;
|
|
1141
|
+
name: z.ZodString;
|
|
1142
|
+
min_selections: z.ZodNumber;
|
|
1143
|
+
max_selections: z.ZodNumber;
|
|
1144
|
+
selected_options: z.ZodArray<z.ZodString>;
|
|
1145
|
+
is_required: z.ZodBoolean;
|
|
1146
|
+
}, z.core.$strip>>;
|
|
952
1147
|
}, z.core.$strip>;
|
|
953
|
-
add_on_options: z.ZodArray<z.
|
|
954
|
-
|
|
1148
|
+
add_on_options: z.ZodArray<z.ZodObject<{
|
|
1149
|
+
id: z.ZodString;
|
|
1150
|
+
name: z.ZodString;
|
|
1151
|
+
is_required: z.ZodBoolean;
|
|
1152
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1153
|
+
price: z.ZodOptional<z.ZodString>;
|
|
1154
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
1155
|
+
}, z.core.$strip>>;
|
|
1156
|
+
add_ons: z.ZodArray<z.ZodObject<{
|
|
1157
|
+
id: z.ZodString;
|
|
1158
|
+
name: z.ZodString;
|
|
1159
|
+
is_multiple_allowed: z.ZodBoolean;
|
|
1160
|
+
min_selections: z.ZodNumber;
|
|
1161
|
+
max_selections: z.ZodNumber;
|
|
1162
|
+
required: z.ZodBoolean;
|
|
1163
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1164
|
+
id: z.ZodString;
|
|
1165
|
+
name: z.ZodString;
|
|
1166
|
+
is_required: z.ZodBoolean;
|
|
1167
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1168
|
+
price: z.ZodOptional<z.ZodString>;
|
|
1169
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
1170
|
+
}, z.core.$strip>>;
|
|
1171
|
+
}, z.core.$strip>>;
|
|
955
1172
|
scheduled_start: z.ZodOptional<z.ZodString>;
|
|
956
1173
|
scheduled_end: z.ZodOptional<z.ZodString>;
|
|
957
1174
|
staff_id: z.ZodOptional<z.ZodString>;
|
|
@@ -996,7 +1213,7 @@ declare const CartSchema: z.ZodObject<{
|
|
|
996
1213
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
997
1214
|
created_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
998
1215
|
updated_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
999
|
-
}, z.core.$
|
|
1216
|
+
}, z.core.$loose>>;
|
|
1000
1217
|
pricing: z.ZodObject<{
|
|
1001
1218
|
subtotal: z.ZodString;
|
|
1002
1219
|
total_discounts: z.ZodString;
|
|
@@ -1019,18 +1236,20 @@ declare const CartSchema: z.ZodObject<{
|
|
|
1019
1236
|
status: z.ZodString;
|
|
1020
1237
|
source: z.ZodString;
|
|
1021
1238
|
channel: z.ZodString;
|
|
1022
|
-
}, z.core.$
|
|
1239
|
+
}, z.core.$loose>;
|
|
1023
1240
|
type Cart = z.infer<typeof CartSchema>;
|
|
1024
1241
|
declare const assertCart: (value: unknown) => asserts value is {
|
|
1242
|
+
[x: string]: unknown;
|
|
1025
1243
|
id: string;
|
|
1026
1244
|
business_id: string;
|
|
1027
1245
|
items: {
|
|
1246
|
+
[x: string]: unknown;
|
|
1028
1247
|
id: string;
|
|
1029
1248
|
cart_id: string;
|
|
1030
1249
|
item_id: string;
|
|
1031
1250
|
quantity: number;
|
|
1032
1251
|
line_key: string;
|
|
1033
|
-
line_type: "
|
|
1252
|
+
line_type: "service" | "digital" | "bundle" | "composite" | "simple";
|
|
1034
1253
|
name: string;
|
|
1035
1254
|
is_available: boolean;
|
|
1036
1255
|
base_price: string;
|
|
@@ -1048,12 +1267,50 @@ declare const assertCart: (value: unknown) => asserts value is {
|
|
|
1048
1267
|
add_on_option_ids: string[];
|
|
1049
1268
|
add_on_ids: string[];
|
|
1050
1269
|
add_on_details: {
|
|
1051
|
-
selected_options:
|
|
1270
|
+
selected_options: {
|
|
1271
|
+
option_id: string;
|
|
1272
|
+
add_on_id: string;
|
|
1273
|
+
name: string;
|
|
1274
|
+
price: string;
|
|
1275
|
+
quantity: number;
|
|
1276
|
+
is_required: boolean;
|
|
1277
|
+
selected_at: string;
|
|
1278
|
+
price_info?: unknown;
|
|
1279
|
+
}[];
|
|
1052
1280
|
total_add_on_price: string;
|
|
1053
|
-
add_ons:
|
|
1281
|
+
add_ons: {
|
|
1282
|
+
add_on_id: string;
|
|
1283
|
+
name: string;
|
|
1284
|
+
min_selections: number;
|
|
1285
|
+
max_selections: number;
|
|
1286
|
+
selected_options: string[];
|
|
1287
|
+
is_required: boolean;
|
|
1288
|
+
}[];
|
|
1054
1289
|
};
|
|
1055
|
-
add_on_options:
|
|
1056
|
-
|
|
1290
|
+
add_on_options: {
|
|
1291
|
+
id: string;
|
|
1292
|
+
name: string;
|
|
1293
|
+
is_required: boolean;
|
|
1294
|
+
description?: string | undefined;
|
|
1295
|
+
price?: string | undefined;
|
|
1296
|
+
image_url?: string | undefined;
|
|
1297
|
+
}[];
|
|
1298
|
+
add_ons: {
|
|
1299
|
+
id: string;
|
|
1300
|
+
name: string;
|
|
1301
|
+
is_multiple_allowed: boolean;
|
|
1302
|
+
min_selections: number;
|
|
1303
|
+
max_selections: number;
|
|
1304
|
+
required: boolean;
|
|
1305
|
+
options: {
|
|
1306
|
+
id: string;
|
|
1307
|
+
name: string;
|
|
1308
|
+
is_required: boolean;
|
|
1309
|
+
description?: string | undefined;
|
|
1310
|
+
price?: string | undefined;
|
|
1311
|
+
image_url?: string | undefined;
|
|
1312
|
+
}[];
|
|
1313
|
+
}[];
|
|
1057
1314
|
applied_discount_ids: string[];
|
|
1058
1315
|
created_at: string;
|
|
1059
1316
|
updated_at: string;
|
|
@@ -1066,7 +1323,9 @@ declare const assertCart: (value: unknown) => asserts value is {
|
|
|
1066
1323
|
variant_info?: {
|
|
1067
1324
|
id: string;
|
|
1068
1325
|
name: string;
|
|
1326
|
+
price: string;
|
|
1069
1327
|
price_adjustment: string;
|
|
1328
|
+
is_default: boolean;
|
|
1070
1329
|
sku?: string | undefined;
|
|
1071
1330
|
display_attributes?: {
|
|
1072
1331
|
axis_id: string;
|
|
@@ -1203,10 +1462,10 @@ declare const assertCheckoutBody: (value: unknown) => asserts value is {
|
|
|
1203
1462
|
};
|
|
1204
1463
|
declare const AuthorizationTypeSchema: z.ZodEnum<{
|
|
1205
1464
|
phone: "phone";
|
|
1465
|
+
address: "address";
|
|
1206
1466
|
otp: "otp";
|
|
1207
1467
|
pin: "pin";
|
|
1208
1468
|
birthday: "birthday";
|
|
1209
|
-
address: "address";
|
|
1210
1469
|
}>;
|
|
1211
1470
|
declare const NextActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1212
1471
|
type: z.ZodLiteral<"none">;
|
|
@@ -1226,10 +1485,10 @@ declare const CheckoutResponseSchema: z.ZodObject<{
|
|
|
1226
1485
|
requires_authorization: z.ZodBoolean;
|
|
1227
1486
|
authorization_type: z.ZodOptional<z.ZodEnum<{
|
|
1228
1487
|
phone: "phone";
|
|
1488
|
+
address: "address";
|
|
1229
1489
|
otp: "otp";
|
|
1230
1490
|
pin: "pin";
|
|
1231
1491
|
birthday: "birthday";
|
|
1232
|
-
address: "address";
|
|
1233
1492
|
}>>;
|
|
1234
1493
|
next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1235
1494
|
type: z.ZodLiteral<"none">;
|
|
@@ -1247,9 +1506,10 @@ declare const CheckoutResponseSchema: z.ZodObject<{
|
|
|
1247
1506
|
bill_token: z.ZodOptional<z.ZodString>;
|
|
1248
1507
|
client_secret: z.ZodOptional<z.ZodString>;
|
|
1249
1508
|
public_key: z.ZodOptional<z.ZodString>;
|
|
1250
|
-
}, z.core.$
|
|
1509
|
+
}, z.core.$loose>;
|
|
1251
1510
|
type CheckoutResponse = z.infer<typeof CheckoutResponseSchema>;
|
|
1252
1511
|
declare const assertCheckoutResponse: (value: unknown) => asserts value is {
|
|
1512
|
+
[x: string]: unknown;
|
|
1253
1513
|
order_id: string;
|
|
1254
1514
|
order_number: string;
|
|
1255
1515
|
payment_status: string;
|
|
@@ -1265,7 +1525,7 @@ declare const assertCheckoutResponse: (value: unknown) => asserts value is {
|
|
|
1265
1525
|
display_text?: string | undefined;
|
|
1266
1526
|
};
|
|
1267
1527
|
payment_reference?: string | undefined;
|
|
1268
|
-
authorization_type?: "phone" | "
|
|
1528
|
+
authorization_type?: "phone" | "address" | "otp" | "pin" | "birthday" | undefined;
|
|
1269
1529
|
provider?: string | undefined;
|
|
1270
1530
|
authorization_url?: string | undefined;
|
|
1271
1531
|
display_text?: string | undefined;
|
|
@@ -1275,85 +1535,653 @@ declare const assertCheckoutResponse: (value: unknown) => asserts value is {
|
|
|
1275
1535
|
};
|
|
1276
1536
|
|
|
1277
1537
|
/**
|
|
1278
|
-
*
|
|
1538
|
+
* JSON Schema export — feeds OpenAPI generators, agent prompts,
|
|
1539
|
+
* codegen tooling, and CI contract-snapshot diffs.
|
|
1540
|
+
*
|
|
1541
|
+
* Uses zod 4's built-in `z.toJSONSchema()` with our registry so output
|
|
1542
|
+
* has stable `$id`, `description`, and `$defs` for clean dereferencing.
|
|
1279
1543
|
*
|
|
1280
|
-
*
|
|
1281
|
-
*
|
|
1282
|
-
*
|
|
1544
|
+
* import { exportJsonSchemas } from "@cimplify/sdk/testing";
|
|
1545
|
+
* const schemas = exportJsonSchemas();
|
|
1546
|
+
* // → { Brand: { $id: "Brand", ...}, Cart: {...}, ... }
|
|
1283
1547
|
*
|
|
1284
|
-
*
|
|
1548
|
+
* For a single schema:
|
|
1285
1549
|
*
|
|
1286
|
-
*
|
|
1287
|
-
*
|
|
1288
|
-
*
|
|
1289
|
-
* expect(item.product.name).toBeTruthy();
|
|
1290
|
-
* } finally {
|
|
1291
|
-
* handle.dispose();
|
|
1292
|
-
* }
|
|
1550
|
+
* import { z } from "zod";
|
|
1551
|
+
* import { CartSchema } from "@cimplify/sdk/testing";
|
|
1552
|
+
* const cartJsonSchema = z.toJSONSchema(CartSchema);
|
|
1293
1553
|
*/
|
|
1294
1554
|
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1555
|
+
declare const PUBLIC_SCHEMAS: {
|
|
1556
|
+
readonly Brand: z.ZodObject<{
|
|
1557
|
+
name: z.ZodString;
|
|
1558
|
+
shortName: z.ZodString;
|
|
1559
|
+
microTag: z.ZodString;
|
|
1560
|
+
description: z.ZodString;
|
|
1561
|
+
schemaType: z.ZodString;
|
|
1562
|
+
currency: z.ZodString;
|
|
1563
|
+
locale: z.ZodString;
|
|
1564
|
+
contact: z.ZodObject<{
|
|
1565
|
+
email: z.ZodString;
|
|
1566
|
+
phone: z.ZodString;
|
|
1567
|
+
phoneTel: z.ZodString;
|
|
1568
|
+
streetAddress: z.ZodString;
|
|
1569
|
+
city: z.ZodString;
|
|
1570
|
+
countryCode: z.ZodString;
|
|
1571
|
+
hours: z.ZodOptional<z.ZodString>;
|
|
1572
|
+
}, z.core.$strip>;
|
|
1573
|
+
socials: z.ZodArray<z.ZodObject<{
|
|
1574
|
+
label: z.ZodString;
|
|
1575
|
+
href: z.ZodString;
|
|
1576
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1577
|
+
}, z.core.$strip>>;
|
|
1578
|
+
header: z.ZodObject<{
|
|
1579
|
+
nav: z.ZodArray<z.ZodObject<{
|
|
1580
|
+
label: z.ZodString;
|
|
1581
|
+
href: z.ZodString;
|
|
1582
|
+
}, z.core.$strip>>;
|
|
1583
|
+
}, z.core.$strip>;
|
|
1584
|
+
hero: z.ZodObject<{
|
|
1585
|
+
badge: z.ZodOptional<z.ZodString>;
|
|
1586
|
+
title: z.ZodString;
|
|
1587
|
+
subtitle: z.ZodString;
|
|
1588
|
+
primaryCta: z.ZodOptional<z.ZodObject<{
|
|
1589
|
+
label: z.ZodString;
|
|
1590
|
+
href: z.ZodString;
|
|
1591
|
+
}, z.core.$strip>>;
|
|
1592
|
+
secondaryCta: z.ZodOptional<z.ZodObject<{
|
|
1593
|
+
label: z.ZodString;
|
|
1594
|
+
href: z.ZodString;
|
|
1595
|
+
}, z.core.$strip>>;
|
|
1596
|
+
}, z.core.$strip>;
|
|
1597
|
+
trustItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1598
|
+
title: z.ZodString;
|
|
1599
|
+
body: z.ZodString;
|
|
1600
|
+
}, z.core.$strip>>>;
|
|
1601
|
+
brandStrip: z.ZodOptional<z.ZodObject<{
|
|
1602
|
+
headline: z.ZodString;
|
|
1603
|
+
logos: z.ZodArray<z.ZodString>;
|
|
1604
|
+
}, z.core.$strip>>;
|
|
1605
|
+
promo: z.ZodOptional<z.ZodObject<{
|
|
1606
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1607
|
+
title: z.ZodString;
|
|
1608
|
+
cta: z.ZodObject<{
|
|
1609
|
+
label: z.ZodString;
|
|
1610
|
+
href: z.ZodString;
|
|
1611
|
+
}, z.core.$strip>;
|
|
1612
|
+
}, z.core.$strip>>;
|
|
1613
|
+
terms: z.ZodObject<{
|
|
1614
|
+
eyebrow: z.ZodString;
|
|
1615
|
+
title: z.ZodString;
|
|
1616
|
+
lastUpdated: z.ZodString;
|
|
1617
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
1618
|
+
heading: z.ZodString;
|
|
1619
|
+
body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1620
|
+
intro: z.ZodString;
|
|
1621
|
+
bullets: z.ZodArray<z.ZodString>;
|
|
1622
|
+
}, z.core.$strip>]>;
|
|
1623
|
+
}, z.core.$strip>>;
|
|
1624
|
+
}, z.core.$strip>;
|
|
1625
|
+
privacy: z.ZodObject<{
|
|
1626
|
+
eyebrow: z.ZodString;
|
|
1627
|
+
title: z.ZodString;
|
|
1628
|
+
lastUpdated: z.ZodString;
|
|
1629
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
1630
|
+
heading: z.ZodString;
|
|
1631
|
+
body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1632
|
+
intro: z.ZodString;
|
|
1633
|
+
bullets: z.ZodArray<z.ZodString>;
|
|
1634
|
+
}, z.core.$strip>]>;
|
|
1635
|
+
}, z.core.$strip>>;
|
|
1636
|
+
}, z.core.$strip>;
|
|
1637
|
+
shipping: z.ZodObject<{
|
|
1638
|
+
eyebrow: z.ZodString;
|
|
1639
|
+
title: z.ZodString;
|
|
1640
|
+
lastUpdated: z.ZodString;
|
|
1641
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
1642
|
+
heading: z.ZodString;
|
|
1643
|
+
body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1644
|
+
intro: z.ZodString;
|
|
1645
|
+
bullets: z.ZodArray<z.ZodString>;
|
|
1646
|
+
}, z.core.$strip>]>;
|
|
1647
|
+
}, z.core.$strip>>;
|
|
1648
|
+
}, z.core.$strip>;
|
|
1649
|
+
returns: z.ZodObject<{
|
|
1650
|
+
eyebrow: z.ZodString;
|
|
1651
|
+
title: z.ZodString;
|
|
1652
|
+
lastUpdated: z.ZodString;
|
|
1653
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
1654
|
+
heading: z.ZodString;
|
|
1655
|
+
body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1656
|
+
intro: z.ZodString;
|
|
1657
|
+
bullets: z.ZodArray<z.ZodString>;
|
|
1658
|
+
}, z.core.$strip>]>;
|
|
1659
|
+
}, z.core.$strip>>;
|
|
1660
|
+
}, z.core.$strip>;
|
|
1661
|
+
accessibility: z.ZodObject<{
|
|
1662
|
+
eyebrow: z.ZodString;
|
|
1663
|
+
title: z.ZodString;
|
|
1664
|
+
lastUpdated: z.ZodString;
|
|
1665
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
1666
|
+
heading: z.ZodString;
|
|
1667
|
+
body: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1668
|
+
intro: z.ZodString;
|
|
1669
|
+
bullets: z.ZodArray<z.ZodString>;
|
|
1670
|
+
}, z.core.$strip>]>;
|
|
1671
|
+
}, z.core.$strip>>;
|
|
1672
|
+
}, z.core.$strip>;
|
|
1673
|
+
newsletter: z.ZodObject<{
|
|
1674
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1675
|
+
title: z.ZodString;
|
|
1676
|
+
body: z.ZodString;
|
|
1677
|
+
}, z.core.$strip>;
|
|
1678
|
+
about: z.ZodObject<{
|
|
1679
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1680
|
+
title: z.ZodString;
|
|
1681
|
+
body: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
1682
|
+
}, z.core.$strip>;
|
|
1683
|
+
faq: z.ZodObject<{
|
|
1684
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1685
|
+
title: z.ZodString;
|
|
1686
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
1687
|
+
title: z.ZodString;
|
|
1688
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1689
|
+
q: z.ZodString;
|
|
1690
|
+
a: z.ZodString;
|
|
1691
|
+
}, z.core.$strip>>;
|
|
1692
|
+
}, z.core.$strip>>;
|
|
1693
|
+
}, z.core.$strip>;
|
|
1694
|
+
account: z.ZodObject<{
|
|
1695
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1696
|
+
title: z.ZodString;
|
|
1697
|
+
signin: z.ZodOptional<z.ZodObject<{
|
|
1698
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1699
|
+
title: z.ZodString;
|
|
1700
|
+
}, z.core.$strip>>;
|
|
1701
|
+
signup: z.ZodOptional<z.ZodObject<{
|
|
1702
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1703
|
+
title: z.ZodString;
|
|
1704
|
+
}, z.core.$strip>>;
|
|
1705
|
+
}, z.core.$strip>;
|
|
1706
|
+
contactPage: z.ZodObject<{
|
|
1707
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1708
|
+
title: z.ZodString;
|
|
1709
|
+
body: z.ZodString;
|
|
1710
|
+
}, z.core.$strip>;
|
|
1711
|
+
trackOrder: z.ZodObject<{
|
|
1712
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
1713
|
+
title: z.ZodString;
|
|
1714
|
+
body: z.ZodString;
|
|
1715
|
+
}, z.core.$strip>;
|
|
1716
|
+
footer: z.ZodObject<{
|
|
1717
|
+
sitemap: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
1718
|
+
poweredBy: z.ZodOptional<z.ZodString>;
|
|
1719
|
+
}, z.core.$strip>;
|
|
1720
|
+
llms: z.ZodObject<{
|
|
1721
|
+
summary: z.ZodString;
|
|
1722
|
+
}, z.core.$strip>;
|
|
1723
|
+
mock: z.ZodObject<{
|
|
1724
|
+
seed: z.ZodEnum<{
|
|
1725
|
+
default: "default";
|
|
1726
|
+
empty: "empty";
|
|
1727
|
+
"reesa-storefront": "reesa-storefront";
|
|
1728
|
+
restaurant: "restaurant";
|
|
1729
|
+
retail: "retail";
|
|
1730
|
+
services: "services";
|
|
1731
|
+
grocery: "grocery";
|
|
1732
|
+
fashion: "fashion";
|
|
1733
|
+
}>;
|
|
1734
|
+
businessId: z.ZodString;
|
|
1735
|
+
}, z.core.$strip>;
|
|
1736
|
+
}, z.core.$strip>;
|
|
1737
|
+
readonly AddItemPayload: z.ZodObject<{
|
|
1738
|
+
item_id: z.ZodString;
|
|
1739
|
+
quantity: z.ZodNumber;
|
|
1740
|
+
variant_id: z.ZodOptional<z.ZodString>;
|
|
1741
|
+
quote_id: z.ZodOptional<z.ZodString>;
|
|
1742
|
+
add_on_options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1743
|
+
bundle_selections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1744
|
+
component_id: z.ZodString;
|
|
1745
|
+
variant_id: z.ZodOptional<z.ZodString>;
|
|
1746
|
+
quantity: z.ZodNumber;
|
|
1747
|
+
scheduled_start: z.ZodOptional<z.ZodString>;
|
|
1748
|
+
scheduled_end: z.ZodOptional<z.ZodString>;
|
|
1749
|
+
}, z.core.$strip>>>;
|
|
1750
|
+
composite_selections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1751
|
+
component_id: z.ZodOptional<z.ZodString>;
|
|
1752
|
+
source_product_id: z.ZodOptional<z.ZodString>;
|
|
1753
|
+
source_stock_id: z.ZodOptional<z.ZodString>;
|
|
1754
|
+
source_type: z.ZodOptional<z.ZodEnum<{
|
|
1755
|
+
product: "product";
|
|
1756
|
+
stock: "stock";
|
|
1757
|
+
add_on: "add_on";
|
|
1758
|
+
standalone: "standalone";
|
|
1759
|
+
}>>;
|
|
1760
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
1761
|
+
}, z.core.$strip>>>;
|
|
1762
|
+
scheduled_start: z.ZodOptional<z.ZodString>;
|
|
1763
|
+
scheduled_end: z.ZodOptional<z.ZodString>;
|
|
1764
|
+
staff_id: z.ZodOptional<z.ZodString>;
|
|
1765
|
+
resource_id: z.ZodOptional<z.ZodString>;
|
|
1766
|
+
special_instructions: z.ZodOptional<z.ZodString>;
|
|
1767
|
+
customer_inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1768
|
+
field_id: z.ZodString;
|
|
1769
|
+
field_name: z.ZodOptional<z.ZodString>;
|
|
1770
|
+
field_type: z.ZodOptional<z.ZodString>;
|
|
1771
|
+
value: z.ZodUnknown;
|
|
1772
|
+
}, z.core.$strip>>>;
|
|
1773
|
+
billing_plan_id: z.ZodOptional<z.ZodString>;
|
|
1774
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1775
|
+
}, z.core.$strip>;
|
|
1776
|
+
readonly Cart: z.ZodObject<{
|
|
1777
|
+
id: z.ZodString;
|
|
1778
|
+
business_id: z.ZodString;
|
|
1779
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1780
|
+
id: z.ZodString;
|
|
1781
|
+
cart_id: z.ZodString;
|
|
1782
|
+
item_id: z.ZodString;
|
|
1783
|
+
quantity: z.ZodNumber;
|
|
1784
|
+
line_key: z.ZodString;
|
|
1785
|
+
line_type: z.ZodEnum<{
|
|
1786
|
+
service: "service";
|
|
1787
|
+
digital: "digital";
|
|
1788
|
+
bundle: "bundle";
|
|
1789
|
+
composite: "composite";
|
|
1790
|
+
simple: "simple";
|
|
1791
|
+
}>;
|
|
1792
|
+
name: z.ZodString;
|
|
1793
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1794
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
1795
|
+
category_id: z.ZodOptional<z.ZodString>;
|
|
1796
|
+
category_name: z.ZodOptional<z.ZodString>;
|
|
1797
|
+
is_available: z.ZodBoolean;
|
|
1798
|
+
variant_id: z.ZodOptional<z.ZodString>;
|
|
1799
|
+
variant_name: z.ZodOptional<z.ZodString>;
|
|
1800
|
+
variant_info: z.ZodOptional<z.ZodObject<{
|
|
1801
|
+
id: z.ZodString;
|
|
1802
|
+
name: z.ZodString;
|
|
1803
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
1804
|
+
price: z.ZodString;
|
|
1805
|
+
price_adjustment: z.ZodString;
|
|
1806
|
+
is_default: z.ZodBoolean;
|
|
1807
|
+
display_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1808
|
+
axis_id: z.ZodString;
|
|
1809
|
+
axis_name: z.ZodString;
|
|
1810
|
+
value_id: z.ZodString;
|
|
1811
|
+
value_name: z.ZodString;
|
|
1812
|
+
}, z.core.$strip>>>;
|
|
1813
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1814
|
+
}, z.core.$strip>>;
|
|
1815
|
+
variant_details: z.ZodOptional<z.ZodObject<{
|
|
1816
|
+
variant_id: z.ZodString;
|
|
1817
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
1818
|
+
properties: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1819
|
+
}, z.core.$strip>>;
|
|
1820
|
+
base_price: z.ZodString;
|
|
1821
|
+
add_ons_price: z.ZodString;
|
|
1822
|
+
total_price: z.ZodString;
|
|
1823
|
+
item_discount_amount: z.ZodString;
|
|
1824
|
+
price_info: z.ZodObject<{
|
|
1825
|
+
base_price: z.ZodString;
|
|
1826
|
+
final_price: z.ZodString;
|
|
1827
|
+
markup_percentage: z.ZodString;
|
|
1828
|
+
markup_amount: z.ZodString;
|
|
1829
|
+
markup_discount_percentage: z.ZodString;
|
|
1830
|
+
markup_discount_amount: z.ZodString;
|
|
1831
|
+
}, z.core.$strip>;
|
|
1832
|
+
add_on_option_ids: z.ZodArray<z.ZodString>;
|
|
1833
|
+
add_on_ids: z.ZodArray<z.ZodString>;
|
|
1834
|
+
add_on_details: z.ZodObject<{
|
|
1835
|
+
selected_options: z.ZodArray<z.ZodObject<{
|
|
1836
|
+
option_id: z.ZodString;
|
|
1837
|
+
add_on_id: z.ZodString;
|
|
1838
|
+
name: z.ZodString;
|
|
1839
|
+
price: z.ZodString;
|
|
1840
|
+
quantity: z.ZodNumber;
|
|
1841
|
+
is_required: z.ZodBoolean;
|
|
1842
|
+
selected_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
1843
|
+
price_info: z.ZodOptional<z.ZodUnknown>;
|
|
1844
|
+
}, z.core.$strip>>;
|
|
1845
|
+
total_add_on_price: z.ZodString;
|
|
1846
|
+
add_ons: z.ZodArray<z.ZodObject<{
|
|
1847
|
+
add_on_id: z.ZodString;
|
|
1848
|
+
name: z.ZodString;
|
|
1849
|
+
min_selections: z.ZodNumber;
|
|
1850
|
+
max_selections: z.ZodNumber;
|
|
1851
|
+
selected_options: z.ZodArray<z.ZodString>;
|
|
1852
|
+
is_required: z.ZodBoolean;
|
|
1853
|
+
}, z.core.$strip>>;
|
|
1854
|
+
}, z.core.$strip>;
|
|
1855
|
+
add_on_options: z.ZodArray<z.ZodObject<{
|
|
1856
|
+
id: z.ZodString;
|
|
1857
|
+
name: z.ZodString;
|
|
1858
|
+
is_required: z.ZodBoolean;
|
|
1859
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1860
|
+
price: z.ZodOptional<z.ZodString>;
|
|
1861
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
1862
|
+
}, z.core.$strip>>;
|
|
1863
|
+
add_ons: z.ZodArray<z.ZodObject<{
|
|
1864
|
+
id: z.ZodString;
|
|
1865
|
+
name: z.ZodString;
|
|
1866
|
+
is_multiple_allowed: z.ZodBoolean;
|
|
1867
|
+
min_selections: z.ZodNumber;
|
|
1868
|
+
max_selections: z.ZodNumber;
|
|
1869
|
+
required: z.ZodBoolean;
|
|
1870
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1871
|
+
id: z.ZodString;
|
|
1872
|
+
name: z.ZodString;
|
|
1873
|
+
is_required: z.ZodBoolean;
|
|
1874
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1875
|
+
price: z.ZodOptional<z.ZodString>;
|
|
1876
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
1877
|
+
}, z.core.$strip>>;
|
|
1878
|
+
}, z.core.$strip>>;
|
|
1879
|
+
scheduled_start: z.ZodOptional<z.ZodString>;
|
|
1880
|
+
scheduled_end: z.ZodOptional<z.ZodString>;
|
|
1881
|
+
staff_id: z.ZodOptional<z.ZodString>;
|
|
1882
|
+
resource_id: z.ZodOptional<z.ZodString>;
|
|
1883
|
+
service_status: z.ZodOptional<z.ZodEnum<{
|
|
1884
|
+
pending: "pending";
|
|
1885
|
+
confirmed: "confirmed";
|
|
1886
|
+
completed: "completed";
|
|
1887
|
+
cancelled: "cancelled";
|
|
1888
|
+
}>>;
|
|
1889
|
+
confirmation_code: z.ZodOptional<z.ZodString>;
|
|
1890
|
+
special_instructions: z.ZodOptional<z.ZodString>;
|
|
1891
|
+
customer_inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1892
|
+
field_id: z.ZodString;
|
|
1893
|
+
field_name: z.ZodOptional<z.ZodString>;
|
|
1894
|
+
field_type: z.ZodOptional<z.ZodString>;
|
|
1895
|
+
value: z.ZodUnknown;
|
|
1896
|
+
}, z.core.$strip>>>;
|
|
1897
|
+
bundle_selections: z.ZodOptional<z.ZodUnknown>;
|
|
1898
|
+
bundle_resolved: z.ZodOptional<z.ZodObject<{
|
|
1899
|
+
bundle_id: z.ZodString;
|
|
1900
|
+
selections: z.ZodArray<z.ZodUnknown>;
|
|
1901
|
+
}, z.core.$loose>>;
|
|
1902
|
+
composite_selections: z.ZodOptional<z.ZodUnknown>;
|
|
1903
|
+
composite_resolved: z.ZodOptional<z.ZodObject<{
|
|
1904
|
+
composite_id: z.ZodString;
|
|
1905
|
+
selections: z.ZodArray<z.ZodUnknown>;
|
|
1906
|
+
breakdown: z.ZodOptional<z.ZodObject<{
|
|
1907
|
+
base_price: z.ZodString;
|
|
1908
|
+
components_total: z.ZodString;
|
|
1909
|
+
final_price: z.ZodString;
|
|
1910
|
+
tier_applied: z.ZodOptional<z.ZodString>;
|
|
1911
|
+
}, z.core.$strip>>;
|
|
1912
|
+
}, z.core.$loose>>;
|
|
1913
|
+
billing_plan_id: z.ZodOptional<z.ZodString>;
|
|
1914
|
+
applied_discount_ids: z.ZodArray<z.ZodString>;
|
|
1915
|
+
discount_details: z.ZodOptional<z.ZodObject<{
|
|
1916
|
+
applied_count: z.ZodNumber;
|
|
1917
|
+
total_amount: z.ZodString;
|
|
1918
|
+
discount_ids: z.ZodArray<z.ZodString>;
|
|
1919
|
+
}, z.core.$strip>>;
|
|
1920
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1921
|
+
created_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
1922
|
+
updated_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
1923
|
+
}, z.core.$loose>>;
|
|
1924
|
+
pricing: z.ZodObject<{
|
|
1925
|
+
subtotal: z.ZodString;
|
|
1926
|
+
total_discounts: z.ZodString;
|
|
1927
|
+
tax_amount: z.ZodString;
|
|
1928
|
+
service_charge: z.ZodString;
|
|
1929
|
+
total_price: z.ZodString;
|
|
1930
|
+
currency: z.ZodString;
|
|
1931
|
+
tax_rate: z.ZodOptional<z.ZodString>;
|
|
1932
|
+
service_charge_rate: z.ZodOptional<z.ZodString>;
|
|
1933
|
+
}, z.core.$strip>;
|
|
1934
|
+
customer_info: z.ZodObject<{
|
|
1935
|
+
name: z.ZodString;
|
|
1936
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1937
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
1938
|
+
address: z.ZodOptional<z.ZodString>;
|
|
1939
|
+
}, z.core.$strip>;
|
|
1940
|
+
created_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
1941
|
+
updated_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
1942
|
+
expires_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
1943
|
+
status: z.ZodString;
|
|
1944
|
+
source: z.ZodString;
|
|
1945
|
+
channel: z.ZodString;
|
|
1946
|
+
}, z.core.$loose>;
|
|
1947
|
+
readonly CartItem: z.ZodObject<{
|
|
1948
|
+
id: z.ZodString;
|
|
1949
|
+
cart_id: z.ZodString;
|
|
1950
|
+
item_id: z.ZodString;
|
|
1951
|
+
quantity: z.ZodNumber;
|
|
1952
|
+
line_key: z.ZodString;
|
|
1953
|
+
line_type: z.ZodEnum<{
|
|
1954
|
+
service: "service";
|
|
1955
|
+
digital: "digital";
|
|
1956
|
+
bundle: "bundle";
|
|
1957
|
+
composite: "composite";
|
|
1958
|
+
simple: "simple";
|
|
1959
|
+
}>;
|
|
1960
|
+
name: z.ZodString;
|
|
1961
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1962
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
1963
|
+
category_id: z.ZodOptional<z.ZodString>;
|
|
1964
|
+
category_name: z.ZodOptional<z.ZodString>;
|
|
1965
|
+
is_available: z.ZodBoolean;
|
|
1966
|
+
variant_id: z.ZodOptional<z.ZodString>;
|
|
1967
|
+
variant_name: z.ZodOptional<z.ZodString>;
|
|
1968
|
+
variant_info: z.ZodOptional<z.ZodObject<{
|
|
1969
|
+
id: z.ZodString;
|
|
1970
|
+
name: z.ZodString;
|
|
1971
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
1972
|
+
price: z.ZodString;
|
|
1973
|
+
price_adjustment: z.ZodString;
|
|
1974
|
+
is_default: z.ZodBoolean;
|
|
1975
|
+
display_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1976
|
+
axis_id: z.ZodString;
|
|
1977
|
+
axis_name: z.ZodString;
|
|
1978
|
+
value_id: z.ZodString;
|
|
1979
|
+
value_name: z.ZodString;
|
|
1980
|
+
}, z.core.$strip>>>;
|
|
1981
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1982
|
+
}, z.core.$strip>>;
|
|
1983
|
+
variant_details: z.ZodOptional<z.ZodObject<{
|
|
1984
|
+
variant_id: z.ZodString;
|
|
1985
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
1986
|
+
properties: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1987
|
+
}, z.core.$strip>>;
|
|
1988
|
+
base_price: z.ZodString;
|
|
1989
|
+
add_ons_price: z.ZodString;
|
|
1990
|
+
total_price: z.ZodString;
|
|
1991
|
+
item_discount_amount: z.ZodString;
|
|
1992
|
+
price_info: z.ZodObject<{
|
|
1993
|
+
base_price: z.ZodString;
|
|
1994
|
+
final_price: z.ZodString;
|
|
1995
|
+
markup_percentage: z.ZodString;
|
|
1996
|
+
markup_amount: z.ZodString;
|
|
1997
|
+
markup_discount_percentage: z.ZodString;
|
|
1998
|
+
markup_discount_amount: z.ZodString;
|
|
1999
|
+
}, z.core.$strip>;
|
|
2000
|
+
add_on_option_ids: z.ZodArray<z.ZodString>;
|
|
2001
|
+
add_on_ids: z.ZodArray<z.ZodString>;
|
|
2002
|
+
add_on_details: z.ZodObject<{
|
|
2003
|
+
selected_options: z.ZodArray<z.ZodObject<{
|
|
2004
|
+
option_id: z.ZodString;
|
|
2005
|
+
add_on_id: z.ZodString;
|
|
2006
|
+
name: z.ZodString;
|
|
2007
|
+
price: z.ZodString;
|
|
2008
|
+
quantity: z.ZodNumber;
|
|
2009
|
+
is_required: z.ZodBoolean;
|
|
2010
|
+
selected_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
2011
|
+
price_info: z.ZodOptional<z.ZodUnknown>;
|
|
2012
|
+
}, z.core.$strip>>;
|
|
2013
|
+
total_add_on_price: z.ZodString;
|
|
2014
|
+
add_ons: z.ZodArray<z.ZodObject<{
|
|
2015
|
+
add_on_id: z.ZodString;
|
|
2016
|
+
name: z.ZodString;
|
|
2017
|
+
min_selections: z.ZodNumber;
|
|
2018
|
+
max_selections: z.ZodNumber;
|
|
2019
|
+
selected_options: z.ZodArray<z.ZodString>;
|
|
2020
|
+
is_required: z.ZodBoolean;
|
|
2021
|
+
}, z.core.$strip>>;
|
|
2022
|
+
}, z.core.$strip>;
|
|
2023
|
+
add_on_options: z.ZodArray<z.ZodObject<{
|
|
2024
|
+
id: z.ZodString;
|
|
2025
|
+
name: z.ZodString;
|
|
2026
|
+
is_required: z.ZodBoolean;
|
|
2027
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2028
|
+
price: z.ZodOptional<z.ZodString>;
|
|
2029
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
2030
|
+
}, z.core.$strip>>;
|
|
2031
|
+
add_ons: z.ZodArray<z.ZodObject<{
|
|
2032
|
+
id: z.ZodString;
|
|
2033
|
+
name: z.ZodString;
|
|
2034
|
+
is_multiple_allowed: z.ZodBoolean;
|
|
2035
|
+
min_selections: z.ZodNumber;
|
|
2036
|
+
max_selections: z.ZodNumber;
|
|
2037
|
+
required: z.ZodBoolean;
|
|
2038
|
+
options: z.ZodArray<z.ZodObject<{
|
|
2039
|
+
id: z.ZodString;
|
|
2040
|
+
name: z.ZodString;
|
|
2041
|
+
is_required: z.ZodBoolean;
|
|
2042
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2043
|
+
price: z.ZodOptional<z.ZodString>;
|
|
2044
|
+
image_url: z.ZodOptional<z.ZodString>;
|
|
2045
|
+
}, z.core.$strip>>;
|
|
2046
|
+
}, z.core.$strip>>;
|
|
2047
|
+
scheduled_start: z.ZodOptional<z.ZodString>;
|
|
2048
|
+
scheduled_end: z.ZodOptional<z.ZodString>;
|
|
2049
|
+
staff_id: z.ZodOptional<z.ZodString>;
|
|
2050
|
+
resource_id: z.ZodOptional<z.ZodString>;
|
|
2051
|
+
service_status: z.ZodOptional<z.ZodEnum<{
|
|
2052
|
+
pending: "pending";
|
|
2053
|
+
confirmed: "confirmed";
|
|
2054
|
+
completed: "completed";
|
|
2055
|
+
cancelled: "cancelled";
|
|
2056
|
+
}>>;
|
|
2057
|
+
confirmation_code: z.ZodOptional<z.ZodString>;
|
|
2058
|
+
special_instructions: z.ZodOptional<z.ZodString>;
|
|
2059
|
+
customer_inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2060
|
+
field_id: z.ZodString;
|
|
2061
|
+
field_name: z.ZodOptional<z.ZodString>;
|
|
2062
|
+
field_type: z.ZodOptional<z.ZodString>;
|
|
2063
|
+
value: z.ZodUnknown;
|
|
2064
|
+
}, z.core.$strip>>>;
|
|
2065
|
+
bundle_selections: z.ZodOptional<z.ZodUnknown>;
|
|
2066
|
+
bundle_resolved: z.ZodOptional<z.ZodObject<{
|
|
2067
|
+
bundle_id: z.ZodString;
|
|
2068
|
+
selections: z.ZodArray<z.ZodUnknown>;
|
|
2069
|
+
}, z.core.$loose>>;
|
|
2070
|
+
composite_selections: z.ZodOptional<z.ZodUnknown>;
|
|
2071
|
+
composite_resolved: z.ZodOptional<z.ZodObject<{
|
|
2072
|
+
composite_id: z.ZodString;
|
|
2073
|
+
selections: z.ZodArray<z.ZodUnknown>;
|
|
2074
|
+
breakdown: z.ZodOptional<z.ZodObject<{
|
|
2075
|
+
base_price: z.ZodString;
|
|
2076
|
+
components_total: z.ZodString;
|
|
2077
|
+
final_price: z.ZodString;
|
|
2078
|
+
tier_applied: z.ZodOptional<z.ZodString>;
|
|
2079
|
+
}, z.core.$strip>>;
|
|
2080
|
+
}, z.core.$loose>>;
|
|
2081
|
+
billing_plan_id: z.ZodOptional<z.ZodString>;
|
|
2082
|
+
applied_discount_ids: z.ZodArray<z.ZodString>;
|
|
2083
|
+
discount_details: z.ZodOptional<z.ZodObject<{
|
|
2084
|
+
applied_count: z.ZodNumber;
|
|
2085
|
+
total_amount: z.ZodString;
|
|
2086
|
+
discount_ids: z.ZodArray<z.ZodString>;
|
|
2087
|
+
}, z.core.$strip>>;
|
|
2088
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2089
|
+
created_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
2090
|
+
updated_at: z.ZodUnion<readonly [z.ZodISODateTime, z.ZodString]>;
|
|
2091
|
+
}, z.core.$loose>;
|
|
2092
|
+
readonly CartPricing: z.ZodObject<{
|
|
2093
|
+
subtotal: z.ZodString;
|
|
2094
|
+
total_discounts: z.ZodString;
|
|
2095
|
+
tax_amount: z.ZodString;
|
|
2096
|
+
service_charge: z.ZodString;
|
|
2097
|
+
total_price: z.ZodString;
|
|
2098
|
+
currency: z.ZodString;
|
|
2099
|
+
tax_rate: z.ZodOptional<z.ZodString>;
|
|
2100
|
+
service_charge_rate: z.ZodOptional<z.ZodString>;
|
|
2101
|
+
}, z.core.$strip>;
|
|
2102
|
+
readonly CheckoutBody: z.ZodObject<{
|
|
2103
|
+
cart_id: z.ZodString;
|
|
2104
|
+
location_id: z.ZodOptional<z.ZodString>;
|
|
2105
|
+
customer: z.ZodObject<{
|
|
2106
|
+
name: z.ZodString;
|
|
2107
|
+
email: z.ZodString;
|
|
2108
|
+
phone: z.ZodString;
|
|
2109
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
2110
|
+
save_details: z.ZodOptional<z.ZodBoolean>;
|
|
2111
|
+
}, z.core.$strip>;
|
|
2112
|
+
order_type: z.ZodString;
|
|
2113
|
+
address_info: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2114
|
+
payment_method: z.ZodString;
|
|
2115
|
+
mobile_money_details: z.ZodOptional<z.ZodObject<{
|
|
2116
|
+
phone_number: z.ZodString;
|
|
2117
|
+
provider: z.ZodString;
|
|
2118
|
+
}, z.core.$strip>>;
|
|
2119
|
+
special_instructions: z.ZodOptional<z.ZodString>;
|
|
2120
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2121
|
+
pay_currency: z.ZodOptional<z.ZodString>;
|
|
2122
|
+
fx_quote_id: z.ZodOptional<z.ZodString>;
|
|
2123
|
+
}, z.core.$strip>;
|
|
2124
|
+
readonly CheckoutResponse: z.ZodObject<{
|
|
2125
|
+
order_id: z.ZodString;
|
|
2126
|
+
order_number: z.ZodString;
|
|
2127
|
+
payment_status: z.ZodString;
|
|
2128
|
+
payment_reference: z.ZodOptional<z.ZodString>;
|
|
2129
|
+
requires_authorization: z.ZodBoolean;
|
|
2130
|
+
authorization_type: z.ZodOptional<z.ZodEnum<{
|
|
2131
|
+
phone: "phone";
|
|
2132
|
+
address: "address";
|
|
2133
|
+
otp: "otp";
|
|
2134
|
+
pin: "pin";
|
|
2135
|
+
birthday: "birthday";
|
|
2136
|
+
}>>;
|
|
2137
|
+
next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2138
|
+
type: z.ZodLiteral<"none">;
|
|
2139
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2140
|
+
type: z.ZodLiteral<"redirect">;
|
|
2141
|
+
authorization_url: z.ZodString;
|
|
2142
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2143
|
+
type: z.ZodLiteral<"authorization">;
|
|
2144
|
+
authorization_type: z.ZodString;
|
|
2145
|
+
display_text: z.ZodOptional<z.ZodString>;
|
|
2146
|
+
}, z.core.$strip>], "type">;
|
|
2147
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
2148
|
+
authorization_url: z.ZodOptional<z.ZodString>;
|
|
2149
|
+
display_text: z.ZodOptional<z.ZodString>;
|
|
2150
|
+
bill_token: z.ZodOptional<z.ZodString>;
|
|
2151
|
+
client_secret: z.ZodOptional<z.ZodString>;
|
|
2152
|
+
public_key: z.ZodOptional<z.ZodString>;
|
|
2153
|
+
}, z.core.$loose>;
|
|
2154
|
+
readonly VariantInfo: z.ZodObject<{
|
|
2155
|
+
id: z.ZodString;
|
|
2156
|
+
name: z.ZodString;
|
|
2157
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
2158
|
+
price: z.ZodString;
|
|
2159
|
+
price_adjustment: z.ZodString;
|
|
2160
|
+
is_default: z.ZodBoolean;
|
|
2161
|
+
display_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2162
|
+
axis_id: z.ZodString;
|
|
2163
|
+
axis_name: z.ZodString;
|
|
2164
|
+
value_id: z.ZodString;
|
|
2165
|
+
value_name: z.ZodString;
|
|
2166
|
+
}, z.core.$strip>>>;
|
|
2167
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2168
|
+
}, z.core.$strip>;
|
|
2169
|
+
};
|
|
2170
|
+
type PublicSchemaName = keyof typeof PUBLIC_SCHEMAS;
|
|
1305
2171
|
/**
|
|
1306
|
-
*
|
|
1307
|
-
*
|
|
1308
|
-
*
|
|
1309
|
-
* run safely in parallel because there's no shared global state.
|
|
2172
|
+
* Export all public schemas as JSON Schema (Draft 2020-12). Handy for
|
|
2173
|
+
* a CI contract-snapshot — diff `schemas.json` against the Rust
|
|
2174
|
+
* backend's emitted `openapi.json` to catch drift at PR time.
|
|
1310
2175
|
*/
|
|
1311
|
-
declare function
|
|
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
|
-
}
|
|
2176
|
+
declare function exportJsonSchemas(): Record<PublicSchemaName, Record<string, unknown>>;
|
|
1328
2177
|
/**
|
|
1329
|
-
*
|
|
1330
|
-
*
|
|
2178
|
+
* Read every schema currently in the cimplifyRegistry along with its
|
|
2179
|
+
* metadata. Useful for tooling that wants to discover available
|
|
2180
|
+
* schemas dynamically (e.g. an agent prompt generator).
|
|
1331
2181
|
*/
|
|
1332
|
-
declare
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
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
|
-
};
|
|
2182
|
+
declare function listRegisteredSchemas(): Array<{
|
|
2183
|
+
schema: z.ZodType;
|
|
2184
|
+
meta: CimplifySchemaMeta;
|
|
2185
|
+
}>;
|
|
1358
2186
|
|
|
1359
|
-
export { type
|
|
2187
|
+
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 };
|