@deliverart/sdk-js-customer 0.0.4 → 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 +12 -0
  2. package/dist/index.cjs +156 -181
  3. package/dist/index.d.cts +406 -304
  4. package/dist/index.d.ts +406 -304
  5. package/dist/index.js +139 -165
  6. package/package.json +5 -5
  7. package/src/models.ts +41 -12
  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 -58
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
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
+
9
+ ## 0.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - fe949f7: fix types
14
+
3
15
  ## 0.0.4
4
16
 
5
17
  ### 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,69 +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((val) => /^\/customers\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
109
- message: "Invalid customer path format"
110
- });
111
- var customerNullablePathSchema = import_zod.z.string().nullable().refine(
112
- (val) => {
113
- if (!val) return true;
114
- return /^\/customers\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val);
115
- },
116
- {
117
- message: "Invalid customer path format"
118
- }
119
- );
120
- var customerAddressPathSchema = import_zod.z.string().refine((val) => /^\/customers\/addresses\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
121
- message: "Invalid customerAddress path format"
122
- });
123
- var customerAddressNullablePathSchema = import_zod.z.string().nullable().refine(
124
- (val) => {
125
- if (!val) return true;
126
- return /^\/customers\/addresses\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val);
127
- },
128
- {
129
- message: "Invalid customerAddress path format"
130
- }
131
- );
132
- var customerBusinessProfilePathSchema = import_zod.z.string().refine((val) => /^\/customers\/business_profiles\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val), {
133
- message: "Invalid customerBusinessProfile path format"
134
- });
135
- var customerBusinessProfileNullablePathSchema = import_zod.z.string().nullable().refine(
136
- (val) => {
137
- if (!val) return true;
138
- return /^\/customers\/business_profiles\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val);
139
- },
140
- {
141
- message: "Invalid customerBusinessProfile path format"
142
- }
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"
143
116
  );
144
117
 
145
118
  // src/models.ts
146
- var customerSchema = import_zod2.z.object({
147
- id: import_zod2.z.string(),
148
- firstName: import_zod2.z.string().nullable(),
149
- lastName: import_zod2.z.string().nullable(),
150
- email: import_zod2.z.string().email().nullable(),
151
- phoneNumber: import_zod2.z.string().nullable(),
152
- hasBusinessProfiles: import_zod2.z.boolean(),
153
- hasAddresses: import_zod2.z.boolean(),
154
- ordersPlaced: import_zod2.z.number(),
155
- totalSpent: import_zod2.z.number(),
156
- createdAt: import_sdk_js_global_types.datetimeSchema,
157
- 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
158
131
  });
159
132
  var customerDetailsSchema = customerSchema.extend({
160
- pointOfSale: import_sdk_js_point_of_sale.pointOfSaleNullablePathSchema,
161
- owner: import_sdk_js_user.userNullablePathSchema,
162
- addresses: import_zod2.z.array(customerAddressPathSchema),
163
- 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)
164
137
  });
