@chrt-inc/typescript-sdk 1.858.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.
Files changed (92) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts +4 -0
  3. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/OrderDraftAddCargoReq.d.ts +0 -1
  4. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/task/client/requests/OrderDraftAddTaskReqV1.d.ts +0 -1
  5. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.ts +0 -1
  6. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.ts +0 -1
  7. package/dist/cjs/api/resources/shipping/resources/orderSchedules/client/Client.d.ts +0 -3
  8. package/dist/cjs/api/resources/shipping/resources/orderSchedules/client/Client.js +0 -5
  9. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/OrderScheduleClientCreate1.d.ts +2 -1
  10. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/OrderScheduleClientUpdate1.d.ts +2 -1
  11. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/index.d.ts +0 -1
  12. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/index.js +1 -2
  13. package/dist/cjs/api/types/Cargo1.d.ts +0 -1
  14. package/dist/cjs/api/types/OrderSchedule1.d.ts +2 -1
  15. package/dist/cjs/api/types/OrderScheduleBuildSeedRes.d.ts +10 -0
  16. package/dist/cjs/api/types/OrderTemplateReferencesExpanded1.d.ts +12 -0
  17. package/dist/cjs/api/types/Task1.d.ts +0 -1
  18. package/dist/cjs/api/types/TaskArtifact1.d.ts +0 -1
  19. package/dist/cjs/api/types/TaskGroup1.d.ts +0 -1
  20. package/dist/cjs/api/types/index.d.ts +2 -8
  21. package/dist/cjs/api/types/index.js +2 -8
  22. package/dist/cjs/version.d.ts +1 -1
  23. package/dist/cjs/version.js +1 -1
  24. package/dist/esm/Client.mjs +2 -2
  25. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.mts +4 -0
  26. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/OrderDraftAddCargoReq.d.mts +0 -1
  27. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/task/client/requests/OrderDraftAddTaskReqV1.d.mts +0 -1
  28. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.mts +0 -1
  29. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.mts +0 -1
  30. package/dist/esm/api/resources/shipping/resources/orderSchedules/client/Client.d.mts +0 -3
  31. package/dist/esm/api/resources/shipping/resources/orderSchedules/client/Client.mjs +0 -5
  32. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/OrderScheduleClientCreate1.d.mts +2 -1
  33. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/OrderScheduleClientUpdate1.d.mts +2 -1
  34. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/index.d.mts +0 -1
  35. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/index.mjs +0 -1
  36. package/dist/esm/api/types/Cargo1.d.mts +0 -1
  37. package/dist/esm/api/types/OrderSchedule1.d.mts +2 -1
  38. package/dist/esm/api/types/OrderScheduleBuildSeedRes.d.mts +10 -0
  39. package/dist/esm/api/types/OrderTemplateReferencesExpanded1.d.mts +12 -0
  40. package/dist/esm/api/types/Task1.d.mts +0 -1
  41. package/dist/esm/api/types/TaskArtifact1.d.mts +0 -1
  42. package/dist/esm/api/types/TaskGroup1.d.mts +0 -1
  43. package/dist/esm/api/types/index.d.mts +2 -8
  44. package/dist/esm/api/types/index.mjs +2 -8
  45. package/dist/esm/version.d.mts +1 -1
  46. package/dist/esm/version.mjs +1 -1
  47. package/package.json +1 -1
  48. package/reference.md +0 -65
  49. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/Client.d.ts +0 -47
  50. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/Client.js +0 -130
  51. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/index.d.ts +0 -1
  52. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/index.js +0 -2
  53. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/index.d.ts +0 -1
  54. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/orderManifest/index.js +0 -17
  55. package/dist/cjs/api/types/CargoManifest1.d.ts +0 -25
  56. package/dist/cjs/api/types/OrderManifest1.d.ts +0 -19
  57. package/dist/cjs/api/types/OrderManifestValidationRequirements.d.ts +0 -14
  58. package/dist/cjs/api/types/OrderManifestValidationRequirements.js +0 -5
  59. package/dist/cjs/api/types/OrderManifestValidationResult.d.ts +0 -8
  60. package/dist/cjs/api/types/OrderManifestValidationResult.js +0 -5
  61. package/dist/cjs/api/types/ScheduledOrdersNewDraftReq.d.ts +0 -9
  62. package/dist/cjs/api/types/ScheduledOrdersNewDraftReq.js +0 -5
  63. package/dist/cjs/api/types/TaskGroupManifest1.d.ts +0 -15
  64. package/dist/cjs/api/types/TaskGroupManifest1.js +0 -5
  65. package/dist/cjs/api/types/TaskManifest1.d.ts +0 -26
  66. package/dist/cjs/api/types/TaskManifest1.js +0 -5
  67. package/dist/cjs/api/types/TimeWindow1.d.ts +0 -7
  68. package/dist/cjs/api/types/TimeWindow1.js +0 -5
  69. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/Client.d.mts +0 -47
  70. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/Client.mjs +0 -93
  71. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/index.d.mts +0 -1
  72. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/client/index.mjs +0 -1
  73. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/index.d.mts +0 -1
  74. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/orderManifest/index.mjs +0 -1
  75. package/dist/esm/api/types/CargoManifest1.d.mts +0 -25
  76. package/dist/esm/api/types/OrderManifest1.d.mts +0 -19
  77. package/dist/esm/api/types/OrderManifestValidationRequirements.d.mts +0 -14
  78. package/dist/esm/api/types/OrderManifestValidationRequirements.mjs +0 -4
  79. package/dist/esm/api/types/OrderManifestValidationResult.d.mts +0 -8
  80. package/dist/esm/api/types/OrderManifestValidationResult.mjs +0 -4
  81. package/dist/esm/api/types/ScheduledOrdersNewDraftReq.d.mts +0 -9
  82. package/dist/esm/api/types/ScheduledOrdersNewDraftReq.mjs +0 -4
  83. package/dist/esm/api/types/TaskGroupManifest1.d.mts +0 -15
  84. package/dist/esm/api/types/TaskGroupManifest1.mjs +0 -4
  85. package/dist/esm/api/types/TaskManifest1.d.mts +0 -26
  86. package/dist/esm/api/types/TaskManifest1.mjs +0 -4
  87. package/dist/esm/api/types/TimeWindow1.d.mts +0 -7
  88. package/dist/esm/api/types/TimeWindow1.mjs +0 -4
  89. /package/dist/cjs/api/types/{CargoManifest1.js → OrderScheduleBuildSeedRes.js} +0 -0
  90. /package/dist/cjs/api/types/{OrderManifest1.js → OrderTemplateReferencesExpanded1.js} +0 -0
  91. /package/dist/esm/api/types/{CargoManifest1.mjs → OrderScheduleBuildSeedRes.mjs} +0 -0
  92. /package/dist/esm/api/types/{OrderManifest1.mjs → OrderTemplateReferencesExpanded1.mjs} +0 -0
@@ -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 * 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,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,8 +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 OrderManifestValidationResult {
6
- is_valid: boolean;
7
- requirements: Chrt.OrderManifestValidationRequirements;
8
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -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,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -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,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -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
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface TimeWindow1 {
5
- left_boundary_time?: string | null;
6
- right_boundary_time?: string | null;
7
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};