@chrt-inc/typescript-sdk 1.314.0 → 1.318.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 +2 -3
- package/dist/cjs/api/resources/index.js +3 -4
- 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/index.d.ts +1 -1
- package/dist/cjs/api/resources/orders/index.js +1 -1
- package/dist/cjs/api/resources/orders/resources/expanded/client/Client.d.ts +68 -6
- package/dist/cjs/api/resources/orders/resources/expanded/client/Client.js +290 -14
- package/dist/cjs/api/resources/orders/resources/expanded/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/orders/resources/expanded/client/index.js +15 -0
- package/dist/cjs/api/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.ts +46 -0
- package/dist/cjs/api/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +46 -0
- package/dist/cjs/api/resources/orders/resources/expanded/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/orders/resources/expanded/index.d.ts +1 -0
- package/dist/cjs/api/resources/orders/resources/expanded/index.js +1 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.d.ts +8 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.js +10 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.d.ts +8 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.js +10 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/index.js +18 -0
- package/dist/cjs/api/resources/orders/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/orders/resources/index.js +5 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +10 -23
- package/dist/cjs/api/resources/taskGroups/client/Client.js +18 -86
- 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/ExpandedListForCourierOperatorsV1Request.js +5 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/index.js +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/OrderSortByEnum.d.ts +12 -0
- package/dist/cjs/api/types/OrderSortByEnum.js +14 -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 +2 -1
- package/dist/cjs/api/types/index.js +2 -1
- 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 +2 -3
- package/dist/esm/api/resources/index.mjs +2 -3
- 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/index.d.mts +1 -1
- package/dist/esm/api/resources/orders/index.mjs +1 -1
- package/dist/esm/api/resources/orders/resources/expanded/client/Client.d.mts +68 -6
- package/dist/esm/api/resources/orders/resources/expanded/client/Client.mjs +290 -14
- package/dist/esm/api/resources/orders/resources/expanded/client/index.d.mts +1 -0
- package/dist/esm/api/resources/orders/resources/expanded/client/index.mjs +1 -1
- package/dist/esm/api/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.mts +46 -0
- package/dist/esm/api/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +46 -0
- package/dist/esm/api/resources/orders/resources/expanded/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/orders/resources/expanded/index.d.mts +1 -0
- package/dist/esm/api/resources/orders/resources/expanded/index.mjs +1 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.d.mts +8 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.mjs +7 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.d.mts +8 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.mjs +7 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/index.d.mts +2 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/index.mjs +2 -0
- package/dist/esm/api/resources/orders/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/orders/resources/index.mjs +2 -0
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +10 -23
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +18 -86
- 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/ExpandedListForCourierOperatorsV1Request.mjs +4 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/index.mjs +1 -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/OrderSortByEnum.d.mts +12 -0
- package/dist/esm/api/types/OrderSortByEnum.mjs +11 -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 +2 -1
- package/dist/esm/api/types/index.mjs +2 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +334 -203
- 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/TaskGroupExpandedListReq.d.ts +0 -26
- 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/TaskGroupExpandedListReq.d.mts +0 -26
- /package/dist/cjs/api/resources/orders/{client/requests/OrdersExpandedListForForwarderReq.js → resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.js} +0 -0
- /package/dist/cjs/api/resources/orders/{client/requests/OrdersExpandedListForShipperReq.js → resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.js} +0 -0
- /package/dist/cjs/api/resources/orders/{client → resources/expanded/client}/requests/index.js +0 -0
- /package/dist/cjs/api/{types/TaskGroupExpandedListReq.js → resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.js} +0 -0
- /package/dist/esm/api/resources/orders/{client/requests/OrdersExpandedListForForwarderReq.mjs → resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/orders/{client/requests/OrdersExpandedListForShipperReq.mjs → resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/orders/{client → resources/expanded/client}/requests/index.mjs +0 -0
- /package/dist/esm/api/{types/TaskGroupExpandedListReq.mjs → resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.mjs} +0 -0
|
@@ -25,93 +25,28 @@ export class TaskGroups {
|
|
|
25
25
|
return ((_a = this._expanded) !== null && _a !== void 0 ? _a : (this._expanded = new Expanded(this._options)));
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* Retrieves
|
|
28
|
+
* Retrieves the task group ID for the courier organization assigned to an order. | authz_personas=[courier_org_operators] | () -> (PydanticObjectId)
|
|
29
29
|
*
|
|
30
|
-
* @param {
|
|
30
|
+
* @param {string} byOrderIdOrShortId
|
|
31
31
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
32
|
*
|
|
33
33
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
|
-
* await client.taskGroups.
|
|
36
|
+
* await client.taskGroups.getTaskGroupIdForCourierOperatorsV1("by_order_id_or_short_id")
|
|
37
37
|
*/
|
|
38
|
-
|
|
39
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
38
|
+
getTaskGroupIdForCourierOperatorsV1(byOrderIdOrShortId, requestOptions) {
|
|
39
|
+
return core.HttpResponsePromise.fromPromise(this.__getTaskGroupIdForCourierOperatorsV1(byOrderIdOrShortId, requestOptions));
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
__getTaskGroupIdForCourierOperatorsV1(byOrderIdOrShortId, requestOptions) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
43
|
var _a, _b, _c, _d;
|
|
44
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
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,
|
|
47
|
-
method: "
|
|
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",
|
|
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_group_id/for_courier_operators/v1/${encodeURIComponent(byOrderIdOrShortId)}`),
|
|
47
|
+
method: "GET",
|
|
110
48
|
headers: _headers,
|
|
111
|
-
contentType: "application/json",
|
|
112
49
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
113
|
-
requestType: "json",
|
|
114
|
-
body: request,
|
|
115
50
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
116
51
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
117
52
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -139,7 +74,7 @@ export class TaskGroups {
|
|
|
139
74
|
rawResponse: _response.rawResponse,
|
|
140
75
|
});
|
|
141
76
|
case "timeout":
|
|
142
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
77
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/task_groups/task_group_id/for_courier_operators/v1/{by_order_id_or_short_id}.");
|
|
143
78
|
case "unknown":
|
|
144
79
|
throw new errors.ChrtError({
|
|
145
80
|
message: _response.error.errorMessage,
|
|
@@ -149,31 +84,28 @@ export class TaskGroups {
|
|
|
149
84
|
});
|
|
150
85
|
}
|
|
151
86
|
/**
|
|
152
|
-
* Retrieves
|
|
87
|
+
* Retrieves the task group ID for the courier driver assigned to an order. | authz_personas=[courier_driver] | () -> (PydanticObjectId)
|
|
153
88
|
*
|
|
154
|
-
* @param {
|
|
89
|
+
* @param {string} byOrderIdOrShortId
|
|
155
90
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
156
91
|
*
|
|
157
92
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
158
93
|
*
|
|
159
94
|
* @example
|
|
160
|
-
* await client.taskGroups.
|
|
95
|
+
* await client.taskGroups.getTaskGroupIdForCourierDriverV1("by_order_id_or_short_id")
|
|
161
96
|
*/
|
|
162
|
-
|
|
163
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
97
|
+
getTaskGroupIdForCourierDriverV1(byOrderIdOrShortId, requestOptions) {
|
|
98
|
+
return core.HttpResponsePromise.fromPromise(this.__getTaskGroupIdForCourierDriverV1(byOrderIdOrShortId, requestOptions));
|
|
164
99
|
}
|
|
165
|
-
|
|
100
|
+
__getTaskGroupIdForCourierDriverV1(byOrderIdOrShortId, requestOptions) {
|
|
166
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
167
102
|
var _a, _b, _c, _d;
|
|
168
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);
|
|
169
104
|
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,
|
|
171
|
-
method: "
|
|
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/task_groups/task_group_id/for_courier_driver/v1/${encodeURIComponent(byOrderIdOrShortId)}`),
|
|
106
|
+
method: "GET",
|
|
172
107
|
headers: _headers,
|
|
173
|
-
contentType: "application/json",
|
|
174
108
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
175
|
-
requestType: "json",
|
|
176
|
-
body: request,
|
|
177
109
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
178
110
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
179
111
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -201,7 +133,7 @@ export class TaskGroups {
|
|
|
201
133
|
rawResponse: _response.rawResponse,
|
|
202
134
|
});
|
|
203
135
|
case "timeout":
|
|
204
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
136
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/task_groups/task_group_id/for_courier_driver/v1/{by_order_id_or_short_id}.");
|
|
205
137
|
case "unknown":
|
|
206
138
|
throw new errors.ChrtError({
|
|
207
139
|
message: _response.error.errorMessage,
|
|
@@ -86,5 +86,63 @@ export declare class Expanded {
|
|
|
86
86
|
*/
|
|
87
87
|
forForwarderOperatorsV1(taskGroupId: string, request: Chrt.OrderAndTaskGroupExpandedReq, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupExpanded>;
|
|
88
88
|
private __forForwarderOperatorsV1;
|
|
89
|
+
/**
|
|
90
|
+
* Lists expanded task groups for courier operators with filtering, sorting, and pagination. | authz_personas=[courier_org_operators] | (OrderAndTaskGroupExpandedReq) -> (TaskGroupExpandedListRes)
|
|
91
|
+
*
|
|
92
|
+
* @param {Chrt.taskGroups.ExpandedListForCourierOperatorsV1Request} request
|
|
93
|
+
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* await client.taskGroups.expanded.listForCourierOperatorsV1({
|
|
99
|
+
* sort_by: "draft_started_at_timestamp",
|
|
100
|
+
* sort_order: "ascending",
|
|
101
|
+
* page: 1,
|
|
102
|
+
* page_size: 1,
|
|
103
|
+
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
104
|
+
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
105
|
+
* filter_staged_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
106
|
+
* filter_staged_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
107
|
+
* filter_in_progress_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
108
|
+
* filter_in_progress_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
109
|
+
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
110
|
+
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
111
|
+
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
112
|
+
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
113
|
+
* body: {}
|
|
114
|
+
* })
|
|
115
|
+
*/
|
|
116
|
+
listForCourierOperatorsV1(request: Chrt.taskGroups.ExpandedListForCourierOperatorsV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupExpandedListRes>;
|
|
117
|
+
private __listForCourierOperatorsV1;
|
|
118
|
+
/**
|
|
119
|
+
* Lists expanded task groups for courier driver with filtering, sorting, and pagination. | authz_personas=[courier_driver] | (OrderAndTaskGroupExpandedReq) -> (TaskGroupExpandedListRes)
|
|
120
|
+
*
|
|
121
|
+
* @param {Chrt.taskGroups.ExpandedListForCourierDriverV1Request} request
|
|
122
|
+
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
123
|
+
*
|
|
124
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* await client.taskGroups.expanded.listForCourierDriverV1({
|
|
128
|
+
* sort_by: "draft_started_at_timestamp",
|
|
129
|
+
* sort_order: "ascending",
|
|
130
|
+
* page: 1,
|
|
131
|
+
* page_size: 1,
|
|
132
|
+
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
133
|
+
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
134
|
+
* filter_staged_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
135
|
+
* filter_staged_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
136
|
+
* filter_in_progress_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
137
|
+
* filter_in_progress_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
138
|
+
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
139
|
+
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
140
|
+
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
141
|
+
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
142
|
+
* body: {}
|
|
143
|
+
* })
|
|
144
|
+
*/
|
|
145
|
+
listForCourierDriverV1(request: Chrt.taskGroups.ExpandedListForCourierDriverV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupExpandedListRes>;
|
|
146
|
+
private __listForCourierDriverV1;
|
|
89
147
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
90
148
|
}
|
|
@@ -271,6 +271,266 @@ export class Expanded {
|
|
|
271
271
|
}
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* Lists expanded task groups for courier operators with filtering, sorting, and pagination. | authz_personas=[courier_org_operators] | (OrderAndTaskGroupExpandedReq) -> (TaskGroupExpandedListRes)
|
|
276
|
+
*
|
|
277
|
+
* @param {Chrt.taskGroups.ExpandedListForCourierOperatorsV1Request} request
|
|
278
|
+
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
279
|
+
*
|
|
280
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* await client.taskGroups.expanded.listForCourierOperatorsV1({
|
|
284
|
+
* sort_by: "draft_started_at_timestamp",
|
|
285
|
+
* sort_order: "ascending",
|
|
286
|
+
* page: 1,
|
|
287
|
+
* page_size: 1,
|
|
288
|
+
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
289
|
+
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
290
|
+
* filter_staged_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
291
|
+
* filter_staged_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
292
|
+
* filter_in_progress_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
293
|
+
* filter_in_progress_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
294
|
+
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
295
|
+
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
296
|
+
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
297
|
+
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
298
|
+
* body: {}
|
|
299
|
+
* })
|
|
300
|
+
*/
|
|
301
|
+
listForCourierOperatorsV1(request, requestOptions) {
|
|
302
|
+
return core.HttpResponsePromise.fromPromise(this.__listForCourierOperatorsV1(request, requestOptions));
|
|
303
|
+
}
|
|
304
|
+
__listForCourierOperatorsV1(request, requestOptions) {
|
|
305
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
306
|
+
var _a, _b, _c, _d, _e, _f;
|
|
307
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, 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, body: _body, } = request;
|
|
308
|
+
const _queryParams = {};
|
|
309
|
+
if (sortBy !== undefined) {
|
|
310
|
+
_queryParams["sort_by"] = sortBy;
|
|
311
|
+
}
|
|
312
|
+
if (sortOrder !== undefined) {
|
|
313
|
+
_queryParams["sort_order"] = sortOrder;
|
|
314
|
+
}
|
|
315
|
+
if (page !== undefined) {
|
|
316
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
317
|
+
}
|
|
318
|
+
if (pageSize !== undefined) {
|
|
319
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
320
|
+
}
|
|
321
|
+
if (filterStatus !== undefined) {
|
|
322
|
+
if (Array.isArray(filterStatus)) {
|
|
323
|
+
_queryParams["filter_status"] = filterStatus.map((item) => item);
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
_queryParams["filter_status"] = filterStatus;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
if (filterDraftStartedAtTimestampLte !== undefined) {
|
|
330
|
+
_queryParams["filter_draft_started_at_timestamp_lte"] = filterDraftStartedAtTimestampLte;
|
|
331
|
+
}
|
|
332
|
+
if (filterDraftStartedAtTimestampGte !== undefined) {
|
|
333
|
+
_queryParams["filter_draft_started_at_timestamp_gte"] = filterDraftStartedAtTimestampGte;
|
|
334
|
+
}
|
|
335
|
+
if (filterStagedAtTimestampLte !== undefined) {
|
|
336
|
+
_queryParams["filter_staged_at_timestamp_lte"] = filterStagedAtTimestampLte;
|
|
337
|
+
}
|
|
338
|
+
if (filterStagedAtTimestampGte !== undefined) {
|
|
339
|
+
_queryParams["filter_staged_at_timestamp_gte"] = filterStagedAtTimestampGte;
|
|
340
|
+
}
|
|
341
|
+
if (filterInProgressAtTimestampLte !== undefined) {
|
|
342
|
+
_queryParams["filter_in_progress_at_timestamp_lte"] = filterInProgressAtTimestampLte;
|
|
343
|
+
}
|
|
344
|
+
if (filterInProgressAtTimestampGte !== undefined) {
|
|
345
|
+
_queryParams["filter_in_progress_at_timestamp_gte"] = filterInProgressAtTimestampGte;
|
|
346
|
+
}
|
|
347
|
+
if (filterCompletedAtTimestampLte !== undefined) {
|
|
348
|
+
_queryParams["filter_completed_at_timestamp_lte"] = filterCompletedAtTimestampLte;
|
|
349
|
+
}
|
|
350
|
+
if (filterCompletedAtTimestampGte !== undefined) {
|
|
351
|
+
_queryParams["filter_completed_at_timestamp_gte"] = filterCompletedAtTimestampGte;
|
|
352
|
+
}
|
|
353
|
+
if (filterExceptionAtTimestampLte !== undefined) {
|
|
354
|
+
_queryParams["filter_exception_at_timestamp_lte"] = filterExceptionAtTimestampLte;
|
|
355
|
+
}
|
|
356
|
+
if (filterExceptionAtTimestampGte !== undefined) {
|
|
357
|
+
_queryParams["filter_exception_at_timestamp_gte"] = filterExceptionAtTimestampGte;
|
|
358
|
+
}
|
|
359
|
+
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
360
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
361
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "oort/task_groups/expanded/list/for_courier_operators/v1"),
|
|
362
|
+
method: "POST",
|
|
363
|
+
headers: _headers,
|
|
364
|
+
contentType: "application/json",
|
|
365
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
366
|
+
requestType: "json",
|
|
367
|
+
body: _body,
|
|
368
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
369
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
370
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
371
|
+
});
|
|
372
|
+
if (_response.ok) {
|
|
373
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
374
|
+
}
|
|
375
|
+
if (_response.error.reason === "status-code") {
|
|
376
|
+
switch (_response.error.statusCode) {
|
|
377
|
+
case 422:
|
|
378
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
379
|
+
default:
|
|
380
|
+
throw new errors.ChrtError({
|
|
381
|
+
statusCode: _response.error.statusCode,
|
|
382
|
+
body: _response.error.body,
|
|
383
|
+
rawResponse: _response.rawResponse,
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
switch (_response.error.reason) {
|
|
388
|
+
case "non-json":
|
|
389
|
+
throw new errors.ChrtError({
|
|
390
|
+
statusCode: _response.error.statusCode,
|
|
391
|
+
body: _response.error.rawBody,
|
|
392
|
+
rawResponse: _response.rawResponse,
|
|
393
|
+
});
|
|
394
|
+
case "timeout":
|
|
395
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_groups/expanded/list/for_courier_operators/v1.");
|
|
396
|
+
case "unknown":
|
|
397
|
+
throw new errors.ChrtError({
|
|
398
|
+
message: _response.error.errorMessage,
|
|
399
|
+
rawResponse: _response.rawResponse,
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Lists expanded task groups for courier driver with filtering, sorting, and pagination. | authz_personas=[courier_driver] | (OrderAndTaskGroupExpandedReq) -> (TaskGroupExpandedListRes)
|
|
406
|
+
*
|
|
407
|
+
* @param {Chrt.taskGroups.ExpandedListForCourierDriverV1Request} request
|
|
408
|
+
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
409
|
+
*
|
|
410
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
411
|
+
*
|
|
412
|
+
* @example
|
|
413
|
+
* await client.taskGroups.expanded.listForCourierDriverV1({
|
|
414
|
+
* sort_by: "draft_started_at_timestamp",
|
|
415
|
+
* sort_order: "ascending",
|
|
416
|
+
* page: 1,
|
|
417
|
+
* page_size: 1,
|
|
418
|
+
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
419
|
+
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
420
|
+
* filter_staged_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
421
|
+
* filter_staged_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
422
|
+
* filter_in_progress_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
423
|
+
* filter_in_progress_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
424
|
+
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
425
|
+
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
426
|
+
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
427
|
+
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
428
|
+
* body: {}
|
|
429
|
+
* })
|
|
430
|
+
*/
|
|
431
|
+
listForCourierDriverV1(request, requestOptions) {
|
|
432
|
+
return core.HttpResponsePromise.fromPromise(this.__listForCourierDriverV1(request, requestOptions));
|
|
433
|
+
}
|
|
434
|
+
__listForCourierDriverV1(request, requestOptions) {
|
|
435
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
436
|
+
var _a, _b, _c, _d, _e, _f;
|
|
437
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, 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, body: _body, } = request;
|
|
438
|
+
const _queryParams = {};
|
|
439
|
+
if (sortBy !== undefined) {
|
|
440
|
+
_queryParams["sort_by"] = sortBy;
|
|
441
|
+
}
|
|
442
|
+
if (sortOrder !== undefined) {
|
|
443
|
+
_queryParams["sort_order"] = sortOrder;
|
|
444
|
+
}
|
|
445
|
+
if (page !== undefined) {
|
|
446
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
447
|
+
}
|
|
448
|
+
if (pageSize !== undefined) {
|
|
449
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
450
|
+
}
|
|
451
|
+
if (filterStatus !== undefined) {
|
|
452
|
+
if (Array.isArray(filterStatus)) {
|
|
453
|
+
_queryParams["filter_status"] = filterStatus.map((item) => item);
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
_queryParams["filter_status"] = filterStatus;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
if (filterDraftStartedAtTimestampLte !== undefined) {
|
|
460
|
+
_queryParams["filter_draft_started_at_timestamp_lte"] = filterDraftStartedAtTimestampLte;
|
|
461
|
+
}
|
|
462
|
+
if (filterDraftStartedAtTimestampGte !== undefined) {
|
|
463
|
+
_queryParams["filter_draft_started_at_timestamp_gte"] = filterDraftStartedAtTimestampGte;
|
|
464
|
+
}
|
|
465
|
+
if (filterStagedAtTimestampLte !== undefined) {
|
|
466
|
+
_queryParams["filter_staged_at_timestamp_lte"] = filterStagedAtTimestampLte;
|
|
467
|
+
}
|
|
468
|
+
if (filterStagedAtTimestampGte !== undefined) {
|
|
469
|
+
_queryParams["filter_staged_at_timestamp_gte"] = filterStagedAtTimestampGte;
|
|
470
|
+
}
|
|
471
|
+
if (filterInProgressAtTimestampLte !== undefined) {
|
|
472
|
+
_queryParams["filter_in_progress_at_timestamp_lte"] = filterInProgressAtTimestampLte;
|
|
473
|
+
}
|
|
474
|
+
if (filterInProgressAtTimestampGte !== undefined) {
|
|
475
|
+
_queryParams["filter_in_progress_at_timestamp_gte"] = filterInProgressAtTimestampGte;
|
|
476
|
+
}
|
|
477
|
+
if (filterCompletedAtTimestampLte !== undefined) {
|
|
478
|
+
_queryParams["filter_completed_at_timestamp_lte"] = filterCompletedAtTimestampLte;
|
|
479
|
+
}
|
|
480
|
+
if (filterCompletedAtTimestampGte !== undefined) {
|
|
481
|
+
_queryParams["filter_completed_at_timestamp_gte"] = filterCompletedAtTimestampGte;
|
|
482
|
+
}
|
|
483
|
+
if (filterExceptionAtTimestampLte !== undefined) {
|
|
484
|
+
_queryParams["filter_exception_at_timestamp_lte"] = filterExceptionAtTimestampLte;
|
|
485
|
+
}
|
|
486
|
+
if (filterExceptionAtTimestampGte !== undefined) {
|
|
487
|
+
_queryParams["filter_exception_at_timestamp_gte"] = filterExceptionAtTimestampGte;
|
|
488
|
+
}
|
|
489
|
+
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
490
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
491
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "oort/task_groups/expanded/list/for_courier_driver/v1"),
|
|
492
|
+
method: "POST",
|
|
493
|
+
headers: _headers,
|
|
494
|
+
contentType: "application/json",
|
|
495
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
496
|
+
requestType: "json",
|
|
497
|
+
body: _body,
|
|
498
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
499
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
500
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
501
|
+
});
|
|
502
|
+
if (_response.ok) {
|
|
503
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
504
|
+
}
|
|
505
|
+
if (_response.error.reason === "status-code") {
|
|
506
|
+
switch (_response.error.statusCode) {
|
|
507
|
+
case 422:
|
|
508
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
509
|
+
default:
|
|
510
|
+
throw new errors.ChrtError({
|
|
511
|
+
statusCode: _response.error.statusCode,
|
|
512
|
+
body: _response.error.body,
|
|
513
|
+
rawResponse: _response.rawResponse,
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
switch (_response.error.reason) {
|
|
518
|
+
case "non-json":
|
|
519
|
+
throw new errors.ChrtError({
|
|
520
|
+
statusCode: _response.error.statusCode,
|
|
521
|
+
body: _response.error.rawBody,
|
|
522
|
+
rawResponse: _response.rawResponse,
|
|
523
|
+
});
|
|
524
|
+
case "timeout":
|
|
525
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_groups/expanded/list/for_courier_driver/v1.");
|
|
526
|
+
case "unknown":
|
|
527
|
+
throw new errors.ChrtError({
|
|
528
|
+
message: _response.error.errorMessage,
|
|
529
|
+
rawResponse: _response.rawResponse,
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
}
|
|
274
534
|
_getAuthorizationHeader() {
|
|
275
535
|
return __awaiter(this, void 0, void 0, function* () {
|
|
276
536
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* sort_by: "draft_started_at_timestamp",
|
|
9
|
+
* sort_order: "ascending",
|
|
10
|
+
* page: 1,
|
|
11
|
+
* page_size: 1,
|
|
12
|
+
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
13
|
+
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
14
|
+
* filter_staged_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
15
|
+
* filter_staged_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
16
|
+
* filter_in_progress_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
17
|
+
* filter_in_progress_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
18
|
+
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
19
|
+
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
20
|
+
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
21
|
+
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
22
|
+
* body: {}
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
25
|
+
export interface ExpandedListForCourierDriverV1Request {
|
|
26
|
+
sort_by?: Chrt.TaskGroupSortByEnum | null;
|
|
27
|
+
sort_order?: Chrt.taskGroups.ExpandedListForCourierDriverV1RequestSortOrder | null;
|
|
28
|
+
page?: number | null;
|
|
29
|
+
page_size?: number | null;
|
|
30
|
+
filter_status?: (Chrt.TaskGroupStatusEnum1 | null) | (Chrt.TaskGroupStatusEnum1 | null)[];
|
|
31
|
+
filter_draft_started_at_timestamp_lte?: string | null;
|
|
32
|
+
filter_draft_started_at_timestamp_gte?: string | null;
|
|
33
|
+
filter_staged_at_timestamp_lte?: string | null;
|
|
34
|
+
filter_staged_at_timestamp_gte?: string | null;
|
|
35
|
+
filter_in_progress_at_timestamp_lte?: string | null;
|
|
36
|
+
filter_in_progress_at_timestamp_gte?: string | null;
|
|
37
|
+
filter_completed_at_timestamp_lte?: string | null;
|
|
38
|
+
filter_completed_at_timestamp_gte?: string | null;
|
|
39
|
+
filter_exception_at_timestamp_lte?: string | null;
|
|
40
|
+
filter_exception_at_timestamp_gte?: string | null;
|
|
41
|
+
body: Chrt.OrderAndTaskGroupExpandedReq;
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* sort_by: "draft_started_at_timestamp",
|
|
9
|
+
* sort_order: "ascending",
|
|
10
|
+
* page: 1,
|
|
11
|
+
* page_size: 1,
|
|
12
|
+
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
13
|
+
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
14
|
+
* filter_staged_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
15
|
+
* filter_staged_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
16
|
+
* filter_in_progress_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
17
|
+
* filter_in_progress_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
18
|
+
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
19
|
+
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
20
|
+
* filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
21
|
+
* filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
22
|
+
* body: {}
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
25
|
+
export interface ExpandedListForCourierOperatorsV1Request {
|
|
26
|
+
sort_by?: Chrt.TaskGroupSortByEnum | null;
|
|
27
|
+
sort_order?: Chrt.taskGroups.ExpandedListForCourierOperatorsV1RequestSortOrder | null;
|
|
28
|
+
page?: number | null;
|
|
29
|
+
page_size?: number | null;
|
|
30
|
+
filter_status?: (Chrt.TaskGroupStatusEnum1 | null) | (Chrt.TaskGroupStatusEnum1 | null)[];
|
|
31
|
+
filter_draft_started_at_timestamp_lte?: string | null;
|
|
32
|
+
filter_draft_started_at_timestamp_gte?: string | null;
|
|
33
|
+
filter_staged_at_timestamp_lte?: string | null;
|
|
34
|
+
filter_staged_at_timestamp_gte?: string | null;
|
|
35
|
+
filter_in_progress_at_timestamp_lte?: string | null;
|
|
36
|
+
filter_in_progress_at_timestamp_gte?: string | null;
|
|
37
|
+
filter_completed_at_timestamp_lte?: string | null;
|
|
38
|
+
filter_completed_at_timestamp_gte?: string | null;
|
|
39
|
+
filter_exception_at_timestamp_lte?: string | null;
|
|
40
|
+
filter_exception_at_timestamp_gte?: string | null;
|
|
41
|
+
body: Chrt.OrderAndTaskGroupExpandedReq;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type ExpandedListForCourierDriverV1RequestSortOrder = "ascending" | "descending";
|
|
5
|
+
export declare const ExpandedListForCourierDriverV1RequestSortOrder: {
|
|
6
|
+
readonly Ascending: "ascending";
|
|
7
|
+
readonly Descending: "descending";
|
|
8
|
+
};
|