@deliverart/sdk-js-point-of-sale 2.1.14 → 2.1.15
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 +210 -15
- package/dist/index.d.cts +964 -1
- package/dist/index.d.ts +964 -1
- package/dist/index.js +193 -16
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -11278,16 +11278,172 @@ var pointOfSalesQuerySchema = external_exports.object({
|
|
|
11278
11278
|
page: external_exports.coerce.number().optional()
|
|
11279
11279
|
});
|
|
11280
11280
|
var pointOfSaleUsersQuerySchema = external_exports.object({
|
|
11281
|
+
availableForDelivery: external_exports.coerce.boolean().optional(),
|
|
11281
11282
|
"order[createdAt]": sortDirSchema.optional(),
|
|
11282
11283
|
"order[updatedAt]": sortDirSchema.optional(),
|
|
11283
11284
|
page: external_exports.coerce.number().optional()
|
|
11284
11285
|
}).extend(timestampsFilterSchema.shape);
|
|
11285
11286
|
|
|
11286
|
-
// src/requests/point-of-
|
|
11287
|
+
// src/requests/point-of-sale-users/DeletePointOfSaleUser.ts
|
|
11287
11288
|
import { AbstractApiRequest } from "@deliverart/sdk-js-core";
|
|
11289
|
+
var deletePointOfSaleUserInputSchema = external_exports.undefined();
|
|
11290
|
+
var deletePointOfSaleUserResponseSchema = external_exports.undefined();
|
|
11291
|
+
var DeletePointOfSaleUser = class extends AbstractApiRequest {
|
|
11292
|
+
constructor(pointOfSaleUserId) {
|
|
11293
|
+
super(void 0);
|
|
11294
|
+
this.method = "DELETE";
|
|
11295
|
+
this.contentType = "application/json";
|
|
11296
|
+
this.accept = "application/json";
|
|
11297
|
+
this.inputSchema = deletePointOfSaleUserInputSchema;
|
|
11298
|
+
this.outputSchema = deletePointOfSaleUserResponseSchema;
|
|
11299
|
+
this.querySchema = void 0;
|
|
11300
|
+
this.headersSchema = void 0;
|
|
11301
|
+
this.pointOfSaleUserId = pointOfSaleUserId;
|
|
11302
|
+
}
|
|
11303
|
+
getPath() {
|
|
11304
|
+
return `/point_of_sale_users/${this.pointOfSaleUserId}`;
|
|
11305
|
+
}
|
|
11306
|
+
};
|
|
11307
|
+
|
|
11308
|
+
// src/requests/point-of-sale-users/GetPointOfSaleUserDetails.ts
|
|
11309
|
+
import { AbstractApiRequest as AbstractApiRequest2 } from "@deliverart/sdk-js-core";
|
|
11310
|
+
var getPointOfSaleUserDetailsInputSchema = external_exports.undefined();
|
|
11311
|
+
var getPointOfSaleUserDetailsResponseSchema = pointOfSaleUserSchema;
|
|
11312
|
+
var GetPointOfSaleUserDetails = class extends AbstractApiRequest2 {
|
|
11313
|
+
constructor(pointOfSaleUserId) {
|
|
11314
|
+
super(void 0);
|
|
11315
|
+
this.method = "GET";
|
|
11316
|
+
this.contentType = "application/json";
|
|
11317
|
+
this.accept = "application/json";
|
|
11318
|
+
this.inputSchema = getPointOfSaleUserDetailsInputSchema;
|
|
11319
|
+
this.outputSchema = getPointOfSaleUserDetailsResponseSchema;
|
|
11320
|
+
this.querySchema = void 0;
|
|
11321
|
+
this.headersSchema = void 0;
|
|
11322
|
+
this.pointOfSaleUserId = pointOfSaleUserId;
|
|
11323
|
+
}
|
|
11324
|
+
getPath() {
|
|
11325
|
+
return `/point_of_sale_users/${this.pointOfSaleUserId}`;
|
|
11326
|
+
}
|
|
11327
|
+
};
|
|
11328
|
+
|
|
11329
|
+
// src/requests/point-of-sale-users/GetPointOfSaleUsers.ts
|
|
11330
|
+
import { AbstractApiRequest as AbstractApiRequest3 } from "@deliverart/sdk-js-core";
|
|
11331
|
+
import {
|
|
11332
|
+
createPaginatedSchema,
|
|
11333
|
+
responseToPagination
|
|
11334
|
+
} from "@deliverart/sdk-js-global-types";
|
|
11335
|
+
var getPointOfSaleUsersQuerySchema = pointOfSaleUsersQuerySchema;
|
|
11336
|
+
var getPointOfSaleUsersInputSchema = external_exports.undefined();
|
|
11337
|
+
var getPointOfSaleUsersResponseSchema = createPaginatedSchema(pointOfSaleUserSchema);
|
|
11338
|
+
var GetPointOfSaleUsers = class extends AbstractApiRequest3 {
|
|
11339
|
+
constructor(options) {
|
|
11340
|
+
super(void 0, options);
|
|
11341
|
+
this.method = "GET";
|
|
11342
|
+
this.contentType = "application/json";
|
|
11343
|
+
this.accept = "application/json";
|
|
11344
|
+
this.inputSchema = getPointOfSaleUsersInputSchema;
|
|
11345
|
+
this.outputSchema = getPointOfSaleUsersResponseSchema;
|
|
11346
|
+
this.querySchema = getPointOfSaleUsersQuerySchema;
|
|
11347
|
+
this.headersSchema = void 0;
|
|
11348
|
+
}
|
|
11349
|
+
getPath() {
|
|
11350
|
+
return "/point_of_sale_users";
|
|
11351
|
+
}
|
|
11352
|
+
parseResponse(data, rawResponse) {
|
|
11353
|
+
const pointOfSaleUsers = external_exports.array(pointOfSaleUserSchema).parse(data);
|
|
11354
|
+
return this.validateOutput({
|
|
11355
|
+
data: pointOfSaleUsers,
|
|
11356
|
+
pagination: responseToPagination(rawResponse)
|
|
11357
|
+
});
|
|
11358
|
+
}
|
|
11359
|
+
};
|
|
11360
|
+
|
|
11361
|
+
// src/requests/point-of-sale-users/GetPointOfSaleUsersFromPointOfSale.ts
|
|
11362
|
+
import { AbstractApiRequest as AbstractApiRequest4 } from "@deliverart/sdk-js-core";
|
|
11363
|
+
var getPointOfSaleUsersFromPointOfSaleQuerySchema = pointOfSaleUsersQuerySchema;
|
|
11364
|
+
var getPointOfSaleUsersFromPointOfSaleInputSchema = external_exports.undefined();
|
|
11365
|
+
var pointOfSaleUserSchemaFromUser = pointOfSaleUserSchema.omit({
|
|
11366
|
+
pointOfSale: true
|
|
11367
|
+
});
|
|
11368
|
+
var getPointOfSaleUsersFromPointOfSaleResponseSchema = external_exports.array(
|
|
11369
|
+
pointOfSaleUserSchemaFromUser
|
|
11370
|
+
);
|
|
11371
|
+
var GetPointOfSaleUsersFromPointOfSale = class extends AbstractApiRequest4 {
|
|
11372
|
+
constructor(pointOfSaleId, options) {
|
|
11373
|
+
super(void 0, options);
|
|
11374
|
+
this.method = "GET";
|
|
11375
|
+
this.contentType = "application/json";
|
|
11376
|
+
this.accept = "application/json";
|
|
11377
|
+
this.inputSchema = getPointOfSaleUsersFromPointOfSaleInputSchema;
|
|
11378
|
+
this.outputSchema = getPointOfSaleUsersFromPointOfSaleResponseSchema;
|
|
11379
|
+
this.querySchema = getPointOfSaleUsersFromPointOfSaleQuerySchema;
|
|
11380
|
+
this.headersSchema = void 0;
|
|
11381
|
+
this.pointOfSaleId = pointOfSaleId;
|
|
11382
|
+
}
|
|
11383
|
+
getPath() {
|
|
11384
|
+
return `/point_of_sales/${this.pointOfSaleId}/point_of_sale_users`;
|
|
11385
|
+
}
|
|
11386
|
+
parseResponse(data) {
|
|
11387
|
+
return external_exports.array(pointOfSaleUserSchemaFromUser).parse(data);
|
|
11388
|
+
}
|
|
11389
|
+
};
|
|
11390
|
+
|
|
11391
|
+
// src/requests/point-of-sale-users/GetPointOfSaleUsersFromUser.ts
|
|
11392
|
+
import { AbstractApiRequest as AbstractApiRequest5 } from "@deliverart/sdk-js-core";
|
|
11393
|
+
var getPointOfSaleUsersFromUserQuerySchema = pointOfSaleUsersQuerySchema;
|
|
11394
|
+
var getPointOfSaleUsersFromUserInputSchema = external_exports.undefined();
|
|
11395
|
+
var pointOfSaleUserSchemaFromUser2 = pointOfSaleUserSchema.omit({
|
|
11396
|
+
user: true
|
|
11397
|
+
});
|
|
11398
|
+
var getPointOfSaleUsersFromUserResponseSchema = external_exports.array(pointOfSaleUserSchemaFromUser2);
|
|
11399
|
+
var GetPointOfSaleUsersFromUser = class extends AbstractApiRequest5 {
|
|
11400
|
+
constructor(userId, options) {
|
|
11401
|
+
super(void 0, options);
|
|
11402
|
+
this.method = "GET";
|
|
11403
|
+
this.contentType = "application/json";
|
|
11404
|
+
this.accept = "application/json";
|
|
11405
|
+
this.inputSchema = getPointOfSaleUsersFromUserInputSchema;
|
|
11406
|
+
this.outputSchema = getPointOfSaleUsersFromUserResponseSchema;
|
|
11407
|
+
this.querySchema = getPointOfSaleUsersFromUserQuerySchema;
|
|
11408
|
+
this.headersSchema = void 0;
|
|
11409
|
+
this.userId = userId;
|
|
11410
|
+
}
|
|
11411
|
+
getPath() {
|
|
11412
|
+
return `/users/${this.userId}/point_of_sale_users`;
|
|
11413
|
+
}
|
|
11414
|
+
parseResponse(data) {
|
|
11415
|
+
return external_exports.array(pointOfSaleUserSchemaFromUser2).parse(data);
|
|
11416
|
+
}
|
|
11417
|
+
};
|
|
11418
|
+
|
|
11419
|
+
// src/requests/point-of-sale-users/UpdatePointOfSaleUser.ts
|
|
11420
|
+
import { AbstractApiRequest as AbstractApiRequest6 } from "@deliverart/sdk-js-core";
|
|
11421
|
+
var updatePointOfSaleUserInputSchema = external_exports.object({
|
|
11422
|
+
role: pointOfSaleUserRoleSchema
|
|
11423
|
+
}).partial();
|
|
11424
|
+
var updatePointOfSaleUserResponseSchema = pointOfSaleUserSchema;
|
|
11425
|
+
var UpdatePointOfSaleUser = class extends AbstractApiRequest6 {
|
|
11426
|
+
constructor(pointOfSaleUserId, input) {
|
|
11427
|
+
super(input);
|
|
11428
|
+
this.method = "PATCH";
|
|
11429
|
+
this.contentType = "application/merge-patch+json";
|
|
11430
|
+
this.accept = "application/json";
|
|
11431
|
+
this.inputSchema = updatePointOfSaleUserInputSchema;
|
|
11432
|
+
this.outputSchema = updatePointOfSaleUserResponseSchema;
|
|
11433
|
+
this.querySchema = void 0;
|
|
11434
|
+
this.headersSchema = void 0;
|
|
11435
|
+
this.pointOfSaleUserId = pointOfSaleUserId;
|
|
11436
|
+
}
|
|
11437
|
+
getPath() {
|
|
11438
|
+
return `/point_of_sale_users/${this.pointOfSaleUserId}`;
|
|
11439
|
+
}
|
|
11440
|
+
};
|
|
11441
|
+
|
|
11442
|
+
// src/requests/point-of-sales/CreatePointOfSale.ts
|
|
11443
|
+
import { AbstractApiRequest as AbstractApiRequest7 } from "@deliverart/sdk-js-core";
|
|
11288
11444
|
var createPointOfSaleInputSchema = writableCreatePointOfSaleSchema.required();
|
|
11289
11445
|
var createPointOfSaleResponseSchema = pointOfSaleDetailsSchema;
|
|
11290
|
-
var CreatePointOfSale = class extends
|
|
11446
|
+
var CreatePointOfSale = class extends AbstractApiRequest7 {
|
|
11291
11447
|
constructor(input) {
|
|
11292
11448
|
super(input);
|
|
11293
11449
|
this.method = "POST";
|
|
@@ -11304,10 +11460,10 @@ var CreatePointOfSale = class extends AbstractApiRequest {
|
|
|
11304
11460
|
};
|
|
11305
11461
|
|
|
11306
11462
|
// src/requests/point-of-sales/DeletePointOfSale.ts
|
|
11307
|
-
import { AbstractApiRequest as
|
|
11463
|
+
import { AbstractApiRequest as AbstractApiRequest8 } from "@deliverart/sdk-js-core";
|
|
11308
11464
|
var deletePointOfSaleInputSchema = external_exports.undefined();
|
|
11309
11465
|
var deletePointOfSaleResponseSchema = external_exports.undefined();
|
|
11310
|
-
var DeletePointOfSale = class extends
|
|
11466
|
+
var DeletePointOfSale = class extends AbstractApiRequest8 {
|
|
11311
11467
|
constructor(pointOfSaleId) {
|
|
11312
11468
|
super(void 0);
|
|
11313
11469
|
this.method = "DELETE";
|
|
@@ -11325,11 +11481,11 @@ var DeletePointOfSale = class extends AbstractApiRequest2 {
|
|
|
11325
11481
|
};
|
|
11326
11482
|
|
|
11327
11483
|
// src/requests/point-of-sales/GetCompanyPointOfSales.ts
|
|
11328
|
-
import { AbstractApiRequest as
|
|
11484
|
+
import { AbstractApiRequest as AbstractApiRequest9 } from "@deliverart/sdk-js-core";
|
|
11329
11485
|
var getCompanyPointOfSalesQuerySchema = pointOfSalesQuerySchema;
|
|
11330
11486
|
var getCompanyPointOfSalesInputSchema = external_exports.undefined();
|
|
11331
11487
|
var getCompanyPointOfSalesResponseSchema = external_exports.array(pointOfSaleSchema);
|
|
11332
|
-
var GetCompanyPointOfSales = class extends
|
|
11488
|
+
var GetCompanyPointOfSales = class extends AbstractApiRequest9 {
|
|
11333
11489
|
constructor(companyId, options) {
|
|
11334
11490
|
super(void 0, options);
|
|
11335
11491
|
this.method = "GET";
|
|
@@ -11350,10 +11506,10 @@ var GetCompanyPointOfSales = class extends AbstractApiRequest3 {
|
|
|
11350
11506
|
};
|
|
11351
11507
|
|
|
11352
11508
|
// src/requests/point-of-sales/GetPointOfSaleDetails.ts
|
|
11353
|
-
import { AbstractApiRequest as
|
|
11509
|
+
import { AbstractApiRequest as AbstractApiRequest10 } from "@deliverart/sdk-js-core";
|
|
11354
11510
|
var getPointOfSaleDetailsInputSchema = external_exports.undefined();
|
|
11355
11511
|
var getPointOfSaleDetailsResponseSchema = pointOfSaleDetailsSchema;
|
|
11356
|
-
var GetPointOfSaleDetails = class extends
|
|
11512
|
+
var GetPointOfSaleDetails = class extends AbstractApiRequest10 {
|
|
11357
11513
|
constructor(pointOfSaleId) {
|
|
11358
11514
|
super(void 0);
|
|
11359
11515
|
this.method = "GET";
|
|
@@ -11371,15 +11527,15 @@ var GetPointOfSaleDetails = class extends AbstractApiRequest4 {
|
|
|
11371
11527
|
};
|
|
11372
11528
|
|
|
11373
11529
|
// src/requests/point-of-sales/GetPointOfSales.ts
|
|
11374
|
-
import { AbstractApiRequest as
|
|
11530
|
+
import { AbstractApiRequest as AbstractApiRequest11 } from "@deliverart/sdk-js-core";
|
|
11375
11531
|
import {
|
|
11376
|
-
createPaginatedSchema,
|
|
11377
|
-
responseToPagination
|
|
11532
|
+
createPaginatedSchema as createPaginatedSchema2,
|
|
11533
|
+
responseToPagination as responseToPagination2
|
|
11378
11534
|
} from "@deliverart/sdk-js-global-types";
|
|
11379
11535
|
var getPointOfSalesQuerySchema = pointOfSalesQuerySchema;
|
|
11380
11536
|
var getPointOfSalesInputSchema = external_exports.undefined();
|
|
11381
|
-
var getPointOfSalesResponseSchema =
|
|
11382
|
-
var GetPointOfSales = class extends
|
|
11537
|
+
var getPointOfSalesResponseSchema = createPaginatedSchema2(pointOfSaleSchema);
|
|
11538
|
+
var GetPointOfSales = class extends AbstractApiRequest11 {
|
|
11383
11539
|
constructor(options) {
|
|
11384
11540
|
super(void 0, options);
|
|
11385
11541
|
this.method = "GET";
|
|
@@ -11397,16 +11553,16 @@ var GetPointOfSales = class extends AbstractApiRequest5 {
|
|
|
11397
11553
|
const pointOfSales = external_exports.array(pointOfSaleSchema).parse(data);
|
|
11398
11554
|
return this.validateOutput({
|
|
11399
11555
|
data: pointOfSales,
|
|
11400
|
-
pagination:
|
|
11556
|
+
pagination: responseToPagination2(rawResponse)
|
|
11401
11557
|
});
|
|
11402
11558
|
}
|
|
11403
11559
|
};
|
|
11404
11560
|
|
|
11405
11561
|
// src/requests/point-of-sales/UpdatePointOfSale.ts
|
|
11406
|
-
import { AbstractApiRequest as
|
|
11562
|
+
import { AbstractApiRequest as AbstractApiRequest12 } from "@deliverart/sdk-js-core";
|
|
11407
11563
|
var updatePointOfSaleInputSchema = writablePointOfSaleSchema.partial();
|
|
11408
11564
|
var updatePointOfSaleResponseSchema = pointOfSaleDetailsSchema;
|
|
11409
|
-
var UpdatePointOfSale = class extends
|
|
11565
|
+
var UpdatePointOfSale = class extends AbstractApiRequest12 {
|
|
11410
11566
|
constructor(pointOfSaleId, input) {
|
|
11411
11567
|
super(input);
|
|
11412
11568
|
this.method = "PATCH";
|
|
@@ -11425,20 +11581,39 @@ var UpdatePointOfSale = class extends AbstractApiRequest6 {
|
|
|
11425
11581
|
export {
|
|
11426
11582
|
CreatePointOfSale,
|
|
11427
11583
|
DeletePointOfSale,
|
|
11584
|
+
DeletePointOfSaleUser,
|
|
11428
11585
|
GetCompanyPointOfSales,
|
|
11429
11586
|
GetPointOfSaleDetails,
|
|
11587
|
+
GetPointOfSaleUserDetails,
|
|
11588
|
+
GetPointOfSaleUsers,
|
|
11589
|
+
GetPointOfSaleUsersFromPointOfSale,
|
|
11590
|
+
GetPointOfSaleUsersFromUser,
|
|
11430
11591
|
GetPointOfSales,
|
|
11431
11592
|
UpdatePointOfSale,
|
|
11593
|
+
UpdatePointOfSaleUser,
|
|
11432
11594
|
createPointOfSaleInputSchema,
|
|
11433
11595
|
createPointOfSaleResponseSchema,
|
|
11434
11596
|
deletePointOfSaleInputSchema,
|
|
11435
11597
|
deletePointOfSaleResponseSchema,
|
|
11598
|
+
deletePointOfSaleUserInputSchema,
|
|
11599
|
+
deletePointOfSaleUserResponseSchema,
|
|
11436
11600
|
deliveryTimeSettingSchema,
|
|
11437
11601
|
getCompanyPointOfSalesInputSchema,
|
|
11438
11602
|
getCompanyPointOfSalesQuerySchema,
|
|
11439
11603
|
getCompanyPointOfSalesResponseSchema,
|
|
11440
11604
|
getPointOfSaleDetailsInputSchema,
|
|
11441
11605
|
getPointOfSaleDetailsResponseSchema,
|
|
11606
|
+
getPointOfSaleUserDetailsInputSchema,
|
|
11607
|
+
getPointOfSaleUserDetailsResponseSchema,
|
|
11608
|
+
getPointOfSaleUsersFromPointOfSaleInputSchema,
|
|
11609
|
+
getPointOfSaleUsersFromPointOfSaleQuerySchema,
|
|
11610
|
+
getPointOfSaleUsersFromPointOfSaleResponseSchema,
|
|
11611
|
+
getPointOfSaleUsersFromUserInputSchema,
|
|
11612
|
+
getPointOfSaleUsersFromUserQuerySchema,
|
|
11613
|
+
getPointOfSaleUsersFromUserResponseSchema,
|
|
11614
|
+
getPointOfSaleUsersInputSchema,
|
|
11615
|
+
getPointOfSaleUsersQuerySchema,
|
|
11616
|
+
getPointOfSaleUsersResponseSchema,
|
|
11442
11617
|
getPointOfSalesInputSchema,
|
|
11443
11618
|
getPointOfSalesQuerySchema,
|
|
11444
11619
|
getPointOfSalesResponseSchema,
|
|
@@ -11464,6 +11639,8 @@ export {
|
|
|
11464
11639
|
timeSettingSchema,
|
|
11465
11640
|
updatePointOfSaleInputSchema,
|
|
11466
11641
|
updatePointOfSaleResponseSchema,
|
|
11642
|
+
updatePointOfSaleUserInputSchema,
|
|
11643
|
+
updatePointOfSaleUserResponseSchema,
|
|
11467
11644
|
userPointOfSaleSchema,
|
|
11468
11645
|
writableCreatePointOfSaleSchema,
|
|
11469
11646
|
writablePointOfSaleSchema
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deliverart/sdk-js-point-of-sale",
|
|
3
3
|
"description": "Deliverart JavaScript SDK for Point of Sale Management",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.15",
|
|
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-user": "2.1.
|
|
24
|
-
"@deliverart/sdk-js-global-types": "2.1.
|
|
21
|
+
"@deliverart/sdk-js-company": "2.1.15",
|
|
22
|
+
"@deliverart/sdk-js-core": "2.1.15",
|
|
23
|
+
"@deliverart/sdk-js-user": "2.1.15",
|
|
24
|
+
"@deliverart/sdk-js-global-types": "2.1.15"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|