@chrt-inc/typescript-sdk 1.751.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.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.js +118 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +4 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.js +4 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.d.ts +4 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.js +4 -1
- package/dist/cjs/api/types/FlightLeg1.d.ts +15 -4
- package/dist/cjs/api/types/FlightLegClientCreate1.d.ts +3 -4
- package/dist/cjs/api/types/FlightLegStatusEnum1.d.ts +14 -0
- package/dist/cjs/api/types/FlightLegStatusEnum1.js +16 -0
- package/dist/cjs/api/types/FlightLegStatusSourceEnum1.d.ts +8 -0
- package/dist/cjs/api/types/FlightLegStatusSourceEnum1.js +10 -0
- package/dist/cjs/api/types/FlightLegWebhookInfo.d.ts +0 -2
- package/dist/cjs/api/types/FlightTrackPosition.d.ts +14 -0
- package/dist/cjs/api/types/FlightTrackPosition.js +5 -0
- package/dist/cjs/api/types/FlightTrackRes.d.ts +21 -0
- package/dist/cjs/api/types/FlightTrackRes.js +5 -0
- package/dist/cjs/api/types/FlightTrackWaypoint.d.ts +10 -0
- package/dist/cjs/api/types/FlightTrackWaypoint.js +5 -0
- package/dist/cjs/api/types/index.d.ts +5 -0
- package/dist/cjs/api/types/index.js +5 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/shipping/resources/flights/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +118 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +4 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.mjs +4 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.d.mts +4 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.mjs +4 -1
- package/dist/esm/api/types/FlightLeg1.d.mts +15 -4
- package/dist/esm/api/types/FlightLegClientCreate1.d.mts +3 -4
- package/dist/esm/api/types/FlightLegStatusEnum1.d.mts +14 -0
- package/dist/esm/api/types/FlightLegStatusEnum1.mjs +13 -0
- package/dist/esm/api/types/FlightLegStatusSourceEnum1.d.mts +8 -0
- package/dist/esm/api/types/FlightLegStatusSourceEnum1.mjs +7 -0
- package/dist/esm/api/types/FlightLegWebhookInfo.d.mts +0 -2
- package/dist/esm/api/types/FlightTrackPosition.d.mts +14 -0
- package/dist/esm/api/types/FlightTrackPosition.mjs +4 -0
- package/dist/esm/api/types/FlightTrackRes.d.mts +21 -0
- package/dist/esm/api/types/FlightTrackRes.mjs +4 -0
- package/dist/esm/api/types/FlightTrackWaypoint.d.mts +10 -0
- package/dist/esm/api/types/FlightTrackWaypoint.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +5 -0
- package/dist/esm/api/types/index.mjs +5 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +132 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -56,8 +56,8 @@ class ChrtClient {
|
|
|
56
56
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
57
57
|
"X-Fern-Language": "JavaScript",
|
|
58
58
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
59
|
-
"X-Fern-SDK-Version": "1.
|
|
60
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
59
|
+
"X-Fern-SDK-Version": "1.754.0",
|
|
60
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.754.0",
|
|
61
61
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
62
62
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
63
63
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -56,5 +56,31 @@ export declare class Flights {
|
|
|
56
56
|
*/
|
|
57
57
|
getFlightLegsForTaskGroupV1(taskGroupId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightInfoForTaskRes>;
|
|
58
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;
|
|
59
85
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
60
86
|
}
|
|
@@ -173,6 +173,124 @@ class Flights {
|
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* 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)
|
|
178
|
+
*
|
|
179
|
+
* @param {string} flightLegId
|
|
180
|
+
* @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
|
|
181
|
+
*
|
|
182
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* await client.shipping.flights.getFlightStatusForFlightLegV1("flight_leg_id")
|
|
186
|
+
*/
|
|
187
|
+
getFlightStatusForFlightLegV1(flightLegId, requestOptions) {
|
|
188
|
+
return core.HttpResponsePromise.fromPromise(this.__getFlightStatusForFlightLegV1(flightLegId, requestOptions));
|
|
189
|
+
}
|
|
190
|
+
__getFlightStatusForFlightLegV1(flightLegId, requestOptions) {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
+
var _a, _b, _c, _d;
|
|
193
|
+
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);
|
|
194
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
195
|
+
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)}`),
|
|
196
|
+
method: "GET",
|
|
197
|
+
headers: _headers,
|
|
198
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
199
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
200
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
201
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
202
|
+
});
|
|
203
|
+
if (_response.ok) {
|
|
204
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
205
|
+
}
|
|
206
|
+
if (_response.error.reason === "status-code") {
|
|
207
|
+
switch (_response.error.statusCode) {
|
|
208
|
+
case 422:
|
|
209
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
210
|
+
default:
|
|
211
|
+
throw new errors.ChrtError({
|
|
212
|
+
statusCode: _response.error.statusCode,
|
|
213
|
+
body: _response.error.body,
|
|
214
|
+
rawResponse: _response.rawResponse,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
switch (_response.error.reason) {
|
|
219
|
+
case "non-json":
|
|
220
|
+
throw new errors.ChrtError({
|
|
221
|
+
statusCode: _response.error.statusCode,
|
|
222
|
+
body: _response.error.rawBody,
|
|
223
|
+
rawResponse: _response.rawResponse,
|
|
224
|
+
});
|
|
225
|
+
case "timeout":
|
|
226
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/flights/status/for_flight_leg/v1/{flight_leg_id}.");
|
|
227
|
+
case "unknown":
|
|
228
|
+
throw new errors.ChrtError({
|
|
229
|
+
message: _response.error.errorMessage,
|
|
230
|
+
rawResponse: _response.rawResponse,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* 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)
|
|
237
|
+
*
|
|
238
|
+
* @param {string} flightLegId
|
|
239
|
+
* @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
|
|
240
|
+
*
|
|
241
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* await client.shipping.flights.getFlightTrackForFlightLegV1("flight_leg_id")
|
|
245
|
+
*/
|
|
246
|
+
getFlightTrackForFlightLegV1(flightLegId, requestOptions) {
|
|
247
|
+
return core.HttpResponsePromise.fromPromise(this.__getFlightTrackForFlightLegV1(flightLegId, requestOptions));
|
|
248
|
+
}
|
|
249
|
+
__getFlightTrackForFlightLegV1(flightLegId, requestOptions) {
|
|
250
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
251
|
+
var _a, _b, _c, _d;
|
|
252
|
+
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);
|
|
253
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
254
|
+
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)}`),
|
|
255
|
+
method: "GET",
|
|
256
|
+
headers: _headers,
|
|
257
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
258
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
259
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
260
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
261
|
+
});
|
|
262
|
+
if (_response.ok) {
|
|
263
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
264
|
+
}
|
|
265
|
+
if (_response.error.reason === "status-code") {
|
|
266
|
+
switch (_response.error.statusCode) {
|
|
267
|
+
case 422:
|
|
268
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
269
|
+
default:
|
|
270
|
+
throw new errors.ChrtError({
|
|
271
|
+
statusCode: _response.error.statusCode,
|
|
272
|
+
body: _response.error.body,
|
|
273
|
+
rawResponse: _response.rawResponse,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
switch (_response.error.reason) {
|
|
278
|
+
case "non-json":
|
|
279
|
+
throw new errors.ChrtError({
|
|
280
|
+
statusCode: _response.error.statusCode,
|
|
281
|
+
body: _response.error.rawBody,
|
|
282
|
+
rawResponse: _response.rawResponse,
|
|
283
|
+
});
|
|
284
|
+
case "timeout":
|
|
285
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/flights/track/for_flight_leg/v1/{flight_leg_id}.");
|
|
286
|
+
case "unknown":
|
|
287
|
+
throw new errors.ChrtError({
|
|
288
|
+
message: _response.error.errorMessage,
|
|
289
|
+
rawResponse: _response.rawResponse,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
}
|
|
176
294
|
_getAuthorizationHeader() {
|
|
177
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
178
296
|
const bearer = yield core.Supplier.get(this._options.token);
|
package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.ts
CHANGED
|
@@ -60,7 +60,10 @@ export declare class TaskGroup {
|
|
|
60
60
|
* flight_legs: [{
|
|
61
61
|
* schema_version: 1,
|
|
62
62
|
* flight_number: "flight_number",
|
|
63
|
-
* provenance: "manual"
|
|
63
|
+
* provenance: "manual",
|
|
64
|
+
* origin_iata: "origin_iata",
|
|
65
|
+
* destination_iata: "destination_iata",
|
|
66
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
64
67
|
* }]
|
|
65
68
|
* })
|
|
66
69
|
*/
|
package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.js
CHANGED
|
@@ -134,7 +134,10 @@ class TaskGroup {
|
|
|
134
134
|
* flight_legs: [{
|
|
135
135
|
* schema_version: 1,
|
|
136
136
|
* flight_number: "flight_number",
|
|
137
|
-
* provenance: "manual"
|
|
137
|
+
* provenance: "manual",
|
|
138
|
+
* origin_iata: "origin_iata",
|
|
139
|
+
* destination_iata: "destination_iata",
|
|
140
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
138
141
|
* }]
|
|
139
142
|
* })
|
|
140
143
|
*/
|
|
@@ -154,7 +154,10 @@ export declare class TaskGroups {
|
|
|
154
154
|
* flight_legs: [{
|
|
155
155
|
* schema_version: 1,
|
|
156
156
|
* flight_number: "flight_number",
|
|
157
|
-
* provenance: "manual"
|
|
157
|
+
* provenance: "manual",
|
|
158
|
+
* origin_iata: "origin_iata",
|
|
159
|
+
* destination_iata: "destination_iata",
|
|
160
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
158
161
|
* }]
|
|
159
162
|
* })
|
|
160
163
|
*/
|
|
@@ -522,7 +522,10 @@ class TaskGroups {
|
|
|
522
522
|
* flight_legs: [{
|
|
523
523
|
* schema_version: 1,
|
|
524
524
|
* flight_number: "flight_number",
|
|
525
|
-
* provenance: "manual"
|
|
525
|
+
* provenance: "manual",
|
|
526
|
+
* origin_iata: "origin_iata",
|
|
527
|
+
* destination_iata: "destination_iata",
|
|
528
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
526
529
|
* }]
|
|
527
530
|
* })
|
|
528
531
|
*/
|
|
@@ -9,11 +9,22 @@ export interface FlightLeg1 {
|
|
|
9
9
|
task_group_id: string;
|
|
10
10
|
flight_number: string;
|
|
11
11
|
provenance: Chrt.FlightLegProvenanceEnum1;
|
|
12
|
+
origin_iata: string;
|
|
13
|
+
destination_iata: string;
|
|
14
|
+
scheduled_departure_utc: string;
|
|
12
15
|
carrier_iata?: string | null;
|
|
13
16
|
carrier_icao?: string | null;
|
|
14
|
-
origin_iata?: string | null;
|
|
15
|
-
destination_iata?: string | null;
|
|
16
|
-
scheduled_departure_utc?: string | null;
|
|
17
17
|
scheduled_arrival_utc?: string | null;
|
|
18
|
-
|
|
18
|
+
cirium_flight_id?: number | null;
|
|
19
|
+
flight_status?: Chrt.FlightLegStatusEnum1 | null;
|
|
20
|
+
estimated_departure_utc?: string | null;
|
|
21
|
+
actual_departure_utc?: string | null;
|
|
22
|
+
estimated_arrival_utc?: string | null;
|
|
23
|
+
actual_arrival_utc?: string | null;
|
|
24
|
+
departure_gate?: string | null;
|
|
25
|
+
arrival_gate?: string | null;
|
|
26
|
+
departure_terminal?: string | null;
|
|
27
|
+
arrival_terminal?: string | null;
|
|
28
|
+
flight_status_source?: Chrt.FlightLegStatusSourceEnum1 | null;
|
|
29
|
+
flight_status_fetched_at_utc?: string | null;
|
|
19
30
|
}
|
|
@@ -6,11 +6,10 @@ export interface FlightLegClientCreate1 {
|
|
|
6
6
|
schema_version: number;
|
|
7
7
|
flight_number: string;
|
|
8
8
|
provenance: Chrt.FlightLegProvenanceEnum1;
|
|
9
|
+
origin_iata: string;
|
|
10
|
+
destination_iata: string;
|
|
11
|
+
scheduled_departure_utc: string;
|
|
9
12
|
carrier_iata?: string | null;
|
|
10
13
|
carrier_icao?: string | null;
|
|
11
|
-
origin_iata?: string | null;
|
|
12
|
-
destination_iata?: string | null;
|
|
13
|
-
scheduled_departure_utc?: string | null;
|
|
14
14
|
scheduled_arrival_utc?: string | null;
|
|
15
|
-
fa_flight_ids?: string[];
|
|
16
15
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type FlightLegStatusEnum1 = "scheduled" | "departed_gate" | "in_flight" | "landed" | "arrived_gate" | "cancelled" | "diverted" | "unknown";
|
|
5
|
+
export declare const FlightLegStatusEnum1: {
|
|
6
|
+
readonly Scheduled: "scheduled";
|
|
7
|
+
readonly DepartedGate: "departed_gate";
|
|
8
|
+
readonly InFlight: "in_flight";
|
|
9
|
+
readonly Landed: "landed";
|
|
10
|
+
readonly ArrivedGate: "arrived_gate";
|
|
11
|
+
readonly Cancelled: "cancelled";
|
|
12
|
+
readonly Diverted: "diverted";
|
|
13
|
+
readonly Unknown: "unknown";
|
|
14
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
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.FlightLegStatusEnum1 = void 0;
|
|
7
|
+
exports.FlightLegStatusEnum1 = {
|
|
8
|
+
Scheduled: "scheduled",
|
|
9
|
+
DepartedGate: "departed_gate",
|
|
10
|
+
InFlight: "in_flight",
|
|
11
|
+
Landed: "landed",
|
|
12
|
+
ArrivedGate: "arrived_gate",
|
|
13
|
+
Cancelled: "cancelled",
|
|
14
|
+
Diverted: "diverted",
|
|
15
|
+
Unknown: "unknown",
|
|
16
|
+
};
|
|
@@ -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.FlightLegStatusSourceEnum1 = void 0;
|
|
7
|
+
exports.FlightLegStatusSourceEnum1 = {
|
|
8
|
+
Live: "live",
|
|
9
|
+
Historical: "historical",
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* A single reported (or derived) aircraft position along the flown trail.
|
|
6
|
+
*/
|
|
7
|
+
export interface FlightTrackPosition {
|
|
8
|
+
lat?: number | null;
|
|
9
|
+
lon?: number | null;
|
|
10
|
+
altitude_ft?: number | null;
|
|
11
|
+
speed_mph?: number | null;
|
|
12
|
+
source?: string | null;
|
|
13
|
+
date_utc?: string | null;
|
|
14
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -151,8 +151,13 @@ export * from "./FlightInfoForTaskRes.js";
|
|
|
151
151
|
export * from "./FlightLeg1.js";
|
|
152
152
|
export * from "./FlightLegClientCreate1.js";
|
|
153
153
|
export * from "./FlightLegProvenanceEnum1.js";
|
|
154
|
+
export * from "./FlightLegStatusEnum1.js";
|
|
155
|
+
export * from "./FlightLegStatusSourceEnum1.js";
|
|
154
156
|
export * from "./FlightLegWebhookInfo.js";
|
|
155
157
|
export * from "./FlightStatusEnum.js";
|
|
158
|
+
export * from "./FlightTrackPosition.js";
|
|
159
|
+
export * from "./FlightTrackRes.js";
|
|
160
|
+
export * from "./FlightTrackWaypoint.js";
|
|
156
161
|
export * from "./GeometryCollectionGeometriesItem.js";
|
|
157
162
|
export * from "./GeometryCollection.js";
|
|
158
163
|
export * from "./HttpValidationError.js";
|
|
@@ -167,8 +167,13 @@ __exportStar(require("./FlightInfoForTaskRes.js"), exports);
|
|
|
167
167
|
__exportStar(require("./FlightLeg1.js"), exports);
|
|
168
168
|
__exportStar(require("./FlightLegClientCreate1.js"), exports);
|
|
169
169
|
__exportStar(require("./FlightLegProvenanceEnum1.js"), exports);
|
|
170
|
+
__exportStar(require("./FlightLegStatusEnum1.js"), exports);
|
|
171
|
+
__exportStar(require("./FlightLegStatusSourceEnum1.js"), exports);
|
|
170
172
|
__exportStar(require("./FlightLegWebhookInfo.js"), exports);
|
|
171
173
|
__exportStar(require("./FlightStatusEnum.js"), exports);
|
|
174
|
+
__exportStar(require("./FlightTrackPosition.js"), exports);
|
|
175
|
+
__exportStar(require("./FlightTrackRes.js"), exports);
|
|
176
|
+
__exportStar(require("./FlightTrackWaypoint.js"), exports);
|
|
172
177
|
__exportStar(require("./GeometryCollectionGeometriesItem.js"), exports);
|
|
173
178
|
__exportStar(require("./GeometryCollection.js"), exports);
|
|
174
179
|
__exportStar(require("./HttpValidationError.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.754.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.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) });
|
|
@@ -56,5 +56,31 @@ export declare class Flights {
|
|
|
56
56
|
*/
|
|
57
57
|
getFlightLegsForTaskGroupV1(taskGroupId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightInfoForTaskRes>;
|
|
58
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;
|
|
59
85
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
60
86
|
}
|
|
@@ -137,6 +137,124 @@ export class Flights {
|
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
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
|
+
}
|
|
140
258
|
_getAuthorizationHeader() {
|
|
141
259
|
return __awaiter(this, void 0, void 0, function* () {
|
|
142
260
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -60,7 +60,10 @@ export declare class TaskGroup {
|
|
|
60
60
|
* flight_legs: [{
|
|
61
61
|
* schema_version: 1,
|
|
62
62
|
* flight_number: "flight_number",
|
|
63
|
-
* provenance: "manual"
|
|
63
|
+
* provenance: "manual",
|
|
64
|
+
* origin_iata: "origin_iata",
|
|
65
|
+
* destination_iata: "destination_iata",
|
|
66
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
64
67
|
* }]
|
|
65
68
|
* })
|
|
66
69
|
*/
|
package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.mjs
CHANGED
|
@@ -98,7 +98,10 @@ export class TaskGroup {
|
|
|
98
98
|
* flight_legs: [{
|
|
99
99
|
* schema_version: 1,
|
|
100
100
|
* flight_number: "flight_number",
|
|
101
|
-
* provenance: "manual"
|
|
101
|
+
* provenance: "manual",
|
|
102
|
+
* origin_iata: "origin_iata",
|
|
103
|
+
* destination_iata: "destination_iata",
|
|
104
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
102
105
|
* }]
|
|
103
106
|
* })
|
|
104
107
|
*/
|
|
@@ -154,7 +154,10 @@ export declare class TaskGroups {
|
|
|
154
154
|
* flight_legs: [{
|
|
155
155
|
* schema_version: 1,
|
|
156
156
|
* flight_number: "flight_number",
|
|
157
|
-
* provenance: "manual"
|
|
157
|
+
* provenance: "manual",
|
|
158
|
+
* origin_iata: "origin_iata",
|
|
159
|
+
* destination_iata: "destination_iata",
|
|
160
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
158
161
|
* }]
|
|
159
162
|
* })
|
|
160
163
|
*/
|
|
@@ -486,7 +486,10 @@ export class TaskGroups {
|
|
|
486
486
|
* flight_legs: [{
|
|
487
487
|
* schema_version: 1,
|
|
488
488
|
* flight_number: "flight_number",
|
|
489
|
-
* provenance: "manual"
|
|
489
|
+
* provenance: "manual",
|
|
490
|
+
* origin_iata: "origin_iata",
|
|
491
|
+
* destination_iata: "destination_iata",
|
|
492
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
490
493
|
* }]
|
|
491
494
|
* })
|
|
492
495
|
*/
|
|
@@ -9,11 +9,22 @@ export interface FlightLeg1 {
|
|
|
9
9
|
task_group_id: string;
|
|
10
10
|
flight_number: string;
|
|
11
11
|
provenance: Chrt.FlightLegProvenanceEnum1;
|
|
12
|
+
origin_iata: string;
|
|
13
|
+
destination_iata: string;
|
|
14
|
+
scheduled_departure_utc: string;
|
|
12
15
|
carrier_iata?: string | null;
|
|
13
16
|
carrier_icao?: string | null;
|
|
14
|
-
origin_iata?: string | null;
|
|
15
|
-
destination_iata?: string | null;
|
|
16
|
-
scheduled_departure_utc?: string | null;
|
|
17
17
|
scheduled_arrival_utc?: string | null;
|
|
18
|
-
|
|
18
|
+
cirium_flight_id?: number | null;
|
|
19
|
+
flight_status?: Chrt.FlightLegStatusEnum1 | null;
|
|
20
|
+
estimated_departure_utc?: string | null;
|
|
21
|
+
actual_departure_utc?: string | null;
|
|
22
|
+
estimated_arrival_utc?: string | null;
|
|
23
|
+
actual_arrival_utc?: string | null;
|
|
24
|
+
departure_gate?: string | null;
|
|
25
|
+
arrival_gate?: string | null;
|
|
26
|
+
departure_terminal?: string | null;
|
|
27
|
+
arrival_terminal?: string | null;
|
|
28
|
+
flight_status_source?: Chrt.FlightLegStatusSourceEnum1 | null;
|
|
29
|
+
flight_status_fetched_at_utc?: string | null;
|
|
19
30
|
}
|
|
@@ -6,11 +6,10 @@ export interface FlightLegClientCreate1 {
|
|
|
6
6
|
schema_version: number;
|
|
7
7
|
flight_number: string;
|
|
8
8
|
provenance: Chrt.FlightLegProvenanceEnum1;
|
|
9
|
+
origin_iata: string;
|
|
10
|
+
destination_iata: string;
|
|
11
|
+
scheduled_departure_utc: string;
|
|
9
12
|
carrier_iata?: string | null;
|
|
10
13
|
carrier_icao?: string | null;
|
|
11
|
-
origin_iata?: string | null;
|
|
12
|
-
destination_iata?: string | null;
|
|
13
|
-
scheduled_departure_utc?: string | null;
|
|
14
14
|
scheduled_arrival_utc?: string | null;
|
|
15
|
-
fa_flight_ids?: string[];
|
|
16
15
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type FlightLegStatusEnum1 = "scheduled" | "departed_gate" | "in_flight" | "landed" | "arrived_gate" | "cancelled" | "diverted" | "unknown";
|
|
5
|
+
export declare const FlightLegStatusEnum1: {
|
|
6
|
+
readonly Scheduled: "scheduled";
|
|
7
|
+
readonly DepartedGate: "departed_gate";
|
|
8
|
+
readonly InFlight: "in_flight";
|
|
9
|
+
readonly Landed: "landed";
|
|
10
|
+
readonly ArrivedGate: "arrived_gate";
|
|
11
|
+
readonly Cancelled: "cancelled";
|
|
12
|
+
readonly Diverted: "diverted";
|
|
13
|
+
readonly Unknown: "unknown";
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export const FlightLegStatusEnum1 = {
|
|
5
|
+
Scheduled: "scheduled",
|
|
6
|
+
DepartedGate: "departed_gate",
|
|
7
|
+
InFlight: "in_flight",
|
|
8
|
+
Landed: "landed",
|
|
9
|
+
ArrivedGate: "arrived_gate",
|
|
10
|
+
Cancelled: "cancelled",
|
|
11
|
+
Diverted: "diverted",
|
|
12
|
+
Unknown: "unknown",
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* A single reported (or derived) aircraft position along the flown trail.
|
|
6
|
+
*/
|
|
7
|
+
export interface FlightTrackPosition {
|
|
8
|
+
lat?: number | null;
|
|
9
|
+
lon?: number | null;
|
|
10
|
+
altitude_ft?: number | null;
|
|
11
|
+
speed_mph?: number | null;
|
|
12
|
+
source?: string | null;
|
|
13
|
+
date_utc?: string | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
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
|
+
}
|
|
@@ -151,8 +151,13 @@ export * from "./FlightInfoForTaskRes.mjs";
|
|
|
151
151
|
export * from "./FlightLeg1.mjs";
|
|
152
152
|
export * from "./FlightLegClientCreate1.mjs";
|
|
153
153
|
export * from "./FlightLegProvenanceEnum1.mjs";
|
|
154
|
+
export * from "./FlightLegStatusEnum1.mjs";
|
|
155
|
+
export * from "./FlightLegStatusSourceEnum1.mjs";
|
|
154
156
|
export * from "./FlightLegWebhookInfo.mjs";
|
|
155
157
|
export * from "./FlightStatusEnum.mjs";
|
|
158
|
+
export * from "./FlightTrackPosition.mjs";
|
|
159
|
+
export * from "./FlightTrackRes.mjs";
|
|
160
|
+
export * from "./FlightTrackWaypoint.mjs";
|
|
156
161
|
export * from "./GeometryCollectionGeometriesItem.mjs";
|
|
157
162
|
export * from "./GeometryCollection.mjs";
|
|
158
163
|
export * from "./HttpValidationError.mjs";
|
|
@@ -151,8 +151,13 @@ export * from "./FlightInfoForTaskRes.mjs";
|
|
|
151
151
|
export * from "./FlightLeg1.mjs";
|
|
152
152
|
export * from "./FlightLegClientCreate1.mjs";
|
|
153
153
|
export * from "./FlightLegProvenanceEnum1.mjs";
|
|
154
|
+
export * from "./FlightLegStatusEnum1.mjs";
|
|
155
|
+
export * from "./FlightLegStatusSourceEnum1.mjs";
|
|
154
156
|
export * from "./FlightLegWebhookInfo.mjs";
|
|
155
157
|
export * from "./FlightStatusEnum.mjs";
|
|
158
|
+
export * from "./FlightTrackPosition.mjs";
|
|
159
|
+
export * from "./FlightTrackRes.mjs";
|
|
160
|
+
export * from "./FlightTrackWaypoint.mjs";
|
|
156
161
|
export * from "./GeometryCollectionGeometriesItem.mjs";
|
|
157
162
|
export * from "./GeometryCollection.mjs";
|
|
158
163
|
export * from "./HttpValidationError.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.754.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.754.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -17573,6 +17573,132 @@ await client.shipping.flights.getFlightLegsForTaskGroupV1("task_group_id");
|
|
|
17573
17573
|
</dl>
|
|
17574
17574
|
</details>
|
|
17575
17575
|
|
|
17576
|
+
<details><summary><code>client.shipping.flights.<a href="/src/api/resources/shipping/resources/flights/client/Client.ts">getFlightStatusForFlightLegV1</a>(flightLegId) -> Chrt.FlightLeg1</code></summary>
|
|
17577
|
+
<dl>
|
|
17578
|
+
<dd>
|
|
17579
|
+
|
|
17580
|
+
#### 📝 Description
|
|
17581
|
+
|
|
17582
|
+
<dl>
|
|
17583
|
+
<dd>
|
|
17584
|
+
|
|
17585
|
+
<dl>
|
|
17586
|
+
<dd>
|
|
17587
|
+
|
|
17588
|
+
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)
|
|
17589
|
+
|
|
17590
|
+
</dd>
|
|
17591
|
+
</dl>
|
|
17592
|
+
</dd>
|
|
17593
|
+
</dl>
|
|
17594
|
+
|
|
17595
|
+
#### 🔌 Usage
|
|
17596
|
+
|
|
17597
|
+
<dl>
|
|
17598
|
+
<dd>
|
|
17599
|
+
|
|
17600
|
+
<dl>
|
|
17601
|
+
<dd>
|
|
17602
|
+
|
|
17603
|
+
```typescript
|
|
17604
|
+
await client.shipping.flights.getFlightStatusForFlightLegV1("flight_leg_id");
|
|
17605
|
+
```
|
|
17606
|
+
|
|
17607
|
+
</dd>
|
|
17608
|
+
</dl>
|
|
17609
|
+
</dd>
|
|
17610
|
+
</dl>
|
|
17611
|
+
|
|
17612
|
+
#### ⚙️ Parameters
|
|
17613
|
+
|
|
17614
|
+
<dl>
|
|
17615
|
+
<dd>
|
|
17616
|
+
|
|
17617
|
+
<dl>
|
|
17618
|
+
<dd>
|
|
17619
|
+
|
|
17620
|
+
**flightLegId:** `string`
|
|
17621
|
+
|
|
17622
|
+
</dd>
|
|
17623
|
+
</dl>
|
|
17624
|
+
|
|
17625
|
+
<dl>
|
|
17626
|
+
<dd>
|
|
17627
|
+
|
|
17628
|
+
**requestOptions:** `Flights.RequestOptions`
|
|
17629
|
+
|
|
17630
|
+
</dd>
|
|
17631
|
+
</dl>
|
|
17632
|
+
</dd>
|
|
17633
|
+
</dl>
|
|
17634
|
+
|
|
17635
|
+
</dd>
|
|
17636
|
+
</dl>
|
|
17637
|
+
</details>
|
|
17638
|
+
|
|
17639
|
+
<details><summary><code>client.shipping.flights.<a href="/src/api/resources/shipping/resources/flights/client/Client.ts">getFlightTrackForFlightLegV1</a>(flightLegId) -> Chrt.FlightTrackRes</code></summary>
|
|
17640
|
+
<dl>
|
|
17641
|
+
<dd>
|
|
17642
|
+
|
|
17643
|
+
#### 📝 Description
|
|
17644
|
+
|
|
17645
|
+
<dl>
|
|
17646
|
+
<dd>
|
|
17647
|
+
|
|
17648
|
+
<dl>
|
|
17649
|
+
<dd>
|
|
17650
|
+
|
|
17651
|
+
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)
|
|
17652
|
+
|
|
17653
|
+
</dd>
|
|
17654
|
+
</dl>
|
|
17655
|
+
</dd>
|
|
17656
|
+
</dl>
|
|
17657
|
+
|
|
17658
|
+
#### 🔌 Usage
|
|
17659
|
+
|
|
17660
|
+
<dl>
|
|
17661
|
+
<dd>
|
|
17662
|
+
|
|
17663
|
+
<dl>
|
|
17664
|
+
<dd>
|
|
17665
|
+
|
|
17666
|
+
```typescript
|
|
17667
|
+
await client.shipping.flights.getFlightTrackForFlightLegV1("flight_leg_id");
|
|
17668
|
+
```
|
|
17669
|
+
|
|
17670
|
+
</dd>
|
|
17671
|
+
</dl>
|
|
17672
|
+
</dd>
|
|
17673
|
+
</dl>
|
|
17674
|
+
|
|
17675
|
+
#### ⚙️ Parameters
|
|
17676
|
+
|
|
17677
|
+
<dl>
|
|
17678
|
+
<dd>
|
|
17679
|
+
|
|
17680
|
+
<dl>
|
|
17681
|
+
<dd>
|
|
17682
|
+
|
|
17683
|
+
**flightLegId:** `string`
|
|
17684
|
+
|
|
17685
|
+
</dd>
|
|
17686
|
+
</dl>
|
|
17687
|
+
|
|
17688
|
+
<dl>
|
|
17689
|
+
<dd>
|
|
17690
|
+
|
|
17691
|
+
**requestOptions:** `Flights.RequestOptions`
|
|
17692
|
+
|
|
17693
|
+
</dd>
|
|
17694
|
+
</dl>
|
|
17695
|
+
</dd>
|
|
17696
|
+
</dl>
|
|
17697
|
+
|
|
17698
|
+
</dd>
|
|
17699
|
+
</dl>
|
|
17700
|
+
</details>
|
|
17701
|
+
|
|
17576
17702
|
## Shipping TaskArtifacts
|
|
17577
17703
|
|
|
17578
17704
|
<details><summary><code>client.shipping.taskArtifacts.<a href="/src/api/resources/shipping/resources/taskArtifacts/client/Client.ts">addToTaskV1</a>(taskId, { ...params }) -> string</code></summary>
|
|
@@ -20454,6 +20580,9 @@ await client.shipping.taskGroups.setFlightInfoV1("task_group_id", {
|
|
|
20454
20580
|
schema_version: 1,
|
|
20455
20581
|
flight_number: "flight_number",
|
|
20456
20582
|
provenance: "manual",
|
|
20583
|
+
origin_iata: "origin_iata",
|
|
20584
|
+
destination_iata: "destination_iata",
|
|
20585
|
+
scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
20457
20586
|
},
|
|
20458
20587
|
],
|
|
20459
20588
|
});
|
|
@@ -23180,6 +23309,9 @@ await client.shipping.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {
|
|
|
23180
23309
|
schema_version: 1,
|
|
23181
23310
|
flight_number: "flight_number",
|
|
23182
23311
|
provenance: "manual",
|
|
23312
|
+
origin_iata: "origin_iata",
|
|
23313
|
+
destination_iata: "destination_iata",
|
|
23314
|
+
scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
23183
23315
|
},
|
|
23184
23316
|
],
|
|
23185
23317
|
});
|