@deliverart/sdk-js-customer 0.0.4 → 0.0.5
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +38 -17
- package/dist/index.d.cts +60 -60
- package/dist/index.d.ts +60 -60
- package/dist/index.js +38 -17
- package/package.json +4 -4
- package/src/models.ts +1 -1
- package/src/requests/customers/GetCustomers.ts +4 -4
- package/src/types.ts +36 -12
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -105,37 +105,58 @@ var import_zod2 = require("zod");
|
|
|
105
105
|
|
|
106
106
|
// src/types.ts
|
|
107
107
|
var import_zod = require("zod");
|
|
108
|
-
var customerPathSchema = import_zod.z.string().refine(
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
var customerPathSchema = import_zod.z.string().refine(
|
|
109
|
+
(val) => /^\/customers\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
110
|
+
val
|
|
111
|
+
),
|
|
112
|
+
{
|
|
113
|
+
message: "Invalid customer path format"
|
|
114
|
+
}
|
|
115
|
+
);
|
|
111
116
|
var customerNullablePathSchema = import_zod.z.string().nullable().refine(
|
|
112
117
|
(val) => {
|
|
113
118
|
if (!val) return true;
|
|
114
|
-
return /^\/customers\/[
|
|
119
|
+
return /^\/customers\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
120
|
+
val
|
|
121
|
+
);
|
|
115
122
|
},
|
|
116
123
|
{
|
|
117
124
|
message: "Invalid customer path format"
|
|
118
125
|
}
|
|
119
126
|
);
|
|
120
|
-
var customerAddressPathSchema = import_zod.z.string().refine(
|
|
121
|
-
|
|
122
|
-
|
|
127
|
+
var customerAddressPathSchema = import_zod.z.string().refine(
|
|
128
|
+
(val) => /^\/customers\/addresses\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
129
|
+
val
|
|
130
|
+
),
|
|
131
|
+
{
|
|
132
|
+
message: "Invalid customerAddress path format"
|
|
133
|
+
}
|
|
134
|
+
);
|
|
123
135
|
var customerAddressNullablePathSchema = import_zod.z.string().nullable().refine(
|
|
124
136
|
(val) => {
|
|
125
137
|
if (!val) return true;
|
|
126
|
-
return /^\/customers\/addresses\/[
|
|
138
|
+
return /^\/customers\/addresses\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
139
|
+
val
|
|
140
|
+
);
|
|
127
141
|
},
|
|
128
142
|
{
|
|
129
143
|
message: "Invalid customerAddress path format"
|
|
130
144
|
}
|
|
131
145
|
);
|
|
132
|
-
var customerBusinessProfilePathSchema = import_zod.z.string().refine(
|
|
133
|
-
|
|
134
|
-
|
|
146
|
+
var customerBusinessProfilePathSchema = import_zod.z.string().refine(
|
|
147
|
+
(val) => /^\/customers\/business_profiles\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
148
|
+
val
|
|
149
|
+
),
|
|
150
|
+
{
|
|
151
|
+
message: "Invalid customerBusinessProfile path format"
|
|
152
|
+
}
|
|
153
|
+
);
|
|
135
154
|
var customerBusinessProfileNullablePathSchema = import_zod.z.string().nullable().refine(
|
|
136
155
|
(val) => {
|
|
137
156
|
if (!val) return true;
|
|
138
|
-
return /^\/customers\/business_profiles\/[
|
|
157
|
+
return /^\/customers\/business_profiles\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
158
|
+
val
|
|
159
|
+
);
|
|
139
160
|
},
|
|
140
161
|
{
|
|
141
162
|
message: "Invalid customerBusinessProfile path format"
|
|
@@ -152,7 +173,7 @@ var customerSchema = import_zod2.z.object({
|
|
|
152
173
|
hasBusinessProfiles: import_zod2.z.boolean(),
|
|
153
174
|
hasAddresses: import_zod2.z.boolean(),
|
|
154
175
|
ordersPlaced: import_zod2.z.number(),
|
|
155
|
-
totalSpent: import_zod2.z.
|
|
176
|
+
totalSpent: import_zod2.z.string(),
|
|
156
177
|
createdAt: import_sdk_js_global_types.datetimeSchema,
|
|
157
178
|
updatedAt: import_sdk_js_global_types.datetimeSchema
|
|
158
179
|
});
|
|
@@ -615,10 +636,10 @@ var getCustomersQuerySchema = import_zod13.z.object({
|
|
|
615
636
|
"ordersPlaced[lt]": import_zod13.z.coerce.number().optional(),
|
|
616
637
|
"ordersPlaced[lte]": import_zod13.z.coerce.number().optional(),
|
|
617
638
|
"totalSpent[between]": import_zod13.z.coerce.number().optional(),
|
|
618
|
-
"totalSpent[gt]": import_zod13.z.coerce.
|
|
619
|
-
"totalSpent[gte]": import_zod13.z.coerce.
|
|
620
|
-
"totalSpent[lt]": import_zod13.z.coerce.
|
|
621
|
-
"totalSpent[lte]": import_zod13.z.coerce.
|
|
639
|
+
"totalSpent[gt]": import_zod13.z.coerce.string().optional(),
|
|
640
|
+
"totalSpent[gte]": import_zod13.z.coerce.string().optional(),
|
|
641
|
+
"totalSpent[lt]": import_zod13.z.coerce.string().optional(),
|
|
642
|
+
"totalSpent[lte]": import_zod13.z.coerce.string().optional(),
|
|
622
643
|
"order[firstName]": import_sdk_js_global_types6.sortDirSchema.optional(),
|
|
623
644
|
"order[lastName]": import_sdk_js_global_types6.sortDirSchema.optional(),
|
|
624
645
|
"order[createdAt]": import_sdk_js_global_types6.sortDirSchema.optional(),
|
package/dist/index.d.cts
CHANGED
|
@@ -12,7 +12,7 @@ declare const customerSchema: z.ZodObject<{
|
|
|
12
12
|
hasBusinessProfiles: z.ZodBoolean;
|
|
13
13
|
hasAddresses: z.ZodBoolean;
|
|
14
14
|
ordersPlaced: z.ZodNumber;
|
|
15
|
-
totalSpent: z.
|
|
15
|
+
totalSpent: z.ZodString;
|
|
16
16
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
17
17
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
18
18
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -24,7 +24,7 @@ declare const customerSchema: z.ZodObject<{
|
|
|
24
24
|
hasBusinessProfiles: boolean;
|
|
25
25
|
hasAddresses: boolean;
|
|
26
26
|
ordersPlaced: number;
|
|
27
|
-
totalSpent:
|
|
27
|
+
totalSpent: string;
|
|
28
28
|
createdAt: string;
|
|
29
29
|
updatedAt: string;
|
|
30
30
|
}, {
|
|
@@ -36,7 +36,7 @@ declare const customerSchema: z.ZodObject<{
|
|
|
36
36
|
hasBusinessProfiles: boolean;
|
|
37
37
|
hasAddresses: boolean;
|
|
38
38
|
ordersPlaced: number;
|
|
39
|
-
totalSpent:
|
|
39
|
+
totalSpent: string;
|
|
40
40
|
createdAt: string;
|
|
41
41
|
updatedAt: string;
|
|
42
42
|
}>;
|
|
@@ -50,7 +50,7 @@ declare const customerDetailsSchema: z.ZodObject<{
|
|
|
50
50
|
hasBusinessProfiles: z.ZodBoolean;
|
|
51
51
|
hasAddresses: z.ZodBoolean;
|
|
52
52
|
ordersPlaced: z.ZodNumber;
|
|
53
|
-
totalSpent: z.
|
|
53
|
+
totalSpent: z.ZodString;
|
|
54
54
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
55
55
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
56
56
|
} & {
|
|
@@ -67,7 +67,7 @@ declare const customerDetailsSchema: z.ZodObject<{
|
|
|
67
67
|
hasBusinessProfiles: boolean;
|
|
68
68
|
hasAddresses: boolean;
|
|
69
69
|
ordersPlaced: number;
|
|
70
|
-
totalSpent:
|
|
70
|
+
totalSpent: string;
|
|
71
71
|
createdAt: string;
|
|
72
72
|
updatedAt: string;
|
|
73
73
|
pointOfSale: string | null;
|
|
@@ -83,7 +83,7 @@ declare const customerDetailsSchema: z.ZodObject<{
|
|
|
83
83
|
hasBusinessProfiles: boolean;
|
|
84
84
|
hasAddresses: boolean;
|
|
85
85
|
ordersPlaced: number;
|
|
86
|
-
totalSpent:
|
|
86
|
+
totalSpent: string;
|
|
87
87
|
createdAt: string;
|
|
88
88
|
updatedAt: string;
|
|
89
89
|
pointOfSale: string | null;
|
|
@@ -101,7 +101,7 @@ declare const writableCreateCustomerSchema: z.ZodObject<Pick<{
|
|
|
101
101
|
hasBusinessProfiles: z.ZodBoolean;
|
|
102
102
|
hasAddresses: z.ZodBoolean;
|
|
103
103
|
ordersPlaced: z.ZodNumber;
|
|
104
|
-
totalSpent: z.
|
|
104
|
+
totalSpent: z.ZodString;
|
|
105
105
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
106
106
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
107
107
|
} & {
|
|
@@ -131,7 +131,7 @@ declare const writableCustomerSchema: z.ZodObject<Omit<Pick<{
|
|
|
131
131
|
hasBusinessProfiles: z.ZodBoolean;
|
|
132
132
|
hasAddresses: z.ZodBoolean;
|
|
133
133
|
ordersPlaced: z.ZodNumber;
|
|
134
|
-
totalSpent: z.
|
|
134
|
+
totalSpent: z.ZodString;
|
|
135
135
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
136
136
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
137
137
|
} & {
|
|
@@ -3664,7 +3664,7 @@ declare const createCustomerResponseSchema: z.ZodObject<{
|
|
|
3664
3664
|
hasBusinessProfiles: z.ZodBoolean;
|
|
3665
3665
|
hasAddresses: z.ZodBoolean;
|
|
3666
3666
|
ordersPlaced: z.ZodNumber;
|
|
3667
|
-
totalSpent: z.
|
|
3667
|
+
totalSpent: z.ZodString;
|
|
3668
3668
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3669
3669
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3670
3670
|
} & {
|
|
@@ -3681,7 +3681,7 @@ declare const createCustomerResponseSchema: z.ZodObject<{
|
|
|
3681
3681
|
hasBusinessProfiles: boolean;
|
|
3682
3682
|
hasAddresses: boolean;
|
|
3683
3683
|
ordersPlaced: number;
|
|
3684
|
-
totalSpent:
|
|
3684
|
+
totalSpent: string;
|
|
3685
3685
|
createdAt: string;
|
|
3686
3686
|
updatedAt: string;
|
|
3687
3687
|
pointOfSale: string | null;
|
|
@@ -3697,7 +3697,7 @@ declare const createCustomerResponseSchema: z.ZodObject<{
|
|
|
3697
3697
|
hasBusinessProfiles: boolean;
|
|
3698
3698
|
hasAddresses: boolean;
|
|
3699
3699
|
ordersPlaced: number;
|
|
3700
|
-
totalSpent:
|
|
3700
|
+
totalSpent: string;
|
|
3701
3701
|
createdAt: string;
|
|
3702
3702
|
updatedAt: string;
|
|
3703
3703
|
pointOfSale: string | null;
|
|
@@ -3738,7 +3738,7 @@ declare class CreateCustomer extends AbstractApiRequest<CreateCustomerInput, Cre
|
|
|
3738
3738
|
hasBusinessProfiles: z.ZodBoolean;
|
|
3739
3739
|
hasAddresses: z.ZodBoolean;
|
|
3740
3740
|
ordersPlaced: z.ZodNumber;
|
|
3741
|
-
totalSpent: z.
|
|
3741
|
+
totalSpent: z.ZodString;
|
|
3742
3742
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3743
3743
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3744
3744
|
} & {
|
|
@@ -3755,7 +3755,7 @@ declare class CreateCustomer extends AbstractApiRequest<CreateCustomerInput, Cre
|
|
|
3755
3755
|
hasBusinessProfiles: boolean;
|
|
3756
3756
|
hasAddresses: boolean;
|
|
3757
3757
|
ordersPlaced: number;
|
|
3758
|
-
totalSpent:
|
|
3758
|
+
totalSpent: string;
|
|
3759
3759
|
createdAt: string;
|
|
3760
3760
|
updatedAt: string;
|
|
3761
3761
|
pointOfSale: string | null;
|
|
@@ -3771,7 +3771,7 @@ declare class CreateCustomer extends AbstractApiRequest<CreateCustomerInput, Cre
|
|
|
3771
3771
|
hasBusinessProfiles: boolean;
|
|
3772
3772
|
hasAddresses: boolean;
|
|
3773
3773
|
ordersPlaced: number;
|
|
3774
|
-
totalSpent:
|
|
3774
|
+
totalSpent: string;
|
|
3775
3775
|
createdAt: string;
|
|
3776
3776
|
updatedAt: string;
|
|
3777
3777
|
pointOfSale: string | null;
|
|
@@ -3810,7 +3810,7 @@ declare const getCustomerDetailsResponseSchema: z.ZodObject<{
|
|
|
3810
3810
|
hasBusinessProfiles: z.ZodBoolean;
|
|
3811
3811
|
hasAddresses: z.ZodBoolean;
|
|
3812
3812
|
ordersPlaced: z.ZodNumber;
|
|
3813
|
-
totalSpent: z.
|
|
3813
|
+
totalSpent: z.ZodString;
|
|
3814
3814
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3815
3815
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3816
3816
|
} & {
|
|
@@ -3827,7 +3827,7 @@ declare const getCustomerDetailsResponseSchema: z.ZodObject<{
|
|
|
3827
3827
|
hasBusinessProfiles: boolean;
|
|
3828
3828
|
hasAddresses: boolean;
|
|
3829
3829
|
ordersPlaced: number;
|
|
3830
|
-
totalSpent:
|
|
3830
|
+
totalSpent: string;
|
|
3831
3831
|
createdAt: string;
|
|
3832
3832
|
updatedAt: string;
|
|
3833
3833
|
pointOfSale: string | null;
|
|
@@ -3843,7 +3843,7 @@ declare const getCustomerDetailsResponseSchema: z.ZodObject<{
|
|
|
3843
3843
|
hasBusinessProfiles: boolean;
|
|
3844
3844
|
hasAddresses: boolean;
|
|
3845
3845
|
ordersPlaced: number;
|
|
3846
|
-
totalSpent:
|
|
3846
|
+
totalSpent: string;
|
|
3847
3847
|
createdAt: string;
|
|
3848
3848
|
updatedAt: string;
|
|
3849
3849
|
pointOfSale: string | null;
|
|
@@ -3866,7 +3866,7 @@ declare class GetCustomerDetails extends AbstractApiRequest<void, GetCustomerDet
|
|
|
3866
3866
|
hasBusinessProfiles: z.ZodBoolean;
|
|
3867
3867
|
hasAddresses: z.ZodBoolean;
|
|
3868
3868
|
ordersPlaced: z.ZodNumber;
|
|
3869
|
-
totalSpent: z.
|
|
3869
|
+
totalSpent: z.ZodString;
|
|
3870
3870
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3871
3871
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3872
3872
|
} & {
|
|
@@ -3883,7 +3883,7 @@ declare class GetCustomerDetails extends AbstractApiRequest<void, GetCustomerDet
|
|
|
3883
3883
|
hasBusinessProfiles: boolean;
|
|
3884
3884
|
hasAddresses: boolean;
|
|
3885
3885
|
ordersPlaced: number;
|
|
3886
|
-
totalSpent:
|
|
3886
|
+
totalSpent: string;
|
|
3887
3887
|
createdAt: string;
|
|
3888
3888
|
updatedAt: string;
|
|
3889
3889
|
pointOfSale: string | null;
|
|
@@ -3899,7 +3899,7 @@ declare class GetCustomerDetails extends AbstractApiRequest<void, GetCustomerDet
|
|
|
3899
3899
|
hasBusinessProfiles: boolean;
|
|
3900
3900
|
hasAddresses: boolean;
|
|
3901
3901
|
ordersPlaced: number;
|
|
3902
|
-
totalSpent:
|
|
3902
|
+
totalSpent: string;
|
|
3903
3903
|
createdAt: string;
|
|
3904
3904
|
updatedAt: string;
|
|
3905
3905
|
pointOfSale: string | null;
|
|
@@ -3927,10 +3927,10 @@ declare const getCustomersQuerySchema: z.ZodObject<{
|
|
|
3927
3927
|
'ordersPlaced[lt]': z.ZodOptional<z.ZodNumber>;
|
|
3928
3928
|
'ordersPlaced[lte]': z.ZodOptional<z.ZodNumber>;
|
|
3929
3929
|
'totalSpent[between]': z.ZodOptional<z.ZodNumber>;
|
|
3930
|
-
'totalSpent[gt]': z.ZodOptional<z.
|
|
3931
|
-
'totalSpent[gte]': z.ZodOptional<z.
|
|
3932
|
-
'totalSpent[lt]': z.ZodOptional<z.
|
|
3933
|
-
'totalSpent[lte]': z.ZodOptional<z.
|
|
3930
|
+
'totalSpent[gt]': z.ZodOptional<z.ZodString>;
|
|
3931
|
+
'totalSpent[gte]': z.ZodOptional<z.ZodString>;
|
|
3932
|
+
'totalSpent[lt]': z.ZodOptional<z.ZodString>;
|
|
3933
|
+
'totalSpent[lte]': z.ZodOptional<z.ZodString>;
|
|
3934
3934
|
'order[firstName]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
3935
3935
|
'order[lastName]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
3936
3936
|
'order[createdAt]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
@@ -3969,10 +3969,10 @@ declare const getCustomersQuerySchema: z.ZodObject<{
|
|
|
3969
3969
|
'ordersPlaced[lt]'?: number | undefined;
|
|
3970
3970
|
'ordersPlaced[lte]'?: number | undefined;
|
|
3971
3971
|
'totalSpent[between]'?: number | undefined;
|
|
3972
|
-
'totalSpent[gt]'?:
|
|
3973
|
-
'totalSpent[gte]'?:
|
|
3974
|
-
'totalSpent[lt]'?:
|
|
3975
|
-
'totalSpent[lte]'?:
|
|
3972
|
+
'totalSpent[gt]'?: string | undefined;
|
|
3973
|
+
'totalSpent[gte]'?: string | undefined;
|
|
3974
|
+
'totalSpent[lt]'?: string | undefined;
|
|
3975
|
+
'totalSpent[lte]'?: string | undefined;
|
|
3976
3976
|
'order[firstName]'?: "asc" | "desc" | undefined;
|
|
3977
3977
|
'order[lastName]'?: "asc" | "desc" | undefined;
|
|
3978
3978
|
}, {
|
|
@@ -3999,10 +3999,10 @@ declare const getCustomersQuerySchema: z.ZodObject<{
|
|
|
3999
3999
|
'ordersPlaced[lt]'?: number | undefined;
|
|
4000
4000
|
'ordersPlaced[lte]'?: number | undefined;
|
|
4001
4001
|
'totalSpent[between]'?: number | undefined;
|
|
4002
|
-
'totalSpent[gt]'?:
|
|
4003
|
-
'totalSpent[gte]'?:
|
|
4004
|
-
'totalSpent[lt]'?:
|
|
4005
|
-
'totalSpent[lte]'?:
|
|
4002
|
+
'totalSpent[gt]'?: string | undefined;
|
|
4003
|
+
'totalSpent[gte]'?: string | undefined;
|
|
4004
|
+
'totalSpent[lt]'?: string | undefined;
|
|
4005
|
+
'totalSpent[lte]'?: string | undefined;
|
|
4006
4006
|
'order[firstName]'?: "asc" | "desc" | undefined;
|
|
4007
4007
|
'order[lastName]'?: "asc" | "desc" | undefined;
|
|
4008
4008
|
}>;
|
|
@@ -4017,7 +4017,7 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
4017
4017
|
hasBusinessProfiles: z.ZodBoolean;
|
|
4018
4018
|
hasAddresses: z.ZodBoolean;
|
|
4019
4019
|
ordersPlaced: z.ZodNumber;
|
|
4020
|
-
totalSpent: z.
|
|
4020
|
+
totalSpent: z.ZodString;
|
|
4021
4021
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4022
4022
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4023
4023
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -4029,7 +4029,7 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
4029
4029
|
hasBusinessProfiles: boolean;
|
|
4030
4030
|
hasAddresses: boolean;
|
|
4031
4031
|
ordersPlaced: number;
|
|
4032
|
-
totalSpent:
|
|
4032
|
+
totalSpent: string;
|
|
4033
4033
|
createdAt: string;
|
|
4034
4034
|
updatedAt: string;
|
|
4035
4035
|
}, {
|
|
@@ -4041,7 +4041,7 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
4041
4041
|
hasBusinessProfiles: boolean;
|
|
4042
4042
|
hasAddresses: boolean;
|
|
4043
4043
|
ordersPlaced: number;
|
|
4044
|
-
totalSpent:
|
|
4044
|
+
totalSpent: string;
|
|
4045
4045
|
createdAt: string;
|
|
4046
4046
|
updatedAt: string;
|
|
4047
4047
|
}>, "many">;
|
|
@@ -4077,7 +4077,7 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
4077
4077
|
hasBusinessProfiles: boolean;
|
|
4078
4078
|
hasAddresses: boolean;
|
|
4079
4079
|
ordersPlaced: number;
|
|
4080
|
-
totalSpent:
|
|
4080
|
+
totalSpent: string;
|
|
4081
4081
|
createdAt: string;
|
|
4082
4082
|
updatedAt: string;
|
|
4083
4083
|
}[];
|
|
@@ -4099,7 +4099,7 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
4099
4099
|
hasBusinessProfiles: boolean;
|
|
4100
4100
|
hasAddresses: boolean;
|
|
4101
4101
|
ordersPlaced: number;
|
|
4102
|
-
totalSpent:
|
|
4102
|
+
totalSpent: string;
|
|
4103
4103
|
createdAt: string;
|
|
4104
4104
|
updatedAt: string;
|
|
4105
4105
|
}[];
|
|
@@ -4129,7 +4129,7 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4129
4129
|
hasBusinessProfiles: z.ZodBoolean;
|
|
4130
4130
|
hasAddresses: z.ZodBoolean;
|
|
4131
4131
|
ordersPlaced: z.ZodNumber;
|
|
4132
|
-
totalSpent: z.
|
|
4132
|
+
totalSpent: z.ZodString;
|
|
4133
4133
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4134
4134
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4135
4135
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -4141,7 +4141,7 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4141
4141
|
hasBusinessProfiles: boolean;
|
|
4142
4142
|
hasAddresses: boolean;
|
|
4143
4143
|
ordersPlaced: number;
|
|
4144
|
-
totalSpent:
|
|
4144
|
+
totalSpent: string;
|
|
4145
4145
|
createdAt: string;
|
|
4146
4146
|
updatedAt: string;
|
|
4147
4147
|
}, {
|
|
@@ -4153,7 +4153,7 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4153
4153
|
hasBusinessProfiles: boolean;
|
|
4154
4154
|
hasAddresses: boolean;
|
|
4155
4155
|
ordersPlaced: number;
|
|
4156
|
-
totalSpent:
|
|
4156
|
+
totalSpent: string;
|
|
4157
4157
|
createdAt: string;
|
|
4158
4158
|
updatedAt: string;
|
|
4159
4159
|
}>, "many">;
|
|
@@ -4189,7 +4189,7 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4189
4189
|
hasBusinessProfiles: boolean;
|
|
4190
4190
|
hasAddresses: boolean;
|
|
4191
4191
|
ordersPlaced: number;
|
|
4192
|
-
totalSpent:
|
|
4192
|
+
totalSpent: string;
|
|
4193
4193
|
createdAt: string;
|
|
4194
4194
|
updatedAt: string;
|
|
4195
4195
|
}[];
|
|
@@ -4211,7 +4211,7 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4211
4211
|
hasBusinessProfiles: boolean;
|
|
4212
4212
|
hasAddresses: boolean;
|
|
4213
4213
|
ordersPlaced: number;
|
|
4214
|
-
totalSpent:
|
|
4214
|
+
totalSpent: string;
|
|
4215
4215
|
createdAt: string;
|
|
4216
4216
|
updatedAt: string;
|
|
4217
4217
|
}[];
|
|
@@ -4237,10 +4237,10 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4237
4237
|
'ordersPlaced[lt]': z.ZodOptional<z.ZodNumber>;
|
|
4238
4238
|
'ordersPlaced[lte]': z.ZodOptional<z.ZodNumber>;
|
|
4239
4239
|
'totalSpent[between]': z.ZodOptional<z.ZodNumber>;
|
|
4240
|
-
'totalSpent[gt]': z.ZodOptional<z.
|
|
4241
|
-
'totalSpent[gte]': z.ZodOptional<z.
|
|
4242
|
-
'totalSpent[lt]': z.ZodOptional<z.
|
|
4243
|
-
'totalSpent[lte]': z.ZodOptional<z.
|
|
4240
|
+
'totalSpent[gt]': z.ZodOptional<z.ZodString>;
|
|
4241
|
+
'totalSpent[gte]': z.ZodOptional<z.ZodString>;
|
|
4242
|
+
'totalSpent[lt]': z.ZodOptional<z.ZodString>;
|
|
4243
|
+
'totalSpent[lte]': z.ZodOptional<z.ZodString>;
|
|
4244
4244
|
'order[firstName]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
4245
4245
|
'order[lastName]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
4246
4246
|
'order[createdAt]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
@@ -4279,10 +4279,10 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4279
4279
|
'ordersPlaced[lt]'?: number | undefined;
|
|
4280
4280
|
'ordersPlaced[lte]'?: number | undefined;
|
|
4281
4281
|
'totalSpent[between]'?: number | undefined;
|
|
4282
|
-
'totalSpent[gt]'?:
|
|
4283
|
-
'totalSpent[gte]'?:
|
|
4284
|
-
'totalSpent[lt]'?:
|
|
4285
|
-
'totalSpent[lte]'?:
|
|
4282
|
+
'totalSpent[gt]'?: string | undefined;
|
|
4283
|
+
'totalSpent[gte]'?: string | undefined;
|
|
4284
|
+
'totalSpent[lt]'?: string | undefined;
|
|
4285
|
+
'totalSpent[lte]'?: string | undefined;
|
|
4286
4286
|
'order[firstName]'?: "asc" | "desc" | undefined;
|
|
4287
4287
|
'order[lastName]'?: "asc" | "desc" | undefined;
|
|
4288
4288
|
}, {
|
|
@@ -4309,10 +4309,10 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4309
4309
|
'ordersPlaced[lt]'?: number | undefined;
|
|
4310
4310
|
'ordersPlaced[lte]'?: number | undefined;
|
|
4311
4311
|
'totalSpent[between]'?: number | undefined;
|
|
4312
|
-
'totalSpent[gt]'?:
|
|
4313
|
-
'totalSpent[gte]'?:
|
|
4314
|
-
'totalSpent[lt]'?:
|
|
4315
|
-
'totalSpent[lte]'?:
|
|
4312
|
+
'totalSpent[gt]'?: string | undefined;
|
|
4313
|
+
'totalSpent[gte]'?: string | undefined;
|
|
4314
|
+
'totalSpent[lt]'?: string | undefined;
|
|
4315
|
+
'totalSpent[lte]'?: string | undefined;
|
|
4316
4316
|
'order[firstName]'?: "asc" | "desc" | undefined;
|
|
4317
4317
|
'order[lastName]'?: "asc" | "desc" | undefined;
|
|
4318
4318
|
}>;
|
|
@@ -4350,7 +4350,7 @@ declare const updateCustomerResponseSchema: z.ZodObject<{
|
|
|
4350
4350
|
hasBusinessProfiles: z.ZodBoolean;
|
|
4351
4351
|
hasAddresses: z.ZodBoolean;
|
|
4352
4352
|
ordersPlaced: z.ZodNumber;
|
|
4353
|
-
totalSpent: z.
|
|
4353
|
+
totalSpent: z.ZodString;
|
|
4354
4354
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4355
4355
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4356
4356
|
} & {
|
|
@@ -4367,7 +4367,7 @@ declare const updateCustomerResponseSchema: z.ZodObject<{
|
|
|
4367
4367
|
hasBusinessProfiles: boolean;
|
|
4368
4368
|
hasAddresses: boolean;
|
|
4369
4369
|
ordersPlaced: number;
|
|
4370
|
-
totalSpent:
|
|
4370
|
+
totalSpent: string;
|
|
4371
4371
|
createdAt: string;
|
|
4372
4372
|
updatedAt: string;
|
|
4373
4373
|
pointOfSale: string | null;
|
|
@@ -4383,7 +4383,7 @@ declare const updateCustomerResponseSchema: z.ZodObject<{
|
|
|
4383
4383
|
hasBusinessProfiles: boolean;
|
|
4384
4384
|
hasAddresses: boolean;
|
|
4385
4385
|
ordersPlaced: number;
|
|
4386
|
-
totalSpent:
|
|
4386
|
+
totalSpent: string;
|
|
4387
4387
|
createdAt: string;
|
|
4388
4388
|
updatedAt: string;
|
|
4389
4389
|
pointOfSale: string | null;
|
|
@@ -4421,7 +4421,7 @@ declare class UpdateCustomer extends AbstractApiRequest<UpdateCustomerInput, Upd
|
|
|
4421
4421
|
hasBusinessProfiles: z.ZodBoolean;
|
|
4422
4422
|
hasAddresses: z.ZodBoolean;
|
|
4423
4423
|
ordersPlaced: z.ZodNumber;
|
|
4424
|
-
totalSpent: z.
|
|
4424
|
+
totalSpent: z.ZodString;
|
|
4425
4425
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4426
4426
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4427
4427
|
} & {
|
|
@@ -4438,7 +4438,7 @@ declare class UpdateCustomer extends AbstractApiRequest<UpdateCustomerInput, Upd
|
|
|
4438
4438
|
hasBusinessProfiles: boolean;
|
|
4439
4439
|
hasAddresses: boolean;
|
|
4440
4440
|
ordersPlaced: number;
|
|
4441
|
-
totalSpent:
|
|
4441
|
+
totalSpent: string;
|
|
4442
4442
|
createdAt: string;
|
|
4443
4443
|
updatedAt: string;
|
|
4444
4444
|
pointOfSale: string | null;
|
|
@@ -4454,7 +4454,7 @@ declare class UpdateCustomer extends AbstractApiRequest<UpdateCustomerInput, Upd
|
|
|
4454
4454
|
hasBusinessProfiles: boolean;
|
|
4455
4455
|
hasAddresses: boolean;
|
|
4456
4456
|
ordersPlaced: number;
|
|
4457
|
-
totalSpent:
|
|
4457
|
+
totalSpent: string;
|
|
4458
4458
|
createdAt: string;
|
|
4459
4459
|
updatedAt: string;
|
|
4460
4460
|
pointOfSale: string | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ declare const customerSchema: z.ZodObject<{
|
|
|
12
12
|
hasBusinessProfiles: z.ZodBoolean;
|
|
13
13
|
hasAddresses: z.ZodBoolean;
|
|
14
14
|
ordersPlaced: z.ZodNumber;
|
|
15
|
-
totalSpent: z.
|
|
15
|
+
totalSpent: z.ZodString;
|
|
16
16
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
17
17
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
18
18
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -24,7 +24,7 @@ declare const customerSchema: z.ZodObject<{
|
|
|
24
24
|
hasBusinessProfiles: boolean;
|
|
25
25
|
hasAddresses: boolean;
|
|
26
26
|
ordersPlaced: number;
|
|
27
|
-
totalSpent:
|
|
27
|
+
totalSpent: string;
|
|
28
28
|
createdAt: string;
|
|
29
29
|
updatedAt: string;
|
|
30
30
|
}, {
|
|
@@ -36,7 +36,7 @@ declare const customerSchema: z.ZodObject<{
|
|
|
36
36
|
hasBusinessProfiles: boolean;
|
|
37
37
|
hasAddresses: boolean;
|
|
38
38
|
ordersPlaced: number;
|
|
39
|
-
totalSpent:
|
|
39
|
+
totalSpent: string;
|
|
40
40
|
createdAt: string;
|
|
41
41
|
updatedAt: string;
|
|
42
42
|
}>;
|
|
@@ -50,7 +50,7 @@ declare const customerDetailsSchema: z.ZodObject<{
|
|
|
50
50
|
hasBusinessProfiles: z.ZodBoolean;
|
|
51
51
|
hasAddresses: z.ZodBoolean;
|
|
52
52
|
ordersPlaced: z.ZodNumber;
|
|
53
|
-
totalSpent: z.
|
|
53
|
+
totalSpent: z.ZodString;
|
|
54
54
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
55
55
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
56
56
|
} & {
|
|
@@ -67,7 +67,7 @@ declare const customerDetailsSchema: z.ZodObject<{
|
|
|
67
67
|
hasBusinessProfiles: boolean;
|
|
68
68
|
hasAddresses: boolean;
|
|
69
69
|
ordersPlaced: number;
|
|
70
|
-
totalSpent:
|
|
70
|
+
totalSpent: string;
|
|
71
71
|
createdAt: string;
|
|
72
72
|
updatedAt: string;
|
|
73
73
|
pointOfSale: string | null;
|
|
@@ -83,7 +83,7 @@ declare const customerDetailsSchema: z.ZodObject<{
|
|
|
83
83
|
hasBusinessProfiles: boolean;
|
|
84
84
|
hasAddresses: boolean;
|
|
85
85
|
ordersPlaced: number;
|
|
86
|
-
totalSpent:
|
|
86
|
+
totalSpent: string;
|
|
87
87
|
createdAt: string;
|
|
88
88
|
updatedAt: string;
|
|
89
89
|
pointOfSale: string | null;
|
|
@@ -101,7 +101,7 @@ declare const writableCreateCustomerSchema: z.ZodObject<Pick<{
|
|
|
101
101
|
hasBusinessProfiles: z.ZodBoolean;
|
|
102
102
|
hasAddresses: z.ZodBoolean;
|
|
103
103
|
ordersPlaced: z.ZodNumber;
|
|
104
|
-
totalSpent: z.
|
|
104
|
+
totalSpent: z.ZodString;
|
|
105
105
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
106
106
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
107
107
|
} & {
|
|
@@ -131,7 +131,7 @@ declare const writableCustomerSchema: z.ZodObject<Omit<Pick<{
|
|
|
131
131
|
hasBusinessProfiles: z.ZodBoolean;
|
|
132
132
|
hasAddresses: z.ZodBoolean;
|
|
133
133
|
ordersPlaced: z.ZodNumber;
|
|
134
|
-
totalSpent: z.
|
|
134
|
+
totalSpent: z.ZodString;
|
|
135
135
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
136
136
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
137
137
|
} & {
|
|
@@ -3664,7 +3664,7 @@ declare const createCustomerResponseSchema: z.ZodObject<{
|
|
|
3664
3664
|
hasBusinessProfiles: z.ZodBoolean;
|
|
3665
3665
|
hasAddresses: z.ZodBoolean;
|
|
3666
3666
|
ordersPlaced: z.ZodNumber;
|
|
3667
|
-
totalSpent: z.
|
|
3667
|
+
totalSpent: z.ZodString;
|
|
3668
3668
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3669
3669
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3670
3670
|
} & {
|
|
@@ -3681,7 +3681,7 @@ declare const createCustomerResponseSchema: z.ZodObject<{
|
|
|
3681
3681
|
hasBusinessProfiles: boolean;
|
|
3682
3682
|
hasAddresses: boolean;
|
|
3683
3683
|
ordersPlaced: number;
|
|
3684
|
-
totalSpent:
|
|
3684
|
+
totalSpent: string;
|
|
3685
3685
|
createdAt: string;
|
|
3686
3686
|
updatedAt: string;
|
|
3687
3687
|
pointOfSale: string | null;
|
|
@@ -3697,7 +3697,7 @@ declare const createCustomerResponseSchema: z.ZodObject<{
|
|
|
3697
3697
|
hasBusinessProfiles: boolean;
|
|
3698
3698
|
hasAddresses: boolean;
|
|
3699
3699
|
ordersPlaced: number;
|
|
3700
|
-
totalSpent:
|
|
3700
|
+
totalSpent: string;
|
|
3701
3701
|
createdAt: string;
|
|
3702
3702
|
updatedAt: string;
|
|
3703
3703
|
pointOfSale: string | null;
|
|
@@ -3738,7 +3738,7 @@ declare class CreateCustomer extends AbstractApiRequest<CreateCustomerInput, Cre
|
|
|
3738
3738
|
hasBusinessProfiles: z.ZodBoolean;
|
|
3739
3739
|
hasAddresses: z.ZodBoolean;
|
|
3740
3740
|
ordersPlaced: z.ZodNumber;
|
|
3741
|
-
totalSpent: z.
|
|
3741
|
+
totalSpent: z.ZodString;
|
|
3742
3742
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3743
3743
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3744
3744
|
} & {
|
|
@@ -3755,7 +3755,7 @@ declare class CreateCustomer extends AbstractApiRequest<CreateCustomerInput, Cre
|
|
|
3755
3755
|
hasBusinessProfiles: boolean;
|
|
3756
3756
|
hasAddresses: boolean;
|
|
3757
3757
|
ordersPlaced: number;
|
|
3758
|
-
totalSpent:
|
|
3758
|
+
totalSpent: string;
|
|
3759
3759
|
createdAt: string;
|
|
3760
3760
|
updatedAt: string;
|
|
3761
3761
|
pointOfSale: string | null;
|
|
@@ -3771,7 +3771,7 @@ declare class CreateCustomer extends AbstractApiRequest<CreateCustomerInput, Cre
|
|
|
3771
3771
|
hasBusinessProfiles: boolean;
|
|
3772
3772
|
hasAddresses: boolean;
|
|
3773
3773
|
ordersPlaced: number;
|
|
3774
|
-
totalSpent:
|
|
3774
|
+
totalSpent: string;
|
|
3775
3775
|
createdAt: string;
|
|
3776
3776
|
updatedAt: string;
|
|
3777
3777
|
pointOfSale: string | null;
|
|
@@ -3810,7 +3810,7 @@ declare const getCustomerDetailsResponseSchema: z.ZodObject<{
|
|
|
3810
3810
|
hasBusinessProfiles: z.ZodBoolean;
|
|
3811
3811
|
hasAddresses: z.ZodBoolean;
|
|
3812
3812
|
ordersPlaced: z.ZodNumber;
|
|
3813
|
-
totalSpent: z.
|
|
3813
|
+
totalSpent: z.ZodString;
|
|
3814
3814
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3815
3815
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3816
3816
|
} & {
|
|
@@ -3827,7 +3827,7 @@ declare const getCustomerDetailsResponseSchema: z.ZodObject<{
|
|
|
3827
3827
|
hasBusinessProfiles: boolean;
|
|
3828
3828
|
hasAddresses: boolean;
|
|
3829
3829
|
ordersPlaced: number;
|
|
3830
|
-
totalSpent:
|
|
3830
|
+
totalSpent: string;
|
|
3831
3831
|
createdAt: string;
|
|
3832
3832
|
updatedAt: string;
|
|
3833
3833
|
pointOfSale: string | null;
|
|
@@ -3843,7 +3843,7 @@ declare const getCustomerDetailsResponseSchema: z.ZodObject<{
|
|
|
3843
3843
|
hasBusinessProfiles: boolean;
|
|
3844
3844
|
hasAddresses: boolean;
|
|
3845
3845
|
ordersPlaced: number;
|
|
3846
|
-
totalSpent:
|
|
3846
|
+
totalSpent: string;
|
|
3847
3847
|
createdAt: string;
|
|
3848
3848
|
updatedAt: string;
|
|
3849
3849
|
pointOfSale: string | null;
|
|
@@ -3866,7 +3866,7 @@ declare class GetCustomerDetails extends AbstractApiRequest<void, GetCustomerDet
|
|
|
3866
3866
|
hasBusinessProfiles: z.ZodBoolean;
|
|
3867
3867
|
hasAddresses: z.ZodBoolean;
|
|
3868
3868
|
ordersPlaced: z.ZodNumber;
|
|
3869
|
-
totalSpent: z.
|
|
3869
|
+
totalSpent: z.ZodString;
|
|
3870
3870
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3871
3871
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3872
3872
|
} & {
|
|
@@ -3883,7 +3883,7 @@ declare class GetCustomerDetails extends AbstractApiRequest<void, GetCustomerDet
|
|
|
3883
3883
|
hasBusinessProfiles: boolean;
|
|
3884
3884
|
hasAddresses: boolean;
|
|
3885
3885
|
ordersPlaced: number;
|
|
3886
|
-
totalSpent:
|
|
3886
|
+
totalSpent: string;
|
|
3887
3887
|
createdAt: string;
|
|
3888
3888
|
updatedAt: string;
|
|
3889
3889
|
pointOfSale: string | null;
|
|
@@ -3899,7 +3899,7 @@ declare class GetCustomerDetails extends AbstractApiRequest<void, GetCustomerDet
|
|
|
3899
3899
|
hasBusinessProfiles: boolean;
|
|
3900
3900
|
hasAddresses: boolean;
|
|
3901
3901
|
ordersPlaced: number;
|
|
3902
|
-
totalSpent:
|
|
3902
|
+
totalSpent: string;
|
|
3903
3903
|
createdAt: string;
|
|
3904
3904
|
updatedAt: string;
|
|
3905
3905
|
pointOfSale: string | null;
|
|
@@ -3927,10 +3927,10 @@ declare const getCustomersQuerySchema: z.ZodObject<{
|
|
|
3927
3927
|
'ordersPlaced[lt]': z.ZodOptional<z.ZodNumber>;
|
|
3928
3928
|
'ordersPlaced[lte]': z.ZodOptional<z.ZodNumber>;
|
|
3929
3929
|
'totalSpent[between]': z.ZodOptional<z.ZodNumber>;
|
|
3930
|
-
'totalSpent[gt]': z.ZodOptional<z.
|
|
3931
|
-
'totalSpent[gte]': z.ZodOptional<z.
|
|
3932
|
-
'totalSpent[lt]': z.ZodOptional<z.
|
|
3933
|
-
'totalSpent[lte]': z.ZodOptional<z.
|
|
3930
|
+
'totalSpent[gt]': z.ZodOptional<z.ZodString>;
|
|
3931
|
+
'totalSpent[gte]': z.ZodOptional<z.ZodString>;
|
|
3932
|
+
'totalSpent[lt]': z.ZodOptional<z.ZodString>;
|
|
3933
|
+
'totalSpent[lte]': z.ZodOptional<z.ZodString>;
|
|
3934
3934
|
'order[firstName]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
3935
3935
|
'order[lastName]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
3936
3936
|
'order[createdAt]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
@@ -3969,10 +3969,10 @@ declare const getCustomersQuerySchema: z.ZodObject<{
|
|
|
3969
3969
|
'ordersPlaced[lt]'?: number | undefined;
|
|
3970
3970
|
'ordersPlaced[lte]'?: number | undefined;
|
|
3971
3971
|
'totalSpent[between]'?: number | undefined;
|
|
3972
|
-
'totalSpent[gt]'?:
|
|
3973
|
-
'totalSpent[gte]'?:
|
|
3974
|
-
'totalSpent[lt]'?:
|
|
3975
|
-
'totalSpent[lte]'?:
|
|
3972
|
+
'totalSpent[gt]'?: string | undefined;
|
|
3973
|
+
'totalSpent[gte]'?: string | undefined;
|
|
3974
|
+
'totalSpent[lt]'?: string | undefined;
|
|
3975
|
+
'totalSpent[lte]'?: string | undefined;
|
|
3976
3976
|
'order[firstName]'?: "asc" | "desc" | undefined;
|
|
3977
3977
|
'order[lastName]'?: "asc" | "desc" | undefined;
|
|
3978
3978
|
}, {
|
|
@@ -3999,10 +3999,10 @@ declare const getCustomersQuerySchema: z.ZodObject<{
|
|
|
3999
3999
|
'ordersPlaced[lt]'?: number | undefined;
|
|
4000
4000
|
'ordersPlaced[lte]'?: number | undefined;
|
|
4001
4001
|
'totalSpent[between]'?: number | undefined;
|
|
4002
|
-
'totalSpent[gt]'?:
|
|
4003
|
-
'totalSpent[gte]'?:
|
|
4004
|
-
'totalSpent[lt]'?:
|
|
4005
|
-
'totalSpent[lte]'?:
|
|
4002
|
+
'totalSpent[gt]'?: string | undefined;
|
|
4003
|
+
'totalSpent[gte]'?: string | undefined;
|
|
4004
|
+
'totalSpent[lt]'?: string | undefined;
|
|
4005
|
+
'totalSpent[lte]'?: string | undefined;
|
|
4006
4006
|
'order[firstName]'?: "asc" | "desc" | undefined;
|
|
4007
4007
|
'order[lastName]'?: "asc" | "desc" | undefined;
|
|
4008
4008
|
}>;
|
|
@@ -4017,7 +4017,7 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
4017
4017
|
hasBusinessProfiles: z.ZodBoolean;
|
|
4018
4018
|
hasAddresses: z.ZodBoolean;
|
|
4019
4019
|
ordersPlaced: z.ZodNumber;
|
|
4020
|
-
totalSpent: z.
|
|
4020
|
+
totalSpent: z.ZodString;
|
|
4021
4021
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4022
4022
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4023
4023
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -4029,7 +4029,7 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
4029
4029
|
hasBusinessProfiles: boolean;
|
|
4030
4030
|
hasAddresses: boolean;
|
|
4031
4031
|
ordersPlaced: number;
|
|
4032
|
-
totalSpent:
|
|
4032
|
+
totalSpent: string;
|
|
4033
4033
|
createdAt: string;
|
|
4034
4034
|
updatedAt: string;
|
|
4035
4035
|
}, {
|
|
@@ -4041,7 +4041,7 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
4041
4041
|
hasBusinessProfiles: boolean;
|
|
4042
4042
|
hasAddresses: boolean;
|
|
4043
4043
|
ordersPlaced: number;
|
|
4044
|
-
totalSpent:
|
|
4044
|
+
totalSpent: string;
|
|
4045
4045
|
createdAt: string;
|
|
4046
4046
|
updatedAt: string;
|
|
4047
4047
|
}>, "many">;
|
|
@@ -4077,7 +4077,7 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
4077
4077
|
hasBusinessProfiles: boolean;
|
|
4078
4078
|
hasAddresses: boolean;
|
|
4079
4079
|
ordersPlaced: number;
|
|
4080
|
-
totalSpent:
|
|
4080
|
+
totalSpent: string;
|
|
4081
4081
|
createdAt: string;
|
|
4082
4082
|
updatedAt: string;
|
|
4083
4083
|
}[];
|
|
@@ -4099,7 +4099,7 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
4099
4099
|
hasBusinessProfiles: boolean;
|
|
4100
4100
|
hasAddresses: boolean;
|
|
4101
4101
|
ordersPlaced: number;
|
|
4102
|
-
totalSpent:
|
|
4102
|
+
totalSpent: string;
|
|
4103
4103
|
createdAt: string;
|
|
4104
4104
|
updatedAt: string;
|
|
4105
4105
|
}[];
|
|
@@ -4129,7 +4129,7 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4129
4129
|
hasBusinessProfiles: z.ZodBoolean;
|
|
4130
4130
|
hasAddresses: z.ZodBoolean;
|
|
4131
4131
|
ordersPlaced: z.ZodNumber;
|
|
4132
|
-
totalSpent: z.
|
|
4132
|
+
totalSpent: z.ZodString;
|
|
4133
4133
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4134
4134
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4135
4135
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -4141,7 +4141,7 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4141
4141
|
hasBusinessProfiles: boolean;
|
|
4142
4142
|
hasAddresses: boolean;
|
|
4143
4143
|
ordersPlaced: number;
|
|
4144
|
-
totalSpent:
|
|
4144
|
+
totalSpent: string;
|
|
4145
4145
|
createdAt: string;
|
|
4146
4146
|
updatedAt: string;
|
|
4147
4147
|
}, {
|
|
@@ -4153,7 +4153,7 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4153
4153
|
hasBusinessProfiles: boolean;
|
|
4154
4154
|
hasAddresses: boolean;
|
|
4155
4155
|
ordersPlaced: number;
|
|
4156
|
-
totalSpent:
|
|
4156
|
+
totalSpent: string;
|
|
4157
4157
|
createdAt: string;
|
|
4158
4158
|
updatedAt: string;
|
|
4159
4159
|
}>, "many">;
|
|
@@ -4189,7 +4189,7 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4189
4189
|
hasBusinessProfiles: boolean;
|
|
4190
4190
|
hasAddresses: boolean;
|
|
4191
4191
|
ordersPlaced: number;
|
|
4192
|
-
totalSpent:
|
|
4192
|
+
totalSpent: string;
|
|
4193
4193
|
createdAt: string;
|
|
4194
4194
|
updatedAt: string;
|
|
4195
4195
|
}[];
|
|
@@ -4211,7 +4211,7 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4211
4211
|
hasBusinessProfiles: boolean;
|
|
4212
4212
|
hasAddresses: boolean;
|
|
4213
4213
|
ordersPlaced: number;
|
|
4214
|
-
totalSpent:
|
|
4214
|
+
totalSpent: string;
|
|
4215
4215
|
createdAt: string;
|
|
4216
4216
|
updatedAt: string;
|
|
4217
4217
|
}[];
|
|
@@ -4237,10 +4237,10 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4237
4237
|
'ordersPlaced[lt]': z.ZodOptional<z.ZodNumber>;
|
|
4238
4238
|
'ordersPlaced[lte]': z.ZodOptional<z.ZodNumber>;
|
|
4239
4239
|
'totalSpent[between]': z.ZodOptional<z.ZodNumber>;
|
|
4240
|
-
'totalSpent[gt]': z.ZodOptional<z.
|
|
4241
|
-
'totalSpent[gte]': z.ZodOptional<z.
|
|
4242
|
-
'totalSpent[lt]': z.ZodOptional<z.
|
|
4243
|
-
'totalSpent[lte]': z.ZodOptional<z.
|
|
4240
|
+
'totalSpent[gt]': z.ZodOptional<z.ZodString>;
|
|
4241
|
+
'totalSpent[gte]': z.ZodOptional<z.ZodString>;
|
|
4242
|
+
'totalSpent[lt]': z.ZodOptional<z.ZodString>;
|
|
4243
|
+
'totalSpent[lte]': z.ZodOptional<z.ZodString>;
|
|
4244
4244
|
'order[firstName]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
4245
4245
|
'order[lastName]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
4246
4246
|
'order[createdAt]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
@@ -4279,10 +4279,10 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4279
4279
|
'ordersPlaced[lt]'?: number | undefined;
|
|
4280
4280
|
'ordersPlaced[lte]'?: number | undefined;
|
|
4281
4281
|
'totalSpent[between]'?: number | undefined;
|
|
4282
|
-
'totalSpent[gt]'?:
|
|
4283
|
-
'totalSpent[gte]'?:
|
|
4284
|
-
'totalSpent[lt]'?:
|
|
4285
|
-
'totalSpent[lte]'?:
|
|
4282
|
+
'totalSpent[gt]'?: string | undefined;
|
|
4283
|
+
'totalSpent[gte]'?: string | undefined;
|
|
4284
|
+
'totalSpent[lt]'?: string | undefined;
|
|
4285
|
+
'totalSpent[lte]'?: string | undefined;
|
|
4286
4286
|
'order[firstName]'?: "asc" | "desc" | undefined;
|
|
4287
4287
|
'order[lastName]'?: "asc" | "desc" | undefined;
|
|
4288
4288
|
}, {
|
|
@@ -4309,10 +4309,10 @@ declare class GetCustomers extends AbstractApiRequest<void, GetCustomersResponse
|
|
|
4309
4309
|
'ordersPlaced[lt]'?: number | undefined;
|
|
4310
4310
|
'ordersPlaced[lte]'?: number | undefined;
|
|
4311
4311
|
'totalSpent[between]'?: number | undefined;
|
|
4312
|
-
'totalSpent[gt]'?:
|
|
4313
|
-
'totalSpent[gte]'?:
|
|
4314
|
-
'totalSpent[lt]'?:
|
|
4315
|
-
'totalSpent[lte]'?:
|
|
4312
|
+
'totalSpent[gt]'?: string | undefined;
|
|
4313
|
+
'totalSpent[gte]'?: string | undefined;
|
|
4314
|
+
'totalSpent[lt]'?: string | undefined;
|
|
4315
|
+
'totalSpent[lte]'?: string | undefined;
|
|
4316
4316
|
'order[firstName]'?: "asc" | "desc" | undefined;
|
|
4317
4317
|
'order[lastName]'?: "asc" | "desc" | undefined;
|
|
4318
4318
|
}>;
|
|
@@ -4350,7 +4350,7 @@ declare const updateCustomerResponseSchema: z.ZodObject<{
|
|
|
4350
4350
|
hasBusinessProfiles: z.ZodBoolean;
|
|
4351
4351
|
hasAddresses: z.ZodBoolean;
|
|
4352
4352
|
ordersPlaced: z.ZodNumber;
|
|
4353
|
-
totalSpent: z.
|
|
4353
|
+
totalSpent: z.ZodString;
|
|
4354
4354
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4355
4355
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4356
4356
|
} & {
|
|
@@ -4367,7 +4367,7 @@ declare const updateCustomerResponseSchema: z.ZodObject<{
|
|
|
4367
4367
|
hasBusinessProfiles: boolean;
|
|
4368
4368
|
hasAddresses: boolean;
|
|
4369
4369
|
ordersPlaced: number;
|
|
4370
|
-
totalSpent:
|
|
4370
|
+
totalSpent: string;
|
|
4371
4371
|
createdAt: string;
|
|
4372
4372
|
updatedAt: string;
|
|
4373
4373
|
pointOfSale: string | null;
|
|
@@ -4383,7 +4383,7 @@ declare const updateCustomerResponseSchema: z.ZodObject<{
|
|
|
4383
4383
|
hasBusinessProfiles: boolean;
|
|
4384
4384
|
hasAddresses: boolean;
|
|
4385
4385
|
ordersPlaced: number;
|
|
4386
|
-
totalSpent:
|
|
4386
|
+
totalSpent: string;
|
|
4387
4387
|
createdAt: string;
|
|
4388
4388
|
updatedAt: string;
|
|
4389
4389
|
pointOfSale: string | null;
|
|
@@ -4421,7 +4421,7 @@ declare class UpdateCustomer extends AbstractApiRequest<UpdateCustomerInput, Upd
|
|
|
4421
4421
|
hasBusinessProfiles: z.ZodBoolean;
|
|
4422
4422
|
hasAddresses: z.ZodBoolean;
|
|
4423
4423
|
ordersPlaced: z.ZodNumber;
|
|
4424
|
-
totalSpent: z.
|
|
4424
|
+
totalSpent: z.ZodString;
|
|
4425
4425
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4426
4426
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
4427
4427
|
} & {
|
|
@@ -4438,7 +4438,7 @@ declare class UpdateCustomer extends AbstractApiRequest<UpdateCustomerInput, Upd
|
|
|
4438
4438
|
hasBusinessProfiles: boolean;
|
|
4439
4439
|
hasAddresses: boolean;
|
|
4440
4440
|
ordersPlaced: number;
|
|
4441
|
-
totalSpent:
|
|
4441
|
+
totalSpent: string;
|
|
4442
4442
|
createdAt: string;
|
|
4443
4443
|
updatedAt: string;
|
|
4444
4444
|
pointOfSale: string | null;
|
|
@@ -4454,7 +4454,7 @@ declare class UpdateCustomer extends AbstractApiRequest<UpdateCustomerInput, Upd
|
|
|
4454
4454
|
hasBusinessProfiles: boolean;
|
|
4455
4455
|
hasAddresses: boolean;
|
|
4456
4456
|
ordersPlaced: number;
|
|
4457
|
-
totalSpent:
|
|
4457
|
+
totalSpent: string;
|
|
4458
4458
|
createdAt: string;
|
|
4459
4459
|
updatedAt: string;
|
|
4460
4460
|
pointOfSale: string | null;
|
package/dist/index.js
CHANGED
|
@@ -11,37 +11,58 @@ import { z as z2 } from "zod";
|
|
|
11
11
|
|
|
12
12
|
// src/types.ts
|
|
13
13
|
import { z } from "zod";
|
|
14
|
-
var customerPathSchema = z.string().refine(
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
var customerPathSchema = z.string().refine(
|
|
15
|
+
(val) => /^\/customers\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
16
|
+
val
|
|
17
|
+
),
|
|
18
|
+
{
|
|
19
|
+
message: "Invalid customer path format"
|
|
20
|
+
}
|
|
21
|
+
);
|
|
17
22
|
var customerNullablePathSchema = z.string().nullable().refine(
|
|
18
23
|
(val) => {
|
|
19
24
|
if (!val) return true;
|
|
20
|
-
return /^\/customers\/[
|
|
25
|
+
return /^\/customers\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
26
|
+
val
|
|
27
|
+
);
|
|
21
28
|
},
|
|
22
29
|
{
|
|
23
30
|
message: "Invalid customer path format"
|
|
24
31
|
}
|
|
25
32
|
);
|
|
26
|
-
var customerAddressPathSchema = z.string().refine(
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
var customerAddressPathSchema = z.string().refine(
|
|
34
|
+
(val) => /^\/customers\/addresses\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
35
|
+
val
|
|
36
|
+
),
|
|
37
|
+
{
|
|
38
|
+
message: "Invalid customerAddress path format"
|
|
39
|
+
}
|
|
40
|
+
);
|
|
29
41
|
var customerAddressNullablePathSchema = z.string().nullable().refine(
|
|
30
42
|
(val) => {
|
|
31
43
|
if (!val) return true;
|
|
32
|
-
return /^\/customers\/addresses\/[
|
|
44
|
+
return /^\/customers\/addresses\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
45
|
+
val
|
|
46
|
+
);
|
|
33
47
|
},
|
|
34
48
|
{
|
|
35
49
|
message: "Invalid customerAddress path format"
|
|
36
50
|
}
|
|
37
51
|
);
|
|
38
|
-
var customerBusinessProfilePathSchema = z.string().refine(
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
var customerBusinessProfilePathSchema = z.string().refine(
|
|
53
|
+
(val) => /^\/customers\/business_profiles\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
54
|
+
val
|
|
55
|
+
),
|
|
56
|
+
{
|
|
57
|
+
message: "Invalid customerBusinessProfile path format"
|
|
58
|
+
}
|
|
59
|
+
);
|
|
41
60
|
var customerBusinessProfileNullablePathSchema = z.string().nullable().refine(
|
|
42
61
|
(val) => {
|
|
43
62
|
if (!val) return true;
|
|
44
|
-
return /^\/customers\/business_profiles\/[
|
|
63
|
+
return /^\/customers\/business_profiles\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
64
|
+
val
|
|
65
|
+
);
|
|
45
66
|
},
|
|
46
67
|
{
|
|
47
68
|
message: "Invalid customerBusinessProfile path format"
|
|
@@ -58,7 +79,7 @@ var customerSchema = z2.object({
|
|
|
58
79
|
hasBusinessProfiles: z2.boolean(),
|
|
59
80
|
hasAddresses: z2.boolean(),
|
|
60
81
|
ordersPlaced: z2.number(),
|
|
61
|
-
totalSpent: z2.
|
|
82
|
+
totalSpent: z2.string(),
|
|
62
83
|
createdAt: datetimeSchema,
|
|
63
84
|
updatedAt: datetimeSchema
|
|
64
85
|
});
|
|
@@ -536,10 +557,10 @@ var getCustomersQuerySchema = z13.object({
|
|
|
536
557
|
"ordersPlaced[lt]": z13.coerce.number().optional(),
|
|
537
558
|
"ordersPlaced[lte]": z13.coerce.number().optional(),
|
|
538
559
|
"totalSpent[between]": z13.coerce.number().optional(),
|
|
539
|
-
"totalSpent[gt]": z13.coerce.
|
|
540
|
-
"totalSpent[gte]": z13.coerce.
|
|
541
|
-
"totalSpent[lt]": z13.coerce.
|
|
542
|
-
"totalSpent[lte]": z13.coerce.
|
|
560
|
+
"totalSpent[gt]": z13.coerce.string().optional(),
|
|
561
|
+
"totalSpent[gte]": z13.coerce.string().optional(),
|
|
562
|
+
"totalSpent[lt]": z13.coerce.string().optional(),
|
|
563
|
+
"totalSpent[lte]": z13.coerce.string().optional(),
|
|
543
564
|
"order[firstName]": sortDirSchema5.optional(),
|
|
544
565
|
"order[lastName]": sortDirSchema5.optional(),
|
|
545
566
|
"order[createdAt]": sortDirSchema5.optional(),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deliverart/sdk-js-customer",
|
|
3
3
|
"description": "Deliverart JavaScript SDK for Customer and CustomerAddress Management",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@deliverart/sdk-js-core": "0.1.
|
|
15
|
+
"@deliverart/sdk-js-core": "0.1.4",
|
|
16
16
|
"@deliverart/sdk-js-global-types": "0.0.16",
|
|
17
|
-
"@deliverart/sdk-js-point-of-sale": "0.0.
|
|
18
|
-
"@deliverart/sdk-js-user": "0.2.
|
|
17
|
+
"@deliverart/sdk-js-point-of-sale": "0.0.8",
|
|
18
|
+
"@deliverart/sdk-js-user": "0.2.7",
|
|
19
19
|
"axios": "1.9.0",
|
|
20
20
|
"zod": "3.25.67"
|
|
21
21
|
},
|
package/src/models.ts
CHANGED
|
@@ -25,10 +25,10 @@ export const getCustomersQuerySchema = z
|
|
|
25
25
|
'ordersPlaced[lt]': z.coerce.number().optional(),
|
|
26
26
|
'ordersPlaced[lte]': z.coerce.number().optional(),
|
|
27
27
|
'totalSpent[between]': z.coerce.number().optional(),
|
|
28
|
-
'totalSpent[gt]': z.coerce.
|
|
29
|
-
'totalSpent[gte]': z.coerce.
|
|
30
|
-
'totalSpent[lt]': z.coerce.
|
|
31
|
-
'totalSpent[lte]': z.coerce.
|
|
28
|
+
'totalSpent[gt]': z.coerce.string().optional(),
|
|
29
|
+
'totalSpent[gte]': z.coerce.string().optional(),
|
|
30
|
+
'totalSpent[lt]': z.coerce.string().optional(),
|
|
31
|
+
'totalSpent[lte]': z.coerce.string().optional(),
|
|
32
32
|
'order[firstName]': sortDirSchema.optional(),
|
|
33
33
|
'order[lastName]': sortDirSchema.optional(),
|
|
34
34
|
'order[createdAt]': sortDirSchema.optional(),
|
package/src/types.ts
CHANGED
|
@@ -2,9 +2,15 @@ import { z } from 'zod'
|
|
|
2
2
|
|
|
3
3
|
export const customerPathSchema = z
|
|
4
4
|
.string()
|
|
5
|
-
.refine(
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
.refine(
|
|
6
|
+
val =>
|
|
7
|
+
/^\/customers\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
8
|
+
val,
|
|
9
|
+
),
|
|
10
|
+
{
|
|
11
|
+
message: 'Invalid customer path format',
|
|
12
|
+
},
|
|
13
|
+
)
|
|
8
14
|
export type CustomerPath = z.infer<typeof customerPathSchema>
|
|
9
15
|
|
|
10
16
|
export const customerNullablePathSchema = z
|
|
@@ -13,7 +19,9 @@ export const customerNullablePathSchema = z
|
|
|
13
19
|
.refine(
|
|
14
20
|
val => {
|
|
15
21
|
if (!val) return true
|
|
16
|
-
return /^\/customers\/[
|
|
22
|
+
return /^\/customers\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
23
|
+
val,
|
|
24
|
+
)
|
|
17
25
|
},
|
|
18
26
|
{
|
|
19
27
|
message: 'Invalid customer path format',
|
|
@@ -23,9 +31,15 @@ export type CustomerNullablePath = z.infer<typeof customerNullablePathSchema>
|
|
|
23
31
|
|
|
24
32
|
export const customerAddressPathSchema = z
|
|
25
33
|
.string()
|
|
26
|
-
.refine(
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
.refine(
|
|
35
|
+
val =>
|
|
36
|
+
/^\/customers\/addresses\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
37
|
+
val,
|
|
38
|
+
),
|
|
39
|
+
{
|
|
40
|
+
message: 'Invalid customerAddress path format',
|
|
41
|
+
},
|
|
42
|
+
)
|
|
29
43
|
export type CustomerAddressPath = z.infer<typeof customerAddressPathSchema>
|
|
30
44
|
|
|
31
45
|
export const customerAddressNullablePathSchema = z
|
|
@@ -34,7 +48,9 @@ export const customerAddressNullablePathSchema = z
|
|
|
34
48
|
.refine(
|
|
35
49
|
val => {
|
|
36
50
|
if (!val) return true
|
|
37
|
-
return /^\/customers\/addresses\/[
|
|
51
|
+
return /^\/customers\/addresses\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
52
|
+
val,
|
|
53
|
+
)
|
|
38
54
|
},
|
|
39
55
|
{
|
|
40
56
|
message: 'Invalid customerAddress path format',
|
|
@@ -44,9 +60,15 @@ export type CustomerAddressNullablePath = z.infer<typeof customerAddressNullable
|
|
|
44
60
|
|
|
45
61
|
export const customerBusinessProfilePathSchema = z
|
|
46
62
|
.string()
|
|
47
|
-
.refine(
|
|
48
|
-
|
|
49
|
-
|
|
63
|
+
.refine(
|
|
64
|
+
val =>
|
|
65
|
+
/^\/customers\/business_profiles\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
66
|
+
val,
|
|
67
|
+
),
|
|
68
|
+
{
|
|
69
|
+
message: 'Invalid customerBusinessProfile path format',
|
|
70
|
+
},
|
|
71
|
+
)
|
|
50
72
|
export type CustomerBusinessProfilePath = z.infer<typeof customerBusinessProfilePathSchema>
|
|
51
73
|
|
|
52
74
|
export const customerBusinessProfileNullablePathSchema = z
|
|
@@ -55,7 +77,9 @@ export const customerBusinessProfileNullablePathSchema = z
|
|
|
55
77
|
.refine(
|
|
56
78
|
val => {
|
|
57
79
|
if (!val) return true
|
|
58
|
-
return /^\/customers\/business_profiles\/[
|
|
80
|
+
return /^\/customers\/business_profiles\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
81
|
+
val,
|
|
82
|
+
)
|
|
59
83
|
},
|
|
60
84
|
{
|
|
61
85
|
message: 'Invalid customerBusinessProfile path format',
|