@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
package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/Client.d.ts
CHANGED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
import * as environments from "../../../../../../../../environments.js";
|
|
5
5
|
import * as core from "../../../../../../../../core/index.js";
|
|
6
6
|
import * as Chrt from "../../../../../../../index.js";
|
|
7
|
-
import { Cargo } from "../resources/cargo/client/Client.js";
|
|
8
|
-
import { TaskGroup } from "../resources/taskGroup/client/Client.js";
|
|
9
7
|
export declare namespace Drafts {
|
|
10
8
|
interface Options {
|
|
11
9
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -31,43 +29,7 @@ export declare namespace Drafts {
|
|
|
31
29
|
}
|
|
32
30
|
export declare class Drafts {
|
|
33
31
|
protected readonly _options: Drafts.Options;
|
|
34
|
-
protected _cargo: Cargo | undefined;
|
|
35
|
-
protected _taskGroup: TaskGroup | undefined;
|
|
36
32
|
constructor(_options?: Drafts.Options);
|
|
37
|
-
get cargo(): Cargo;
|
|
38
|
-
get taskGroup(): TaskGroup;
|
|
39
|
-
/**
|
|
40
|
-
* Adds a coordinator task list with an optional department override to apply when the draft order is staged. | authz_personas=[coordinator_org_operators] | (UTCDatetime | None) -> (bool)
|
|
41
|
-
*
|
|
42
|
-
* @param {string} orderId
|
|
43
|
-
* @param {string} taskListId
|
|
44
|
-
* @param {Chrt.shipping.orders.DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request} request
|
|
45
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
|
-
*
|
|
47
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* await client.shipping.orders.drafts.addCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id", {
|
|
51
|
-
* department_id: "department_id",
|
|
52
|
-
* body: "2024-01-15T09:30:00Z"
|
|
53
|
-
* })
|
|
54
|
-
*/
|
|
55
|
-
addCoordinatorTaskListToApplyAtOrderStagingV1(orderId: string, taskListId: string, request?: Chrt.shipping.orders.DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
56
|
-
private __addCoordinatorTaskListToApplyAtOrderStagingV1;
|
|
57
|
-
/**
|
|
58
|
-
* Removes a pending coordinator staging task list from a draft order. | authz_personas=[coordinator_org_operators] | () -> (bool)
|
|
59
|
-
*
|
|
60
|
-
* @param {string} orderId
|
|
61
|
-
* @param {string} taskListId
|
|
62
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
-
*
|
|
64
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* await client.shipping.orders.drafts.removeCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id")
|
|
68
|
-
*/
|
|
69
|
-
removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId: string, taskListId: string, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
70
|
-
private __removeCoordinatorTaskListToApplyAtOrderStagingV1;
|
|
71
33
|
/**
|
|
72
34
|
* Creates a draft Order through one of three paths: (1) provide only order_template_new_id to load the saved template's core and record that template as the Order's provenance; (2) provide only order_template_new_core to materialize an ad hoc submitted core without template provenance; (3) provide both to record and validate the saved template as provenance while materializing the submitted core, without modifying the saved template. | authz: min_org_role=operator | (OrdersCreateDraftFromOrderTemplateNewReq) -> (OrdersOpenDraftRes)
|
|
73
35
|
*
|
|
@@ -81,34 +43,6 @@ export declare class Drafts {
|
|
|
81
43
|
*/
|
|
82
44
|
createFromOrderTemplateNewV1(request?: Chrt.shipping.orders.OrdersCreateDraftFromOrderTemplateNewReq, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<Chrt.OrdersOpenDraftRes>;
|
|
83
45
|
private __createFromOrderTemplateNewV1;
|
|
84
|
-
/**
|
|
85
|
-
* Deletes a draft order and all associated entities. | authz_personas=[draft_creator_org_operator] | () -> (bool)
|
|
86
|
-
*
|
|
87
|
-
* @param {string} orderId
|
|
88
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
|
-
*
|
|
90
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* await client.shipping.orders.drafts.deleteV1("order_id")
|
|
94
|
-
*/
|
|
95
|
-
deleteV1(orderId: string, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
96
|
-
private __deleteV1;
|
|
97
|
-
/**
|
|
98
|
-
* Deletes multiple draft orders and associated entities. | authz_personas=[draft_creator_org_operator] | (OrdersDraftDeleteManyReq) -> (OrdersDraftDeleteManyRes)
|
|
99
|
-
*
|
|
100
|
-
* @param {Chrt.shipping.orders.OrdersDraftDeleteManyReq} request
|
|
101
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
102
|
-
*
|
|
103
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* await client.shipping.orders.drafts.deleteManyV1({
|
|
107
|
-
* order_ids: ["order_ids"]
|
|
108
|
-
* })
|
|
109
|
-
*/
|
|
110
|
-
deleteManyV1(request: Chrt.shipping.orders.OrdersDraftDeleteManyReq, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<Chrt.OrdersDraftDeleteManyRes>;
|
|
111
|
-
private __deleteManyV1;
|
|
112
46
|
/**
|
|
113
47
|
* Opens a new draft order shell with org assignments based on caller's organization type. | authz: min_org_role=operator | (OrdersOpenDraftReq) -> (OrdersOpenDraftRes)
|
|
114
48
|
*
|
|
@@ -122,48 +56,5 @@ export declare class Drafts {
|
|
|
122
56
|
*/
|
|
123
57
|
openV1(request?: Chrt.shipping.orders.OrdersOpenDraftReq, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<Chrt.OrdersOpenDraftRes>;
|
|
124
58
|
private __openV1;
|
|
125
|
-
/**
|
|
126
|
-
* Sets the ordering of task groups within a draft order. Must provide all task group IDs with no duplicates. | (SetTaskGroupOrderingDraftReq) -> (bool)
|
|
127
|
-
*
|
|
128
|
-
* @param {string} orderId
|
|
129
|
-
* @param {Chrt.shipping.orders.SetTaskGroupOrderingDraftReq} request
|
|
130
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
|
-
*
|
|
132
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
133
|
-
*
|
|
134
|
-
* @example
|
|
135
|
-
* await client.shipping.orders.drafts.setTaskGroupOrderingV1("order_id", {
|
|
136
|
-
* task_group_ids: ["task_group_ids"]
|
|
137
|
-
* })
|
|
138
|
-
*/
|
|
139
|
-
setTaskGroupOrderingV1(orderId: string, request: Chrt.shipping.orders.SetTaskGroupOrderingDraftReq, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
140
|
-
private __setTaskGroupOrderingV1;
|
|
141
|
-
/**
|
|
142
|
-
* Updates coordinator and/or shipper org assignments for a draft order. | authz_personas=[draft_creator_org_operator] | (OrdersDraftUpdateReq) -> (OrdersDraftUpdateRes)
|
|
143
|
-
*
|
|
144
|
-
* @param {string} orderId
|
|
145
|
-
* @param {Chrt.shipping.orders.OrdersDraftUpdateReq} request
|
|
146
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
147
|
-
*
|
|
148
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
149
|
-
*
|
|
150
|
-
* @example
|
|
151
|
-
* await client.shipping.orders.drafts.updateV1("order_id")
|
|
152
|
-
*/
|
|
153
|
-
updateV1(orderId: string, request?: Chrt.shipping.orders.OrdersDraftUpdateReq, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<Chrt.OrdersDraftUpdateRes>;
|
|
154
|
-
private __updateV1;
|
|
155
|
-
/**
|
|
156
|
-
* Validates the draft order for staging and returns requirement results. | () -> (OrderDraftValidationResult)
|
|
157
|
-
*
|
|
158
|
-
* @param {string} orderId
|
|
159
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
160
|
-
*
|
|
161
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
162
|
-
*
|
|
163
|
-
* @example
|
|
164
|
-
* await client.shipping.orders.drafts.validateV1("order_id")
|
|
165
|
-
*/
|
|
166
|
-
validateV1(orderId: string, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftValidationResult>;
|
|
167
|
-
private __validateV1;
|
|
168
59
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
169
60
|
}
|
|
@@ -51,152 +51,10 @@ const core = __importStar(require("../../../../../../../../core/index.js"));
|
|
|
51
51
|
const Chrt = __importStar(require("../../../../../../../index.js"));
|
|
52
52
|
const headers_js_1 = require("../../../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../../../errors/index.js"));
|
|
54
|
-
const Client_js_1 = require("../resources/cargo/client/Client.js");
|
|
55
|
-
const Client_js_2 = require("../resources/taskGroup/client/Client.js");
|
|
56
54
|
class Drafts {
|
|
57
55
|
constructor(_options = {}) {
|
|
58
56
|
this._options = _options;
|
|
59
57
|
}
|
|
60
|
-
get cargo() {
|
|
61
|
-
var _a;
|
|
62
|
-
return ((_a = this._cargo) !== null && _a !== void 0 ? _a : (this._cargo = new Client_js_1.Cargo(this._options)));
|
|
63
|
-
}
|
|
64
|
-
get taskGroup() {
|
|
65
|
-
var _a;
|
|
66
|
-
return ((_a = this._taskGroup) !== null && _a !== void 0 ? _a : (this._taskGroup = new Client_js_2.TaskGroup(this._options)));
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Adds a coordinator task list with an optional department override to apply when the draft order is staged. | authz_personas=[coordinator_org_operators] | (UTCDatetime | None) -> (bool)
|
|
70
|
-
*
|
|
71
|
-
* @param {string} orderId
|
|
72
|
-
* @param {string} taskListId
|
|
73
|
-
* @param {Chrt.shipping.orders.DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request} request
|
|
74
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
75
|
-
*
|
|
76
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* await client.shipping.orders.drafts.addCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id", {
|
|
80
|
-
* department_id: "department_id",
|
|
81
|
-
* body: "2024-01-15T09:30:00Z"
|
|
82
|
-
* })
|
|
83
|
-
*/
|
|
84
|
-
addCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, request = {}, requestOptions) {
|
|
85
|
-
return core.HttpResponsePromise.fromPromise(this.__addCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, request, requestOptions));
|
|
86
|
-
}
|
|
87
|
-
__addCoordinatorTaskListToApplyAtOrderStagingV1(orderId_1, taskListId_1) {
|
|
88
|
-
return __awaiter(this, arguments, void 0, function* (orderId, taskListId, request = {}, requestOptions) {
|
|
89
|
-
var _a, _b, _c, _d;
|
|
90
|
-
const { department_id: departmentId, body: _body } = request;
|
|
91
|
-
const _queryParams = {};
|
|
92
|
-
if (departmentId !== undefined) {
|
|
93
|
-
_queryParams["department_id"] = departmentId;
|
|
94
|
-
}
|
|
95
|
-
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);
|
|
96
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
97
|
-
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/drafts/coordinator_task_lists_to_apply_at_order_staging/add/v1/${encodeURIComponent(orderId)}/${encodeURIComponent(taskListId)}`),
|
|
98
|
-
method: "POST",
|
|
99
|
-
headers: _headers,
|
|
100
|
-
contentType: "application/json",
|
|
101
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
102
|
-
requestType: "json",
|
|
103
|
-
body: _body != null ? _body : undefined,
|
|
104
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
105
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
106
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
107
|
-
});
|
|
108
|
-
if (_response.ok) {
|
|
109
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
110
|
-
}
|
|
111
|
-
if (_response.error.reason === "status-code") {
|
|
112
|
-
switch (_response.error.statusCode) {
|
|
113
|
-
case 422:
|
|
114
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
115
|
-
default:
|
|
116
|
-
throw new errors.ChrtError({
|
|
117
|
-
statusCode: _response.error.statusCode,
|
|
118
|
-
body: _response.error.body,
|
|
119
|
-
rawResponse: _response.rawResponse,
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
switch (_response.error.reason) {
|
|
124
|
-
case "non-json":
|
|
125
|
-
throw new errors.ChrtError({
|
|
126
|
-
statusCode: _response.error.statusCode,
|
|
127
|
-
body: _response.error.rawBody,
|
|
128
|
-
rawResponse: _response.rawResponse,
|
|
129
|
-
});
|
|
130
|
-
case "timeout":
|
|
131
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/drafts/coordinator_task_lists_to_apply_at_order_staging/add/v1/{order_id}/{task_list_id}.");
|
|
132
|
-
case "unknown":
|
|
133
|
-
throw new errors.ChrtError({
|
|
134
|
-
message: _response.error.errorMessage,
|
|
135
|
-
rawResponse: _response.rawResponse,
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Removes a pending coordinator staging task list from a draft order. | authz_personas=[coordinator_org_operators] | () -> (bool)
|
|
142
|
-
*
|
|
143
|
-
* @param {string} orderId
|
|
144
|
-
* @param {string} taskListId
|
|
145
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
146
|
-
*
|
|
147
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* await client.shipping.orders.drafts.removeCoordinatorTaskListToApplyAtOrderStagingV1("order_id", "task_list_id")
|
|
151
|
-
*/
|
|
152
|
-
removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, requestOptions) {
|
|
153
|
-
return core.HttpResponsePromise.fromPromise(this.__removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, requestOptions));
|
|
154
|
-
}
|
|
155
|
-
__removeCoordinatorTaskListToApplyAtOrderStagingV1(orderId, taskListId, requestOptions) {
|
|
156
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
-
var _a, _b, _c, _d;
|
|
158
|
-
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);
|
|
159
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
160
|
-
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/drafts/coordinator_task_lists_to_apply_at_order_staging/remove/v1/${encodeURIComponent(orderId)}/${encodeURIComponent(taskListId)}`),
|
|
161
|
-
method: "POST",
|
|
162
|
-
headers: _headers,
|
|
163
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
164
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
165
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
166
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
167
|
-
});
|
|
168
|
-
if (_response.ok) {
|
|
169
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
170
|
-
}
|
|
171
|
-
if (_response.error.reason === "status-code") {
|
|
172
|
-
switch (_response.error.statusCode) {
|
|
173
|
-
case 422:
|
|
174
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
175
|
-
default:
|
|
176
|
-
throw new errors.ChrtError({
|
|
177
|
-
statusCode: _response.error.statusCode,
|
|
178
|
-
body: _response.error.body,
|
|
179
|
-
rawResponse: _response.rawResponse,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
switch (_response.error.reason) {
|
|
184
|
-
case "non-json":
|
|
185
|
-
throw new errors.ChrtError({
|
|
186
|
-
statusCode: _response.error.statusCode,
|
|
187
|
-
body: _response.error.rawBody,
|
|
188
|
-
rawResponse: _response.rawResponse,
|
|
189
|
-
});
|
|
190
|
-
case "timeout":
|
|
191
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/orders/drafts/coordinator_task_lists_to_apply_at_order_staging/remove/v1/{order_id}/{task_list_id}.");
|
|
192
|
-
case "unknown":
|
|
193
|
-
throw new errors.ChrtError({
|
|
194
|
-
message: _response.error.errorMessage,
|
|
195
|
-
rawResponse: _response.rawResponse,
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
58
|
/**
|
|
201
59
|
* Creates a draft Order through one of three paths: (1) provide only order_template_new_id to load the saved template's core and record that template as the Order's provenance; (2) provide only order_template_new_core to materialize an ad hoc submitted core without template provenance; (3) provide both to record and validate the saved template as provenance while materializing the submitted core, without modifying the saved template. | authz: min_org_role=operator | (OrdersCreateDraftFromOrderTemplateNewReq) -> (OrdersOpenDraftRes)
|
|
202
60
|
*
|
|
@@ -259,129 +117,6 @@ class Drafts {
|
|
|
259
117
|
}
|
|
260
118
|
});
|
|
261
119
|
}
|
|
262
|
-
/**
|
|
263
|
-
* Deletes a draft order and all associated entities. | authz_personas=[draft_creator_org_operator] | () -> (bool)
|
|
264
|
-
*
|
|
265
|
-
* @param {string} orderId
|
|
266
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
267
|
-
*
|
|
268
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
269
|
-
*
|
|
270
|
-
* @example
|
|
271
|
-
* await client.shipping.orders.drafts.deleteV1("order_id")
|
|
272
|
-
*/
|
|
273
|
-
deleteV1(orderId, requestOptions) {
|
|
274
|
-
return core.HttpResponsePromise.fromPromise(this.__deleteV1(orderId, requestOptions));
|
|
275
|
-
}
|
|
276
|
-
__deleteV1(orderId, requestOptions) {
|
|
277
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
-
var _a, _b, _c, _d;
|
|
279
|
-
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);
|
|
280
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
281
|
-
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/drafts/delete/v1/${encodeURIComponent(orderId)}`),
|
|
282
|
-
method: "DELETE",
|
|
283
|
-
headers: _headers,
|
|
284
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
285
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
286
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
287
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
288
|
-
});
|
|
289
|
-
if (_response.ok) {
|
|
290
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
291
|
-
}
|
|
292
|
-
if (_response.error.reason === "status-code") {
|
|
293
|
-
switch (_response.error.statusCode) {
|
|
294
|
-
case 422:
|
|
295
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
296
|
-
default:
|
|
297
|
-
throw new errors.ChrtError({
|
|
298
|
-
statusCode: _response.error.statusCode,
|
|
299
|
-
body: _response.error.body,
|
|
300
|
-
rawResponse: _response.rawResponse,
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
switch (_response.error.reason) {
|
|
305
|
-
case "non-json":
|
|
306
|
-
throw new errors.ChrtError({
|
|
307
|
-
statusCode: _response.error.statusCode,
|
|
308
|
-
body: _response.error.rawBody,
|
|
309
|
-
rawResponse: _response.rawResponse,
|
|
310
|
-
});
|
|
311
|
-
case "timeout":
|
|
312
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/orders/drafts/delete/v1/{order_id}.");
|
|
313
|
-
case "unknown":
|
|
314
|
-
throw new errors.ChrtError({
|
|
315
|
-
message: _response.error.errorMessage,
|
|
316
|
-
rawResponse: _response.rawResponse,
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* Deletes multiple draft orders and associated entities. | authz_personas=[draft_creator_org_operator] | (OrdersDraftDeleteManyReq) -> (OrdersDraftDeleteManyRes)
|
|
323
|
-
*
|
|
324
|
-
* @param {Chrt.shipping.orders.OrdersDraftDeleteManyReq} request
|
|
325
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
326
|
-
*
|
|
327
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
328
|
-
*
|
|
329
|
-
* @example
|
|
330
|
-
* await client.shipping.orders.drafts.deleteManyV1({
|
|
331
|
-
* order_ids: ["order_ids"]
|
|
332
|
-
* })
|
|
333
|
-
*/
|
|
334
|
-
deleteManyV1(request, requestOptions) {
|
|
335
|
-
return core.HttpResponsePromise.fromPromise(this.__deleteManyV1(request, requestOptions));
|
|
336
|
-
}
|
|
337
|
-
__deleteManyV1(request, requestOptions) {
|
|
338
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
339
|
-
var _a, _b, _c, _d;
|
|
340
|
-
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);
|
|
341
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
342
|
-
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/drafts/delete_many/v1"),
|
|
343
|
-
method: "DELETE",
|
|
344
|
-
headers: _headers,
|
|
345
|
-
contentType: "application/json",
|
|
346
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
347
|
-
requestType: "json",
|
|
348
|
-
body: request,
|
|
349
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
350
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
351
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
352
|
-
});
|
|
353
|
-
if (_response.ok) {
|
|
354
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
355
|
-
}
|
|
356
|
-
if (_response.error.reason === "status-code") {
|
|
357
|
-
switch (_response.error.statusCode) {
|
|
358
|
-
case 422:
|
|
359
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
360
|
-
default:
|
|
361
|
-
throw new errors.ChrtError({
|
|
362
|
-
statusCode: _response.error.statusCode,
|
|
363
|
-
body: _response.error.body,
|
|
364
|
-
rawResponse: _response.rawResponse,
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
switch (_response.error.reason) {
|
|
369
|
-
case "non-json":
|
|
370
|
-
throw new errors.ChrtError({
|
|
371
|
-
statusCode: _response.error.statusCode,
|
|
372
|
-
body: _response.error.rawBody,
|
|
373
|
-
rawResponse: _response.rawResponse,
|
|
374
|
-
});
|
|
375
|
-
case "timeout":
|
|
376
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/orders/drafts/delete_many/v1.");
|
|
377
|
-
case "unknown":
|
|
378
|
-
throw new errors.ChrtError({
|
|
379
|
-
message: _response.error.errorMessage,
|
|
380
|
-
rawResponse: _response.rawResponse,
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
120
|
/**
|
|
386
121
|
* Opens a new draft order shell with org assignments based on caller's organization type. | authz: min_org_role=operator | (OrdersOpenDraftReq) -> (OrdersOpenDraftRes)
|
|
387
122
|
*
|
|
@@ -444,193 +179,6 @@ class Drafts {
|
|
|
444
179
|
}
|
|
445
180
|
});
|
|
446
181
|
}
|
|
447
|
-
/**
|
|
448
|
-
* Sets the ordering of task groups within a draft order. Must provide all task group IDs with no duplicates. | (SetTaskGroupOrderingDraftReq) -> (bool)
|
|
449
|
-
*
|
|
450
|
-
* @param {string} orderId
|
|
451
|
-
* @param {Chrt.shipping.orders.SetTaskGroupOrderingDraftReq} request
|
|
452
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
453
|
-
*
|
|
454
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
455
|
-
*
|
|
456
|
-
* @example
|
|
457
|
-
* await client.shipping.orders.drafts.setTaskGroupOrderingV1("order_id", {
|
|
458
|
-
* task_group_ids: ["task_group_ids"]
|
|
459
|
-
* })
|
|
460
|
-
*/
|
|
461
|
-
setTaskGroupOrderingV1(orderId, request, requestOptions) {
|
|
462
|
-
return core.HttpResponsePromise.fromPromise(this.__setTaskGroupOrderingV1(orderId, request, requestOptions));
|
|
463
|
-
}
|
|
464
|
-
__setTaskGroupOrderingV1(orderId, request, requestOptions) {
|
|
465
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
466
|
-
var _a, _b, _c, _d;
|
|
467
|
-
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);
|
|
468
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
469
|
-
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/drafts/set_task_group_ordering/v1/${encodeURIComponent(orderId)}`),
|
|
470
|
-
method: "PUT",
|
|
471
|
-
headers: _headers,
|
|
472
|
-
contentType: "application/json",
|
|
473
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
474
|
-
requestType: "json",
|
|
475
|
-
body: request,
|
|
476
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
477
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
478
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
479
|
-
});
|
|
480
|
-
if (_response.ok) {
|
|
481
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
482
|
-
}
|
|
483
|
-
if (_response.error.reason === "status-code") {
|
|
484
|
-
switch (_response.error.statusCode) {
|
|
485
|
-
case 422:
|
|
486
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
487
|
-
default:
|
|
488
|
-
throw new errors.ChrtError({
|
|
489
|
-
statusCode: _response.error.statusCode,
|
|
490
|
-
body: _response.error.body,
|
|
491
|
-
rawResponse: _response.rawResponse,
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
switch (_response.error.reason) {
|
|
496
|
-
case "non-json":
|
|
497
|
-
throw new errors.ChrtError({
|
|
498
|
-
statusCode: _response.error.statusCode,
|
|
499
|
-
body: _response.error.rawBody,
|
|
500
|
-
rawResponse: _response.rawResponse,
|
|
501
|
-
});
|
|
502
|
-
case "timeout":
|
|
503
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/orders/drafts/set_task_group_ordering/v1/{order_id}.");
|
|
504
|
-
case "unknown":
|
|
505
|
-
throw new errors.ChrtError({
|
|
506
|
-
message: _response.error.errorMessage,
|
|
507
|
-
rawResponse: _response.rawResponse,
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
/**
|
|
513
|
-
* Updates coordinator and/or shipper org assignments for a draft order. | authz_personas=[draft_creator_org_operator] | (OrdersDraftUpdateReq) -> (OrdersDraftUpdateRes)
|
|
514
|
-
*
|
|
515
|
-
* @param {string} orderId
|
|
516
|
-
* @param {Chrt.shipping.orders.OrdersDraftUpdateReq} request
|
|
517
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
518
|
-
*
|
|
519
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
520
|
-
*
|
|
521
|
-
* @example
|
|
522
|
-
* await client.shipping.orders.drafts.updateV1("order_id")
|
|
523
|
-
*/
|
|
524
|
-
updateV1(orderId, request = {}, requestOptions) {
|
|
525
|
-
return core.HttpResponsePromise.fromPromise(this.__updateV1(orderId, request, requestOptions));
|
|
526
|
-
}
|
|
527
|
-
__updateV1(orderId_1) {
|
|
528
|
-
return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
|
|
529
|
-
var _a, _b, _c, _d;
|
|
530
|
-
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);
|
|
531
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
532
|
-
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/drafts/update/v1/${encodeURIComponent(orderId)}`),
|
|
533
|
-
method: "PATCH",
|
|
534
|
-
headers: _headers,
|
|
535
|
-
contentType: "application/json",
|
|
536
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
537
|
-
requestType: "json",
|
|
538
|
-
body: request,
|
|
539
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
540
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
541
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
542
|
-
});
|
|
543
|
-
if (_response.ok) {
|
|
544
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
545
|
-
}
|
|
546
|
-
if (_response.error.reason === "status-code") {
|
|
547
|
-
switch (_response.error.statusCode) {
|
|
548
|
-
case 422:
|
|
549
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
550
|
-
default:
|
|
551
|
-
throw new errors.ChrtError({
|
|
552
|
-
statusCode: _response.error.statusCode,
|
|
553
|
-
body: _response.error.body,
|
|
554
|
-
rawResponse: _response.rawResponse,
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
switch (_response.error.reason) {
|
|
559
|
-
case "non-json":
|
|
560
|
-
throw new errors.ChrtError({
|
|
561
|
-
statusCode: _response.error.statusCode,
|
|
562
|
-
body: _response.error.rawBody,
|
|
563
|
-
rawResponse: _response.rawResponse,
|
|
564
|
-
});
|
|
565
|
-
case "timeout":
|
|
566
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/drafts/update/v1/{order_id}.");
|
|
567
|
-
case "unknown":
|
|
568
|
-
throw new errors.ChrtError({
|
|
569
|
-
message: _response.error.errorMessage,
|
|
570
|
-
rawResponse: _response.rawResponse,
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
|
-
/**
|
|
576
|
-
* Validates the draft order for staging and returns requirement results. | () -> (OrderDraftValidationResult)
|
|
577
|
-
*
|
|
578
|
-
* @param {string} orderId
|
|
579
|
-
* @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
580
|
-
*
|
|
581
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
582
|
-
*
|
|
583
|
-
* @example
|
|
584
|
-
* await client.shipping.orders.drafts.validateV1("order_id")
|
|
585
|
-
*/
|
|
586
|
-
validateV1(orderId, requestOptions) {
|
|
587
|
-
return core.HttpResponsePromise.fromPromise(this.__validateV1(orderId, requestOptions));
|
|
588
|
-
}
|
|
589
|
-
__validateV1(orderId, requestOptions) {
|
|
590
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
591
|
-
var _a, _b, _c, _d;
|
|
592
|
-
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);
|
|
593
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
594
|
-
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/drafts/validate/v1/${encodeURIComponent(orderId)}`),
|
|
595
|
-
method: "GET",
|
|
596
|
-
headers: _headers,
|
|
597
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
598
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
599
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
600
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
601
|
-
});
|
|
602
|
-
if (_response.ok) {
|
|
603
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
604
|
-
}
|
|
605
|
-
if (_response.error.reason === "status-code") {
|
|
606
|
-
switch (_response.error.statusCode) {
|
|
607
|
-
case 422:
|
|
608
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
609
|
-
default:
|
|
610
|
-
throw new errors.ChrtError({
|
|
611
|
-
statusCode: _response.error.statusCode,
|
|
612
|
-
body: _response.error.body,
|
|
613
|
-
rawResponse: _response.rawResponse,
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
switch (_response.error.reason) {
|
|
618
|
-
case "non-json":
|
|
619
|
-
throw new errors.ChrtError({
|
|
620
|
-
statusCode: _response.error.statusCode,
|
|
621
|
-
body: _response.error.rawBody,
|
|
622
|
-
rawResponse: _response.rawResponse,
|
|
623
|
-
});
|
|
624
|
-
case "timeout":
|
|
625
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/orders/drafts/validate/v1/{order_id}.");
|
|
626
|
-
case "unknown":
|
|
627
|
-
throw new errors.ChrtError({
|
|
628
|
-
message: _response.error.errorMessage,
|
|
629
|
-
rawResponse: _response.rawResponse,
|
|
630
|
-
});
|
|
631
|
-
}
|
|
632
|
-
});
|
|
633
|
-
}
|
|
634
182
|
_getAuthorizationHeader() {
|
|
635
183
|
return __awaiter(this, void 0, void 0, function* () {
|
|
636
184
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -16,8 +16,6 @@ export interface OrdersOpenDraftReq {
|
|
|
16
16
|
/** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
|
|
17
17
|
off_chrt_reference_id?: string | null;
|
|
18
18
|
off_chrt_shipper_org_data_id?: string | null;
|
|
19
|
-
/** Saved order template that seeded this draft. Used as template-build provenance. */
|
|
20
|
-
order_template_id?: string | null;
|
|
21
19
|
service_line?: Chrt.ServiceLineEnum;
|
|
22
20
|
/** Must be a string starting with `org_` */
|
|
23
21
|
shipper_org_id?: string | null;
|
package/dist/cjs/api/resources/shipping/resources/orders/resources/drafts/client/requests/index.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export { type DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request } from "./DraftsAddCoordinatorTaskListToApplyAtOrderStagingV1Request.js";
|
|
2
1
|
export { type OrdersCreateDraftFromOrderTemplateNewReq } from "./OrdersCreateDraftFromOrderTemplateNewReq.js";
|
|
3
|
-
export { type OrdersDraftDeleteManyReq } from "./OrdersDraftDeleteManyReq.js";
|
|
4
2
|
export { type OrdersOpenDraftReq } from "./OrdersOpenDraftReq.js";
|
|
5
|
-
export { type SetTaskGroupOrderingDraftReq } from "./SetTaskGroupOrderingDraftReq.js";
|
|
6
|
-
export { type OrdersDraftUpdateReq } from "./OrdersDraftUpdateReq.js";
|