@deliverart/sdk-js-customer 0.0.3 → 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 +12 -0
- package/dist/index.cjs +38 -17
- package/dist/index.d.cts +248 -248
- package/dist/index.d.ts +248 -248
- package/dist/index.js +38 -17
- package/package.json +5 -5
- 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(),
|