@chrt-inc/typescript-sdk 1.540.0 → 1.559.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/billing/resources/statements/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/billing/resources/statements/client/Client.js +10 -2
- package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/client/Client.js +21 -16
- package/dist/cjs/api/resources/shipping/resources/docs/client/Client.d.ts +50 -0
- package/dist/cjs/api/resources/shipping/resources/docs/client/Client.js +133 -0
- package/dist/cjs/api/resources/shipping/resources/docs/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/docs/client/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.d.ts +15 -0
- package/dist/cjs/api/resources/shipping/resources/docs/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/docs/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipping/resources/docs/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/docs/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/resources/index.js +4 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/Client.d.ts +5 -6
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/Client.js +9 -10
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersDraftUpdateReq.d.ts +5 -6
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.d.ts +15 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.js +66 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/index.js +15 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersUpdateOffChrtReferenceIdReq.d.ts +11 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersUpdateOffChrtReferenceIdReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +1 -1
- package/dist/cjs/api/resources/utils/resources/dev/client/Client.d.ts +18 -2
- package/dist/cjs/api/resources/utils/resources/dev/client/Client.js +66 -1
- package/dist/cjs/api/resources/utils/resources/dev/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/types/LineItemGroup1.d.ts +1 -0
- package/dist/cjs/api/types/Order1.d.ts +1 -0
- package/dist/cjs/api/{resources/utils/resources/dev/client/requests → types}/OrderBuilderReq.d.ts +0 -7
- package/dist/cjs/api/types/OrderBuilderReq.js +5 -0
- package/dist/cjs/api/types/OrderBuilderRes.d.ts +2 -0
- package/dist/cjs/api/types/OrderDraftIssueCategoryEnum.d.ts +11 -0
- package/dist/cjs/api/types/OrderDraftIssueCategoryEnum.js +13 -0
- package/dist/cjs/api/types/OrderDraftValidationIssue.d.ts +12 -0
- package/dist/cjs/api/types/OrderDraftValidationIssue.js +5 -0
- package/dist/cjs/api/types/OrderDraftValidationResult.d.ts +8 -0
- package/dist/cjs/api/types/OrderDraftValidationResult.js +5 -0
- package/dist/cjs/api/types/OrdersDraftUpdateRes.d.ts +1 -0
- package/dist/cjs/api/types/OrdersUpdateOffChrtReferenceIdRes.d.ts +6 -0
- package/dist/cjs/api/types/OrdersUpdateOffChrtReferenceIdRes.js +5 -0
- package/dist/cjs/api/types/ShippingDocTemplateEnum.d.ts +8 -0
- package/dist/cjs/api/types/ShippingDocTemplateEnum.js +10 -0
- package/dist/cjs/api/types/Statement1.d.ts +1 -0
- package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
- package/dist/cjs/api/types/index.d.ts +6 -0
- package/dist/cjs/api/types/index.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/billing/resources/statements/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/billing/resources/statements/client/Client.mjs +10 -2
- package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.mts +3 -0
- package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.mts +3 -0
- package/dist/esm/api/resources/shipping/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/shipping/client/Client.mjs +5 -0
- package/dist/esm/api/resources/shipping/resources/docs/client/Client.d.mts +50 -0
- package/dist/esm/api/resources/shipping/resources/docs/client/Client.mjs +96 -0
- package/dist/esm/api/resources/shipping/resources/docs/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/docs/client/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.d.mts +15 -0
- package/dist/esm/api/resources/shipping/resources/docs/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/docs/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/docs/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/docs/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/shipping/resources/index.mjs +3 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/Client.d.mts +5 -6
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/Client.mjs +9 -10
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersDraftUpdateReq.d.mts +5 -6
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.d.mts +15 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.mjs +66 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/index.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersUpdateOffChrtReferenceIdReq.d.mts +11 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersUpdateOffChrtReferenceIdReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +1 -1
- package/dist/esm/api/resources/utils/resources/dev/client/Client.d.mts +18 -2
- package/dist/esm/api/resources/utils/resources/dev/client/Client.mjs +66 -1
- package/dist/esm/api/resources/utils/resources/dev/client/requests/index.d.mts +0 -1
- package/dist/esm/api/types/LineItemGroup1.d.mts +1 -0
- package/dist/esm/api/types/Order1.d.mts +1 -0
- package/dist/esm/api/{resources/utils/resources/dev/client/requests → types}/OrderBuilderReq.d.mts +0 -7
- package/dist/esm/api/types/OrderBuilderReq.mjs +4 -0
- package/dist/esm/api/types/OrderBuilderRes.d.mts +2 -0
- package/dist/esm/api/types/OrderDraftIssueCategoryEnum.d.mts +11 -0
- package/dist/esm/api/types/OrderDraftIssueCategoryEnum.mjs +10 -0
- package/dist/esm/api/types/OrderDraftValidationIssue.d.mts +12 -0
- package/dist/esm/api/types/OrderDraftValidationIssue.mjs +4 -0
- package/dist/esm/api/types/OrderDraftValidationResult.d.mts +8 -0
- package/dist/esm/api/types/OrderDraftValidationResult.mjs +4 -0
- package/dist/esm/api/types/OrdersDraftUpdateRes.d.mts +1 -0
- package/dist/esm/api/types/OrdersUpdateOffChrtReferenceIdRes.d.mts +6 -0
- package/dist/esm/api/types/OrdersUpdateOffChrtReferenceIdRes.mjs +4 -0
- package/dist/esm/api/types/ShippingDocTemplateEnum.d.mts +8 -0
- package/dist/esm/api/types/ShippingDocTemplateEnum.mjs +7 -0
- package/dist/esm/api/types/Statement1.d.mts +1 -0
- package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
- package/dist/esm/api/types/index.d.mts +6 -0
- package/dist/esm/api/types/index.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +222 -9
- /package/dist/cjs/api/resources/{utils/resources/dev/client/requests/OrderBuilderReq.js → shipping/resources/docs/client/requests/GenerateShippingDocReq.js} +0 -0
- /package/dist/esm/api/resources/{utils/resources/dev/client/requests/OrderBuilderReq.mjs → shipping/resources/docs/client/requests/GenerateShippingDocReq.mjs} +0 -0
|
@@ -31,7 +31,7 @@ export interface ExpandedListForForwarderOperatorsV1Request {
|
|
|
31
31
|
sort_order?: Chrt.SortOrderEnum | null;
|
|
32
32
|
page?: number | null;
|
|
33
33
|
page_size?: number | null;
|
|
34
|
-
/** Full-text search query (searches order short_id) */
|
|
34
|
+
/** Full-text search query (searches order short_id and off_chrt_reference_id) */
|
|
35
35
|
search?: string | null;
|
|
36
36
|
filter_status?: (Chrt.OrderStatusEnum1 | null) | (Chrt.OrderStatusEnum1 | null)[];
|
|
37
37
|
filter_draft_started_at_timestamp_lte?: string | null;
|
|
@@ -31,7 +31,7 @@ export interface ExpandedListForShipperOperatorsV1Request {
|
|
|
31
31
|
sort_order?: Chrt.SortOrderEnum | null;
|
|
32
32
|
page?: number | null;
|
|
33
33
|
page_size?: number | null;
|
|
34
|
-
/** Full-text search query (searches order short_id) */
|
|
34
|
+
/** Full-text search query (searches order short_id and off_chrt_reference_id) */
|
|
35
35
|
search?: string | null;
|
|
36
36
|
filter_status?: (Chrt.OrderStatusEnum1 | null) | (Chrt.OrderStatusEnum1 | null)[];
|
|
37
37
|
filter_draft_started_at_timestamp_lte?: string | null;
|
|
@@ -31,7 +31,7 @@ export interface ExpandedListForCourierDriverV1Request {
|
|
|
31
31
|
sort_order?: Chrt.SortOrderEnum | null;
|
|
32
32
|
page?: number | null;
|
|
33
33
|
page_size?: number | null;
|
|
34
|
-
/** Full-text search query (searches order_short_id, flight_number) */
|
|
34
|
+
/** Full-text search query (searches order_short_id, order_off_chrt_reference_id, flight_number) */
|
|
35
35
|
search?: string | null;
|
|
36
36
|
filter_status?: (Chrt.TaskGroupStatusEnum1 | null) | (Chrt.TaskGroupStatusEnum1 | null)[];
|
|
37
37
|
filter_draft_started_at_timestamp_lte?: string | null;
|
|
@@ -31,7 +31,7 @@ export interface ExpandedListForCourierOperatorsV1Request {
|
|
|
31
31
|
sort_order?: Chrt.SortOrderEnum | null;
|
|
32
32
|
page?: number | null;
|
|
33
33
|
page_size?: number | null;
|
|
34
|
-
/** Full-text search query (searches order_short_id, flight_number) */
|
|
34
|
+
/** Full-text search query (searches order_short_id, order_off_chrt_reference_id, flight_number) */
|
|
35
35
|
search?: string | null;
|
|
36
36
|
filter_status?: (Chrt.TaskGroupStatusEnum1 | null) | (Chrt.TaskGroupStatusEnum1 | null)[];
|
|
37
37
|
filter_draft_started_at_timestamp_lte?: string | null;
|
|
@@ -31,7 +31,7 @@ export declare class Devices {
|
|
|
31
31
|
protected readonly _options: Devices.Options;
|
|
32
32
|
constructor(_options?: Devices.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Registers a tracking device to the caller's organization. If the device is already registered to a different organization, returns 409 Conflict. | (DeviceClientCreate1) -> (PydanticObjectId)
|
|
34
|
+
* Registers a tracking device to the caller's organization. If the device is already registered to a different organization, returns 409 Conflict. | auth: api_key | (DeviceClientCreate1) -> (PydanticObjectId)
|
|
35
35
|
*
|
|
36
36
|
* @param {Chrt.tracking.DeviceClientCreate1} request
|
|
37
37
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -31,7 +31,7 @@ export class Devices {
|
|
|
31
31
|
this._options = _options;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* Registers a tracking device to the caller's organization. If the device is already registered to a different organization, returns 409 Conflict. | (DeviceClientCreate1) -> (PydanticObjectId)
|
|
34
|
+
* Registers a tracking device to the caller's organization. If the device is already registered to a different organization, returns 409 Conflict. | auth: api_key | (DeviceClientCreate1) -> (PydanticObjectId)
|
|
35
35
|
*
|
|
36
36
|
* @param {Chrt.tracking.DeviceClientCreate1} request
|
|
37
37
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -96,7 +96,7 @@ export declare class Sessions {
|
|
|
96
96
|
typeaheadV1(request: Chrt.tracking.SessionsTypeaheadV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<Chrt.TrackingTypeaheadResult[]>;
|
|
97
97
|
private __typeaheadV1;
|
|
98
98
|
/**
|
|
99
|
-
* Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Auto-termination is scheduled for ~3 days out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | (SessionClientCreate1) -> (PydanticObjectId)
|
|
99
|
+
* Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Auto-termination is scheduled for ~3 days out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
|
|
100
100
|
*
|
|
101
101
|
* @param {Chrt.tracking.SessionClientCreate1} request
|
|
102
102
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -305,7 +305,7 @@ export class Sessions {
|
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
307
|
/**
|
|
308
|
-
* Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Auto-termination is scheduled for ~3 days out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | (SessionClientCreate1) -> (PydanticObjectId)
|
|
308
|
+
* Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Auto-termination is scheduled for ~3 days out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
|
|
309
309
|
*
|
|
310
310
|
* @param {Chrt.tracking.SessionClientCreate1} request
|
|
311
311
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -61,7 +61,7 @@ export declare class Dev {
|
|
|
61
61
|
/**
|
|
62
62
|
* Populates an existing order draft with cargo, task groups, and tasks parsed from natural language. The frontend must create the draft first via /shipping/order_drafts/new/v1. | (OrderBuilderReq) -> (OrderBuilderRes)
|
|
63
63
|
*
|
|
64
|
-
* @param {Chrt.
|
|
64
|
+
* @param {Chrt.OrderBuilderReq} request
|
|
65
65
|
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
66
|
*
|
|
67
67
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -72,8 +72,24 @@ export declare class Dev {
|
|
|
72
72
|
* text: "text"
|
|
73
73
|
* })
|
|
74
74
|
*/
|
|
75
|
-
postAgentOrderBuilderV1(request: Chrt.
|
|
75
|
+
postAgentOrderBuilderV1(request: Chrt.OrderBuilderReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.OrderBuilderRes>;
|
|
76
76
|
private __postAgentOrderBuilderV1;
|
|
77
|
+
/**
|
|
78
|
+
* Same as /agent/order-builder/v1 but streams progress events via SSE as each workflow step completes. | (OrderBuilderReq) -> SSE stream of OrderBuilderProgressEvent, final OrderBuilderRes
|
|
79
|
+
*
|
|
80
|
+
* @param {Chrt.OrderBuilderReq} request
|
|
81
|
+
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
82
|
+
*
|
|
83
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* await client.utils.dev.postAgentOrderBuilderStreamV1({
|
|
87
|
+
* order_short_id: "order_short_id",
|
|
88
|
+
* text: "text"
|
|
89
|
+
* })
|
|
90
|
+
*/
|
|
91
|
+
postAgentOrderBuilderStreamV1(request: Chrt.OrderBuilderReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<void>;
|
|
92
|
+
private __postAgentOrderBuilderStreamV1;
|
|
77
93
|
/**
|
|
78
94
|
* (DEPRECATED) Extracts and returns the user ID from the authenticated request's JWT token. | () -> (str)
|
|
79
95
|
*
|
|
@@ -148,7 +148,7 @@ export class Dev {
|
|
|
148
148
|
/**
|
|
149
149
|
* Populates an existing order draft with cargo, task groups, and tasks parsed from natural language. The frontend must create the draft first via /shipping/order_drafts/new/v1. | (OrderBuilderReq) -> (OrderBuilderRes)
|
|
150
150
|
*
|
|
151
|
-
* @param {Chrt.
|
|
151
|
+
* @param {Chrt.OrderBuilderReq} request
|
|
152
152
|
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
153
153
|
*
|
|
154
154
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -210,6 +210,71 @@ export class Dev {
|
|
|
210
210
|
}
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* Same as /agent/order-builder/v1 but streams progress events via SSE as each workflow step completes. | (OrderBuilderReq) -> SSE stream of OrderBuilderProgressEvent, final OrderBuilderRes
|
|
215
|
+
*
|
|
216
|
+
* @param {Chrt.OrderBuilderReq} request
|
|
217
|
+
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
218
|
+
*
|
|
219
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* await client.utils.dev.postAgentOrderBuilderStreamV1({
|
|
223
|
+
* order_short_id: "order_short_id",
|
|
224
|
+
* text: "text"
|
|
225
|
+
* })
|
|
226
|
+
*/
|
|
227
|
+
postAgentOrderBuilderStreamV1(request, requestOptions) {
|
|
228
|
+
return core.HttpResponsePromise.fromPromise(this.__postAgentOrderBuilderStreamV1(request, requestOptions));
|
|
229
|
+
}
|
|
230
|
+
__postAgentOrderBuilderStreamV1(request, requestOptions) {
|
|
231
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
232
|
+
var _a, _b, _c, _d;
|
|
233
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
234
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
235
|
+
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, "dev/agent/order-builder/stream/v1"),
|
|
236
|
+
method: "POST",
|
|
237
|
+
headers: _headers,
|
|
238
|
+
contentType: "application/json",
|
|
239
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
240
|
+
requestType: "json",
|
|
241
|
+
body: request,
|
|
242
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
243
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
244
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
245
|
+
});
|
|
246
|
+
if (_response.ok) {
|
|
247
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
248
|
+
}
|
|
249
|
+
if (_response.error.reason === "status-code") {
|
|
250
|
+
switch (_response.error.statusCode) {
|
|
251
|
+
case 422:
|
|
252
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
253
|
+
default:
|
|
254
|
+
throw new errors.ChrtError({
|
|
255
|
+
statusCode: _response.error.statusCode,
|
|
256
|
+
body: _response.error.body,
|
|
257
|
+
rawResponse: _response.rawResponse,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
switch (_response.error.reason) {
|
|
262
|
+
case "non-json":
|
|
263
|
+
throw new errors.ChrtError({
|
|
264
|
+
statusCode: _response.error.statusCode,
|
|
265
|
+
body: _response.error.rawBody,
|
|
266
|
+
rawResponse: _response.rawResponse,
|
|
267
|
+
});
|
|
268
|
+
case "timeout":
|
|
269
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/order-builder/stream/v1.");
|
|
270
|
+
case "unknown":
|
|
271
|
+
throw new errors.ChrtError({
|
|
272
|
+
message: _response.error.errorMessage,
|
|
273
|
+
rawResponse: _response.rawResponse,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
}
|
|
213
278
|
/**
|
|
214
279
|
* (DEPRECATED) Extracts and returns the user ID from the authenticated request's JWT token. | () -> (str)
|
|
215
280
|
*
|
|
@@ -9,6 +9,7 @@ export interface LineItemGroup1 {
|
|
|
9
9
|
task_group_id?: string | null;
|
|
10
10
|
order_id?: string | null;
|
|
11
11
|
order_short_id?: string | null;
|
|
12
|
+
order_off_chrt_reference_id?: string | null;
|
|
12
13
|
rate_sheet_id?: string | null;
|
|
13
14
|
line_items: Chrt.LineItem1[];
|
|
14
15
|
line_item_group_s3_object_metadata_ids?: string[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type OrderDraftIssueCategoryEnum = "status" | "structure" | "action_type" | "sequence" | "assignment";
|
|
5
|
+
export declare const OrderDraftIssueCategoryEnum: {
|
|
6
|
+
readonly Status: "status";
|
|
7
|
+
readonly Structure: "structure";
|
|
8
|
+
readonly ActionType: "action_type";
|
|
9
|
+
readonly Sequence: "sequence";
|
|
10
|
+
readonly Assignment: "assignment";
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
5
|
+
export interface OrderDraftValidationIssue {
|
|
6
|
+
issue_key: string;
|
|
7
|
+
category: Chrt.OrderDraftIssueCategoryEnum;
|
|
8
|
+
message: string;
|
|
9
|
+
entity_type?: string | null;
|
|
10
|
+
entity_id?: string | null;
|
|
11
|
+
task_group_id?: string | null;
|
|
12
|
+
}
|
|
@@ -138,16 +138,21 @@ export * from "./OffChrtShipperOrgListRes.mjs";
|
|
|
138
138
|
export * from "./OnboardCourierTaskActionEnum1.mjs";
|
|
139
139
|
export * from "./Order1.mjs";
|
|
140
140
|
export * from "./OrderAndTaskGroupExpandedReq.mjs";
|
|
141
|
+
export * from "./OrderBuilderReq.mjs";
|
|
141
142
|
export * from "./OrderBuilderRes.mjs";
|
|
142
143
|
export * from "./OrderDraftExpanded.mjs";
|
|
143
144
|
export * from "./OrderDraftExpandedListRes.mjs";
|
|
145
|
+
export * from "./OrderDraftIssueCategoryEnum.mjs";
|
|
144
146
|
export * from "./OrderDraftSortByEnum.mjs";
|
|
147
|
+
export * from "./OrderDraftValidationIssue.mjs";
|
|
148
|
+
export * from "./OrderDraftValidationResult.mjs";
|
|
145
149
|
export * from "./OrderExpanded.mjs";
|
|
146
150
|
export * from "./OrderSortByEnum.mjs";
|
|
147
151
|
export * from "./OrderStatusEnum1.mjs";
|
|
148
152
|
export * from "./OrdersDraftUpdateRes.mjs";
|
|
149
153
|
export * from "./OrdersExpandedListRes.mjs";
|
|
150
154
|
export * from "./OrdersNewDraftRes.mjs";
|
|
155
|
+
export * from "./OrdersUpdateOffChrtReferenceIdRes.mjs";
|
|
151
156
|
export * from "./OrgInfoResponse.mjs";
|
|
152
157
|
export * from "./OrgMemberDetails.mjs";
|
|
153
158
|
export * from "./OrgMemberListRes.mjs";
|
|
@@ -188,6 +193,7 @@ export * from "./ShipperConnectionRes.mjs";
|
|
|
188
193
|
export * from "./ShipperCourierConnection1.mjs";
|
|
189
194
|
export * from "./ShipperForwarderConnection1.mjs";
|
|
190
195
|
export * from "./ShipperOrgInfoForConnections1.mjs";
|
|
196
|
+
export * from "./ShippingDocTemplateEnum.mjs";
|
|
191
197
|
export * from "./ShippingOrderCancelledWebhookPayload.mjs";
|
|
192
198
|
export * from "./ShippingOrderCompletedWebhookPayload.mjs";
|
|
193
199
|
export * from "./ShippingOrderStagedWebhookPayload.mjs";
|
|
@@ -138,16 +138,21 @@ export * from "./OffChrtShipperOrgListRes.mjs";
|
|
|
138
138
|
export * from "./OnboardCourierTaskActionEnum1.mjs";
|
|
139
139
|
export * from "./Order1.mjs";
|
|
140
140
|
export * from "./OrderAndTaskGroupExpandedReq.mjs";
|
|
141
|
+
export * from "./OrderBuilderReq.mjs";
|
|
141
142
|
export * from "./OrderBuilderRes.mjs";
|
|
142
143
|
export * from "./OrderDraftExpanded.mjs";
|
|
143
144
|
export * from "./OrderDraftExpandedListRes.mjs";
|
|
145
|
+
export * from "./OrderDraftIssueCategoryEnum.mjs";
|
|
144
146
|
export * from "./OrderDraftSortByEnum.mjs";
|
|
147
|
+
export * from "./OrderDraftValidationIssue.mjs";
|
|
148
|
+
export * from "./OrderDraftValidationResult.mjs";
|
|
145
149
|
export * from "./OrderExpanded.mjs";
|
|
146
150
|
export * from "./OrderSortByEnum.mjs";
|
|
147
151
|
export * from "./OrderStatusEnum1.mjs";
|
|
148
152
|
export * from "./OrdersDraftUpdateRes.mjs";
|
|
149
153
|
export * from "./OrdersExpandedListRes.mjs";
|
|
150
154
|
export * from "./OrdersNewDraftRes.mjs";
|
|
155
|
+
export * from "./OrdersUpdateOffChrtReferenceIdRes.mjs";
|
|
151
156
|
export * from "./OrgInfoResponse.mjs";
|
|
152
157
|
export * from "./OrgMemberDetails.mjs";
|
|
153
158
|
export * from "./OrgMemberListRes.mjs";
|
|
@@ -188,6 +193,7 @@ export * from "./ShipperConnectionRes.mjs";
|
|
|
188
193
|
export * from "./ShipperCourierConnection1.mjs";
|
|
189
194
|
export * from "./ShipperForwarderConnection1.mjs";
|
|
190
195
|
export * from "./ShipperOrgInfoForConnections1.mjs";
|
|
196
|
+
export * from "./ShippingDocTemplateEnum.mjs";
|
|
191
197
|
export * from "./ShippingOrderCancelledWebhookPayload.mjs";
|
|
192
198
|
export * from "./ShippingOrderCompletedWebhookPayload.mjs";
|
|
193
199
|
export * from "./ShippingOrderStagedWebhookPayload.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.559.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.559.0";
|