@deliverart/sdk-js-delivery 2.5.33 → 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 +148 -25
- package/dist/index.d.ts +148 -25
- package/dist/index.js +18 -44
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -11543,14 +11543,13 @@ var GetDeliveries = class extends import_sdk_js_core5.AbstractApiRequest {
|
|
|
11543
11543
|
this.outputSchema = getDeliveriesResponseSchema;
|
|
11544
11544
|
this.querySchema = getDeliveriesQuerySchema;
|
|
11545
11545
|
this.headersSchema = void 0;
|
|
11546
|
+
// Declare list behavior
|
|
11547
|
+
this.listItemSchema = deliverySchema;
|
|
11548
|
+
this.paginationDefaultEnabled = true;
|
|
11546
11549
|
}
|
|
11547
11550
|
getPath() {
|
|
11548
11551
|
return "/deliveries";
|
|
11549
11552
|
}
|
|
11550
|
-
parseResponse(data, rawResponse) {
|
|
11551
|
-
const deliveries = external_exports.array(deliverySchema).parse(data);
|
|
11552
|
-
return this.validateOutput({ data: deliveries, pagination: (0, import_sdk_js_global_types5.responseToPagination)(rawResponse) });
|
|
11553
|
-
}
|
|
11554
11553
|
};
|
|
11555
11554
|
|
|
11556
11555
|
// src/requests/deliveries/GetDeliveriesFromUser.ts
|
|
@@ -11569,15 +11568,13 @@ var GetDeliveriesFromUser = class extends import_sdk_js_core6.AbstractApiRequest
|
|
|
11569
11568
|
this.outputSchema = getDeliveriesFromUserResponseSchema;
|
|
11570
11569
|
this.querySchema = getDeliveriesFromUserQuerySchema;
|
|
11571
11570
|
this.headersSchema = void 0;
|
|
11571
|
+
this.listItemSchema = deliverySchema;
|
|
11572
|
+
this.paginationDefaultEnabled = true;
|
|
11572
11573
|
this.userId = userId;
|
|
11573
11574
|
}
|
|
11574
11575
|
getPath() {
|
|
11575
11576
|
return `/users/${this.userId}/deliveries`;
|
|
11576
11577
|
}
|
|
11577
|
-
parseResponse(data, rawResponse) {
|
|
11578
|
-
const deliveries = external_exports.array(deliverySchema).parse(data);
|
|
11579
|
-
return this.validateOutput({ data: deliveries, pagination: (0, import_sdk_js_global_types6.responseToPagination)(rawResponse) });
|
|
11580
|
-
}
|
|
11581
11578
|
};
|
|
11582
11579
|
|
|
11583
11580
|
// src/requests/deliveries/GetDeliveryDetails.ts
|
|
@@ -11767,17 +11764,12 @@ var GetDeliveryFees = class extends import_sdk_js_core15.AbstractApiRequest {
|
|
|
11767
11764
|
this.outputSchema = getDeliveryFeesResponseSchema;
|
|
11768
11765
|
this.querySchema = getDeliveryFeesQuerySchema;
|
|
11769
11766
|
this.headersSchema = void 0;
|
|
11767
|
+
this.listItemSchema = deliveryFeeListItemSchema;
|
|
11768
|
+
this.paginationDefaultEnabled = true;
|
|
11770
11769
|
}
|
|
11771
11770
|
getPath() {
|
|
11772
11771
|
return "/delivery_fees";
|
|
11773
11772
|
}
|
|
11774
|
-
parseResponse(data, rawResponse) {
|
|
11775
|
-
const deliveryFees = external_exports.array(deliveryFeeListItemSchema).parse(data);
|
|
11776
|
-
return this.validateOutput({
|
|
11777
|
-
data: deliveryFees,
|
|
11778
|
-
pagination: (0, import_sdk_js_global_types8.responseToPagination)(rawResponse)
|
|
11779
|
-
});
|
|
11780
|
-
}
|
|
11781
11773
|
};
|
|
11782
11774
|
|
|
11783
11775
|
// src/requests/delivery_fees/GetDeliveryFeesFromPointOfSale.ts
|
|
@@ -11795,14 +11787,13 @@ var GetDeliveryFeesFromPointOfSale = class extends import_sdk_js_core16.Abstract
|
|
|
11795
11787
|
this.outputSchema = getDeliveryFeesFromPointOfSaleResponseSchema;
|
|
11796
11788
|
this.querySchema = getDeliveryFeesFromPointOfSaleQuerySchema;
|
|
11797
11789
|
this.headersSchema = void 0;
|
|
11790
|
+
this.listItemSchema = deliveryFeeListItemSchema;
|
|
11791
|
+
this.paginationDefaultEnabled = false;
|
|
11798
11792
|
this.pointOfSaleId = pointOfSaleId;
|
|
11799
11793
|
}
|
|
11800
11794
|
getPath() {
|
|
11801
11795
|
return `/point_of_sales/${this.pointOfSaleId}/delivery_fees`;
|
|
11802
11796
|
}
|
|
11803
|
-
parseResponse(data) {
|
|
11804
|
-
return external_exports.array(deliveryFeeListItemSchema).parse(data);
|
|
11805
|
-
}
|
|
11806
11797
|
};
|
|
11807
11798
|
|
|
11808
11799
|
// src/requests/delivery_fees/UpdateDeliveryFee.ts
|
|
@@ -11905,17 +11896,13 @@ var GetDeliveryPositions = class extends import_sdk_js_core21.AbstractApiRequest
|
|
|
11905
11896
|
this.outputSchema = getDeliveryPositionsResponseSchema;
|
|
11906
11897
|
this.querySchema = getDeliveryPositionsQuerySchema;
|
|
11907
11898
|
this.headersSchema = void 0;
|
|
11899
|
+
// Declare list behavior
|
|
11900
|
+
this.listItemSchema = deliveryPositionSchema;
|
|
11901
|
+
this.paginationDefaultEnabled = true;
|
|
11908
11902
|
}
|
|
11909
11903
|
getPath() {
|
|
11910
11904
|
return "/deliveries/positions";
|
|
11911
11905
|
}
|
|
11912
|
-
parseResponse(data, rawResponse) {
|
|
11913
|
-
const deliveryPositions = external_exports.array(deliveryPositionSchema).parse(data);
|
|
11914
|
-
return this.validateOutput({
|
|
11915
|
-
data: deliveryPositions,
|
|
11916
|
-
pagination: (0, import_sdk_js_global_types10.responseToPagination)(rawResponse)
|
|
11917
|
-
});
|
|
11918
|
-
}
|
|
11919
11906
|
};
|
|
11920
11907
|
|
|
11921
11908
|
// src/requests/delivery_positions/GetDeliveryPositionsFromDelivery.ts
|
|
@@ -11933,14 +11920,13 @@ var GetDeliveryPositionsFromDelivery = class extends import_sdk_js_core22.Abstra
|
|
|
11933
11920
|
this.outputSchema = getDeliveryPositionsFromDeliveryResponseSchema;
|
|
11934
11921
|
this.querySchema = getDeliveryPositionsFromDeliveryQuerySchema;
|
|
11935
11922
|
this.headersSchema = void 0;
|
|
11923
|
+
this.listItemSchema = deliveryPositionSchema;
|
|
11924
|
+
this.paginationDefaultEnabled = false;
|
|
11936
11925
|
this.deliveryId = deliveryId;
|
|
11937
11926
|
}
|
|
11938
11927
|
getPath() {
|
|
11939
11928
|
return `/deliveries/${this.deliveryId}/positions`;
|
|
11940
11929
|
}
|
|
11941
|
-
parseResponse(data) {
|
|
11942
|
-
return external_exports.array(deliveryPositionSchema).parse(data);
|
|
11943
|
-
}
|
|
11944
11930
|
};
|
|
11945
11931
|
// Annotate the CommonJS export names for ESM import in node:
|
|
11946
11932
|
0 && (module.exports = {
|
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
|
export { DeliveryFeeType, deliveryFeeTypeSchema, deliveryFeeTypes } from '@deliverart/sdk-js-global-types';
|
|
4
3
|
import { z } from 'zod';
|
|
5
4
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
@@ -543,9 +542,9 @@ declare const getDeliveriesResponseSchema: z.ZodObject<{
|
|
|
543
542
|
}, z.core.$strip>;
|
|
544
543
|
type GetDeliveriesResponse = z.infer<typeof getDeliveriesResponseSchema>;
|
|
545
544
|
declare class GetDeliveries extends AbstractApiRequest<typeof getDeliveriesInputSchema, typeof getDeliveriesResponseSchema, GetDeliveriesQueryParams> {
|
|
546
|
-
readonly method
|
|
547
|
-
readonly contentType
|
|
548
|
-
readonly accept
|
|
545
|
+
readonly method: "GET";
|
|
546
|
+
readonly contentType: "application/json";
|
|
547
|
+
readonly accept: "application/json";
|
|
549
548
|
readonly inputSchema: z.ZodUndefined;
|
|
550
549
|
readonly outputSchema: z.ZodObject<{
|
|
551
550
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -610,11 +609,21 @@ declare class GetDeliveries extends AbstractApiRequest<typeof getDeliveriesInput
|
|
|
610
609
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
611
610
|
}, z.core.$strip>;
|
|
612
611
|
readonly headersSchema: undefined;
|
|
612
|
+
readonly listItemSchema: z.ZodObject<{
|
|
613
|
+
id: z.ZodString;
|
|
614
|
+
bundle: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/bundles/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/bundles/:id">, unknown>>;
|
|
615
|
+
deliveryUser: 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>>;
|
|
616
|
+
currentOrder: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/orders/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/orders/:id"> | null, unknown>>;
|
|
617
|
+
startedAt: z.ZodNullable<z.ZodString>;
|
|
618
|
+
endedAt: z.ZodNullable<z.ZodString>;
|
|
619
|
+
createdAt: z.ZodString;
|
|
620
|
+
updatedAt: z.ZodString;
|
|
621
|
+
}, z.core.$strip>;
|
|
622
|
+
readonly paginationDefaultEnabled = true;
|
|
613
623
|
constructor(options?: {
|
|
614
624
|
query?: DeliveriesQueryParams;
|
|
615
625
|
});
|
|
616
626
|
getPath(): string;
|
|
617
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Delivery>;
|
|
618
627
|
}
|
|
619
628
|
|
|
620
629
|
declare const getDeliveriesFromUserQuerySchema: z.ZodObject<{
|
|
@@ -684,9 +693,9 @@ declare const getDeliveriesFromUserResponseSchema: z.ZodObject<{
|
|
|
684
693
|
}, z.core.$strip>;
|
|
685
694
|
type GetDeliveriesFromUserResponse = z.infer<typeof getDeliveriesFromUserResponseSchema>;
|
|
686
695
|
declare class GetDeliveriesFromUser extends AbstractApiRequest<typeof getDeliveriesFromUserInputSchema, typeof getDeliveriesFromUserResponseSchema, GetDeliveriesFromUserQueryParams> {
|
|
687
|
-
readonly method
|
|
688
|
-
readonly contentType
|
|
689
|
-
readonly accept
|
|
696
|
+
readonly method: "GET";
|
|
697
|
+
readonly contentType: "application/json";
|
|
698
|
+
readonly accept: "application/json";
|
|
690
699
|
readonly inputSchema: z.ZodUndefined;
|
|
691
700
|
readonly outputSchema: z.ZodObject<{
|
|
692
701
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -751,12 +760,22 @@ declare class GetDeliveriesFromUser extends AbstractApiRequest<typeof getDeliver
|
|
|
751
760
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
752
761
|
}, z.core.$strip>;
|
|
753
762
|
readonly headersSchema: undefined;
|
|
763
|
+
readonly listItemSchema: z.ZodObject<{
|
|
764
|
+
id: z.ZodString;
|
|
765
|
+
bundle: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/bundles/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/bundles/:id">, unknown>>;
|
|
766
|
+
deliveryUser: 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>>;
|
|
767
|
+
currentOrder: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/orders/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/orders/:id"> | null, unknown>>;
|
|
768
|
+
startedAt: z.ZodNullable<z.ZodString>;
|
|
769
|
+
endedAt: z.ZodNullable<z.ZodString>;
|
|
770
|
+
createdAt: z.ZodString;
|
|
771
|
+
updatedAt: z.ZodString;
|
|
772
|
+
}, z.core.$strip>;
|
|
773
|
+
readonly paginationDefaultEnabled = true;
|
|
754
774
|
private readonly userId;
|
|
755
775
|
constructor(userId: string, options?: {
|
|
756
776
|
query?: DeliveriesQueryParams;
|
|
757
777
|
});
|
|
758
778
|
getPath(): string;
|
|
759
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Delivery>;
|
|
760
779
|
}
|
|
761
780
|
|
|
762
781
|
declare const getDeliveryDetailsInputSchema: z.ZodUndefined;
|
|
@@ -1311,9 +1330,9 @@ declare const getDeliveryFeesResponseSchema: z.ZodObject<{
|
|
|
1311
1330
|
}, z.core.$strip>;
|
|
1312
1331
|
type GetDeliveryFeesResponse = z.infer<typeof getDeliveryFeesResponseSchema>;
|
|
1313
1332
|
declare class GetDeliveryFees extends AbstractApiRequest<typeof getDeliveryFeesInputSchema, typeof getDeliveryFeesResponseSchema, GetDeliveryFeesQueryParams> {
|
|
1314
|
-
readonly method
|
|
1315
|
-
readonly contentType
|
|
1316
|
-
readonly accept
|
|
1333
|
+
readonly method: "GET";
|
|
1334
|
+
readonly contentType: "application/json";
|
|
1335
|
+
readonly accept: "application/json";
|
|
1317
1336
|
readonly inputSchema: z.ZodUndefined;
|
|
1318
1337
|
readonly outputSchema: z.ZodObject<{
|
|
1319
1338
|
data: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1409,11 +1428,53 @@ declare class GetDeliveryFees extends AbstractApiRequest<typeof getDeliveryFeesI
|
|
|
1409
1428
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1410
1429
|
}, z.core.$strip>;
|
|
1411
1430
|
readonly headersSchema: undefined;
|
|
1431
|
+
readonly listItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1432
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1433
|
+
netAmount: z.ZodString;
|
|
1434
|
+
taxAmount: z.ZodString;
|
|
1435
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1436
|
+
createdAt: z.ZodString;
|
|
1437
|
+
updatedAt: z.ZodString;
|
|
1438
|
+
id: z.ZodString;
|
|
1439
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1440
|
+
type: z.ZodLiteral<"amount">;
|
|
1441
|
+
settings: z.ZodObject<{
|
|
1442
|
+
min: z.ZodCoercedNumber<unknown>;
|
|
1443
|
+
max: z.ZodCoercedNumber<unknown>;
|
|
1444
|
+
}, z.core.$strip>;
|
|
1445
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1446
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1447
|
+
netAmount: z.ZodString;
|
|
1448
|
+
taxAmount: z.ZodString;
|
|
1449
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1450
|
+
createdAt: z.ZodString;
|
|
1451
|
+
updatedAt: z.ZodString;
|
|
1452
|
+
id: z.ZodString;
|
|
1453
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1454
|
+
type: z.ZodLiteral<"distance">;
|
|
1455
|
+
settings: z.ZodObject<{
|
|
1456
|
+
min: z.ZodCoercedNumber<unknown>;
|
|
1457
|
+
max: z.ZodCoercedNumber<unknown>;
|
|
1458
|
+
}, z.core.$strip>;
|
|
1459
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1460
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1461
|
+
netAmount: z.ZodString;
|
|
1462
|
+
taxAmount: z.ZodString;
|
|
1463
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1464
|
+
createdAt: z.ZodString;
|
|
1465
|
+
updatedAt: z.ZodString;
|
|
1466
|
+
id: z.ZodString;
|
|
1467
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1468
|
+
type: z.ZodLiteral<"postal_code">;
|
|
1469
|
+
settings: z.ZodObject<{
|
|
1470
|
+
values: z.ZodArray<z.ZodString>;
|
|
1471
|
+
}, z.core.$strip>;
|
|
1472
|
+
}, z.core.$strip>]>;
|
|
1473
|
+
readonly paginationDefaultEnabled = true;
|
|
1412
1474
|
constructor(options?: {
|
|
1413
1475
|
query?: DeliveryFeesQueryParams;
|
|
1414
1476
|
});
|
|
1415
1477
|
getPath(): string;
|
|
1416
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<DeliveryFeeListItem>;
|
|
1417
1478
|
}
|
|
1418
1479
|
|
|
1419
1480
|
declare const getDeliveryFeesFromPointOfSaleQuerySchema: z.ZodObject<{
|
|
@@ -1504,9 +1565,9 @@ declare const getDeliveryFeesFromPointOfSaleResponseSchema: z.ZodArray<z.ZodDisc
|
|
|
1504
1565
|
}, z.core.$strip>]>>;
|
|
1505
1566
|
type GetDeliveryFeesFromPointOfSaleResponse = z.infer<typeof getDeliveryFeesFromPointOfSaleResponseSchema>;
|
|
1506
1567
|
declare class GetDeliveryFeesFromPointOfSale extends AbstractApiRequest<typeof getDeliveryFeesFromPointOfSaleInputSchema, typeof getDeliveryFeesFromPointOfSaleResponseSchema, GetDeliveryFeesFromPointOfSaleQueryParams> {
|
|
1507
|
-
readonly method
|
|
1508
|
-
readonly contentType
|
|
1509
|
-
readonly accept
|
|
1568
|
+
readonly method: "GET";
|
|
1569
|
+
readonly contentType: "application/json";
|
|
1570
|
+
readonly accept: "application/json";
|
|
1510
1571
|
readonly inputSchema: z.ZodUndefined;
|
|
1511
1572
|
readonly outputSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1512
1573
|
amount: z.ZodDefault<z.ZodString>;
|
|
@@ -1592,12 +1653,54 @@ declare class GetDeliveryFeesFromPointOfSale extends AbstractApiRequest<typeof g
|
|
|
1592
1653
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1593
1654
|
}, z.core.$strip>;
|
|
1594
1655
|
readonly headersSchema: undefined;
|
|
1656
|
+
readonly listItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1657
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1658
|
+
netAmount: z.ZodString;
|
|
1659
|
+
taxAmount: z.ZodString;
|
|
1660
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1661
|
+
createdAt: z.ZodString;
|
|
1662
|
+
updatedAt: z.ZodString;
|
|
1663
|
+
id: z.ZodString;
|
|
1664
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1665
|
+
type: z.ZodLiteral<"amount">;
|
|
1666
|
+
settings: z.ZodObject<{
|
|
1667
|
+
min: z.ZodCoercedNumber<unknown>;
|
|
1668
|
+
max: z.ZodCoercedNumber<unknown>;
|
|
1669
|
+
}, z.core.$strip>;
|
|
1670
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1671
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1672
|
+
netAmount: z.ZodString;
|
|
1673
|
+
taxAmount: z.ZodString;
|
|
1674
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1675
|
+
createdAt: z.ZodString;
|
|
1676
|
+
updatedAt: z.ZodString;
|
|
1677
|
+
id: z.ZodString;
|
|
1678
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1679
|
+
type: z.ZodLiteral<"distance">;
|
|
1680
|
+
settings: z.ZodObject<{
|
|
1681
|
+
min: z.ZodCoercedNumber<unknown>;
|
|
1682
|
+
max: z.ZodCoercedNumber<unknown>;
|
|
1683
|
+
}, z.core.$strip>;
|
|
1684
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1685
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1686
|
+
netAmount: z.ZodString;
|
|
1687
|
+
taxAmount: z.ZodString;
|
|
1688
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1689
|
+
createdAt: z.ZodString;
|
|
1690
|
+
updatedAt: z.ZodString;
|
|
1691
|
+
id: z.ZodString;
|
|
1692
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1693
|
+
type: z.ZodLiteral<"postal_code">;
|
|
1694
|
+
settings: z.ZodObject<{
|
|
1695
|
+
values: z.ZodArray<z.ZodString>;
|
|
1696
|
+
}, z.core.$strip>;
|
|
1697
|
+
}, z.core.$strip>]>;
|
|
1698
|
+
readonly paginationDefaultEnabled = false;
|
|
1595
1699
|
private readonly pointOfSaleId;
|
|
1596
1700
|
constructor(pointOfSaleId: string, options?: {
|
|
1597
1701
|
query?: DeliveryFeesQueryParams;
|
|
1598
1702
|
});
|
|
1599
1703
|
getPath(): string;
|
|
1600
|
-
parseResponse(data: unknown): DeliveryFeeListItem[];
|
|
1601
1704
|
}
|
|
1602
1705
|
|
|
1603
1706
|
declare const updateDeliveryFeeInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1889,9 +1992,9 @@ declare const getDeliveryPositionsResponseSchema: z.ZodObject<{
|
|
|
1889
1992
|
}, z.core.$strip>;
|
|
1890
1993
|
type GetDeliveryPositionsResponse = z.infer<typeof getDeliveryPositionsResponseSchema>;
|
|
1891
1994
|
declare class GetDeliveryPositions extends AbstractApiRequest<typeof getDeliveryPositionsInputSchema, typeof getDeliveryPositionsResponseSchema, GetDeliveryPositionsQueryParams> {
|
|
1892
|
-
readonly method
|
|
1893
|
-
readonly contentType
|
|
1894
|
-
readonly accept
|
|
1995
|
+
readonly method: "GET";
|
|
1996
|
+
readonly contentType: "application/json";
|
|
1997
|
+
readonly accept: "application/json";
|
|
1895
1998
|
readonly inputSchema: z.ZodUndefined;
|
|
1896
1999
|
readonly outputSchema: z.ZodObject<{
|
|
1897
2000
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -1933,11 +2036,21 @@ declare class GetDeliveryPositions extends AbstractApiRequest<typeof getDelivery
|
|
|
1933
2036
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1934
2037
|
}, z.core.$strip>;
|
|
1935
2038
|
readonly headersSchema: undefined;
|
|
2039
|
+
readonly listItemSchema: z.ZodObject<{
|
|
2040
|
+
id: z.ZodString;
|
|
2041
|
+
delivery: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown>>;
|
|
2042
|
+
position: z.ZodObject<{
|
|
2043
|
+
latitude: z.ZodNumber;
|
|
2044
|
+
longitude: z.ZodNumber;
|
|
2045
|
+
}, z.core.$strip>;
|
|
2046
|
+
createdAt: z.ZodString;
|
|
2047
|
+
updatedAt: z.ZodString;
|
|
2048
|
+
}, z.core.$strip>;
|
|
2049
|
+
readonly paginationDefaultEnabled = true;
|
|
1936
2050
|
constructor(options?: {
|
|
1937
2051
|
query?: DeliveryPositionsQueryParams;
|
|
1938
2052
|
});
|
|
1939
2053
|
getPath(): string;
|
|
1940
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<DeliveryPosition>;
|
|
1941
2054
|
}
|
|
1942
2055
|
|
|
1943
2056
|
declare const getDeliveryPositionsFromDeliveryQuerySchema: z.ZodObject<{
|
|
@@ -1974,9 +2087,9 @@ declare const getDeliveryPositionsFromDeliveryResponseSchema: z.ZodArray<z.ZodOb
|
|
|
1974
2087
|
}, z.core.$strip>>;
|
|
1975
2088
|
type GetDeliveryPositionsFromDeliveryResponse = z.infer<typeof getDeliveryPositionsFromDeliveryResponseSchema>;
|
|
1976
2089
|
declare class GetDeliveryPositionsFromDelivery extends AbstractApiRequest<typeof getDeliveryPositionsFromDeliveryInputSchema, typeof getDeliveryPositionsFromDeliveryResponseSchema, GetDeliveryPositionsFromDeliveryQueryParams> {
|
|
1977
|
-
readonly method
|
|
1978
|
-
readonly contentType
|
|
1979
|
-
readonly accept
|
|
2090
|
+
readonly method: "GET";
|
|
2091
|
+
readonly contentType: "application/json";
|
|
2092
|
+
readonly accept: "application/json";
|
|
1980
2093
|
readonly inputSchema: z.ZodUndefined;
|
|
1981
2094
|
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
1982
2095
|
id: z.ZodString;
|
|
@@ -2008,12 +2121,22 @@ declare class GetDeliveryPositionsFromDelivery extends AbstractApiRequest<typeof
|
|
|
2008
2121
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
2009
2122
|
}, z.core.$strip>;
|
|
2010
2123
|
readonly headersSchema: undefined;
|
|
2124
|
+
readonly listItemSchema: z.ZodObject<{
|
|
2125
|
+
id: z.ZodString;
|
|
2126
|
+
delivery: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown>>;
|
|
2127
|
+
position: z.ZodObject<{
|
|
2128
|
+
latitude: z.ZodNumber;
|
|
2129
|
+
longitude: z.ZodNumber;
|
|
2130
|
+
}, z.core.$strip>;
|
|
2131
|
+
createdAt: z.ZodString;
|
|
2132
|
+
updatedAt: z.ZodString;
|
|
2133
|
+
}, z.core.$strip>;
|
|
2134
|
+
readonly paginationDefaultEnabled = false;
|
|
2011
2135
|
private readonly deliveryId;
|
|
2012
2136
|
constructor(deliveryId: string, options?: {
|
|
2013
2137
|
query?: DeliveryPositionsQueryParams;
|
|
2014
2138
|
});
|
|
2015
2139
|
getPath(): string;
|
|
2016
|
-
parseResponse(data: unknown): DeliveryPosition[];
|
|
2017
2140
|
}
|
|
2018
2141
|
|
|
2019
2142
|
declare const deliveryIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown>>;
|
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
|
export { DeliveryFeeType, deliveryFeeTypeSchema, deliveryFeeTypes } from '@deliverart/sdk-js-global-types';
|
|
4
3
|
import { z } from 'zod';
|
|
5
4
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
@@ -543,9 +542,9 @@ declare const getDeliveriesResponseSchema: z.ZodObject<{
|
|
|
543
542
|
}, z.core.$strip>;
|
|
544
543
|
type GetDeliveriesResponse = z.infer<typeof getDeliveriesResponseSchema>;
|
|
545
544
|
declare class GetDeliveries extends AbstractApiRequest<typeof getDeliveriesInputSchema, typeof getDeliveriesResponseSchema, GetDeliveriesQueryParams> {
|
|
546
|
-
readonly method
|
|
547
|
-
readonly contentType
|
|
548
|
-
readonly accept
|
|
545
|
+
readonly method: "GET";
|
|
546
|
+
readonly contentType: "application/json";
|
|
547
|
+
readonly accept: "application/json";
|
|
549
548
|
readonly inputSchema: z.ZodUndefined;
|
|
550
549
|
readonly outputSchema: z.ZodObject<{
|
|
551
550
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -610,11 +609,21 @@ declare class GetDeliveries extends AbstractApiRequest<typeof getDeliveriesInput
|
|
|
610
609
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
611
610
|
}, z.core.$strip>;
|
|
612
611
|
readonly headersSchema: undefined;
|
|
612
|
+
readonly listItemSchema: z.ZodObject<{
|
|
613
|
+
id: z.ZodString;
|
|
614
|
+
bundle: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/bundles/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/bundles/:id">, unknown>>;
|
|
615
|
+
deliveryUser: 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>>;
|
|
616
|
+
currentOrder: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/orders/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/orders/:id"> | null, unknown>>;
|
|
617
|
+
startedAt: z.ZodNullable<z.ZodString>;
|
|
618
|
+
endedAt: z.ZodNullable<z.ZodString>;
|
|
619
|
+
createdAt: z.ZodString;
|
|
620
|
+
updatedAt: z.ZodString;
|
|
621
|
+
}, z.core.$strip>;
|
|
622
|
+
readonly paginationDefaultEnabled = true;
|
|
613
623
|
constructor(options?: {
|
|
614
624
|
query?: DeliveriesQueryParams;
|
|
615
625
|
});
|
|
616
626
|
getPath(): string;
|
|
617
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Delivery>;
|
|
618
627
|
}
|
|
619
628
|
|
|
620
629
|
declare const getDeliveriesFromUserQuerySchema: z.ZodObject<{
|
|
@@ -684,9 +693,9 @@ declare const getDeliveriesFromUserResponseSchema: z.ZodObject<{
|
|
|
684
693
|
}, z.core.$strip>;
|
|
685
694
|
type GetDeliveriesFromUserResponse = z.infer<typeof getDeliveriesFromUserResponseSchema>;
|
|
686
695
|
declare class GetDeliveriesFromUser extends AbstractApiRequest<typeof getDeliveriesFromUserInputSchema, typeof getDeliveriesFromUserResponseSchema, GetDeliveriesFromUserQueryParams> {
|
|
687
|
-
readonly method
|
|
688
|
-
readonly contentType
|
|
689
|
-
readonly accept
|
|
696
|
+
readonly method: "GET";
|
|
697
|
+
readonly contentType: "application/json";
|
|
698
|
+
readonly accept: "application/json";
|
|
690
699
|
readonly inputSchema: z.ZodUndefined;
|
|
691
700
|
readonly outputSchema: z.ZodObject<{
|
|
692
701
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -751,12 +760,22 @@ declare class GetDeliveriesFromUser extends AbstractApiRequest<typeof getDeliver
|
|
|
751
760
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
752
761
|
}, z.core.$strip>;
|
|
753
762
|
readonly headersSchema: undefined;
|
|
763
|
+
readonly listItemSchema: z.ZodObject<{
|
|
764
|
+
id: z.ZodString;
|
|
765
|
+
bundle: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/bundles/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/bundles/:id">, unknown>>;
|
|
766
|
+
deliveryUser: 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>>;
|
|
767
|
+
currentOrder: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/orders/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/orders/:id"> | null, unknown>>;
|
|
768
|
+
startedAt: z.ZodNullable<z.ZodString>;
|
|
769
|
+
endedAt: z.ZodNullable<z.ZodString>;
|
|
770
|
+
createdAt: z.ZodString;
|
|
771
|
+
updatedAt: z.ZodString;
|
|
772
|
+
}, z.core.$strip>;
|
|
773
|
+
readonly paginationDefaultEnabled = true;
|
|
754
774
|
private readonly userId;
|
|
755
775
|
constructor(userId: string, options?: {
|
|
756
776
|
query?: DeliveriesQueryParams;
|
|
757
777
|
});
|
|
758
778
|
getPath(): string;
|
|
759
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Delivery>;
|
|
760
779
|
}
|
|
761
780
|
|
|
762
781
|
declare const getDeliveryDetailsInputSchema: z.ZodUndefined;
|
|
@@ -1311,9 +1330,9 @@ declare const getDeliveryFeesResponseSchema: z.ZodObject<{
|
|
|
1311
1330
|
}, z.core.$strip>;
|
|
1312
1331
|
type GetDeliveryFeesResponse = z.infer<typeof getDeliveryFeesResponseSchema>;
|
|
1313
1332
|
declare class GetDeliveryFees extends AbstractApiRequest<typeof getDeliveryFeesInputSchema, typeof getDeliveryFeesResponseSchema, GetDeliveryFeesQueryParams> {
|
|
1314
|
-
readonly method
|
|
1315
|
-
readonly contentType
|
|
1316
|
-
readonly accept
|
|
1333
|
+
readonly method: "GET";
|
|
1334
|
+
readonly contentType: "application/json";
|
|
1335
|
+
readonly accept: "application/json";
|
|
1317
1336
|
readonly inputSchema: z.ZodUndefined;
|
|
1318
1337
|
readonly outputSchema: z.ZodObject<{
|
|
1319
1338
|
data: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1409,11 +1428,53 @@ declare class GetDeliveryFees extends AbstractApiRequest<typeof getDeliveryFeesI
|
|
|
1409
1428
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1410
1429
|
}, z.core.$strip>;
|
|
1411
1430
|
readonly headersSchema: undefined;
|
|
1431
|
+
readonly listItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1432
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1433
|
+
netAmount: z.ZodString;
|
|
1434
|
+
taxAmount: z.ZodString;
|
|
1435
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1436
|
+
createdAt: z.ZodString;
|
|
1437
|
+
updatedAt: z.ZodString;
|
|
1438
|
+
id: z.ZodString;
|
|
1439
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1440
|
+
type: z.ZodLiteral<"amount">;
|
|
1441
|
+
settings: z.ZodObject<{
|
|
1442
|
+
min: z.ZodCoercedNumber<unknown>;
|
|
1443
|
+
max: z.ZodCoercedNumber<unknown>;
|
|
1444
|
+
}, z.core.$strip>;
|
|
1445
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1446
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1447
|
+
netAmount: z.ZodString;
|
|
1448
|
+
taxAmount: z.ZodString;
|
|
1449
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1450
|
+
createdAt: z.ZodString;
|
|
1451
|
+
updatedAt: z.ZodString;
|
|
1452
|
+
id: z.ZodString;
|
|
1453
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1454
|
+
type: z.ZodLiteral<"distance">;
|
|
1455
|
+
settings: z.ZodObject<{
|
|
1456
|
+
min: z.ZodCoercedNumber<unknown>;
|
|
1457
|
+
max: z.ZodCoercedNumber<unknown>;
|
|
1458
|
+
}, z.core.$strip>;
|
|
1459
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1460
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1461
|
+
netAmount: z.ZodString;
|
|
1462
|
+
taxAmount: z.ZodString;
|
|
1463
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1464
|
+
createdAt: z.ZodString;
|
|
1465
|
+
updatedAt: z.ZodString;
|
|
1466
|
+
id: z.ZodString;
|
|
1467
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1468
|
+
type: z.ZodLiteral<"postal_code">;
|
|
1469
|
+
settings: z.ZodObject<{
|
|
1470
|
+
values: z.ZodArray<z.ZodString>;
|
|
1471
|
+
}, z.core.$strip>;
|
|
1472
|
+
}, z.core.$strip>]>;
|
|
1473
|
+
readonly paginationDefaultEnabled = true;
|
|
1412
1474
|
constructor(options?: {
|
|
1413
1475
|
query?: DeliveryFeesQueryParams;
|
|
1414
1476
|
});
|
|
1415
1477
|
getPath(): string;
|
|
1416
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<DeliveryFeeListItem>;
|
|
1417
1478
|
}
|
|
1418
1479
|
|
|
1419
1480
|
declare const getDeliveryFeesFromPointOfSaleQuerySchema: z.ZodObject<{
|
|
@@ -1504,9 +1565,9 @@ declare const getDeliveryFeesFromPointOfSaleResponseSchema: z.ZodArray<z.ZodDisc
|
|
|
1504
1565
|
}, z.core.$strip>]>>;
|
|
1505
1566
|
type GetDeliveryFeesFromPointOfSaleResponse = z.infer<typeof getDeliveryFeesFromPointOfSaleResponseSchema>;
|
|
1506
1567
|
declare class GetDeliveryFeesFromPointOfSale extends AbstractApiRequest<typeof getDeliveryFeesFromPointOfSaleInputSchema, typeof getDeliveryFeesFromPointOfSaleResponseSchema, GetDeliveryFeesFromPointOfSaleQueryParams> {
|
|
1507
|
-
readonly method
|
|
1508
|
-
readonly contentType
|
|
1509
|
-
readonly accept
|
|
1568
|
+
readonly method: "GET";
|
|
1569
|
+
readonly contentType: "application/json";
|
|
1570
|
+
readonly accept: "application/json";
|
|
1510
1571
|
readonly inputSchema: z.ZodUndefined;
|
|
1511
1572
|
readonly outputSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1512
1573
|
amount: z.ZodDefault<z.ZodString>;
|
|
@@ -1592,12 +1653,54 @@ declare class GetDeliveryFeesFromPointOfSale extends AbstractApiRequest<typeof g
|
|
|
1592
1653
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1593
1654
|
}, z.core.$strip>;
|
|
1594
1655
|
readonly headersSchema: undefined;
|
|
1656
|
+
readonly listItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1657
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1658
|
+
netAmount: z.ZodString;
|
|
1659
|
+
taxAmount: z.ZodString;
|
|
1660
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1661
|
+
createdAt: z.ZodString;
|
|
1662
|
+
updatedAt: z.ZodString;
|
|
1663
|
+
id: z.ZodString;
|
|
1664
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1665
|
+
type: z.ZodLiteral<"amount">;
|
|
1666
|
+
settings: z.ZodObject<{
|
|
1667
|
+
min: z.ZodCoercedNumber<unknown>;
|
|
1668
|
+
max: z.ZodCoercedNumber<unknown>;
|
|
1669
|
+
}, z.core.$strip>;
|
|
1670
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1671
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1672
|
+
netAmount: z.ZodString;
|
|
1673
|
+
taxAmount: z.ZodString;
|
|
1674
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1675
|
+
createdAt: z.ZodString;
|
|
1676
|
+
updatedAt: z.ZodString;
|
|
1677
|
+
id: z.ZodString;
|
|
1678
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1679
|
+
type: z.ZodLiteral<"distance">;
|
|
1680
|
+
settings: z.ZodObject<{
|
|
1681
|
+
min: z.ZodCoercedNumber<unknown>;
|
|
1682
|
+
max: z.ZodCoercedNumber<unknown>;
|
|
1683
|
+
}, z.core.$strip>;
|
|
1684
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1685
|
+
amount: z.ZodDefault<z.ZodString>;
|
|
1686
|
+
netAmount: z.ZodString;
|
|
1687
|
+
taxAmount: z.ZodString;
|
|
1688
|
+
taxRate: z.ZodCoercedNumber<unknown>;
|
|
1689
|
+
createdAt: z.ZodString;
|
|
1690
|
+
updatedAt: z.ZodString;
|
|
1691
|
+
id: z.ZodString;
|
|
1692
|
+
pointOfSale: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>>;
|
|
1693
|
+
type: z.ZodLiteral<"postal_code">;
|
|
1694
|
+
settings: z.ZodObject<{
|
|
1695
|
+
values: z.ZodArray<z.ZodString>;
|
|
1696
|
+
}, z.core.$strip>;
|
|
1697
|
+
}, z.core.$strip>]>;
|
|
1698
|
+
readonly paginationDefaultEnabled = false;
|
|
1595
1699
|
private readonly pointOfSaleId;
|
|
1596
1700
|
constructor(pointOfSaleId: string, options?: {
|
|
1597
1701
|
query?: DeliveryFeesQueryParams;
|
|
1598
1702
|
});
|
|
1599
1703
|
getPath(): string;
|
|
1600
|
-
parseResponse(data: unknown): DeliveryFeeListItem[];
|
|
1601
1704
|
}
|
|
1602
1705
|
|
|
1603
1706
|
declare const updateDeliveryFeeInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1889,9 +1992,9 @@ declare const getDeliveryPositionsResponseSchema: z.ZodObject<{
|
|
|
1889
1992
|
}, z.core.$strip>;
|
|
1890
1993
|
type GetDeliveryPositionsResponse = z.infer<typeof getDeliveryPositionsResponseSchema>;
|
|
1891
1994
|
declare class GetDeliveryPositions extends AbstractApiRequest<typeof getDeliveryPositionsInputSchema, typeof getDeliveryPositionsResponseSchema, GetDeliveryPositionsQueryParams> {
|
|
1892
|
-
readonly method
|
|
1893
|
-
readonly contentType
|
|
1894
|
-
readonly accept
|
|
1995
|
+
readonly method: "GET";
|
|
1996
|
+
readonly contentType: "application/json";
|
|
1997
|
+
readonly accept: "application/json";
|
|
1895
1998
|
readonly inputSchema: z.ZodUndefined;
|
|
1896
1999
|
readonly outputSchema: z.ZodObject<{
|
|
1897
2000
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -1933,11 +2036,21 @@ declare class GetDeliveryPositions extends AbstractApiRequest<typeof getDelivery
|
|
|
1933
2036
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
1934
2037
|
}, z.core.$strip>;
|
|
1935
2038
|
readonly headersSchema: undefined;
|
|
2039
|
+
readonly listItemSchema: z.ZodObject<{
|
|
2040
|
+
id: z.ZodString;
|
|
2041
|
+
delivery: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown>>;
|
|
2042
|
+
position: z.ZodObject<{
|
|
2043
|
+
latitude: z.ZodNumber;
|
|
2044
|
+
longitude: z.ZodNumber;
|
|
2045
|
+
}, z.core.$strip>;
|
|
2046
|
+
createdAt: z.ZodString;
|
|
2047
|
+
updatedAt: z.ZodString;
|
|
2048
|
+
}, z.core.$strip>;
|
|
2049
|
+
readonly paginationDefaultEnabled = true;
|
|
1936
2050
|
constructor(options?: {
|
|
1937
2051
|
query?: DeliveryPositionsQueryParams;
|
|
1938
2052
|
});
|
|
1939
2053
|
getPath(): string;
|
|
1940
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<DeliveryPosition>;
|
|
1941
2054
|
}
|
|
1942
2055
|
|
|
1943
2056
|
declare const getDeliveryPositionsFromDeliveryQuerySchema: z.ZodObject<{
|
|
@@ -1974,9 +2087,9 @@ declare const getDeliveryPositionsFromDeliveryResponseSchema: z.ZodArray<z.ZodOb
|
|
|
1974
2087
|
}, z.core.$strip>>;
|
|
1975
2088
|
type GetDeliveryPositionsFromDeliveryResponse = z.infer<typeof getDeliveryPositionsFromDeliveryResponseSchema>;
|
|
1976
2089
|
declare class GetDeliveryPositionsFromDelivery extends AbstractApiRequest<typeof getDeliveryPositionsFromDeliveryInputSchema, typeof getDeliveryPositionsFromDeliveryResponseSchema, GetDeliveryPositionsFromDeliveryQueryParams> {
|
|
1977
|
-
readonly method
|
|
1978
|
-
readonly contentType
|
|
1979
|
-
readonly accept
|
|
2090
|
+
readonly method: "GET";
|
|
2091
|
+
readonly contentType: "application/json";
|
|
2092
|
+
readonly accept: "application/json";
|
|
1980
2093
|
readonly inputSchema: z.ZodUndefined;
|
|
1981
2094
|
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
1982
2095
|
id: z.ZodString;
|
|
@@ -2008,12 +2121,22 @@ declare class GetDeliveryPositionsFromDelivery extends AbstractApiRequest<typeof
|
|
|
2008
2121
|
'updatedAt[strictly_after]': z.ZodOptional<z.ZodString>;
|
|
2009
2122
|
}, z.core.$strip>;
|
|
2010
2123
|
readonly headersSchema: undefined;
|
|
2124
|
+
readonly listItemSchema: z.ZodObject<{
|
|
2125
|
+
id: z.ZodString;
|
|
2126
|
+
delivery: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown>>;
|
|
2127
|
+
position: z.ZodObject<{
|
|
2128
|
+
latitude: z.ZodNumber;
|
|
2129
|
+
longitude: z.ZodNumber;
|
|
2130
|
+
}, z.core.$strip>;
|
|
2131
|
+
createdAt: z.ZodString;
|
|
2132
|
+
updatedAt: z.ZodString;
|
|
2133
|
+
}, z.core.$strip>;
|
|
2134
|
+
readonly paginationDefaultEnabled = false;
|
|
2011
2135
|
private readonly deliveryId;
|
|
2012
2136
|
constructor(deliveryId: string, options?: {
|
|
2013
2137
|
query?: DeliveryPositionsQueryParams;
|
|
2014
2138
|
});
|
|
2015
2139
|
getPath(): string;
|
|
2016
|
-
parseResponse(data: unknown): DeliveryPosition[];
|
|
2017
2140
|
}
|
|
2018
2141
|
|
|
2019
2142
|
declare const deliveryIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/deliveries/:id">, unknown>>;
|
package/dist/index.js
CHANGED
|
@@ -11426,10 +11426,7 @@ var EndDelivery = class extends AbstractApiRequest4 {
|
|
|
11426
11426
|
|
|
11427
11427
|
// src/requests/deliveries/GetDeliveries.ts
|
|
11428
11428
|
import { AbstractApiRequest as AbstractApiRequest5 } from "@deliverart/sdk-js-core";
|
|
11429
|
-
import {
|
|
11430
|
-
createPaginatedSchema,
|
|
11431
|
-
responseToPagination
|
|
11432
|
-
} from "@deliverart/sdk-js-global-types";
|
|
11429
|
+
import { createPaginatedSchema } from "@deliverart/sdk-js-global-types";
|
|
11433
11430
|
var getDeliveriesQuerySchema = deliveriesQuerySchema;
|
|
11434
11431
|
var getDeliveriesInputSchema = external_exports.undefined();
|
|
11435
11432
|
var getDeliveriesResponseSchema = createPaginatedSchema(deliverySchema);
|
|
@@ -11443,22 +11440,18 @@ var GetDeliveries = class extends AbstractApiRequest5 {
|
|
|
11443
11440
|
this.outputSchema = getDeliveriesResponseSchema;
|
|
11444
11441
|
this.querySchema = getDeliveriesQuerySchema;
|
|
11445
11442
|
this.headersSchema = void 0;
|
|
11443
|
+
// Declare list behavior
|
|
11444
|
+
this.listItemSchema = deliverySchema;
|
|
11445
|
+
this.paginationDefaultEnabled = true;
|
|
11446
11446
|
}
|
|
11447
11447
|
getPath() {
|
|
11448
11448
|
return "/deliveries";
|
|
11449
11449
|
}
|
|
11450
|
-
parseResponse(data, rawResponse) {
|
|
11451
|
-
const deliveries = external_exports.array(deliverySchema).parse(data);
|
|
11452
|
-
return this.validateOutput({ data: deliveries, pagination: responseToPagination(rawResponse) });
|
|
11453
|
-
}
|
|
11454
11450
|
};
|
|
11455
11451
|
|
|
11456
11452
|
// src/requests/deliveries/GetDeliveriesFromUser.ts
|
|
11457
11453
|
import { AbstractApiRequest as AbstractApiRequest6 } from "@deliverart/sdk-js-core";
|
|
11458
|
-
import {
|
|
11459
|
-
createPaginatedSchema as createPaginatedSchema2,
|
|
11460
|
-
responseToPagination as responseToPagination2
|
|
11461
|
-
} from "@deliverart/sdk-js-global-types";
|
|
11454
|
+
import { createPaginatedSchema as createPaginatedSchema2 } from "@deliverart/sdk-js-global-types";
|
|
11462
11455
|
var getDeliveriesFromUserQuerySchema = deliveriesQuerySchema;
|
|
11463
11456
|
var getDeliveriesFromUserInputSchema = external_exports.undefined();
|
|
11464
11457
|
var getDeliveriesFromUserResponseSchema = createPaginatedSchema2(deliverySchema);
|
|
@@ -11472,15 +11465,13 @@ var GetDeliveriesFromUser = class extends AbstractApiRequest6 {
|
|
|
11472
11465
|
this.outputSchema = getDeliveriesFromUserResponseSchema;
|
|
11473
11466
|
this.querySchema = getDeliveriesFromUserQuerySchema;
|
|
11474
11467
|
this.headersSchema = void 0;
|
|
11468
|
+
this.listItemSchema = deliverySchema;
|
|
11469
|
+
this.paginationDefaultEnabled = true;
|
|
11475
11470
|
this.userId = userId;
|
|
11476
11471
|
}
|
|
11477
11472
|
getPath() {
|
|
11478
11473
|
return `/users/${this.userId}/deliveries`;
|
|
11479
11474
|
}
|
|
11480
|
-
parseResponse(data, rawResponse) {
|
|
11481
|
-
const deliveries = external_exports.array(deliverySchema).parse(data);
|
|
11482
|
-
return this.validateOutput({ data: deliveries, pagination: responseToPagination2(rawResponse) });
|
|
11483
|
-
}
|
|
11484
11475
|
};
|
|
11485
11476
|
|
|
11486
11477
|
// src/requests/deliveries/GetDeliveryDetails.ts
|
|
@@ -11656,10 +11647,7 @@ var GetDeliveryFeeDetails = class extends AbstractApiRequest14 {
|
|
|
11656
11647
|
|
|
11657
11648
|
// src/requests/delivery_fees/GetDeliveryFees.ts
|
|
11658
11649
|
import { AbstractApiRequest as AbstractApiRequest15 } from "@deliverart/sdk-js-core";
|
|
11659
|
-
import {
|
|
11660
|
-
createPaginatedSchema as createPaginatedSchema3,
|
|
11661
|
-
responseToPagination as responseToPagination3
|
|
11662
|
-
} from "@deliverart/sdk-js-global-types";
|
|
11650
|
+
import { createPaginatedSchema as createPaginatedSchema3 } from "@deliverart/sdk-js-global-types";
|
|
11663
11651
|
var getDeliveryFeesQuerySchema = deliveryFeesQuerySchema;
|
|
11664
11652
|
var getDeliveryFeesInputSchema = external_exports.undefined();
|
|
11665
11653
|
var getDeliveryFeesResponseSchema = createPaginatedSchema3(deliveryFeeListItemSchema);
|
|
@@ -11673,17 +11661,12 @@ var GetDeliveryFees = class extends AbstractApiRequest15 {
|
|
|
11673
11661
|
this.outputSchema = getDeliveryFeesResponseSchema;
|
|
11674
11662
|
this.querySchema = getDeliveryFeesQuerySchema;
|
|
11675
11663
|
this.headersSchema = void 0;
|
|
11664
|
+
this.listItemSchema = deliveryFeeListItemSchema;
|
|
11665
|
+
this.paginationDefaultEnabled = true;
|
|
11676
11666
|
}
|
|
11677
11667
|
getPath() {
|
|
11678
11668
|
return "/delivery_fees";
|
|
11679
11669
|
}
|
|
11680
|
-
parseResponse(data, rawResponse) {
|
|
11681
|
-
const deliveryFees = external_exports.array(deliveryFeeListItemSchema).parse(data);
|
|
11682
|
-
return this.validateOutput({
|
|
11683
|
-
data: deliveryFees,
|
|
11684
|
-
pagination: responseToPagination3(rawResponse)
|
|
11685
|
-
});
|
|
11686
|
-
}
|
|
11687
11670
|
};
|
|
11688
11671
|
|
|
11689
11672
|
// src/requests/delivery_fees/GetDeliveryFeesFromPointOfSale.ts
|
|
@@ -11701,14 +11684,13 @@ var GetDeliveryFeesFromPointOfSale = class extends AbstractApiRequest16 {
|
|
|
11701
11684
|
this.outputSchema = getDeliveryFeesFromPointOfSaleResponseSchema;
|
|
11702
11685
|
this.querySchema = getDeliveryFeesFromPointOfSaleQuerySchema;
|
|
11703
11686
|
this.headersSchema = void 0;
|
|
11687
|
+
this.listItemSchema = deliveryFeeListItemSchema;
|
|
11688
|
+
this.paginationDefaultEnabled = false;
|
|
11704
11689
|
this.pointOfSaleId = pointOfSaleId;
|
|
11705
11690
|
}
|
|
11706
11691
|
getPath() {
|
|
11707
11692
|
return `/point_of_sales/${this.pointOfSaleId}/delivery_fees`;
|
|
11708
11693
|
}
|
|
11709
|
-
parseResponse(data) {
|
|
11710
|
-
return external_exports.array(deliveryFeeListItemSchema).parse(data);
|
|
11711
|
-
}
|
|
11712
11694
|
};
|
|
11713
11695
|
|
|
11714
11696
|
// src/requests/delivery_fees/UpdateDeliveryFee.ts
|
|
@@ -11797,10 +11779,7 @@ var GetDeliveryPositionDetails = class extends AbstractApiRequest20 {
|
|
|
11797
11779
|
|
|
11798
11780
|
// src/requests/delivery_positions/GetDeliveryPositions.ts
|
|
11799
11781
|
import { AbstractApiRequest as AbstractApiRequest21 } from "@deliverart/sdk-js-core";
|
|
11800
|
-
import {
|
|
11801
|
-
createPaginatedSchema as createPaginatedSchema4,
|
|
11802
|
-
responseToPagination as responseToPagination4
|
|
11803
|
-
} from "@deliverart/sdk-js-global-types";
|
|
11782
|
+
import { createPaginatedSchema as createPaginatedSchema4 } from "@deliverart/sdk-js-global-types";
|
|
11804
11783
|
var getDeliveryPositionsQuerySchema = deliveryPositionsQuerySchema;
|
|
11805
11784
|
var getDeliveryPositionsInputSchema = external_exports.undefined();
|
|
11806
11785
|
var getDeliveryPositionsResponseSchema = createPaginatedSchema4(deliveryPositionSchema);
|
|
@@ -11814,17 +11793,13 @@ var GetDeliveryPositions = class extends AbstractApiRequest21 {
|
|
|
11814
11793
|
this.outputSchema = getDeliveryPositionsResponseSchema;
|
|
11815
11794
|
this.querySchema = getDeliveryPositionsQuerySchema;
|
|
11816
11795
|
this.headersSchema = void 0;
|
|
11796
|
+
// Declare list behavior
|
|
11797
|
+
this.listItemSchema = deliveryPositionSchema;
|
|
11798
|
+
this.paginationDefaultEnabled = true;
|
|
11817
11799
|
}
|
|
11818
11800
|
getPath() {
|
|
11819
11801
|
return "/deliveries/positions";
|
|
11820
11802
|
}
|
|
11821
|
-
parseResponse(data, rawResponse) {
|
|
11822
|
-
const deliveryPositions = external_exports.array(deliveryPositionSchema).parse(data);
|
|
11823
|
-
return this.validateOutput({
|
|
11824
|
-
data: deliveryPositions,
|
|
11825
|
-
pagination: responseToPagination4(rawResponse)
|
|
11826
|
-
});
|
|
11827
|
-
}
|
|
11828
11803
|
};
|
|
11829
11804
|
|
|
11830
11805
|
// src/requests/delivery_positions/GetDeliveryPositionsFromDelivery.ts
|
|
@@ -11842,14 +11817,13 @@ var GetDeliveryPositionsFromDelivery = class extends AbstractApiRequest22 {
|
|
|
11842
11817
|
this.outputSchema = getDeliveryPositionsFromDeliveryResponseSchema;
|
|
11843
11818
|
this.querySchema = getDeliveryPositionsFromDeliveryQuerySchema;
|
|
11844
11819
|
this.headersSchema = void 0;
|
|
11820
|
+
this.listItemSchema = deliveryPositionSchema;
|
|
11821
|
+
this.paginationDefaultEnabled = false;
|
|
11845
11822
|
this.deliveryId = deliveryId;
|
|
11846
11823
|
}
|
|
11847
11824
|
getPath() {
|
|
11848
11825
|
return `/deliveries/${this.deliveryId}/positions`;
|
|
11849
11826
|
}
|
|
11850
|
-
parseResponse(data) {
|
|
11851
|
-
return external_exports.array(deliveryPositionSchema).parse(data);
|
|
11852
|
-
}
|
|
11853
11827
|
};
|
|
11854
11828
|
export {
|
|
11855
11829
|
CreateDelivery,
|
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.
|
|
4
|
+
"version": "2.6.0",
|
|
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.
|
|
22
|
-
"@deliverart/sdk-js-global-types": "2.
|
|
23
|
-
"@deliverart/sdk-js-point-of-sale": "2.
|
|
24
|
-
"@deliverart/sdk-js-
|
|
25
|
-
"@deliverart/sdk-js-
|
|
21
|
+
"@deliverart/sdk-js-core": "2.6.0",
|
|
22
|
+
"@deliverart/sdk-js-global-types": "2.6.0",
|
|
23
|
+
"@deliverart/sdk-js-point-of-sale": "2.6.0",
|
|
24
|
+
"@deliverart/sdk-js-user": "2.6.0",
|
|
25
|
+
"@deliverart/sdk-js-order": "2.6.0"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|