@deliverart/sdk-js-customer 0.0.5 → 0.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.
Files changed (25) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.cjs +156 -202
  3. package/dist/index.d.cts +352 -250
  4. package/dist/index.d.ts +352 -250
  5. package/dist/index.js +139 -186
  6. package/package.json +5 -5
  7. package/src/models.ts +40 -11
  8. package/src/requests/customer-addresses/CreateCustomerAddress.ts +6 -10
  9. package/src/requests/customer-addresses/DeleteCustomerAddress.ts +5 -2
  10. package/src/requests/customer-addresses/GetCustomerAddressDetails.ts +7 -4
  11. package/src/requests/customer-addresses/GetCustomerAddresses.ts +5 -4
  12. package/src/requests/customer-addresses/GetCustomerAddressesForCustomer.ts +7 -4
  13. package/src/requests/customer-addresses/UpdateCustomerAddress.ts +5 -9
  14. package/src/requests/customer-business-profiles/CreateCustomerBusinessProfile.ts +6 -5
  15. package/src/requests/customer-business-profiles/DeleteCustomerBusinessProfile.ts +5 -2
  16. package/src/requests/customer-business-profiles/GetCustomerBusinessProfileDetails.ts +10 -5
  17. package/src/requests/customer-business-profiles/GetCustomerBusinessProfiles.ts +7 -4
  18. package/src/requests/customer-business-profiles/GetCustomerBusinessProfilesForCustomer.ts +7 -4
  19. package/src/requests/customer-business-profiles/UpdateCustomerBusinessProfile.ts +6 -5
  20. package/src/requests/customers/CreateCustomer.ts +5 -5
  21. package/src/requests/customers/DeleteCustomer.ts +5 -2
  22. package/src/requests/customers/GetCustomerDetails.ts +8 -4
  23. package/src/requests/customers/GetCustomers.ts +7 -32
  24. package/src/requests/customers/UpdateCustomer.ts +5 -5
  25. package/src/types.ts +16 -82
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @deliverart/sdk-js-company
2
2
 
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 86f0ffb: update code for the new sdk core version
8
+
3
9
  ## 0.0.5
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -44,17 +44,18 @@ __export(index_exports, {
44
44
  createCustomerInputSchema: () => createCustomerInputSchema,
45
45
  createCustomerResponseSchema: () => createCustomerResponseSchema,
46
46
  customerAddressDetailsSchema: () => customerAddressDetailsSchema,
47
- customerAddressNullablePathSchema: () => customerAddressNullablePathSchema,
48
- customerAddressPathSchema: () => customerAddressPathSchema,
47
+ customerAddressIriSchema: () => customerAddressIriSchema,
48
+ customerAddressNullableIriSchema: () => customerAddressNullableIriSchema,
49
49
  customerAddressSchema: () => customerAddressSchema,
50
50
  customerBusinessProfileDetailsSchema: () => customerBusinessProfileDetailsSchema,
51
- customerBusinessProfileNullablePathSchema: () => customerBusinessProfileNullablePathSchema,
52
- customerBusinessProfilePathSchema: () => customerBusinessProfilePathSchema,
51
+ customerBusinessProfileIriSchema: () => customerBusinessProfileIriSchema,
52
+ customerBusinessProfileNullableIriSchema: () => customerBusinessProfileNullableIriSchema,
53
53
  customerBusinessProfileSchema: () => customerBusinessProfileSchema,
54
54
  customerDetailsSchema: () => customerDetailsSchema,
55
- customerNullablePathSchema: () => customerNullablePathSchema,
56
- customerPathSchema: () => customerPathSchema,
55
+ customerIriSchema: () => customerIriSchema,
56
+ customerNullableIriSchema: () => customerNullableIriSchema,
57
57
  customerSchema: () => customerSchema,
58
+ customersQuerySchema: () => customersQuerySchema,
58
59
  deleteCustomerAddressInputSchema: () => deleteCustomerAddressInputSchema,
59
60
  deleteCustomerAddressResponseSchema: () => deleteCustomerAddressResponseSchema,
60
61
  deleteCustomerBusinessProfileInputSchema: () => deleteCustomerBusinessProfileInputSchema,
@@ -98,90 +99,41 @@ __export(index_exports, {
98
99
  module.exports = __toCommonJS(index_exports);
99
100
 
100
101
  // src/models.ts
101
- var import_sdk_js_global_types = require("@deliverart/sdk-js-global-types");
102
+ var import_sdk_js_global_types2 = require("@deliverart/sdk-js-global-types");
102
103
  var import_sdk_js_point_of_sale = require("@deliverart/sdk-js-point-of-sale");
103
104
  var import_sdk_js_user = require("@deliverart/sdk-js-user");
104
- var import_zod2 = require("zod");
105
+ var import_zod = require("zod");
105
106
 
106
107
  // src/types.ts
107
- var import_zod = require("zod");
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
- );
116
- var customerNullablePathSchema = import_zod.z.string().nullable().refine(
117
- (val) => {
118
- if (!val) return true;
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
- );
122
- },
123
- {
124
- message: "Invalid customer path format"
125
- }
126
- );
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
- );
135
- var customerAddressNullablePathSchema = import_zod.z.string().nullable().refine(
136
- (val) => {
137
- if (!val) return true;
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
- );
141
- },
142
- {
143
- message: "Invalid customerAddress path format"
144
- }
145
- );
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
- );
154
- var customerBusinessProfileNullablePathSchema = import_zod.z.string().nullable().refine(
155
- (val) => {
156
- if (!val) return true;
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
- );
160
- },
161
- {
162
- message: "Invalid customerBusinessProfile path format"
163
- }
108
+ var import_sdk_js_global_types = require("@deliverart/sdk-js-global-types");
109
+ var customerIriSchema = (0, import_sdk_js_global_types.iriSchema)("/customers/:id");
110
+ var customerNullableIriSchema = (0, import_sdk_js_global_types.iriNullableSchema)("/customers/:id");
111
+ var customerAddressIriSchema = (0, import_sdk_js_global_types.iriSchema)("/customers/address/:id");
112
+ var customerAddressNullableIriSchema = (0, import_sdk_js_global_types.iriNullableSchema)("/customers/address/:id");
113
+ var customerBusinessProfileIriSchema = (0, import_sdk_js_global_types.iriSchema)("/customers/business_profiles/:id");
114
+ var customerBusinessProfileNullableIriSchema = (0, import_sdk_js_global_types.iriNullableSchema)(
115
+ "/customers/business_profiles/:id"
164
116
  );
