@chrt-inc/typescript-sdk 1.314.0 → 1.315.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/index.d.ts +1 -2
- package/dist/cjs/api/resources/index.js +2 -3
- package/dist/cjs/api/resources/orders/client/Client.d.ts +0 -27
- package/dist/cjs/api/resources/orders/client/Client.js +0 -124
- package/dist/cjs/api/resources/orders/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/orders/client/index.js +0 -15
- package/dist/cjs/api/resources/orders/resources/expanded/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/orders/resources/expanded/client/Client.js +14 -14
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +0 -39
- package/dist/cjs/api/resources/taskGroups/client/Client.js +0 -186
- package/dist/cjs/api/resources/taskGroups/index.d.ts +1 -1
- package/dist/cjs/api/resources/taskGroups/index.js +1 -1
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/Client.d.ts +58 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/Client.js +260 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/index.js +15 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.ts +42 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.ts +42 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/index.d.ts +1 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/index.js +1 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/types/ExpandedListForCourierDriverV1RequestSortOrder.d.ts +8 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/types/ExpandedListForCourierDriverV1RequestSortOrder.js +10 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/types/ExpandedListForCourierOperatorsV1RequestSortOrder.d.ts +8 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/types/ExpandedListForCourierOperatorsV1RequestSortOrder.js +10 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/types/index.js +18 -0
- package/dist/cjs/api/resources/taskGroups/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/taskGroups/resources/index.js +5 -0
- package/dist/cjs/api/types/TaskGroupSortByEnum.d.ts +11 -0
- package/dist/cjs/api/types/TaskGroupSortByEnum.js +13 -0
- package/dist/cjs/api/types/index.d.ts +1 -2
- package/dist/cjs/api/types/index.js +1 -2
- 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/index.d.mts +1 -2
- package/dist/esm/api/resources/index.mjs +1 -2
- package/dist/esm/api/resources/orders/client/Client.d.mts +0 -27
- package/dist/esm/api/resources/orders/client/Client.mjs +0 -124
- package/dist/esm/api/resources/orders/client/index.d.mts +0 -1
- package/dist/esm/api/resources/orders/client/index.mjs +1 -1
- package/dist/esm/api/resources/orders/resources/expanded/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/orders/resources/expanded/client/Client.mjs +14 -14
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +0 -39
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +0 -186
- package/dist/esm/api/resources/taskGroups/index.d.mts +1 -1
- package/dist/esm/api/resources/taskGroups/index.mjs +1 -1
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/Client.d.mts +58 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/Client.mjs +260 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/index.mjs +1 -1
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.mts +42 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.mts +42 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/index.d.mts +1 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/index.mjs +1 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/types/ExpandedListForCourierDriverV1RequestSortOrder.d.mts +8 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/types/ExpandedListForCourierDriverV1RequestSortOrder.mjs +7 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/types/ExpandedListForCourierOperatorsV1RequestSortOrder.d.mts +8 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/types/ExpandedListForCourierOperatorsV1RequestSortOrder.mjs +7 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/types/index.d.mts +2 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/types/index.mjs +2 -0
- package/dist/esm/api/resources/taskGroups/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/taskGroups/resources/index.mjs +2 -0
- package/dist/esm/api/types/TaskGroupSortByEnum.d.mts +11 -0
- package/dist/esm/api/types/TaskGroupSortByEnum.mjs +10 -0
- package/dist/esm/api/types/index.d.mts +1 -2
- package/dist/esm/api/types/index.mjs +1 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +164 -321
- package/dist/cjs/api/resources/orders/client/requests/OrdersExpandedListForForwarderReq.d.ts +0 -28
- package/dist/cjs/api/resources/orders/client/requests/OrdersExpandedListForShipperReq.d.ts +0 -28
- package/dist/cjs/api/resources/orders/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/types/OrdersExpandedListRes.d.ts +0 -8
- package/dist/cjs/api/types/OrdersExpandedListRes.js +0 -5
- package/dist/cjs/api/types/TaskGroupExpandedListReq.d.ts +0 -26
- package/dist/cjs/api/types/TaskGroupExpandedListReq.js +0 -5
- package/dist/esm/api/resources/orders/client/requests/OrdersExpandedListForForwarderReq.d.mts +0 -28
- package/dist/esm/api/resources/orders/client/requests/OrdersExpandedListForShipperReq.d.mts +0 -28
- package/dist/esm/api/resources/orders/client/requests/index.d.mts +0 -2
- package/dist/esm/api/types/OrdersExpandedListRes.d.mts +0 -8
- package/dist/esm/api/types/OrdersExpandedListRes.mjs +0 -4
- package/dist/esm/api/types/TaskGroupExpandedListReq.d.mts +0 -26
- package/dist/esm/api/types/TaskGroupExpandedListReq.mjs +0 -4
- /package/dist/cjs/api/resources/{orders/client/requests/OrdersExpandedListForForwarderReq.js → taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.js} +0 -0
- /package/dist/cjs/api/resources/{orders/client/requests/OrdersExpandedListForShipperReq.js → taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.js} +0 -0
- /package/dist/cjs/api/resources/{orders → taskGroups/resources/expanded}/client/requests/index.js +0 -0
- /package/dist/esm/api/resources/{orders/client/requests/OrdersExpandedListForForwarderReq.mjs → taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/{orders/client/requests/OrdersExpandedListForShipperReq.mjs → taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/{orders → taskGroups/resources/expanded}/client/requests/index.mjs +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * as connections from "./connections/index.mjs";
|
|
2
2
|
export * from "./connections/types/index.mjs";
|
|
3
|
+
export * as taskGroups from "./taskGroups/index.mjs";
|
|
3
4
|
export * as payments from "./payments/index.mjs";
|
|
4
5
|
export * as courierPayDriverLineItemGroups from "./courierPayDriverLineItemGroups/index.mjs";
|
|
5
6
|
export * as courierPayDriverPayouts from "./courierPayDriverPayouts/index.mjs";
|
|
@@ -17,7 +18,6 @@ export * as taskArtifacts from "./taskArtifacts/index.mjs";
|
|
|
17
18
|
export * as offChrtShipperOrg from "./offChrtShipperOrg/index.mjs";
|
|
18
19
|
export * as orders from "./orders/index.mjs";
|
|
19
20
|
export * as orderDrafts from "./orderDrafts/index.mjs";
|
|
20
|
-
export * as taskGroups from "./taskGroups/index.mjs";
|
|
21
21
|
export * as shipperContactInfo from "./shipperContactInfo/index.mjs";
|
|
22
22
|
export * as orgs from "./orgs/index.mjs";
|
|
23
23
|
export * as root from "./root/index.mjs";
|
|
@@ -37,7 +37,6 @@ export * from "./taskArtifactNotifications/client/requests/index.mjs";
|
|
|
37
37
|
export * from "./drivers/client/requests/index.mjs";
|
|
38
38
|
export * from "./taskArtifacts/client/requests/index.mjs";
|
|
39
39
|
export * from "./offChrtShipperOrg/client/requests/index.mjs";
|
|
40
|
-
export * from "./orders/client/requests/index.mjs";
|
|
41
40
|
export * from "./orderDrafts/client/requests/index.mjs";
|
|
42
41
|
export * from "./taskGroups/client/requests/index.mjs";
|
|
43
42
|
export * from "./shipperContactInfo/client/requests/index.mjs";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * as connections from "./connections/index.mjs";
|
|
2
2
|
export * from "./connections/types/index.mjs";
|
|
3
|
+
export * as taskGroups from "./taskGroups/index.mjs";
|
|
3
4
|
export * as payments from "./payments/index.mjs";
|
|
4
5
|
export * as courierPayDriverLineItemGroups from "./courierPayDriverLineItemGroups/index.mjs";
|
|
5
6
|
export * as courierPayDriverPayouts from "./courierPayDriverPayouts/index.mjs";
|
|
@@ -17,7 +18,6 @@ export * as taskArtifacts from "./taskArtifacts/index.mjs";
|
|
|
17
18
|
export * as offChrtShipperOrg from "./offChrtShipperOrg/index.mjs";
|
|
18
19
|
export * as orders from "./orders/index.mjs";
|
|
19
20
|
export * as orderDrafts from "./orderDrafts/index.mjs";
|
|
20
|
-
export * as taskGroups from "./taskGroups/index.mjs";
|
|
21
21
|
export * as shipperContactInfo from "./shipperContactInfo/index.mjs";
|
|
22
22
|
export * as orgs from "./orgs/index.mjs";
|
|
23
23
|
export * as root from "./root/index.mjs";
|
|
@@ -37,7 +37,6 @@ export * from "./taskArtifactNotifications/client/requests/index.mjs";
|
|
|
37
37
|
export * from "./drivers/client/requests/index.mjs";
|
|
38
38
|
export * from "./taskArtifacts/client/requests/index.mjs";
|
|
39
39
|
export * from "./offChrtShipperOrg/client/requests/index.mjs";
|
|
40
|
-
export * from "./orders/client/requests/index.mjs";
|
|
41
40
|
export * from "./orderDrafts/client/requests/index.mjs";
|
|
42
41
|
export * from "./taskGroups/client/requests/index.mjs";
|
|
43
42
|
export * from "./shipperContactInfo/client/requests/index.mjs";
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../core/index.mjs";
|
|
6
|
-
import * as Chrt from "../../../index.mjs";
|
|
7
6
|
import { Expanded } from "../resources/expanded/client/Client.mjs";
|
|
8
7
|
export declare namespace Orders {
|
|
9
8
|
interface Options {
|
|
@@ -33,32 +32,6 @@ export declare class Orders {
|
|
|
33
32
|
protected _expanded: Expanded | undefined;
|
|
34
33
|
constructor(_options?: Orders.Options);
|
|
35
34
|
get expanded(): Expanded;
|
|
36
|
-
/**
|
|
37
|
-
* Retrieves a list of expanded orders with optional filters and related data for shipper operators. | authz_personas=[shipper_org_operators] | (OrdersExpandedListForShipperReq) -> (OrdersExpandedListRes)
|
|
38
|
-
*
|
|
39
|
-
* @param {Chrt.OrdersExpandedListForShipperReq} request
|
|
40
|
-
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
-
*
|
|
42
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* await client.orders.postExpandedListForShipperOperatorsV1()
|
|
46
|
-
*/
|
|
47
|
-
postExpandedListForShipperOperatorsV1(request?: Chrt.OrdersExpandedListForShipperReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.OrdersExpandedListRes>;
|
|
48
|
-
private __postExpandedListForShipperOperatorsV1;
|
|
49
|
-
/**
|
|
50
|
-
* Retrieves a list of expanded orders with optional filters and related data for forwarder operators. | authz_personas=[forwarder_org_operators] | (OrdersExpandedListForForwarderReq) -> (OrdersExpandedListRes)
|
|
51
|
-
*
|
|
52
|
-
* @param {Chrt.OrdersExpandedListForForwarderReq} request
|
|
53
|
-
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
|
-
*
|
|
55
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* await client.orders.postExpandedListForForwarderOperatorsV1()
|
|
59
|
-
*/
|
|
60
|
-
postExpandedListForForwarderOperatorsV1(request?: Chrt.OrdersExpandedListForForwarderReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.OrdersExpandedListRes>;
|
|
61
|
-
private __postExpandedListForForwarderOperatorsV1;
|
|
62
35
|
/**
|
|
63
36
|
* Validates a draft order and stages all related entities in a transaction. | () -> (bool)
|
|
64
37
|
*
|
|
@@ -24,130 +24,6 @@ export class Orders {
|
|
|
24
24
|
var _a;
|
|
25
25
|
return ((_a = this._expanded) !== null && _a !== void 0 ? _a : (this._expanded = new Expanded(this._options)));
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Retrieves a list of expanded orders with optional filters and related data for shipper operators. | authz_personas=[shipper_org_operators] | (OrdersExpandedListForShipperReq) -> (OrdersExpandedListRes)
|
|
29
|
-
*
|
|
30
|
-
* @param {Chrt.OrdersExpandedListForShipperReq} request
|
|
31
|
-
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
-
*
|
|
33
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* await client.orders.postExpandedListForShipperOperatorsV1()
|
|
37
|
-
*/
|
|
38
|
-
postExpandedListForShipperOperatorsV1(request = {}, requestOptions) {
|
|
39
|
-
return core.HttpResponsePromise.fromPromise(this.__postExpandedListForShipperOperatorsV1(request, requestOptions));
|
|
40
|
-
}
|
|
41
|
-
__postExpandedListForShipperOperatorsV1() {
|
|
42
|
-
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
43
|
-
var _a, _b, _c, _d;
|
|
44
|
-
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);
|
|
45
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
46
|
-
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, "oort/orders/orders/expanded/list/for_shipper_operators/v1"),
|
|
47
|
-
method: "POST",
|
|
48
|
-
headers: _headers,
|
|
49
|
-
contentType: "application/json",
|
|
50
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
51
|
-
requestType: "json",
|
|
52
|
-
body: request,
|
|
53
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
54
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
55
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
56
|
-
});
|
|
57
|
-
if (_response.ok) {
|
|
58
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
59
|
-
}
|
|
60
|
-
if (_response.error.reason === "status-code") {
|
|
61
|
-
switch (_response.error.statusCode) {
|
|
62
|
-
case 422:
|
|
63
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
64
|
-
default:
|
|
65
|
-
throw new errors.ChrtError({
|
|
66
|
-
statusCode: _response.error.statusCode,
|
|
67
|
-
body: _response.error.body,
|
|
68
|
-
rawResponse: _response.rawResponse,
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
switch (_response.error.reason) {
|
|
73
|
-
case "non-json":
|
|
74
|
-
throw new errors.ChrtError({
|
|
75
|
-
statusCode: _response.error.statusCode,
|
|
76
|
-
body: _response.error.rawBody,
|
|
77
|
-
rawResponse: _response.rawResponse,
|
|
78
|
-
});
|
|
79
|
-
case "timeout":
|
|
80
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/orders/orders/expanded/list/for_shipper_operators/v1.");
|
|
81
|
-
case "unknown":
|
|
82
|
-
throw new errors.ChrtError({
|
|
83
|
-
message: _response.error.errorMessage,
|
|
84
|
-
rawResponse: _response.rawResponse,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Retrieves a list of expanded orders with optional filters and related data for forwarder operators. | authz_personas=[forwarder_org_operators] | (OrdersExpandedListForForwarderReq) -> (OrdersExpandedListRes)
|
|
91
|
-
*
|
|
92
|
-
* @param {Chrt.OrdersExpandedListForForwarderReq} request
|
|
93
|
-
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
94
|
-
*
|
|
95
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* await client.orders.postExpandedListForForwarderOperatorsV1()
|
|
99
|
-
*/
|
|
100
|
-
postExpandedListForForwarderOperatorsV1(request = {}, requestOptions) {
|
|
101
|
-
return core.HttpResponsePromise.fromPromise(this.__postExpandedListForForwarderOperatorsV1(request, requestOptions));
|
|
102
|
-
}
|
|
103
|
-
__postExpandedListForForwarderOperatorsV1() {
|
|
104
|
-
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
105
|
-
var _a, _b, _c, _d;
|
|
106
|
-
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);
|
|
107
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
108
|
-
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, "oort/orders/orders/expanded/list/for_forwarder_operators/v1"),
|
|
109
|
-
method: "POST",
|
|
110
|
-
headers: _headers,
|
|
111
|
-
contentType: "application/json",
|
|
112
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
113
|
-
requestType: "json",
|
|
114
|
-
body: request,
|
|
115
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
116
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
117
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
118
|
-
});
|
|
119
|
-
if (_response.ok) {
|
|
120
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
121
|
-
}
|
|
122
|
-
if (_response.error.reason === "status-code") {
|
|
123
|
-
switch (_response.error.statusCode) {
|
|
124
|
-
case 422:
|
|
125
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
126
|
-
default:
|
|
127
|
-
throw new errors.ChrtError({
|
|
128
|
-
statusCode: _response.error.statusCode,
|
|
129
|
-
body: _response.error.body,
|
|
130
|
-
rawResponse: _response.rawResponse,
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
switch (_response.error.reason) {
|
|
135
|
-
case "non-json":
|
|
136
|
-
throw new errors.ChrtError({
|
|
137
|
-
statusCode: _response.error.statusCode,
|
|
138
|
-
body: _response.error.rawBody,
|
|
139
|
-
rawResponse: _response.rawResponse,
|
|
140
|
-
});
|
|
141
|
-
case "timeout":
|
|
142
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/orders/orders/expanded/list/for_forwarder_operators/v1.");
|
|
143
|
-
case "unknown":
|
|
144
|
-
throw new errors.ChrtError({
|
|
145
|
-
message: _response.error.errorMessage,
|
|
146
|
-
rawResponse: _response.rawResponse,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
27
|
/**
|
|
152
28
|
* Validates a draft order and stages all related entities in a transaction. | () -> (bool)
|
|
153
29
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -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} orderIdOrShortId
|
|
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.orders.expanded.forShipperOperatorsV1("
|
|
43
|
+
* await client.orders.expanded.forShipperOperatorsV1("order_id_or_short_id", {})
|
|
44
44
|
*/
|
|
45
|
-
forShipperOperatorsV1(
|
|
45
|
+
forShipperOperatorsV1(orderIdOrShortId: 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} orderIdOrShortId
|
|
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.orders.expanded.forForwarderOperatorsV1("
|
|
57
|
+
* await client.orders.expanded.forForwarderOperatorsV1("order_id_or_short_id", {})
|
|
58
58
|
*/
|
|
59
|
-
forForwarderOperatorsV1(
|
|
59
|
+
forForwarderOperatorsV1(orderIdOrShortId: string, request: Chrt.OrderAndTaskGroupExpandedReq, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderExpanded>;
|
|
60
60
|
private __forForwarderOperatorsV1;
|
|
61
61
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
62
62
|
}
|
|
@@ -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} orderIdOrShortId
|
|
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.orders.expanded.forShipperOperatorsV1("
|
|
32
|
+
* await client.orders.expanded.forShipperOperatorsV1("order_id_or_short_id", {})
|
|
33
33
|
*/
|
|
34
|
-
forShipperOperatorsV1(
|
|
35
|
-
return core.HttpResponsePromise.fromPromise(this.__forShipperOperatorsV1(
|
|
34
|
+
forShipperOperatorsV1(orderIdOrShortId, request, requestOptions) {
|
|
35
|
+
return core.HttpResponsePromise.fromPromise(this.__forShipperOperatorsV1(orderIdOrShortId, request, requestOptions));
|
|
36
36
|
}
|
|
37
|
-
__forShipperOperatorsV1(
|
|
37
|
+
__forShipperOperatorsV1(orderIdOrShortId, 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, `oort/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, `oort/orders/expanded/for_shipper_operators/v1/${encodeURIComponent(orderIdOrShortId)}`),
|
|
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 /oort/orders/expanded/for_shipper_operators/v1/{
|
|
76
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/orders/expanded/for_shipper_operators/v1/{order_id_or_short_id}.");
|
|
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} orderIdOrShortId
|
|
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.orders.expanded.forForwarderOperatorsV1("
|
|
95
|
+
* await client.orders.expanded.forForwarderOperatorsV1("order_id_or_short_id", {})
|
|
96
96
|
*/
|
|
97
|
-
forForwarderOperatorsV1(
|
|
98
|
-
return core.HttpResponsePromise.fromPromise(this.__forForwarderOperatorsV1(
|
|
97
|
+
forForwarderOperatorsV1(orderIdOrShortId, request, requestOptions) {
|
|
98
|
+
return core.HttpResponsePromise.fromPromise(this.__forForwarderOperatorsV1(orderIdOrShortId, request, requestOptions));
|
|
99
99
|
}
|
|
100
|
-
__forForwarderOperatorsV1(
|
|
100
|
+
__forForwarderOperatorsV1(orderIdOrShortId, 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, `oort/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, `oort/orders/expanded/for_forwarder_operators/v1/${encodeURIComponent(orderIdOrShortId)}`),
|
|
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 /oort/orders/expanded/for_forwarder_operators/v1/{
|
|
139
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/orders/expanded/for_forwarder_operators/v1/{order_id_or_short_id}.");
|
|
140
140
|
case "unknown":
|
|
141
141
|
throw new errors.ChrtError({
|
|
142
142
|
message: _response.error.errorMessage,
|
|
@@ -33,45 +33,6 @@ export declare class TaskGroups {
|
|
|
33
33
|
protected _expanded: Expanded | undefined;
|
|
34
34
|
constructor(_options?: TaskGroups.Options);
|
|
35
35
|
get expanded(): Expanded;
|
|
36
|
-
/**
|
|
37
|
-
* Retrieves a list of expanded task groups with optional filters and related data for courier operators. | authz_personas=[courier_org_operators] | (TaskGroupExpandedListReq) -> (TaskGroupExpandedListRes)
|
|
38
|
-
*
|
|
39
|
-
* @param {Chrt.TaskGroupExpandedListReq} request
|
|
40
|
-
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
-
*
|
|
42
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* await client.taskGroups.postExpandedListForCourierOperatorsV1({})
|
|
46
|
-
*/
|
|
47
|
-
postExpandedListForCourierOperatorsV1(request: Chrt.TaskGroupExpandedListReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupExpandedListRes>;
|
|
48
|
-
private __postExpandedListForCourierOperatorsV1;
|
|
49
|
-
/**
|
|
50
|
-
* Retrieves a list of expanded task groups with optional filters and related data for courier drivers. | authz_personas=[courier_driver] | (TaskGroupExpandedListReq) -> (TaskGroupExpandedListRes)
|
|
51
|
-
*
|
|
52
|
-
* @param {Chrt.TaskGroupExpandedListReq} request
|
|
53
|
-
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
|
-
*
|
|
55
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* await client.taskGroups.postExpandedListForCourierDriverV1({})
|
|
59
|
-
*/
|
|
60
|
-
postExpandedListForCourierDriverV1(request: Chrt.TaskGroupExpandedListReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupExpandedListRes>;
|
|
61
|
-
private __postExpandedListForCourierDriverV1;
|
|
62
|
-
/**
|
|
63
|
-
* Retrieves a list of expanded task groups with optional filters and related data for forwarder operators. | authz_personas=[forwarder_org_operators] | (TaskGroupExpandedListReq) -> (TaskGroupExpandedListRes)
|
|
64
|
-
*
|
|
65
|
-
* @param {Chrt.TaskGroupExpandedListReq} request
|
|
66
|
-
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
-
*
|
|
68
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* await client.taskGroups.postExpandedListForForwarderOperatorsV1({})
|
|
72
|
-
*/
|
|
73
|
-
postExpandedListForForwarderOperatorsV1(request: Chrt.TaskGroupExpandedListReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupExpandedListRes>;
|
|
74
|
-
private __postExpandedListForForwarderOperatorsV1;
|
|
75
36
|
/**
|
|
76
37
|
* Updates the ordering of tasks in a task group. Task group must be in STAGED or IN_PROGRESS status. | authz_personas=[lig_org_operators] | (SetTaskOrderingReq) -> (bool)
|
|
77
38
|
*
|
|
@@ -24,192 +24,6 @@ export class TaskGroups {
|
|
|
24
24
|
var _a;
|
|
25
25
|
return ((_a = this._expanded) !== null && _a !== void 0 ? _a : (this._expanded = new Expanded(this._options)));
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Retrieves a list of expanded task groups with optional filters and related data for courier operators. | authz_personas=[courier_org_operators] | (TaskGroupExpandedListReq) -> (TaskGroupExpandedListRes)
|
|
29
|
-
*
|
|
30
|
-
* @param {Chrt.TaskGroupExpandedListReq} request
|
|
31
|
-
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
-
*
|
|
33
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* await client.taskGroups.postExpandedListForCourierOperatorsV1({})
|
|
37
|
-
*/
|
|
38
|
-
postExpandedListForCourierOperatorsV1(request, requestOptions) {
|
|
39
|
-
return core.HttpResponsePromise.fromPromise(this.__postExpandedListForCourierOperatorsV1(request, requestOptions));
|
|
40
|
-
}
|
|
41
|
-
__postExpandedListForCourierOperatorsV1(request, requestOptions) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
var _a, _b, _c, _d;
|
|
44
|
-
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);
|
|
45
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
46
|
-
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, "oort/task_groups/task_groups/expanded/list/for_courier_operators/v1"),
|
|
47
|
-
method: "POST",
|
|
48
|
-
headers: _headers,
|
|
49
|
-
contentType: "application/json",
|
|
50
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
51
|
-
requestType: "json",
|
|
52
|
-
body: request,
|
|
53
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
54
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
55
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
56
|
-
});
|
|
57
|
-
if (_response.ok) {
|
|
58
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
59
|
-
}
|
|
60
|
-
if (_response.error.reason === "status-code") {
|
|
61
|
-
switch (_response.error.statusCode) {
|
|
62
|
-
case 422:
|
|
63
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
64
|
-
default:
|
|
65
|
-
throw new errors.ChrtError({
|
|
66
|
-
statusCode: _response.error.statusCode,
|
|
67
|
-
body: _response.error.body,
|
|
68
|
-
rawResponse: _response.rawResponse,
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
switch (_response.error.reason) {
|
|
73
|
-
case "non-json":
|
|
74
|
-
throw new errors.ChrtError({
|
|
75
|
-
statusCode: _response.error.statusCode,
|
|
76
|
-
body: _response.error.rawBody,
|
|
77
|
-
rawResponse: _response.rawResponse,
|
|
78
|
-
});
|
|
79
|
-
case "timeout":
|
|
80
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_groups/task_groups/expanded/list/for_courier_operators/v1.");
|
|
81
|
-
case "unknown":
|
|
82
|
-
throw new errors.ChrtError({
|
|
83
|
-
message: _response.error.errorMessage,
|
|
84
|
-
rawResponse: _response.rawResponse,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Retrieves a list of expanded task groups with optional filters and related data for courier drivers. | authz_personas=[courier_driver] | (TaskGroupExpandedListReq) -> (TaskGroupExpandedListRes)
|
|
91
|
-
*
|
|
92
|
-
* @param {Chrt.TaskGroupExpandedListReq} request
|
|
93
|
-
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
94
|
-
*
|
|
95
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* await client.taskGroups.postExpandedListForCourierDriverV1({})
|
|
99
|
-
*/
|
|
100
|
-
postExpandedListForCourierDriverV1(request, requestOptions) {
|
|
101
|
-
return core.HttpResponsePromise.fromPromise(this.__postExpandedListForCourierDriverV1(request, requestOptions));
|
|
102
|
-
}
|
|
103
|
-
__postExpandedListForCourierDriverV1(request, requestOptions) {
|
|
104
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
var _a, _b, _c, _d;
|
|
106
|
-
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);
|
|
107
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
108
|
-
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, "oort/task_groups/task_groups/expanded/list/for_courier_driver/v1"),
|
|
109
|
-
method: "POST",
|
|
110
|
-
headers: _headers,
|
|
111
|
-
contentType: "application/json",
|
|
112
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
113
|
-
requestType: "json",
|
|
114
|
-
body: request,
|
|
115
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
116
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
117
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
118
|
-
});
|
|
119
|
-
if (_response.ok) {
|
|
120
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
121
|
-
}
|
|
122
|
-
if (_response.error.reason === "status-code") {
|
|
123
|
-
switch (_response.error.statusCode) {
|
|
124
|
-
case 422:
|
|
125
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
126
|
-
default:
|
|
127
|
-
throw new errors.ChrtError({
|
|
128
|
-
statusCode: _response.error.statusCode,
|
|
129
|
-
body: _response.error.body,
|
|
130
|
-
rawResponse: _response.rawResponse,
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
switch (_response.error.reason) {
|
|
135
|
-
case "non-json":
|
|
136
|
-
throw new errors.ChrtError({
|
|
137
|
-
statusCode: _response.error.statusCode,
|
|
138
|
-
body: _response.error.rawBody,
|
|
139
|
-
rawResponse: _response.rawResponse,
|
|
140
|
-
});
|
|
141
|
-
case "timeout":
|
|
142
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_groups/task_groups/expanded/list/for_courier_driver/v1.");
|
|
143
|
-
case "unknown":
|
|
144
|
-
throw new errors.ChrtError({
|
|
145
|
-
message: _response.error.errorMessage,
|
|
146
|
-
rawResponse: _response.rawResponse,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Retrieves a list of expanded task groups with optional filters and related data for forwarder operators. | authz_personas=[forwarder_org_operators] | (TaskGroupExpandedListReq) -> (TaskGroupExpandedListRes)
|
|
153
|
-
*
|
|
154
|
-
* @param {Chrt.TaskGroupExpandedListReq} request
|
|
155
|
-
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
156
|
-
*
|
|
157
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
158
|
-
*
|
|
159
|
-
* @example
|
|
160
|
-
* await client.taskGroups.postExpandedListForForwarderOperatorsV1({})
|
|
161
|
-
*/
|
|
162
|
-
postExpandedListForForwarderOperatorsV1(request, requestOptions) {
|
|
163
|
-
return core.HttpResponsePromise.fromPromise(this.__postExpandedListForForwarderOperatorsV1(request, requestOptions));
|
|
164
|
-
}
|
|
165
|
-
__postExpandedListForForwarderOperatorsV1(request, requestOptions) {
|
|
166
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
-
var _a, _b, _c, _d;
|
|
168
|
-
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);
|
|
169
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
170
|
-
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, "oort/task_groups/task_groups/expanded/list/for_forwarder_operators/v1"),
|
|
171
|
-
method: "POST",
|
|
172
|
-
headers: _headers,
|
|
173
|
-
contentType: "application/json",
|
|
174
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
175
|
-
requestType: "json",
|
|
176
|
-
body: request,
|
|
177
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
178
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
179
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
180
|
-
});
|
|
181
|
-
if (_response.ok) {
|
|
182
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
183
|
-
}
|
|
184
|
-
if (_response.error.reason === "status-code") {
|
|
185
|
-
switch (_response.error.statusCode) {
|
|
186
|
-
case 422:
|
|
187
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
188
|
-
default:
|
|
189
|
-
throw new errors.ChrtError({
|
|
190
|
-
statusCode: _response.error.statusCode,
|
|
191
|
-
body: _response.error.body,
|
|
192
|
-
rawResponse: _response.rawResponse,
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
switch (_response.error.reason) {
|
|
197
|
-
case "non-json":
|
|
198
|
-
throw new errors.ChrtError({
|
|
199
|
-
statusCode: _response.error.statusCode,
|
|
200
|
-
body: _response.error.rawBody,
|
|
201
|
-
rawResponse: _response.rawResponse,
|
|
202
|
-
});
|
|
203
|
-
case "timeout":
|
|
204
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_groups/task_groups/expanded/list/for_forwarder_operators/v1.");
|
|
205
|
-
case "unknown":
|
|
206
|
-
throw new errors.ChrtError({
|
|
207
|
-
message: _response.error.errorMessage,
|
|
208
|
-
rawResponse: _response.rawResponse,
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
27
|
/**
|
|
214
28
|
* Updates the ordering of tasks in a task group. Task group must be in STAGED or IN_PROGRESS status. | authz_personas=[lig_org_operators] | (SetTaskOrderingReq) -> (bool)
|
|
215
29
|
*
|