@deliverart/sdk-js-customer 2.22.1 → 2.23.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -1
- package/dist/index.cjs +36 -10
- package/dist/index.d.cts +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +33 -10
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -45,6 +45,31 @@ const customer = await sdk.call(new CreateCustomer({
|
|
|
45
45
|
- `phoneNumber: string` (required) - Phone number
|
|
46
46
|
- `company?: string` (optional) - Company IRI
|
|
47
47
|
|
|
48
|
+
#### CreateCustomerFromCurrentUser
|
|
49
|
+
```typescript
|
|
50
|
+
import { CreateCustomerFromCurrentUser } from '@deliverart/sdk-js-customer';
|
|
51
|
+
|
|
52
|
+
const customer = await sdk.call(new CreateCustomerFromCurrentUser({
|
|
53
|
+
pointOfSale: '/point_of_sales/123',
|
|
54
|
+
firstName: 'John',
|
|
55
|
+
lastName: 'Doe',
|
|
56
|
+
email: 'john@example.com',
|
|
57
|
+
phoneNumber: null
|
|
58
|
+
}));
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Creates or returns the POS-scoped customer relationship for the authenticated
|
|
62
|
+
consumer user. This is the ecommerce account flow: the Deliverart user remains
|
|
63
|
+
global, while each seller still gets a reliable local `Customer` profile for
|
|
64
|
+
CRM, addresses, stats, and order history.
|
|
65
|
+
|
|
66
|
+
**Input Parameters:**
|
|
67
|
+
- `pointOfSale: string` (required) - Point of sale IRI
|
|
68
|
+
- `firstName: string | null` (required) - First name fallback for the customer profile
|
|
69
|
+
- `lastName: string | null` (required) - Last name fallback for the customer profile
|
|
70
|
+
- `email: string | null` (required) - Email fallback for the customer profile
|
|
71
|
+
- `phoneNumber: string | null` (required) - Phone fallback for the customer profile
|
|
72
|
+
|
|
48
73
|
#### GetCustomers
|
|
49
74
|
```typescript
|
|
50
75
|
import { GetCustomers } from '@deliverart/sdk-js-customer';
|
|
@@ -275,4 +300,3 @@ async function customerWorkflow() {
|
|
|
275
300
|
## License
|
|
276
301
|
|
|
277
302
|
MIT
|
|
278
|
-
|
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,7 @@ __export(index_exports, {
|
|
|
23
23
|
CreateCustomer: () => CreateCustomer,
|
|
24
24
|
CreateCustomerAddress: () => CreateCustomerAddress,
|
|
25
25
|
CreateCustomerBusinessProfile: () => CreateCustomerBusinessProfile,
|
|
26
|
+
CreateCustomerFromCurrentUser: () => CreateCustomerFromCurrentUser,
|
|
26
27
|
DeleteCustomer: () => DeleteCustomer,
|
|
27
28
|
DeleteCustomerAddress: () => DeleteCustomerAddress,
|
|
28
29
|
DeleteCustomerBusinessProfile: () => DeleteCustomerBusinessProfile,
|
|
@@ -42,6 +43,8 @@ __export(index_exports, {
|
|
|
42
43
|
createCustomerAddressResponseSchema: () => createCustomerAddressResponseSchema,
|
|
43
44
|
createCustomerBusinessProfileInputSchema: () => createCustomerBusinessProfileInputSchema,
|
|
44
45
|
createCustomerBusinessProfileResponseSchema: () => createCustomerBusinessProfileResponseSchema,
|
|
46
|
+
createCustomerFromCurrentUserInputSchema: () => createCustomerFromCurrentUserInputSchema,
|
|
47
|
+
createCustomerFromCurrentUserResponseSchema: () => createCustomerFromCurrentUserResponseSchema,
|
|
45
48
|
createCustomerInputSchema: () => createCustomerInputSchema,
|
|
46
49
|
createCustomerResponseSchema: () => createCustomerResponseSchema,
|
|
47
50
|
customerAddressDetailsSchema: () => customerAddressDetailsSchema,
|
|
@@ -14298,12 +14301,32 @@ var CreateCustomer = class extends import_sdk_js_core13.AbstractApiRequest {
|
|
|
14298
14301
|
}
|
|
14299
14302
|
};
|
|
14300
14303
|
|
|
14301
|
-
// src/requests/customers/
|
|
14304
|
+
// src/requests/customers/CreateCustomerFromCurrentUser.ts
|
|
14302
14305
|
var import_sdk_js_core14 = require("@deliverart/sdk-js-core");
|
|
14306
|
+
var createCustomerFromCurrentUserInputSchema = writableCreateCustomerSchema.required();
|
|
14307
|
+
var createCustomerFromCurrentUserResponseSchema = customerDetailsSchema;
|
|
14308
|
+
var CreateCustomerFromCurrentUser = class extends import_sdk_js_core14.AbstractApiRequest {
|
|
14309
|
+
constructor(input) {
|
|
14310
|
+
super(input);
|
|
14311
|
+
this.method = "POST";
|
|
14312
|
+
this.contentType = "application/json";
|
|
14313
|
+
this.accept = "application/json";
|
|
14314
|
+
this.inputSchema = createCustomerFromCurrentUserInputSchema;
|
|
14315
|
+
this.outputSchema = createCustomerFromCurrentUserResponseSchema;
|
|
14316
|
+
this.querySchema = void 0;
|
|
14317
|
+
this.headersSchema = void 0;
|
|
14318
|
+
}
|
|
14319
|
+
getPath() {
|
|
14320
|
+
return "/customers/from/me";
|
|
14321
|
+
}
|
|
14322
|
+
};
|
|
14323
|
+
|
|
14324
|
+
// src/requests/customers/DeleteCustomer.ts
|
|
14325
|
+
var import_sdk_js_core15 = require("@deliverart/sdk-js-core");
|
|
14303
14326
|
var import_sdk_js_global_types9 = require("@deliverart/sdk-js-global-types");
|
|
14304
14327
|
var deleteCustomerInputSchema = external_exports.undefined();
|
|
14305
14328
|
var deleteCustomerResponseSchema = import_sdk_js_global_types9.emptyResponseSchema;
|
|
14306
|
-
var DeleteCustomer = class extends
|
|
14329
|
+
var DeleteCustomer = class extends import_sdk_js_core15.AbstractApiRequest {
|
|
14307
14330
|
constructor(customerId) {
|
|
14308
14331
|
super(void 0);
|
|
14309
14332
|
this.method = "DELETE";
|
|
@@ -14321,10 +14344,10 @@ var DeleteCustomer = class extends import_sdk_js_core14.AbstractApiRequest {
|
|
|
14321
14344
|
};
|
|
14322
14345
|
|
|
14323
14346
|
// src/requests/customers/GetCustomerDetails.ts
|
|
14324
|
-
var
|
|
14347
|
+
var import_sdk_js_core16 = require("@deliverart/sdk-js-core");
|
|
14325
14348
|
var getCustomerDetailsInputSchema = external_exports.undefined();
|
|
14326
14349
|
var getCustomerDetailsResponseSchema = customerDetailsSchema;
|
|
14327
|
-
var GetCustomerDetails = class extends
|
|
14350
|
+
var GetCustomerDetails = class extends import_sdk_js_core16.AbstractApiRequest {
|
|
14328
14351
|
constructor(customerId) {
|
|
14329
14352
|
super(void 0);
|
|
14330
14353
|
this.method = "GET";
|
|
@@ -14342,12 +14365,12 @@ var GetCustomerDetails = class extends import_sdk_js_core15.AbstractApiRequest {
|
|
|
14342
14365
|
};
|
|
14343
14366
|
|
|
14344
14367
|
// src/requests/customers/GetCustomers.ts
|
|
14345
|
-
var
|
|
14368
|
+
var import_sdk_js_core17 = require("@deliverart/sdk-js-core");
|
|
14346
14369
|
var import_sdk_js_global_types10 = require("@deliverart/sdk-js-global-types");
|
|
14347
14370
|
var getCustomersQuerySchema = customersQuerySchema;
|
|
14348
14371
|
var getCustomersInputSchema = external_exports.undefined();
|
|
14349
14372
|
var getCustomersResponseSchema = (0, import_sdk_js_global_types10.createPaginatedSchema)(customerSchema);
|
|
14350
|
-
var GetCustomers = class extends
|
|
14373
|
+
var GetCustomers = class extends import_sdk_js_core17.AbstractApiRequest {
|
|
14351
14374
|
constructor(options) {
|
|
14352
14375
|
super(void 0, options);
|
|
14353
14376
|
this.method = "GET";
|
|
@@ -14367,12 +14390,12 @@ var GetCustomers = class extends import_sdk_js_core16.AbstractApiRequest {
|
|
|
14367
14390
|
};
|
|
14368
14391
|
|
|
14369
14392
|
// src/requests/customers/GetCustomersFromPointOfSale.ts
|
|
14370
|
-
var
|
|
14393
|
+
var import_sdk_js_core18 = require("@deliverart/sdk-js-core");
|
|
14371
14394
|
var import_sdk_js_global_types11 = require("@deliverart/sdk-js-global-types");
|
|
14372
14395
|
var getCustomersFromPointOfSaleQuerySchema = customersQuerySchema;
|
|
14373
14396
|
var getCustomersFromPointOfSaleInputSchema = external_exports.undefined();
|
|
14374
14397
|
var getCustomersFromPointOfSaleResponseSchema = (0, import_sdk_js_global_types11.createPaginatedSchema)(customerSchema);
|
|
14375
|
-
var GetCustomersFromPointOfSale = class extends
|
|
14398
|
+
var GetCustomersFromPointOfSale = class extends import_sdk_js_core18.AbstractApiRequest {
|
|
14376
14399
|
constructor(pointOfSaleId, options) {
|
|
14377
14400
|
super(void 0, options);
|
|
14378
14401
|
this.method = "GET";
|
|
@@ -14393,10 +14416,10 @@ var GetCustomersFromPointOfSale = class extends import_sdk_js_core17.AbstractApi
|
|
|
14393
14416
|
};
|
|
14394
14417
|
|
|
14395
14418
|
// src/requests/customers/UpdateCustomer.ts
|
|
14396
|
-
var
|
|
14419
|
+
var import_sdk_js_core19 = require("@deliverart/sdk-js-core");
|
|
14397
14420
|
var updateCustomerInputSchema = writableCustomerSchema.partial();
|
|
14398
14421
|
var updateCustomerResponseSchema = customerDetailsSchema;
|
|
14399
|
-
var UpdateCustomer = class extends
|
|
14422
|
+
var UpdateCustomer = class extends import_sdk_js_core19.AbstractApiRequest {
|
|
14400
14423
|
constructor(customerId, input) {
|
|
14401
14424
|
super(input);
|
|
14402
14425
|
this.method = "PATCH";
|
|
@@ -14417,6 +14440,7 @@ var UpdateCustomer = class extends import_sdk_js_core18.AbstractApiRequest {
|
|
|
14417
14440
|
CreateCustomer,
|
|
14418
14441
|
CreateCustomerAddress,
|
|
14419
14442
|
CreateCustomerBusinessProfile,
|
|
14443
|
+
CreateCustomerFromCurrentUser,
|
|
14420
14444
|
DeleteCustomer,
|
|
14421
14445
|
DeleteCustomerAddress,
|
|
14422
14446
|
DeleteCustomerBusinessProfile,
|
|
@@ -14436,6 +14460,8 @@ var UpdateCustomer = class extends import_sdk_js_core18.AbstractApiRequest {
|
|
|
14436
14460
|
createCustomerAddressResponseSchema,
|
|
14437
14461
|
createCustomerBusinessProfileInputSchema,
|
|
14438
14462
|
createCustomerBusinessProfileResponseSchema,
|
|
14463
|
+
createCustomerFromCurrentUserInputSchema,
|
|
14464
|
+
createCustomerFromCurrentUserResponseSchema,
|
|
14439
14465
|
createCustomerInputSchema,
|
|
14440
14466
|
createCustomerResponseSchema,
|
|
14441
14467
|
customerAddressDetailsSchema,
|
package/dist/index.d.cts
CHANGED
|
@@ -1256,6 +1256,66 @@ declare class CreateCustomer extends AbstractApiRequest<typeof createCustomerInp
|
|
|
1256
1256
|
getPath(): string;
|
|
1257
1257
|
}
|
|
1258
1258
|
|
|
1259
|
+
declare const createCustomerFromCurrentUserInputSchema: z.ZodObject<{
|
|
1260
|
+
pointOfSale: z.ZodNonOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown>>>;
|
|
1261
|
+
firstName: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1262
|
+
lastName: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1263
|
+
email: z.ZodNonOptional<z.ZodNullable<z.ZodEmail>>;
|
|
1264
|
+
phoneNumber: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1265
|
+
}, z.core.$strip>;
|
|
1266
|
+
type CreateCustomerFromCurrentUserInput = z.input<typeof createCustomerFromCurrentUserInputSchema>;
|
|
1267
|
+
declare const createCustomerFromCurrentUserResponseSchema: z.ZodObject<{
|
|
1268
|
+
id: z.ZodString;
|
|
1269
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
1270
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
1271
|
+
email: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
|
|
1272
|
+
phoneNumber: z.ZodNullable<z.ZodString>;
|
|
1273
|
+
hasBusinessProfiles: z.ZodBoolean;
|
|
1274
|
+
hasAddresses: z.ZodBoolean;
|
|
1275
|
+
ordersPlaced: z.ZodCoercedNumber<unknown>;
|
|
1276
|
+
totalSpent: z.ZodString;
|
|
1277
|
+
createdAt: z.ZodString;
|
|
1278
|
+
updatedAt: z.ZodString;
|
|
1279
|
+
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown>>;
|
|
1280
|
+
owner: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/users/:id"> | null, unknown>>;
|
|
1281
|
+
addresses: z.ZodArray<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/address/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/customers/address/:id">, unknown>>>;
|
|
1282
|
+
businessProfiles: z.ZodArray<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id">, unknown>>>;
|
|
1283
|
+
}, z.core.$strip>;
|
|
1284
|
+
type CreateCustomerFromCurrentUserResponse = z.output<typeof createCustomerFromCurrentUserResponseSchema>;
|
|
1285
|
+
declare class CreateCustomerFromCurrentUser extends AbstractApiRequest<typeof createCustomerFromCurrentUserInputSchema, typeof createCustomerFromCurrentUserResponseSchema> {
|
|
1286
|
+
readonly method = "POST";
|
|
1287
|
+
readonly contentType = "application/json";
|
|
1288
|
+
readonly accept = "application/json";
|
|
1289
|
+
readonly inputSchema: z.ZodObject<{
|
|
1290
|
+
pointOfSale: z.ZodNonOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown>>>;
|
|
1291
|
+
firstName: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1292
|
+
lastName: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1293
|
+
email: z.ZodNonOptional<z.ZodNullable<z.ZodEmail>>;
|
|
1294
|
+
phoneNumber: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1295
|
+
}, z.core.$strip>;
|
|
1296
|
+
readonly outputSchema: z.ZodObject<{
|
|
1297
|
+
id: z.ZodString;
|
|
1298
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
1299
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
1300
|
+
email: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
|
|
1301
|
+
phoneNumber: z.ZodNullable<z.ZodString>;
|
|
1302
|
+
hasBusinessProfiles: z.ZodBoolean;
|
|
1303
|
+
hasAddresses: z.ZodBoolean;
|
|
1304
|
+
ordersPlaced: z.ZodCoercedNumber<unknown>;
|
|
1305
|
+
totalSpent: z.ZodString;
|
|
1306
|
+
createdAt: z.ZodString;
|
|
1307
|
+
updatedAt: z.ZodString;
|
|
1308
|
+
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown>>;
|
|
1309
|
+
owner: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/users/:id"> | null, unknown>>;
|
|
1310
|
+
addresses: z.ZodArray<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/address/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/customers/address/:id">, unknown>>>;
|
|
1311
|
+
businessProfiles: z.ZodArray<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id">, unknown>>>;
|
|
1312
|
+
}, z.core.$strip>;
|
|
1313
|
+
readonly querySchema: undefined;
|
|
1314
|
+
readonly headersSchema: undefined;
|
|
1315
|
+
constructor(input: CreateCustomerFromCurrentUserInput);
|
|
1316
|
+
getPath(): string;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1259
1319
|
declare const deleteCustomerInputSchema: z.ZodUndefined;
|
|
1260
1320
|
declare const deleteCustomerResponseSchema: z.ZodUnion<readonly [z.ZodVoid, z.ZodUndefined, z.ZodNull]>;
|
|
1261
1321
|
declare class DeleteCustomer extends AbstractApiRequest<typeof deleteCustomerInputSchema, typeof deleteCustomerResponseSchema> {
|
|
@@ -1717,4 +1777,4 @@ type CustomerBusinessProfileIri = z.infer<typeof customerBusinessProfileIriSchem
|
|
|
1717
1777
|
declare const customerBusinessProfileNullableIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id"> | null, unknown>>;
|
|
1718
1778
|
type CustomerBusinessProfileNullableIri = z.infer<typeof customerBusinessProfileNullableIriSchema>;
|
|
1719
1779
|
|
|
1720
|
-
export { CreateCustomer, CreateCustomerAddress, type CreateCustomerAddressInput, type CreateCustomerAddressResponse, CreateCustomerBusinessProfile, type CreateCustomerBusinessProfileInput, type CreateCustomerBusinessProfileResponse, type CreateCustomerInput, type CreateCustomerResponse, type Customer, type CustomerAddress, type CustomerAddressDetails, type CustomerAddressIri, type CustomerAddressNullableIri, type CustomerBusinessProfile, type CustomerBusinessProfileDetails, type CustomerBusinessProfileIri, type CustomerBusinessProfileNullableIri, type CustomerDetails, type CustomerIri, type CustomerNullableIri, type CustomersQueryParams, DeleteCustomer, DeleteCustomerAddress, DeleteCustomerBusinessProfile, GetCustomerAddressDetails, type GetCustomerAddressDetailsInput, type GetCustomerAddressDetailsResponse, GetCustomerAddresses, GetCustomerAddressesForCustomer, type GetCustomerAddressesForCustomerInput, type GetCustomerAddressesForCustomerQueryParams, type GetCustomerAddressesForCustomerResponse, type GetCustomerAddressesInput, type GetCustomerAddressesQueryParams, type GetCustomerAddressesResponse, GetCustomerBusinessProfileDetails, type GetCustomerBusinessProfileDetailsInput, type GetCustomerBusinessProfileDetailsResponse, GetCustomerBusinessProfiles, GetCustomerBusinessProfilesForCustomer, type GetCustomerBusinessProfilesForCustomerInput, type GetCustomerBusinessProfilesForCustomerQueryParams, type GetCustomerBusinessProfilesForCustomerResponse, type GetCustomerBusinessProfilesInput, type GetCustomerBusinessProfilesQueryParams, type GetCustomerBusinessProfilesResponse, GetCustomerDetails, type GetCustomerDetailsInput, type GetCustomerDetailsResponse, GetCustomers, GetCustomersFromPointOfSale, type GetCustomersFromPointOfSaleInput, type GetCustomersFromPointOfSaleQueryParams, type GetCustomersFromPointOfSaleResponse, type GetCustomersInput, type GetCustomersQueryParams, type GetCustomersResponse, UpdateCustomer, UpdateCustomerAddress, type UpdateCustomerAddressInput, type UpdateCustomerAddressResponse, UpdateCustomerBusinessProfile, type UpdateCustomerBusinessProfileInput, type UpdateCustomerBusinessProfileResponse, type UpdateCustomerInput, type UpdateCustomerResponse, type WritableCreateCustomer, type WritableCreateCustomerAddress, type WritableCustomer, type WritableCustomerAddress, createCustomerAddressInputSchema, createCustomerAddressResponseSchema, createCustomerBusinessProfileInputSchema, createCustomerBusinessProfileResponseSchema, createCustomerInputSchema, createCustomerResponseSchema, customerAddressDetailsSchema, customerAddressIriSchema, customerAddressNullableIriSchema, customerAddressSchema, customerBusinessProfileDetailsSchema, customerBusinessProfileIriSchema, customerBusinessProfileNullableIriSchema, customerBusinessProfileSchema, customerDetailsSchema, customerIriSchema, customerNullableIriSchema, customerSchema, customersQuerySchema, deleteCustomerAddressInputSchema, deleteCustomerAddressResponseSchema, deleteCustomerBusinessProfileInputSchema, deleteCustomerBusinessProfileResponseSchema, deleteCustomerInputSchema, deleteCustomerResponseSchema, getCustomerAddressDetailsInputSchema, getCustomerAddressDetailsResponseSchema, getCustomerAddressesForCustomerInputSchema, getCustomerAddressesForCustomerQuerySchema, getCustomerAddressesForCustomerResponseSchema, getCustomerAddressesInputSchema, getCustomerAddressesQuerySchema, getCustomerAddressesResponseSchema, getCustomerBusinessProfileDetailsInputSchema, getCustomerBusinessProfileDetailsResponseSchema, getCustomerBusinessProfilesForCustomerInputSchema, getCustomerBusinessProfilesForCustomerQuerySchema, getCustomerBusinessProfilesForCustomerResponseSchema, getCustomerBusinessProfilesInputSchema, getCustomerBusinessProfilesQuerySchema, getCustomerBusinessProfilesResponseSchema, getCustomerDetailsInputSchema, getCustomerDetailsResponseSchema, getCustomersFromPointOfSaleInputSchema, getCustomersFromPointOfSaleQuerySchema, getCustomersFromPointOfSaleResponseSchema, getCustomersInputSchema, getCustomersQuerySchema, getCustomersResponseSchema, updateCustomerAddressInputSchema, updateCustomerAddressResponseSchema, updateCustomerBusinessProfileInputSchema, updateCustomerBusinessProfileResponseSchema, updateCustomerInputSchema, updateCustomerResponseSchema, writableCreateCustomerAddressSchema, writableCreateCustomerBusinessProfileSchema, writableCreateCustomerSchema, writableCustomerAddressSchema, writableCustomerBusinessProfileSchema, writableCustomerSchema };
|
|
1780
|
+
export { CreateCustomer, CreateCustomerAddress, type CreateCustomerAddressInput, type CreateCustomerAddressResponse, CreateCustomerBusinessProfile, type CreateCustomerBusinessProfileInput, type CreateCustomerBusinessProfileResponse, CreateCustomerFromCurrentUser, type CreateCustomerFromCurrentUserInput, type CreateCustomerFromCurrentUserResponse, type CreateCustomerInput, type CreateCustomerResponse, type Customer, type CustomerAddress, type CustomerAddressDetails, type CustomerAddressIri, type CustomerAddressNullableIri, type CustomerBusinessProfile, type CustomerBusinessProfileDetails, type CustomerBusinessProfileIri, type CustomerBusinessProfileNullableIri, type CustomerDetails, type CustomerIri, type CustomerNullableIri, type CustomersQueryParams, DeleteCustomer, DeleteCustomerAddress, DeleteCustomerBusinessProfile, GetCustomerAddressDetails, type GetCustomerAddressDetailsInput, type GetCustomerAddressDetailsResponse, GetCustomerAddresses, GetCustomerAddressesForCustomer, type GetCustomerAddressesForCustomerInput, type GetCustomerAddressesForCustomerQueryParams, type GetCustomerAddressesForCustomerResponse, type GetCustomerAddressesInput, type GetCustomerAddressesQueryParams, type GetCustomerAddressesResponse, GetCustomerBusinessProfileDetails, type GetCustomerBusinessProfileDetailsInput, type GetCustomerBusinessProfileDetailsResponse, GetCustomerBusinessProfiles, GetCustomerBusinessProfilesForCustomer, type GetCustomerBusinessProfilesForCustomerInput, type GetCustomerBusinessProfilesForCustomerQueryParams, type GetCustomerBusinessProfilesForCustomerResponse, type GetCustomerBusinessProfilesInput, type GetCustomerBusinessProfilesQueryParams, type GetCustomerBusinessProfilesResponse, GetCustomerDetails, type GetCustomerDetailsInput, type GetCustomerDetailsResponse, GetCustomers, GetCustomersFromPointOfSale, type GetCustomersFromPointOfSaleInput, type GetCustomersFromPointOfSaleQueryParams, type GetCustomersFromPointOfSaleResponse, type GetCustomersInput, type GetCustomersQueryParams, type GetCustomersResponse, UpdateCustomer, UpdateCustomerAddress, type UpdateCustomerAddressInput, type UpdateCustomerAddressResponse, UpdateCustomerBusinessProfile, type UpdateCustomerBusinessProfileInput, type UpdateCustomerBusinessProfileResponse, type UpdateCustomerInput, type UpdateCustomerResponse, type WritableCreateCustomer, type WritableCreateCustomerAddress, type WritableCustomer, type WritableCustomerAddress, createCustomerAddressInputSchema, createCustomerAddressResponseSchema, createCustomerBusinessProfileInputSchema, createCustomerBusinessProfileResponseSchema, createCustomerFromCurrentUserInputSchema, createCustomerFromCurrentUserResponseSchema, createCustomerInputSchema, createCustomerResponseSchema, customerAddressDetailsSchema, customerAddressIriSchema, customerAddressNullableIriSchema, customerAddressSchema, customerBusinessProfileDetailsSchema, customerBusinessProfileIriSchema, customerBusinessProfileNullableIriSchema, customerBusinessProfileSchema, customerDetailsSchema, customerIriSchema, customerNullableIriSchema, customerSchema, customersQuerySchema, deleteCustomerAddressInputSchema, deleteCustomerAddressResponseSchema, deleteCustomerBusinessProfileInputSchema, deleteCustomerBusinessProfileResponseSchema, deleteCustomerInputSchema, deleteCustomerResponseSchema, getCustomerAddressDetailsInputSchema, getCustomerAddressDetailsResponseSchema, getCustomerAddressesForCustomerInputSchema, getCustomerAddressesForCustomerQuerySchema, getCustomerAddressesForCustomerResponseSchema, getCustomerAddressesInputSchema, getCustomerAddressesQuerySchema, getCustomerAddressesResponseSchema, getCustomerBusinessProfileDetailsInputSchema, getCustomerBusinessProfileDetailsResponseSchema, getCustomerBusinessProfilesForCustomerInputSchema, getCustomerBusinessProfilesForCustomerQuerySchema, getCustomerBusinessProfilesForCustomerResponseSchema, getCustomerBusinessProfilesInputSchema, getCustomerBusinessProfilesQuerySchema, getCustomerBusinessProfilesResponseSchema, getCustomerDetailsInputSchema, getCustomerDetailsResponseSchema, getCustomersFromPointOfSaleInputSchema, getCustomersFromPointOfSaleQuerySchema, getCustomersFromPointOfSaleResponseSchema, getCustomersInputSchema, getCustomersQuerySchema, getCustomersResponseSchema, updateCustomerAddressInputSchema, updateCustomerAddressResponseSchema, updateCustomerBusinessProfileInputSchema, updateCustomerBusinessProfileResponseSchema, updateCustomerInputSchema, updateCustomerResponseSchema, writableCreateCustomerAddressSchema, writableCreateCustomerBusinessProfileSchema, writableCreateCustomerSchema, writableCustomerAddressSchema, writableCustomerBusinessProfileSchema, writableCustomerSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -1256,6 +1256,66 @@ declare class CreateCustomer extends AbstractApiRequest<typeof createCustomerInp
|
|
|
1256
1256
|
getPath(): string;
|
|
1257
1257
|
}
|
|
1258
1258
|
|
|
1259
|
+
declare const createCustomerFromCurrentUserInputSchema: z.ZodObject<{
|
|
1260
|
+
pointOfSale: z.ZodNonOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown>>>;
|
|
1261
|
+
firstName: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1262
|
+
lastName: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1263
|
+
email: z.ZodNonOptional<z.ZodNullable<z.ZodEmail>>;
|
|
1264
|
+
phoneNumber: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1265
|
+
}, z.core.$strip>;
|
|
1266
|
+
type CreateCustomerFromCurrentUserInput = z.input<typeof createCustomerFromCurrentUserInputSchema>;
|
|
1267
|
+
declare const createCustomerFromCurrentUserResponseSchema: z.ZodObject<{
|
|
1268
|
+
id: z.ZodString;
|
|
1269
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
1270
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
1271
|
+
email: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
|
|
1272
|
+
phoneNumber: z.ZodNullable<z.ZodString>;
|
|
1273
|
+
hasBusinessProfiles: z.ZodBoolean;
|
|
1274
|
+
hasAddresses: z.ZodBoolean;
|
|
1275
|
+
ordersPlaced: z.ZodCoercedNumber<unknown>;
|
|
1276
|
+
totalSpent: z.ZodString;
|
|
1277
|
+
createdAt: z.ZodString;
|
|
1278
|
+
updatedAt: z.ZodString;
|
|
1279
|
+
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown>>;
|
|
1280
|
+
owner: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/users/:id"> | null, unknown>>;
|
|
1281
|
+
addresses: z.ZodArray<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/address/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/customers/address/:id">, unknown>>>;
|
|
1282
|
+
businessProfiles: z.ZodArray<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id">, unknown>>>;
|
|
1283
|
+
}, z.core.$strip>;
|
|
1284
|
+
type CreateCustomerFromCurrentUserResponse = z.output<typeof createCustomerFromCurrentUserResponseSchema>;
|
|
1285
|
+
declare class CreateCustomerFromCurrentUser extends AbstractApiRequest<typeof createCustomerFromCurrentUserInputSchema, typeof createCustomerFromCurrentUserResponseSchema> {
|
|
1286
|
+
readonly method = "POST";
|
|
1287
|
+
readonly contentType = "application/json";
|
|
1288
|
+
readonly accept = "application/json";
|
|
1289
|
+
readonly inputSchema: z.ZodObject<{
|
|
1290
|
+
pointOfSale: z.ZodNonOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown>>>;
|
|
1291
|
+
firstName: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1292
|
+
lastName: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1293
|
+
email: z.ZodNonOptional<z.ZodNullable<z.ZodEmail>>;
|
|
1294
|
+
phoneNumber: z.ZodNonOptional<z.ZodNullable<z.ZodString>>;
|
|
1295
|
+
}, z.core.$strip>;
|
|
1296
|
+
readonly outputSchema: z.ZodObject<{
|
|
1297
|
+
id: z.ZodString;
|
|
1298
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
1299
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
1300
|
+
email: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNullable<z.ZodString>>;
|
|
1301
|
+
phoneNumber: z.ZodNullable<z.ZodString>;
|
|
1302
|
+
hasBusinessProfiles: z.ZodBoolean;
|
|
1303
|
+
hasAddresses: z.ZodBoolean;
|
|
1304
|
+
ordersPlaced: z.ZodCoercedNumber<unknown>;
|
|
1305
|
+
totalSpent: z.ZodString;
|
|
1306
|
+
createdAt: z.ZodString;
|
|
1307
|
+
updatedAt: z.ZodString;
|
|
1308
|
+
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown>>;
|
|
1309
|
+
owner: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/users/:id"> | null, unknown>>;
|
|
1310
|
+
addresses: z.ZodArray<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/address/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/customers/address/:id">, unknown>>>;
|
|
1311
|
+
businessProfiles: z.ZodArray<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id">, unknown>>>;
|
|
1312
|
+
}, z.core.$strip>;
|
|
1313
|
+
readonly querySchema: undefined;
|
|
1314
|
+
readonly headersSchema: undefined;
|
|
1315
|
+
constructor(input: CreateCustomerFromCurrentUserInput);
|
|
1316
|
+
getPath(): string;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1259
1319
|
declare const deleteCustomerInputSchema: z.ZodUndefined;
|
|
1260
1320
|
declare const deleteCustomerResponseSchema: z.ZodUnion<readonly [z.ZodVoid, z.ZodUndefined, z.ZodNull]>;
|
|
1261
1321
|
declare class DeleteCustomer extends AbstractApiRequest<typeof deleteCustomerInputSchema, typeof deleteCustomerResponseSchema> {
|
|
@@ -1717,4 +1777,4 @@ type CustomerBusinessProfileIri = z.infer<typeof customerBusinessProfileIriSchem
|
|
|
1717
1777
|
declare const customerBusinessProfileNullableIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/customers/business_profiles/:id"> | null, unknown>>;
|
|
1718
1778
|
type CustomerBusinessProfileNullableIri = z.infer<typeof customerBusinessProfileNullableIriSchema>;
|
|
1719
1779
|
|
|
1720
|
-
export { CreateCustomer, CreateCustomerAddress, type CreateCustomerAddressInput, type CreateCustomerAddressResponse, CreateCustomerBusinessProfile, type CreateCustomerBusinessProfileInput, type CreateCustomerBusinessProfileResponse, type CreateCustomerInput, type CreateCustomerResponse, type Customer, type CustomerAddress, type CustomerAddressDetails, type CustomerAddressIri, type CustomerAddressNullableIri, type CustomerBusinessProfile, type CustomerBusinessProfileDetails, type CustomerBusinessProfileIri, type CustomerBusinessProfileNullableIri, type CustomerDetails, type CustomerIri, type CustomerNullableIri, type CustomersQueryParams, DeleteCustomer, DeleteCustomerAddress, DeleteCustomerBusinessProfile, GetCustomerAddressDetails, type GetCustomerAddressDetailsInput, type GetCustomerAddressDetailsResponse, GetCustomerAddresses, GetCustomerAddressesForCustomer, type GetCustomerAddressesForCustomerInput, type GetCustomerAddressesForCustomerQueryParams, type GetCustomerAddressesForCustomerResponse, type GetCustomerAddressesInput, type GetCustomerAddressesQueryParams, type GetCustomerAddressesResponse, GetCustomerBusinessProfileDetails, type GetCustomerBusinessProfileDetailsInput, type GetCustomerBusinessProfileDetailsResponse, GetCustomerBusinessProfiles, GetCustomerBusinessProfilesForCustomer, type GetCustomerBusinessProfilesForCustomerInput, type GetCustomerBusinessProfilesForCustomerQueryParams, type GetCustomerBusinessProfilesForCustomerResponse, type GetCustomerBusinessProfilesInput, type GetCustomerBusinessProfilesQueryParams, type GetCustomerBusinessProfilesResponse, GetCustomerDetails, type GetCustomerDetailsInput, type GetCustomerDetailsResponse, GetCustomers, GetCustomersFromPointOfSale, type GetCustomersFromPointOfSaleInput, type GetCustomersFromPointOfSaleQueryParams, type GetCustomersFromPointOfSaleResponse, type GetCustomersInput, type GetCustomersQueryParams, type GetCustomersResponse, UpdateCustomer, UpdateCustomerAddress, type UpdateCustomerAddressInput, type UpdateCustomerAddressResponse, UpdateCustomerBusinessProfile, type UpdateCustomerBusinessProfileInput, type UpdateCustomerBusinessProfileResponse, type UpdateCustomerInput, type UpdateCustomerResponse, type WritableCreateCustomer, type WritableCreateCustomerAddress, type WritableCustomer, type WritableCustomerAddress, createCustomerAddressInputSchema, createCustomerAddressResponseSchema, createCustomerBusinessProfileInputSchema, createCustomerBusinessProfileResponseSchema, createCustomerInputSchema, createCustomerResponseSchema, customerAddressDetailsSchema, customerAddressIriSchema, customerAddressNullableIriSchema, customerAddressSchema, customerBusinessProfileDetailsSchema, customerBusinessProfileIriSchema, customerBusinessProfileNullableIriSchema, customerBusinessProfileSchema, customerDetailsSchema, customerIriSchema, customerNullableIriSchema, customerSchema, customersQuerySchema, deleteCustomerAddressInputSchema, deleteCustomerAddressResponseSchema, deleteCustomerBusinessProfileInputSchema, deleteCustomerBusinessProfileResponseSchema, deleteCustomerInputSchema, deleteCustomerResponseSchema, getCustomerAddressDetailsInputSchema, getCustomerAddressDetailsResponseSchema, getCustomerAddressesForCustomerInputSchema, getCustomerAddressesForCustomerQuerySchema, getCustomerAddressesForCustomerResponseSchema, getCustomerAddressesInputSchema, getCustomerAddressesQuerySchema, getCustomerAddressesResponseSchema, getCustomerBusinessProfileDetailsInputSchema, getCustomerBusinessProfileDetailsResponseSchema, getCustomerBusinessProfilesForCustomerInputSchema, getCustomerBusinessProfilesForCustomerQuerySchema, getCustomerBusinessProfilesForCustomerResponseSchema, getCustomerBusinessProfilesInputSchema, getCustomerBusinessProfilesQuerySchema, getCustomerBusinessProfilesResponseSchema, getCustomerDetailsInputSchema, getCustomerDetailsResponseSchema, getCustomersFromPointOfSaleInputSchema, getCustomersFromPointOfSaleQuerySchema, getCustomersFromPointOfSaleResponseSchema, getCustomersInputSchema, getCustomersQuerySchema, getCustomersResponseSchema, updateCustomerAddressInputSchema, updateCustomerAddressResponseSchema, updateCustomerBusinessProfileInputSchema, updateCustomerBusinessProfileResponseSchema, updateCustomerInputSchema, updateCustomerResponseSchema, writableCreateCustomerAddressSchema, writableCreateCustomerBusinessProfileSchema, writableCreateCustomerSchema, writableCustomerAddressSchema, writableCustomerBusinessProfileSchema, writableCustomerSchema };
|
|
1780
|
+
export { CreateCustomer, CreateCustomerAddress, type CreateCustomerAddressInput, type CreateCustomerAddressResponse, CreateCustomerBusinessProfile, type CreateCustomerBusinessProfileInput, type CreateCustomerBusinessProfileResponse, CreateCustomerFromCurrentUser, type CreateCustomerFromCurrentUserInput, type CreateCustomerFromCurrentUserResponse, type CreateCustomerInput, type CreateCustomerResponse, type Customer, type CustomerAddress, type CustomerAddressDetails, type CustomerAddressIri, type CustomerAddressNullableIri, type CustomerBusinessProfile, type CustomerBusinessProfileDetails, type CustomerBusinessProfileIri, type CustomerBusinessProfileNullableIri, type CustomerDetails, type CustomerIri, type CustomerNullableIri, type CustomersQueryParams, DeleteCustomer, DeleteCustomerAddress, DeleteCustomerBusinessProfile, GetCustomerAddressDetails, type GetCustomerAddressDetailsInput, type GetCustomerAddressDetailsResponse, GetCustomerAddresses, GetCustomerAddressesForCustomer, type GetCustomerAddressesForCustomerInput, type GetCustomerAddressesForCustomerQueryParams, type GetCustomerAddressesForCustomerResponse, type GetCustomerAddressesInput, type GetCustomerAddressesQueryParams, type GetCustomerAddressesResponse, GetCustomerBusinessProfileDetails, type GetCustomerBusinessProfileDetailsInput, type GetCustomerBusinessProfileDetailsResponse, GetCustomerBusinessProfiles, GetCustomerBusinessProfilesForCustomer, type GetCustomerBusinessProfilesForCustomerInput, type GetCustomerBusinessProfilesForCustomerQueryParams, type GetCustomerBusinessProfilesForCustomerResponse, type GetCustomerBusinessProfilesInput, type GetCustomerBusinessProfilesQueryParams, type GetCustomerBusinessProfilesResponse, GetCustomerDetails, type GetCustomerDetailsInput, type GetCustomerDetailsResponse, GetCustomers, GetCustomersFromPointOfSale, type GetCustomersFromPointOfSaleInput, type GetCustomersFromPointOfSaleQueryParams, type GetCustomersFromPointOfSaleResponse, type GetCustomersInput, type GetCustomersQueryParams, type GetCustomersResponse, UpdateCustomer, UpdateCustomerAddress, type UpdateCustomerAddressInput, type UpdateCustomerAddressResponse, UpdateCustomerBusinessProfile, type UpdateCustomerBusinessProfileInput, type UpdateCustomerBusinessProfileResponse, type UpdateCustomerInput, type UpdateCustomerResponse, type WritableCreateCustomer, type WritableCreateCustomerAddress, type WritableCustomer, type WritableCustomerAddress, createCustomerAddressInputSchema, createCustomerAddressResponseSchema, createCustomerBusinessProfileInputSchema, createCustomerBusinessProfileResponseSchema, createCustomerFromCurrentUserInputSchema, createCustomerFromCurrentUserResponseSchema, createCustomerInputSchema, createCustomerResponseSchema, customerAddressDetailsSchema, customerAddressIriSchema, customerAddressNullableIriSchema, customerAddressSchema, customerBusinessProfileDetailsSchema, customerBusinessProfileIriSchema, customerBusinessProfileNullableIriSchema, customerBusinessProfileSchema, customerDetailsSchema, customerIriSchema, customerNullableIriSchema, customerSchema, customersQuerySchema, deleteCustomerAddressInputSchema, deleteCustomerAddressResponseSchema, deleteCustomerBusinessProfileInputSchema, deleteCustomerBusinessProfileResponseSchema, deleteCustomerInputSchema, deleteCustomerResponseSchema, getCustomerAddressDetailsInputSchema, getCustomerAddressDetailsResponseSchema, getCustomerAddressesForCustomerInputSchema, getCustomerAddressesForCustomerQuerySchema, getCustomerAddressesForCustomerResponseSchema, getCustomerAddressesInputSchema, getCustomerAddressesQuerySchema, getCustomerAddressesResponseSchema, getCustomerBusinessProfileDetailsInputSchema, getCustomerBusinessProfileDetailsResponseSchema, getCustomerBusinessProfilesForCustomerInputSchema, getCustomerBusinessProfilesForCustomerQuerySchema, getCustomerBusinessProfilesForCustomerResponseSchema, getCustomerBusinessProfilesInputSchema, getCustomerBusinessProfilesQuerySchema, getCustomerBusinessProfilesResponseSchema, getCustomerDetailsInputSchema, getCustomerDetailsResponseSchema, getCustomersFromPointOfSaleInputSchema, getCustomersFromPointOfSaleQuerySchema, getCustomersFromPointOfSaleResponseSchema, getCustomersInputSchema, getCustomersQuerySchema, getCustomersResponseSchema, updateCustomerAddressInputSchema, updateCustomerAddressResponseSchema, updateCustomerBusinessProfileInputSchema, updateCustomerBusinessProfileResponseSchema, updateCustomerInputSchema, updateCustomerResponseSchema, writableCreateCustomerAddressSchema, writableCreateCustomerBusinessProfileSchema, writableCreateCustomerSchema, writableCustomerAddressSchema, writableCustomerBusinessProfileSchema, writableCustomerSchema };
|
package/dist/index.js
CHANGED
|
@@ -14216,12 +14216,32 @@ var CreateCustomer = class extends AbstractApiRequest13 {
|
|
|
14216
14216
|
}
|
|
14217
14217
|
};
|
|
14218
14218
|
|
|
14219
|
-
// src/requests/customers/
|
|
14219
|
+
// src/requests/customers/CreateCustomerFromCurrentUser.ts
|
|
14220
14220
|
import { AbstractApiRequest as AbstractApiRequest14 } from "@deliverart/sdk-js-core";
|
|
14221
|
+
var createCustomerFromCurrentUserInputSchema = writableCreateCustomerSchema.required();
|
|
14222
|
+
var createCustomerFromCurrentUserResponseSchema = customerDetailsSchema;
|
|
14223
|
+
var CreateCustomerFromCurrentUser = class extends AbstractApiRequest14 {
|
|
14224
|
+
constructor(input) {
|
|
14225
|
+
super(input);
|
|
14226
|
+
this.method = "POST";
|
|
14227
|
+
this.contentType = "application/json";
|
|
14228
|
+
this.accept = "application/json";
|
|
14229
|
+
this.inputSchema = createCustomerFromCurrentUserInputSchema;
|
|
14230
|
+
this.outputSchema = createCustomerFromCurrentUserResponseSchema;
|
|
14231
|
+
this.querySchema = void 0;
|
|
14232
|
+
this.headersSchema = void 0;
|
|
14233
|
+
}
|
|
14234
|
+
getPath() {
|
|
14235
|
+
return "/customers/from/me";
|
|
14236
|
+
}
|
|
14237
|
+
};
|
|
14238
|
+
|
|
14239
|
+
// src/requests/customers/DeleteCustomer.ts
|
|
14240
|
+
import { AbstractApiRequest as AbstractApiRequest15 } from "@deliverart/sdk-js-core";
|
|
14221
14241
|
import { emptyResponseSchema as emptyResponseSchema3 } from "@deliverart/sdk-js-global-types";
|
|
14222
14242
|
var deleteCustomerInputSchema = external_exports.undefined();
|
|
14223
14243
|
var deleteCustomerResponseSchema = emptyResponseSchema3;
|
|
14224
|
-
var DeleteCustomer = class extends
|
|
14244
|
+
var DeleteCustomer = class extends AbstractApiRequest15 {
|
|
14225
14245
|
constructor(customerId) {
|
|
14226
14246
|
super(void 0);
|
|
14227
14247
|
this.method = "DELETE";
|
|
@@ -14239,10 +14259,10 @@ var DeleteCustomer = class extends AbstractApiRequest14 {
|
|
|
14239
14259
|
};
|
|
14240
14260
|
|
|
14241
14261
|
// src/requests/customers/GetCustomerDetails.ts
|
|
14242
|
-
import { AbstractApiRequest as
|
|
14262
|
+
import { AbstractApiRequest as AbstractApiRequest16 } from "@deliverart/sdk-js-core";
|
|
14243
14263
|
var getCustomerDetailsInputSchema = external_exports.undefined();
|
|
14244
14264
|
var getCustomerDetailsResponseSchema = customerDetailsSchema;
|
|
14245
|
-
var GetCustomerDetails = class extends
|
|
14265
|
+
var GetCustomerDetails = class extends AbstractApiRequest16 {
|
|
14246
14266
|
constructor(customerId) {
|
|
14247
14267
|
super(void 0);
|
|
14248
14268
|
this.method = "GET";
|
|
@@ -14260,12 +14280,12 @@ var GetCustomerDetails = class extends AbstractApiRequest15 {
|
|
|
14260
14280
|
};
|
|
14261
14281
|
|
|
14262
14282
|
// src/requests/customers/GetCustomers.ts
|
|
14263
|
-
import { AbstractApiRequest as
|
|
14283
|
+
import { AbstractApiRequest as AbstractApiRequest17 } from "@deliverart/sdk-js-core";
|
|
14264
14284
|
import { createPaginatedSchema as createPaginatedSchema3 } from "@deliverart/sdk-js-global-types";
|
|
14265
14285
|
var getCustomersQuerySchema = customersQuerySchema;
|
|
14266
14286
|
var getCustomersInputSchema = external_exports.undefined();
|
|
14267
14287
|
var getCustomersResponseSchema = createPaginatedSchema3(customerSchema);
|
|
14268
|
-
var GetCustomers = class extends
|
|
14288
|
+
var GetCustomers = class extends AbstractApiRequest17 {
|
|
14269
14289
|
constructor(options) {
|
|
14270
14290
|
super(void 0, options);
|
|
14271
14291
|
this.method = "GET";
|
|
@@ -14285,12 +14305,12 @@ var GetCustomers = class extends AbstractApiRequest16 {
|
|
|
14285
14305
|
};
|
|
14286
14306
|
|
|
14287
14307
|
// src/requests/customers/GetCustomersFromPointOfSale.ts
|
|
14288
|
-
import { AbstractApiRequest as
|
|
14308
|
+
import { AbstractApiRequest as AbstractApiRequest18 } from "@deliverart/sdk-js-core";
|
|
14289
14309
|
import { createPaginatedSchema as createPaginatedSchema4 } from "@deliverart/sdk-js-global-types";
|
|
14290
14310
|
var getCustomersFromPointOfSaleQuerySchema = customersQuerySchema;
|
|
14291
14311
|
var getCustomersFromPointOfSaleInputSchema = external_exports.undefined();
|
|
14292
14312
|
var getCustomersFromPointOfSaleResponseSchema = createPaginatedSchema4(customerSchema);
|
|
14293
|
-
var GetCustomersFromPointOfSale = class extends
|
|
14313
|
+
var GetCustomersFromPointOfSale = class extends AbstractApiRequest18 {
|
|
14294
14314
|
constructor(pointOfSaleId, options) {
|
|
14295
14315
|
super(void 0, options);
|
|
14296
14316
|
this.method = "GET";
|
|
@@ -14311,10 +14331,10 @@ var GetCustomersFromPointOfSale = class extends AbstractApiRequest17 {
|
|
|
14311
14331
|
};
|
|
14312
14332
|
|
|
14313
14333
|
// src/requests/customers/UpdateCustomer.ts
|
|
14314
|
-
import { AbstractApiRequest as
|
|
14334
|
+
import { AbstractApiRequest as AbstractApiRequest19 } from "@deliverart/sdk-js-core";
|
|
14315
14335
|
var updateCustomerInputSchema = writableCustomerSchema.partial();
|
|
14316
14336
|
var updateCustomerResponseSchema = customerDetailsSchema;
|
|
14317
|
-
var UpdateCustomer = class extends
|
|
14337
|
+
var UpdateCustomer = class extends AbstractApiRequest19 {
|
|
14318
14338
|
constructor(customerId, input) {
|
|
14319
14339
|
super(input);
|
|
14320
14340
|
this.method = "PATCH";
|
|
@@ -14334,6 +14354,7 @@ export {
|
|
|
14334
14354
|
CreateCustomer,
|
|
14335
14355
|
CreateCustomerAddress,
|
|
14336
14356
|
CreateCustomerBusinessProfile,
|
|
14357
|
+
CreateCustomerFromCurrentUser,
|
|
14337
14358
|
DeleteCustomer,
|
|
14338
14359
|
DeleteCustomerAddress,
|
|
14339
14360
|
DeleteCustomerBusinessProfile,
|
|
@@ -14353,6 +14374,8 @@ export {
|
|
|
14353
14374
|
createCustomerAddressResponseSchema,
|
|
14354
14375
|
createCustomerBusinessProfileInputSchema,
|
|
14355
14376
|
createCustomerBusinessProfileResponseSchema,
|
|
14377
|
+
createCustomerFromCurrentUserInputSchema,
|
|
14378
|
+
createCustomerFromCurrentUserResponseSchema,
|
|
14356
14379
|
createCustomerInputSchema,
|
|
14357
14380
|
createCustomerResponseSchema,
|
|
14358
14381
|
customerAddressDetailsSchema,
|
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.23.3",
|
|
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-core": "2.
|
|
22
|
-
"@deliverart/sdk-js-
|
|
23
|
-
"@deliverart/sdk-js-
|
|
24
|
-
"@deliverart/sdk-js-
|
|
21
|
+
"@deliverart/sdk-js-core": "2.23.3",
|
|
22
|
+
"@deliverart/sdk-js-user": "2.23.3",
|
|
23
|
+
"@deliverart/sdk-js-point-of-sale": "2.23.3",
|
|
24
|
+
"@deliverart/sdk-js-global-types": "2.23.3"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|