165
138
  var writableCreateCustomerSchema = customerDetailsSchema.pick({
166
139
  pointOfSale: true,
@@ -172,15 +145,15 @@ var writableCreateCustomerSchema = customerDetailsSchema.pick({
172
145
  var writableCustomerSchema = writableCreateCustomerSchema.omit({
173
146
  pointOfSale: true
174
147
  });
175
- var customerAddressSchema = import_zod2.z.object({
176
- id: import_zod2.z.string(),
177
- address: import_sdk_js_global_types.addressSchema,
178
- location: import_sdk_js_global_types.locationSchema,
179
- createdAt: import_sdk_js_global_types.datetimeSchema,
180
- 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
181
154
  });
182
155
  var customerAddressDetailsSchema = customerAddressSchema.extend({
183
- customer: customerPathSchema
156
+ customer: customerIriSchema
184
157
  });
185
158
  var writableCreateCustomerAddressSchema = customerAddressDetailsSchema.pick({
186
159
  customer: true,
@@ -189,18 +162,18 @@ var writableCreateCustomerAddressSchema = customerAddressDetailsSchema.pick({
189
162
  var writableCustomerAddressSchema = writableCreateCustomerAddressSchema.omit({
190
163
  customer: true
191
164
  });
192
- var customerBusinessProfileSchema = import_zod2.z.object({
193
- id: import_zod2.z.string(),
194
- businessName: import_zod2.z.string(),
195
- vat: import_zod2.z.string(),
196
- taxCode: import_zod2.z.string(),
197
- billingAddress: import_sdk_js_global_types.addressSchema,
198
- billingData: import_sdk_js_global_types.billingDataSchema,
199
- createdAt: import_sdk_js_global_types.datetimeSchema,
200
- 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
201
174
  });
202
175
  var customerBusinessProfileDetailsSchema = customerBusinessProfileSchema.extend({
203
- customer: customerPathSchema
176
+ customer: customerIriSchema
204
177
  });
205
178
  var writableCreateCustomerBusinessProfileSchema = customerBusinessProfileDetailsSchema.pick({
206
179
  customer: true,
@@ -213,6 +186,29 @@ var writableCreateCustomerBusinessProfileSchema = customerBusinessProfileDetails
213
186
  var writableCustomerBusinessProfileSchema = writableCreateCustomerBusinessProfileSchema.omit({
214
187
  customer: true
215
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);
216
212
 
217
213
  // src/requests/customer-addresses/CreateCustomerAddress.ts
218
214
  var import_sdk_js_core = require("@deliverart/sdk-js-core");
@@ -236,9 +232,9 @@ var CreateCustomerAddress = class extends import_sdk_js_core.AbstractApiRequest
236
232
 
237
233
  // src/requests/customer-addresses/DeleteCustomerAddress.ts
238
234
  var import_sdk_js_core2 = require("@deliverart/sdk-js-core");
239
- var import_zod3 = require("zod");
240
- var deleteCustomerAddressInputSchema = import_zod3.z.undefined();
241
- 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();
242
238
  var DeleteCustomerAddress = class extends import_sdk_js_core2.AbstractApiRequest {
243
239
  method = "DELETE";
244
240
  contentType = "application/json";
@@ -249,7 +245,7 @@ var DeleteCustomerAddress = class extends import_sdk_js_core2.AbstractApiRequest
249
245
  headersSchema = void 0;
250
246
  customerAddressId;
251
247
  constructor(customerAddressId) {
252
- super();
248
+ super(void 0);
253
249
  this.customerAddressId = customerAddressId;
254
250
  }
255
251
  getPath() {
@@ -259,8 +255,8 @@ var DeleteCustomerAddress = class extends import_sdk_js_core2.AbstractApiRequest
259
255
 
260
256
  // src/requests/customer-addresses/GetCustomerAddressDetails.ts
261
257
  var import_sdk_js_core3 = require("@deliverart/sdk-js-core");
262
- var import_zod4 = require("zod");
263
- var getCustomerAddressDetailsInputSchema = import_zod4.z.undefined();
258
+ var import_zod3 = require("zod");
259
+ var getCustomerAddressDetailsInputSchema = import_zod3.z.undefined();
264
260
  var getCustomerAddressDetailsResponseSchema = customerAddressDetailsSchema;
265
261
  var GetCustomerAddressDetails = class extends import_sdk_js_core3.AbstractApiRequest {
266
262
  method = "GET";
@@ -272,7 +268,7 @@ var GetCustomerAddressDetails = class extends import_sdk_js_core3.AbstractApiReq
272
268
  headersSchema = void 0;
273
269
  customerAddressId;
274
270
  constructor(customerAddressId) {
275
- super();
271
+ super(void 0);
276
272
  this.customerAddressId = customerAddressId;
277
273
  }
278
274
  getPath() {
@@ -282,15 +278,15 @@ var GetCustomerAddressDetails = class extends import_sdk_js_core3.AbstractApiReq
282
278
 
283
279
  // src/requests/customer-addresses/GetCustomerAddresses.ts
284
280
  var import_sdk_js_core4 = require("@deliverart/sdk-js-core");
285
- var import_sdk_js_global_types2 = require("@deliverart/sdk-js-global-types");
286
- var import_zod5 = require("zod");
287
- var getCustomerAddressesQuerySchema = import_zod5.z.object({
288
- "order[createdAt]": import_sdk_js_global_types2.sortDirSchema.optional(),
289
- "order[updatedAt]": import_sdk_js_global_types2.sortDirSchema.optional(),
290
- page: import_zod5.z.coerce.number().optional()
291
- }).merge(import_sdk_js_global_types2.timestampsFilterSchema);
292
- var getCustomerAddressesResponseSchema = (0, import_sdk_js_global_types2.createPaginatedSchema)(customerAddressSchema);
293
- 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);
294
290
  var GetCustomerAddresses = class extends import_sdk_js_core4.AbstractApiRequest {
295
291
  method = "GET";
296
292
  contentType = "application/json";
@@ -306,24 +302,24 @@ var GetCustomerAddresses = class extends import_sdk_js_core4.AbstractApiRequest
306
302
  return "/customers/addresses";
307
303
  }
308
304
  parseResponse(data, rawResponse) {
309
- const customerAddresses = import_zod5.z.array(customerAddressSchema).parse(data);
305
+ const customerAddresses = import_zod4.z.array(customerAddressSchema).parse(data);
310
306
  return this.validateOutput({
311
307
  data: customerAddresses,
312
- pagination: (0, import_sdk_js_global_types2.responseToPagination)(rawResponse)
308
+ pagination: (0, import_sdk_js_global_types3.responseToPagination)(rawResponse)
313
309
  });
314
310
  }
315
311
  };
316
312
 
317
313
  // src/requests/customer-addresses/GetCustomerAddressesForCustomer.ts
318
314
  var import_sdk_js_core5 = require("@deliverart/sdk-js-core");
319
- var import_sdk_js_global_types3 = require("@deliverart/sdk-js-global-types");
320
- var import_zod6 = require("zod");
321
- var getCustomerAddressesForCustomerQuerySchema = import_zod6.z.object({
322
- "order[createdAt]": import_sdk_js_global_types3.sortDirSchema.optional(),
323
- "order[updatedAt]": import_sdk_js_global_types3.sortDirSchema.optional()
324
- }).merge(import_sdk_js_global_types3.timestampsFilterSchema);
325
- var getCustomerAddressesForCustomerResponseSchema = import_zod6.z.array(customerAddressSchema);
326
- 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);
327
323
  var GetCustomerAddressesForCustomer = class extends import_sdk_js_core5.AbstractApiRequest {
328
324
  method = "GET";
329
325
  contentType = "application/json";
@@ -341,7 +337,7 @@ var GetCustomerAddressesForCustomer = class extends import_sdk_js_core5.Abstract
341
337
  return `/customers/${this.customerId}/addresses`;
342
338
  }
343
339
  parseResponse(data) {
344
- return import_zod6.z.array(customerAddressSchema).parse(data);
340
+ return import_zod5.z.array(customerAddressSchema).parse(data);
345
341
  }
346
342
  };
347
343
 
@@ -389,9 +385,9 @@ var CreateCustomerBusinessProfile = class extends import_sdk_js_core7.AbstractAp
389
385
 
390
386
  // src/requests/customer-business-profiles/DeleteCustomerBusinessProfile.ts
391
387
  var import_sdk_js_core8 = require("@deliverart/sdk-js-core");
392
- var import_zod7 = require("zod");
393
- var deleteCustomerBusinessProfileInputSchema = import_zod7.z.undefined();
394
- 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();
395
391
  var DeleteCustomerBusinessProfile = class extends import_sdk_js_core8.AbstractApiRequest {
396
392
  method = "DELETE";
397
393
  contentType = "application/json";
@@ -402,7 +398,7 @@ var DeleteCustomerBusinessProfile = class extends import_sdk_js_core8.AbstractAp
402
398
  headersSchema = void 0;
403
399
  customerBusinessProfileId;
404
400
  constructor(customerBusinessProfileId) {
405
- super();
401
+ super(void 0);
406
402
  this.customerBusinessProfileId = customerBusinessProfileId;
407
403
  }
408
404
  getPath() {
@@ -412,8 +408,8 @@ var DeleteCustomerBusinessProfile = class extends import_sdk_js_core8.AbstractAp
412
408
 
413
409
  // src/requests/customer-business-profiles/GetCustomerBusinessProfileDetails.ts
414
410
  var import_sdk_js_core9 = require("@deliverart/sdk-js-core");
415
- var import_zod8 = require("zod");
416
- var getCustomerBusinessProfileDetailsInputSchema = import_zod8.z.undefined();
411
+ var import_zod7 = require("zod");
412
+ var getCustomerBusinessProfileDetailsInputSchema = import_zod7.z.undefined();
417
413
  var getCustomerBusinessProfileDetailsResponseSchema = customerBusinessProfileDetailsSchema;
418
414
  var GetCustomerBusinessProfileDetails = class extends import_sdk_js_core9.AbstractApiRequest {
419
415
  method = "GET";
@@ -425,7 +421,7 @@ var GetCustomerBusinessProfileDetails = class extends import_sdk_js_core9.Abstra
425
421
  headersSchema = void 0;
426
422
  customerBusinessProfileId;
427
423
  constructor(customerBusinessProfileId) {
428
- super();
424
+ super(void 0);
429
425
  this.customerBusinessProfileId = customerBusinessProfileId;
430
426
  }
431
427
  getPath() {
@@ -435,21 +431,21 @@ var GetCustomerBusinessProfileDetails = class extends import_sdk_js_core9.Abstra
435
431
 
436
432
  // src/requests/customer-business-profiles/GetCustomerBusinessProfiles.ts
437
433
  var import_sdk_js_core10 = require("@deliverart/sdk-js-core");
438
- var import_sdk_js_global_types4 = require("@deliverart/sdk-js-global-types");
439
- var import_zod9 = require("zod");
440
- var getCustomerBusinessProfilesQuerySchema = import_zod9.z.object({
441
- "order[businessName]": import_sdk_js_global_types4.sortDirSchema.optional(),
442
- "order[createdAt]": import_sdk_js_global_types4.sortDirSchema.optional(),
443
- "order[updatedAt]": import_sdk_js_global_types4.sortDirSchema.optional(),
444
- businessName: import_zod9.z.string().optional(),
445
- vat: import_zod9.z.string().optional(),
446
- taxCode: import_zod9.z.string().optional(),
447
- page: import_zod9.z.coerce.number().optional()
448
- }).merge(import_sdk_js_global_types4.timestampsFilterSchema);
449
- 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)(
450
447
  customerBusinessProfileSchema
451
448
  );
452
- var getCustomerBusinessProfilesInputSchema = import_zod9.z.undefined();
453
449
  var GetCustomerBusinessProfiles = class extends import_sdk_js_core10.AbstractApiRequest {
454
450
  method = "GET";
455
451
  contentType = "application/json";
@@ -465,30 +461,30 @@ var GetCustomerBusinessProfiles = class extends import_sdk_js_core10.AbstractApi
465
461
  return "/customers/business_profiles";
466
462
  }
467
463
  parseResponse(data, rawResponse) {
468
- const customerBusinessProfiles = import_zod9.z.array(customerBusinessProfileSchema).parse(data);
464
+ const customerBusinessProfiles = import_zod8.z.array(customerBusinessProfileSchema).parse(data);
469
465
  return this.validateOutput({
470
466
  data: customerBusinessProfiles,
471
- pagination: (0, import_sdk_js_global_types4.responseToPagination)(rawResponse)
467
+ pagination: (0, import_sdk_js_global_types5.responseToPagination)(rawResponse)
472
468
  });
473
469
  }
474
470
  };
475
471
 
476
472
  // src/requests/customer-business-profiles/GetCustomerBusinessProfilesForCustomer.ts
477
473
  var import_sdk_js_core11 = require("@deliverart/sdk-js-core");
478
- var import_sdk_js_global_types5 = require("@deliverart/sdk-js-global-types");
479
- var import_zod10 = require("zod");
480
- var getCustomerBusinessProfilesForCustomerQuerySchema = import_zod10.z.object({
481
- "order[businessName]": import_sdk_js_global_types5.sortDirSchema.optional(),
482
- "order[createdAt]": import_sdk_js_global_types5.sortDirSchema.optional(),
483
- "order[updatedAt]": import_sdk_js_global_types5.sortDirSchema.optional(),
484
- businessName: import_zod10.z.string().optional(),
485
- vat: import_zod10.z.string().optional(),
486
- taxCode: import_zod10.z.string().optional()
487
- }).merge(import_sdk_js_global_types5.timestampsFilterSchema);
488
- 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(
489
486
  customerBusinessProfileSchema
490
487
  );
491
- var getCustomerBusinessProfilesForCustomerInputSchema = import_zod10.z.undefined();
492
488
  var GetCustomerBusinessProfilesForCustomer = class extends import_sdk_js_core11.AbstractApiRequest {
493
489
  method = "GET";
494
490
  contentType = "application/json";
@@ -506,7 +502,7 @@ var GetCustomerBusinessProfilesForCustomer = class extends import_sdk_js_core11.
506
502
  return `/customers/${this.customerId}/business_profiles`;
507
503
  }
508
504
  parseResponse(data) {
509
- return import_zod10.z.array(customerBusinessProfileSchema).parse(data);
505
+ return import_zod9.z.array(customerBusinessProfileSchema).parse(data);
510
506
  }
511
507
  };
512
508
 
@@ -554,9 +550,9 @@ var CreateCustomer = class extends import_sdk_js_core13.AbstractApiRequest {
554
550
 
555
551
  // src/requests/customers/DeleteCustomer.ts
556
552
  var import_sdk_js_core14 = require("@deliverart/sdk-js-core");
557
- var import_zod11 = require("zod");
558
- var deleteCustomerInputSchema = import_zod11.z.undefined();
559
- 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();
560
556
  var DeleteCustomer = class extends import_sdk_js_core14.AbstractApiRequest {
561
557
  method = "DELETE";
562
558
  contentType = "application/json";
@@ -567,7 +563,7 @@ var DeleteCustomer = class extends import_sdk_js_core14.AbstractApiRequest {
567
563
  headersSchema = void 0;
568
564
  customerId;
569
565
  constructor(customerId) {
570
- super();
566
+ super(void 0);
571
567
  this.customerId = customerId;
572
568
  }
573
569
  getPath() {
@@ -577,8 +573,8 @@ var DeleteCustomer = class extends import_sdk_js_core14.AbstractApiRequest {
577
573
 
578
574
  // src/requests/customers/GetCustomerDetails.ts
579
575
  var import_sdk_js_core15 = require("@deliverart/sdk-js-core");
580
- var import_zod12 = require("zod");
581
- var getCustomerDetailsInputSchema = import_zod12.z.undefined();
576
+ var import_zod11 = require("zod");
577
+ var getCustomerDetailsInputSchema = import_zod11.z.undefined();
582
578
  var getCustomerDetailsResponseSchema = customerDetailsSchema;
583
579
  var GetCustomerDetails = class extends import_sdk_js_core15.AbstractApiRequest {
584
580
  method = "GET";
@@ -590,7 +586,7 @@ var GetCustomerDetails = class extends import_sdk_js_core15.AbstractApiRequest {
590
586
  headersSchema = void 0;
591
587
  customerId;
592
588
  constructor(customerId) {
593
- super();
589
+ super(void 0);
594
590
  this.customerId = customerId;
595
591
  }
596
592
  getPath() {
@@ -600,33 +596,11 @@ var GetCustomerDetails = class extends import_sdk_js_core15.AbstractApiRequest {
600
596
 
601
597
  // src/requests/customers/GetCustomers.ts
602
598
  var import_sdk_js_core16 = require("@deliverart/sdk-js-core");
603
- var import_sdk_js_global_types6 = require("@deliverart/sdk-js-global-types");
604
- var import_zod13 = require("zod");
605
- var getCustomersQuerySchema = import_zod13.z.object({
606
- firstName: import_zod13.z.string().optional(),
607
- lastName: import_zod13.z.string().optional(),
608
- email: import_zod13.z.string().optional(),
609
- phoneNumber: import_zod13.z.string().optional(),
610
- hasBusinessProfiles: import_zod13.z.coerce.boolean().optional(),
611
- hasAddresses: import_zod13.z.coerce.boolean().optional(),
612
- "ordersPlaced[between]": import_zod13.z.coerce.number().optional(),
613
- "ordersPlaced[gt]": import_zod13.z.coerce.number().optional(),
614
- "ordersPlaced[gte]": import_zod13.z.coerce.number().optional(),
615
- "ordersPlaced[lt]": import_zod13.z.coerce.number().optional(),
616
- "ordersPlaced[lte]": import_zod13.z.coerce.number().optional(),
617
- "totalSpent[between]": import_zod13.z.coerce.number().optional(),
618
- "totalSpent[gt]": import_zod13.z.coerce.number().optional(),
619
- "totalSpent[gte]": import_zod13.z.coerce.number().optional(),
620
- "totalSpent[lt]": import_zod13.z.coerce.number().optional(),
621
- "totalSpent[lte]": import_zod13.z.coerce.number().optional(),
622
- "order[firstName]": import_sdk_js_global_types6.sortDirSchema.optional(),
623
- "order[lastName]": import_sdk_js_global_types6.sortDirSchema.optional(),
624
- "order[createdAt]": import_sdk_js_global_types6.sortDirSchema.optional(),
625
- "order[updatedAt]": import_sdk_js_global_types6.sortDirSchema.optional(),
626
- page: import_zod13.z.coerce.number().optional()
627
- }).merge(import_sdk_js_global_types6.timestampsFilterSchema);
628
- var getCustomersResponseSchema = (0, import_sdk_js_global_types6.createPaginatedSchema)(customerSchema);
629
- 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);
630
604
  var GetCustomers = class extends import_sdk_js_core16.AbstractApiRequest {
631
605
  method = "GET";
632
606
  contentType = "application/json";
@@ -642,8 +616,8 @@ var GetCustomers = class extends import_sdk_js_core16.AbstractApiRequest {
642
616
  return "/customers";
643
617
  }
644
618
  parseResponse(data, rawResponse) {
645
- const customers = import_zod13.z.array(customerSchema).parse(data);
646
- 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) });
647
621
  }
648
622
  };
649
623
 
@@ -694,17 +668,18 @@ var UpdateCustomer = class extends import_sdk_js_core17.AbstractApiRequest {
694
668
  createCustomerInputSchema,
695
669
  createCustomerResponseSchema,
696
670
  customerAddressDetailsSchema,
697
- customerAddressNullablePathSchema,
698
- customerAddressPathSchema,
671
+ customerAddressIriSchema,
672
+ customerAddressNullableIriSchema,
699
673
  customerAddressSchema,
700
674
  customerBusinessProfileDetailsSchema,
701
- customerBusinessProfileNullablePathSchema,
702
- customerBusinessProfilePathSchema,
675
+ customerBusinessProfileIriSchema,
676
+ customerBusinessProfileNullableIriSchema,
703
677
  customerBusinessProfileSchema,
704
678
  customerDetailsSchema,
705
- customerNullablePathSchema,
706
- customerPathSchema,
679
+ customerIriSchema,
680
+ customerNullableIriSchema,
707
681
  customerSchema,
682
+ customersQuerySchema,
708
683
  deleteCustomerAddressInputSchema,
709
684
  deleteCustomerAddressResponseSchema,
710
685
  deleteCustomerBusinessProfileInputSchema,