@chrt-inc/typescript-sdk 1.853.0 → 1.861.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/cases/client/Client.d.ts +30 -1
- package/dist/cjs/api/resources/operations/resources/cases/client/Client.js +125 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts +8 -4
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/OrderDraftAddCargoReq.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/task/client/requests/OrderDraftAddTaskReqV1.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/client/Client.d.ts +0 -3
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/client/Client.js +0 -5
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/OrderScheduleClientCreate1.d.ts +2 -1
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/OrderScheduleClientUpdate1.d.ts +2 -1
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/index.js +1 -2
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/Client.js +10 -4
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.ts +3 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.ts +3 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplatesListV1Request.d.ts +6 -3
- package/dist/cjs/api/types/Cargo1.d.ts +0 -1
- package/dist/cjs/api/types/Case1.d.ts +1 -0
- package/dist/cjs/api/types/OrderBuilderReq.d.ts +0 -2
- package/dist/cjs/api/types/OrderSchedule1.d.ts +2 -1
- package/dist/cjs/api/types/OrderScheduleBuildSeedRes.d.ts +10 -0
- package/dist/cjs/api/types/OrderTemplate1.d.ts +3 -1
- package/dist/cjs/api/types/OrderTemplateCore1.d.ts +3 -1
- package/dist/cjs/api/types/OrderTemplateReferencesExpanded1.d.ts +12 -0
- package/dist/cjs/api/types/Task1.d.ts +0 -1
- package/dist/cjs/api/types/TaskArtifact1.d.ts +0 -1
- package/dist/cjs/api/types/TaskGroup1.d.ts +0 -1
- package/dist/cjs/api/types/TaskListToApplyToCase1.d.ts +7 -0
- package/dist/cjs/api/types/index.d.ts +3 -8
- package/dist/cjs/api/types/index.js +3 -8
- 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/cases/client/Client.d.mts +30 -1
- package/dist/esm/api/resources/operations/resources/cases/client/Client.mjs +125 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.mts +8 -4
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/OrderDraftAddCargoReq.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/task/client/requests/OrderDraftAddTaskReqV1.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orderSchedules/client/Client.d.mts +0 -3
- package/dist/esm/api/resources/shipping/resources/orderSchedules/client/Client.mjs +0 -5
- package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/OrderScheduleClientCreate1.d.mts +2 -1
- package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/OrderScheduleClientUpdate1.d.mts +2 -1
- package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/Client.mjs +10 -4
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.mts +3 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.mts +3 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplatesListV1Request.d.mts +6 -3
- package/dist/esm/api/types/Cargo1.d.mts +0 -1
- package/dist/esm/api/types/Case1.d.mts +1 -0
- package/dist/esm/api/types/OrderBuilderReq.d.mts +0 -2
- package/dist/esm/api/types/OrderSchedule1.d.mts +2 -1
- package/dist/esm/api/types/OrderScheduleBuildSeedRes.d.mts +10 -0
- package/dist/esm/api/types/OrderTemplate1.d.mts +3 -1
- package/dist/esm/api/types/OrderTemplateCore1.d.mts +3 -1
- package/dist/esm/api/types/OrderTemplateReferencesExpanded1.d.mts +12 -0
- package/dist/esm/api/types/Task1.d.mts +0 -1
- package/dist/esm/api/types/TaskArtifact1.d.mts +0 -1
- package/dist/esm/api/types/TaskGroup1.d.mts +0 -1
- package/dist/esm/api/types/TaskListToApplyToCase1.d.mts +7 -0
- package/dist/esm/api/types/index.d.mts +3 -8
- package/dist/esm/api/types/index.mjs +3 -8
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +155 -67
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/Client.d.ts +0 -47
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/Client.js +0 -130
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/index.js +0 -2
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/index.d.ts +0 -1
- package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/index.js +0 -17
- package/dist/cjs/api/types/CargoManifest1.d.ts +0 -25
- package/dist/cjs/api/types/OrderManifest1.d.ts +0 -19
- package/dist/cjs/api/types/OrderManifestValidationRequirements.d.ts +0 -14
- package/dist/cjs/api/types/OrderManifestValidationResult.d.ts +0 -8
- package/dist/cjs/api/types/OrderManifestValidationResult.js +0 -5
- package/dist/cjs/api/types/ScheduledOrdersNewDraftReq.d.ts +0 -9
- package/dist/cjs/api/types/ScheduledOrdersNewDraftReq.js +0 -5
- package/dist/cjs/api/types/TaskGroupManifest1.d.ts +0 -15
- package/dist/cjs/api/types/TaskGroupManifest1.js +0 -5
- package/dist/cjs/api/types/TaskManifest1.d.ts +0 -26
- package/dist/cjs/api/types/TaskManifest1.js +0 -5
- package/dist/cjs/api/types/TimeWindow1.d.ts +0 -7
- package/dist/cjs/api/types/TimeWindow1.js +0 -5
- package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/Client.d.mts +0 -47
- package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/Client.mjs +0 -93
- package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/index.mjs +0 -1
- package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/index.d.mts +0 -1
- package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/index.mjs +0 -1
- package/dist/esm/api/types/CargoManifest1.d.mts +0 -25
- package/dist/esm/api/types/OrderManifest1.d.mts +0 -19
- package/dist/esm/api/types/OrderManifestValidationRequirements.d.mts +0 -14
- package/dist/esm/api/types/OrderManifestValidationResult.d.mts +0 -8
- package/dist/esm/api/types/OrderManifestValidationResult.mjs +0 -4
- package/dist/esm/api/types/ScheduledOrdersNewDraftReq.d.mts +0 -9
- package/dist/esm/api/types/ScheduledOrdersNewDraftReq.mjs +0 -4
- package/dist/esm/api/types/TaskGroupManifest1.d.mts +0 -15
- package/dist/esm/api/types/TaskGroupManifest1.mjs +0 -4
- package/dist/esm/api/types/TaskManifest1.d.mts +0 -26
- package/dist/esm/api/types/TaskManifest1.mjs +0 -4
- package/dist/esm/api/types/TimeWindow1.d.mts +0 -7
- package/dist/esm/api/types/TimeWindow1.mjs +0 -4
- /package/dist/cjs/api/types/{CargoManifest1.js → OrderScheduleBuildSeedRes.js} +0 -0
- /package/dist/cjs/api/types/{OrderManifest1.js → OrderTemplateReferencesExpanded1.js} +0 -0
- /package/dist/cjs/api/types/{OrderManifestValidationRequirements.js → TaskListToApplyToCase1.js} +0 -0
- /package/dist/esm/api/types/{CargoManifest1.mjs → OrderScheduleBuildSeedRes.mjs} +0 -0
- /package/dist/esm/api/types/{OrderManifest1.mjs → OrderTemplateReferencesExpanded1.mjs} +0 -0
- /package/dist/esm/api/types/{OrderManifestValidationRequirements.mjs → TaskListToApplyToCase1.mjs} +0 -0
package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client/index.js"), exports);
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Cargo template used when generating a scheduled order.
|
|
7
|
-
*
|
|
8
|
-
* Reuses the cargo create shape verbatim (CargoClientCreate1) so the manifest
|
|
9
|
-
* cannot drift from the real cargo model. A scheduled cargo carries no
|
|
10
|
-
* template-specific fields of its own.
|
|
11
|
-
*/
|
|
12
|
-
export interface CargoManifest1 {
|
|
13
|
-
/** IATA Air Waybill number: 3-digit airline prefix + 8-digit serial, e.g. '020-12345678'. */
|
|
14
|
-
awb_number?: string | null;
|
|
15
|
-
cargo_type: Chrt.CargoTypeEnum1;
|
|
16
|
-
description?: string | null;
|
|
17
|
-
height_inches?: number | null;
|
|
18
|
-
length_inches?: number | null;
|
|
19
|
-
quantity?: number | null;
|
|
20
|
-
schema_version: number;
|
|
21
|
-
stackable?: boolean | null;
|
|
22
|
-
turnable?: boolean | null;
|
|
23
|
-
weight_pounds?: number | null;
|
|
24
|
-
width_inches?: number | null;
|
|
25
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Template used by an order schedule to generate each order occurrence.
|
|
7
|
-
*/
|
|
8
|
-
export interface OrderManifest1 {
|
|
9
|
-
auto_stage?: boolean;
|
|
10
|
-
cargo_manifests?: Chrt.CargoManifest1[];
|
|
11
|
-
/** Must be a string starting with `org_` */
|
|
12
|
-
coordinator_org_id?: string | null;
|
|
13
|
-
/** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
|
|
14
|
-
off_chrt_reference_id?: string | null;
|
|
15
|
-
off_chrt_shipper_org_id?: string | null;
|
|
16
|
-
/** Must be a string starting with `org_` */
|
|
17
|
-
shipper_org_id?: string | null;
|
|
18
|
-
task_group_manifests?: Chrt.TaskGroupManifest1[];
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
export interface OrderManifestValidationRequirements {
|
|
5
|
-
at_least_one_task_has_time_window?: boolean | null;
|
|
6
|
-
cargos_have_valid_lifecycle?: boolean | null;
|
|
7
|
-
order_has_coordinator?: boolean | null;
|
|
8
|
-
order_has_shipper?: boolean | null;
|
|
9
|
-
order_has_task_groups?: boolean | null;
|
|
10
|
-
task_groups_have_valid_task_sequence?: boolean | null;
|
|
11
|
-
task_groups_have_valid_tasks?: boolean | null;
|
|
12
|
-
tasks_have_valid_actions?: boolean | null;
|
|
13
|
-
tasks_have_valid_cargo?: boolean | null;
|
|
14
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.js";
|
|
5
|
-
export interface ScheduledOrdersNewDraftReq {
|
|
6
|
-
order_manifest: Chrt.OrderManifest1;
|
|
7
|
-
order_schedule_id: string;
|
|
8
|
-
order_schedule_run_idempotency_key: string;
|
|
9
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Task group template; scheduled orders currently support CHRT ground only.
|
|
7
|
-
*/
|
|
8
|
-
export interface TaskGroupManifest1 {
|
|
9
|
-
driver_id?: string | null;
|
|
10
|
-
/** Must be a string starting with `org_` */
|
|
11
|
-
executor_org_id?: string | null;
|
|
12
|
-
task_group_type: "chrt_ground_provider";
|
|
13
|
-
task_manifests: Chrt.TaskManifest1[];
|
|
14
|
-
vehicle_type?: Chrt.VehicleTypeEnum | null;
|
|
15
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Task template within an order manifest.
|
|
7
|
-
*
|
|
8
|
-
* Inherits the shared task core (TaskCore1) so the physical fields cannot drift
|
|
9
|
-
* from the real task, and adds the template-only fields: relative time windows
|
|
10
|
-
* (resolved against the fire time at build), positional task->cargo references,
|
|
11
|
-
* and the artifact types to create for the task.
|
|
12
|
-
*/
|
|
13
|
-
export interface TaskManifest1 {
|
|
14
|
-
action?: TaskManifest1.Action | null;
|
|
15
|
-
cargo_manifest_indices?: number[];
|
|
16
|
-
directory_entry_ids?: string[];
|
|
17
|
-
geofence_distance_miles?: number;
|
|
18
|
-
location?: Chrt.LocationFeature | null;
|
|
19
|
-
order_placer_comments?: string | null;
|
|
20
|
-
schema_version: number;
|
|
21
|
-
task_artifact_types?: Chrt.TaskArtifactTypeEnum1[];
|
|
22
|
-
time_windows?: Chrt.TimeWindow1[];
|
|
23
|
-
}
|
|
24
|
-
export declare namespace TaskManifest1 {
|
|
25
|
-
type Action = Chrt.ChrtGroundProviderTaskActionEnum1 | Chrt.CargoOnFlightTaskActionEnum1 | Chrt.OnboardCourierTaskActionEnum1;
|
|
26
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as environments from "../../../../../../../../environments.mjs";
|
|
5
|
-
import * as core from "../../../../../../../../core/index.mjs";
|
|
6
|
-
import * as Chrt from "../../../../../../../index.mjs";
|
|
7
|
-
export declare namespace OrderManifest {
|
|
8
|
-
interface Options {
|
|
9
|
-
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
-
/** Specify a custom URL to connect the client to. */
|
|
11
|
-
baseUrl?: core.Supplier<string>;
|
|
12
|
-
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
-
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
-
fetcher?: core.FetchFunction;
|
|
16
|
-
}
|
|
17
|
-
interface RequestOptions {
|
|
18
|
-
/** The maximum time to wait for a response in seconds. */
|
|
19
|
-
timeoutInSeconds?: number;
|
|
20
|
-
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
-
maxRetries?: number;
|
|
22
|
-
/** A hook to abort the request. */
|
|
23
|
-
abortSignal?: AbortSignal;
|
|
24
|
-
/** Additional query string parameters to include in the request. */
|
|
25
|
-
queryParams?: Record<string, unknown>;
|
|
26
|
-
/** Additional headers to include in the request. */
|
|
27
|
-
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export declare class OrderManifest {
|
|
31
|
-
protected readonly _options: OrderManifest.Options;
|
|
32
|
-
constructor(_options?: OrderManifest.Options);
|
|
33
|
-
/**
|
|
34
|
-
* Validates an order manifest for scheduled order creation. | authz: min_org_role=operator | (OrderManifest1) -> (OrderManifestValidationResult)
|
|
35
|
-
*
|
|
36
|
-
* @param {Chrt.OrderManifest1} request
|
|
37
|
-
* @param {OrderManifest.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
-
*
|
|
39
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* await client.shipping.orderSchedules.orderManifest.validateV1({})
|
|
43
|
-
*/
|
|
44
|
-
validateV1(request: Chrt.OrderManifest1, requestOptions?: OrderManifest.RequestOptions): core.HttpResponsePromise<Chrt.OrderManifestValidationResult>;
|
|
45
|
-
private __validateV1;
|
|
46
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
47
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
import * as environments from "../../../../../../../../environments.mjs";
|
|
14
|
-
import * as core from "../../../../../../../../core/index.mjs";
|
|
15
|
-
import * as Chrt from "../../../../../../../index.mjs";
|
|
16
|
-
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../core/headers.mjs";
|
|
17
|
-
import * as errors from "../../../../../../../../errors/index.mjs";
|
|
18
|
-
export class OrderManifest {
|
|
19
|
-
constructor(_options = {}) {
|
|
20
|
-
this._options = _options;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Validates an order manifest for scheduled order creation. | authz: min_org_role=operator | (OrderManifest1) -> (OrderManifestValidationResult)
|
|
24
|
-
*
|
|
25
|
-
* @param {Chrt.OrderManifest1} request
|
|
26
|
-
* @param {OrderManifest.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
-
*
|
|
28
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* await client.shipping.orderSchedules.orderManifest.validateV1({})
|
|
32
|
-
*/
|
|
33
|
-
validateV1(request, requestOptions) {
|
|
34
|
-
return core.HttpResponsePromise.fromPromise(this.__validateV1(request, requestOptions));
|
|
35
|
-
}
|
|
36
|
-
__validateV1(request, requestOptions) {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
var _a, _b, _c, _d;
|
|
39
|
-
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);
|
|
40
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
41
|
-
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_schedules/order_manifest/validate/v1"),
|
|
42
|
-
method: "POST",
|
|
43
|
-
headers: _headers,
|
|
44
|
-
contentType: "application/json",
|
|
45
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
46
|
-
requestType: "json",
|
|
47
|
-
body: request,
|
|
48
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
49
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
50
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
51
|
-
});
|
|
52
|
-
if (_response.ok) {
|
|
53
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
54
|
-
}
|
|
55
|
-
if (_response.error.reason === "status-code") {
|
|
56
|
-
switch (_response.error.statusCode) {
|
|
57
|
-
case 422:
|
|
58
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
59
|
-
default:
|
|
60
|
-
throw new errors.ChrtError({
|
|
61
|
-
statusCode: _response.error.statusCode,
|
|
62
|
-
body: _response.error.body,
|
|
63
|
-
rawResponse: _response.rawResponse,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
switch (_response.error.reason) {
|
|
68
|
-
case "non-json":
|
|
69
|
-
throw new errors.ChrtError({
|
|
70
|
-
statusCode: _response.error.statusCode,
|
|
71
|
-
body: _response.error.rawBody,
|
|
72
|
-
rawResponse: _response.rawResponse,
|
|
73
|
-
});
|
|
74
|
-
case "timeout":
|
|
75
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/order_schedules/order_manifest/validate/v1.");
|
|
76
|
-
case "unknown":
|
|
77
|
-
throw new errors.ChrtError({
|
|
78
|
-
message: _response.error.errorMessage,
|
|
79
|
-
rawResponse: _response.rawResponse,
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
_getAuthorizationHeader() {
|
|
85
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
const bearer = yield core.Supplier.get(this._options.token);
|
|
87
|
-
if (bearer != null) {
|
|
88
|
-
return `Bearer ${bearer}`;
|
|
89
|
-
}
|
|
90
|
-
return undefined;
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/index.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.mjs";
|
package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.mjs";
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Cargo template used when generating a scheduled order.
|
|
7
|
-
*
|
|
8
|
-
* Reuses the cargo create shape verbatim (CargoClientCreate1) so the manifest
|
|
9
|
-
* cannot drift from the real cargo model. A scheduled cargo carries no
|
|
10
|
-
* template-specific fields of its own.
|
|
11
|
-
*/
|
|
12
|
-
export interface CargoManifest1 {
|
|
13
|
-
/** IATA Air Waybill number: 3-digit airline prefix + 8-digit serial, e.g. '020-12345678'. */
|
|
14
|
-
awb_number?: string | null;
|
|
15
|
-
cargo_type: Chrt.CargoTypeEnum1;
|
|
16
|
-
description?: string | null;
|
|
17
|
-
height_inches?: number | null;
|
|
18
|
-
length_inches?: number | null;
|
|
19
|
-
quantity?: number | null;
|
|
20
|
-
schema_version: number;
|
|
21
|
-
stackable?: boolean | null;
|
|
22
|
-
turnable?: boolean | null;
|
|
23
|
-
weight_pounds?: number | null;
|
|
24
|
-
width_inches?: number | null;
|
|
25
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Template used by an order schedule to generate each order occurrence.
|
|
7
|
-
*/
|
|
8
|
-
export interface OrderManifest1 {
|
|
9
|
-
auto_stage?: boolean;
|
|
10
|
-
cargo_manifests?: Chrt.CargoManifest1[];
|
|
11
|
-
/** Must be a string starting with `org_` */
|
|
12
|
-
coordinator_org_id?: string | null;
|
|
13
|
-
/** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
|
|
14
|
-
off_chrt_reference_id?: string | null;
|
|
15
|
-
off_chrt_shipper_org_id?: string | null;
|
|
16
|
-
/** Must be a string starting with `org_` */
|
|
17
|
-
shipper_org_id?: string | null;
|
|
18
|
-
task_group_manifests?: Chrt.TaskGroupManifest1[];
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
export interface OrderManifestValidationRequirements {
|
|
5
|
-
at_least_one_task_has_time_window?: boolean | null;
|
|
6
|
-
cargos_have_valid_lifecycle?: boolean | null;
|
|
7
|
-
order_has_coordinator?: boolean | null;
|
|
8
|
-
order_has_shipper?: boolean | null;
|
|
9
|
-
order_has_task_groups?: boolean | null;
|
|
10
|
-
task_groups_have_valid_task_sequence?: boolean | null;
|
|
11
|
-
task_groups_have_valid_tasks?: boolean | null;
|
|
12
|
-
tasks_have_valid_actions?: boolean | null;
|
|
13
|
-
tasks_have_valid_cargo?: boolean | null;
|
|
14
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.mjs";
|
|
5
|
-
export interface ScheduledOrdersNewDraftReq {
|
|
6
|
-
order_manifest: Chrt.OrderManifest1;
|
|
7
|
-
order_schedule_id: string;
|
|
8
|
-
order_schedule_run_idempotency_key: string;
|
|
9
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Task group template; scheduled orders currently support CHRT ground only.
|
|
7
|
-
*/
|
|
8
|
-
export interface TaskGroupManifest1 {
|
|
9
|
-
driver_id?: string | null;
|
|
10
|
-
/** Must be a string starting with `org_` */
|
|
11
|
-
executor_org_id?: string | null;
|
|
12
|
-
task_group_type: "chrt_ground_provider";
|
|
13
|
-
task_manifests: Chrt.TaskManifest1[];
|
|
14
|
-
vehicle_type?: Chrt.VehicleTypeEnum | null;
|
|
15
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Task template within an order manifest.
|
|
7
|
-
*
|
|
8
|
-
* Inherits the shared task core (TaskCore1) so the physical fields cannot drift
|
|
9
|
-
* from the real task, and adds the template-only fields: relative time windows
|
|
10
|
-
* (resolved against the fire time at build), positional task->cargo references,
|
|
11
|
-
* and the artifact types to create for the task.
|
|
12
|
-
*/
|
|
13
|
-
export interface TaskManifest1 {
|
|
14
|
-
action?: TaskManifest1.Action | null;
|
|
15
|
-
cargo_manifest_indices?: number[];
|
|
16
|
-
directory_entry_ids?: string[];
|
|
17
|
-
geofence_distance_miles?: number;
|
|
18
|
-
location?: Chrt.LocationFeature | null;
|
|
19
|
-
order_placer_comments?: string | null;
|
|
20
|
-
schema_version: number;
|
|
21
|
-
task_artifact_types?: Chrt.TaskArtifactTypeEnum1[];
|
|
22
|
-
time_windows?: Chrt.TimeWindow1[];
|
|
23
|
-
}
|
|
24
|
-
export declare namespace TaskManifest1 {
|
|
25
|
-
type Action = Chrt.ChrtGroundProviderTaskActionEnum1 | Chrt.CargoOnFlightTaskActionEnum1 | Chrt.OnboardCourierTaskActionEnum1;
|
|
26
|
-
}
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/api/types/{OrderManifestValidationRequirements.js → TaskListToApplyToCase1.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/esm/api/types/{OrderManifestValidationRequirements.mjs → TaskListToApplyToCase1.mjs}
RENAMED
|
File without changes
|