@deliverart/sdk-js-delivery 2.1.8 → 2.1.9
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 +195 -10
- package/dist/index.d.cts +414 -1
- package/dist/index.d.ts +414 -1
- package/dist/index.js +180 -10
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -11345,11 +11345,41 @@ var GetDeliveries = class extends AbstractApiRequest5 {
|
|
|
11345
11345
|
}
|
|
11346
11346
|
};
|
|
11347
11347
|
|
|
11348
|
-
// src/requests/deliveries/
|
|
11348
|
+
// src/requests/deliveries/GetDeliveriesFromUser.ts
|
|
11349
11349
|
import { AbstractApiRequest as AbstractApiRequest6 } from "@deliverart/sdk-js-core";
|
|
11350
|
+
import {
|
|
11351
|
+
createPaginatedSchema as createPaginatedSchema2,
|
|
11352
|
+
responseToPagination as responseToPagination2
|
|
11353
|
+
} from "@deliverart/sdk-js-global-types";
|
|
11354
|
+
var getDeliveriesFromUserQuerySchema = deliveriesQuerySchema;
|
|
11355
|
+
var getDeliveriesFromUserInputSchema = external_exports.undefined();
|
|
11356
|
+
var getDeliveriesFromUserResponseSchema = createPaginatedSchema2(deliverySchema);
|
|
11357
|
+
var GetDeliveriesFromUser = class extends AbstractApiRequest6 {
|
|
11358
|
+
constructor(userId, options) {
|
|
11359
|
+
super(void 0, options);
|
|
11360
|
+
this.method = "GET";
|
|
11361
|
+
this.contentType = "application/json";
|
|
11362
|
+
this.accept = "application/json";
|
|
11363
|
+
this.inputSchema = getDeliveriesFromUserInputSchema;
|
|
11364
|
+
this.outputSchema = getDeliveriesFromUserResponseSchema;
|
|
11365
|
+
this.querySchema = getDeliveriesFromUserQuerySchema;
|
|
11366
|
+
this.headersSchema = void 0;
|
|
11367
|
+
this.userId = userId;
|
|
11368
|
+
}
|
|
11369
|
+
getPath() {
|
|
11370
|
+
return `/users/${this.userId}/deliveries`;
|
|
11371
|
+
}
|
|
11372
|
+
parseResponse(data, rawResponse) {
|
|
11373
|
+
const deliveries = external_exports.array(deliverySchema).parse(data);
|
|
11374
|
+
return this.validateOutput({ data: deliveries, pagination: responseToPagination2(rawResponse) });
|
|
11375
|
+
}
|
|
11376
|
+
};
|
|
11377
|
+
|
|
11378
|
+
// src/requests/deliveries/GetDeliveryDetails.ts
|
|
11379
|
+
import { AbstractApiRequest as AbstractApiRequest7 } from "@deliverart/sdk-js-core";
|
|
11350
11380
|
var getDeliveryDetailsInputSchema = external_exports.undefined();
|
|
11351
11381
|
var getDeliveryDetailsResponseSchema = deliverySchema;
|
|
11352
|
-
var GetDeliveryDetails = class extends
|
|
11382
|
+
var GetDeliveryDetails = class extends AbstractApiRequest7 {
|
|
11353
11383
|
constructor(deliveryId) {
|
|
11354
11384
|
super(void 0);
|
|
11355
11385
|
this.method = "GET";
|
|
@@ -11367,10 +11397,10 @@ var GetDeliveryDetails = class extends AbstractApiRequest6 {
|
|
|
11367
11397
|
};
|
|
11368
11398
|
|
|
11369
11399
|
// src/requests/deliveries/GetDeliveryDetailsFromBundle.ts
|
|
11370
|
-
import { AbstractApiRequest as
|
|
11400
|
+
import { AbstractApiRequest as AbstractApiRequest8 } from "@deliverart/sdk-js-core";
|
|
11371
11401
|
var getDeliveryDetailsFromBundleInputSchema = external_exports.undefined();
|
|
11372
11402
|
var getDeliveryDetailsFromBundleResponseSchema = deliverySchema;
|
|
11373
|
-
var GetDeliveryDetailsFromBundle = class extends
|
|
11403
|
+
var GetDeliveryDetailsFromBundle = class extends AbstractApiRequest8 {
|
|
11374
11404
|
constructor(bundleId) {
|
|
11375
11405
|
super(void 0);
|
|
11376
11406
|
this.method = "GET";
|
|
@@ -11388,10 +11418,10 @@ var GetDeliveryDetailsFromBundle = class extends AbstractApiRequest7 {
|
|
|
11388
11418
|
};
|
|
11389
11419
|
|
|
11390
11420
|
// src/requests/deliveries/StartDelivery.ts
|
|
11391
|
-
import { AbstractApiRequest as
|
|
11421
|
+
import { AbstractApiRequest as AbstractApiRequest9 } from "@deliverart/sdk-js-core";
|
|
11392
11422
|
var startDeliveryInputSchema = external_exports.undefined();
|
|
11393
11423
|
var startDeliveryResponseSchema = deliverySchema;
|
|
11394
|
-
var StartDelivery = class extends
|
|
11424
|
+
var StartDelivery = class extends AbstractApiRequest9 {
|
|
11395
11425
|
constructor(deliveryId) {
|
|
11396
11426
|
super(void 0);
|
|
11397
11427
|
this.method = "POST";
|
|
@@ -11409,10 +11439,10 @@ var StartDelivery = class extends AbstractApiRequest8 {
|
|
|
11409
11439
|
};
|
|
11410
11440
|
|
|
11411
11441
|
// src/requests/deliveries/StartDeliveryOrder.ts
|
|
11412
|
-
import { AbstractApiRequest as
|
|
11442
|
+
import { AbstractApiRequest as AbstractApiRequest10 } from "@deliverart/sdk-js-core";
|
|
11413
11443
|
var startDeliveryOrderInputSchema = external_exports.undefined();
|
|
11414
11444
|
var startDeliveryOrderResponseSchema = deliverySchema;
|
|
11415
|
-
var StartDeliveryOrder = class extends
|
|
11445
|
+
var StartDeliveryOrder = class extends AbstractApiRequest10 {
|
|
11416
11446
|
constructor(deliveryId, orderId) {
|
|
11417
11447
|
super(void 0);
|
|
11418
11448
|
this.method = "POST";
|
|
@@ -11431,12 +11461,12 @@ var StartDeliveryOrder = class extends AbstractApiRequest9 {
|
|
|
11431
11461
|
};
|
|
11432
11462
|
|
|
11433
11463
|
// src/requests/deliveries/UpdateDelivery.ts
|
|
11434
|
-
import { AbstractApiRequest as
|
|
11464
|
+
import { AbstractApiRequest as AbstractApiRequest11 } from "@deliverart/sdk-js-core";
|
|
11435
11465
|
var updateDeliveryInputSchema = writableDeliverySchema.omit({
|
|
11436
11466
|
bundle: true
|
|
11437
11467
|
}).partial();
|
|
11438
11468
|
var updateDeliveryResponseSchema = deliverySchema;
|
|
11439
|
-
var UpdateDelivery = class extends
|
|
11469
|
+
var UpdateDelivery = class extends AbstractApiRequest11 {
|
|
11440
11470
|
constructor(deliveryId, input) {
|
|
11441
11471
|
super(input);
|
|
11442
11472
|
this.method = "PATCH";
|
|
@@ -11452,20 +11482,149 @@ var UpdateDelivery = class extends AbstractApiRequest10 {
|
|
|
11452
11482
|
return `/deliveries/${this.deliveryId}`;
|
|
11453
11483
|
}
|
|
11454
11484
|
};
|
|
11485
|
+
|
|
11486
|
+
// src/requests/delivery_positions/CreateDeliveryPosition.ts
|
|
11487
|
+
import { AbstractApiRequest as AbstractApiRequest12 } from "@deliverart/sdk-js-core";
|
|
11488
|
+
var createDeliveryPositionInputSchema = writableDeliveryPositionSchema.required();
|
|
11489
|
+
var createDeliveryPositionResponseSchema = deliveryPositionDetailsSchema;
|
|
11490
|
+
var CreateDeliveryPositionPosition = class extends AbstractApiRequest12 {
|
|
11491
|
+
constructor(input) {
|
|
11492
|
+
super(input);
|
|
11493
|
+
this.method = "POST";
|
|
11494
|
+
this.contentType = "application/json";
|
|
11495
|
+
this.accept = "application/json";
|
|
11496
|
+
this.inputSchema = createDeliveryPositionInputSchema;
|
|
11497
|
+
this.outputSchema = createDeliveryPositionResponseSchema;
|
|
11498
|
+
this.querySchema = void 0;
|
|
11499
|
+
this.headersSchema = void 0;
|
|
11500
|
+
}
|
|
11501
|
+
getPath() {
|
|
11502
|
+
return "/deliveries/positions";
|
|
11503
|
+
}
|
|
11504
|
+
};
|
|
11505
|
+
|
|
11506
|
+
// src/requests/delivery_positions/DeleteDeliveryPosition.ts
|
|
11507
|
+
import { AbstractApiRequest as AbstractApiRequest13 } from "@deliverart/sdk-js-core";
|
|
11508
|
+
var deleteDeliveryPositionInputSchema = external_exports.undefined();
|
|
11509
|
+
var deleteDeliveryPositionResponseSchema = external_exports.undefined();
|
|
11510
|
+
var DeleteDeliveryPositionPosition = class extends AbstractApiRequest13 {
|
|
11511
|
+
constructor(deliveryPositionId) {
|
|
11512
|
+
super(void 0);
|
|
11513
|
+
this.method = "DELETE";
|
|
11514
|
+
this.contentType = "application/json";
|
|
11515
|
+
this.accept = "application/json";
|
|
11516
|
+
this.inputSchema = deleteDeliveryPositionInputSchema;
|
|
11517
|
+
this.outputSchema = deleteDeliveryPositionResponseSchema;
|
|
11518
|
+
this.querySchema = void 0;
|
|
11519
|
+
this.headersSchema = void 0;
|
|
11520
|
+
this.deliveryPositionId = deliveryPositionId;
|
|
11521
|
+
}
|
|
11522
|
+
getPath() {
|
|
11523
|
+
return `/deliveries/positions/${this.deliveryPositionId}`;
|
|
11524
|
+
}
|
|
11525
|
+
};
|
|
11526
|
+
|
|
11527
|
+
// src/requests/delivery_positions/GetDeliveryPositionDetails.ts
|
|
11528
|
+
import { AbstractApiRequest as AbstractApiRequest14 } from "@deliverart/sdk-js-core";
|
|
11529
|
+
var getDeliveryPositionDetailsInputSchema = external_exports.undefined();
|
|
11530
|
+
var getDeliveryPositionDetailsResponseSchema = deliveryPositionDetailsSchema;
|
|
11531
|
+
var GetDeliveryPositionPositionDetails = class extends AbstractApiRequest14 {
|
|
11532
|
+
constructor(deliveryPositionId) {
|
|
11533
|
+
super(void 0);
|
|
11534
|
+
this.method = "GET";
|
|
11535
|
+
this.contentType = "application/json";
|
|
11536
|
+
this.accept = "application/json";
|
|
11537
|
+
this.inputSchema = getDeliveryPositionDetailsInputSchema;
|
|
11538
|
+
this.outputSchema = getDeliveryPositionDetailsResponseSchema;
|
|
11539
|
+
this.querySchema = void 0;
|
|
11540
|
+
this.headersSchema = void 0;
|
|
11541
|
+
this.deliveryPositionId = deliveryPositionId;
|
|
11542
|
+
}
|
|
11543
|
+
getPath() {
|
|
11544
|
+
return `/deliveries/positions/${this.deliveryPositionId}`;
|
|
11545
|
+
}
|
|
11546
|
+
};
|
|
11547
|
+
|
|
11548
|
+
// src/requests/delivery_positions/GetDeliveryPositions.ts
|
|
11549
|
+
import { AbstractApiRequest as AbstractApiRequest15 } from "@deliverart/sdk-js-core";
|
|
11550
|
+
import {
|
|
11551
|
+
createPaginatedSchema as createPaginatedSchema3,
|
|
11552
|
+
responseToPagination as responseToPagination3
|
|
11553
|
+
} from "@deliverart/sdk-js-global-types";
|
|
11554
|
+
var getDeliveryPositionsQuerySchema = deliveryPositionsQuerySchema;
|
|
11555
|
+
var getDeliveryPositionsInputSchema = external_exports.undefined();
|
|
11556
|
+
var getDeliveryPositionsResponseSchema = createPaginatedSchema3(deliveryPositionSchema);
|
|
11557
|
+
var GetDeliveryPositions = class extends AbstractApiRequest15 {
|
|
11558
|
+
constructor(options) {
|
|
11559
|
+
super(void 0, options);
|
|
11560
|
+
this.method = "GET";
|
|
11561
|
+
this.contentType = "application/json";
|
|
11562
|
+
this.accept = "application/json";
|
|
11563
|
+
this.inputSchema = getDeliveryPositionsInputSchema;
|
|
11564
|
+
this.outputSchema = getDeliveryPositionsResponseSchema;
|
|
11565
|
+
this.querySchema = getDeliveryPositionsQuerySchema;
|
|
11566
|
+
this.headersSchema = void 0;
|
|
11567
|
+
}
|
|
11568
|
+
getPath() {
|
|
11569
|
+
return "/deliveries/positions";
|
|
11570
|
+
}
|
|
11571
|
+
parseResponse(data, rawResponse) {
|
|
11572
|
+
const deliveryPositions = external_exports.array(deliveryPositionSchema).parse(data);
|
|
11573
|
+
return this.validateOutput({
|
|
11574
|
+
data: deliveryPositions,
|
|
11575
|
+
pagination: responseToPagination3(rawResponse)
|
|
11576
|
+
});
|
|
11577
|
+
}
|
|
11578
|
+
};
|
|
11579
|
+
|
|
11580
|
+
// src/requests/delivery_positions/GetDeliveryPositionsFromDelivery.ts
|
|
11581
|
+
import { AbstractApiRequest as AbstractApiRequest16 } from "@deliverart/sdk-js-core";
|
|
11582
|
+
var getDeliveryPositionsFromDeliveryQuerySchema = deliveryPositionsQuerySchema;
|
|
11583
|
+
var getDeliveryPositionsFromDeliveryInputSchema = external_exports.undefined();
|
|
11584
|
+
var getDeliveryPositionsFromDeliveryResponseSchema = external_exports.array(deliveryPositionSchema);
|
|
11585
|
+
var GetDeliveryPositionsFromDelivery = class extends AbstractApiRequest16 {
|
|
11586
|
+
constructor(deliveryId, options) {
|
|
11587
|
+
super(void 0, options);
|
|
11588
|
+
this.method = "GET";
|
|
11589
|
+
this.contentType = "application/json";
|
|
11590
|
+
this.accept = "application/json";
|
|
11591
|
+
this.inputSchema = getDeliveryPositionsFromDeliveryInputSchema;
|
|
11592
|
+
this.outputSchema = getDeliveryPositionsFromDeliveryResponseSchema;
|
|
11593
|
+
this.querySchema = getDeliveryPositionsFromDeliveryQuerySchema;
|
|
11594
|
+
this.headersSchema = void 0;
|
|
11595
|
+
this.deliveryId = deliveryId;
|
|
11596
|
+
}
|
|
11597
|
+
getPath() {
|
|
11598
|
+
return `/deliveries/${this.deliveryId}/positions`;
|
|
11599
|
+
}
|
|
11600
|
+
parseResponse(data) {
|
|
11601
|
+
return external_exports.array(deliveryPositionSchema).parse(data);
|
|
11602
|
+
}
|
|
11603
|
+
};
|
|
11455
11604
|
export {
|
|
11456
11605
|
CreateDelivery,
|
|
11606
|
+
CreateDeliveryPositionPosition,
|
|
11457
11607
|
DeleteDelivery,
|
|
11608
|
+
DeleteDeliveryPositionPosition,
|
|
11458
11609
|
DeliverCurrentOrder,
|
|
11459
11610
|
EndDelivery,
|
|
11460
11611
|
GetDeliveries,
|
|
11612
|
+
GetDeliveriesFromUser,
|
|
11461
11613
|
GetDeliveryDetails,
|
|
11462
11614
|
GetDeliveryDetailsFromBundle,
|
|
11615
|
+
GetDeliveryPositionPositionDetails,
|
|
11616
|
+
GetDeliveryPositions,
|
|
11617
|
+
GetDeliveryPositionsFromDelivery,
|
|
11463
11618
|
StartDelivery,
|
|
11464
11619
|
StartDeliveryOrder,
|
|
11465
11620
|
UpdateDelivery,
|
|
11466
11621
|
createDeliveryInputSchema,
|
|
11622
|
+
createDeliveryPositionInputSchema,
|
|
11623
|
+
createDeliveryPositionResponseSchema,
|
|
11467
11624
|
createDeliveryResponseSchema,
|
|
11468
11625
|
deleteDeliveryInputSchema,
|
|
11626
|
+
deleteDeliveryPositionInputSchema,
|
|
11627
|
+
deleteDeliveryPositionResponseSchema,
|
|
11469
11628
|
deleteDeliveryResponseSchema,
|
|
11470
11629
|
deliverCurrentOrderInputSchema,
|
|
11471
11630
|
deliverCurrentOrderResponseSchema,
|
|
@@ -11480,6 +11639,9 @@ export {
|
|
|
11480
11639
|
deliverySchema,
|
|
11481
11640
|
endDeliveryInputSchema,
|
|
11482
11641
|
endDeliveryResponseSchema,
|
|
11642
|
+
getDeliveriesFromUserInputSchema,
|
|
11643
|
+
getDeliveriesFromUserQuerySchema,
|
|
11644
|
+
getDeliveriesFromUserResponseSchema,
|
|
11483
11645
|
getDeliveriesInputSchema,
|
|
11484
11646
|
getDeliveriesQuerySchema,
|
|
11485
11647
|
getDeliveriesResponseSchema,
|
|
@@ -11487,6 +11649,14 @@ export {
|
|
|
11487
11649
|
getDeliveryDetailsFromBundleResponseSchema,
|
|
11488
11650
|
getDeliveryDetailsInputSchema,
|
|
11489
11651
|
getDeliveryDetailsResponseSchema,
|
|
11652
|
+
getDeliveryPositionDetailsInputSchema,
|
|
11653
|
+
getDeliveryPositionDetailsResponseSchema,
|
|
11654
|
+
getDeliveryPositionsFromDeliveryInputSchema,
|
|
11655
|
+
getDeliveryPositionsFromDeliveryQuerySchema,
|
|
11656
|
+
getDeliveryPositionsFromDeliveryResponseSchema,
|
|
11657
|
+
getDeliveryPositionsInputSchema,
|
|
11658
|
+
getDeliveryPositionsQuerySchema,
|
|
11659
|
+
getDeliveryPositionsResponseSchema,
|
|
11490
11660
|
startDeliveryInputSchema,
|
|
11491
11661
|
startDeliveryOrderInputSchema,
|
|
11492
11662
|
startDeliveryOrderResponseSchema,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deliverart/sdk-js-delivery",
|
|
3
3
|
"description": "Deliverart JavaScript SDK for Delivery Management",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@deliverart/sdk-js-core": "2.1.
|
|
22
|
-
"@deliverart/sdk-js-
|
|
23
|
-
"@deliverart/sdk-js-
|
|
24
|
-
"@deliverart/sdk-js-
|
|
25
|
-
"@deliverart/sdk-js-
|
|
21
|
+
"@deliverart/sdk-js-core": "2.1.9",
|
|
22
|
+
"@deliverart/sdk-js-point-of-sale": "2.1.9",
|
|
23
|
+
"@deliverart/sdk-js-global-types": "2.1.9",
|
|
24
|
+
"@deliverart/sdk-js-order": "2.1.9",
|
|
25
|
+
"@deliverart/sdk-js-user": "2.1.9"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|