@chrt-inc/typescript-sdk 1.726.0 → 1.732.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/operations/resources/departmentRoutingRules/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/operations/resources/departmentRoutingRules/client/Client.js +22 -14
- package/dist/cjs/api/resources/operations/resources/departmentRoutingRules/client/requests/DepartmentRoutingRuleClientCreate1.d.ts +3 -5
- package/dist/cjs/api/resources/operations/resources/departmentRoutingRules/client/requests/DepartmentRoutingRulesDeleteV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/operations/resources/departmentRoutingRules/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.d.ts +12 -12
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.js +21 -21
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/{OperationsTaskListEntriesRemove1.d.ts → OperationsTaskListReorderEntries1.d.ts} +1 -1
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/{OperationsTaskListEntriesAdd1.d.ts → OperationsTaskListSetEntries1.d.ts} +1 -1
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.js +5 -0
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListsApplyToCaseV1Request.d.ts +3 -3
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/Client.d.ts +16 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/Client.js +65 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/SetTaskGroupOrderingDraftReq.d.ts +13 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/SetTaskGroupOrderingDraftReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/cargo/client/Client.d.ts +17 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/cargo/client/Client.js +66 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/OrderDraftUnassociateCargoWithTaskReq.d.ts +16 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/OrderDraftUnassociateCargoWithTaskReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.js +1 -1
- package/dist/cjs/api/types/DeadlineAnchorEnum.d.ts +13 -0
- package/dist/cjs/api/types/DeadlineAnchorEnum.js +10 -0
- package/dist/cjs/api/types/DepartmentRoutingRule1.d.ts +3 -3
- package/dist/cjs/api/types/OperationsTaskListEntry1.d.ts +9 -7
- package/dist/cjs/api/types/OperationsTaskTypeEnum.d.ts +16 -8
- package/dist/cjs/api/types/OperationsTaskTypeEnum.js +6 -7
- package/dist/cjs/api/types/OrderDraftValidationResult.d.ts +1 -0
- package/dist/cjs/api/types/ValidationIssue.d.ts +8 -0
- package/dist/cjs/api/types/ValidationIssue.js +5 -0
- package/dist/cjs/api/types/ValidationIssueScope.d.ts +8 -0
- package/dist/cjs/api/types/ValidationIssueScope.js +5 -0
- package/dist/cjs/api/types/index.d.ts +3 -1
- package/dist/cjs/api/types/index.js +3 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/operations/resources/departmentRoutingRules/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/operations/resources/departmentRoutingRules/client/Client.mjs +22 -14
- package/dist/esm/api/resources/operations/resources/departmentRoutingRules/client/requests/DepartmentRoutingRuleClientCreate1.d.mts +3 -5
- package/dist/esm/api/resources/operations/resources/departmentRoutingRules/client/requests/DepartmentRoutingRulesDeleteV1Request.d.mts +14 -0
- package/dist/esm/api/resources/operations/resources/departmentRoutingRules/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.d.mts +12 -12
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.mjs +21 -21
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/{OperationsTaskListEntriesRemove1.d.mts → OperationsTaskListReorderEntries1.d.mts} +1 -1
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/{OperationsTaskListEntriesAdd1.d.mts → OperationsTaskListSetEntries1.d.mts} +1 -1
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.mjs +4 -0
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListsApplyToCaseV1Request.d.mts +3 -3
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/Client.d.mts +16 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/Client.mjs +65 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/SetTaskGroupOrderingDraftReq.d.mts +13 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/SetTaskGroupOrderingDraftReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/cargo/client/Client.d.mts +17 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/cargo/client/Client.mjs +66 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/OrderDraftUnassociateCargoWithTaskReq.d.mts +16 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/OrderDraftUnassociateCargoWithTaskReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.mjs +1 -1
- package/dist/esm/api/types/DeadlineAnchorEnum.d.mts +13 -0
- package/dist/esm/api/types/DeadlineAnchorEnum.mjs +7 -0
- package/dist/esm/api/types/DepartmentRoutingRule1.d.mts +3 -3
- package/dist/esm/api/types/OperationsTaskListEntry1.d.mts +9 -7
- package/dist/esm/api/types/OperationsTaskTypeEnum.d.mts +16 -8
- package/dist/esm/api/types/OperationsTaskTypeEnum.mjs +6 -7
- package/dist/esm/api/types/OrderDraftValidationResult.d.mts +1 -0
- package/dist/esm/api/types/ValidationIssue.d.mts +8 -0
- package/dist/esm/api/types/ValidationIssue.mjs +4 -0
- package/dist/esm/api/types/ValidationIssueScope.d.mts +8 -0
- package/dist/esm/api/types/ValidationIssueScope.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +3 -1
- package/dist/esm/api/types/index.mjs +3 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +159 -26
- package/dist/cjs/api/types/RoutingCounterpartyTypeEnum.d.ts +0 -8
- package/dist/cjs/api/types/RoutingCounterpartyTypeEnum.js +0 -10
- package/dist/esm/api/types/RoutingCounterpartyTypeEnum.d.mts +0 -8
- package/dist/esm/api/types/RoutingCounterpartyTypeEnum.mjs +0 -7
- /package/dist/cjs/api/resources/operations/resources/{operationsTaskLists/client/requests/OperationsTaskListEntriesAdd1.js → departmentRoutingRules/client/requests/DepartmentRoutingRulesDeleteV1Request.js} +0 -0
- /package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/{OperationsTaskListEntriesRemove1.js → OperationsTaskListReorderEntries1.js} +0 -0
- /package/dist/esm/api/resources/operations/resources/{operationsTaskLists/client/requests/OperationsTaskListEntriesAdd1.mjs → departmentRoutingRules/client/requests/DepartmentRoutingRulesDeleteV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/{OperationsTaskListEntriesRemove1.mjs → OperationsTaskListReorderEntries1.mjs} +0 -0
package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/cargo/client/Client.js
CHANGED
|
@@ -189,6 +189,72 @@ class Cargo {
|
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Removes an existing cargo association from a task in a draft order (e.g. when the wrong cargo was selected). | (OrderDraftUnassociateCargoWithTaskReq) -> (bool)
|
|
194
|
+
*
|
|
195
|
+
* @param {Chrt.shipping.orderDrafts.OrderDraftUnassociateCargoWithTaskReq} request
|
|
196
|
+
* @param {Cargo.RequestOptions} requestOptions - Request-specific configuration.
|
|
197
|
+
*
|
|
198
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* await client.shipping.orderDrafts.cargo.unassociateWithTaskV1({
|
|
202
|
+
* order_id: "order_id",
|
|
203
|
+
* task_id: "task_id",
|
|
204
|
+
* cargo_id: "cargo_id"
|
|
205
|
+
* })
|
|
206
|
+
*/
|
|
207
|
+
unassociateWithTaskV1(request, requestOptions) {
|
|
208
|
+
return core.HttpResponsePromise.fromPromise(this.__unassociateWithTaskV1(request, requestOptions));
|
|
209
|
+
}
|
|
210
|
+
__unassociateWithTaskV1(request, requestOptions) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
var _a, _b, _c, _d;
|
|
213
|
+
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);
|
|
214
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
215
|
+
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/order_drafts/cargo/unassociate_with_task/v1"),
|
|
216
|
+
method: "POST",
|
|
217
|
+
headers: _headers,
|
|
218
|
+
contentType: "application/json",
|
|
219
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
220
|
+
requestType: "json",
|
|
221
|
+
body: request,
|
|
222
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
223
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
224
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
225
|
+
});
|
|
226
|
+
if (_response.ok) {
|
|
227
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
228
|
+
}
|
|
229
|
+
if (_response.error.reason === "status-code") {
|
|
230
|
+
switch (_response.error.statusCode) {
|
|
231
|
+
case 422:
|
|
232
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
233
|
+
default:
|
|
234
|
+
throw new errors.ChrtError({
|
|
235
|
+
statusCode: _response.error.statusCode,
|
|
236
|
+
body: _response.error.body,
|
|
237
|
+
rawResponse: _response.rawResponse,
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
switch (_response.error.reason) {
|
|
242
|
+
case "non-json":
|
|
243
|
+
throw new errors.ChrtError({
|
|
244
|
+
statusCode: _response.error.statusCode,
|
|
245
|
+
body: _response.error.rawBody,
|
|
246
|
+
rawResponse: _response.rawResponse,
|
|
247
|
+
});
|
|
248
|
+
case "timeout":
|
|
249
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/order_drafts/cargo/unassociate_with_task/v1.");
|
|
250
|
+
case "unknown":
|
|
251
|
+
throw new errors.ChrtError({
|
|
252
|
+
message: _response.error.errorMessage,
|
|
253
|
+
rawResponse: _response.rawResponse,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
}
|
|
192
258
|
/**
|
|
193
259
|
* Updates a cargo item in an existing draft order. Validates order is in DRAFT status and owned by caller. | (OrderDraftUpdateCargoReq) -> (PydanticObjectId)
|
|
194
260
|
*
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* order_id: "order_id",
|
|
8
|
+
* task_id: "task_id",
|
|
9
|
+
* cargo_id: "cargo_id"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface OrderDraftUnassociateCargoWithTaskReq {
|
|
13
|
+
order_id: string;
|
|
14
|
+
task_id: string;
|
|
15
|
+
cargo_id: string;
|
|
16
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { type OrderDraftAddCargoReq } from "./OrderDraftAddCargoReq.js";
|
|
2
2
|
export { type OrderDraftAssociateCargoWithTaskReq } from "./OrderDraftAssociateCargoWithTaskReq.js";
|
|
3
|
+
export { type OrderDraftUnassociateCargoWithTaskReq } from "./OrderDraftUnassociateCargoWithTaskReq.js";
|
|
3
4
|
export { type OrderDraftUpdateCargoReq } from "./OrderDraftUpdateCargoReq.js";
|
|
@@ -112,7 +112,7 @@ export declare class TaskGroups {
|
|
|
112
112
|
addExecutorV1(taskGroupId: string, request?: Chrt.shipping.AddExecutorReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
113
113
|
private __addExecutorV1;
|
|
114
114
|
/**
|
|
115
|
-
* Clears the executor on a task group
|
|
115
|
+
* Clears the executor and assigned driver on a task group. Refuses while PPP or PPD billing is attached; detach billing explicitly first. | authz_personas=[coordinator_org_operators] | () -> (bool)
|
|
116
116
|
*
|
|
117
117
|
* @param {string} taskGroupId
|
|
118
118
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -382,7 +382,7 @@ class TaskGroups {
|
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
/**
|
|
385
|
-
* Clears the executor on a task group
|
|
385
|
+
* Clears the executor and assigned driver on a task group. Refuses while PPP or PPD billing is attached; detach billing explicitly first. | authz_personas=[coordinator_org_operators] | () -> (bool)
|
|
386
386
|
*
|
|
387
387
|
* @param {string} taskGroupId
|
|
388
388
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* What an entry's `deadline_offset_seconds` is measured from.
|
|
6
|
+
*
|
|
7
|
+
* Resolved in a single forward pass at apply time (see module docstring).
|
|
8
|
+
*/
|
|
9
|
+
export type DeadlineAnchorEnum = "from_first_task" | "from_previous_task";
|
|
10
|
+
export declare const DeadlineAnchorEnum: {
|
|
11
|
+
readonly FromFirstTask: "from_first_task";
|
|
12
|
+
readonly FromPreviousTask: "from_previous_task";
|
|
13
|
+
};
|
|
@@ -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.DeadlineAnchorEnum = void 0;
|
|
7
|
+
exports.DeadlineAnchorEnum = {
|
|
8
|
+
FromFirstTask: "from_first_task",
|
|
9
|
+
FromPreviousTask: "from_previous_task",
|
|
10
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Chrt from "../index.js";
|
|
5
4
|
export interface DepartmentRoutingRule1 {
|
|
6
5
|
schema_version: number;
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
/** Must be a string starting with `org_` */
|
|
7
|
+
shipper_org_id?: string | null;
|
|
8
|
+
off_chrt_shipper_org_id?: string | null;
|
|
9
9
|
department_id: string;
|
|
10
10
|
_id: string;
|
|
11
11
|
/** Must be a string starting with `org_` */
|
|
@@ -7,17 +7,19 @@ import * as Chrt from "../index.js";
|
|
|
7
7
|
*
|
|
8
8
|
* Materialized into an `OperationsTask` on apply.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* `
|
|
13
|
-
* entry is
|
|
14
|
-
*
|
|
15
|
-
* `
|
|
10
|
+
* The deadline is computed from (`deadline_anchor`, `deadline_offset_seconds`):
|
|
11
|
+
* `FROM_FIRST_TASK` => the first entry's resolved deadline + offset;
|
|
12
|
+
* `FROM_PREVIOUS_TASK` => the previous entry's resolved deadline + offset (the
|
|
13
|
+
* first entry's "previous" is `apply_time`). The first entry itself anchors to
|
|
14
|
+
* `apply_time` (or the apply-time `initial_deadline_timestamp` pin). Defaults to
|
|
15
|
+
* `FROM_PREVIOUS_TASK` + 1200s, which reproduces the 20-min positional stagger.
|
|
16
|
+
* `deadline_offset_seconds` may be negative.
|
|
16
17
|
*/
|
|
17
18
|
export interface OperationsTaskListEntry1 {
|
|
18
19
|
id?: string;
|
|
19
20
|
task_type: Chrt.OperationsTaskTypeEnum;
|
|
20
21
|
title: string;
|
|
21
22
|
description: string;
|
|
22
|
-
|
|
23
|
+
deadline_anchor?: Chrt.DeadlineAnchorEnum;
|
|
24
|
+
deadline_offset_seconds?: number;
|
|
23
25
|
}
|
|
@@ -5,18 +5,26 @@
|
|
|
5
5
|
* Coarse functional buckets a dispatcher batch-processes (powers the
|
|
6
6
|
* per-type functional-queue index). Granular SOP specifics live in the Task's
|
|
7
7
|
* `title`/`description` + `tags`, not here.
|
|
8
|
+
*
|
|
9
|
+
* Ordered roughly along the shipment lifecycle (review -> research -> book ->
|
|
10
|
+
* track/verify -> contact -> billing). The buckets are the distinct *modes of
|
|
11
|
+
* work* an operator sits down and batches; the exact SOP step (e.g. "Send
|
|
12
|
+
* Shipping Label", "CBC Call", "Get Pack Time") is captured in the title.
|
|
13
|
+
*
|
|
14
|
+
* Contact is split by *who* (customer, agent, airline, other), not by
|
|
15
|
+
* *channel* (call vs. email) — the recipient is what a dispatcher batches
|
|
16
|
+
* around, and the channel is a title/tag detail.
|
|
8
17
|
*/
|
|
9
|
-
export type OperationsTaskTypeEnum = "review_order_details" | "
|
|
18
|
+
export type OperationsTaskTypeEnum = "review_order_details" | "precheck" | "book_cargo" | "track_and_verify" | "contact_customer" | "contact_agent" | "contact_airline" | "contact_other" | "finalize_billing" | "custom" | "other";
|
|
10
19
|
export declare const OperationsTaskTypeEnum: {
|
|
11
20
|
readonly ReviewOrderDetails: "review_order_details";
|
|
21
|
+
readonly Precheck: "precheck";
|
|
12
22
|
readonly BookCargo: "book_cargo";
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly CallDriver: "call_driver";
|
|
19
|
-
readonly VerifyTaskArtifacts: "verify_task_artifacts";
|
|
23
|
+
readonly TrackAndVerify: "track_and_verify";
|
|
24
|
+
readonly ContactCustomer: "contact_customer";
|
|
25
|
+
readonly ContactAgent: "contact_agent";
|
|
26
|
+
readonly ContactAirline: "contact_airline";
|
|
27
|
+
readonly ContactOther: "contact_other";
|
|
20
28
|
readonly FinalizeBilling: "finalize_billing";
|
|
21
29
|
readonly Custom: "custom";
|
|
22
30
|
readonly Other: "other";
|
|
@@ -6,14 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.OperationsTaskTypeEnum = void 0;
|
|
7
7
|
exports.OperationsTaskTypeEnum = {
|
|
8
8
|
ReviewOrderDetails: "review_order_details",
|
|
9
|
+
Precheck: "precheck",
|
|
9
10
|
BookCargo: "book_cargo",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
CallDriver: "call_driver",
|
|
16
|
-
VerifyTaskArtifacts: "verify_task_artifacts",
|
|
11
|
+
TrackAndVerify: "track_and_verify",
|
|
12
|
+
ContactCustomer: "contact_customer",
|
|
13
|
+
ContactAgent: "contact_agent",
|
|
14
|
+
ContactAirline: "contact_airline",
|
|
15
|
+
ContactOther: "contact_other",
|
|
17
16
|
FinalizeBilling: "finalize_billing",
|
|
18
17
|
Custom: "custom",
|
|
19
18
|
Other: "other",
|
|
@@ -107,6 +107,7 @@ export * from "./CreateLigFromRateSheetForVectorClientReq.js";
|
|
|
107
107
|
export * from "./CreateStripeConnectAccountRes.js";
|
|
108
108
|
export * from "./CredentialInfoRes.js";
|
|
109
109
|
export * from "./DateTimeWindow1.js";
|
|
110
|
+
export * from "./DeadlineAnchorEnum.js";
|
|
110
111
|
export * from "./Department1.js";
|
|
111
112
|
export * from "./DepartmentListRes.js";
|
|
112
113
|
export * from "./DepartmentRoutingRule1.js";
|
|
@@ -272,7 +273,6 @@ export * from "./ProviderOrgProfile1.js";
|
|
|
272
273
|
export * from "./ProviderProviderConnection1.js";
|
|
273
274
|
export * from "./RateSheetMapping1.js";
|
|
274
275
|
export * from "./RateSheetMappingListRes.js";
|
|
275
|
-
export * from "./RoutingCounterpartyTypeEnum.js";
|
|
276
276
|
export * from "./ScanPayloadKindEnum.js";
|
|
277
277
|
export * from "./ScheduleCalendarSpec.js";
|
|
278
278
|
export * from "./ScheduleIntervalSpec.js";
|
|
@@ -376,6 +376,8 @@ export * from "./UnitsEnum.js";
|
|
|
376
376
|
export * from "./UserPrivateData1.js";
|
|
377
377
|
export * from "./UserPublicData1.js";
|
|
378
378
|
export * from "./ValidationError.js";
|
|
379
|
+
export * from "./ValidationIssue.js";
|
|
380
|
+
export * from "./ValidationIssueScope.js";
|
|
379
381
|
export * from "./Vehicle1.js";
|
|
380
382
|
export * from "./VehicleTypeEnum.js";
|
|
381
383
|
export * from "./WebcargoAccountId.js";
|
|
@@ -123,6 +123,7 @@ __exportStar(require("./CreateLigFromRateSheetForVectorClientReq.js"), exports);
|
|
|
123
123
|
__exportStar(require("./CreateStripeConnectAccountRes.js"), exports);
|
|
124
124
|
__exportStar(require("./CredentialInfoRes.js"), exports);
|
|
125
125
|
__exportStar(require("./DateTimeWindow1.js"), exports);
|
|
126
|
+
__exportStar(require("./DeadlineAnchorEnum.js"), exports);
|
|
126
127
|
__exportStar(require("./Department1.js"), exports);
|
|
127
128
|
__exportStar(require("./DepartmentListRes.js"), exports);
|
|
128
129
|
__exportStar(require("./DepartmentRoutingRule1.js"), exports);
|
|
@@ -288,7 +289,6 @@ __exportStar(require("./ProviderOrgProfile1.js"), exports);
|
|
|
288
289
|
__exportStar(require("./ProviderProviderConnection1.js"), exports);
|
|
289
290
|
__exportStar(require("./RateSheetMapping1.js"), exports);
|
|
290
291
|
__exportStar(require("./RateSheetMappingListRes.js"), exports);
|
|
291
|
-
__exportStar(require("./RoutingCounterpartyTypeEnum.js"), exports);
|
|
292
292
|
__exportStar(require("./ScanPayloadKindEnum.js"), exports);
|
|
293
293
|
__exportStar(require("./ScheduleCalendarSpec.js"), exports);
|
|
294
294
|
__exportStar(require("./ScheduleIntervalSpec.js"), exports);
|
|
@@ -392,6 +392,8 @@ __exportStar(require("./UnitsEnum.js"), exports);
|
|
|
392
392
|
__exportStar(require("./UserPrivateData1.js"), exports);
|
|
393
393
|
__exportStar(require("./UserPublicData1.js"), exports);
|
|
394
394
|
__exportStar(require("./ValidationError.js"), exports);
|
|
395
|
+
__exportStar(require("./ValidationIssue.js"), exports);
|
|
396
|
+
__exportStar(require("./ValidationIssueScope.js"), exports);
|
|
395
397
|
__exportStar(require("./Vehicle1.js"), exports);
|
|
396
398
|
__exportStar(require("./VehicleTypeEnum.js"), exports);
|
|
397
399
|
__exportStar(require("./WebcargoAccountId.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.732.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -20,8 +20,8 @@ export class ChrtClient {
|
|
|
20
20
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
21
21
|
"X-Fern-Language": "JavaScript",
|
|
22
22
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
23
|
-
"X-Fern-SDK-Version": "1.
|
|
24
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
23
|
+
"X-Fern-SDK-Version": "1.732.0",
|
|
24
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.732.0",
|
|
25
25
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
26
26
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
27
27
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
package/dist/esm/api/resources/operations/resources/departmentRoutingRules/client/Client.d.mts
CHANGED
|
@@ -41,7 +41,7 @@ export declare class DepartmentRoutingRules {
|
|
|
41
41
|
listV1(requestOptions?: DepartmentRoutingRules.RequestOptions): core.HttpResponsePromise<Chrt.DepartmentRoutingRule1[]>;
|
|
42
42
|
private __listV1;
|
|
43
43
|
/**
|
|
44
|
-
* Sets the caller org's default operations desk for a counterparty (on-chrt shipper
|
|
44
|
+
* Sets the caller org's default operations desk for a counterparty. The body must set exactly one of shipper_org_id (on-chrt shipper) / off_chrt_shipper_org_id (off-chrt shipper shell) (XOR). Upsert: one rule per (owner, counterparty). Returns the rule id. The mapping is a non-binding suggestion surfaced at Case creation. | authz: min_org_role=administrator | (DepartmentRoutingRuleClientCreate1) -> (PydanticObjectId)
|
|
45
45
|
*
|
|
46
46
|
* @param {Chrt.operations.DepartmentRoutingRuleClientCreate1} request
|
|
47
47
|
* @param {DepartmentRoutingRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -51,26 +51,26 @@ export declare class DepartmentRoutingRules {
|
|
|
51
51
|
* @example
|
|
52
52
|
* await client.operations.departmentRoutingRules.upsertV1({
|
|
53
53
|
* schema_version: 1,
|
|
54
|
-
* counterparty_type: "shipper_org",
|
|
55
|
-
* counterparty_id: "counterparty_id",
|
|
56
54
|
* department_id: "department_id"
|
|
57
55
|
* })
|
|
58
56
|
*/
|
|
59
57
|
upsertV1(request: Chrt.operations.DepartmentRoutingRuleClientCreate1, requestOptions?: DepartmentRoutingRules.RequestOptions): core.HttpResponsePromise<string>;
|
|
60
58
|
private __upsertV1;
|
|
61
59
|
/**
|
|
62
|
-
* Clears the caller org's default operations desk for a counterparty. | authz: min_org_role=administrator | () -> (bool)
|
|
60
|
+
* Clears the caller org's default operations desk for a counterparty, keyed by exactly one of the shipper_org_id / off_chrt_shipper_org_id query params. | authz: min_org_role=administrator | () -> (bool)
|
|
63
61
|
*
|
|
64
|
-
* @param {Chrt.
|
|
65
|
-
* @param {string} counterpartyId
|
|
62
|
+
* @param {Chrt.operations.DepartmentRoutingRulesDeleteV1Request} request
|
|
66
63
|
* @param {DepartmentRoutingRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
64
|
*
|
|
68
65
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
69
66
|
*
|
|
70
67
|
* @example
|
|
71
|
-
* await client.operations.departmentRoutingRules.deleteV1(
|
|
68
|
+
* await client.operations.departmentRoutingRules.deleteV1({
|
|
69
|
+
* shipper_org_id: "shipper_org_id",
|
|
70
|
+
* off_chrt_shipper_org_id: "off_chrt_shipper_org_id"
|
|
71
|
+
* })
|
|
72
72
|
*/
|
|
73
|
-
deleteV1(
|
|
73
|
+
deleteV1(request?: Chrt.operations.DepartmentRoutingRulesDeleteV1Request, requestOptions?: DepartmentRoutingRules.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
74
74
|
private __deleteV1;
|
|
75
75
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
76
76
|
}
|
package/dist/esm/api/resources/operations/resources/departmentRoutingRules/client/Client.mjs
CHANGED
|
@@ -71,7 +71,7 @@ export class DepartmentRoutingRules {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
* Sets the caller org's default operations desk for a counterparty (on-chrt shipper
|
|
74
|
+
* Sets the caller org's default operations desk for a counterparty. The body must set exactly one of shipper_org_id (on-chrt shipper) / off_chrt_shipper_org_id (off-chrt shipper shell) (XOR). Upsert: one rule per (owner, counterparty). Returns the rule id. The mapping is a non-binding suggestion surfaced at Case creation. | authz: min_org_role=administrator | (DepartmentRoutingRuleClientCreate1) -> (PydanticObjectId)
|
|
75
75
|
*
|
|
76
76
|
* @param {Chrt.operations.DepartmentRoutingRuleClientCreate1} request
|
|
77
77
|
* @param {DepartmentRoutingRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -81,8 +81,6 @@ export class DepartmentRoutingRules {
|
|
|
81
81
|
* @example
|
|
82
82
|
* await client.operations.departmentRoutingRules.upsertV1({
|
|
83
83
|
* schema_version: 1,
|
|
84
|
-
* counterparty_type: "shipper_org",
|
|
85
|
-
* counterparty_id: "counterparty_id",
|
|
86
84
|
* department_id: "department_id"
|
|
87
85
|
* })
|
|
88
86
|
*/
|
|
@@ -138,29 +136,39 @@ export class DepartmentRoutingRules {
|
|
|
138
136
|
});
|
|
139
137
|
}
|
|
140
138
|
/**
|
|
141
|
-
* Clears the caller org's default operations desk for a counterparty. | authz: min_org_role=administrator | () -> (bool)
|
|
139
|
+
* Clears the caller org's default operations desk for a counterparty, keyed by exactly one of the shipper_org_id / off_chrt_shipper_org_id query params. | authz: min_org_role=administrator | () -> (bool)
|
|
142
140
|
*
|
|
143
|
-
* @param {Chrt.
|
|
144
|
-
* @param {string} counterpartyId
|
|
141
|
+
* @param {Chrt.operations.DepartmentRoutingRulesDeleteV1Request} request
|
|
145
142
|
* @param {DepartmentRoutingRules.RequestOptions} requestOptions - Request-specific configuration.
|
|
146
143
|
*
|
|
147
144
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
148
145
|
*
|
|
149
146
|
* @example
|
|
150
|
-
* await client.operations.departmentRoutingRules.deleteV1(
|
|
147
|
+
* await client.operations.departmentRoutingRules.deleteV1({
|
|
148
|
+
* shipper_org_id: "shipper_org_id",
|
|
149
|
+
* off_chrt_shipper_org_id: "off_chrt_shipper_org_id"
|
|
150
|
+
* })
|
|
151
151
|
*/
|
|
152
|
-
deleteV1(
|
|
153
|
-
return core.HttpResponsePromise.fromPromise(this.__deleteV1(
|
|
152
|
+
deleteV1(request = {}, requestOptions) {
|
|
153
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteV1(request, requestOptions));
|
|
154
154
|
}
|
|
155
|
-
__deleteV1(
|
|
156
|
-
return __awaiter(this,
|
|
155
|
+
__deleteV1() {
|
|
156
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
157
157
|
var _a, _b, _c, _d;
|
|
158
|
+
const { shipper_org_id: shipperOrgId, off_chrt_shipper_org_id: offChrtShipperOrgId } = request;
|
|
159
|
+
const _queryParams = {};
|
|
160
|
+
if (shipperOrgId !== undefined) {
|
|
161
|
+
_queryParams["shipper_org_id"] = shipperOrgId;
|
|
162
|
+
}
|
|
163
|
+
if (offChrtShipperOrgId !== undefined) {
|
|
164
|
+
_queryParams["off_chrt_shipper_org_id"] = offChrtShipperOrgId;
|
|
165
|
+
}
|
|
158
166
|
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);
|
|
159
167
|
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,
|
|
168
|
+
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, "operations/department_routing_rules/v1"),
|
|
161
169
|
method: "DELETE",
|
|
162
170
|
headers: _headers,
|
|
163
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
171
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
164
172
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
165
173
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
166
174
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -188,7 +196,7 @@ export class DepartmentRoutingRules {
|
|
|
188
196
|
rawResponse: _response.rawResponse,
|
|
189
197
|
});
|
|
190
198
|
case "timeout":
|
|
191
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /operations/department_routing_rules/v1
|
|
199
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /operations/department_routing_rules/v1.");
|
|
192
200
|
case "unknown":
|
|
193
201
|
throw new errors.ChrtError({
|
|
194
202
|
message: _response.error.errorMessage,
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as Chrt from "../../../../../../index.mjs";
|
|
5
4
|
/**
|
|
6
5
|
* @example
|
|
7
6
|
* {
|
|
8
7
|
* schema_version: 1,
|
|
9
|
-
* counterparty_type: "shipper_org",
|
|
10
|
-
* counterparty_id: "counterparty_id",
|
|
11
8
|
* department_id: "department_id"
|
|
12
9
|
* }
|
|
13
10
|
*/
|
|
14
11
|
export interface DepartmentRoutingRuleClientCreate1 {
|
|
15
12
|
schema_version: number;
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
/** Must be a string starting with `org_` */
|
|
14
|
+
shipper_org_id?: string | null;
|
|
15
|
+
off_chrt_shipper_org_id?: string | null;
|
|
18
16
|
department_id: string;
|
|
19
17
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* shipper_org_id: "shipper_org_id",
|
|
8
|
+
* off_chrt_shipper_org_id: "off_chrt_shipper_org_id"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface DepartmentRoutingRulesDeleteV1Request {
|
|
12
|
+
shipper_org_id?: string | null;
|
|
13
|
+
off_chrt_shipper_org_id?: string | null;
|
|
14
|
+
}
|
|
@@ -93,33 +93,33 @@ export declare class OperationsTaskLists {
|
|
|
93
93
|
createV1(request: Chrt.operations.OperationsTaskListClientCreate1, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<string>;
|
|
94
94
|
private __createV1;
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
96
|
+
* Replaces an OperationsTaskList's `entries` array wholesale — covering add, remove, reorder, and edit in one operation. Order is load-bearing for from_previous_task-anchored deadlines. | authz: min_org_role=operator | (OperationsTaskListSetEntries1) -> (bool)
|
|
97
97
|
*
|
|
98
98
|
* @param {string} taskListId
|
|
99
|
-
* @param {Chrt.operations.
|
|
99
|
+
* @param {Chrt.operations.OperationsTaskListSetEntries1} request
|
|
100
100
|
* @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
101
|
*
|
|
102
102
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
103
103
|
*
|
|
104
104
|
* @example
|
|
105
|
-
* await client.operations.operationsTaskLists.
|
|
105
|
+
* await client.operations.operationsTaskLists.setEntriesV1("task_list_id")
|
|
106
106
|
*/
|
|
107
|
-
|
|
108
|
-
private
|
|
107
|
+
setEntriesV1(taskListId: string, request?: Chrt.operations.OperationsTaskListSetEntries1, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
108
|
+
private __setEntriesV1;
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* Reorders an OperationsTaskList's existing entries. `entry_ids` must be an exact permutation of the list's current entry ids (every id present, no extras, no duplicates), so a reorder can never drop, add, or mutate an entry. | authz: min_org_role=operator | (OperationsTaskListReorderEntries1) -> (bool)
|
|
111
111
|
*
|
|
112
112
|
* @param {string} taskListId
|
|
113
|
-
* @param {Chrt.operations.
|
|
113
|
+
* @param {Chrt.operations.OperationsTaskListReorderEntries1} request
|
|
114
114
|
* @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
|
|
115
115
|
*
|
|
116
116
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
117
117
|
*
|
|
118
118
|
* @example
|
|
119
|
-
* await client.operations.operationsTaskLists.
|
|
119
|
+
* await client.operations.operationsTaskLists.reorderEntriesV1("task_list_id")
|
|
120
120
|
*/
|
|
121
|
-
|
|
122
|
-
private
|
|
121
|
+
reorderEntriesV1(taskListId: string, request?: Chrt.operations.OperationsTaskListReorderEntries1, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
122
|
+
private __reorderEntriesV1;
|
|
123
123
|
/**
|
|
124
124
|
* Soft-deletes an OperationsTaskList by setting `archived=True`. Tasks already applied to Cases are unaffected. | authz: min_org_role=operator | () -> (bool)
|
|
125
125
|
*
|
|
@@ -147,7 +147,7 @@ export declare class OperationsTaskLists {
|
|
|
147
147
|
unarchiveV1(taskListId: string, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
148
148
|
private __unarchiveV1;
|
|
149
149
|
/**
|
|
150
|
-
* Materializes each entry of an OperationsTaskList into an OperationsTask on the Case (status=not_started, source_task_list_id set). Deadlines
|
|
150
|
+
* Materializes each entry of an OperationsTaskList into an OperationsTask on the Case (status=not_started, source_task_list_id set). Deadlines resolve per-entry from its anchor+offset; initial_deadline_timestamp, if set, pins the first entry and the chain follows. No dedup — applying twice creates duplicate tasks. | authz: min_org_role=operator | () -> (list[PydanticObjectId])
|
|
151
151
|
*
|
|
152
152
|
* @param {string} taskListId
|
|
153
153
|
* @param {string} caseId
|
|
@@ -158,7 +158,7 @@ export declare class OperationsTaskLists {
|
|
|
158
158
|
*
|
|
159
159
|
* @example
|
|
160
160
|
* await client.operations.operationsTaskLists.applyToCaseV1("task_list_id", "case_id", {
|
|
161
|
-
*
|
|
161
|
+
* initial_deadline_timestamp: "2024-01-15T09:30:00Z"
|
|
162
162
|
* })
|
|
163
163
|
*/
|
|
164
164
|
applyToCaseV1(taskListId: string, caseId: string, request?: Chrt.operations.OperationsTaskListsApplyToCaseV1Request, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<string[]>;
|