@chrt-inc/typescript-sdk 1.929.0 → 1.930.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/shipping/client/Client.d.ts +0 -3
- package/dist/cjs/api/resources/shipping/client/Client.js +10 -15
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.d.ts +6 -3
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.js +19 -11
- package/dist/cjs/api/resources/shipping/resources/flights/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/flights/client/index.js +15 -0
- package/dist/cjs/api/resources/shipping/resources/flights/client/requests/FlightsGetFlightTrackForFlightLegV1Request.d.ts +13 -0
- package/dist/cjs/api/resources/shipping/resources/flights/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/index.d.ts +1 -2
- package/dist/cjs/api/resources/shipping/resources/index.js +2 -3
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.d.ts +103 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.js +442 -0
- package/dist/{esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.mts → cjs/api/resources/shipping/resources/orders/client/requests/OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.ts} +1 -1
- package/dist/{esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftDeleteManyReq.d.mts → cjs/api/resources/shipping/resources/orders/client/requests/OrdersDeleteManyDraftsReq.d.ts} +1 -1
- package/dist/{esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/SetTaskGroupOrderingDraftReq.d.mts → cjs/api/resources/shipping/resources/orders/client/requests/OrdersTaskGroupOrderingReq.d.ts} +2 -2
- package/dist/cjs/api/resources/shipping/resources/orders/{resources/drafts/client/requests/OrdersDraftUpdateReq.d.ts → client/requests/OrdersUpdateDraftReq.d.ts} +2 -2
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/cargo/client/Client.d.ts +13 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/cargo/client/Client.js +59 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/Client.d.ts +0 -109
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/Client.js +0 -452
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/OrdersOpenDraftReq.d.ts +0 -2
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/index.d.ts +0 -4
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/index.js +0 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.d.ts +13 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.js +59 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +3 -2
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +11 -7
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.d.ts +4 -1
- package/dist/cjs/api/types/OrderLimitedForProvider1.d.ts +0 -1
- package/dist/cjs/api/types/OrderLimitedForShipper1.d.ts +0 -1
- package/dist/cjs/api/types/{OrdersDraftDeleteManyRes.d.ts → OrdersDeleteManyDraftsRes.d.ts} +1 -1
- package/dist/cjs/api/types/{OrdersDraftUpdateRes.d.ts → OrdersUpdateDraftRes.d.ts} +1 -1
- package/dist/cjs/api/types/index.d.ts +2 -9
- package/dist/cjs/api/types/index.js +2 -9
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/shipping/client/Client.d.mts +0 -3
- package/dist/esm/api/resources/shipping/client/Client.mjs +0 -5
- package/dist/esm/api/resources/shipping/resources/flights/client/Client.d.mts +6 -3
- package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +19 -11
- package/dist/esm/api/resources/shipping/resources/flights/client/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/flights/client/index.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/flights/client/requests/FlightsGetFlightTrackForFlightLegV1Request.d.mts +13 -0
- package/dist/esm/api/resources/shipping/resources/flights/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/index.d.mts +1 -2
- package/dist/esm/api/resources/shipping/resources/index.mjs +1 -2
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.d.mts +103 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.mjs +442 -0
- package/dist/{cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.ts → esm/api/resources/shipping/resources/orders/client/requests/OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request.d.mts} +1 -1
- package/dist/{cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftDeleteManyReq.d.ts → esm/api/resources/shipping/resources/orders/client/requests/OrdersDeleteManyDraftsReq.d.mts} +1 -1
- package/dist/{cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/SetTaskGroupOrderingDraftReq.d.ts → esm/api/resources/shipping/resources/orders/client/requests/OrdersTaskGroupOrderingReq.d.mts} +2 -2
- package/dist/esm/api/resources/shipping/resources/orders/{resources/drafts/client/requests/OrdersDraftUpdateReq.d.mts → client/requests/OrdersUpdateDraftReq.d.mts} +2 -2
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/cargo/client/Client.d.mts +13 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/cargo/client/Client.mjs +59 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/Client.d.mts +0 -109
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/Client.mjs +0 -452
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/OrdersOpenDraftReq.d.mts +0 -2
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/index.d.mts +0 -4
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.d.mts +13 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.mjs +59 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +3 -2
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +11 -7
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.d.mts +4 -1
- package/dist/esm/api/types/OrderLimitedForProvider1.d.mts +0 -1
- package/dist/esm/api/types/OrderLimitedForShipper1.d.mts +0 -1
- package/dist/esm/api/types/{OrdersDraftDeleteManyRes.d.mts → OrdersDeleteManyDraftsRes.d.mts} +1 -1
- package/dist/esm/api/types/{OrdersDraftUpdateRes.d.mts → OrdersUpdateDraftRes.d.mts} +1 -1
- package/dist/esm/api/types/index.d.mts +2 -9
- package/dist/esm/api/types/index.mjs +2 -9
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +326 -935
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/Client.d.ts +0 -182
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/Client.js +0 -720
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/index.d.ts +0 -2
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/index.js +0 -17
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.ts +0 -33
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.ts +0 -37
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateRemoveReferenceReq.d.ts +0 -14
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplatesListV1Request.d.ts +0 -80
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/index.d.ts +0 -4
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/index.js +0 -17
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/SetTaskGroupOrderingDraftReq.js +0 -5
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/Client.d.ts +0 -46
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/Client.js +0 -127
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/index.js +0 -2
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/index.js +0 -17
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/index.js +0 -38
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/Client.d.ts +0 -46
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/Client.js +0 -127
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/index.js +0 -2
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/index.js +0 -17
- package/dist/cjs/api/types/Order1.d.ts +0 -43
- package/dist/cjs/api/types/Order1.js +0 -5
- package/dist/cjs/api/types/OrderTemplate1.d.ts +0 -35
- package/dist/cjs/api/types/OrderTemplate1.js +0 -5
- package/dist/cjs/api/types/OrderTemplateExpanded1.d.ts +0 -16
- package/dist/cjs/api/types/OrderTemplateExpanded1.js +0 -5
- package/dist/cjs/api/types/OrderTemplateListRes.d.ts +0 -8
- package/dist/cjs/api/types/OrderTemplateListRes.js +0 -5
- package/dist/cjs/api/types/OrderTemplateOrgInfo1.d.ts +0 -10
- package/dist/cjs/api/types/OrderTemplateOrgInfo1.js +0 -5
- package/dist/cjs/api/types/OrderTemplateReferenceColumnEnum1.d.ts +0 -13
- package/dist/cjs/api/types/OrderTemplateReferenceColumnEnum1.js +0 -15
- package/dist/cjs/api/types/OrderTemplateSortByEnum.d.ts +0 -11
- package/dist/cjs/api/types/OrderTemplateSortByEnum.js +0 -13
- package/dist/cjs/api/types/OrdersDraftDeleteManyRes.js +0 -5
- package/dist/cjs/api/types/OrdersDraftUpdateRes.js +0 -5
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/Client.d.mts +0 -182
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/Client.mjs +0 -683
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/index.d.mts +0 -2
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.mts +0 -33
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.mts +0 -37
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateRemoveReferenceReq.d.mts +0 -14
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplatesListV1Request.d.mts +0 -80
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/index.d.mts +0 -4
- package/dist/esm/api/resources/shipping/resources/orderTemplates/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplates/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/client/requests/SetTaskGroupOrderingDraftReq.mjs +0 -4
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/Client.d.mts +0 -46
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/Client.mjs +0 -90
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/client/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/cargo/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/index.mjs +0 -2
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/Client.d.mts +0 -46
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/Client.mjs +0 -90
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/client/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/drafts/resources/taskGroup/index.mjs +0 -1
- package/dist/esm/api/types/Order1.d.mts +0 -43
- package/dist/esm/api/types/Order1.mjs +0 -4
- package/dist/esm/api/types/OrderTemplate1.d.mts +0 -35
- package/dist/esm/api/types/OrderTemplate1.mjs +0 -4
- package/dist/esm/api/types/OrderTemplateExpanded1.d.mts +0 -16
- package/dist/esm/api/types/OrderTemplateExpanded1.mjs +0 -4
- package/dist/esm/api/types/OrderTemplateListRes.d.mts +0 -8
- package/dist/esm/api/types/OrderTemplateListRes.mjs +0 -4
- package/dist/esm/api/types/OrderTemplateOrgInfo1.d.mts +0 -10
- package/dist/esm/api/types/OrderTemplateOrgInfo1.mjs +0 -4
- package/dist/esm/api/types/OrderTemplateReferenceColumnEnum1.d.mts +0 -13
- package/dist/esm/api/types/OrderTemplateReferenceColumnEnum1.mjs +0 -12
- package/dist/esm/api/types/OrderTemplateSortByEnum.d.mts +0 -11
- package/dist/esm/api/types/OrderTemplateSortByEnum.mjs +0 -10
- package/dist/esm/api/types/OrdersDraftDeleteManyRes.mjs +0 -4
- package/dist/esm/api/types/OrdersDraftUpdateRes.mjs +0 -4
- /package/dist/cjs/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateClientCreate1.js → flights/client/requests/FlightsGetFlightTrackForFlightLegV1Request.js} +0 -0
- /package/dist/cjs/api/resources/shipping/resources/{orderTemplates → flights}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateClientUpdate1.js → orders/client/requests/OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request.js} +0 -0
- /package/dist/cjs/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateRemoveReferenceReq.js → orders/client/requests/OrdersDeleteManyDraftsReq.js} +0 -0
- /package/dist/cjs/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplatesListV1Request.js → orders/client/requests/OrdersTaskGroupOrderingReq.js} +0 -0
- /package/dist/cjs/api/resources/shipping/resources/orders/{resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.js → client/requests/OrdersUpdateDraftReq.js} +0 -0
- /package/dist/cjs/api/{resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftDeleteManyReq.js → types/OrdersDeleteManyDraftsRes.js} +0 -0
- /package/dist/cjs/api/{resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftUpdateReq.js → types/OrdersUpdateDraftRes.js} +0 -0
- /package/dist/esm/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateClientCreate1.mjs → flights/client/requests/FlightsGetFlightTrackForFlightLegV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/shipping/resources/{orderTemplates → flights}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateClientUpdate1.mjs → orders/client/requests/OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplateRemoveReferenceReq.mjs → orders/client/requests/OrdersDeleteManyDraftsReq.mjs} +0 -0
- /package/dist/esm/api/resources/shipping/resources/{orderTemplates/client/requests/OrderTemplatesListV1Request.mjs → orders/client/requests/OrdersTaskGroupOrderingReq.mjs} +0 -0
- /package/dist/esm/api/resources/shipping/resources/orders/{resources/drafts/client/requests/DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.mjs → client/requests/OrdersUpdateDraftReq.mjs} +0 -0
- /package/dist/esm/api/{resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftDeleteManyReq.mjs → types/OrdersDeleteManyDraftsRes.mjs} +0 -0
- /package/dist/esm/api/{resources/shipping/resources/orders/resources/drafts/client/requests/OrdersDraftUpdateReq.mjs → types/OrdersUpdateDraftRes.mjs} +0 -0
|
@@ -278,6 +278,261 @@ class Orders {
|
|
|
278
278
|
}
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
+
/**
|
|
282
|
+
* Adds or updates a coordinator task list to apply when the draft is staged. | authz_personas=[coordinator_org_operators] | (UTCDatetime | None) -> (bool)
|
|
283
|
+
*
|
|
284
|
+
* @param {string} orderId
|
|
285
|
+
* @param {string} taskListId
|
|
286
|
+
* @param {Chrt.shipping.OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request} request
|
|
287
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
288
|
+
*
|
|
289
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* await client.shipping.orders.addCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id", {
|
|
293
|
+
* department_id: "department_id",
|
|
294
|
+
* body: "2024-01-15T09:30:00Z"
|
|
295
|
+
* })
|
|
296
|
+
*/
|
|
297
|
+
addCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, request = {}, requestOptions) {
|
|
298
|
+
return core.HttpResponsePromise.fromPromise(this.__addCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, request, requestOptions));
|
|
299
|
+
}
|
|
300
|
+
__addCoordinatorTaskListToApplyAtOrderStagingV1(orderId_1, taskListId_1) {
|
|
301
|
+
return __awaiter(this, arguments, void 0, function* (orderId, taskListId, request = {}, requestOptions) {
|
|
302
|
+
var _a, _b, _c, _d;
|
|
303
|
+
const { department_id: departmentId, body: _body } = request;
|
|
304
|
+
const _queryParams = {};
|
|
305
|
+
if (departmentId !== undefined) {
|
|
306
|
+
_queryParams["department_id"] = departmentId;
|
|
307
|
+
}
|
|
308
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
309
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
310
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/coordinator_task_lists_to_apply_at_order_staging/add/v1/${encodeURIComponent(orderId)}/${encodeURIComponent(taskListId)}`),
|
|
311
|
+
method: "POST",
|
|
312
|
+
headers: _headers,
|
|
313
|
+
contentType: "application/json",
|
|
314
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
315
|
+
requestType: "json",
|
|
316
|
+
body: _body != null ? _body : undefined,
|
|
317
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
318
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
319
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
320
|
+
});
|
|
321
|
+
if (_response.ok) {
|
|
322
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
323
|
+
}
|
|
324
|
+
if (_response.error.reason === "status-code") {
|
|
325
|
+
switch (_response.error.statusCode) {
|
|
326
|
+
case 422:
|
|
327
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
328
|
+
default:
|
|
329
|
+
throw new errors.ChrtError({
|
|
330
|
+
statusCode: _response.error.statusCode,
|
|
331
|
+
body: _response.error.body,
|
|
332
|
+
rawResponse: _response.rawResponse,
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
switch (_response.error.reason) {
|
|
337
|
+
case "non-json":
|
|
338
|
+
throw new errors.ChrtError({
|
|
339
|
+
statusCode: _response.error.statusCode,
|
|
340
|
+
body: _response.error.rawBody,
|
|
341
|
+
rawResponse: _response.rawResponse,
|
|
342
|
+
});
|
|
343
|
+
case "timeout":
|
|
344
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/coordinator_task_lists_to_apply_at_order_staging/add/v1/{order_id}/{task_list_id}.");
|
|
345
|
+
case "unknown":
|
|
346
|
+
throw new errors.ChrtError({
|
|
347
|
+
message: _response.error.errorMessage,
|
|
348
|
+
rawResponse: _response.rawResponse,
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Removes a coordinator task list pending application at draft staging. | authz_personas=[coordinator_org_operators] | () -> (bool)
|
|
355
|
+
*
|
|
356
|
+
* @param {string} orderId
|
|
357
|
+
* @param {string} taskListId
|
|
358
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
359
|
+
*
|
|
360
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* await client.shipping.orders.removeCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id")
|
|
364
|
+
*/
|
|
365
|
+
removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, requestOptions) {
|
|
366
|
+
return core.HttpResponsePromise.fromPromise(this.__removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, requestOptions));
|
|
367
|
+
}
|
|
368
|
+
__removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, requestOptions) {
|
|
369
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
370
|
+
var _a, _b, _c, _d;
|
|
371
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
372
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
373
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/coordinator_task_lists_to_apply_at_order_staging/remove/v1/${encodeURIComponent(orderId)}/${encodeURIComponent(taskListId)}`),
|
|
374
|
+
method: "POST",
|
|
375
|
+
headers: _headers,
|
|
376
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
377
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
378
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
379
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
380
|
+
});
|
|
381
|
+
if (_response.ok) {
|
|
382
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
383
|
+
}
|
|
384
|
+
if (_response.error.reason === "status-code") {
|
|
385
|
+
switch (_response.error.statusCode) {
|
|
386
|
+
case 422:
|
|
387
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
388
|
+
default:
|
|
389
|
+
throw new errors.ChrtError({
|
|
390
|
+
statusCode: _response.error.statusCode,
|
|
391
|
+
body: _response.error.body,
|
|
392
|
+
rawResponse: _response.rawResponse,
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
switch (_response.error.reason) {
|
|
397
|
+
case "non-json":
|
|
398
|
+
throw new errors.ChrtError({
|
|
399
|
+
statusCode: _response.error.statusCode,
|
|
400
|
+
body: _response.error.rawBody,
|
|
401
|
+
rawResponse: _response.rawResponse,
|
|
402
|
+
});
|
|
403
|
+
case "timeout":
|
|
404
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/coordinator_task_lists_to_apply_at_order_staging/remove/v1/{order_id}/{task_list_id}.");
|
|
405
|
+
case "unknown":
|
|
406
|
+
throw new errors.ChrtError({
|
|
407
|
+
message: _response.error.errorMessage,
|
|
408
|
+
rawResponse: _response.rawResponse,
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Hard-deletes a draft order and all dependent entities. | authz_personas=[draft_creator_org_operator] | () -> (bool)
|
|
415
|
+
*
|
|
416
|
+
* @param {string} orderId
|
|
417
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
418
|
+
*
|
|
419
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
420
|
+
*
|
|
421
|
+
* @example
|
|
422
|
+
* await client.shipping.orders.deleteDraftV1("order_id")
|
|
423
|
+
*/
|
|
424
|
+
deleteDraftV1(orderId, requestOptions) {
|
|
425
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteDraftV1(orderId, requestOptions));
|
|
426
|
+
}
|
|
427
|
+
__deleteDraftV1(orderId, requestOptions) {
|
|
428
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
429
|
+
var _a, _b, _c, _d;
|
|
430
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
431
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
432
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/delete_draft/v1/${encodeURIComponent(orderId)}`),
|
|
433
|
+
method: "DELETE",
|
|
434
|
+
headers: _headers,
|
|
435
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
436
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
437
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
438
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
439
|
+
});
|
|
440
|
+
if (_response.ok) {
|
|
441
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
442
|
+
}
|
|
443
|
+
if (_response.error.reason === "status-code") {
|
|
444
|
+
switch (_response.error.statusCode) {
|
|
445
|
+
case 422:
|
|
446
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
447
|
+
default:
|
|
448
|
+
throw new errors.ChrtError({
|
|
449
|
+
statusCode: _response.error.statusCode,
|
|
450
|
+
body: _response.error.body,
|
|
451
|
+
rawResponse: _response.rawResponse,
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
switch (_response.error.reason) {
|
|
456
|
+
case "non-json":
|
|
457
|
+
throw new errors.ChrtError({
|
|
458
|
+
statusCode: _response.error.statusCode,
|
|
459
|
+
body: _response.error.rawBody,
|
|
460
|
+
rawResponse: _response.rawResponse,
|
|
461
|
+
});
|
|
462
|
+
case "timeout":
|
|
463
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/orders/delete_draft/v1/{order_id}.");
|
|
464
|
+
case "unknown":
|
|
465
|
+
throw new errors.ChrtError({
|
|
466
|
+
message: _response.error.errorMessage,
|
|
467
|
+
rawResponse: _response.rawResponse,
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Hard-deletes multiple draft orders and all dependent entities. | authz_personas=[draft_creator_org_operator] | (OrdersDeleteManyDraftsReq) -> (OrdersDeleteManyDraftsRes)
|
|
474
|
+
*
|
|
475
|
+
* @param {Chrt.shipping.OrdersDeleteManyDraftsReq} request
|
|
476
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
477
|
+
*
|
|
478
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
479
|
+
*
|
|
480
|
+
* @example
|
|
481
|
+
* await client.shipping.orders.deleteManyDraftsV1({
|
|
482
|
+
* order_ids: ["order_ids"]
|
|
483
|
+
* })
|
|
484
|
+
*/
|
|
485
|
+
deleteManyDraftsV1(request, requestOptions) {
|
|
486
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteManyDraftsV1(request, requestOptions));
|
|
487
|
+
}
|
|
488
|
+
__deleteManyDraftsV1(request, requestOptions) {
|
|
489
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
490
|
+
var _a, _b, _c, _d;
|
|
491
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
492
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
493
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "shipping/orders/delete_many_drafts/v1"),
|
|
494
|
+
method: "DELETE",
|
|
495
|
+
headers: _headers,
|
|
496
|
+
contentType: "application/json",
|
|
497
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
498
|
+
requestType: "json",
|
|
499
|
+
body: request,
|
|
500
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
501
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
502
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
503
|
+
});
|
|
504
|
+
if (_response.ok) {
|
|
505
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
506
|
+
}
|
|
507
|
+
if (_response.error.reason === "status-code") {
|
|
508
|
+
switch (_response.error.statusCode) {
|
|
509
|
+
case 422:
|
|
510
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
511
|
+
default:
|
|
512
|
+
throw new errors.ChrtError({
|
|
513
|
+
statusCode: _response.error.statusCode,
|
|
514
|
+
body: _response.error.body,
|
|
515
|
+
rawResponse: _response.rawResponse,
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
switch (_response.error.reason) {
|
|
520
|
+
case "non-json":
|
|
521
|
+
throw new errors.ChrtError({
|
|
522
|
+
statusCode: _response.error.statusCode,
|
|
523
|
+
body: _response.error.rawBody,
|
|
524
|
+
rawResponse: _response.rawResponse,
|
|
525
|
+
});
|
|
526
|
+
case "timeout":
|
|
527
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/orders/delete_many_drafts/v1.");
|
|
528
|
+
case "unknown":
|
|
529
|
+
throw new errors.ChrtError({
|
|
530
|
+
message: _response.error.errorMessage,
|
|
531
|
+
rawResponse: _response.rawResponse,
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
}
|
|
281
536
|
/**
|
|
282
537
|
* Validates a draft order and stages all related entities in a transaction. | authz_personas=[draft_creator_org_operator] | () -> (bool)
|
|
283
538
|
*
|
|
@@ -396,6 +651,71 @@ class Orders {
|
|
|
396
651
|
}
|
|
397
652
|
});
|
|
398
653
|
}
|
|
654
|
+
/**
|
|
655
|
+
* Sets task-group ordering on an active order unless a task group or task is completed. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | (OrdersTaskGroupOrderingReq) -> (bool)
|
|
656
|
+
*
|
|
657
|
+
* @param {string} orderId
|
|
658
|
+
* @param {Chrt.shipping.OrdersTaskGroupOrderingReq} request
|
|
659
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
660
|
+
*
|
|
661
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
662
|
+
*
|
|
663
|
+
* @example
|
|
664
|
+
* await client.shipping.orders.taskGroupOrderingV1("order_id", {
|
|
665
|
+
* task_group_ids: ["task_group_ids"]
|
|
666
|
+
* })
|
|
667
|
+
*/
|
|
668
|
+
taskGroupOrderingV1(orderId, request, requestOptions) {
|
|
669
|
+
return core.HttpResponsePromise.fromPromise(this.__taskGroupOrderingV1(orderId, request, requestOptions));
|
|
670
|
+
}
|
|
671
|
+
__taskGroupOrderingV1(orderId, request, requestOptions) {
|
|
672
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
673
|
+
var _a, _b, _c, _d;
|
|
674
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
675
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
676
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/task_group_ordering/v1/${encodeURIComponent(orderId)}`),
|
|
677
|
+
method: "PUT",
|
|
678
|
+
headers: _headers,
|
|
679
|
+
contentType: "application/json",
|
|
680
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
681
|
+
requestType: "json",
|
|
682
|
+
body: request,
|
|
683
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
684
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
685
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
686
|
+
});
|
|
687
|
+
if (_response.ok) {
|
|
688
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
689
|
+
}
|
|
690
|
+
if (_response.error.reason === "status-code") {
|
|
691
|
+
switch (_response.error.statusCode) {
|
|
692
|
+
case 422:
|
|
693
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
694
|
+
default:
|
|
695
|
+
throw new errors.ChrtError({
|
|
696
|
+
statusCode: _response.error.statusCode,
|
|
697
|
+
body: _response.error.body,
|
|
698
|
+
rawResponse: _response.rawResponse,
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
switch (_response.error.reason) {
|
|
703
|
+
case "non-json":
|
|
704
|
+
throw new errors.ChrtError({
|
|
705
|
+
statusCode: _response.error.statusCode,
|
|
706
|
+
body: _response.error.rawBody,
|
|
707
|
+
rawResponse: _response.rawResponse,
|
|
708
|
+
});
|
|
709
|
+
case "timeout":
|
|
710
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/orders/task_group_ordering/v1/{order_id}.");
|
|
711
|
+
case "unknown":
|
|
712
|
+
throw new errors.ChrtError({
|
|
713
|
+
message: _response.error.errorMessage,
|
|
714
|
+
rawResponse: _response.rawResponse,
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
}
|
|
399
719
|
/**
|
|
400
720
|
* Returns distinct label values matching the query for orders where the caller is coordinator (coordinator_label) or executor (task_group_details.executor_label). | authz: allowed_org_types=[provider], min_org_role=operator | () -> (list[str])
|
|
401
721
|
*
|
|
@@ -660,6 +980,69 @@ class Orders {
|
|
|
660
980
|
}
|
|
661
981
|
});
|
|
662
982
|
}
|
|
983
|
+
/**
|
|
984
|
+
* Updates service-line and organization assignments on a draft order. | authz_personas=[draft_creator_org_operator] | (OrdersUpdateDraftReq) -> (OrdersUpdateDraftRes)
|
|
985
|
+
*
|
|
986
|
+
* @param {string} orderId
|
|
987
|
+
* @param {Chrt.shipping.OrdersUpdateDraftReq} request
|
|
988
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
989
|
+
*
|
|
990
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
991
|
+
*
|
|
992
|
+
* @example
|
|
993
|
+
* await client.shipping.orders.updateDraftV1("order_id")
|
|
994
|
+
*/
|
|
995
|
+
updateDraftV1(orderId, request = {}, requestOptions) {
|
|
996
|
+
return core.HttpResponsePromise.fromPromise(this.__updateDraftV1(orderId, request, requestOptions));
|
|
997
|
+
}
|
|
998
|
+
__updateDraftV1(orderId_1) {
|
|
999
|
+
return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
|
|
1000
|
+
var _a, _b, _c, _d;
|
|
1001
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1002
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1003
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/update_draft/v1/${encodeURIComponent(orderId)}`),
|
|
1004
|
+
method: "PATCH",
|
|
1005
|
+
headers: _headers,
|
|
1006
|
+
contentType: "application/json",
|
|
1007
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1008
|
+
requestType: "json",
|
|
1009
|
+
body: request,
|
|
1010
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1011
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1012
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1013
|
+
});
|
|
1014
|
+
if (_response.ok) {
|
|
1015
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1016
|
+
}
|
|
1017
|
+
if (_response.error.reason === "status-code") {
|
|
1018
|
+
switch (_response.error.statusCode) {
|
|
1019
|
+
case 422:
|
|
1020
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1021
|
+
default:
|
|
1022
|
+
throw new errors.ChrtError({
|
|
1023
|
+
statusCode: _response.error.statusCode,
|
|
1024
|
+
body: _response.error.body,
|
|
1025
|
+
rawResponse: _response.rawResponse,
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
switch (_response.error.reason) {
|
|
1030
|
+
case "non-json":
|
|
1031
|
+
throw new errors.ChrtError({
|
|
1032
|
+
statusCode: _response.error.statusCode,
|
|
1033
|
+
body: _response.error.rawBody,
|
|
1034
|
+
rawResponse: _response.rawResponse,
|
|
1035
|
+
});
|
|
1036
|
+
case "timeout":
|
|
1037
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/update_draft/v1/{order_id}.");
|
|
1038
|
+
case "unknown":
|
|
1039
|
+
throw new errors.ChrtError({
|
|
1040
|
+
message: _response.error.errorMessage,
|
|
1041
|
+
rawResponse: _response.rawResponse,
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
663
1046
|
/**
|
|
664
1047
|
* Updates label for the caller's role on the order. Coordinator writes coordinator_label; executor writes executor_label on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateLabelReq) -> (bool)
|
|
665
1048
|
*
|
|
@@ -789,6 +1172,65 @@ class Orders {
|
|
|
789
1172
|
}
|
|
790
1173
|
});
|
|
791
1174
|
}
|
|
1175
|
+
/**
|
|
1176
|
+
* Validates a draft order for staging and returns requirement results. | authz_personas=[draft_creator_org_operator] | () -> (OrderDraftValidationResult)
|
|
1177
|
+
*
|
|
1178
|
+
* @param {string} orderId
|
|
1179
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
1180
|
+
*
|
|
1181
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
1182
|
+
*
|
|
1183
|
+
* @example
|
|
1184
|
+
* await client.shipping.orders.validateDraftV1("order_id")
|
|
1185
|
+
*/
|
|
1186
|
+
validateDraftV1(orderId, requestOptions) {
|
|
1187
|
+
return core.HttpResponsePromise.fromPromise(this.__validateDraftV1(orderId, requestOptions));
|
|
1188
|
+
}
|
|
1189
|
+
__validateDraftV1(orderId, requestOptions) {
|
|
1190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1191
|
+
var _a, _b, _c, _d;
|
|
1192
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1193
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1194
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/validate_draft/v1/${encodeURIComponent(orderId)}`),
|
|
1195
|
+
method: "GET",
|
|
1196
|
+
headers: _headers,
|
|
1197
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1198
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1199
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1200
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1201
|
+
});
|
|
1202
|
+
if (_response.ok) {
|
|
1203
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1204
|
+
}
|
|
1205
|
+
if (_response.error.reason === "status-code") {
|
|
1206
|
+
switch (_response.error.statusCode) {
|
|
1207
|
+
case 422:
|
|
1208
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1209
|
+
default:
|
|
1210
|
+
throw new errors.ChrtError({
|
|
1211
|
+
statusCode: _response.error.statusCode,
|
|
1212
|
+
body: _response.error.body,
|
|
1213
|
+
rawResponse: _response.rawResponse,
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
switch (_response.error.reason) {
|
|
1218
|
+
case "non-json":
|
|
1219
|
+
throw new errors.ChrtError({
|
|
1220
|
+
statusCode: _response.error.statusCode,
|
|
1221
|
+
body: _response.error.rawBody,
|
|
1222
|
+
rawResponse: _response.rawResponse,
|
|
1223
|
+
});
|
|
1224
|
+
case "timeout":
|
|
1225
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/orders/validate_draft/v1/{order_id}.");
|
|
1226
|
+
case "unknown":
|
|
1227
|
+
throw new errors.ChrtError({
|
|
1228
|
+
message: _response.error.errorMessage,
|
|
1229
|
+
rawResponse: _response.rawResponse,
|
|
1230
|
+
});
|
|
1231
|
+
}
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
792
1234
|
_getAuthorizationHeader() {
|
|
793
1235
|
return __awaiter(this, void 0, void 0, function* () {
|
|
794
1236
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* body: "2024-01-15T09:30:00Z"
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
|
-
export interface
|
|
11
|
+
export interface OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request {
|
|
12
12
|
department_id?: string | null;
|
|
13
13
|
body?: string | null;
|
|
14
14
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* task_group_ids: ["task_group_ids"]
|
|
8
8
|
* }
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
11
|
-
/** Complete list of task group IDs in the desired order */
|
|
10
|
+
export interface OrdersTaskGroupOrderingReq {
|
|
11
|
+
/** Complete list of task group IDs in the desired order. */
|
|
12
12
|
task_group_ids: string[];
|
|
13
13
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Chrt from "
|
|
4
|
+
import * as Chrt from "../../../../../../index.js";
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {}
|
|
8
8
|
*/
|
|
9
|
-
export interface
|
|
9
|
+
export interface OrdersUpdateDraftReq {
|
|
10
10
|
/** Must be a string starting with `org_` */
|
|
11
11
|
coordinator_org_id?: string | null;
|
|
12
12
|
coordinator_org_id__set_to_None?: boolean;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export { type OrdersAssignReq } from "./OrdersAssignReq.js";
|
|
2
2
|
export { type OrdersCancelManyReq } from "./OrdersCancelManyReq.js";
|
|
3
|
+
export { type OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request } from "./OrdersAddCoordinatorTaskListToApplyAtOrderStagingV1Request.js";
|
|
4
|
+
export { type OrdersDeleteManyDraftsReq } from "./OrdersDeleteManyDraftsReq.js";
|
|
5
|
+
export { type OrdersTaskGroupOrderingReq } from "./OrdersTaskGroupOrderingReq.js";
|
|
3
6
|
export { type OrdersTypeaheadLabelV1Request } from "./OrdersTypeaheadLabelV1Request.js";
|
|
4
7
|
export { type OrdersTypeaheadV1Request } from "./OrdersTypeaheadV1Request.js";
|
|
5
8
|
export { type OrdersUnassignReq } from "./OrdersUnassignReq.js";
|
|
6
9
|
export { type OrdersUpdateDepartmentReq } from "./OrdersUpdateDepartmentReq.js";
|
|
10
|
+
export { type OrdersUpdateDraftReq } from "./OrdersUpdateDraftReq.js";
|
|
7
11
|
export { type OrdersUpdateLabelReq } from "./OrdersUpdateLabelReq.js";
|
|
8
12
|
export { type OrdersUpdateOffChrtReferenceIdReq } from "./OrdersUpdateOffChrtReferenceIdReq.js";
|
|
@@ -66,6 +66,19 @@ export declare class Cargo {
|
|
|
66
66
|
*/
|
|
67
67
|
associateWithTaskV1(request: Chrt.shipping.orders.OrdersAssociateCargoWithTaskReq, requestOptions?: Cargo.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
68
68
|
private __associateWithTaskV1;
|
|
69
|
+
/**
|
|
70
|
+
* Deletes active cargo without completed task associations and resynchronizes the order AWB cache. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
|
|
71
|
+
*
|
|
72
|
+
* @param {string} cargoId
|
|
73
|
+
* @param {Cargo.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.shipping.orders.cargo.deleteV1("cargo_id")
|
|
79
|
+
*/
|
|
80
|
+
deleteV1(cargoId: string, requestOptions?: Cargo.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
81
|
+
private __deleteV1;
|
|
69
82
|
/**
|
|
70
83
|
* Duplicates cargo and all of its task associations within an order. | () -> (PydanticObjectId)
|
|
71
84
|
*
|
|
@@ -189,6 +189,65 @@ class Cargo {
|
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Deletes active cargo without completed task associations and resynchronizes the order AWB cache. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
|
|
194
|
+
*
|
|
195
|
+
* @param {string} cargoId
|
|
196
|
+
* @param {Cargo.RequestOptions} requestOptions - Request-specific configuration.
|
|
197
|
+
*
|
|
198
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* await client.shipping.orders.cargo.deleteV1("cargo_id")
|
|
202
|
+
*/
|
|
203
|
+
deleteV1(cargoId, requestOptions) {
|
|
204
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteV1(cargoId, requestOptions));
|
|
205
|
+
}
|
|
206
|
+
__deleteV1(cargoId, requestOptions) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
var _a, _b, _c, _d;
|
|
209
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
210
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
211
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/orders/cargo/delete/v1/${encodeURIComponent(cargoId)}`),
|
|
212
|
+
method: "DELETE",
|
|
213
|
+
headers: _headers,
|
|
214
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
215
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
216
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
217
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
218
|
+
});
|
|
219
|
+
if (_response.ok) {
|
|
220
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
221
|
+
}
|
|
222
|
+
if (_response.error.reason === "status-code") {
|
|
223
|
+
switch (_response.error.statusCode) {
|
|
224
|
+
case 422:
|
|
225
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
226
|
+
default:
|
|
227
|
+
throw new errors.ChrtError({
|
|
228
|
+
statusCode: _response.error.statusCode,
|
|
229
|
+
body: _response.error.body,
|
|
230
|
+
rawResponse: _response.rawResponse,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
switch (_response.error.reason) {
|
|
235
|
+
case "non-json":
|
|
236
|
+
throw new errors.ChrtError({
|
|
237
|
+
statusCode: _response.error.statusCode,
|
|
238
|
+
body: _response.error.rawBody,
|
|
239
|
+
rawResponse: _response.rawResponse,
|
|
240
|
+
});
|
|
241
|
+
case "timeout":
|
|
242
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/orders/cargo/delete/v1/{cargo_id}.");
|
|
243
|
+
case "unknown":
|
|
244
|
+
throw new errors.ChrtError({
|
|
245
|
+
message: _response.error.errorMessage,
|
|
246
|
+
rawResponse: _response.rawResponse,
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
}
|
|
192
251
|
/**
|
|
193
252
|
* Duplicates cargo and all of its task associations within an order. | () -> (PydanticObjectId)
|
|
194
253
|
*
|