@chrt-inc/typescript-sdk 1.749.0 → 1.754.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 (88) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/shipping/resources/flights/client/Client.d.ts +39 -0
  3. package/dist/cjs/api/resources/shipping/resources/flights/client/Client.js +177 -0
  4. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +11 -2
  5. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.js +11 -2
  6. package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.d.ts +11 -2
  7. package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.js +11 -2
  8. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForDriverForExecutorV1Request.d.ts +1 -1
  9. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.ts +1 -1
  10. package/dist/cjs/api/resources/utils/resources/dev/client/Client.d.ts +0 -13
  11. package/dist/cjs/api/resources/utils/resources/dev/client/Client.js +0 -62
  12. package/dist/cjs/api/resources/utils/resources/dev/client/requests/index.d.ts +0 -1
  13. package/dist/cjs/api/types/FlightInfoForTaskRes.d.ts +4 -3
  14. package/dist/cjs/api/types/FlightLeg1.d.ts +30 -0
  15. package/dist/cjs/api/types/FlightLegClientCreate1.d.ts +15 -0
  16. package/dist/cjs/api/types/FlightLegProvenanceEnum1.d.ts +9 -0
  17. package/dist/cjs/api/types/FlightLegProvenanceEnum1.js +11 -0
  18. package/dist/cjs/api/types/FlightLegStatusEnum1.d.ts +14 -0
  19. package/dist/cjs/api/types/FlightLegStatusEnum1.js +16 -0
  20. package/dist/cjs/api/types/FlightLegStatusSourceEnum1.d.ts +8 -0
  21. package/dist/cjs/api/types/FlightLegStatusSourceEnum1.js +10 -0
  22. package/dist/cjs/api/types/FlightLegWebhookInfo.d.ts +20 -0
  23. package/dist/cjs/api/types/FlightTrackPosition.d.ts +14 -0
  24. package/dist/cjs/api/types/FlightTrackPosition.js +5 -0
  25. package/dist/cjs/api/types/FlightTrackRes.d.ts +21 -0
  26. package/dist/cjs/api/types/FlightTrackRes.js +5 -0
  27. package/dist/cjs/api/types/FlightTrackWaypoint.d.ts +10 -0
  28. package/dist/cjs/api/types/FlightTrackWaypoint.js +5 -0
  29. package/dist/cjs/api/types/OrderSchedule1.d.ts +1 -0
  30. package/dist/cjs/api/types/OrderScheduleAboutRes.d.ts +1 -0
  31. package/dist/cjs/api/types/SetFlightInfoReq.d.ts +3 -4
  32. package/dist/cjs/api/types/ShippingTaskGroupFlightInfoUpdatedWebhookPayload.d.ts +3 -4
  33. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -2
  34. package/dist/cjs/api/types/index.d.ts +9 -2
  35. package/dist/cjs/api/types/index.js +9 -2
  36. package/dist/cjs/version.d.ts +1 -1
  37. package/dist/cjs/version.js +1 -1
  38. package/dist/esm/Client.mjs +2 -2
  39. package/dist/esm/api/resources/shipping/resources/flights/client/Client.d.mts +39 -0
  40. package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +177 -0
  41. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +11 -2
  42. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.mjs +11 -2
  43. package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.d.mts +11 -2
  44. package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.mjs +11 -2
  45. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForDriverForExecutorV1Request.d.mts +1 -1
  46. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.mts +1 -1
  47. package/dist/esm/api/resources/utils/resources/dev/client/Client.d.mts +0 -13
  48. package/dist/esm/api/resources/utils/resources/dev/client/Client.mjs +0 -62
  49. package/dist/esm/api/resources/utils/resources/dev/client/requests/index.d.mts +0 -1
  50. package/dist/esm/api/types/FlightInfoForTaskRes.d.mts +4 -3
  51. package/dist/esm/api/types/FlightLeg1.d.mts +30 -0
  52. package/dist/esm/api/types/FlightLegClientCreate1.d.mts +15 -0
  53. package/dist/esm/api/types/FlightLegProvenanceEnum1.d.mts +9 -0
  54. package/dist/esm/api/types/FlightLegProvenanceEnum1.mjs +8 -0
  55. package/dist/esm/api/types/FlightLegStatusEnum1.d.mts +14 -0
  56. package/dist/esm/api/types/FlightLegStatusEnum1.mjs +13 -0
  57. package/dist/esm/api/types/FlightLegStatusSourceEnum1.d.mts +8 -0
  58. package/dist/esm/api/types/FlightLegStatusSourceEnum1.mjs +7 -0
  59. package/dist/esm/api/types/FlightLegWebhookInfo.d.mts +20 -0
  60. package/dist/esm/api/types/FlightTrackPosition.d.mts +14 -0
  61. package/dist/esm/api/types/FlightTrackPosition.mjs +4 -0
  62. package/dist/esm/api/types/FlightTrackRes.d.mts +21 -0
  63. package/dist/esm/api/types/FlightTrackRes.mjs +4 -0
  64. package/dist/esm/api/types/FlightTrackWaypoint.d.mts +10 -0
  65. package/dist/esm/api/types/FlightTrackWaypoint.mjs +4 -0
  66. package/dist/esm/api/types/OrderSchedule1.d.mts +1 -0
  67. package/dist/esm/api/types/OrderScheduleAboutRes.d.mts +1 -0
  68. package/dist/esm/api/types/SetFlightInfoReq.d.mts +3 -4
  69. package/dist/esm/api/types/ShippingTaskGroupFlightInfoUpdatedWebhookPayload.d.mts +3 -4
  70. package/dist/esm/api/types/TaskGroup1.d.mts +1 -2
  71. package/dist/esm/api/types/index.d.mts +9 -2
  72. package/dist/esm/api/types/index.mjs +9 -2
  73. package/dist/esm/version.d.mts +1 -1
  74. package/dist/esm/version.mjs +1 -1
  75. package/package.json +1 -1
  76. package/reference.md +215 -67
  77. package/dist/cjs/api/resources/utils/resources/dev/client/requests/ScheduledPingReq.d.ts +0 -13
  78. package/dist/cjs/api/types/ScheduleSpec.d.ts +0 -14
  79. package/dist/cjs/api/types/ScheduledPingRes.d.ts +0 -16
  80. package/dist/esm/api/resources/utils/resources/dev/client/requests/ScheduledPingReq.d.mts +0 -13
  81. package/dist/esm/api/types/ScheduleSpec.d.mts +0 -14
  82. package/dist/esm/api/types/ScheduledPingRes.d.mts +0 -16
  83. /package/dist/cjs/api/{resources/utils/resources/dev/client/requests/ScheduledPingReq.js → types/FlightLeg1.js} +0 -0
  84. /package/dist/cjs/api/types/{ScheduleSpec.js → FlightLegClientCreate1.js} +0 -0
  85. /package/dist/cjs/api/types/{ScheduledPingRes.js → FlightLegWebhookInfo.js} +0 -0
  86. /package/dist/esm/api/{resources/utils/resources/dev/client/requests/ScheduledPingReq.mjs → types/FlightLeg1.mjs} +0 -0
  87. /package/dist/esm/api/types/{ScheduleSpec.mjs → FlightLegClientCreate1.mjs} +0 -0
  88. /package/dist/esm/api/types/{ScheduledPingRes.mjs → FlightLegWebhookInfo.mjs} +0 -0
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ /**
6
+ * Positional track for a flight leg: live trail + (optional) planned path.
7
+ *
8
+ * `positions` is the flown breadcrumb trail (present once airborne);
9
+ * `waypoints` / `legacy_route` are the planned path (present once Cirium has
10
+ * the filed flight plan, ~24h before departure). Everything is empty when the
11
+ * leg has no resolvable Cirium `flightId` or Cirium has no track yet — the
12
+ * endpoint never errors on a missing track (fail-soft, like the status route).
13
+ */
14
+ export interface FlightTrackRes {
15
+ cirium_flight_id?: number | null;
16
+ positions?: Chrt.FlightTrackPosition[];
17
+ waypoints?: Chrt.FlightTrackWaypoint[];
18
+ legacy_route?: string | null;
19
+ bearing?: number | null;
20
+ heading?: number | null;
21
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * A lat/lon point on the published flight plan (the planned path).
6
+ */
7
+ export interface FlightTrackWaypoint {
8
+ lat?: number | null;
9
+ lon?: number | null;
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,6 +9,7 @@ export interface OrderSchedule1 {
9
9
  order_manifest?: Chrt.OrderManifest1 | null;
10
10
  schedule_spec?: Chrt.OrderScheduleSpec1 | null;
11
11
  _id: string;
12
+ short_id: string;
12
13
  /** Must be a string starting with `user_` */
13
14
  owned_by_user_id: string;
14
15
  /** Must be a string starting with `org_` */
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Chrt from "../index.js";
5
5
  export interface OrderScheduleAboutRes {
6
+ short_id: string;
6
7
  orders_created_count: number;
7
8
  orchestrator_schedule_status: Chrt.OrderScheduleOrchestratorScheduleStatus;
8
9
  }
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Chrt from "../index.js";
4
5
  export interface SetFlightInfoReq {
5
- /** Flight number to set on the task group */
6
- flight_number?: string | null;
7
- /** Flight Aware's uuid for flights */
8
- fa_flight_ids?: string[] | null;
6
+ /** Ordered list of flight legs for the task group. Replaces any existing flight legs. Pass an empty list to clear all flight legs. */
7
+ flight_legs: Chrt.FlightLegClientCreate1[];
9
8
  }
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Chrt from "../index.js";
4
5
  export interface ShippingTaskGroupFlightInfoUpdatedWebhookPayload {
5
6
  event_type?: "shipping.task_group.flight_info_updated";
6
7
  /** UTC timestamp when the event occurred */
@@ -9,8 +10,6 @@ export interface ShippingTaskGroupFlightInfoUpdatedWebhookPayload {
9
10
  order_id: string;
10
11
  /** The task group whose flight info was updated */
11
12
  task_group_id: string;
12
- /** The flight number (if set) */
13
- flight_number?: string | null;
14
- /** FlightAware flight UUIDs associated with this task group */
15
- fa_flight_ids: string[];
13
+ /** The task group's ordered flight legs */
14
+ flight_legs: Chrt.FlightLegWebhookInfo[];
16
15
  }
@@ -39,8 +39,7 @@ export interface TaskGroup1 {
39
39
  mileage_observed?: number | null;
40
40
  wait_time_total_minutes?: number | null;
41
41
  mileage_asserted?: boolean;
42
- flight_number?: string | null;
43
- fa_flight_ids?: string[];
42
+ flight_leg_ids?: string[];
44
43
  messages?: Chrt.TaskGroupMessage1[];
45
44
  shipper_pay_provider_rate_sheet_id?: string | null;
46
45
  shipper_pay_provider_line_item_group_id?: string | null;
@@ -148,7 +148,16 @@ export * from "./FlightAwareAlertFlight.js";
148
148
  export * from "./FlightAwareAlertPayload.js";
149
149
  export * from "./FlightAwareWebhookResponse.js";
150
150
  export * from "./FlightInfoForTaskRes.js";
151
+ export * from "./FlightLeg1.js";
152
+ export * from "./FlightLegClientCreate1.js";
153
+ export * from "./FlightLegProvenanceEnum1.js";
154
+ export * from "./FlightLegStatusEnum1.js";
155
+ export * from "./FlightLegStatusSourceEnum1.js";
156
+ export * from "./FlightLegWebhookInfo.js";
151
157
  export * from "./FlightStatusEnum.js";
158
+ export * from "./FlightTrackPosition.js";
159
+ export * from "./FlightTrackRes.js";
160
+ export * from "./FlightTrackWaypoint.js";
152
161
  export * from "./GeometryCollectionGeometriesItem.js";
153
162
  export * from "./GeometryCollection.js";
154
163
  export * from "./HttpValidationError.js";
@@ -294,9 +303,7 @@ export * from "./ScanPayloadKindEnum.js";
294
303
  export * from "./ScheduleCalendarSpec.js";
295
304
  export * from "./ScheduleIntervalSpec.js";
296
305
  export * from "./ScheduleRange.js";
297
- export * from "./ScheduleSpec.js";
298
306
  export * from "./ScheduledOrdersNewDraftReq.js";
299
- export * from "./ScheduledPingRes.js";
300
307
  export * from "./Session1.js";
301
308
  export * from "./SessionByDeviceDataPoint1.js";
302
309
  export * from "./SessionByDeviceDataPointMetadata1.js";
@@ -164,7 +164,16 @@ __exportStar(require("./FlightAwareAlertFlight.js"), exports);
164
164
  __exportStar(require("./FlightAwareAlertPayload.js"), exports);
165
165
  __exportStar(require("./FlightAwareWebhookResponse.js"), exports);
166
166
  __exportStar(require("./FlightInfoForTaskRes.js"), exports);
167
+ __exportStar(require("./FlightLeg1.js"), exports);
168
+ __exportStar(require("./FlightLegClientCreate1.js"), exports);
169
+ __exportStar(require("./FlightLegProvenanceEnum1.js"), exports);
170
+ __exportStar(require("./FlightLegStatusEnum1.js"), exports);
171
+ __exportStar(require("./FlightLegStatusSourceEnum1.js"), exports);
172
+ __exportStar(require("./FlightLegWebhookInfo.js"), exports);
167
173
  __exportStar(require("./FlightStatusEnum.js"), exports);
174
+ __exportStar(require("./FlightTrackPosition.js"), exports);
175
+ __exportStar(require("./FlightTrackRes.js"), exports);
176
+ __exportStar(require("./FlightTrackWaypoint.js"), exports);
168
177
  __exportStar(require("./GeometryCollectionGeometriesItem.js"), exports);
169
178
  __exportStar(require("./GeometryCollection.js"), exports);
170
179
  __exportStar(require("./HttpValidationError.js"), exports);
@@ -310,9 +319,7 @@ __exportStar(require("./ScanPayloadKindEnum.js"), exports);
310
319
  __exportStar(require("./ScheduleCalendarSpec.js"), exports);
311
320
  __exportStar(require("./ScheduleIntervalSpec.js"), exports);
312
321
  __exportStar(require("./ScheduleRange.js"), exports);
313
- __exportStar(require("./ScheduleSpec.js"), exports);
314
322
  __exportStar(require("./ScheduledOrdersNewDraftReq.js"), exports);
315
- __exportStar(require("./ScheduledPingRes.js"), exports);
316
323
  __exportStar(require("./Session1.js"), exports);
317
324
  __exportStar(require("./SessionByDeviceDataPoint1.js"), exports);
318
325
  __exportStar(require("./SessionByDeviceDataPointMetadata1.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.749.0";
1
+ export declare const SDK_VERSION = "1.754.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.749.0";
4
+ exports.SDK_VERSION = "1.754.0";
@@ -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.749.0",
24
- "User-Agent": "@chrt-inc/typescript-sdk/1.749.0",
23
+ "X-Fern-SDK-Version": "1.754.0",
24
+ "User-Agent": "@chrt-inc/typescript-sdk/1.754.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) });
@@ -43,5 +43,44 @@ export declare class Flights {
43
43
  */
44
44
  getFlightInfoForTaskV1(taskId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightInfoForTaskRes>;
45
45
  private __getFlightInfoForTaskV1;
46
+ /**
47
+ * Returns the ordered list of flight legs for a task group. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightInfoForTaskRes)
48
+ *
49
+ * @param {string} taskGroupId
50
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
51
+ *
52
+ * @throws {@link Chrt.UnprocessableEntityError}
53
+ *
54
+ * @example
55
+ * await client.shipping.flights.getFlightLegsForTaskGroupV1("task_group_id")
56
+ */
57
+ getFlightLegsForTaskGroupV1(taskGroupId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightInfoForTaskRes>;
58
+ private __getFlightLegsForTaskGroupV1;
59
+ /**
60
+ * Returns the flight leg with its Cirium-sourced status, lazily resolving the Cirium flightId and refreshing the cached status on read. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightLeg1)
61
+ *
62
+ * @param {string} flightLegId
63
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link Chrt.UnprocessableEntityError}
66
+ *
67
+ * @example
68
+ * await client.shipping.flights.getFlightStatusForFlightLegV1("flight_leg_id")
69
+ */
70
+ getFlightStatusForFlightLegV1(flightLegId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightLeg1>;
71
+ private __getFlightStatusForFlightLegV1;
72
+ /**
73
+ * Returns the Cirium-sourced positional track for a flight leg — the live breadcrumb trail plus the planned path (waypoints + legacy route) in one read-through call. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightTrackRes)
74
+ *
75
+ * @param {string} flightLegId
76
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
77
+ *
78
+ * @throws {@link Chrt.UnprocessableEntityError}
79
+ *
80
+ * @example
81
+ * await client.shipping.flights.getFlightTrackForFlightLegV1("flight_leg_id")
82
+ */
83
+ getFlightTrackForFlightLegV1(flightLegId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightTrackRes>;
84
+ private __getFlightTrackForFlightLegV1;
46
85
  protected _getAuthorizationHeader(): Promise<string | undefined>;
47
86
  }
@@ -78,6 +78,183 @@ export class Flights {
78
78
  }
79
79
  });
80
80
  }
81
+ /**
82
+ * Returns the ordered list of flight legs for a task group. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightInfoForTaskRes)
83
+ *
84
+ * @param {string} taskGroupId
85
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
86
+ *
87
+ * @throws {@link Chrt.UnprocessableEntityError}
88
+ *
89
+ * @example
90
+ * await client.shipping.flights.getFlightLegsForTaskGroupV1("task_group_id")
91
+ */
92
+ getFlightLegsForTaskGroupV1(taskGroupId, requestOptions) {
93
+ return core.HttpResponsePromise.fromPromise(this.__getFlightLegsForTaskGroupV1(taskGroupId, requestOptions));
94
+ }
95
+ __getFlightLegsForTaskGroupV1(taskGroupId, requestOptions) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ var _a, _b, _c, _d;
98
+ 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);
99
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
100
+ 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/flights/for_task_group/v1/${encodeURIComponent(taskGroupId)}`),
101
+ method: "GET",
102
+ headers: _headers,
103
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
104
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
105
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
106
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
107
+ });
108
+ if (_response.ok) {
109
+ return { data: _response.body, rawResponse: _response.rawResponse };
110
+ }
111
+ if (_response.error.reason === "status-code") {
112
+ switch (_response.error.statusCode) {
113
+ case 422:
114
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
115
+ default:
116
+ throw new errors.ChrtError({
117
+ statusCode: _response.error.statusCode,
118
+ body: _response.error.body,
119
+ rawResponse: _response.rawResponse,
120
+ });
121
+ }
122
+ }
123
+ switch (_response.error.reason) {
124
+ case "non-json":
125
+ throw new errors.ChrtError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.rawBody,
128
+ rawResponse: _response.rawResponse,
129
+ });
130
+ case "timeout":
131
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/flights/for_task_group/v1/{task_group_id}.");
132
+ case "unknown":
133
+ throw new errors.ChrtError({
134
+ message: _response.error.errorMessage,
135
+ rawResponse: _response.rawResponse,
136
+ });
137
+ }
138
+ });
139
+ }
140
+ /**
141
+ * Returns the flight leg with its Cirium-sourced status, lazily resolving the Cirium flightId and refreshing the cached status on read. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightLeg1)
142
+ *
143
+ * @param {string} flightLegId
144
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
145
+ *
146
+ * @throws {@link Chrt.UnprocessableEntityError}
147
+ *
148
+ * @example
149
+ * await client.shipping.flights.getFlightStatusForFlightLegV1("flight_leg_id")
150
+ */
151
+ getFlightStatusForFlightLegV1(flightLegId, requestOptions) {
152
+ return core.HttpResponsePromise.fromPromise(this.__getFlightStatusForFlightLegV1(flightLegId, requestOptions));
153
+ }
154
+ __getFlightStatusForFlightLegV1(flightLegId, requestOptions) {
155
+ return __awaiter(this, void 0, void 0, function* () {
156
+ var _a, _b, _c, _d;
157
+ 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);
158
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
159
+ 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/flights/status/for_flight_leg/v1/${encodeURIComponent(flightLegId)}`),
160
+ method: "GET",
161
+ headers: _headers,
162
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
163
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
164
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
165
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
166
+ });
167
+ if (_response.ok) {
168
+ return { data: _response.body, rawResponse: _response.rawResponse };
169
+ }
170
+ if (_response.error.reason === "status-code") {
171
+ switch (_response.error.statusCode) {
172
+ case 422:
173
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
174
+ default:
175
+ throw new errors.ChrtError({
176
+ statusCode: _response.error.statusCode,
177
+ body: _response.error.body,
178
+ rawResponse: _response.rawResponse,
179
+ });
180
+ }
181
+ }
182
+ switch (_response.error.reason) {
183
+ case "non-json":
184
+ throw new errors.ChrtError({
185
+ statusCode: _response.error.statusCode,
186
+ body: _response.error.rawBody,
187
+ rawResponse: _response.rawResponse,
188
+ });
189
+ case "timeout":
190
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/flights/status/for_flight_leg/v1/{flight_leg_id}.");
191
+ case "unknown":
192
+ throw new errors.ChrtError({
193
+ message: _response.error.errorMessage,
194
+ rawResponse: _response.rawResponse,
195
+ });
196
+ }
197
+ });
198
+ }
199
+ /**
200
+ * Returns the Cirium-sourced positional track for a flight leg — the live breadcrumb trail plus the planned path (waypoints + legacy route) in one read-through call. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightTrackRes)
201
+ *
202
+ * @param {string} flightLegId
203
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
204
+ *
205
+ * @throws {@link Chrt.UnprocessableEntityError}
206
+ *
207
+ * @example
208
+ * await client.shipping.flights.getFlightTrackForFlightLegV1("flight_leg_id")
209
+ */
210
+ getFlightTrackForFlightLegV1(flightLegId, requestOptions) {
211
+ return core.HttpResponsePromise.fromPromise(this.__getFlightTrackForFlightLegV1(flightLegId, requestOptions));
212
+ }
213
+ __getFlightTrackForFlightLegV1(flightLegId, requestOptions) {
214
+ return __awaiter(this, void 0, void 0, function* () {
215
+ var _a, _b, _c, _d;
216
+ 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);
217
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
218
+ 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/flights/track/for_flight_leg/v1/${encodeURIComponent(flightLegId)}`),
219
+ method: "GET",
220
+ headers: _headers,
221
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
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 GET /shipping/flights/track/for_flight_leg/v1/{flight_leg_id}.");
250
+ case "unknown":
251
+ throw new errors.ChrtError({
252
+ message: _response.error.errorMessage,
253
+ rawResponse: _response.rawResponse,
254
+ });
255
+ }
256
+ });
257
+ }
81
258
  _getAuthorizationHeader() {
82
259
  return __awaiter(this, void 0, void 0, function* () {
83
260
  const bearer = yield core.Supplier.get(this._options.token);
@@ -47,7 +47,7 @@ export declare class TaskGroup {
47
47
  addV1(request: Chrt.shipping.orderDrafts.OrderDraftAddTaskGroupReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<string>;
48
48
  private __addV1;
49
49
  /**
50
- * Sets the flight number and/or fa_flight_ids on a draft task group. | (SetFlightInfoReq) -> (bool)
50
+ * Replaces the ordered list of flights on a draft task group. | (SetFlightInfoReq) -> (bool)
51
51
  *
52
52
  * @param {string} taskGroupId
53
53
  * @param {Chrt.SetFlightInfoReq} request
@@ -56,7 +56,16 @@ export declare class TaskGroup {
56
56
  * @throws {@link Chrt.UnprocessableEntityError}
57
57
  *
58
58
  * @example
59
- * await client.shipping.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {})
59
+ * await client.shipping.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {
60
+ * flight_legs: [{
61
+ * schema_version: 1,
62
+ * flight_number: "flight_number",
63
+ * provenance: "manual",
64
+ * origin_iata: "origin_iata",
65
+ * destination_iata: "destination_iata",
66
+ * scheduled_departure_utc: "2024-01-15T09:30:00Z"
67
+ * }]
68
+ * })
60
69
  */
61
70
  setFlightInfoV1(taskGroupId: string, request: Chrt.SetFlightInfoReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
62
71
  private __setFlightInfoV1;
@@ -85,7 +85,7 @@ export class TaskGroup {
85
85
  });
86
86
  }
87
87
  /**
88
- * Sets the flight number and/or fa_flight_ids on a draft task group. | (SetFlightInfoReq) -> (bool)
88
+ * Replaces the ordered list of flights on a draft task group. | (SetFlightInfoReq) -> (bool)
89
89
  *
90
90
  * @param {string} taskGroupId
91
91
  * @param {Chrt.SetFlightInfoReq} request
@@ -94,7 +94,16 @@ export class TaskGroup {
94
94
  * @throws {@link Chrt.UnprocessableEntityError}
95
95
  *
96
96
  * @example
97
- * await client.shipping.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {})
97
+ * await client.shipping.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {
98
+ * flight_legs: [{
99
+ * schema_version: 1,
100
+ * flight_number: "flight_number",
101
+ * provenance: "manual",
102
+ * origin_iata: "origin_iata",
103
+ * destination_iata: "destination_iata",
104
+ * scheduled_departure_utc: "2024-01-15T09:30:00Z"
105
+ * }]
106
+ * })
98
107
  */
99
108
  setFlightInfoV1(taskGroupId, request, requestOptions) {
100
109
  return core.HttpResponsePromise.fromPromise(this.__setFlightInfoV1(taskGroupId, request, requestOptions));
@@ -141,7 +141,7 @@ export declare class TaskGroups {
141
141
  removeExecutorV1(taskGroupId: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
142
142
  private __removeExecutorV1;
143
143
  /**
144
- * Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
144
+ * Replaces the ordered list of flights on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
145
145
  *
146
146
  * @param {string} taskGroupId
147
147
  * @param {Chrt.SetFlightInfoReq} request
@@ -150,7 +150,16 @@ export declare class TaskGroups {
150
150
  * @throws {@link Chrt.UnprocessableEntityError}
151
151
  *
152
152
  * @example
153
- * await client.shipping.taskGroups.setFlightInfoV1("task_group_id", {})
153
+ * await client.shipping.taskGroups.setFlightInfoV1("task_group_id", {
154
+ * flight_legs: [{
155
+ * schema_version: 1,
156
+ * flight_number: "flight_number",
157
+ * provenance: "manual",
158
+ * origin_iata: "origin_iata",
159
+ * destination_iata: "destination_iata",
160
+ * scheduled_departure_utc: "2024-01-15T09:30:00Z"
161
+ * }]
162
+ * })
154
163
  */
155
164
  setFlightInfoV1(taskGroupId: string, request: Chrt.SetFlightInfoReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
156
165
  private __setFlightInfoV1;
@@ -473,7 +473,7 @@ export class TaskGroups {
473
473
  });
474
474
  }
475
475
  /**
476
- * Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
476
+ * Replaces the ordered list of flights on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
477
477
  *
478
478
  * @param {string} taskGroupId
479
479
  * @param {Chrt.SetFlightInfoReq} request
@@ -482,7 +482,16 @@ export class TaskGroups {
482
482
  * @throws {@link Chrt.UnprocessableEntityError}
483
483
  *
484
484
  * @example
485
- * await client.shipping.taskGroups.setFlightInfoV1("task_group_id", {})
485
+ * await client.shipping.taskGroups.setFlightInfoV1("task_group_id", {
486
+ * flight_legs: [{
487
+ * schema_version: 1,
488
+ * flight_number: "flight_number",
489
+ * provenance: "manual",
490
+ * origin_iata: "origin_iata",
491
+ * destination_iata: "destination_iata",
492
+ * scheduled_departure_utc: "2024-01-15T09:30:00Z"
493
+ * }]
494
+ * })
486
495
  */
487
496
  setFlightInfoV1(taskGroupId, request, requestOptions) {
488
497
  return core.HttpResponsePromise.fromPromise(this.__setFlightInfoV1(taskGroupId, request, requestOptions));
@@ -36,7 +36,7 @@ export interface ExpandedListForDriverForExecutorV1Request {
36
36
  sort_order?: Chrt.SortOrderEnum | null;
37
37
  page?: number | null;
38
38
  page_size?: number | null;
39
- /** Full-text search query (searches order_short_id, order_off_chrt_reference_id, flight_number) */
39
+ /** Full-text search query (searches order_short_id, order_off_chrt_reference_id) */
40
40
  search?: string | null;
41
41
  filter_status?: (Chrt.TaskGroupStatusEnum1 | null) | (Chrt.TaskGroupStatusEnum1 | null)[];
42
42
  filter_draft_started_at_timestamp_lte?: string | null;
@@ -37,7 +37,7 @@ export interface ExpandedListForExecutorOperatorsV1Request {
37
37
  sort_order?: Chrt.SortOrderEnum | null;
38
38
  page?: number | null;
39
39
  page_size?: number | null;
40
- /** Full-text search query (searches order_short_id, order_off_chrt_reference_id, flight_number) */
40
+ /** Full-text search query (searches order_short_id, order_off_chrt_reference_id) */
41
41
  search?: string | null;
42
42
  filter_status?: (Chrt.TaskGroupStatusEnum1 | null) | (Chrt.TaskGroupStatusEnum1 | null)[];
43
43
  filter_draft_started_at_timestamp_lte?: string | null;
@@ -30,19 +30,6 @@ export declare namespace Dev {
30
30
  export declare class Dev {
31
31
  protected readonly _options: Dev.Options;
32
32
  constructor(_options?: Dev.Options);
33
- /**
34
- * Creates or updates a Temporal Schedule that runs the scheduled ping workflow for developer diagnostics. | authz: min_org_role=administrator | (ScheduledPingReq) -> (ScheduledPingRes)
35
- *
36
- * @param {Chrt.utils.ScheduledPingReq} request
37
- * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
38
- *
39
- * @throws {@link Chrt.UnprocessableEntityError}
40
- *
41
- * @example
42
- * await client.utils.dev.postAgentPingScheduleV1()
43
- */
44
- postAgentPingScheduleV1(request?: Chrt.utils.ScheduledPingReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.ScheduledPingRes>;
45
- private __postAgentPingScheduleV1;
46
33
  /**
47
34
  * Runs a minimal Temporal workflow that sends a prompt to OpenAI and returns the response. | (PingOpenAIReq) -> (PingOpenAIRes)
48
35
  *