@deliverart/sdk-js-customer 2.5.34 → 2.6.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/dist/index.cjs +14 -28
- package/dist/index.d.cts +124 -25
- package/dist/index.d.ts +124 -25
- package/dist/index.js +16 -38
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -11439,17 +11439,12 @@ var GetCustomerAddresses = class extends import_sdk_js_core4.AbstractApiRequest
|
|
|
11439
11439
|
this.outputSchema = getCustomerAddressesResponseSchema;
|
|
11440
11440
|
this.querySchema = getCustomerAddressesQuerySchema;
|
|
11441
11441
|
this.headersSchema = void 0;
|
|
11442
|
+
this.listItemSchema = customerAddressSchema;
|
|
11443
|
+
this.paginationDefaultEnabled = true;
|
|
11442
11444
|
}
|
|
11443
11445
|
getPath() {
|
|
11444
11446
|
return "/customers/addresses";
|
|
11445
11447
|
}
|
|
11446
|
-
parseResponse(data, rawResponse) {
|
|
11447
|
-
const customerAddresses = external_exports.array(customerAddressSchema).parse(data);
|
|
11448
|
-
return this.validateOutput({
|
|
11449
|
-
data: customerAddresses,
|
|
11450
|
-
pagination: (0, import_sdk_js_global_types4.responseToPagination)(rawResponse)
|
|
11451
|
-
});
|
|
11452
|
-
}
|
|
11453
11448
|
};
|
|
11454
11449
|
|
|
11455
11450
|
// src/requests/customer-addresses/GetCustomerAddressesForCustomer.ts
|
|
@@ -11471,14 +11466,13 @@ var GetCustomerAddressesForCustomer = class extends import_sdk_js_core5.Abstract
|
|
|
11471
11466
|
this.outputSchema = getCustomerAddressesForCustomerResponseSchema;
|
|
11472
11467
|
this.querySchema = getCustomerAddressesForCustomerQuerySchema;
|
|
11473
11468
|
this.headersSchema = void 0;
|
|
11469
|
+
this.listItemSchema = customerAddressSchema;
|
|
11470
|
+
this.paginationDefaultEnabled = false;
|
|
11474
11471
|
this.customerId = customerId;
|
|
11475
11472
|
}
|
|
11476
11473
|
getPath() {
|
|
11477
11474
|
return `/customers/${this.customerId}/addresses`;
|
|
11478
11475
|
}
|
|
11479
|
-
parseResponse(data) {
|
|
11480
|
-
return external_exports.array(customerAddressSchema).parse(data);
|
|
11481
|
-
}
|
|
11482
11476
|
};
|
|
11483
11477
|
|
|
11484
11478
|
// src/requests/customer-addresses/UpdateCustomerAddress.ts
|
|
@@ -11591,17 +11585,12 @@ var GetCustomerBusinessProfiles = class extends import_sdk_js_core10.AbstractApi
|
|
|
11591
11585
|
this.outputSchema = getCustomerBusinessProfilesResponseSchema;
|
|
11592
11586
|
this.querySchema = getCustomerBusinessProfilesQuerySchema;
|
|
11593
11587
|
this.headersSchema = void 0;
|
|
11588
|
+
this.listItemSchema = customerBusinessProfileSchema;
|
|
11589
|
+
this.paginationDefaultEnabled = true;
|
|
11594
11590
|
}
|
|
11595
11591
|
getPath() {
|
|
11596
11592
|
return "/customers/business_profiles";
|
|
11597
11593
|
}
|
|
11598
|
-
parseResponse(data, rawResponse) {
|
|
11599
|
-
const customerBusinessProfiles = external_exports.array(customerBusinessProfileSchema).parse(data);
|
|
11600
|
-
return this.validateOutput({
|
|
11601
|
-
data: customerBusinessProfiles,
|
|
11602
|
-
pagination: (0, import_sdk_js_global_types7.responseToPagination)(rawResponse)
|
|
11603
|
-
});
|
|
11604
|
-
}
|
|
11605
11594
|
};
|
|
11606
11595
|
|
|
11607
11596
|
// src/requests/customer-business-profiles/GetCustomerBusinessProfilesForCustomer.ts
|
|
@@ -11629,14 +11618,13 @@ var GetCustomerBusinessProfilesForCustomer = class extends import_sdk_js_core11.
|
|
|
11629
11618
|
this.outputSchema = getCustomerBusinessProfilesForCustomerResponseSchema;
|
|
11630
11619
|
this.querySchema = getCustomerBusinessProfilesForCustomerQuerySchema;
|
|
11631
11620
|
this.headersSchema = void 0;
|
|
11621
|
+
this.listItemSchema = customerBusinessProfileSchema;
|
|
11622
|
+
this.paginationDefaultEnabled = false;
|
|
11632
11623
|
this.customerId = customerId;
|
|
11633
11624
|
}
|
|
11634
11625
|
getPath() {
|
|
11635
11626
|
return `/customers/${this.customerId}/business_profiles`;
|
|
11636
11627
|
}
|
|
11637
|
-
parseResponse(data) {
|
|
11638
|
-
return external_exports.array(customerBusinessProfileSchema).parse(data);
|
|
11639
|
-
}
|
|
11640
11628
|
};
|
|
11641
11629
|
|
|
11642
11630
|
// src/requests/customer-business-profiles/UpdateCustomerBusinessProfile.ts
|
|
@@ -11739,14 +11727,13 @@ var GetCustomers = class extends import_sdk_js_core16.AbstractApiRequest {
|
|
|
11739
11727
|
this.outputSchema = getCustomersResponseSchema;
|
|
11740
11728
|
this.querySchema = getCustomersQuerySchema;
|
|
11741
11729
|
this.headersSchema = void 0;
|
|
11730
|
+
// Declare list behavior
|
|
11731
|
+
this.listItemSchema = customerSchema;
|
|
11732
|
+
this.paginationDefaultEnabled = true;
|
|
11742
11733
|
}
|
|
11743
11734
|
getPath() {
|
|
11744
11735
|
return "/customers";
|
|
11745
11736
|
}
|
|
11746
|
-
parseResponse(data, rawResponse) {
|
|
11747
|
-
const customers = external_exports.array(customerSchema).parse(data);
|
|
11748
|
-
return this.validateOutput({ data: customers, pagination: (0, import_sdk_js_global_types10.responseToPagination)(rawResponse) });
|
|
11749
|
-
}
|
|
11750
11737
|
};
|
|
11751
11738
|
|
|
11752
11739
|
// src/requests/customers/GetCustomersFromPointOfSale.ts
|
|
@@ -11765,15 +11752,14 @@ var GetCustomersFromPointOfSale = class extends import_sdk_js_core17.AbstractApi
|
|
|
11765
11752
|
this.outputSchema = getCustomersFromPointOfSaleResponseSchema;
|
|
11766
11753
|
this.querySchema = getCustomersFromPointOfSaleQuerySchema;
|
|
11767
11754
|
this.headersSchema = void 0;
|
|
11755
|
+
// Declare list behavior
|
|
11756
|
+
this.listItemSchema = customerSchema;
|
|
11757
|
+
this.paginationDefaultEnabled = true;
|
|
11768
11758
|
this.pointOfSaleId = pointOfSaleId;
|
|
11769
11759
|
}
|
|
11770
11760
|
getPath() {
|
|
11771
11761
|
return `/point_of_sales/${this.pointOfSaleId}/customers`;
|
|
11772
11762
|
}
|
|
11773
|
-
parseResponse(data, rawResponse) {
|
|
11774
|
-
const customers = external_exports.array(customerSchema).parse(data);
|
|
11775
|
-
return this.validateOutput({ data: customers, pagination: (0, import_sdk_js_global_types11.responseToPagination)(rawResponse) });
|
|
11776
|
-
}
|
|
11777
11763
|
};
|
|
11778
11764
|
|
|
11779
11765
|
// src/requests/customers/UpdateCustomer.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
|
|
2
|
-
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
5
4
|
|
|
@@ -420,9 +419,9 @@ declare const getCustomerAddressesResponseSchema: z.ZodObject<{
|
|
|
420
419
|
}, z.core.$strip>;
|
|
421
420
|
type GetCustomerAddressesResponse = z.infer<typeof getCustomerAddressesResponseSchema>;
|
|
422
421
|
declare class GetCustomerAddresses extends AbstractApiRequest<typeof getCustomerAddressesInputSchema, typeof getCustomerAddressesResponseSchema, GetCustomerAddressesQueryParams> {
|
|
423
|
-
readonly method
|
|
424
|
-
readonly contentType
|
|
425
|
-
readonly accept
|
|
422
|
+
readonly method: "GET";
|
|
423
|
+
readonly contentType: "application/json";
|
|
424
|
+
readonly accept: "application/json";
|
|
426
425
|
readonly inputSchema: z.ZodUndefined;
|
|
427
426
|
readonly outputSchema: z.ZodObject<{
|
|
428
427
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -471,11 +470,28 @@ declare class GetCustomerAddresses extends AbstractApiRequest<typeof getCustomer
|
|
|
471
470
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
472
471
|
}, z.core.$strip>;
|
|
473
472
|
readonly headersSchema: undefined;
|
|
473
|
+
readonly listItemSchema: z.ZodObject<{
|
|
474
|
+
id: z.ZodString;
|
|
475
|
+
address: z.ZodObject<{
|
|
476
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
477
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
478
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
479
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
480
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
481
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
482
|
+
}, z.core.$strip>;
|
|
483
|
+
location: z.ZodObject<{
|
|
484
|
+
latitude: z.ZodNumber;
|
|
485
|
+
longitude: z.ZodNumber;
|
|
486
|
+
}, z.core.$strip>;
|
|
487
|
+
createdAt: z.ZodString;
|
|
488
|
+
updatedAt: z.ZodString;
|
|
489
|
+
}, z.core.$strip>;
|
|
490
|
+
readonly paginationDefaultEnabled = true;
|
|
474
491
|
constructor(options?: {
|
|
475
492
|
query?: GetCustomerAddressesQueryParams;
|
|
476
493
|
});
|
|
477
494
|
getPath(): string;
|
|
478
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<CustomerAddress>;
|
|
479
495
|
}
|
|
480
496
|
|
|
481
497
|
declare const getCustomerAddressesForCustomerQuerySchema: z.ZodObject<{
|
|
@@ -518,9 +534,9 @@ declare const getCustomerAddressesForCustomerResponseSchema: z.ZodArray<z.ZodObj
|
|
|
518
534
|
}, z.core.$strip>>;
|
|
519
535
|
type GetCustomerAddressesForCustomerResponse = z.infer<typeof getCustomerAddressesForCustomerResponseSchema>;
|
|
520
536
|
declare class GetCustomerAddressesForCustomer extends AbstractApiRequest<typeof getCustomerAddressesForCustomerInputSchema, typeof getCustomerAddressesForCustomerResponseSchema, GetCustomerAddressesForCustomerQueryParams> {
|
|
521
|
-
readonly method
|
|
522
|
-
readonly contentType
|
|
523
|
-
readonly accept
|
|
537
|
+
readonly method: "GET";
|
|
538
|
+
readonly contentType: "application/json";
|
|
539
|
+
readonly accept: "application/json";
|
|
524
540
|
readonly inputSchema: z.ZodUndefined;
|
|
525
541
|
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
526
542
|
id: z.ZodString;
|
|
@@ -558,12 +574,29 @@ declare class GetCustomerAddressesForCustomer extends AbstractApiRequest<typeof
|
|
|
558
574
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
559
575
|
}, z.core.$strip>;
|
|
560
576
|
readonly headersSchema: undefined;
|
|
577
|
+
readonly listItemSchema: z.ZodObject<{
|
|
578
|
+
id: z.ZodString;
|
|
579
|
+
address: z.ZodObject<{
|
|
580
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
581
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
582
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
583
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
584
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
585
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
586
|
+
}, z.core.$strip>;
|
|
587
|
+
location: z.ZodObject<{
|
|
588
|
+
latitude: z.ZodNumber;
|
|
589
|
+
longitude: z.ZodNumber;
|
|
590
|
+
}, z.core.$strip>;
|
|
591
|
+
createdAt: z.ZodString;
|
|
592
|
+
updatedAt: z.ZodString;
|
|
593
|
+
}, z.core.$strip>;
|
|
594
|
+
readonly paginationDefaultEnabled = false;
|
|
561
595
|
private readonly customerId;
|
|
562
596
|
constructor(customerId: string, options?: {
|
|
563
597
|
query?: GetCustomerAddressesForCustomerQueryParams;
|
|
564
598
|
});
|
|
565
599
|
getPath(): string;
|
|
566
|
-
parseResponse(data: unknown): CustomerAddress[];
|
|
567
600
|
}
|
|
568
601
|
|
|
569
602
|
declare const updateCustomerAddressInputSchema: z.ZodObject<{
|
|
@@ -858,9 +891,9 @@ declare const getCustomerBusinessProfilesResponseSchema: z.ZodObject<{
|
|
|
858
891
|
}, z.core.$strip>;
|
|
859
892
|
type GetCustomerBusinessProfilesResponse = z.infer<typeof getCustomerBusinessProfilesResponseSchema>;
|
|
860
893
|
declare class GetCustomerBusinessProfiles extends AbstractApiRequest<typeof getCustomerBusinessProfilesInputSchema, typeof getCustomerBusinessProfilesResponseSchema, GetCustomerBusinessProfilesQueryParams> {
|
|
861
|
-
readonly method
|
|
862
|
-
readonly contentType
|
|
863
|
-
readonly accept
|
|
894
|
+
readonly method: "GET";
|
|
895
|
+
readonly contentType: "application/json";
|
|
896
|
+
readonly accept: "application/json";
|
|
864
897
|
readonly inputSchema: z.ZodUndefined;
|
|
865
898
|
readonly outputSchema: z.ZodObject<{
|
|
866
899
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -919,11 +952,31 @@ declare class GetCustomerBusinessProfiles extends AbstractApiRequest<typeof getC
|
|
|
919
952
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
920
953
|
}, z.core.$strip>;
|
|
921
954
|
readonly headersSchema: undefined;
|
|
955
|
+
readonly listItemSchema: z.ZodObject<{
|
|
956
|
+
id: z.ZodString;
|
|
957
|
+
businessName: z.ZodString;
|
|
958
|
+
vat: z.ZodString;
|
|
959
|
+
taxCode: z.ZodString;
|
|
960
|
+
billingAddress: z.ZodObject<{
|
|
961
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
962
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
963
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
964
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
965
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
966
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
967
|
+
}, z.core.$strip>;
|
|
968
|
+
billingData: z.ZodObject<{
|
|
969
|
+
sdi: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
970
|
+
pec: z.ZodNullable<z.ZodOptional<z.ZodEmail>>;
|
|
971
|
+
}, z.core.$strip>;
|
|
972
|
+
createdAt: z.ZodString;
|
|
973
|
+
updatedAt: z.ZodString;
|
|
974
|
+
}, z.core.$strip>;
|
|
975
|
+
readonly paginationDefaultEnabled = true;
|
|
922
976
|
constructor(options?: {
|
|
923
977
|
query?: GetCustomerBusinessProfilesQueryParams;
|
|
924
978
|
});
|
|
925
979
|
getPath(): string;
|
|
926
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<CustomerBusinessProfile>;
|
|
927
980
|
}
|
|
928
981
|
|
|
929
982
|
declare const getCustomerBusinessProfilesForCustomerQuerySchema: z.ZodObject<{
|
|
@@ -976,9 +1029,9 @@ declare const getCustomerBusinessProfilesForCustomerResponseSchema: z.ZodArray<z
|
|
|
976
1029
|
}, z.core.$strip>>;
|
|
977
1030
|
type GetCustomerBusinessProfilesForCustomerResponse = z.infer<typeof getCustomerBusinessProfilesForCustomerResponseSchema>;
|
|
978
1031
|
declare class GetCustomerBusinessProfilesForCustomer extends AbstractApiRequest<typeof getCustomerBusinessProfilesForCustomerInputSchema, typeof getCustomerBusinessProfilesForCustomerResponseSchema, GetCustomerBusinessProfilesForCustomerQueryParams> {
|
|
979
|
-
readonly method
|
|
980
|
-
readonly contentType
|
|
981
|
-
readonly accept
|
|
1032
|
+
readonly method: "GET";
|
|
1033
|
+
readonly contentType: "application/json";
|
|
1034
|
+
readonly accept: "application/json";
|
|
982
1035
|
readonly inputSchema: z.ZodUndefined;
|
|
983
1036
|
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
984
1037
|
id: z.ZodString;
|
|
@@ -1026,12 +1079,32 @@ declare class GetCustomerBusinessProfilesForCustomer extends AbstractApiRequest<
|
|
|
1026
1079
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1027
1080
|
}, z.core.$strip>;
|
|
1028
1081
|
readonly headersSchema: undefined;
|
|
1082
|
+
readonly listItemSchema: z.ZodObject<{
|
|
1083
|
+
id: z.ZodString;
|
|
1084
|
+
businessName: z.ZodString;
|
|
1085
|
+
vat: z.ZodString;
|
|
1086
|
+
taxCode: z.ZodString;
|
|
1087
|
+
billingAddress: z.ZodObject<{
|
|
1088
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1089
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1090
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1091
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1092
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1093
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1094
|
+
}, z.core.$strip>;
|
|
1095
|
+
billingData: z.ZodObject<{
|
|
1096
|
+
sdi: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1097
|
+
pec: z.ZodNullable<z.ZodOptional<z.ZodEmail>>;
|
|
1098
|
+
}, z.core.$strip>;
|
|
1099
|
+
createdAt: z.ZodString;
|
|
1100
|
+
updatedAt: z.ZodString;
|
|
1101
|
+
}, z.core.$strip>;
|
|
1102
|
+
readonly paginationDefaultEnabled = false;
|
|
1029
1103
|
private readonly customerId;
|
|
1030
1104
|
constructor(customerId: string, options?: {
|
|
1031
1105
|
query?: GetCustomerBusinessProfilesForCustomerQueryParams;
|
|
1032
1106
|
});
|
|
1033
1107
|
getPath(): string;
|
|
1034
|
-
parseResponse(data: unknown): CustomerBusinessProfile[];
|
|
1035
1108
|
}
|
|
1036
1109
|
|
|
1037
1110
|
declare const updateCustomerBusinessProfileInputSchema: z.ZodObject<{
|
|
@@ -1318,9 +1391,9 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
1318
1391
|
}, z.core.$strip>;
|
|
1319
1392
|
type GetCustomersResponse = z.infer<typeof getCustomersResponseSchema>;
|
|
1320
1393
|
declare class GetCustomers extends AbstractApiRequest<typeof getCustomersInputSchema, typeof getCustomersResponseSchema, GetCustomersQueryParams> {
|
|
1321
|
-
readonly method
|
|
1322
|
-
readonly contentType
|
|
1323
|
-
readonly accept
|
|
1394
|
+
readonly method: "GET";
|
|
1395
|
+
readonly contentType: "application/json";
|
|
1396
|
+
readonly accept: "application/json";
|
|
1324
1397
|
readonly inputSchema: z.ZodUndefined;
|
|
1325
1398
|
readonly outputSchema: z.ZodObject<{
|
|
1326
1399
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -1389,11 +1462,24 @@ declare class GetCustomers extends AbstractApiRequest<typeof getCustomersInputSc
|
|
|
1389
1462
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1390
1463
|
}, z.core.$strip>;
|
|
1391
1464
|
readonly headersSchema: undefined;
|
|
1465
|
+
readonly listItemSchema: z.ZodObject<{
|
|
1466
|
+
id: z.ZodString;
|
|
1467
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
1468
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
1469
|
+
email: z.ZodNullable<z.ZodEmail>;
|
|
1470
|
+
phoneNumber: z.ZodNullable<z.ZodString>;
|
|
1471
|
+
hasBusinessProfiles: z.ZodBoolean;
|
|
1472
|
+
hasAddresses: z.ZodBoolean;
|
|
1473
|
+
ordersPlaced: z.ZodCoercedNumber<unknown>;
|
|
1474
|
+
totalSpent: z.ZodString;
|
|
1475
|
+
createdAt: z.ZodString;
|
|
1476
|
+
updatedAt: z.ZodString;
|
|
1477
|
+
}, z.core.$strip>;
|
|
1478
|
+
readonly paginationDefaultEnabled = true;
|
|
1392
1479
|
constructor(options?: {
|
|
1393
1480
|
query?: GetCustomersQueryParams;
|
|
1394
1481
|
});
|
|
1395
1482
|
getPath(): string;
|
|
1396
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Customer>;
|
|
1397
1483
|
}
|
|
1398
1484
|
|
|
1399
1485
|
declare const getCustomersFromPointOfSaleQuerySchema: z.ZodObject<{
|
|
@@ -1467,9 +1553,9 @@ declare const getCustomersFromPointOfSaleResponseSchema: z.ZodObject<{
|
|
|
1467
1553
|
}, z.core.$strip>;
|
|
1468
1554
|
type GetCustomersFromPointOfSaleResponse = z.infer<typeof getCustomersFromPointOfSaleResponseSchema>;
|
|
1469
1555
|
declare class GetCustomersFromPointOfSale extends AbstractApiRequest<typeof getCustomersFromPointOfSaleInputSchema, typeof getCustomersFromPointOfSaleResponseSchema, GetCustomersFromPointOfSaleQueryParams> {
|
|
1470
|
-
readonly method
|
|
1471
|
-
readonly contentType
|
|
1472
|
-
readonly accept
|
|
1556
|
+
readonly method: "GET";
|
|
1557
|
+
readonly contentType: "application/json";
|
|
1558
|
+
readonly accept: "application/json";
|
|
1473
1559
|
readonly inputSchema: z.ZodUndefined;
|
|
1474
1560
|
readonly outputSchema: z.ZodObject<{
|
|
1475
1561
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -1538,12 +1624,25 @@ declare class GetCustomersFromPointOfSale extends AbstractApiRequest<typeof getC
|
|
|
1538
1624
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1539
1625
|
}, z.core.$strip>;
|
|
1540
1626
|
readonly headersSchema: undefined;
|
|
1627
|
+
readonly listItemSchema: z.ZodObject<{
|
|
1628
|
+
id: z.ZodString;
|
|
1629
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
1630
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
1631
|
+
email: z.ZodNullable<z.ZodEmail>;
|
|
1632
|
+
phoneNumber: z.ZodNullable<z.ZodString>;
|
|
1633
|
+
hasBusinessProfiles: z.ZodBoolean;
|
|
1634
|
+
hasAddresses: z.ZodBoolean;
|
|
1635
|
+
ordersPlaced: z.ZodCoercedNumber<unknown>;
|
|
1636
|
+
totalSpent: z.ZodString;
|
|
1637
|
+
createdAt: z.ZodString;
|
|
1638
|
+
updatedAt: z.ZodString;
|
|
1639
|
+
}, z.core.$strip>;
|
|
1640
|
+
readonly paginationDefaultEnabled = true;
|
|
1541
1641
|
private readonly pointOfSaleId;
|
|
1542
1642
|
constructor(pointOfSaleId: string, options?: {
|
|
1543
1643
|
query?: GetCustomersFromPointOfSaleQueryParams;
|
|
1544
1644
|
});
|
|
1545
1645
|
getPath(): string;
|
|
1546
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Customer>;
|
|
1547
1646
|
}
|
|
1548
1647
|
|
|
1549
1648
|
declare const updateCustomerInputSchema: z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
|
|
2
|
-
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
5
4
|
|
|
@@ -420,9 +419,9 @@ declare const getCustomerAddressesResponseSchema: z.ZodObject<{
|
|
|
420
419
|
}, z.core.$strip>;
|
|
421
420
|
type GetCustomerAddressesResponse = z.infer<typeof getCustomerAddressesResponseSchema>;
|
|
422
421
|
declare class GetCustomerAddresses extends AbstractApiRequest<typeof getCustomerAddressesInputSchema, typeof getCustomerAddressesResponseSchema, GetCustomerAddressesQueryParams> {
|
|
423
|
-
readonly method
|
|
424
|
-
readonly contentType
|
|
425
|
-
readonly accept
|
|
422
|
+
readonly method: "GET";
|
|
423
|
+
readonly contentType: "application/json";
|
|
424
|
+
readonly accept: "application/json";
|
|
426
425
|
readonly inputSchema: z.ZodUndefined;
|
|
427
426
|
readonly outputSchema: z.ZodObject<{
|
|
428
427
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -471,11 +470,28 @@ declare class GetCustomerAddresses extends AbstractApiRequest<typeof getCustomer
|
|
|
471
470
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
472
471
|
}, z.core.$strip>;
|
|
473
472
|
readonly headersSchema: undefined;
|
|
473
|
+
readonly listItemSchema: z.ZodObject<{
|
|
474
|
+
id: z.ZodString;
|
|
475
|
+
address: z.ZodObject<{
|
|
476
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
477
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
478
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
479
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
480
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
481
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
482
|
+
}, z.core.$strip>;
|
|
483
|
+
location: z.ZodObject<{
|
|
484
|
+
latitude: z.ZodNumber;
|
|
485
|
+
longitude: z.ZodNumber;
|
|
486
|
+
}, z.core.$strip>;
|
|
487
|
+
createdAt: z.ZodString;
|
|
488
|
+
updatedAt: z.ZodString;
|
|
489
|
+
}, z.core.$strip>;
|
|
490
|
+
readonly paginationDefaultEnabled = true;
|
|
474
491
|
constructor(options?: {
|
|
475
492
|
query?: GetCustomerAddressesQueryParams;
|
|
476
493
|
});
|
|
477
494
|
getPath(): string;
|
|
478
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<CustomerAddress>;
|
|
479
495
|
}
|
|
480
496
|
|
|
481
497
|
declare const getCustomerAddressesForCustomerQuerySchema: z.ZodObject<{
|
|
@@ -518,9 +534,9 @@ declare const getCustomerAddressesForCustomerResponseSchema: z.ZodArray<z.ZodObj
|
|
|
518
534
|
}, z.core.$strip>>;
|
|
519
535
|
type GetCustomerAddressesForCustomerResponse = z.infer<typeof getCustomerAddressesForCustomerResponseSchema>;
|
|
520
536
|
declare class GetCustomerAddressesForCustomer extends AbstractApiRequest<typeof getCustomerAddressesForCustomerInputSchema, typeof getCustomerAddressesForCustomerResponseSchema, GetCustomerAddressesForCustomerQueryParams> {
|
|
521
|
-
readonly method
|
|
522
|
-
readonly contentType
|
|
523
|
-
readonly accept
|
|
537
|
+
readonly method: "GET";
|
|
538
|
+
readonly contentType: "application/json";
|
|
539
|
+
readonly accept: "application/json";
|
|
524
540
|
readonly inputSchema: z.ZodUndefined;
|
|
525
541
|
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
526
542
|
id: z.ZodString;
|
|
@@ -558,12 +574,29 @@ declare class GetCustomerAddressesForCustomer extends AbstractApiRequest<typeof
|
|
|
558
574
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
559
575
|
}, z.core.$strip>;
|
|
560
576
|
readonly headersSchema: undefined;
|
|
577
|
+
readonly listItemSchema: z.ZodObject<{
|
|
578
|
+
id: z.ZodString;
|
|
579
|
+
address: z.ZodObject<{
|
|
580
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
581
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
582
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
583
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
584
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
585
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
586
|
+
}, z.core.$strip>;
|
|
587
|
+
location: z.ZodObject<{
|
|
588
|
+
latitude: z.ZodNumber;
|
|
589
|
+
longitude: z.ZodNumber;
|
|
590
|
+
}, z.core.$strip>;
|
|
591
|
+
createdAt: z.ZodString;
|
|
592
|
+
updatedAt: z.ZodString;
|
|
593
|
+
}, z.core.$strip>;
|
|
594
|
+
readonly paginationDefaultEnabled = false;
|
|
561
595
|
private readonly customerId;
|
|
562
596
|
constructor(customerId: string, options?: {
|
|
563
597
|
query?: GetCustomerAddressesForCustomerQueryParams;
|
|
564
598
|
});
|
|
565
599
|
getPath(): string;
|
|
566
|
-
parseResponse(data: unknown): CustomerAddress[];
|
|
567
600
|
}
|
|
568
601
|
|
|
569
602
|
declare const updateCustomerAddressInputSchema: z.ZodObject<{
|
|
@@ -858,9 +891,9 @@ declare const getCustomerBusinessProfilesResponseSchema: z.ZodObject<{
|
|
|
858
891
|
}, z.core.$strip>;
|
|
859
892
|
type GetCustomerBusinessProfilesResponse = z.infer<typeof getCustomerBusinessProfilesResponseSchema>;
|
|
860
893
|
declare class GetCustomerBusinessProfiles extends AbstractApiRequest<typeof getCustomerBusinessProfilesInputSchema, typeof getCustomerBusinessProfilesResponseSchema, GetCustomerBusinessProfilesQueryParams> {
|
|
861
|
-
readonly method
|
|
862
|
-
readonly contentType
|
|
863
|
-
readonly accept
|
|
894
|
+
readonly method: "GET";
|
|
895
|
+
readonly contentType: "application/json";
|
|
896
|
+
readonly accept: "application/json";
|
|
864
897
|
readonly inputSchema: z.ZodUndefined;
|
|
865
898
|
readonly outputSchema: z.ZodObject<{
|
|
866
899
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -919,11 +952,31 @@ declare class GetCustomerBusinessProfiles extends AbstractApiRequest<typeof getC
|
|
|
919
952
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
920
953
|
}, z.core.$strip>;
|
|
921
954
|
readonly headersSchema: undefined;
|
|
955
|
+
readonly listItemSchema: z.ZodObject<{
|
|
956
|
+
id: z.ZodString;
|
|
957
|
+
businessName: z.ZodString;
|
|
958
|
+
vat: z.ZodString;
|
|
959
|
+
taxCode: z.ZodString;
|
|
960
|
+
billingAddress: z.ZodObject<{
|
|
961
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
962
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
963
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
964
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
965
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
966
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
967
|
+
}, z.core.$strip>;
|
|
968
|
+
billingData: z.ZodObject<{
|
|
969
|
+
sdi: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
970
|
+
pec: z.ZodNullable<z.ZodOptional<z.ZodEmail>>;
|
|
971
|
+
}, z.core.$strip>;
|
|
972
|
+
createdAt: z.ZodString;
|
|
973
|
+
updatedAt: z.ZodString;
|
|
974
|
+
}, z.core.$strip>;
|
|
975
|
+
readonly paginationDefaultEnabled = true;
|
|
922
976
|
constructor(options?: {
|
|
923
977
|
query?: GetCustomerBusinessProfilesQueryParams;
|
|
924
978
|
});
|
|
925
979
|
getPath(): string;
|
|
926
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<CustomerBusinessProfile>;
|
|
927
980
|
}
|
|
928
981
|
|
|
929
982
|
declare const getCustomerBusinessProfilesForCustomerQuerySchema: z.ZodObject<{
|
|
@@ -976,9 +1029,9 @@ declare const getCustomerBusinessProfilesForCustomerResponseSchema: z.ZodArray<z
|
|
|
976
1029
|
}, z.core.$strip>>;
|
|
977
1030
|
type GetCustomerBusinessProfilesForCustomerResponse = z.infer<typeof getCustomerBusinessProfilesForCustomerResponseSchema>;
|
|
978
1031
|
declare class GetCustomerBusinessProfilesForCustomer extends AbstractApiRequest<typeof getCustomerBusinessProfilesForCustomerInputSchema, typeof getCustomerBusinessProfilesForCustomerResponseSchema, GetCustomerBusinessProfilesForCustomerQueryParams> {
|
|
979
|
-
readonly method
|
|
980
|
-
readonly contentType
|
|
981
|
-
readonly accept
|
|
1032
|
+
readonly method: "GET";
|
|
1033
|
+
readonly contentType: "application/json";
|
|
1034
|
+
readonly accept: "application/json";
|
|
982
1035
|
readonly inputSchema: z.ZodUndefined;
|
|
983
1036
|
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
984
1037
|
id: z.ZodString;
|
|
@@ -1026,12 +1079,32 @@ declare class GetCustomerBusinessProfilesForCustomer extends AbstractApiRequest<
|
|
|
1026
1079
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1027
1080
|
}, z.core.$strip>;
|
|
1028
1081
|
readonly headersSchema: undefined;
|
|
1082
|
+
readonly listItemSchema: z.ZodObject<{
|
|
1083
|
+
id: z.ZodString;
|
|
1084
|
+
businessName: z.ZodString;
|
|
1085
|
+
vat: z.ZodString;
|
|
1086
|
+
taxCode: z.ZodString;
|
|
1087
|
+
billingAddress: z.ZodObject<{
|
|
1088
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1089
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1090
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1091
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1092
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1093
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1094
|
+
}, z.core.$strip>;
|
|
1095
|
+
billingData: z.ZodObject<{
|
|
1096
|
+
sdi: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1097
|
+
pec: z.ZodNullable<z.ZodOptional<z.ZodEmail>>;
|
|
1098
|
+
}, z.core.$strip>;
|
|
1099
|
+
createdAt: z.ZodString;
|
|
1100
|
+
updatedAt: z.ZodString;
|
|
1101
|
+
}, z.core.$strip>;
|
|
1102
|
+
readonly paginationDefaultEnabled = false;
|
|
1029
1103
|
private readonly customerId;
|
|
1030
1104
|
constructor(customerId: string, options?: {
|
|
1031
1105
|
query?: GetCustomerBusinessProfilesForCustomerQueryParams;
|
|
1032
1106
|
});
|
|
1033
1107
|
getPath(): string;
|
|
1034
|
-
parseResponse(data: unknown): CustomerBusinessProfile[];
|
|
1035
1108
|
}
|
|
1036
1109
|
|
|
1037
1110
|
declare const updateCustomerBusinessProfileInputSchema: z.ZodObject<{
|
|
@@ -1318,9 +1391,9 @@ declare const getCustomersResponseSchema: z.ZodObject<{
|
|
|
1318
1391
|
}, z.core.$strip>;
|
|
1319
1392
|
type GetCustomersResponse = z.infer<typeof getCustomersResponseSchema>;
|
|
1320
1393
|
declare class GetCustomers extends AbstractApiRequest<typeof getCustomersInputSchema, typeof getCustomersResponseSchema, GetCustomersQueryParams> {
|
|
1321
|
-
readonly method
|
|
1322
|
-
readonly contentType
|
|
1323
|
-
readonly accept
|
|
1394
|
+
readonly method: "GET";
|
|
1395
|
+
readonly contentType: "application/json";
|
|
1396
|
+
readonly accept: "application/json";
|
|
1324
1397
|
readonly inputSchema: z.ZodUndefined;
|
|
1325
1398
|
readonly outputSchema: z.ZodObject<{
|
|
1326
1399
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -1389,11 +1462,24 @@ declare class GetCustomers extends AbstractApiRequest<typeof getCustomersInputSc
|
|
|
1389
1462
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1390
1463
|
}, z.core.$strip>;
|
|
1391
1464
|
readonly headersSchema: undefined;
|
|
1465
|
+
readonly listItemSchema: z.ZodObject<{
|
|
1466
|
+
id: z.ZodString;
|
|
1467
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
1468
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
1469
|
+
email: z.ZodNullable<z.ZodEmail>;
|
|
1470
|
+
phoneNumber: z.ZodNullable<z.ZodString>;
|
|
1471
|
+
hasBusinessProfiles: z.ZodBoolean;
|
|
1472
|
+
hasAddresses: z.ZodBoolean;
|
|
1473
|
+
ordersPlaced: z.ZodCoercedNumber<unknown>;
|
|
1474
|
+
totalSpent: z.ZodString;
|
|
1475
|
+
createdAt: z.ZodString;
|
|
1476
|
+
updatedAt: z.ZodString;
|
|
1477
|
+
}, z.core.$strip>;
|
|
1478
|
+
readonly paginationDefaultEnabled = true;
|
|
1392
1479
|
constructor(options?: {
|
|
1393
1480
|
query?: GetCustomersQueryParams;
|
|
1394
1481
|
});
|
|
1395
1482
|
getPath(): string;
|
|
1396
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Customer>;
|
|
1397
1483
|
}
|
|
1398
1484
|
|
|
1399
1485
|
declare const getCustomersFromPointOfSaleQuerySchema: z.ZodObject<{
|
|
@@ -1467,9 +1553,9 @@ declare const getCustomersFromPointOfSaleResponseSchema: z.ZodObject<{
|
|
|
1467
1553
|
}, z.core.$strip>;
|
|
1468
1554
|
type GetCustomersFromPointOfSaleResponse = z.infer<typeof getCustomersFromPointOfSaleResponseSchema>;
|
|
1469
1555
|
declare class GetCustomersFromPointOfSale extends AbstractApiRequest<typeof getCustomersFromPointOfSaleInputSchema, typeof getCustomersFromPointOfSaleResponseSchema, GetCustomersFromPointOfSaleQueryParams> {
|
|
1470
|
-
readonly method
|
|
1471
|
-
readonly contentType
|
|
1472
|
-
readonly accept
|
|
1556
|
+
readonly method: "GET";
|
|
1557
|
+
readonly contentType: "application/json";
|
|
1558
|
+
readonly accept: "application/json";
|
|
1473
1559
|
readonly inputSchema: z.ZodUndefined;
|
|
1474
1560
|
readonly outputSchema: z.ZodObject<{
|
|
1475
1561
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -1538,12 +1624,25 @@ declare class GetCustomersFromPointOfSale extends AbstractApiRequest<typeof getC
|
|
|
1538
1624
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1539
1625
|
}, z.core.$strip>;
|
|
1540
1626
|
readonly headersSchema: undefined;
|
|
1627
|
+
readonly listItemSchema: z.ZodObject<{
|
|
1628
|
+
id: z.ZodString;
|
|
1629
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
1630
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
1631
|
+
email: z.ZodNullable<z.ZodEmail>;
|
|
1632
|
+
phoneNumber: z.ZodNullable<z.ZodString>;
|
|
1633
|
+
hasBusinessProfiles: z.ZodBoolean;
|
|
1634
|
+
hasAddresses: z.ZodBoolean;
|
|
1635
|
+
ordersPlaced: z.ZodCoercedNumber<unknown>;
|
|
1636
|
+
totalSpent: z.ZodString;
|
|
1637
|
+
createdAt: z.ZodString;
|
|
1638
|
+
updatedAt: z.ZodString;
|
|
1639
|
+
}, z.core.$strip>;
|
|
1640
|
+
readonly paginationDefaultEnabled = true;
|
|
1541
1641
|
private readonly pointOfSaleId;
|
|
1542
1642
|
constructor(pointOfSaleId: string, options?: {
|
|
1543
1643
|
query?: GetCustomersFromPointOfSaleQueryParams;
|
|
1544
1644
|
});
|
|
1545
1645
|
getPath(): string;
|
|
1546
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Customer>;
|
|
1547
1646
|
}
|
|
1548
1647
|
|
|
1549
1648
|
declare const updateCustomerInputSchema: z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -11333,7 +11333,6 @@ var GetCustomerAddressDetails = class extends AbstractApiRequest3 {
|
|
|
11333
11333
|
import { AbstractApiRequest as AbstractApiRequest4 } from "@deliverart/sdk-js-core";
|
|
11334
11334
|
import {
|
|
11335
11335
|
createPaginatedSchema,
|
|
11336
|
-
responseToPagination,
|
|
11337
11336
|
sortDirSchema as sortDirSchema2,
|
|
11338
11337
|
timestampsFilterSchema as timestampsFilterSchema2
|
|
11339
11338
|
} from "@deliverart/sdk-js-global-types";
|
|
@@ -11354,17 +11353,12 @@ var GetCustomerAddresses = class extends AbstractApiRequest4 {
|
|
|
11354
11353
|
this.outputSchema = getCustomerAddressesResponseSchema;
|
|
11355
11354
|
this.querySchema = getCustomerAddressesQuerySchema;
|
|
11356
11355
|
this.headersSchema = void 0;
|
|
11356
|
+
this.listItemSchema = customerAddressSchema;
|
|
11357
|
+
this.paginationDefaultEnabled = true;
|
|
11357
11358
|
}
|
|
11358
11359
|
getPath() {
|
|
11359
11360
|
return "/customers/addresses";
|
|
11360
11361
|
}
|
|
11361
|
-
parseResponse(data, rawResponse) {
|
|
11362
|
-
const customerAddresses = external_exports.array(customerAddressSchema).parse(data);
|
|
11363
|
-
return this.validateOutput({
|
|
11364
|
-
data: customerAddresses,
|
|
11365
|
-
pagination: responseToPagination(rawResponse)
|
|
11366
|
-
});
|
|
11367
|
-
}
|
|
11368
11362
|
};
|
|
11369
11363
|
|
|
11370
11364
|
// src/requests/customer-addresses/GetCustomerAddressesForCustomer.ts
|
|
@@ -11386,14 +11380,13 @@ var GetCustomerAddressesForCustomer = class extends AbstractApiRequest5 {
|
|
|
11386
11380
|
this.outputSchema = getCustomerAddressesForCustomerResponseSchema;
|
|
11387
11381
|
this.querySchema = getCustomerAddressesForCustomerQuerySchema;
|
|
11388
11382
|
this.headersSchema = void 0;
|
|
11383
|
+
this.listItemSchema = customerAddressSchema;
|
|
11384
|
+
this.paginationDefaultEnabled = false;
|
|
11389
11385
|
this.customerId = customerId;
|
|
11390
11386
|
}
|
|
11391
11387
|
getPath() {
|
|
11392
11388
|
return `/customers/${this.customerId}/addresses`;
|
|
11393
11389
|
}
|
|
11394
|
-
parseResponse(data) {
|
|
11395
|
-
return external_exports.array(customerAddressSchema).parse(data);
|
|
11396
|
-
}
|
|
11397
11390
|
};
|
|
11398
11391
|
|
|
11399
11392
|
// src/requests/customer-addresses/UpdateCustomerAddress.ts
|
|
@@ -11484,7 +11477,6 @@ var GetCustomerBusinessProfileDetails = class extends AbstractApiRequest9 {
|
|
|
11484
11477
|
import { AbstractApiRequest as AbstractApiRequest10 } from "@deliverart/sdk-js-core";
|
|
11485
11478
|
import {
|
|
11486
11479
|
createPaginatedSchema as createPaginatedSchema2,
|
|
11487
|
-
responseToPagination as responseToPagination2,
|
|
11488
11480
|
sortDirSchema as sortDirSchema4,
|
|
11489
11481
|
timestampsFilterSchema as timestampsFilterSchema4
|
|
11490
11482
|
} from "@deliverart/sdk-js-global-types";
|
|
@@ -11511,17 +11503,12 @@ var GetCustomerBusinessProfiles = class extends AbstractApiRequest10 {
|
|
|
11511
11503
|
this.outputSchema = getCustomerBusinessProfilesResponseSchema;
|
|
11512
11504
|
this.querySchema = getCustomerBusinessProfilesQuerySchema;
|
|
11513
11505
|
this.headersSchema = void 0;
|
|
11506
|
+
this.listItemSchema = customerBusinessProfileSchema;
|
|
11507
|
+
this.paginationDefaultEnabled = true;
|
|
11514
11508
|
}
|
|
11515
11509
|
getPath() {
|
|
11516
11510
|
return "/customers/business_profiles";
|
|
11517
11511
|
}
|
|
11518
|
-
parseResponse(data, rawResponse) {
|
|
11519
|
-
const customerBusinessProfiles = external_exports.array(customerBusinessProfileSchema).parse(data);
|
|
11520
|
-
return this.validateOutput({
|
|
11521
|
-
data: customerBusinessProfiles,
|
|
11522
|
-
pagination: responseToPagination2(rawResponse)
|
|
11523
|
-
});
|
|
11524
|
-
}
|
|
11525
11512
|
};
|
|
11526
11513
|
|
|
11527
11514
|
// src/requests/customer-business-profiles/GetCustomerBusinessProfilesForCustomer.ts
|
|
@@ -11549,14 +11536,13 @@ var GetCustomerBusinessProfilesForCustomer = class extends AbstractApiRequest11
|
|
|
11549
11536
|
this.outputSchema = getCustomerBusinessProfilesForCustomerResponseSchema;
|
|
11550
11537
|
this.querySchema = getCustomerBusinessProfilesForCustomerQuerySchema;
|
|
11551
11538
|
this.headersSchema = void 0;
|
|
11539
|
+
this.listItemSchema = customerBusinessProfileSchema;
|
|
11540
|
+
this.paginationDefaultEnabled = false;
|
|
11552
11541
|
this.customerId = customerId;
|
|
11553
11542
|
}
|
|
11554
11543
|
getPath() {
|
|
11555
11544
|
return `/customers/${this.customerId}/business_profiles`;
|
|
11556
11545
|
}
|
|
11557
|
-
parseResponse(data) {
|
|
11558
|
-
return external_exports.array(customerBusinessProfileSchema).parse(data);
|
|
11559
|
-
}
|
|
11560
11546
|
};
|
|
11561
11547
|
|
|
11562
11548
|
// src/requests/customer-business-profiles/UpdateCustomerBusinessProfile.ts
|
|
@@ -11645,10 +11631,7 @@ var GetCustomerDetails = class extends AbstractApiRequest15 {
|
|
|
11645
11631
|
|
|
11646
11632
|
// src/requests/customers/GetCustomers.ts
|
|
11647
11633
|
import { AbstractApiRequest as AbstractApiRequest16 } from "@deliverart/sdk-js-core";
|
|
11648
|
-
import {
|
|
11649
|
-
createPaginatedSchema as createPaginatedSchema3,
|
|
11650
|
-
responseToPagination as responseToPagination3
|
|
11651
|
-
} from "@deliverart/sdk-js-global-types";
|
|
11634
|
+
import { createPaginatedSchema as createPaginatedSchema3 } from "@deliverart/sdk-js-global-types";
|
|
11652
11635
|
var getCustomersQuerySchema = customersQuerySchema;
|
|
11653
11636
|
var getCustomersInputSchema = external_exports.undefined();
|
|
11654
11637
|
var getCustomersResponseSchema = createPaginatedSchema3(customerSchema);
|
|
@@ -11662,22 +11645,18 @@ var GetCustomers = class extends AbstractApiRequest16 {
|
|
|
11662
11645
|
this.outputSchema = getCustomersResponseSchema;
|
|
11663
11646
|
this.querySchema = getCustomersQuerySchema;
|
|
11664
11647
|
this.headersSchema = void 0;
|
|
11648
|
+
// Declare list behavior
|
|
11649
|
+
this.listItemSchema = customerSchema;
|
|
11650
|
+
this.paginationDefaultEnabled = true;
|
|
11665
11651
|
}
|
|
11666
11652
|
getPath() {
|
|
11667
11653
|
return "/customers";
|
|
11668
11654
|
}
|
|
11669
|
-
parseResponse(data, rawResponse) {
|
|
11670
|
-
const customers = external_exports.array(customerSchema).parse(data);
|
|
11671
|
-
return this.validateOutput({ data: customers, pagination: responseToPagination3(rawResponse) });
|
|
11672
|
-
}
|
|
11673
11655
|
};
|
|
11674
11656
|
|
|
11675
11657
|
// src/requests/customers/GetCustomersFromPointOfSale.ts
|
|
11676
11658
|
import { AbstractApiRequest as AbstractApiRequest17 } from "@deliverart/sdk-js-core";
|
|
11677
|
-
import {
|
|
11678
|
-
createPaginatedSchema as createPaginatedSchema4,
|
|
11679
|
-
responseToPagination as responseToPagination4
|
|
11680
|
-
} from "@deliverart/sdk-js-global-types";
|
|
11659
|
+
import { createPaginatedSchema as createPaginatedSchema4 } from "@deliverart/sdk-js-global-types";
|
|
11681
11660
|
var getCustomersFromPointOfSaleQuerySchema = customersQuerySchema;
|
|
11682
11661
|
var getCustomersFromPointOfSaleInputSchema = external_exports.undefined();
|
|
11683
11662
|
var getCustomersFromPointOfSaleResponseSchema = createPaginatedSchema4(customerSchema);
|
|
@@ -11691,15 +11670,14 @@ var GetCustomersFromPointOfSale = class extends AbstractApiRequest17 {
|
|
|
11691
11670
|
this.outputSchema = getCustomersFromPointOfSaleResponseSchema;
|
|
11692
11671
|
this.querySchema = getCustomersFromPointOfSaleQuerySchema;
|
|
11693
11672
|
this.headersSchema = void 0;
|
|
11673
|
+
// Declare list behavior
|
|
11674
|
+
this.listItemSchema = customerSchema;
|
|
11675
|
+
this.paginationDefaultEnabled = true;
|
|
11694
11676
|
this.pointOfSaleId = pointOfSaleId;
|
|
11695
11677
|
}
|
|
11696
11678
|
getPath() {
|
|
11697
11679
|
return `/point_of_sales/${this.pointOfSaleId}/customers`;
|
|
11698
11680
|
}
|
|
11699
|
-
parseResponse(data, rawResponse) {
|
|
11700
|
-
const customers = external_exports.array(customerSchema).parse(data);
|
|
11701
|
-
return this.validateOutput({ data: customers, pagination: responseToPagination4(rawResponse) });
|
|
11702
|
-
}
|
|
11703
11681
|
};
|
|
11704
11682
|
|
|
11705
11683
|
// src/requests/customers/UpdateCustomer.ts
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deliverart/sdk-js-customer",
|
|
3
3
|
"description": "Deliverart JavaScript SDK for Customer and CustomerAddress Management",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@deliverart/sdk-js-
|
|
22
|
-
"@deliverart/sdk-js-
|
|
23
|
-
"@deliverart/sdk-js-
|
|
24
|
-
"@deliverart/sdk-js-user": "2.
|
|
21
|
+
"@deliverart/sdk-js-global-types": "2.6.0",
|
|
22
|
+
"@deliverart/sdk-js-point-of-sale": "2.6.0",
|
|
23
|
+
"@deliverart/sdk-js-core": "2.6.0",
|
|
24
|
+
"@deliverart/sdk-js-user": "2.6.0"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|