@chrt-inc/typescript-sdk 1.539.1 → 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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../../../environments.js";
|
|
5
5
|
import * as core from "../../../../../../core/index.js";
|
|
6
|
+
import * as Chrt from "../../../../../index.js";
|
|
6
7
|
import { Expanded } from "../resources/expanded/client/Client.js";
|
|
7
8
|
export declare namespace Orders {
|
|
8
9
|
interface Options {
|
|
@@ -45,6 +46,20 @@ export declare class Orders {
|
|
|
45
46
|
*/
|
|
46
47
|
stageV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
47
48
|
private __stageV1;
|
|
49
|
+
/**
|
|
50
|
+
* Updates off_chrt_reference_id on a non-draft order. | authz_personas=[order_creator_org_operators] | (OrdersUpdateOffChrtReferenceIdReq) -> (OrdersUpdateOffChrtReferenceIdRes)
|
|
51
|
+
*
|
|
52
|
+
* @param {string} orderId
|
|
53
|
+
* @param {Chrt.shipping.OrdersUpdateOffChrtReferenceIdReq} request
|
|
54
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
+
*
|
|
56
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await client.shipping.orders.updateOffChrtReferenceIdV1("order_id")
|
|
60
|
+
*/
|
|
61
|
+
updateOffChrtReferenceIdV1(orderId: string, request?: Chrt.shipping.OrdersUpdateOffChrtReferenceIdReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.OrdersUpdateOffChrtReferenceIdRes>;
|
|
62
|
+
private __updateOffChrtReferenceIdV1;
|
|
48
63
|
/**
|
|
49
64
|
* Cancels an order and all related task groups and tasks in a transaction. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
50
65
|
*
|
|
@@ -119,6 +119,72 @@ class Orders {
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Updates off_chrt_reference_id on a non-draft order. | authz_personas=[order_creator_org_operators] | (OrdersUpdateOffChrtReferenceIdReq) -> (OrdersUpdateOffChrtReferenceIdRes)
|
|
124
|
+
*
|
|
125
|
+
* @param {string} orderId
|
|
126
|
+
* @param {Chrt.shipping.OrdersUpdateOffChrtReferenceIdReq} request
|
|
127
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
128
|
+
*
|
|
129
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* await client.shipping.orders.updateOffChrtReferenceIdV1("order_id")
|
|
133
|
+
*/
|
|
134
|
+
updateOffChrtReferenceIdV1(orderId, request = {}, requestOptions) {
|
|
135
|
+
return core.HttpResponsePromise.fromPromise(this.__updateOffChrtReferenceIdV1(orderId, request, requestOptions));
|
|
136
|
+
}
|
|
137
|
+
__updateOffChrtReferenceIdV1(orderId_1) {
|
|
138
|
+
return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
|
|
139
|
+
var _a, _b, _c, _d;
|
|
140
|
+
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);
|
|
141
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
142
|
+
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_off_chrt_reference_id/v1/${encodeURIComponent(orderId)}`),
|
|
143
|
+
method: "PATCH",
|
|
144
|
+
headers: _headers,
|
|
145
|
+
contentType: "application/json",
|
|
146
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
147
|
+
requestType: "json",
|
|
148
|
+
body: request,
|
|
149
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
150
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
151
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
152
|
+
});
|
|
153
|
+
if (_response.ok) {
|
|
154
|
+
return {
|
|
155
|
+
data: _response.body,
|
|
156
|
+
rawResponse: _response.rawResponse,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
if (_response.error.reason === "status-code") {
|
|
160
|
+
switch (_response.error.statusCode) {
|
|
161
|
+
case 422:
|
|
162
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
163
|
+
default:
|
|
164
|
+
throw new errors.ChrtError({
|
|
165
|
+
statusCode: _response.error.statusCode,
|
|
166
|
+
body: _response.error.body,
|
|
167
|
+
rawResponse: _response.rawResponse,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
switch (_response.error.reason) {
|
|
172
|
+
case "non-json":
|
|
173
|
+
throw new errors.ChrtError({
|
|
174
|
+
statusCode: _response.error.statusCode,
|
|
175
|
+
body: _response.error.rawBody,
|
|
176
|
+
rawResponse: _response.rawResponse,
|
|
177
|
+
});
|
|
178
|
+
case "timeout":
|
|
179
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/update_off_chrt_reference_id/v1/{order_id}.");
|
|
180
|
+
case "unknown":
|
|
181
|
+
throw new errors.ChrtError({
|
|
182
|
+
message: _response.error.errorMessage,
|
|
183
|
+
rawResponse: _response.rawResponse,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
122
188
|
/**
|
|
123
189
|
* Cancels an order and all related task groups and tasks in a transaction. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
124
190
|
*
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type OrdersUpdateOffChrtReferenceIdReq } from "./OrdersUpdateOffChrtReferenceIdReq.js";
|
|
@@ -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.
|
|
@@ -67,7 +67,7 @@ class Devices {
|
|
|
67
67
|
this._options = _options;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
* Registers a tracking device to the caller's organization. If the device is already registered to a different organization, returns 409 Conflict. | (DeviceClientCreate1) -> (PydanticObjectId)
|
|
70
|
+
* 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)
|
|
71
71
|
*
|
|
72
72
|
* @param {Chrt.tracking.DeviceClientCreate1} request
|
|
73
73
|
* @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.
|
|
@@ -341,7 +341,7 @@ class Sessions {
|
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
343
|
/**
|
|
344
|
-
* 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)
|
|
344
|
+
* 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)
|
|
345
345
|
*
|
|
346
346
|
* @param {Chrt.tracking.SessionClientCreate1} request
|
|
347
347
|
* @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
|
*
|
|
@@ -184,7 +184,7 @@ class Dev {
|
|
|
184
184
|
/**
|
|
185
185
|
* 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)
|
|
186
186
|
*
|
|
187
|
-
* @param {Chrt.
|
|
187
|
+
* @param {Chrt.OrderBuilderReq} request
|
|
188
188
|
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
189
189
|
*
|
|
190
190
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -246,6 +246,71 @@ class Dev {
|
|
|
246
246
|
}
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Same as /agent/order-builder/v1 but streams progress events via SSE as each workflow step completes. | (OrderBuilderReq) -> SSE stream of OrderBuilderProgressEvent, final OrderBuilderRes
|
|
251
|
+
*
|
|
252
|
+
* @param {Chrt.OrderBuilderReq} request
|
|
253
|
+
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
254
|
+
*
|
|
255
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* await client.utils.dev.postAgentOrderBuilderStreamV1({
|
|
259
|
+
* order_short_id: "order_short_id",
|
|
260
|
+
* text: "text"
|
|
261
|
+
* })
|
|
262
|
+
*/
|
|
263
|
+
postAgentOrderBuilderStreamV1(request, requestOptions) {
|
|
264
|
+
return core.HttpResponsePromise.fromPromise(this.__postAgentOrderBuilderStreamV1(request, requestOptions));
|
|
265
|
+
}
|
|
266
|
+
__postAgentOrderBuilderStreamV1(request, requestOptions) {
|
|
267
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
268
|
+
var _a, _b, _c, _d;
|
|
269
|
+
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);
|
|
270
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
271
|
+
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"),
|
|
272
|
+
method: "POST",
|
|
273
|
+
headers: _headers,
|
|
274
|
+
contentType: "application/json",
|
|
275
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
276
|
+
requestType: "json",
|
|
277
|
+
body: request,
|
|
278
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
279
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
280
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
281
|
+
});
|
|
282
|
+
if (_response.ok) {
|
|
283
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
284
|
+
}
|
|
285
|
+
if (_response.error.reason === "status-code") {
|
|
286
|
+
switch (_response.error.statusCode) {
|
|
287
|
+
case 422:
|
|
288
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
289
|
+
default:
|
|
290
|
+
throw new errors.ChrtError({
|
|
291
|
+
statusCode: _response.error.statusCode,
|
|
292
|
+
body: _response.error.body,
|
|
293
|
+
rawResponse: _response.rawResponse,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
switch (_response.error.reason) {
|
|
298
|
+
case "non-json":
|
|
299
|
+
throw new errors.ChrtError({
|
|
300
|
+
statusCode: _response.error.statusCode,
|
|
301
|
+
body: _response.error.rawBody,
|
|
302
|
+
rawResponse: _response.rawResponse,
|
|
303
|
+
});
|
|
304
|
+
case "timeout":
|
|
305
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/order-builder/stream/v1.");
|
|
306
|
+
case "unknown":
|
|
307
|
+
throw new errors.ChrtError({
|
|
308
|
+
message: _response.error.errorMessage,
|
|
309
|
+
rawResponse: _response.rawResponse,
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
}
|
|
249
314
|
/**
|
|
250
315
|
* (DEPRECATED) Extracts and returns the user ID from the authenticated request's JWT token. | () -> (str)
|
|
251
316
|
*
|
|
@@ -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,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.OrderDraftIssueCategoryEnum = void 0;
|
|
7
|
+
exports.OrderDraftIssueCategoryEnum = {
|
|
8
|
+
Status: "status",
|
|
9
|
+
Structure: "structure",
|
|
10
|
+
ActionType: "action_type",
|
|
11
|
+
Sequence: "sequence",
|
|
12
|
+
Assignment: "assignment",
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ShippingDocTemplateEnum = void 0;
|
|
7
|
+
exports.ShippingDocTemplateEnum = {
|
|
8
|
+
Pod: "pod",
|
|
9
|
+
Bol: "bol",
|
|
10
|
+
};
|
|
@@ -138,16 +138,21 @@ export * from "./OffChrtShipperOrgListRes.js";
|
|
|
138
138
|
export * from "./OnboardCourierTaskActionEnum1.js";
|
|
139
139
|
export * from "./Order1.js";
|
|
140
140
|
export * from "./OrderAndTaskGroupExpandedReq.js";
|
|
141
|
+
export * from "./OrderBuilderReq.js";
|
|
141
142
|
export * from "./OrderBuilderRes.js";
|
|
142
143
|
export * from "./OrderDraftExpanded.js";
|
|
143
144
|
export * from "./OrderDraftExpandedListRes.js";
|
|
145
|
+
export * from "./OrderDraftIssueCategoryEnum.js";
|
|
144
146
|
export * from "./OrderDraftSortByEnum.js";
|
|
147
|
+
export * from "./OrderDraftValidationIssue.js";
|
|
148
|
+
export * from "./OrderDraftValidationResult.js";
|
|
145
149
|
export * from "./OrderExpanded.js";
|
|
146
150
|
export * from "./OrderSortByEnum.js";
|
|
147
151
|
export * from "./OrderStatusEnum1.js";
|
|
148
152
|
export * from "./OrdersDraftUpdateRes.js";
|
|
149
153
|
export * from "./OrdersExpandedListRes.js";
|
|
150
154
|
export * from "./OrdersNewDraftRes.js";
|
|
155
|
+
export * from "./OrdersUpdateOffChrtReferenceIdRes.js";
|
|
151
156
|
export * from "./OrgInfoResponse.js";
|
|
152
157
|
export * from "./OrgMemberDetails.js";
|
|
153
158
|
export * from "./OrgMemberListRes.js";
|
|
@@ -188,6 +193,7 @@ export * from "./ShipperConnectionRes.js";
|
|
|
188
193
|
export * from "./ShipperCourierConnection1.js";
|
|
189
194
|
export * from "./ShipperForwarderConnection1.js";
|
|
190
195
|
export * from "./ShipperOrgInfoForConnections1.js";
|
|
196
|
+
export * from "./ShippingDocTemplateEnum.js";
|
|
191
197
|
export * from "./ShippingOrderCancelledWebhookPayload.js";
|
|
192
198
|
export * from "./ShippingOrderCompletedWebhookPayload.js";
|
|
193
199
|
export * from "./ShippingOrderStagedWebhookPayload.js";
|
|
@@ -154,16 +154,21 @@ __exportStar(require("./OffChrtShipperOrgListRes.js"), exports);
|
|
|
154
154
|
__exportStar(require("./OnboardCourierTaskActionEnum1.js"), exports);
|
|
155
155
|
__exportStar(require("./Order1.js"), exports);
|
|
156
156
|
__exportStar(require("./OrderAndTaskGroupExpandedReq.js"), exports);
|
|
157
|
+
__exportStar(require("./OrderBuilderReq.js"), exports);
|
|
157
158
|
__exportStar(require("./OrderBuilderRes.js"), exports);
|
|
158
159
|
__exportStar(require("./OrderDraftExpanded.js"), exports);
|
|
159
160
|
__exportStar(require("./OrderDraftExpandedListRes.js"), exports);
|
|
161
|
+
__exportStar(require("./OrderDraftIssueCategoryEnum.js"), exports);
|
|
160
162
|
__exportStar(require("./OrderDraftSortByEnum.js"), exports);
|
|
163
|
+
__exportStar(require("./OrderDraftValidationIssue.js"), exports);
|
|
164
|
+
__exportStar(require("./OrderDraftValidationResult.js"), exports);
|
|
161
165
|
__exportStar(require("./OrderExpanded.js"), exports);
|
|
162
166
|
__exportStar(require("./OrderSortByEnum.js"), exports);
|
|
163
167
|
__exportStar(require("./OrderStatusEnum1.js"), exports);
|
|
164
168
|
__exportStar(require("./OrdersDraftUpdateRes.js"), exports);
|
|
165
169
|
__exportStar(require("./OrdersExpandedListRes.js"), exports);
|
|
166
170
|
__exportStar(require("./OrdersNewDraftRes.js"), exports);
|
|
171
|
+
__exportStar(require("./OrdersUpdateOffChrtReferenceIdRes.js"), exports);
|
|
167
172
|
__exportStar(require("./OrgInfoResponse.js"), exports);
|
|
168
173
|
__exportStar(require("./OrgMemberDetails.js"), exports);
|
|
169
174
|
__exportStar(require("./OrgMemberListRes.js"), exports);
|
|
@@ -204,6 +209,7 @@ __exportStar(require("./ShipperConnectionRes.js"), exports);
|
|
|
204
209
|
__exportStar(require("./ShipperCourierConnection1.js"), exports);
|
|
205
210
|
__exportStar(require("./ShipperForwarderConnection1.js"), exports);
|
|
206
211
|
__exportStar(require("./ShipperOrgInfoForConnections1.js"), exports);
|
|
212
|
+
__exportStar(require("./ShippingDocTemplateEnum.js"), exports);
|
|
207
213
|
__exportStar(require("./ShippingOrderCancelledWebhookPayload.js"), exports);
|
|
208
214
|
__exportStar(require("./ShippingOrderCompletedWebhookPayload.js"), exports);
|
|
209
215
|
__exportStar(require("./ShippingOrderStagedWebhookPayload.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.559.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -17,8 +17,8 @@ export class ChrtClient {
|
|
|
17
17
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
18
18
|
"X-Fern-Language": "JavaScript",
|
|
19
19
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
20
|
-
"X-Fern-SDK-Version": "1.
|
|
21
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
20
|
+
"X-Fern-SDK-Version": "1.559.0",
|
|
21
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.559.0",
|
|
22
22
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
23
23
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
24
24
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|