@chrt-inc/typescript-sdk 1.751.0 → 1.756.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/integrations/resources/cargoaiTrackAndTrace/client/Client.d.ts +0 -13
- package/dist/cjs/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.js +0 -59
- 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/CargoAiTrackAndTraceUpdate1.d.ts +0 -4
- package/dist/cjs/api/types/CargoAiTrackAndTraceUpdateSourceEnum.d.ts +1 -5
- package/dist/cjs/api/types/CargoAiTrackAndTraceUpdateSourceEnum.js +0 -5
- 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/integrations/resources/cargoaiTrackAndTrace/client/Client.d.mts +0 -13
- package/dist/esm/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.mjs +0 -59
- 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/CargoAiTrackAndTraceUpdate1.d.mts +0 -4
- package/dist/esm/api/types/CargoAiTrackAndTraceUpdateSourceEnum.d.mts +1 -5
- package/dist/esm/api/types/CargoAiTrackAndTraceUpdateSourceEnum.mjs +1 -4
- 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 -63
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.756.0",
|
|
60
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.756.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) });
|
package/dist/cjs/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.d.ts
CHANGED
|
@@ -84,18 +84,5 @@ export declare class CargoaiTrackAndTrace {
|
|
|
84
84
|
*/
|
|
85
85
|
subscribeV1(request: Chrt.integrations.CargoAiTrackAndTraceSubscribeReq, requestOptions?: CargoaiTrackAndTrace.RequestOptions): core.HttpResponsePromise<Chrt.CargoAiTrackAndTraceSubscription1>;
|
|
86
86
|
private __subscribeV1;
|
|
87
|
-
/**
|
|
88
|
-
* Polls CargoAi for the current tracking snapshot of an AWB and stores it as a new update (source=poll). No subscription required — any order participant can poll on demand. | authz: order participant | () -> (CargoAiTrackAndTraceUpdate1)
|
|
89
|
-
*
|
|
90
|
-
* @param {string} awb
|
|
91
|
-
* @param {CargoaiTrackAndTrace.RequestOptions} requestOptions - Request-specific configuration.
|
|
92
|
-
*
|
|
93
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* await client.integrations.cargoaiTrackAndTrace.refreshV1("awb")
|
|
97
|
-
*/
|
|
98
|
-
refreshV1(awb: string, requestOptions?: CargoaiTrackAndTrace.RequestOptions): core.HttpResponsePromise<Chrt.CargoAiTrackAndTraceUpdate1>;
|
|
99
|
-
private __refreshV1;
|
|
100
87
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
101
88
|
}
|
|
@@ -305,65 +305,6 @@ class CargoaiTrackAndTrace {
|
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
/**
|
|
309
|
-
* Polls CargoAi for the current tracking snapshot of an AWB and stores it as a new update (source=poll). No subscription required — any order participant can poll on demand. | authz: order participant | () -> (CargoAiTrackAndTraceUpdate1)
|
|
310
|
-
*
|
|
311
|
-
* @param {string} awb
|
|
312
|
-
* @param {CargoaiTrackAndTrace.RequestOptions} requestOptions - Request-specific configuration.
|
|
313
|
-
*
|
|
314
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
315
|
-
*
|
|
316
|
-
* @example
|
|
317
|
-
* await client.integrations.cargoaiTrackAndTrace.refreshV1("awb")
|
|
318
|
-
*/
|
|
319
|
-
refreshV1(awb, requestOptions) {
|
|
320
|
-
return core.HttpResponsePromise.fromPromise(this.__refreshV1(awb, requestOptions));
|
|
321
|
-
}
|
|
322
|
-
__refreshV1(awb, requestOptions) {
|
|
323
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
324
|
-
var _a, _b, _c, _d;
|
|
325
|
-
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);
|
|
326
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
327
|
-
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, `integrations/cargoai_track_and_trace/refresh/v1/${encodeURIComponent(awb)}`),
|
|
328
|
-
method: "POST",
|
|
329
|
-
headers: _headers,
|
|
330
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
331
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
332
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
333
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
334
|
-
});
|
|
335
|
-
if (_response.ok) {
|
|
336
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
337
|
-
}
|
|
338
|
-
if (_response.error.reason === "status-code") {
|
|
339
|
-
switch (_response.error.statusCode) {
|
|
340
|
-
case 422:
|
|
341
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
342
|
-
default:
|
|
343
|
-
throw new errors.ChrtError({
|
|
344
|
-
statusCode: _response.error.statusCode,
|
|
345
|
-
body: _response.error.body,
|
|
346
|
-
rawResponse: _response.rawResponse,
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
switch (_response.error.reason) {
|
|
351
|
-
case "non-json":
|
|
352
|
-
throw new errors.ChrtError({
|
|
353
|
-
statusCode: _response.error.statusCode,
|
|
354
|
-
body: _response.error.rawBody,
|
|
355
|
-
rawResponse: _response.rawResponse,
|
|
356
|
-
});
|
|
357
|
-
case "timeout":
|
|
358
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /integrations/cargoai_track_and_trace/refresh/v1/{awb}.");
|
|
359
|
-
case "unknown":
|
|
360
|
-
throw new errors.ChrtError({
|
|
361
|
-
message: _response.error.errorMessage,
|
|
362
|
-
rawResponse: _response.rawResponse,
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
308
|
_getAuthorizationHeader() {
|
|
368
309
|
return __awaiter(this, void 0, void 0, function* () {
|
|
369
310
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -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
|
*/
|
|
@@ -20,8 +20,4 @@ export interface CargoAiTrackAndTraceUpdate1 {
|
|
|
20
20
|
_id: string;
|
|
21
21
|
receivedAt: string;
|
|
22
22
|
source: Chrt.CargoAiTrackAndTraceUpdateSourceEnum;
|
|
23
|
-
/** Must be a string starting with `user_` */
|
|
24
|
-
polledByUserId?: string | null;
|
|
25
|
-
/** Must be a string starting with `org_` */
|
|
26
|
-
polledByOrgId?: string | null;
|
|
27
23
|
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type CargoAiTrackAndTraceUpdateSourceEnum = "webhook"
|
|
5
|
-
export declare const CargoAiTrackAndTraceUpdateSourceEnum: {
|
|
6
|
-
readonly Webhook: "webhook";
|
|
7
|
-
readonly Poll: "poll";
|
|
8
|
-
};
|
|
4
|
+
export type CargoAiTrackAndTraceUpdateSourceEnum = "webhook";
|
|
@@ -3,8 +3,3 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CargoAiTrackAndTraceUpdateSourceEnum = void 0;
|
|
7
|
-
exports.CargoAiTrackAndTraceUpdateSourceEnum = {
|
|
8
|
-
Webhook: "webhook",
|
|
9
|
-
Poll: "poll",
|
|
10
|
-
};
|
|
@@ -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.756.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.756.0",
|
|
24
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.756.0",
|
|
25
25
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
26
26
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
27
27
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
package/dist/esm/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.d.mts
CHANGED
|
@@ -84,18 +84,5 @@ export declare class CargoaiTrackAndTrace {
|
|
|
84
84
|
*/
|
|
85
85
|
subscribeV1(request: Chrt.integrations.CargoAiTrackAndTraceSubscribeReq, requestOptions?: CargoaiTrackAndTrace.RequestOptions): core.HttpResponsePromise<Chrt.CargoAiTrackAndTraceSubscription1>;
|
|
86
86
|
private __subscribeV1;
|
|
87
|
-
/**
|
|
88
|
-
* Polls CargoAi for the current tracking snapshot of an AWB and stores it as a new update (source=poll). No subscription required — any order participant can poll on demand. | authz: order participant | () -> (CargoAiTrackAndTraceUpdate1)
|
|
89
|
-
*
|
|
90
|
-
* @param {string} awb
|
|
91
|
-
* @param {CargoaiTrackAndTrace.RequestOptions} requestOptions - Request-specific configuration.
|
|
92
|
-
*
|
|
93
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* await client.integrations.cargoaiTrackAndTrace.refreshV1("awb")
|
|
97
|
-
*/
|
|
98
|
-
refreshV1(awb: string, requestOptions?: CargoaiTrackAndTrace.RequestOptions): core.HttpResponsePromise<Chrt.CargoAiTrackAndTraceUpdate1>;
|
|
99
|
-
private __refreshV1;
|
|
100
87
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
101
88
|
}
|