165
117
 
166
118
  // src/models.ts
167
- var customerSchema = import_zod2.z.object({
168
- id: import_zod2.z.string(),
169
- firstName: import_zod2.z.string().nullable(),
170
- lastName: import_zod2.z.string().nullable(),
171
- email: import_zod2.z.string().email().nullable(),
172
- phoneNumber: import_zod2.z.string().nullable(),
173
- hasBusinessProfiles: import_zod2.z.boolean(),
174
- hasAddresses: import_zod2.z.boolean(),
175
- ordersPlaced: import_zod2.z.number(),
176
- totalSpent: import_zod2.z.string(),
177
- createdAt: import_sdk_js_global_types.datetimeSchema,
178
- updatedAt: import_sdk_js_global_types.datetimeSchema
119
+ var customerSchema = import_zod.z.object({
120
+ id: import_zod.z.string(),
121
+ firstName: import_zod.z.string().nullable(),
122
+ lastName: import_zod.z.string().nullable(),
123
+ email: import_zod.z.string().email().nullable(),
124
+ phoneNumber: import_zod.z.string().nullable(),
125
+ hasBusinessProfiles: import_zod.z.boolean(),
126
+ hasAddresses: import_zod.z.boolean(),
127
+ ordersPlaced: import_zod.z.number(),
128
+ totalSpent: import_zod.z.string(),
129
+ createdAt: import_sdk_js_global_types2.datetimeSchema,
130
+ updatedAt: import_sdk_js_global_types2.datetimeSchema
179
131
  });
180
132
  var customerDetailsSchema = customerSchema.extend({
181
- pointOfSale: import_sdk_js_point_of_sale.pointOfSaleNullablePathSchema,
182
- owner: import_sdk_js_user.userNullablePathSchema,
183
- addresses: import_zod2.z.array(customerAddressPathSchema),
184
- businessProfiles: import_zod2.z.array(customerBusinessProfilePathSchema)
133
+ pointOfSale: import_sdk_js_point_of_sale.pointOfSaleNullableIriSchema,
134
+ owner: import_sdk_js_user.userNullableIriSchema,
135
+ addresses: import_zod.z.array(customerAddressIriSchema),
136
+ businessProfiles: import_zod.z.array(customerBusinessProfileIriSchema)
185
137
  });
186
138
  var writableCreateCustomerSchema = customerDetailsSchema.pick({
187
139
  pointOfSale: true,
@@ -193,15 +145,15 @@ var writableCreateCustomerSchema = customerDetailsSchema.pick({
193
145
  var writableCustomerSchema = writableCreateCustomerSchema.omit({
194
146
  pointOfSale: true
195
147
  });
196
- var customerAddressSchema = import_zod2.z.object({
197
- id: import_zod2.z.string(),
198
- address: import_sdk_js_global_types.addressSchema,
199
- location: import_sdk_js_global_types.locationSchema,
200
- createdAt: import_sdk_js_global_types.datetimeSchema,
201
- updatedAt: import_sdk_js_global_types.datetimeSchema
148
+ var customerAddressSchema = import_zod.z.object({
149
+ id: import_zod.z.string(),
150
+ address: import_sdk_js_global_types2.addressSchema,
151
+ location: import_sdk_js_global_types2.locationSchema,
152
+ createdAt: import_sdk_js_global_types2.datetimeSchema,
153
+ updatedAt: import_sdk_js_global_types2.datetimeSchema
202
154
  });
203
155
  var customerAddressDetailsSchema = customerAddressSchema.extend({
204
- customer: customerPathSchema
156
+ customer: customerIriSchema
205
157
  });
206
158
  var writableCreateCustomerAddressSchema = customerAddressDetailsSchema.pick({
207
159
  customer: true,
@@ -210,18 +162,18 @@ var writableCreateCustomerAddressSchema = customerAddressDetailsSchema.pick({
210
162
  var writableCustomerAddressSchema = writableCreateCustomerAddressSchema.omit({
211
163
  customer: true
212
164
  });
213
- var customerBusinessProfileSchema = import_zod2.z.object({
214
- id: import_zod2.z.string(),
215
- businessName: import_zod2.z.string(),
216
- vat: import_zod2.z.string(),
217
- taxCode: import_zod2.z.string(),
218
- billingAddress: import_sdk_js_global_types.addressSchema,
219
- billingData: import_sdk_js_global_types.billingDataSchema,
220
- createdAt: import_sdk_js_global_types.datetimeSchema,
221
- updatedAt: import_sdk_js_global_types.datetimeSchema
165
+ var customerBusinessProfileSchema = import_zod.z.object({
166
+ id: import_zod.z.string(),
167
+ businessName: import_zod.z.string(),
168
+ vat: import_zod.z.string(),
169
+ taxCode: import_zod.z.string(),
170
+ billingAddress: import_sdk_js_global_types2.addressSchema,
171
+ billingData: import_sdk_js_global_types2.billingDataSchema,
172
+ createdAt: import_sdk_js_global_types2.datetimeSchema,
173
+ updatedAt: import_sdk_js_global_types2.datetimeSchema
222
174
  });
223
175
  var customerBusinessProfileDetailsSchema = customerBusinessProfileSchema.extend({
224
- customer: customerPathSchema
176
+ customer: customerIriSchema
225
177
  });
226
178
  var writableCreateCustomerBusinessProfileSchema = customerBusinessProfileDetailsSchema.pick({
227
179
  customer: true,
@@ -234,6 +186,29 @@ var writableCreateCustomerBusinessProfileSchema = customerBusinessProfileDetails
234
186
  var writableCustomerBusinessProfileSchema = writableCreateCustomerBusinessProfileSchema.omit({
235
187
  customer: true
236
188
  });
189
+ var customersQuerySchema = import_zod.z.object({
190
+ firstName: import_zod.z.string().optional(),
191
+ lastName: import_zod.z.string().optional(),
192
+ email: import_zod.z.string().optional(),
193
+ phoneNumber: import_zod.z.string().optional(),
194
+ hasBusinessProfiles: import_zod.z.coerce.boolean().optional(),
195
+ hasAddresses: import_zod.z.coerce.boolean().optional(),
196
+ "ordersPlaced[between]": import_zod.z.coerce.number().optional(),
197
+ "ordersPlaced[gt]": import_zod.z.coerce.number().optional(),
198
+ "ordersPlaced[gte]": import_zod.z.coerce.number().optional(),
199
+ "ordersPlaced[lt]": import_zod.z.coerce.number().optional(),
200
+ "ordersPlaced[lte]": import_zod.z.coerce.number().optional(),
201
+ "totalSpent[between]": import_zod.z.coerce.number().optional(),
202
+ "totalSpent[gt]": import_zod.z.coerce.string().optional(),
203
+ "totalSpent[gte]": import_zod.z.coerce.string().optional(),
204
+ "totalSpent[lt]": import_zod.z.coerce.string().optional(),
205
+ "totalSpent[lte]": import_zod.z.coerce.string().optional(),
206
+ "order[firstName]": import_sdk_js_global_types2.sortDirSchema.optional(),
207
+ "order[lastName]": import_sdk_js_global_types2.sortDirSchema.optional(),
208
+ "order[createdAt]": import_sdk_js_global_types2.sortDirSchema.optional(),
209
+ "order[updatedAt]": import_sdk_js_global_types2.sortDirSchema.optional(),
210
+ page: import_zod.z.coerce.number().optional()
211
+ }).merge(import_sdk_js_global_types2.timestampsFilterSchema);
237
212
 
238
213
  // src/requests/customer-addresses/CreateCustomerAddress.ts
239
214
  var import_sdk_js_core = require("@deliverart/sdk-js-core");
@@ -257,9 +232,9 @@ var CreateCustomerAddress = class extends import_sdk_js_core.AbstractApiRequest
257
232
 
258
233
  // src/requests/customer-addresses/DeleteCustomerAddress.ts
259
234
  var import_sdk_js_core2 = require("@deliverart/sdk-js-core");
260
- var import_zod3 = require("zod");
261
- var deleteCustomerAddressInputSchema = import_zod3.z.undefined();
262
- var deleteCustomerAddressResponseSchema = import_zod3.z.undefined();
235
+ var import_zod2 = require("zod");
236
+ var deleteCustomerAddressInputSchema = import_zod2.z.undefined();
237
+ var deleteCustomerAddressResponseSchema = import_zod2.z.undefined();
263
238
  var DeleteCustomerAddress = class extends import_sdk_js_core2.AbstractApiRequest {
264
239
  method = "DELETE";
265
240
  contentType = "application/json";
@@ -270,7 +245,7 @@ var DeleteCustomerAddress = class extends import_sdk_js_core2.AbstractApiRequest
270
245
  headersSchema = void 0;
271
246
  customerAddressId;
272
247
  constructor(customerAddressId) {
273
- super();
248
+ super(void 0);
274
249
  this.customerAddressId = customerAddressId;
275
250
  }
276
251
  getPath() {
@@ -280,8 +255,8 @@ var DeleteCustomerAddress = class extends import_sdk_js_core2.AbstractApiRequest
280
255
 
281
256
  // src/requests/customer-addresses/GetCustomerAddressDetails.ts
282
257
  var import_sdk_js_core3 = require("@deliverart/sdk-js-core");
283
- var import_zod4 = require("zod");
284
- var getCustomerAddressDetailsInputSchema = import_zod4.z.undefined();
258
+ var import_zod3 = require("zod");
259
+ var getCustomerAddressDetailsInputSchema = import_zod3.z.undefined();
285
260
  var getCustomerAddressDetailsResponseSchema = customerAddressDetailsSchema;
286
261
  var GetCustomerAddressDetails = class extends import_sdk_js_core3.AbstractApiRequest {
287
262
  method = "GET";
@@ -293,7 +268,7 @@ var GetCustomerAddressDetails = class extends import_sdk_js_core3.AbstractApiReq
293
268
  headersSchema = void 0;
294
269
  customerAddressId;
295
270
  constructor(customerAddressId) {
296
- super();
271
+ super(void 0);
297
272
  this.customerAddressId = customerAddressId;
298
273
  }
299
274
  getPath() {
@@ -303,15 +278,15 @@ var GetCustomerAddressDetails = class extends import_sdk_js_core3.AbstractApiReq
303
278
 
304
279
  // src/requests/customer-addresses/GetCustomerAddresses.ts
305
280
  var import_sdk_js_core4 = require("@deliverart/sdk-js-core");
306
- var import_sdk_js_global_types2 = require("@deliverart/sdk-js-global-types");
307
- var import_zod5 = require("zod");
308
- var getCustomerAddressesQuerySchema = import_zod5.z.object({
309
- "order[createdAt]": import_sdk_js_global_types2.sortDirSchema.optional(),
310
- "order[updatedAt]": import_sdk_js_global_types2.sortDirSchema.optional(),
311
- page: import_zod5.z.coerce.number().optional()
312
- }).merge(import_sdk_js_global_types2.timestampsFilterSchema);
313
- var getCustomerAddressesResponseSchema = (0, import_sdk_js_global_types2.createPaginatedSchema)(customerAddressSchema);
314
- var getCustomerAddressesInputSchema = import_zod5.z.undefined();
281
+ var import_sdk_js_global_types3 = require("@deliverart/sdk-js-global-types");
282
+ var import_zod4 = require("zod");
283
+ var getCustomerAddressesQuerySchema = import_zod4.z.object({
284
+ "order[createdAt]": import_sdk_js_global_types3.sortDirSchema.optional(),
285
+ "order[updatedAt]": import_sdk_js_global_types3.sortDirSchema.optional(),
286
+ page: import_zod4.z.coerce.number().optional()
287
+ }).merge(import_sdk_js_global_types3.timestampsFilterSchema);
288
+ var getCustomerAddressesInputSchema = import_zod4.z.undefined();
289
+ var getCustomerAddressesResponseSchema = (0, import_sdk_js_global_types3.createPaginatedSchema)(customerAddressSchema);
315
290
  var GetCustomerAddresses = class extends import_sdk_js_core4.AbstractApiRequest {
316
291
  method = "GET";
317
292
  contentType = "application/json";
@@ -327,24 +302,24 @@ var GetCustomerAddresses = class extends import_sdk_js_core4.AbstractApiRequest
327
302
  return "/customers/addresses";
328
303
  }
329
304
  parseResponse(data, rawResponse) {
330
- const customerAddresses = import_zod5.z.array(customerAddressSchema).parse(data);
305
+ const customerAddresses = import_zod4.z.array(customerAddressSchema).parse(data);
331
306
  return this.validateOutput({
332
307
  data: customerAddresses,
333
- pagination: (0, import_sdk_js_global_types2.responseToPagination)(rawResponse)
308
+ pagination: (0, import_sdk_js_global_types3.responseToPagination)(rawResponse)
334
309
  });
335
310
  }
336
311
  };
337
312
 
338
313
  // src/requests/customer-addresses/GetCustomerAddressesForCustomer.ts
339
314
  var import_sdk_js_core5 = require("@deliverart/sdk-js-core");
340
- var import_sdk_js_global_types3 = require("@deliverart/sdk-js-global-types");
341
- var import_zod6 = require("zod");
342
- var getCustomerAddressesForCustomerQuerySchema = import_zod6.z.object({
343
- "order[createdAt]": import_sdk_js_global_types3.sortDirSchema.optional(),
344
- "order[updatedAt]": import_sdk_js_global_types3.sortDirSchema.optional()
345
- }).merge(import_sdk_js_global_types3.timestampsFilterSchema);
346
- var getCustomerAddressesForCustomerResponseSchema = import_zod6.z.array(customerAddressSchema);
347
- var getCustomerAddressesForCustomerInputSchema = import_zod6.z.undefined();
315
+ var import_sdk_js_global_types4 = require("@deliverart/sdk-js-global-types");
316
+ var import_zod5 = require("zod");
317
+ var getCustomerAddressesForCustomerQuerySchema = import_zod5.z.object({
318
+ "order[createdAt]": import_sdk_js_global_types4.sortDirSchema.optional(),
319
+ "order[updatedAt]": import_sdk_js_global_types4.sortDirSchema.optional()
320
+ }).merge(import_sdk_js_global_types4.timestampsFilterSchema);
321
+ var getCustomerAddressesForCustomerInputSchema = import_zod5.z.undefined();
322
+ var getCustomerAddressesForCustomerResponseSchema = import_zod5.z.array(customerAddressSchema);
348
323
  var GetCustomerAddressesForCustomer = class extends import_sdk_js_core5.AbstractApiRequest {
349
324
  method = "GET";
350
325
  contentType = "application/json";
@@ -362,7 +337,7 @@ var GetCustomerAddressesForCustomer = class extends import_sdk_js_core5.Abstract
362
337
  return `/customers/${this.customerId}/addresses`;
363
338
  }
364
339
  parseResponse(data) {
365
- return import_zod6.z.array(customerAddressSchema).parse(data);
340
+ return import_zod5.z.array(customerAddressSchema).parse(data);
366
341
  }
367
342
  };
368
343
 
@@ -410,9 +385,9 @@ var CreateCustomerBusinessProfile = class extends import_sdk_js_core7.AbstractAp
410
385
 
411
386
  // src/requests/customer-business-profiles/DeleteCustomerBusinessProfile.ts
412
387
  var import_sdk_js_core8 = require("@deliverart/sdk-js-core");
413
- var import_zod7 = require("zod");
414
- var deleteCustomerBusinessProfileInputSchema = import_zod7.z.undefined();
415
- var deleteCustomerBusinessProfileResponseSchema = import_zod7.z.undefined();
388
+ var import_zod6 = require("zod");
389
+ var deleteCustomerBusinessProfileInputSchema = import_zod6.z.undefined();
390
+ var deleteCustomerBusinessProfileResponseSchema = import_zod6.z.undefined();
416
391
  var DeleteCustomerBusinessProfile = class extends import_sdk_js_core8.AbstractApiRequest {
417
392
  method = "DELETE";
418
393
  contentType = "application/json";
@@ -423,7 +398,7 @@ var DeleteCustomerBusinessProfile = class extends import_sdk_js_core8.AbstractAp
423
398
  headersSchema = void 0;
424
399
  customerBusinessProfileId;
425
400
  constructor(customerBusinessProfileId) {
426
- super();
401
+ super(void 0);
427
402
  this.customerBusinessProfileId = customerBusinessProfileId;
428
403
  }
429
404
  getPath() {
@@ -433,8 +408,8 @@ var DeleteCustomerBusinessProfile = class extends import_sdk_js_core8.AbstractAp
433
408
 
434
409
  // src/requests/customer-business-profiles/GetCustomerBusinessProfileDetails.ts
435
410
  var import_sdk_js_core9 = require("@deliverart/sdk-js-core");
436
- var import_zod8 = require("zod");
437
- var getCustomerBusinessProfileDetailsInputSchema = import_zod8.z.undefined();
411
+ var import_zod7 = require("zod");
412
+ var getCustomerBusinessProfileDetailsInputSchema = import_zod7.z.undefined();
438
413
  var getCustomerBusinessProfileDetailsResponseSchema = customerBusinessProfileDetailsSchema;
439
414
  var GetCustomerBusinessProfileDetails = class extends import_sdk_js_core9.AbstractApiRequest {
440
415
  method = "GET";
@@ -446,7 +421,7 @@ var GetCustomerBusinessProfileDetails = class extends import_sdk_js_core9.Abstra
446
421
  headersSchema = void 0;
447
422
  customerBusinessProfileId;
448
423
  constructor(customerBusinessProfileId) {
449
- super();
424
+ super(void 0);
450
425
  this.customerBusinessProfileId = customerBusinessProfileId;
451
426
  }
452
427
  getPath() {
@@ -456,21 +431,21 @@ var GetCustomerBusinessProfileDetails = class extends import_sdk_js_core9.Abstra
456
431
 
457
432
  // src/requests/customer-business-profiles/GetCustomerBusinessProfiles.ts
458
433
  var import_sdk_js_core10 = require("@deliverart/sdk-js-core");
459
- var import_sdk_js_global_types4 = require("@deliverart/sdk-js-global-types");
460
- var import_zod9 = require("zod");
461
- var getCustomerBusinessProfilesQuerySchema = import_zod9.z.object({
462
- "order[businessName]": import_sdk_js_global_types4.sortDirSchema.optional(),
463
- "order[createdAt]": import_sdk_js_global_types4.sortDirSchema.optional(),
464
- "order[updatedAt]": import_sdk_js_global_types4.sortDirSchema.optional(),
465
- businessName: import_zod9.z.string().optional(),
466
- vat: import_zod9.z.string().optional(),
467
- taxCode: import_zod9.z.string().optional(),
468
- page: import_zod9.z.coerce.number().optional()
469
- }).merge(import_sdk_js_global_types4.timestampsFilterSchema);
470
- var getCustomerBusinessProfilesResponseSchema = (0, import_sdk_js_global_types4.createPaginatedSchema)(
434
+ var import_sdk_js_global_types5 = require("@deliverart/sdk-js-global-types");
435
+ var import_zod8 = require("zod");
436
+ var getCustomerBusinessProfilesQuerySchema = import_zod8.z.object({
437
+ "order[businessName]": import_sdk_js_global_types5.sortDirSchema.optional(),
438
+ "order[createdAt]": import_sdk_js_global_types5.sortDirSchema.optional(),
439
+ "order[updatedAt]": import_sdk_js_global_types5.sortDirSchema.optional(),
440
+ businessName: import_zod8.z.string().optional(),
441
+ vat: import_zod8.z.string().optional(),
442
+ taxCode: import_zod8.z.string().optional(),
443
+ page: import_zod8.z.coerce.number().optional()
444
+ }).merge(import_sdk_js_global_types5.timestampsFilterSchema);
445
+ var getCustomerBusinessProfilesInputSchema = import_zod8.z.undefined();
446
+ var getCustomerBusinessProfilesResponseSchema = (0, import_sdk_js_global_types5.createPaginatedSchema)(
471
447
  customerBusinessProfileSchema
472
448
  );
473
- var getCustomerBusinessProfilesInputSchema = import_zod9.z.undefined();
474
449
  var GetCustomerBusinessProfiles = class extends import_sdk_js_core10.AbstractApiRequest {
475
450
  method = "GET";
476
451
  contentType = "application/json";
@@ -486,30 +461,30 @@ var GetCustomerBusinessProfiles = class extends import_sdk_js_core10.AbstractApi
486
461
  return "/customers/business_profiles";
487
462
  }
488
463
  parseResponse(data, rawResponse) {
489
- const customerBusinessProfiles = import_zod9.z.array(customerBusinessProfileSchema).parse(data);
464
+ const customerBusinessProfiles = import_zod8.z.array(customerBusinessProfileSchema).parse(data);
490
465
  return this.validateOutput({
491
466
  data: customerBusinessProfiles,
492
- pagination: (0, import_sdk_js_global_types4.responseToPagination)(rawResponse)
467
+ pagination: (0, import_sdk_js_global_types5.responseToPagination)(rawResponse)
493
468
  });
494
469
  }
495
470
  };
496
471
 
497
472
  // src/requests/customer-business-profiles/GetCustomerBusinessProfilesForCustomer.ts
498
473
  var import_sdk_js_core11 = require("@deliverart/sdk-js-core");
499
- var import_sdk_js_global_types5 = require("@deliverart/sdk-js-global-types");
500
- var import_zod10 = require("zod");
501
- var getCustomerBusinessProfilesForCustomerQuerySchema = import_zod10.z.object({
502
- "order[businessName]": import_sdk_js_global_types5.sortDirSchema.optional(),
503
- "order[createdAt]": import_sdk_js_global_types5.sortDirSchema.optional(),
504
- "order[updatedAt]": import_sdk_js_global_types5.sortDirSchema.optional(),
505
- businessName: import_zod10.z.string().optional(),
506
- vat: import_zod10.z.string().optional(),
507
- taxCode: import_zod10.z.string().optional()
508
- }).merge(import_sdk_js_global_types5.timestampsFilterSchema);
509
- var getCustomerBusinessProfilesForCustomerResponseSchema = import_zod10.z.array(
474
+ var import_sdk_js_global_types6 = require("@deliverart/sdk-js-global-types");
475
+ var import_zod9 = require("zod");
476
+ var getCustomerBusinessProfilesForCustomerQuerySchema = import_zod9.z.object({
477
+ "order[businessName]": import_sdk_js_global_types6.sortDirSchema.optional(),
478
+ "order[createdAt]": import_sdk_js_global_types6.sortDirSchema.optional(),
479
+ "order[updatedAt]": import_sdk_js_global_types6.sortDirSchema.optional(),
480
+ businessName: import_zod9.z.string().optional(),
481
+ vat: import_zod9.z.string().optional(),
482
+ taxCode: import_zod9.z.string().optional()
483
+ }).merge(import_sdk_js_global_types6.timestampsFilterSchema);
484
+ var getCustomerBusinessProfilesForCustomerInputSchema = import_zod9.z.undefined();
485
+ var getCustomerBusinessProfilesForCustomerResponseSchema = import_zod9.z.array(
510
486
  customerBusinessProfileSchema
511
487
  );
512
- var getCustomerBusinessProfilesForCustomerInputSchema = import_zod10.z.undefined();
513
488
  var GetCustomerBusinessProfilesForCustomer = class extends import_sdk_js_core11.AbstractApiRequest {
514
489
  method = "GET";
515
490
  contentType = "application/json";
@@ -527,7 +502,7 @@ var GetCustomerBusinessProfilesForCustomer = class extends import_sdk_js_core11.
527
502
  return `/customers/${this.customerId}/business_profiles`;
528
503
  }
529
504
  parseResponse(data) {
530
- return import_zod10.z.array(customerBusinessProfileSchema).parse(data);
505
+ return import_zod9.z.array(customerBusinessProfileSchema).parse(data);
531
506
  }
532
507
  };
533
508
 
@@ -575,9 +550,9 @@ var CreateCustomer = class extends import_sdk_js_core13.AbstractApiRequest {
575
550
 
576
551
  // src/requests/customers/DeleteCustomer.ts
577
552
  var import_sdk_js_core14 = require("@deliverart/sdk-js-core");
578
- var import_zod11 = require("zod");
579
- var deleteCustomerInputSchema = import_zod11.z.undefined();
580
- var deleteCustomerResponseSchema = import_zod11.z.undefined();
553
+ var import_zod10 = require("zod");
554
+ var deleteCustomerInputSchema = import_zod10.z.undefined();
555
+ var deleteCustomerResponseSchema = import_zod10.z.undefined();
581
556
  var DeleteCustomer = class extends import_sdk_js_core14.AbstractApiRequest {
582
557
  method = "DELETE";
583
558
  contentType = "application/json";
@@ -588,7 +563,7 @@ var DeleteCustomer = class extends import_sdk_js_core14.AbstractApiRequest {
588
563
  headersSchema = void 0;
589
564
  customerId;
590
565
  constructor(customerId) {
591
- super();
566
+ super(void 0);
592
567
  this.customerId = customerId;
593
568
  }
594
569
  getPath() {
@@ -598,8 +573,8 @@ var DeleteCustomer = class extends import_sdk_js_core14.AbstractApiRequest {
598
573
 
599
574
  // src/requests/customers/GetCustomerDetails.ts
600
575
  var import_sdk_js_core15 = require("@deliverart/sdk-js-core");
601
- var import_zod12 = require("zod");
602
- var getCustomerDetailsInputSchema = import_zod12.z.undefined();
576
+ var import_zod11 = require("zod");
577
+ var getCustomerDetailsInputSchema = import_zod11.z.undefined();
603
578
  var getCustomerDetailsResponseSchema = customerDetailsSchema;
604
579
  var GetCustomerDetails = class extends import_sdk_js_core15.AbstractApiRequest {
605
580
  method = "GET";
@@ -611,7 +586,7 @@ var GetCustomerDetails = class extends import_sdk_js_core15.AbstractApiRequest {
611
586
  headersSchema = void 0;
612
587
  customerId;
613
588
  constructor(customerId) {
614
- super();
589
+ super(void 0);
615
590
  this.customerId = customerId;
616
591
  }
617
592
  getPath() {
@@ -621,33 +596,11 @@ var GetCustomerDetails = class extends import_sdk_js_core15.AbstractApiRequest {
621
596
 
622
597
  // src/requests/customers/GetCustomers.ts
623
598
  var import_sdk_js_core16 = require("@deliverart/sdk-js-core");
624
- var import_sdk_js_global_types6 = require("@deliverart/sdk-js-global-types");
625
- var import_zod13 = require("zod");
626
- var getCustomersQuerySchema = import_zod13.z.object({
627
- firstName: import_zod13.z.string().optional(),
628
- lastName: import_zod13.z.string().optional(),
629
- email: import_zod13.z.string().optional(),
630
- phoneNumber: import_zod13.z.string().optional(),
631
- hasBusinessProfiles: import_zod13.z.coerce.boolean().optional(),
632
- hasAddresses: import_zod13.z.coerce.boolean().optional(),
633
- "ordersPlaced[between]": import_zod13.z.coerce.number().optional(),
634
- "ordersPlaced[gt]": import_zod13.z.coerce.number().optional(),
635
- "ordersPlaced[gte]": import_zod13.z.coerce.number().optional(),
636
- "ordersPlaced[lt]": import_zod13.z.coerce.number().optional(),
637
- "ordersPlaced[lte]": import_zod13.z.coerce.number().optional(),
638
- "totalSpent[between]": import_zod13.z.coerce.number().optional(),
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(),
643
- "order[firstName]": import_sdk_js_global_types6.sortDirSchema.optional(),
644
- "order[lastName]": import_sdk_js_global_types6.sortDirSchema.optional(),
645
- "order[createdAt]": import_sdk_js_global_types6.sortDirSchema.optional(),
646
- "order[updatedAt]": import_sdk_js_global_types6.sortDirSchema.optional(),
647
- page: import_zod13.z.coerce.number().optional()
648
- }).merge(import_sdk_js_global_types6.timestampsFilterSchema);
649
- var getCustomersResponseSchema = (0, import_sdk_js_global_types6.createPaginatedSchema)(customerSchema);
650
- var getCustomersInputSchema = import_zod13.z.undefined();
599
+ var import_sdk_js_global_types7 = require("@deliverart/sdk-js-global-types");
600
+ var import_zod12 = require("zod");
601
+ var getCustomersQuerySchema = customersQuerySchema;
602
+ var getCustomersInputSchema = import_zod12.z.undefined();
603
+ var getCustomersResponseSchema = (0, import_sdk_js_global_types7.createPaginatedSchema)(customerSchema);
651
604
  var GetCustomers = class extends import_sdk_js_core16.AbstractApiRequest {
652
605
  method = "GET";
653
606
  contentType = "application/json";
@@ -663,8 +616,8 @@ var GetCustomers = class extends import_sdk_js_core16.AbstractApiRequest {
663
616
  return "/customers";
664
617
  }
665
618
  parseResponse(data, rawResponse) {
666
- const customers = import_zod13.z.array(customerSchema).parse(data);
667
- return this.validateOutput({ data: customers, pagination: (0, import_sdk_js_global_types6.responseToPagination)(rawResponse) });
619
+ const customers = import_zod12.z.array(customerSchema).parse(data);
620
+ return this.validateOutput({ data: customers, pagination: (0, import_sdk_js_global_types7.responseToPagination)(rawResponse) });
668
621
  }
669
622
  };
670
623
 
@@ -715,17 +668,18 @@ var UpdateCustomer = class extends import_sdk_js_core17.AbstractApiRequest {
715
668
  createCustomerInputSchema,
716
669
  createCustomerResponseSchema,
717
670
  customerAddressDetailsSchema,
718
- customerAddressNullablePathSchema,
719
- customerAddressPathSchema,
671
+ customerAddressIriSchema,
672
+ customerAddressNullableIriSchema,
720
673
  customerAddressSchema,
721
674
  customerBusinessProfileDetailsSchema,
722
- customerBusinessProfileNullablePathSchema,
723
- customerBusinessProfilePathSchema,
675
+ customerBusinessProfileIriSchema,
676
+ customerBusinessProfileNullableIriSchema,
724
677
  customerBusinessProfileSchema,
725
678
  customerDetailsSchema,
726
- customerNullablePathSchema,
727
- customerPathSchema,
679
+ customerIriSchema,
680
+ customerNullableIriSchema,
728
681
  customerSchema,
682
+ customersQuerySchema,
729
683
  deleteCustomerAddressInputSchema,
730
684
  deleteCustomerAddressResponseSchema,
731
685
  deleteCustomerBusinessProfileInputSchema,