@chrt-inc/typescript-sdk 1.562.0 → 1.575.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/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/shipping/resources/docs/client/Client.d.ts +1 -11
- package/dist/cjs/api/resources/shipping/resources/docs/client/Client.js +1 -10
- package/dist/cjs/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.d.ts +2 -2
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.js +7 -7
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts +8 -6
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +32 -24
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.js +18 -10
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/taskGroupId/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/taskGroupId/client/Client.js +14 -14
- package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/Client.js +8 -8
- package/dist/cjs/api/resources/utils/index.d.ts +1 -1
- package/dist/cjs/api/resources/utils/index.js +1 -1
- package/dist/cjs/api/resources/utils/resources/dev/client/Client.d.ts +2 -13
- package/dist/cjs/api/resources/utils/resources/dev/client/Client.js +14 -13
- package/dist/cjs/api/resources/utils/resources/dev/index.d.ts +1 -0
- package/dist/cjs/api/resources/utils/resources/dev/index.js +1 -0
- package/dist/cjs/api/resources/utils/resources/dev/types/OrderBuilderStreamEvent.d.ts +27 -0
- package/dist/cjs/api/resources/utils/resources/dev/types/OrderBuilderStreamEvent.js +14 -0
- package/dist/cjs/api/resources/utils/resources/dev/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/utils/resources/dev/types/index.js +17 -0
- package/dist/cjs/api/resources/utils/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/utils/resources/index.js +1 -0
- package/dist/cjs/api/types/TaskClientUpdate1.d.ts +2 -0
- package/dist/cjs/core/index.d.ts +1 -0
- package/dist/cjs/core/index.js +1 -0
- package/dist/cjs/core/stream/Stream.d.ts +46 -0
- package/dist/cjs/core/stream/Stream.js +169 -0
- package/dist/cjs/core/stream/index.d.ts +1 -0
- package/dist/cjs/core/stream/index.js +5 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/shipping/resources/docs/client/Client.d.mts +1 -11
- package/dist/esm/api/resources/shipping/resources/docs/client/Client.mjs +1 -10
- package/dist/esm/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.d.mts +2 -2
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.mjs +7 -7
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +8 -6
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +32 -24
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.mjs +18 -10
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/taskGroupId/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/taskGroupId/client/Client.mjs +14 -14
- package/dist/esm/api/resources/shipping/resources/tasks/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/tasks/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/sharingSettings/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/tracking/resources/sharingSettings/client/Client.mjs +8 -8
- package/dist/esm/api/resources/utils/index.d.mts +1 -1
- package/dist/esm/api/resources/utils/index.mjs +1 -1
- package/dist/esm/api/resources/utils/resources/dev/client/Client.d.mts +2 -13
- package/dist/esm/api/resources/utils/resources/dev/client/Client.mjs +14 -13
- package/dist/esm/api/resources/utils/resources/dev/index.d.mts +1 -0
- package/dist/esm/api/resources/utils/resources/dev/index.mjs +1 -0
- package/dist/esm/api/resources/utils/resources/dev/types/OrderBuilderStreamEvent.d.mts +27 -0
- package/dist/esm/api/resources/utils/resources/dev/types/OrderBuilderStreamEvent.mjs +11 -0
- package/dist/esm/api/resources/utils/resources/dev/types/index.d.mts +1 -0
- package/dist/esm/api/resources/utils/resources/dev/types/index.mjs +1 -0
- package/dist/esm/api/resources/utils/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/utils/resources/index.mjs +1 -0
- package/dist/esm/api/types/TaskClientUpdate1.d.mts +2 -0
- package/dist/esm/core/index.d.mts +1 -0
- package/dist/esm/core/index.mjs +1 -0
- package/dist/esm/core/stream/Stream.d.mts +46 -0
- package/dist/esm/core/stream/Stream.mjs +164 -0
- package/dist/esm/core/stream/index.d.mts +1 -0
- package/dist/esm/core/stream/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +32 -25
|
@@ -32,19 +32,9 @@ export declare class Docs {
|
|
|
32
32
|
constructor(_options?: Docs.Options);
|
|
33
33
|
/**
|
|
34
34
|
* Generates a shipping document (BOL or POD) as a PDF for the given order. | authz_personas=[order_creator_org_operators] | (GenerateShippingDocReq) -> (PDF binary)
|
|
35
|
-
*
|
|
36
|
-
* @param {Chrt.shipping.GenerateShippingDocReq} request
|
|
37
|
-
* @param {Docs.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
-
*
|
|
39
35
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* await client.shipping.docs.postGenerateV1({
|
|
43
|
-
* order_id_or_short_id: "order_id_or_short_id",
|
|
44
|
-
* template: "pod"
|
|
45
|
-
* })
|
|
46
36
|
*/
|
|
47
|
-
postGenerateV1(request: Chrt.shipping.GenerateShippingDocReq, requestOptions?: Docs.RequestOptions): core.HttpResponsePromise<
|
|
37
|
+
postGenerateV1(request: Chrt.shipping.GenerateShippingDocReq, requestOptions?: Docs.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
48
38
|
private __postGenerateV1;
|
|
49
39
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
50
40
|
}
|
|
@@ -21,17 +21,7 @@ export class Docs {
|
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Generates a shipping document (BOL or POD) as a PDF for the given order. | authz_personas=[order_creator_org_operators] | (GenerateShippingDocReq) -> (PDF binary)
|
|
24
|
-
*
|
|
25
|
-
* @param {Chrt.shipping.GenerateShippingDocReq} request
|
|
26
|
-
* @param {Docs.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
-
*
|
|
28
24
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* await client.shipping.docs.postGenerateV1({
|
|
32
|
-
* order_id_or_short_id: "order_id_or_short_id",
|
|
33
|
-
* template: "pod"
|
|
34
|
-
* })
|
|
35
25
|
*/
|
|
36
26
|
postGenerateV1(request, requestOptions) {
|
|
37
27
|
return core.HttpResponsePromise.fromPromise(this.__postGenerateV1(request, requestOptions));
|
|
@@ -48,6 +38,7 @@ export class Docs {
|
|
|
48
38
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
49
39
|
requestType: "json",
|
|
50
40
|
body: request,
|
|
41
|
+
responseType: "binary-response",
|
|
51
42
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
52
43
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
53
44
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
package/dist/esm/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.d.mts
CHANGED
|
@@ -5,11 +5,11 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
*
|
|
8
|
+
* order_ref: "order_ref",
|
|
9
9
|
* template: "pod"
|
|
10
10
|
* }
|
|
11
11
|
*/
|
|
12
12
|
export interface GenerateShippingDocReq {
|
|
13
|
-
|
|
13
|
+
order_ref: string;
|
|
14
14
|
template: Chrt.ShippingDocTemplateEnum;
|
|
15
15
|
}
|
package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.d.mts
CHANGED
|
@@ -33,16 +33,16 @@ export declare class Expanded {
|
|
|
33
33
|
/**
|
|
34
34
|
* Fetches a single draft order with optional expanded related data. Any user in the org (with operator+ role) can access it. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpanded)
|
|
35
35
|
*
|
|
36
|
-
* @param {string}
|
|
36
|
+
* @param {string} orderRef - Order ID, short ID, or off-chrt reference ID
|
|
37
37
|
* @param {Chrt.OrderAndTaskGroupExpandedReq} request
|
|
38
38
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
39
|
*
|
|
40
40
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
|
-
* await client.shipping.orderDrafts.expanded.retrieveV1("
|
|
43
|
+
* await client.shipping.orderDrafts.expanded.retrieveV1("order_ref", {})
|
|
44
44
|
*/
|
|
45
|
-
retrieveV1(
|
|
45
|
+
retrieveV1(orderRef: string, request: Chrt.OrderAndTaskGroupExpandedReq, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpanded>;
|
|
46
46
|
private __retrieveV1;
|
|
47
47
|
/**
|
|
48
48
|
* Lists expanded draft orders for the organization with filtering, sorting, and pagination. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpandedListRes)
|
package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/expanded/client/Client.mjs
CHANGED
|
@@ -22,24 +22,24 @@ export class Expanded {
|
|
|
22
22
|
/**
|
|
23
23
|
* Fetches a single draft order with optional expanded related data. Any user in the org (with operator+ role) can access it. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpanded)
|
|
24
24
|
*
|
|
25
|
-
* @param {string}
|
|
25
|
+
* @param {string} orderRef - Order ID, short ID, or off-chrt reference ID
|
|
26
26
|
* @param {Chrt.OrderAndTaskGroupExpandedReq} request
|
|
27
27
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
-
* await client.shipping.orderDrafts.expanded.retrieveV1("
|
|
32
|
+
* await client.shipping.orderDrafts.expanded.retrieveV1("order_ref", {})
|
|
33
33
|
*/
|
|
34
|
-
retrieveV1(
|
|
35
|
-
return core.HttpResponsePromise.fromPromise(this.__retrieveV1(
|
|
34
|
+
retrieveV1(orderRef, request, requestOptions) {
|
|
35
|
+
return core.HttpResponsePromise.fromPromise(this.__retrieveV1(orderRef, request, requestOptions));
|
|
36
36
|
}
|
|
37
|
-
__retrieveV1(
|
|
37
|
+
__retrieveV1(orderRef, request, requestOptions) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
var _a, _b, _c, _d;
|
|
40
40
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
41
41
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
42
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/order_drafts/expanded/retrieve/v1/${encodeURIComponent(
|
|
42
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/order_drafts/expanded/retrieve/v1/${encodeURIComponent(orderRef)}`),
|
|
43
43
|
method: "POST",
|
|
44
44
|
headers: _headers,
|
|
45
45
|
contentType: "application/json",
|
|
@@ -73,7 +73,7 @@ export class Expanded {
|
|
|
73
73
|
rawResponse: _response.rawResponse,
|
|
74
74
|
});
|
|
75
75
|
case "timeout":
|
|
76
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/order_drafts/expanded/retrieve/v1/{
|
|
76
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/order_drafts/expanded/retrieve/v1/{order_ref}.");
|
|
77
77
|
case "unknown":
|
|
78
78
|
throw new errors.ChrtError({
|
|
79
79
|
message: _response.error.errorMessage,
|
package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts
CHANGED
|
@@ -33,30 +33,30 @@ export declare class Expanded {
|
|
|
33
33
|
/**
|
|
34
34
|
* Retrieves an expanded order with optional related data for shipper operators. | authz_personas=[shipper_org_operators] | (OrderAndTaskGroupExpandedReq) -> (OrderExpanded)
|
|
35
35
|
*
|
|
36
|
-
* @param {string}
|
|
36
|
+
* @param {string} orderRef - Order ID, short ID, or off-chrt reference ID
|
|
37
37
|
* @param {Chrt.OrderAndTaskGroupExpandedReq} request
|
|
38
38
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
39
|
*
|
|
40
40
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
|
-
* await client.shipping.orders.expanded.forShipperOperatorsV1("
|
|
43
|
+
* await client.shipping.orders.expanded.forShipperOperatorsV1("order_ref", {})
|
|
44
44
|
*/
|
|
45
|
-
forShipperOperatorsV1(
|
|
45
|
+
forShipperOperatorsV1(orderRef: string, request: Chrt.OrderAndTaskGroupExpandedReq, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderExpanded>;
|
|
46
46
|
private __forShipperOperatorsV1;
|
|
47
47
|
/**
|
|
48
48
|
* Retrieves an expanded order with optional related data for forwarder operators. | authz_personas=[forwarder_org_operators] | (OrderAndTaskGroupExpandedReq) -> (OrderExpanded)
|
|
49
49
|
*
|
|
50
|
-
* @param {string}
|
|
50
|
+
* @param {string} orderRef - Order ID, short ID, or off-chrt reference ID
|
|
51
51
|
* @param {Chrt.OrderAndTaskGroupExpandedReq} request
|
|
52
52
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
53
|
*
|
|
54
54
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
57
|
-
* await client.shipping.orders.expanded.forForwarderOperatorsV1("
|
|
57
|
+
* await client.shipping.orders.expanded.forForwarderOperatorsV1("order_ref", {})
|
|
58
58
|
*/
|
|
59
|
-
forForwarderOperatorsV1(
|
|
59
|
+
forForwarderOperatorsV1(orderRef: string, request: Chrt.OrderAndTaskGroupExpandedReq, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderExpanded>;
|
|
60
60
|
private __forForwarderOperatorsV1;
|
|
61
61
|
/**
|
|
62
62
|
* Lists expanded orders for forwarder operators with filtering, sorting, pagination, and optional search. | authz: allowed_org_types=[forwarder], min_org_role=operator | (OrderAndTaskGroupExpandedReq) -> (OrdersExpandedListRes)
|
|
@@ -85,6 +85,7 @@ export declare class Expanded {
|
|
|
85
85
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
86
86
|
* filter_order_cancelled_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
87
87
|
* filter_order_cancelled_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
88
|
+
* filter_order_cancelled: true,
|
|
88
89
|
* body: {}
|
|
89
90
|
* })
|
|
90
91
|
*/
|
|
@@ -117,6 +118,7 @@ export declare class Expanded {
|
|
|
117
118
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
118
119
|
* filter_order_cancelled_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
119
120
|
* filter_order_cancelled_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
121
|
+
* filter_order_cancelled: true,
|
|
120
122
|
* body: {}
|
|
121
123
|
* })
|
|
122
124
|
*/
|
package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs
CHANGED
|
@@ -22,24 +22,24 @@ export class Expanded {
|
|
|
22
22
|
/**
|
|
23
23
|
* Retrieves an expanded order with optional related data for shipper operators. | authz_personas=[shipper_org_operators] | (OrderAndTaskGroupExpandedReq) -> (OrderExpanded)
|
|
24
24
|
*
|
|
25
|
-
* @param {string}
|
|
25
|
+
* @param {string} orderRef - Order ID, short ID, or off-chrt reference ID
|
|
26
26
|
* @param {Chrt.OrderAndTaskGroupExpandedReq} request
|
|
27
27
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
-
* await client.shipping.orders.expanded.forShipperOperatorsV1("
|
|
32
|
+
* await client.shipping.orders.expanded.forShipperOperatorsV1("order_ref", {})
|
|
33
33
|
*/
|
|
34
|
-
forShipperOperatorsV1(
|
|
35
|
-
return core.HttpResponsePromise.fromPromise(this.__forShipperOperatorsV1(
|
|
34
|
+
forShipperOperatorsV1(orderRef, request, requestOptions) {
|
|
35
|
+
return core.HttpResponsePromise.fromPromise(this.__forShipperOperatorsV1(orderRef, request, requestOptions));
|
|
36
36
|
}
|
|
37
|
-
__forShipperOperatorsV1(
|
|
37
|
+
__forShipperOperatorsV1(orderRef, request, requestOptions) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
var _a, _b, _c, _d;
|
|
40
40
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
41
41
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
42
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/expanded/for_shipper_operators/v1/${encodeURIComponent(
|
|
42
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/expanded/for_shipper_operators/v1/${encodeURIComponent(orderRef)}`),
|
|
43
43
|
method: "POST",
|
|
44
44
|
headers: _headers,
|
|
45
45
|
contentType: "application/json",
|
|
@@ -73,7 +73,7 @@ export class Expanded {
|
|
|
73
73
|
rawResponse: _response.rawResponse,
|
|
74
74
|
});
|
|
75
75
|
case "timeout":
|
|
76
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/expanded/for_shipper_operators/v1/{
|
|
76
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/expanded/for_shipper_operators/v1/{order_ref}.");
|
|
77
77
|
case "unknown":
|
|
78
78
|
throw new errors.ChrtError({
|
|
79
79
|
message: _response.error.errorMessage,
|
|
@@ -85,24 +85,24 @@ export class Expanded {
|
|
|
85
85
|
/**
|
|
86
86
|
* Retrieves an expanded order with optional related data for forwarder operators. | authz_personas=[forwarder_org_operators] | (OrderAndTaskGroupExpandedReq) -> (OrderExpanded)
|
|
87
87
|
*
|
|
88
|
-
* @param {string}
|
|
88
|
+
* @param {string} orderRef - Order ID, short ID, or off-chrt reference ID
|
|
89
89
|
* @param {Chrt.OrderAndTaskGroupExpandedReq} request
|
|
90
90
|
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
91
91
|
*
|
|
92
92
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
|
-
* await client.shipping.orders.expanded.forForwarderOperatorsV1("
|
|
95
|
+
* await client.shipping.orders.expanded.forForwarderOperatorsV1("order_ref", {})
|
|
96
96
|
*/
|
|
97
|
-
forForwarderOperatorsV1(
|
|
98
|
-
return core.HttpResponsePromise.fromPromise(this.__forForwarderOperatorsV1(
|
|
97
|
+
forForwarderOperatorsV1(orderRef, request, requestOptions) {
|
|
98
|
+
return core.HttpResponsePromise.fromPromise(this.__forForwarderOperatorsV1(orderRef, request, requestOptions));
|
|
99
99
|
}
|
|
100
|
-
__forForwarderOperatorsV1(
|
|
100
|
+
__forForwarderOperatorsV1(orderRef, request, requestOptions) {
|
|
101
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
102
|
var _a, _b, _c, _d;
|
|
103
103
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
104
104
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
105
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/expanded/for_forwarder_operators/v1/${encodeURIComponent(
|
|
105
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/expanded/for_forwarder_operators/v1/${encodeURIComponent(orderRef)}`),
|
|
106
106
|
method: "POST",
|
|
107
107
|
headers: _headers,
|
|
108
108
|
contentType: "application/json",
|
|
@@ -136,7 +136,7 @@ export class Expanded {
|
|
|
136
136
|
rawResponse: _response.rawResponse,
|
|
137
137
|
});
|
|
138
138
|
case "timeout":
|
|
139
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/expanded/for_forwarder_operators/v1/{
|
|
139
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/expanded/for_forwarder_operators/v1/{order_ref}.");
|
|
140
140
|
case "unknown":
|
|
141
141
|
throw new errors.ChrtError({
|
|
142
142
|
message: _response.error.errorMessage,
|
|
@@ -172,6 +172,7 @@ export class Expanded {
|
|
|
172
172
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
173
173
|
* filter_order_cancelled_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
174
174
|
* filter_order_cancelled_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
175
|
+
* filter_order_cancelled: true,
|
|
175
176
|
* body: {}
|
|
176
177
|
* })
|
|
177
178
|
*/
|
|
@@ -180,8 +181,8 @@ export class Expanded {
|
|
|
180
181
|
}
|
|
181
182
|
__listForForwarderOperatorsV1(request, requestOptions) {
|
|
182
183
|
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
-
var _a, _b, _c, _d, _e, _f;
|
|
184
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_order_cancelled_at_timestamp_lte: filterOrderCancelledAtTimestampLte, filter_order_cancelled_at_timestamp_gte: filterOrderCancelledAtTimestampGte, body: _body, } = request;
|
|
184
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
185
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_order_cancelled_at_timestamp_lte: filterOrderCancelledAtTimestampLte, filter_order_cancelled_at_timestamp_gte: filterOrderCancelledAtTimestampGte, filter_order_cancelled: filterOrderCancelled, body: _body, } = request;
|
|
185
186
|
const _queryParams = {};
|
|
186
187
|
if (sortBy !== undefined) {
|
|
187
188
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -242,9 +243,12 @@ export class Expanded {
|
|
|
242
243
|
if (filterOrderCancelledAtTimestampGte !== undefined) {
|
|
243
244
|
_queryParams["filter_order_cancelled_at_timestamp_gte"] = filterOrderCancelledAtTimestampGte;
|
|
244
245
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
if (filterOrderCancelled !== undefined) {
|
|
247
|
+
_queryParams["filter_order_cancelled"] = (_c = filterOrderCancelled === null || filterOrderCancelled === void 0 ? void 0 : filterOrderCancelled.toString()) !== null && _c !== void 0 ? _c : null;
|
|
248
|
+
}
|
|
249
|
+
let _headers = mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
250
|
+
const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
|
|
251
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.ChrtEnvironment.Local, "shipping/orders/expanded/list/for_forwarder_operators/v1"),
|
|
248
252
|
method: "POST",
|
|
249
253
|
headers: _headers,
|
|
250
254
|
contentType: "application/json",
|
|
@@ -314,6 +318,7 @@ export class Expanded {
|
|
|
314
318
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
315
319
|
* filter_order_cancelled_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
316
320
|
* filter_order_cancelled_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
321
|
+
* filter_order_cancelled: true,
|
|
317
322
|
* body: {}
|
|
318
323
|
* })
|
|
319
324
|
*/
|
|
@@ -322,8 +327,8 @@ export class Expanded {
|
|
|
322
327
|
}
|
|
323
328
|
__listForShipperOperatorsV1(request, requestOptions) {
|
|
324
329
|
return __awaiter(this, void 0, void 0, function* () {
|
|
325
|
-
var _a, _b, _c, _d, _e, _f;
|
|
326
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_order_cancelled_at_timestamp_lte: filterOrderCancelledAtTimestampLte, filter_order_cancelled_at_timestamp_gte: filterOrderCancelledAtTimestampGte, body: _body, } = request;
|
|
330
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
331
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_order_cancelled_at_timestamp_lte: filterOrderCancelledAtTimestampLte, filter_order_cancelled_at_timestamp_gte: filterOrderCancelledAtTimestampGte, filter_order_cancelled: filterOrderCancelled, body: _body, } = request;
|
|
327
332
|
const _queryParams = {};
|
|
328
333
|
if (sortBy !== undefined) {
|
|
329
334
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -384,9 +389,12 @@ export class Expanded {
|
|
|
384
389
|
if (filterOrderCancelledAtTimestampGte !== undefined) {
|
|
385
390
|
_queryParams["filter_order_cancelled_at_timestamp_gte"] = filterOrderCancelledAtTimestampGte;
|
|
386
391
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
392
|
+
if (filterOrderCancelled !== undefined) {
|
|
393
|
+
_queryParams["filter_order_cancelled"] = (_c = filterOrderCancelled === null || filterOrderCancelled === void 0 ? void 0 : filterOrderCancelled.toString()) !== null && _c !== void 0 ? _c : null;
|
|
394
|
+
}
|
|
395
|
+
let _headers = mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
396
|
+
const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
|
|
397
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.ChrtEnvironment.Local, "shipping/orders/expanded/list/for_shipper_operators/v1"),
|
|
390
398
|
method: "POST",
|
|
391
399
|
headers: _headers,
|
|
392
400
|
contentType: "application/json",
|
|
@@ -22,6 +22,7 @@ import * as Chrt from "../../../../../../../../index.mjs";
|
|
|
22
22
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
23
23
|
* filter_order_cancelled_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
24
24
|
* filter_order_cancelled_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
25
|
+
* filter_order_cancelled: true,
|
|
25
26
|
* body: {}
|
|
26
27
|
* }
|
|
27
28
|
*/
|
|
@@ -46,5 +47,6 @@ export interface ExpandedListForForwarderOperatorsV1Request {
|
|
|
46
47
|
filter_exception_at_timestamp_gte?: string | null;
|
|
47
48
|
filter_order_cancelled_at_timestamp_lte?: string | null;
|
|
48
49
|
filter_order_cancelled_at_timestamp_gte?: string | null;
|
|
50
|
+
filter_order_cancelled?: boolean | null;
|
|
49
51
|
body: Chrt.OrderAndTaskGroupExpandedReq;
|
|
50
52
|
}
|
|
@@ -22,6 +22,7 @@ import * as Chrt from "../../../../../../../../index.mjs";
|
|
|
22
22
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
23
23
|
* filter_order_cancelled_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
24
24
|
* filter_order_cancelled_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
25
|
+
* filter_order_cancelled: true,
|
|
25
26
|
* body: {}
|
|
26
27
|
* }
|
|
27
28
|
*/
|
|
@@ -46,5 +47,6 @@ export interface ExpandedListForShipperOperatorsV1Request {
|
|
|
46
47
|
filter_exception_at_timestamp_gte?: string | null;
|
|
47
48
|
filter_order_cancelled_at_timestamp_lte?: string | null;
|
|
48
49
|
filter_order_cancelled_at_timestamp_gte?: string | null;
|
|
50
|
+
filter_order_cancelled?: boolean | null;
|
|
49
51
|
body: Chrt.OrderAndTaskGroupExpandedReq;
|
|
50
52
|
}
|
package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.d.mts
CHANGED
|
@@ -113,6 +113,7 @@ export declare class Expanded {
|
|
|
113
113
|
* filter_skipped_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
114
114
|
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
115
115
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
116
|
+
* filter_order_cancelled: true,
|
|
116
117
|
* body: {}
|
|
117
118
|
* })
|
|
118
119
|
*/
|
|
@@ -145,6 +146,7 @@ export declare class Expanded {
|
|
|
145
146
|
* filter_skipped_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
146
147
|
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
147
148
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
149
|
+
* filter_order_cancelled: true,
|
|
148
150
|
* body: {}
|
|
149
151
|
* })
|
|
150
152
|
*/
|
package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.mjs
CHANGED
|
@@ -298,6 +298,7 @@ export class Expanded {
|
|
|
298
298
|
* filter_skipped_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
299
299
|
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
300
300
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
301
|
+
* filter_order_cancelled: true,
|
|
301
302
|
* body: {}
|
|
302
303
|
* })
|
|
303
304
|
*/
|
|
@@ -306,8 +307,8 @@ export class Expanded {
|
|
|
306
307
|
}
|
|
307
308
|
__listForCourierOperatorsV1(request, requestOptions) {
|
|
308
309
|
return __awaiter(this, void 0, void 0, function* () {
|
|
309
|
-
var _a, _b, _c, _d, _e, _f;
|
|
310
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_skipped_at_timestamp_lte: filterSkippedAtTimestampLte, filter_skipped_at_timestamp_gte: filterSkippedAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, body: _body, } = request;
|
|
310
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
311
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_skipped_at_timestamp_lte: filterSkippedAtTimestampLte, filter_skipped_at_timestamp_gte: filterSkippedAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_order_cancelled: filterOrderCancelled, body: _body, } = request;
|
|
311
312
|
const _queryParams = {};
|
|
312
313
|
if (sortBy !== undefined) {
|
|
313
314
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -368,9 +369,12 @@ export class Expanded {
|
|
|
368
369
|
if (filterExceptionAtTimestampGte !== undefined) {
|
|
369
370
|
_queryParams["filter_exception_at_timestamp_gte"] = filterExceptionAtTimestampGte;
|
|
370
371
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
if (filterOrderCancelled !== undefined) {
|
|
373
|
+
_queryParams["filter_order_cancelled"] = (_c = filterOrderCancelled === null || filterOrderCancelled === void 0 ? void 0 : filterOrderCancelled.toString()) !== null && _c !== void 0 ? _c : null;
|
|
374
|
+
}
|
|
375
|
+
let _headers = mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
376
|
+
const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
|
|
377
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.ChrtEnvironment.Local, "shipping/task_groups/expanded/list/for_courier_operators/v1"),
|
|
374
378
|
method: "POST",
|
|
375
379
|
headers: _headers,
|
|
376
380
|
contentType: "application/json",
|
|
@@ -440,6 +444,7 @@ export class Expanded {
|
|
|
440
444
|
* filter_skipped_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
441
445
|
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
442
446
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
447
|
+
* filter_order_cancelled: true,
|
|
443
448
|
* body: {}
|
|
444
449
|
* })
|
|
445
450
|
*/
|
|
@@ -448,8 +453,8 @@ export class Expanded {
|
|
|
448
453
|
}
|
|
449
454
|
__listForCourierDriverV1(request, requestOptions) {
|
|
450
455
|
return __awaiter(this, void 0, void 0, function* () {
|
|
451
|
-
var _a, _b, _c, _d, _e, _f;
|
|
452
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_skipped_at_timestamp_lte: filterSkippedAtTimestampLte, filter_skipped_at_timestamp_gte: filterSkippedAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, body: _body, } = request;
|
|
456
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
457
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_skipped_at_timestamp_lte: filterSkippedAtTimestampLte, filter_skipped_at_timestamp_gte: filterSkippedAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_order_cancelled: filterOrderCancelled, body: _body, } = request;
|
|
453
458
|
const _queryParams = {};
|
|
454
459
|
if (sortBy !== undefined) {
|
|
455
460
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -510,9 +515,12 @@ export class Expanded {
|
|
|
510
515
|
if (filterExceptionAtTimestampGte !== undefined) {
|
|
511
516
|
_queryParams["filter_exception_at_timestamp_gte"] = filterExceptionAtTimestampGte;
|
|
512
517
|
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
518
|
+
if (filterOrderCancelled !== undefined) {
|
|
519
|
+
_queryParams["filter_order_cancelled"] = (_c = filterOrderCancelled === null || filterOrderCancelled === void 0 ? void 0 : filterOrderCancelled.toString()) !== null && _c !== void 0 ? _c : null;
|
|
520
|
+
}
|
|
521
|
+
let _headers = mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
522
|
+
const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
|
|
523
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.ChrtEnvironment.Local, "shipping/task_groups/expanded/list/for_courier_driver/v1"),
|
|
516
524
|
method: "POST",
|
|
517
525
|
headers: _headers,
|
|
518
526
|
contentType: "application/json",
|
|
@@ -22,6 +22,7 @@ import * as Chrt from "../../../../../../../../index.mjs";
|
|
|
22
22
|
* filter_skipped_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
23
23
|
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
24
24
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
25
|
+
* filter_order_cancelled: true,
|
|
25
26
|
* body: {}
|
|
26
27
|
* }
|
|
27
28
|
*/
|
|
@@ -46,5 +47,6 @@ export interface ExpandedListForCourierDriverV1Request {
|
|
|
46
47
|
filter_skipped_at_timestamp_gte?: string | null;
|
|
47
48
|
filter_exception_at_timestamp_lte?: string | null;
|
|
48
49
|
filter_exception_at_timestamp_gte?: string | null;
|
|
50
|
+
filter_order_cancelled?: boolean | null;
|
|
49
51
|
body: Chrt.OrderAndTaskGroupExpandedReq;
|
|
50
52
|
}
|
|
@@ -22,6 +22,7 @@ import * as Chrt from "../../../../../../../../index.mjs";
|
|
|
22
22
|
* filter_skipped_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
23
23
|
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
24
24
|
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
25
|
+
* filter_order_cancelled: true,
|
|
25
26
|
* body: {}
|
|
26
27
|
* }
|
|
27
28
|
*/
|
|
@@ -46,5 +47,6 @@ export interface ExpandedListForCourierOperatorsV1Request {
|
|
|
46
47
|
filter_skipped_at_timestamp_gte?: string | null;
|
|
47
48
|
filter_exception_at_timestamp_lte?: string | null;
|
|
48
49
|
filter_exception_at_timestamp_gte?: string | null;
|
|
50
|
+
filter_order_cancelled?: boolean | null;
|
|
49
51
|
body: Chrt.OrderAndTaskGroupExpandedReq;
|
|
50
52
|
}
|
|
@@ -32,28 +32,28 @@ export declare class TaskGroupId {
|
|
|
32
32
|
/**
|
|
33
33
|
* Retrieves the task group IDs for the courier organization assigned to an order's task groups. | authz_personas=[courier_org_operators] | () -> (list[PydanticObjectId])
|
|
34
34
|
*
|
|
35
|
-
* @param {string}
|
|
35
|
+
* @param {string} orderRef - Order ID, short ID, or off-chrt reference ID
|
|
36
36
|
* @param {TaskGroupId.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
37
|
*
|
|
38
38
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
|
-
* await client.shipping.taskGroups.taskGroupId.forCourierOperatorsV1("
|
|
41
|
+
* await client.shipping.taskGroups.taskGroupId.forCourierOperatorsV1("order_ref")
|
|
42
42
|
*/
|
|
43
|
-
forCourierOperatorsV1(
|
|
43
|
+
forCourierOperatorsV1(orderRef: string, requestOptions?: TaskGroupId.RequestOptions): core.HttpResponsePromise<string[]>;
|
|
44
44
|
private __forCourierOperatorsV1;
|
|
45
45
|
/**
|
|
46
46
|
* Retrieves the task group IDs for the courier driver assigned to an order's task groups. | authz_personas=[courier_driver] | () -> (list[PydanticObjectId])
|
|
47
47
|
*
|
|
48
|
-
* @param {string}
|
|
48
|
+
* @param {string} orderRef - Order ID, short ID, or off-chrt reference ID
|
|
49
49
|
* @param {TaskGroupId.RequestOptions} requestOptions - Request-specific configuration.
|
|
50
50
|
*
|
|
51
51
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
52
52
|
*
|
|
53
53
|
* @example
|
|
54
|
-
* await client.shipping.taskGroups.taskGroupId.forCourierDriverV1("
|
|
54
|
+
* await client.shipping.taskGroups.taskGroupId.forCourierDriverV1("order_ref")
|
|
55
55
|
*/
|
|
56
|
-
forCourierDriverV1(
|
|
56
|
+
forCourierDriverV1(orderRef: string, requestOptions?: TaskGroupId.RequestOptions): core.HttpResponsePromise<string[]>;
|
|
57
57
|
private __forCourierDriverV1;
|
|
58
58
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
59
59
|
}
|
package/dist/esm/api/resources/shipping/resources/taskGroups/resources/taskGroupId/client/Client.mjs
CHANGED
|
@@ -22,23 +22,23 @@ export class TaskGroupId {
|
|
|
22
22
|
/**
|
|
23
23
|
* Retrieves the task group IDs for the courier organization assigned to an order's task groups. | authz_personas=[courier_org_operators] | () -> (list[PydanticObjectId])
|
|
24
24
|
*
|
|
25
|
-
* @param {string}
|
|
25
|
+
* @param {string} orderRef - Order ID, short ID, or off-chrt reference ID
|
|
26
26
|
* @param {TaskGroupId.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
27
|
*
|
|
28
28
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
|
-
* await client.shipping.taskGroups.taskGroupId.forCourierOperatorsV1("
|
|
31
|
+
* await client.shipping.taskGroups.taskGroupId.forCourierOperatorsV1("order_ref")
|
|
32
32
|
*/
|
|
33
|
-
forCourierOperatorsV1(
|
|
34
|
-
return core.HttpResponsePromise.fromPromise(this.__forCourierOperatorsV1(
|
|
33
|
+
forCourierOperatorsV1(orderRef, requestOptions) {
|
|
34
|
+
return core.HttpResponsePromise.fromPromise(this.__forCourierOperatorsV1(orderRef, requestOptions));
|
|
35
35
|
}
|
|
36
|
-
__forCourierOperatorsV1(
|
|
36
|
+
__forCourierOperatorsV1(orderRef, requestOptions) {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
38
|
var _a, _b, _c, _d;
|
|
39
39
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
40
40
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
41
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/task_groups/task_group_id/for_courier_operators/v1/${encodeURIComponent(
|
|
41
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/task_groups/task_group_id/for_courier_operators/v1/${encodeURIComponent(orderRef)}`),
|
|
42
42
|
method: "GET",
|
|
43
43
|
headers: _headers,
|
|
44
44
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -69,7 +69,7 @@ export class TaskGroupId {
|
|
|
69
69
|
rawResponse: _response.rawResponse,
|
|
70
70
|
});
|
|
71
71
|
case "timeout":
|
|
72
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/task_groups/task_group_id/for_courier_operators/v1/{
|
|
72
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/task_groups/task_group_id/for_courier_operators/v1/{order_ref}.");
|
|
73
73
|
case "unknown":
|
|
74
74
|
throw new errors.ChrtError({
|
|
75
75
|
message: _response.error.errorMessage,
|
|
@@ -81,23 +81,23 @@ export class TaskGroupId {
|
|
|
81
81
|
/**
|
|
82
82
|
* Retrieves the task group IDs for the courier driver assigned to an order's task groups. | authz_personas=[courier_driver] | () -> (list[PydanticObjectId])
|
|
83
83
|
*
|
|
84
|
-
* @param {string}
|
|
84
|
+
* @param {string} orderRef - Order ID, short ID, or off-chrt reference ID
|
|
85
85
|
* @param {TaskGroupId.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
86
|
*
|
|
87
87
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
88
88
|
*
|
|
89
89
|
* @example
|
|
90
|
-
* await client.shipping.taskGroups.taskGroupId.forCourierDriverV1("
|
|
90
|
+
* await client.shipping.taskGroups.taskGroupId.forCourierDriverV1("order_ref")
|
|
91
91
|
*/
|
|
92
|
-
forCourierDriverV1(
|
|
93
|
-
return core.HttpResponsePromise.fromPromise(this.__forCourierDriverV1(
|
|
92
|
+
forCourierDriverV1(orderRef, requestOptions) {
|
|
93
|
+
return core.HttpResponsePromise.fromPromise(this.__forCourierDriverV1(orderRef, requestOptions));
|
|
94
94
|
}
|
|
95
|
-
__forCourierDriverV1(
|
|
95
|
+
__forCourierDriverV1(orderRef, requestOptions) {
|
|
96
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
97
|
var _a, _b, _c, _d;
|
|
98
98
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
99
99
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
100
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/task_groups/task_group_id/for_courier_driver/v1/${encodeURIComponent(
|
|
100
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/task_groups/task_group_id/for_courier_driver/v1/${encodeURIComponent(orderRef)}`),
|
|
101
101
|
method: "GET",
|
|
102
102
|
headers: _headers,
|
|
103
103
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -128,7 +128,7 @@ export class TaskGroupId {
|
|
|
128
128
|
rawResponse: _response.rawResponse,
|
|
129
129
|
});
|
|
130
130
|
case "timeout":
|
|
131
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/task_groups/task_group_id/for_courier_driver/v1/{
|
|
131
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/task_groups/task_group_id/for_courier_driver/v1/{order_ref}.");
|
|
132
132
|
case "unknown":
|
|
133
133
|
throw new errors.ChrtError({
|
|
134
134
|
message: _response.error.errorMessage,
|