@tonytang99/integration-canonical 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +414 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -15
- package/dist/index.js.map +1 -1
- package/dist/schemas/customer.d.ts +746 -0
- package/dist/schemas/customer.d.ts.map +1 -0
- package/dist/schemas/customer.js +282 -0
- package/dist/schemas/customer.js.map +1 -0
- package/dist/schemas/index.d.ts +13 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +33 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/inventory.d.ts +1642 -0
- package/dist/schemas/inventory.d.ts.map +1 -0
- package/dist/schemas/inventory.js +302 -0
- package/dist/schemas/inventory.js.map +1 -0
- package/dist/schemas/order.d.ts +1339 -0
- package/dist/schemas/order.d.ts.map +1 -0
- package/dist/schemas/order.js +310 -0
- package/dist/schemas/order.js.map +1 -0
- package/dist/schemas/product.d.ts +717 -0
- package/dist/schemas/product.d.ts.map +1 -0
- package/dist/schemas/product.js +303 -0
- package/dist/schemas/product.js.map +1 -0
- package/dist/slots.d.ts +572 -0
- package/dist/slots.d.ts.map +1 -0
- package/dist/slots.js +20 -0
- package/dist/slots.js.map +1 -0
- package/dist/types/common.d.ts +284 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +401 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/enrichments.d.ts +378 -0
- package/dist/types/enrichments.d.ts.map +1 -0
- package/dist/types/enrichments.js +96 -0
- package/dist/types/enrichments.js.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,746 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CustomerAddressSchema: z.ZodObject<{
|
|
3
|
+
street1: z.ZodString;
|
|
4
|
+
street2: z.ZodOptional<z.ZodString>;
|
|
5
|
+
street3: z.ZodOptional<z.ZodString>;
|
|
6
|
+
city: z.ZodString;
|
|
7
|
+
state: z.ZodOptional<z.ZodString>;
|
|
8
|
+
stateCode: z.ZodOptional<z.ZodString>;
|
|
9
|
+
postalCode: z.ZodString;
|
|
10
|
+
country: z.ZodString;
|
|
11
|
+
countryCode: z.ZodOptional<z.ZodEnum<["US", "CA", "GB", "AU", "NZ", "DE", "FR", "IT", "ES", "NL", "BE", "CH", "AT", "SE", "NO", "DK", "FI", "IE", "PT", "PL", "CZ", "JP", "CN", "IN", "SG", "HK", "MX", "BR", "ZA"]>>;
|
|
12
|
+
company: z.ZodOptional<z.ZodString>;
|
|
13
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
14
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
15
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
16
|
+
email: z.ZodOptional<z.ZodString>;
|
|
17
|
+
type: z.ZodOptional<z.ZodEnum<["billing", "shipping", "both"]>>;
|
|
18
|
+
isResidential: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
isValidated: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
validationSource: z.ZodOptional<z.ZodString>;
|
|
21
|
+
} & {
|
|
22
|
+
id: z.ZodOptional<z.ZodString>;
|
|
23
|
+
label: z.ZodOptional<z.ZodString>;
|
|
24
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
street1: string;
|
|
27
|
+
city: string;
|
|
28
|
+
postalCode: string;
|
|
29
|
+
country: string;
|
|
30
|
+
type?: "billing" | "shipping" | "both" | undefined;
|
|
31
|
+
street2?: string | undefined;
|
|
32
|
+
street3?: string | undefined;
|
|
33
|
+
state?: string | undefined;
|
|
34
|
+
stateCode?: string | undefined;
|
|
35
|
+
countryCode?: "US" | "CA" | "GB" | "AU" | "NZ" | "DE" | "FR" | "IT" | "ES" | "NL" | "BE" | "CH" | "AT" | "SE" | "NO" | "DK" | "FI" | "IE" | "PT" | "PL" | "CZ" | "JP" | "CN" | "IN" | "SG" | "HK" | "MX" | "BR" | "ZA" | undefined;
|
|
36
|
+
company?: string | undefined;
|
|
37
|
+
firstName?: string | undefined;
|
|
38
|
+
lastName?: string | undefined;
|
|
39
|
+
phone?: string | undefined;
|
|
40
|
+
email?: string | undefined;
|
|
41
|
+
isDefault?: boolean | undefined;
|
|
42
|
+
isResidential?: boolean | undefined;
|
|
43
|
+
isValidated?: boolean | undefined;
|
|
44
|
+
validationSource?: string | undefined;
|
|
45
|
+
id?: string | undefined;
|
|
46
|
+
label?: string | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
street1: string;
|
|
49
|
+
city: string;
|
|
50
|
+
postalCode: string;
|
|
51
|
+
country: string;
|
|
52
|
+
type?: "billing" | "shipping" | "both" | undefined;
|
|
53
|
+
street2?: string | undefined;
|
|
54
|
+
street3?: string | undefined;
|
|
55
|
+
state?: string | undefined;
|
|
56
|
+
stateCode?: string | undefined;
|
|
57
|
+
countryCode?: "US" | "CA" | "GB" | "AU" | "NZ" | "DE" | "FR" | "IT" | "ES" | "NL" | "BE" | "CH" | "AT" | "SE" | "NO" | "DK" | "FI" | "IE" | "PT" | "PL" | "CZ" | "JP" | "CN" | "IN" | "SG" | "HK" | "MX" | "BR" | "ZA" | undefined;
|
|
58
|
+
company?: string | undefined;
|
|
59
|
+
firstName?: string | undefined;
|
|
60
|
+
lastName?: string | undefined;
|
|
61
|
+
phone?: string | undefined;
|
|
62
|
+
email?: string | undefined;
|
|
63
|
+
isDefault?: boolean | undefined;
|
|
64
|
+
isResidential?: boolean | undefined;
|
|
65
|
+
isValidated?: boolean | undefined;
|
|
66
|
+
validationSource?: string | undefined;
|
|
67
|
+
id?: string | undefined;
|
|
68
|
+
label?: string | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
export type CustomerAddress = z.infer<typeof CustomerAddressSchema>;
|
|
71
|
+
export declare const CustomerStatsSchema: z.ZodObject<{
|
|
72
|
+
totalOrders: z.ZodNumber;
|
|
73
|
+
totalSpent: z.ZodObject<{
|
|
74
|
+
amount: z.ZodNumber;
|
|
75
|
+
currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
amount: number;
|
|
78
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
79
|
+
}, {
|
|
80
|
+
amount: number;
|
|
81
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
82
|
+
}>;
|
|
83
|
+
averageOrderValue: z.ZodObject<{
|
|
84
|
+
amount: z.ZodNumber;
|
|
85
|
+
currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
amount: number;
|
|
88
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
89
|
+
}, {
|
|
90
|
+
amount: number;
|
|
91
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
92
|
+
}>;
|
|
93
|
+
lastOrderValue: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
amount: z.ZodNumber;
|
|
95
|
+
currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
amount: number;
|
|
98
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
99
|
+
}, {
|
|
100
|
+
amount: number;
|
|
101
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
102
|
+
}>>;
|
|
103
|
+
lifetimeValue: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
amount: z.ZodNumber;
|
|
105
|
+
currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
amount: number;
|
|
108
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
109
|
+
}, {
|
|
110
|
+
amount: number;
|
|
111
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
112
|
+
}>>;
|
|
113
|
+
}, "strip", z.ZodTypeAny, {
|
|
114
|
+
totalOrders: number;
|
|
115
|
+
totalSpent: {
|
|
116
|
+
amount: number;
|
|
117
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
118
|
+
};
|
|
119
|
+
averageOrderValue: {
|
|
120
|
+
amount: number;
|
|
121
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
122
|
+
};
|
|
123
|
+
lastOrderValue?: {
|
|
124
|
+
amount: number;
|
|
125
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
126
|
+
} | undefined;
|
|
127
|
+
lifetimeValue?: {
|
|
128
|
+
amount: number;
|
|
129
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
130
|
+
} | undefined;
|
|
131
|
+
}, {
|
|
132
|
+
totalOrders: number;
|
|
133
|
+
totalSpent: {
|
|
134
|
+
amount: number;
|
|
135
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
136
|
+
};
|
|
137
|
+
averageOrderValue: {
|
|
138
|
+
amount: number;
|
|
139
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
140
|
+
};
|
|
141
|
+
lastOrderValue?: {
|
|
142
|
+
amount: number;
|
|
143
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
144
|
+
} | undefined;
|
|
145
|
+
lifetimeValue?: {
|
|
146
|
+
amount: number;
|
|
147
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
148
|
+
} | undefined;
|
|
149
|
+
}>;
|
|
150
|
+
export type CustomerStats = z.infer<typeof CustomerStatsSchema>;
|
|
151
|
+
export declare const CustomerGroupSchema: z.ZodObject<{
|
|
152
|
+
id: z.ZodString;
|
|
153
|
+
name: z.ZodString;
|
|
154
|
+
type: z.ZodOptional<z.ZodEnum<["tier", "segment", "category", "custom"]>>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
id: string;
|
|
157
|
+
name: string;
|
|
158
|
+
type?: "custom" | "tier" | "segment" | "category" | undefined;
|
|
159
|
+
}, {
|
|
160
|
+
id: string;
|
|
161
|
+
name: string;
|
|
162
|
+
type?: "custom" | "tier" | "segment" | "category" | undefined;
|
|
163
|
+
}>;
|
|
164
|
+
export type CustomerGroup = z.infer<typeof CustomerGroupSchema>;
|
|
165
|
+
export declare const CustomerStatus: z.ZodEnum<["active", "inactive", "suspended", "blocked", "pending"]>;
|
|
166
|
+
export type CustomerStatus = z.infer<typeof CustomerStatus>;
|
|
167
|
+
export declare const CanonicalCustomerSchema: z.ZodObject<{
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
email: z.ZodString;
|
|
170
|
+
firstName: z.ZodString;
|
|
171
|
+
lastName: z.ZodString;
|
|
172
|
+
company: z.ZodOptional<z.ZodString>;
|
|
173
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
174
|
+
phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
175
|
+
number: z.ZodString;
|
|
176
|
+
countryCode: z.ZodOptional<z.ZodString>;
|
|
177
|
+
extension: z.ZodOptional<z.ZodString>;
|
|
178
|
+
type: z.ZodOptional<z.ZodEnum<["mobile", "home", "work", "fax", "other"]>>;
|
|
179
|
+
}, "strip", z.ZodTypeAny, {
|
|
180
|
+
number: string;
|
|
181
|
+
type?: "mobile" | "home" | "work" | "fax" | "other" | undefined;
|
|
182
|
+
countryCode?: string | undefined;
|
|
183
|
+
extension?: string | undefined;
|
|
184
|
+
}, {
|
|
185
|
+
number: string;
|
|
186
|
+
type?: "mobile" | "home" | "work" | "fax" | "other" | undefined;
|
|
187
|
+
countryCode?: string | undefined;
|
|
188
|
+
extension?: string | undefined;
|
|
189
|
+
}>, "many">>;
|
|
190
|
+
defaultBillingAddressId: z.ZodOptional<z.ZodString>;
|
|
191
|
+
defaultShippingAddressId: z.ZodOptional<z.ZodString>;
|
|
192
|
+
addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
193
|
+
street1: z.ZodString;
|
|
194
|
+
street2: z.ZodOptional<z.ZodString>;
|
|
195
|
+
street3: z.ZodOptional<z.ZodString>;
|
|
196
|
+
city: z.ZodString;
|
|
197
|
+
state: z.ZodOptional<z.ZodString>;
|
|
198
|
+
stateCode: z.ZodOptional<z.ZodString>;
|
|
199
|
+
postalCode: z.ZodString;
|
|
200
|
+
country: z.ZodString;
|
|
201
|
+
countryCode: z.ZodOptional<z.ZodEnum<["US", "CA", "GB", "AU", "NZ", "DE", "FR", "IT", "ES", "NL", "BE", "CH", "AT", "SE", "NO", "DK", "FI", "IE", "PT", "PL", "CZ", "JP", "CN", "IN", "SG", "HK", "MX", "BR", "ZA"]>>;
|
|
202
|
+
company: z.ZodOptional<z.ZodString>;
|
|
203
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
204
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
205
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
206
|
+
email: z.ZodOptional<z.ZodString>;
|
|
207
|
+
type: z.ZodOptional<z.ZodEnum<["billing", "shipping", "both"]>>;
|
|
208
|
+
isResidential: z.ZodOptional<z.ZodBoolean>;
|
|
209
|
+
isValidated: z.ZodOptional<z.ZodBoolean>;
|
|
210
|
+
validationSource: z.ZodOptional<z.ZodString>;
|
|
211
|
+
} & {
|
|
212
|
+
id: z.ZodOptional<z.ZodString>;
|
|
213
|
+
label: z.ZodOptional<z.ZodString>;
|
|
214
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
215
|
+
}, "strip", z.ZodTypeAny, {
|
|
216
|
+
street1: string;
|
|
217
|
+
city: string;
|
|
218
|
+
postalCode: string;
|
|
219
|
+
country: string;
|
|
220
|
+
type?: "billing" | "shipping" | "both" | undefined;
|
|
221
|
+
street2?: string | undefined;
|
|
222
|
+
street3?: string | undefined;
|
|
223
|
+
state?: string | undefined;
|
|
224
|
+
stateCode?: string | undefined;
|
|
225
|
+
countryCode?: "US" | "CA" | "GB" | "AU" | "NZ" | "DE" | "FR" | "IT" | "ES" | "NL" | "BE" | "CH" | "AT" | "SE" | "NO" | "DK" | "FI" | "IE" | "PT" | "PL" | "CZ" | "JP" | "CN" | "IN" | "SG" | "HK" | "MX" | "BR" | "ZA" | undefined;
|
|
226
|
+
company?: string | undefined;
|
|
227
|
+
firstName?: string | undefined;
|
|
228
|
+
lastName?: string | undefined;
|
|
229
|
+
phone?: string | undefined;
|
|
230
|
+
email?: string | undefined;
|
|
231
|
+
isDefault?: boolean | undefined;
|
|
232
|
+
isResidential?: boolean | undefined;
|
|
233
|
+
isValidated?: boolean | undefined;
|
|
234
|
+
validationSource?: string | undefined;
|
|
235
|
+
id?: string | undefined;
|
|
236
|
+
label?: string | undefined;
|
|
237
|
+
}, {
|
|
238
|
+
street1: string;
|
|
239
|
+
city: string;
|
|
240
|
+
postalCode: string;
|
|
241
|
+
country: string;
|
|
242
|
+
type?: "billing" | "shipping" | "both" | undefined;
|
|
243
|
+
street2?: string | undefined;
|
|
244
|
+
street3?: string | undefined;
|
|
245
|
+
state?: string | undefined;
|
|
246
|
+
stateCode?: string | undefined;
|
|
247
|
+
countryCode?: "US" | "CA" | "GB" | "AU" | "NZ" | "DE" | "FR" | "IT" | "ES" | "NL" | "BE" | "CH" | "AT" | "SE" | "NO" | "DK" | "FI" | "IE" | "PT" | "PL" | "CZ" | "JP" | "CN" | "IN" | "SG" | "HK" | "MX" | "BR" | "ZA" | undefined;
|
|
248
|
+
company?: string | undefined;
|
|
249
|
+
firstName?: string | undefined;
|
|
250
|
+
lastName?: string | undefined;
|
|
251
|
+
phone?: string | undefined;
|
|
252
|
+
email?: string | undefined;
|
|
253
|
+
isDefault?: boolean | undefined;
|
|
254
|
+
isResidential?: boolean | undefined;
|
|
255
|
+
isValidated?: boolean | undefined;
|
|
256
|
+
validationSource?: string | undefined;
|
|
257
|
+
id?: string | undefined;
|
|
258
|
+
label?: string | undefined;
|
|
259
|
+
}>, "many">>;
|
|
260
|
+
status: z.ZodEnum<["active", "inactive", "suspended", "blocked", "pending"]>;
|
|
261
|
+
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
262
|
+
acceptsMarketing: z.ZodBoolean;
|
|
263
|
+
acceptsSms: z.ZodOptional<z.ZodBoolean>;
|
|
264
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
265
|
+
totalOrders: z.ZodNumber;
|
|
266
|
+
totalSpent: z.ZodObject<{
|
|
267
|
+
amount: z.ZodNumber;
|
|
268
|
+
currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
|
|
269
|
+
}, "strip", z.ZodTypeAny, {
|
|
270
|
+
amount: number;
|
|
271
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
272
|
+
}, {
|
|
273
|
+
amount: number;
|
|
274
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
275
|
+
}>;
|
|
276
|
+
averageOrderValue: z.ZodObject<{
|
|
277
|
+
amount: z.ZodNumber;
|
|
278
|
+
currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
|
|
279
|
+
}, "strip", z.ZodTypeAny, {
|
|
280
|
+
amount: number;
|
|
281
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
282
|
+
}, {
|
|
283
|
+
amount: number;
|
|
284
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
285
|
+
}>;
|
|
286
|
+
lastOrderValue: z.ZodOptional<z.ZodObject<{
|
|
287
|
+
amount: z.ZodNumber;
|
|
288
|
+
currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
|
|
289
|
+
}, "strip", z.ZodTypeAny, {
|
|
290
|
+
amount: number;
|
|
291
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
292
|
+
}, {
|
|
293
|
+
amount: number;
|
|
294
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
295
|
+
}>>;
|
|
296
|
+
lifetimeValue: z.ZodOptional<z.ZodObject<{
|
|
297
|
+
amount: z.ZodNumber;
|
|
298
|
+
currency: z.ZodEnum<["USD", "EUR", "GBP", "AUD", "CAD", "NZD", "JPY", "CNY", "INR", "SGD", "HKD", "MXN", "BRL", "ZAR"]>;
|
|
299
|
+
}, "strip", z.ZodTypeAny, {
|
|
300
|
+
amount: number;
|
|
301
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
302
|
+
}, {
|
|
303
|
+
amount: number;
|
|
304
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
305
|
+
}>>;
|
|
306
|
+
}, "strip", z.ZodTypeAny, {
|
|
307
|
+
totalOrders: number;
|
|
308
|
+
totalSpent: {
|
|
309
|
+
amount: number;
|
|
310
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
311
|
+
};
|
|
312
|
+
averageOrderValue: {
|
|
313
|
+
amount: number;
|
|
314
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
315
|
+
};
|
|
316
|
+
lastOrderValue?: {
|
|
317
|
+
amount: number;
|
|
318
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
319
|
+
} | undefined;
|
|
320
|
+
lifetimeValue?: {
|
|
321
|
+
amount: number;
|
|
322
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
323
|
+
} | undefined;
|
|
324
|
+
}, {
|
|
325
|
+
totalOrders: number;
|
|
326
|
+
totalSpent: {
|
|
327
|
+
amount: number;
|
|
328
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
329
|
+
};
|
|
330
|
+
averageOrderValue: {
|
|
331
|
+
amount: number;
|
|
332
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
333
|
+
};
|
|
334
|
+
lastOrderValue?: {
|
|
335
|
+
amount: number;
|
|
336
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
337
|
+
} | undefined;
|
|
338
|
+
lifetimeValue?: {
|
|
339
|
+
amount: number;
|
|
340
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
341
|
+
} | undefined;
|
|
342
|
+
}>>;
|
|
343
|
+
dates: z.ZodObject<{
|
|
344
|
+
createdAt: z.ZodString;
|
|
345
|
+
updatedAt: z.ZodString;
|
|
346
|
+
lastOrderAt: z.ZodOptional<z.ZodString>;
|
|
347
|
+
lastLoginAt: z.ZodOptional<z.ZodString>;
|
|
348
|
+
verifiedAt: z.ZodOptional<z.ZodString>;
|
|
349
|
+
}, "strip", z.ZodTypeAny, {
|
|
350
|
+
createdAt: string;
|
|
351
|
+
updatedAt: string;
|
|
352
|
+
lastOrderAt?: string | undefined;
|
|
353
|
+
lastLoginAt?: string | undefined;
|
|
354
|
+
verifiedAt?: string | undefined;
|
|
355
|
+
}, {
|
|
356
|
+
createdAt: string;
|
|
357
|
+
updatedAt: string;
|
|
358
|
+
lastOrderAt?: string | undefined;
|
|
359
|
+
lastLoginAt?: string | undefined;
|
|
360
|
+
verifiedAt?: string | undefined;
|
|
361
|
+
}>;
|
|
362
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
363
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
364
|
+
id: z.ZodString;
|
|
365
|
+
name: z.ZodString;
|
|
366
|
+
type: z.ZodOptional<z.ZodEnum<["tier", "segment", "category", "custom"]>>;
|
|
367
|
+
}, "strip", z.ZodTypeAny, {
|
|
368
|
+
id: string;
|
|
369
|
+
name: string;
|
|
370
|
+
type?: "custom" | "tier" | "segment" | "category" | undefined;
|
|
371
|
+
}, {
|
|
372
|
+
id: string;
|
|
373
|
+
name: string;
|
|
374
|
+
type?: "custom" | "tier" | "segment" | "category" | undefined;
|
|
375
|
+
}>, "many">>;
|
|
376
|
+
tier: z.ZodOptional<z.ZodString>;
|
|
377
|
+
preferences: z.ZodOptional<z.ZodObject<{
|
|
378
|
+
language: z.ZodOptional<z.ZodString>;
|
|
379
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
380
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
381
|
+
communicationPreferences: z.ZodOptional<z.ZodObject<{
|
|
382
|
+
email: z.ZodOptional<z.ZodBoolean>;
|
|
383
|
+
sms: z.ZodOptional<z.ZodBoolean>;
|
|
384
|
+
phone: z.ZodOptional<z.ZodBoolean>;
|
|
385
|
+
push: z.ZodOptional<z.ZodBoolean>;
|
|
386
|
+
}, "strip", z.ZodTypeAny, {
|
|
387
|
+
push?: boolean | undefined;
|
|
388
|
+
phone?: boolean | undefined;
|
|
389
|
+
email?: boolean | undefined;
|
|
390
|
+
sms?: boolean | undefined;
|
|
391
|
+
}, {
|
|
392
|
+
push?: boolean | undefined;
|
|
393
|
+
phone?: boolean | undefined;
|
|
394
|
+
email?: boolean | undefined;
|
|
395
|
+
sms?: boolean | undefined;
|
|
396
|
+
}>>;
|
|
397
|
+
}, "strip", z.ZodTypeAny, {
|
|
398
|
+
currency?: string | undefined;
|
|
399
|
+
language?: string | undefined;
|
|
400
|
+
timezone?: string | undefined;
|
|
401
|
+
communicationPreferences?: {
|
|
402
|
+
push?: boolean | undefined;
|
|
403
|
+
phone?: boolean | undefined;
|
|
404
|
+
email?: boolean | undefined;
|
|
405
|
+
sms?: boolean | undefined;
|
|
406
|
+
} | undefined;
|
|
407
|
+
}, {
|
|
408
|
+
currency?: string | undefined;
|
|
409
|
+
language?: string | undefined;
|
|
410
|
+
timezone?: string | undefined;
|
|
411
|
+
communicationPreferences?: {
|
|
412
|
+
push?: boolean | undefined;
|
|
413
|
+
phone?: boolean | undefined;
|
|
414
|
+
email?: boolean | undefined;
|
|
415
|
+
sms?: boolean | undefined;
|
|
416
|
+
} | undefined;
|
|
417
|
+
}>>;
|
|
418
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
419
|
+
internalNotes: z.ZodOptional<z.ZodString>;
|
|
420
|
+
customFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
421
|
+
metadata: z.ZodObject<{
|
|
422
|
+
source: z.ZodString;
|
|
423
|
+
sourceId: z.ZodString;
|
|
424
|
+
externalIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
425
|
+
accountNumber: z.ZodOptional<z.ZodString>;
|
|
426
|
+
taxExempt: z.ZodOptional<z.ZodBoolean>;
|
|
427
|
+
taxExemptionId: z.ZodOptional<z.ZodString>;
|
|
428
|
+
businessType: z.ZodOptional<z.ZodEnum<["individual", "business", "non-profit"]>>;
|
|
429
|
+
vatNumber: z.ZodOptional<z.ZodString>;
|
|
430
|
+
isWholesale: z.ZodOptional<z.ZodBoolean>;
|
|
431
|
+
isVip: z.ZodOptional<z.ZodBoolean>;
|
|
432
|
+
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
433
|
+
}, "strip", z.ZodTypeAny, {
|
|
434
|
+
source: string;
|
|
435
|
+
sourceId: string;
|
|
436
|
+
externalIds?: Record<string, string> | undefined;
|
|
437
|
+
isTest?: boolean | undefined;
|
|
438
|
+
accountNumber?: string | undefined;
|
|
439
|
+
taxExempt?: boolean | undefined;
|
|
440
|
+
taxExemptionId?: string | undefined;
|
|
441
|
+
businessType?: "individual" | "business" | "non-profit" | undefined;
|
|
442
|
+
vatNumber?: string | undefined;
|
|
443
|
+
isWholesale?: boolean | undefined;
|
|
444
|
+
isVip?: boolean | undefined;
|
|
445
|
+
}, {
|
|
446
|
+
source: string;
|
|
447
|
+
sourceId: string;
|
|
448
|
+
externalIds?: Record<string, string> | undefined;
|
|
449
|
+
isTest?: boolean | undefined;
|
|
450
|
+
accountNumber?: string | undefined;
|
|
451
|
+
taxExempt?: boolean | undefined;
|
|
452
|
+
taxExemptionId?: string | undefined;
|
|
453
|
+
businessType?: "individual" | "business" | "non-profit" | undefined;
|
|
454
|
+
vatNumber?: string | undefined;
|
|
455
|
+
isWholesale?: boolean | undefined;
|
|
456
|
+
isVip?: boolean | undefined;
|
|
457
|
+
}>;
|
|
458
|
+
}, "strip", z.ZodTypeAny, {
|
|
459
|
+
status: "pending" | "active" | "inactive" | "suspended" | "blocked";
|
|
460
|
+
firstName: string;
|
|
461
|
+
lastName: string;
|
|
462
|
+
email: string;
|
|
463
|
+
id: string;
|
|
464
|
+
metadata: {
|
|
465
|
+
source: string;
|
|
466
|
+
sourceId: string;
|
|
467
|
+
externalIds?: Record<string, string> | undefined;
|
|
468
|
+
isTest?: boolean | undefined;
|
|
469
|
+
accountNumber?: string | undefined;
|
|
470
|
+
taxExempt?: boolean | undefined;
|
|
471
|
+
taxExemptionId?: string | undefined;
|
|
472
|
+
businessType?: "individual" | "business" | "non-profit" | undefined;
|
|
473
|
+
vatNumber?: string | undefined;
|
|
474
|
+
isWholesale?: boolean | undefined;
|
|
475
|
+
isVip?: boolean | undefined;
|
|
476
|
+
};
|
|
477
|
+
dates: {
|
|
478
|
+
createdAt: string;
|
|
479
|
+
updatedAt: string;
|
|
480
|
+
lastOrderAt?: string | undefined;
|
|
481
|
+
lastLoginAt?: string | undefined;
|
|
482
|
+
verifiedAt?: string | undefined;
|
|
483
|
+
};
|
|
484
|
+
acceptsMarketing: boolean;
|
|
485
|
+
company?: string | undefined;
|
|
486
|
+
phone?: string | undefined;
|
|
487
|
+
customFields?: Record<string, unknown> | undefined;
|
|
488
|
+
notes?: string | undefined;
|
|
489
|
+
tags?: string[] | undefined;
|
|
490
|
+
tier?: string | undefined;
|
|
491
|
+
phones?: {
|
|
492
|
+
number: string;
|
|
493
|
+
type?: "mobile" | "home" | "work" | "fax" | "other" | undefined;
|
|
494
|
+
countryCode?: string | undefined;
|
|
495
|
+
extension?: string | undefined;
|
|
496
|
+
}[] | undefined;
|
|
497
|
+
defaultBillingAddressId?: string | undefined;
|
|
498
|
+
defaultShippingAddressId?: string | undefined;
|
|
499
|
+
addresses?: {
|
|
500
|
+
street1: string;
|
|
501
|
+
city: string;
|
|
502
|
+
postalCode: string;
|
|
503
|
+
country: string;
|
|
504
|
+
type?: "billing" | "shipping" | "both" | undefined;
|
|
505
|
+
street2?: string | undefined;
|
|
506
|
+
street3?: string | undefined;
|
|
507
|
+
state?: string | undefined;
|
|
508
|
+
stateCode?: string | undefined;
|
|
509
|
+
countryCode?: "US" | "CA" | "GB" | "AU" | "NZ" | "DE" | "FR" | "IT" | "ES" | "NL" | "BE" | "CH" | "AT" | "SE" | "NO" | "DK" | "FI" | "IE" | "PT" | "PL" | "CZ" | "JP" | "CN" | "IN" | "SG" | "HK" | "MX" | "BR" | "ZA" | undefined;
|
|
510
|
+
company?: string | undefined;
|
|
511
|
+
firstName?: string | undefined;
|
|
512
|
+
lastName?: string | undefined;
|
|
513
|
+
phone?: string | undefined;
|
|
514
|
+
email?: string | undefined;
|
|
515
|
+
isDefault?: boolean | undefined;
|
|
516
|
+
isResidential?: boolean | undefined;
|
|
517
|
+
isValidated?: boolean | undefined;
|
|
518
|
+
validationSource?: string | undefined;
|
|
519
|
+
id?: string | undefined;
|
|
520
|
+
label?: string | undefined;
|
|
521
|
+
}[] | undefined;
|
|
522
|
+
isVerified?: boolean | undefined;
|
|
523
|
+
acceptsSms?: boolean | undefined;
|
|
524
|
+
stats?: {
|
|
525
|
+
totalOrders: number;
|
|
526
|
+
totalSpent: {
|
|
527
|
+
amount: number;
|
|
528
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
529
|
+
};
|
|
530
|
+
averageOrderValue: {
|
|
531
|
+
amount: number;
|
|
532
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
533
|
+
};
|
|
534
|
+
lastOrderValue?: {
|
|
535
|
+
amount: number;
|
|
536
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
537
|
+
} | undefined;
|
|
538
|
+
lifetimeValue?: {
|
|
539
|
+
amount: number;
|
|
540
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
541
|
+
} | undefined;
|
|
542
|
+
} | undefined;
|
|
543
|
+
groups?: {
|
|
544
|
+
id: string;
|
|
545
|
+
name: string;
|
|
546
|
+
type?: "custom" | "tier" | "segment" | "category" | undefined;
|
|
547
|
+
}[] | undefined;
|
|
548
|
+
preferences?: {
|
|
549
|
+
currency?: string | undefined;
|
|
550
|
+
language?: string | undefined;
|
|
551
|
+
timezone?: string | undefined;
|
|
552
|
+
communicationPreferences?: {
|
|
553
|
+
push?: boolean | undefined;
|
|
554
|
+
phone?: boolean | undefined;
|
|
555
|
+
email?: boolean | undefined;
|
|
556
|
+
sms?: boolean | undefined;
|
|
557
|
+
} | undefined;
|
|
558
|
+
} | undefined;
|
|
559
|
+
internalNotes?: string | undefined;
|
|
560
|
+
}, {
|
|
561
|
+
status: "pending" | "active" | "inactive" | "suspended" | "blocked";
|
|
562
|
+
firstName: string;
|
|
563
|
+
lastName: string;
|
|
564
|
+
email: string;
|
|
565
|
+
id: string;
|
|
566
|
+
metadata: {
|
|
567
|
+
source: string;
|
|
568
|
+
sourceId: string;
|
|
569
|
+
externalIds?: Record<string, string> | undefined;
|
|
570
|
+
isTest?: boolean | undefined;
|
|
571
|
+
accountNumber?: string | undefined;
|
|
572
|
+
taxExempt?: boolean | undefined;
|
|
573
|
+
taxExemptionId?: string | undefined;
|
|
574
|
+
businessType?: "individual" | "business" | "non-profit" | undefined;
|
|
575
|
+
vatNumber?: string | undefined;
|
|
576
|
+
isWholesale?: boolean | undefined;
|
|
577
|
+
isVip?: boolean | undefined;
|
|
578
|
+
};
|
|
579
|
+
dates: {
|
|
580
|
+
createdAt: string;
|
|
581
|
+
updatedAt: string;
|
|
582
|
+
lastOrderAt?: string | undefined;
|
|
583
|
+
lastLoginAt?: string | undefined;
|
|
584
|
+
verifiedAt?: string | undefined;
|
|
585
|
+
};
|
|
586
|
+
acceptsMarketing: boolean;
|
|
587
|
+
company?: string | undefined;
|
|
588
|
+
phone?: string | undefined;
|
|
589
|
+
customFields?: Record<string, unknown> | undefined;
|
|
590
|
+
notes?: string | undefined;
|
|
591
|
+
tags?: string[] | undefined;
|
|
592
|
+
tier?: string | undefined;
|
|
593
|
+
phones?: {
|
|
594
|
+
number: string;
|
|
595
|
+
type?: "mobile" | "home" | "work" | "fax" | "other" | undefined;
|
|
596
|
+
countryCode?: string | undefined;
|
|
597
|
+
extension?: string | undefined;
|
|
598
|
+
}[] | undefined;
|
|
599
|
+
defaultBillingAddressId?: string | undefined;
|
|
600
|
+
defaultShippingAddressId?: string | undefined;
|
|
601
|
+
addresses?: {
|
|
602
|
+
street1: string;
|
|
603
|
+
city: string;
|
|
604
|
+
postalCode: string;
|
|
605
|
+
country: string;
|
|
606
|
+
type?: "billing" | "shipping" | "both" | undefined;
|
|
607
|
+
street2?: string | undefined;
|
|
608
|
+
street3?: string | undefined;
|
|
609
|
+
state?: string | undefined;
|
|
610
|
+
stateCode?: string | undefined;
|
|
611
|
+
countryCode?: "US" | "CA" | "GB" | "AU" | "NZ" | "DE" | "FR" | "IT" | "ES" | "NL" | "BE" | "CH" | "AT" | "SE" | "NO" | "DK" | "FI" | "IE" | "PT" | "PL" | "CZ" | "JP" | "CN" | "IN" | "SG" | "HK" | "MX" | "BR" | "ZA" | undefined;
|
|
612
|
+
company?: string | undefined;
|
|
613
|
+
firstName?: string | undefined;
|
|
614
|
+
lastName?: string | undefined;
|
|
615
|
+
phone?: string | undefined;
|
|
616
|
+
email?: string | undefined;
|
|
617
|
+
isDefault?: boolean | undefined;
|
|
618
|
+
isResidential?: boolean | undefined;
|
|
619
|
+
isValidated?: boolean | undefined;
|
|
620
|
+
validationSource?: string | undefined;
|
|
621
|
+
id?: string | undefined;
|
|
622
|
+
label?: string | undefined;
|
|
623
|
+
}[] | undefined;
|
|
624
|
+
isVerified?: boolean | undefined;
|
|
625
|
+
acceptsSms?: boolean | undefined;
|
|
626
|
+
stats?: {
|
|
627
|
+
totalOrders: number;
|
|
628
|
+
totalSpent: {
|
|
629
|
+
amount: number;
|
|
630
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
631
|
+
};
|
|
632
|
+
averageOrderValue: {
|
|
633
|
+
amount: number;
|
|
634
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
635
|
+
};
|
|
636
|
+
lastOrderValue?: {
|
|
637
|
+
amount: number;
|
|
638
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
639
|
+
} | undefined;
|
|
640
|
+
lifetimeValue?: {
|
|
641
|
+
amount: number;
|
|
642
|
+
currency: "USD" | "EUR" | "GBP" | "AUD" | "CAD" | "NZD" | "JPY" | "CNY" | "INR" | "SGD" | "HKD" | "MXN" | "BRL" | "ZAR";
|
|
643
|
+
} | undefined;
|
|
644
|
+
} | undefined;
|
|
645
|
+
groups?: {
|
|
646
|
+
id: string;
|
|
647
|
+
name: string;
|
|
648
|
+
type?: "custom" | "tier" | "segment" | "category" | undefined;
|
|
649
|
+
}[] | undefined;
|
|
650
|
+
preferences?: {
|
|
651
|
+
currency?: string | undefined;
|
|
652
|
+
language?: string | undefined;
|
|
653
|
+
timezone?: string | undefined;
|
|
654
|
+
communicationPreferences?: {
|
|
655
|
+
push?: boolean | undefined;
|
|
656
|
+
phone?: boolean | undefined;
|
|
657
|
+
email?: boolean | undefined;
|
|
658
|
+
sms?: boolean | undefined;
|
|
659
|
+
} | undefined;
|
|
660
|
+
} | undefined;
|
|
661
|
+
internalNotes?: string | undefined;
|
|
662
|
+
}>;
|
|
663
|
+
export type CanonicalCustomer = z.infer<typeof CanonicalCustomerSchema>;
|
|
664
|
+
export declare const CustomerHelper: {
|
|
665
|
+
/**
|
|
666
|
+
* Get customer full name
|
|
667
|
+
*/
|
|
668
|
+
getFullName(customer: CanonicalCustomer): string;
|
|
669
|
+
/**
|
|
670
|
+
* Get display name (with company if available)
|
|
671
|
+
*/
|
|
672
|
+
getDisplayName(customer: CanonicalCustomer): string;
|
|
673
|
+
/**
|
|
674
|
+
* Check if customer is active
|
|
675
|
+
*/
|
|
676
|
+
isActive(customer: CanonicalCustomer): boolean;
|
|
677
|
+
/**
|
|
678
|
+
* Check if customer has placed orders
|
|
679
|
+
*/
|
|
680
|
+
hasOrders(customer: CanonicalCustomer): boolean;
|
|
681
|
+
/**
|
|
682
|
+
* Check if customer is new (no orders yet)
|
|
683
|
+
*/
|
|
684
|
+
isNew(customer: CanonicalCustomer): boolean;
|
|
685
|
+
/**
|
|
686
|
+
* Get default billing address
|
|
687
|
+
*/
|
|
688
|
+
getDefaultBillingAddress(customer: CanonicalCustomer): CustomerAddress | null;
|
|
689
|
+
/**
|
|
690
|
+
* Get default shipping address
|
|
691
|
+
*/
|
|
692
|
+
getDefaultShippingAddress(customer: CanonicalCustomer): CustomerAddress | null;
|
|
693
|
+
/**
|
|
694
|
+
* Get primary phone number
|
|
695
|
+
*/
|
|
696
|
+
getPrimaryPhone(customer: CanonicalCustomer): string | null;
|
|
697
|
+
/**
|
|
698
|
+
* Check if customer accepts marketing
|
|
699
|
+
*/
|
|
700
|
+
acceptsMarketing(customer: CanonicalCustomer): boolean;
|
|
701
|
+
/**
|
|
702
|
+
* Get days since last order
|
|
703
|
+
*/
|
|
704
|
+
getDaysSinceLastOrder(customer: CanonicalCustomer): number | null;
|
|
705
|
+
/**
|
|
706
|
+
* Check if customer is at risk (hasn't ordered in X days)
|
|
707
|
+
*/
|
|
708
|
+
isAtRisk(customer: CanonicalCustomer, daysThreshold?: number): boolean;
|
|
709
|
+
/**
|
|
710
|
+
* Calculate customer lifetime in days
|
|
711
|
+
*/
|
|
712
|
+
getCustomerLifetimeDays(customer: CanonicalCustomer): number;
|
|
713
|
+
/**
|
|
714
|
+
* Check if customer has specific tag
|
|
715
|
+
*/
|
|
716
|
+
hasTag(customer: CanonicalCustomer, tag: string): boolean;
|
|
717
|
+
/**
|
|
718
|
+
* Check if customer is in specific group
|
|
719
|
+
*/
|
|
720
|
+
isInGroup(customer: CanonicalCustomer, groupId: string): boolean;
|
|
721
|
+
/**
|
|
722
|
+
* Get customer tier
|
|
723
|
+
*/
|
|
724
|
+
getTier(customer: CanonicalCustomer): string | null;
|
|
725
|
+
/**
|
|
726
|
+
* Check if customer is VIP
|
|
727
|
+
*/
|
|
728
|
+
isVip(customer: CanonicalCustomer): boolean;
|
|
729
|
+
/**
|
|
730
|
+
* Check if customer is wholesale
|
|
731
|
+
*/
|
|
732
|
+
isWholesale(customer: CanonicalCustomer): boolean;
|
|
733
|
+
/**
|
|
734
|
+
* Check if customer is tax exempt
|
|
735
|
+
*/
|
|
736
|
+
isTaxExempt(customer: CanonicalCustomer): boolean;
|
|
737
|
+
/**
|
|
738
|
+
* Get customer's order frequency (orders per month)
|
|
739
|
+
*/
|
|
740
|
+
getOrderFrequency(customer: CanonicalCustomer): number | null;
|
|
741
|
+
/**
|
|
742
|
+
* Format customer for display
|
|
743
|
+
*/
|
|
744
|
+
format(customer: CanonicalCustomer): string;
|
|
745
|
+
};
|
|
746
|
+
//# sourceMappingURL=customer.d.ts.map
|