@chrt-inc/typescript-sdk 1.794.0 → 1.810.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/README.md +13 -10
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +31 -26
- package/dist/cjs/api/resources/flights/client/Client.d.ts +52 -0
- package/dist/cjs/api/resources/flights/client/Client.js +135 -0
- package/dist/cjs/api/resources/flights/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/flights/client/index.js +17 -0
- package/dist/cjs/api/resources/flights/client/requests/FlightConnectionsSearchReq.d.ts +45 -0
- package/dist/cjs/api/resources/flights/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/flights/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/flights/index.d.ts +1 -0
- package/dist/cjs/api/resources/flights/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.js +1 -1
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.d.ts +19 -1
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.js +71 -1
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksBulkUpdateDeadlinesReq1.d.ts +16 -0
- package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts +2 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +0 -22
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +0 -71
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +29 -24
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +54 -51
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionClientCreate1.d.ts +0 -2
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionSetFlightInfoReq1.d.ts +24 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/{SessionsSyncFlightStatusV1Request.d.ts → SessionsFlightLegsV1Request.d.ts} +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.ts +0 -3
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/index.d.ts +3 -3
- package/dist/cjs/api/types/AlertCallback.d.ts +7 -0
- package/dist/cjs/api/types/AlertEvent.d.ts +6 -0
- package/dist/cjs/api/types/AlertEvent.js +5 -0
- package/dist/cjs/api/types/AlertMessage.d.ts +10 -0
- package/dist/cjs/api/types/AlertMessage.js +5 -0
- package/dist/cjs/api/types/AlertNameValue.d.ts +7 -0
- package/dist/cjs/api/types/AlertNameValue.js +5 -0
- package/dist/cjs/api/types/AlertNameValues.d.ts +7 -0
- package/dist/cjs/api/types/AlertNameValues.js +5 -0
- package/dist/cjs/api/types/AlertRuleEnvelope.d.ts +7 -0
- package/dist/cjs/api/types/AlertRuleEnvelope.js +5 -0
- package/dist/cjs/api/types/CiriumAirportResources.d.ts +9 -0
- package/dist/cjs/api/types/CiriumAirportResources.js +5 -0
- package/dist/cjs/api/types/CiriumDate.d.ts +6 -0
- package/dist/cjs/api/types/CiriumDate.js +5 -0
- package/dist/cjs/api/types/{FlightAwareWebhookResponse.d.ts → CiriumFlightAlertsWebhookResponse.d.ts} +1 -1
- package/dist/cjs/api/types/CiriumFlightAlertsWebhookResponse.js +5 -0
- package/dist/cjs/api/types/CiriumFlightStatus.d.ts +15 -0
- package/dist/cjs/api/types/CiriumFlightStatus.js +5 -0
- package/dist/cjs/api/types/CiriumOperationalTimes.d.ts +17 -0
- package/dist/cjs/api/types/CiriumOperationalTimes.js +5 -0
- package/dist/cjs/api/types/ConnectionSearchByEnum.d.ts +8 -0
- package/dist/cjs/api/types/ConnectionSearchByEnum.js +10 -0
- package/dist/cjs/api/types/ConnectionSearchPreferenceEnum.d.ts +8 -0
- package/dist/cjs/api/types/ConnectionSearchPreferenceEnum.js +10 -0
- package/dist/cjs/api/types/FlightConnection.d.ts +10 -0
- package/dist/cjs/api/types/FlightConnection.js +5 -0
- package/dist/cjs/api/types/FlightConnectionLeg.d.ts +22 -0
- package/dist/cjs/api/types/FlightConnectionLeg.js +5 -0
- package/dist/cjs/api/types/FlightConnectionsSearchRes.d.ts +7 -0
- package/dist/cjs/api/types/FlightConnectionsSearchRes.js +5 -0
- package/dist/cjs/api/types/FlightLeg1.d.ts +3 -2
- package/dist/cjs/api/types/OperationsTaskDeadlineUpdate1.d.ts +7 -0
- package/dist/cjs/api/types/OperationsTaskDeadlineUpdate1.js +5 -0
- package/dist/cjs/api/types/OperationsTaskListRemoveFromCaseRes1.d.ts +1 -1
- package/dist/cjs/api/types/OperationsTaskStatusEnum.d.ts +2 -1
- package/dist/cjs/api/types/OperationsTaskStatusEnum.js +1 -0
- package/dist/cjs/api/types/OperationsTasksBulkUpdateDeadlinesRes1.d.ts +7 -0
- package/dist/cjs/api/types/OperationsTasksBulkUpdateDeadlinesRes1.js +5 -0
- package/dist/cjs/api/types/OrderBuilderReq.d.ts +2 -0
- package/dist/cjs/api/types/Session1.d.ts +3 -6
- package/dist/cjs/api/types/index.d.ts +18 -4
- package/dist/cjs/api/types/index.js +18 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +7 -2
- package/dist/esm/api/resources/flights/client/Client.d.mts +52 -0
- package/dist/esm/api/resources/flights/client/Client.mjs +98 -0
- package/dist/esm/api/resources/flights/client/index.d.mts +2 -0
- package/dist/esm/api/resources/flights/client/index.mjs +1 -0
- package/dist/esm/api/resources/flights/client/requests/FlightConnectionsSearchReq.d.mts +45 -0
- package/dist/esm/api/resources/flights/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/flights/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/flights/index.d.mts +1 -0
- package/dist/esm/api/resources/flights/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.mjs +1 -1
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.d.mts +19 -1
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.mjs +71 -1
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksBulkUpdateDeadlinesReq1.d.mts +16 -0
- package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.mts +2 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +0 -22
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +0 -71
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +29 -24
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +54 -51
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionClientCreate1.d.mts +0 -2
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionSetFlightInfoReq1.d.mts +24 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/{SessionsSyncFlightStatusV1Request.d.mts → SessionsFlightLegsV1Request.d.mts} +1 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.d.mts +14 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.mts +0 -3
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/index.d.mts +3 -3
- package/dist/esm/api/types/AlertCallback.d.mts +7 -0
- package/dist/esm/api/types/AlertEvent.d.mts +6 -0
- package/dist/esm/api/types/AlertEvent.mjs +4 -0
- package/dist/esm/api/types/AlertMessage.d.mts +10 -0
- package/dist/esm/api/types/AlertMessage.mjs +4 -0
- package/dist/esm/api/types/AlertNameValue.d.mts +7 -0
- package/dist/esm/api/types/AlertNameValue.mjs +4 -0
- package/dist/esm/api/types/AlertNameValues.d.mts +7 -0
- package/dist/esm/api/types/AlertNameValues.mjs +4 -0
- package/dist/esm/api/types/AlertRuleEnvelope.d.mts +7 -0
- package/dist/esm/api/types/AlertRuleEnvelope.mjs +4 -0
- package/dist/esm/api/types/CiriumAirportResources.d.mts +9 -0
- package/dist/esm/api/types/CiriumAirportResources.mjs +4 -0
- package/dist/esm/api/types/CiriumDate.d.mts +6 -0
- package/dist/esm/api/types/CiriumDate.mjs +4 -0
- package/dist/esm/api/types/{FlightAwareWebhookResponse.d.mts → CiriumFlightAlertsWebhookResponse.d.mts} +1 -1
- package/dist/esm/api/types/CiriumFlightAlertsWebhookResponse.mjs +4 -0
- package/dist/esm/api/types/CiriumFlightStatus.d.mts +15 -0
- package/dist/esm/api/types/CiriumFlightStatus.mjs +4 -0
- package/dist/esm/api/types/CiriumOperationalTimes.d.mts +17 -0
- package/dist/esm/api/types/CiriumOperationalTimes.mjs +4 -0
- package/dist/esm/api/types/ConnectionSearchByEnum.d.mts +8 -0
- package/dist/esm/api/types/ConnectionSearchByEnum.mjs +7 -0
- package/dist/esm/api/types/ConnectionSearchPreferenceEnum.d.mts +8 -0
- package/dist/esm/api/types/ConnectionSearchPreferenceEnum.mjs +7 -0
- package/dist/esm/api/types/FlightConnection.d.mts +10 -0
- package/dist/esm/api/types/FlightConnection.mjs +4 -0
- package/dist/esm/api/types/FlightConnectionLeg.d.mts +22 -0
- package/dist/esm/api/types/FlightConnectionLeg.mjs +4 -0
- package/dist/esm/api/types/FlightConnectionsSearchRes.d.mts +7 -0
- package/dist/esm/api/types/FlightConnectionsSearchRes.mjs +4 -0
- package/dist/esm/api/types/FlightLeg1.d.mts +3 -2
- package/dist/esm/api/types/OperationsTaskDeadlineUpdate1.d.mts +7 -0
- package/dist/esm/api/types/OperationsTaskDeadlineUpdate1.mjs +4 -0
- package/dist/esm/api/types/OperationsTaskListRemoveFromCaseRes1.d.mts +1 -1
- package/dist/esm/api/types/OperationsTaskStatusEnum.d.mts +2 -1
- package/dist/esm/api/types/OperationsTaskStatusEnum.mjs +1 -0
- package/dist/esm/api/types/OperationsTasksBulkUpdateDeadlinesRes1.d.mts +7 -0
- package/dist/esm/api/types/OperationsTasksBulkUpdateDeadlinesRes1.mjs +4 -0
- package/dist/esm/api/types/OrderBuilderReq.d.mts +2 -0
- package/dist/esm/api/types/Session1.d.mts +3 -6
- package/dist/esm/api/types/index.d.mts +18 -4
- package/dist/esm/api/types/index.mjs +18 -4
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +168 -95
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionAddFlightReq1.d.ts +0 -16
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionRemoveFlightReq1.d.ts +0 -16
- package/dist/cjs/api/types/FlightAwareAlertFlight.d.ts +0 -16
- package/dist/cjs/api/types/FlightAwareAlertPayload.d.ts +0 -17
- package/dist/cjs/api/types/FlightStatusEnum.d.ts +0 -14
- package/dist/cjs/api/types/FlightStatusEnum.js +0 -16
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionAddFlightReq1.d.mts +0 -16
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionRemoveFlightReq1.d.mts +0 -16
- package/dist/esm/api/types/FlightAwareAlertFlight.d.mts +0 -16
- package/dist/esm/api/types/FlightAwareAlertPayload.d.mts +0 -17
- package/dist/esm/api/types/FlightStatusEnum.d.mts +0 -14
- package/dist/esm/api/types/FlightStatusEnum.mjs +0 -13
- /package/dist/cjs/api/resources/{tracking/resources/sessions/client/requests/SessionAddFlightReq1.js → flights/client/requests/FlightConnectionsSearchReq.js} +0 -0
- /package/dist/cjs/api/resources/{tracking/resources/sessions/client/requests/SessionRemoveFlightReq1.js → operations/resources/operationsTasks/client/requests/OperationsTasksBulkUpdateDeadlinesReq1.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/{SessionsSyncFlightStatusV1Request.js → SessionSetFlightInfoReq1.js} +0 -0
- /package/dist/cjs/api/{types/FlightAwareAlertFlight.js → resources/tracking/resources/sessions/client/requests/SessionsFlightLegsV1Request.js} +0 -0
- /package/dist/cjs/api/{types/FlightAwareAlertPayload.js → resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.js} +0 -0
- /package/dist/cjs/api/types/{FlightAwareWebhookResponse.js → AlertCallback.js} +0 -0
- /package/dist/esm/api/resources/{tracking/resources/sessions/client/requests/SessionAddFlightReq1.mjs → flights/client/requests/FlightConnectionsSearchReq.mjs} +0 -0
- /package/dist/esm/api/resources/{tracking/resources/sessions/client/requests/SessionRemoveFlightReq1.mjs → operations/resources/operationsTasks/client/requests/OperationsTasksBulkUpdateDeadlinesReq1.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/sessions/client/requests/{SessionsSyncFlightStatusV1Request.mjs → SessionSetFlightInfoReq1.mjs} +0 -0
- /package/dist/esm/api/{types/FlightAwareAlertFlight.mjs → resources/tracking/resources/sessions/client/requests/SessionsFlightLegsV1Request.mjs} +0 -0
- /package/dist/esm/api/{types/FlightAwareAlertPayload.mjs → resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.mjs} +0 -0
- /package/dist/esm/api/types/{FlightAwareWebhookResponse.mjs → AlertCallback.mjs} +0 -0
|
@@ -431,7 +431,77 @@ class OperationsTasks {
|
|
|
431
431
|
});
|
|
432
432
|
}
|
|
433
433
|
/**
|
|
434
|
-
* Sets
|
|
434
|
+
* Sets deadline_timestamp on multiple OperationsTasks in one call, each scoped to the caller's organization. Task ids that don't exist or belong to another org are silently skipped; the response reports how many were updated. | authz: min_org_role=operator | (OperationsTasksBulkUpdateDeadlinesReq1) -> (OperationsTasksBulkUpdateDeadlinesRes1)
|
|
435
|
+
*
|
|
436
|
+
* @param {Chrt.operations.OperationsTasksBulkUpdateDeadlinesReq1} request
|
|
437
|
+
* @param {OperationsTasks.RequestOptions} requestOptions - Request-specific configuration.
|
|
438
|
+
*
|
|
439
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
440
|
+
*
|
|
441
|
+
* @example
|
|
442
|
+
* await client.operations.operationsTasks.bulkUpdateDeadlinesV1({
|
|
443
|
+
* operations_task_deadline_updates: [{
|
|
444
|
+
* task_id: "task_id",
|
|
445
|
+
* deadline_timestamp: "2024-01-15T09:30:00Z"
|
|
446
|
+
* }]
|
|
447
|
+
* })
|
|
448
|
+
*/
|
|
449
|
+
bulkUpdateDeadlinesV1(request, requestOptions) {
|
|
450
|
+
return core.HttpResponsePromise.fromPromise(this.__bulkUpdateDeadlinesV1(request, requestOptions));
|
|
451
|
+
}
|
|
452
|
+
__bulkUpdateDeadlinesV1(request, requestOptions) {
|
|
453
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
454
|
+
var _a, _b, _c, _d;
|
|
455
|
+
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);
|
|
456
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
457
|
+
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, "operations/operations_tasks/bulk_update_deadlines/v1"),
|
|
458
|
+
method: "PATCH",
|
|
459
|
+
headers: _headers,
|
|
460
|
+
contentType: "application/json",
|
|
461
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
462
|
+
requestType: "json",
|
|
463
|
+
body: request,
|
|
464
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
465
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
466
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
467
|
+
});
|
|
468
|
+
if (_response.ok) {
|
|
469
|
+
return {
|
|
470
|
+
data: _response.body,
|
|
471
|
+
rawResponse: _response.rawResponse,
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
if (_response.error.reason === "status-code") {
|
|
475
|
+
switch (_response.error.statusCode) {
|
|
476
|
+
case 422:
|
|
477
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
478
|
+
default:
|
|
479
|
+
throw new errors.ChrtError({
|
|
480
|
+
statusCode: _response.error.statusCode,
|
|
481
|
+
body: _response.error.body,
|
|
482
|
+
rawResponse: _response.rawResponse,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
switch (_response.error.reason) {
|
|
487
|
+
case "non-json":
|
|
488
|
+
throw new errors.ChrtError({
|
|
489
|
+
statusCode: _response.error.statusCode,
|
|
490
|
+
body: _response.error.rawBody,
|
|
491
|
+
rawResponse: _response.rawResponse,
|
|
492
|
+
});
|
|
493
|
+
case "timeout":
|
|
494
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /operations/operations_tasks/bulk_update_deadlines/v1.");
|
|
495
|
+
case "unknown":
|
|
496
|
+
throw new errors.ChrtError({
|
|
497
|
+
message: _response.error.errorMessage,
|
|
498
|
+
rawResponse: _response.rawResponse,
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Sets an OperationsTask's status (not_started / in_progress / completed / skipped / cancelled). Setting COMPLETED stamps completed_at/by; any other status clears them. | authz: min_org_role=operator | (OperationsTaskStatusReq) -> (bool)
|
|
435
505
|
*
|
|
436
506
|
* @param {string} taskId
|
|
437
507
|
* @param {Chrt.operations.OperationsTaskStatusReq} request
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* operations_task_deadline_updates: [{
|
|
9
|
+
* task_id: "task_id",
|
|
10
|
+
* deadline_timestamp: "2024-01-15T09:30:00Z"
|
|
11
|
+
* }]
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface OperationsTasksBulkUpdateDeadlinesReq1 {
|
|
15
|
+
operations_task_deadline_updates: Chrt.OperationsTaskDeadlineUpdate1[];
|
|
16
|
+
}
|
package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { type OperationsTasksListV1Request } from "./OperationsTasksListV1Request.js";
|
|
2
2
|
export { type OperationsTaskClientUpdate1 } from "./OperationsTaskClientUpdate1.js";
|
|
3
3
|
export { type OperationsTaskClientCreate1 } from "./OperationsTaskClientCreate1.js";
|
|
4
|
+
export { type OperationsTasksBulkUpdateDeadlinesReq1 } from "./OperationsTasksBulkUpdateDeadlinesReq1.js";
|
|
4
5
|
export { type OperationsTaskStatusReq } from "./OperationsTaskStatusReq.js";
|
|
5
6
|
export { type OperationsTaskAddCommentReq1 } from "./OperationsTaskAddCommentReq1.js";
|
package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export interface OrdersNewDraftReq {
|
|
|
17
17
|
department_id?: string | null;
|
|
18
18
|
/** OperationsTaskList ids to apply to the coordinator's Case at draft creation; foreign/stale ids are skipped without failing the draft. */
|
|
19
19
|
task_list_ids?: string[];
|
|
20
|
+
/** If set, pins the first applied OperationsTask's deadline; later from_previous_task entries cascade from it. None anchors the chain to the apply time (now). */
|
|
21
|
+
initial_deadline_timestamp?: string | null;
|
|
20
22
|
/** Optional key, unique per caller org, that makes draft creation idempotent: re-sending the same key returns the already-created draft instead of creating a duplicate. */
|
|
21
23
|
creation_idempotency_key?: string | null;
|
|
22
24
|
/** Seed content for the OrderThread's first user turn (text + long-lived references). Agentic builds supply it; click-ops leaves it None for a blank seed turn. */
|
|
@@ -30,28 +30,6 @@ export declare namespace Driver {
|
|
|
30
30
|
export declare class Driver {
|
|
31
31
|
protected readonly _options: Driver.Options;
|
|
32
32
|
constructor(_options?: Driver.Options);
|
|
33
|
-
/**
|
|
34
|
-
* Records driver location updates. Updates driver's last seen timestamp and location. Automatically records tracking data for all IN_PROGRESS task groups and their associated IN_TRANSIT cargos (cargo_by_driver). | auth: api_key | (LocationFeature) -> (DriverUpdateRes)
|
|
35
|
-
*
|
|
36
|
-
* @param {Chrt.LocationFeature} request
|
|
37
|
-
* @param {Driver.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
-
*
|
|
39
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* await client.tracking.driver.updateV1({
|
|
43
|
-
* type: "Feature",
|
|
44
|
-
* geometry: {
|
|
45
|
-
* type: "GeometryCollection",
|
|
46
|
-
* geometries: [{
|
|
47
|
-
* type: "LineString",
|
|
48
|
-
* coordinates: [[]]
|
|
49
|
-
* }]
|
|
50
|
-
* }
|
|
51
|
-
* })
|
|
52
|
-
*/
|
|
53
|
-
updateV1(request: Chrt.LocationFeature, requestOptions?: Driver.RequestOptions): core.HttpResponsePromise<Chrt.DriverUpdateRes>;
|
|
54
|
-
private __updateV1;
|
|
55
33
|
/**
|
|
56
34
|
* Records driver location updates with a client-supplied capture timestamp. Writes a driver_by_driver ping on every call, updates the driver's last seen, and records tracking data for all IN_PROGRESS task groups and their associated IN_TRANSIT cargos. | auth: api_key | (DriverByDriverDataPointClientCreate1) -> (DriverUpdateRes)
|
|
57
35
|
*
|
|
@@ -55,77 +55,6 @@ class Driver {
|
|
|
55
55
|
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
|
-
/**
|
|
59
|
-
* Records driver location updates. Updates driver's last seen timestamp and location. Automatically records tracking data for all IN_PROGRESS task groups and their associated IN_TRANSIT cargos (cargo_by_driver). | auth: api_key | (LocationFeature) -> (DriverUpdateRes)
|
|
60
|
-
*
|
|
61
|
-
* @param {Chrt.LocationFeature} request
|
|
62
|
-
* @param {Driver.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
-
*
|
|
64
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* await client.tracking.driver.updateV1({
|
|
68
|
-
* type: "Feature",
|
|
69
|
-
* geometry: {
|
|
70
|
-
* type: "GeometryCollection",
|
|
71
|
-
* geometries: [{
|
|
72
|
-
* type: "LineString",
|
|
73
|
-
* coordinates: [[]]
|
|
74
|
-
* }]
|
|
75
|
-
* }
|
|
76
|
-
* })
|
|
77
|
-
*/
|
|
78
|
-
updateV1(request, requestOptions) {
|
|
79
|
-
return core.HttpResponsePromise.fromPromise(this.__updateV1(request, requestOptions));
|
|
80
|
-
}
|
|
81
|
-
__updateV1(request, requestOptions) {
|
|
82
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
var _a, _b, _c, _d;
|
|
84
|
-
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);
|
|
85
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
86
|
-
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, "tracking/driver/update/v1"),
|
|
87
|
-
method: "POST",
|
|
88
|
-
headers: _headers,
|
|
89
|
-
contentType: "application/json",
|
|
90
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
91
|
-
requestType: "json",
|
|
92
|
-
body: request,
|
|
93
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
94
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
95
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
-
});
|
|
97
|
-
if (_response.ok) {
|
|
98
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
99
|
-
}
|
|
100
|
-
if (_response.error.reason === "status-code") {
|
|
101
|
-
switch (_response.error.statusCode) {
|
|
102
|
-
case 422:
|
|
103
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
104
|
-
default:
|
|
105
|
-
throw new errors.ChrtError({
|
|
106
|
-
statusCode: _response.error.statusCode,
|
|
107
|
-
body: _response.error.body,
|
|
108
|
-
rawResponse: _response.rawResponse,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
switch (_response.error.reason) {
|
|
113
|
-
case "non-json":
|
|
114
|
-
throw new errors.ChrtError({
|
|
115
|
-
statusCode: _response.error.statusCode,
|
|
116
|
-
body: _response.error.rawBody,
|
|
117
|
-
rawResponse: _response.rawResponse,
|
|
118
|
-
});
|
|
119
|
-
case "timeout":
|
|
120
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/driver/update/v1.");
|
|
121
|
-
case "unknown":
|
|
122
|
-
throw new errors.ChrtError({
|
|
123
|
-
message: _response.error.errorMessage,
|
|
124
|
-
rawResponse: _response.rawResponse,
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
58
|
/**
|
|
130
59
|
* Records driver location updates with a client-supplied capture timestamp. Writes a driver_by_driver ping on every call, updates the driver's last seen, and records tracking data for all IN_PROGRESS task groups and their associated IN_TRANSIT cargos. | auth: api_key | (DriverByDriverDataPointClientCreate1) -> (DriverUpdateRes)
|
|
131
60
|
*
|
|
@@ -51,7 +51,6 @@ export declare class Sessions {
|
|
|
51
51
|
* filter_device_id: "filter_device_id",
|
|
52
52
|
* filter_off_chrt_reference_id: "filter_off_chrt_reference_id",
|
|
53
53
|
* filter_flight_number: "filter_flight_number",
|
|
54
|
-
* filter_fa_flight_id: "filter_fa_flight_id",
|
|
55
54
|
* filter_flight_loaded_status: "filter_flight_loaded_status",
|
|
56
55
|
* filter_has_last_seen: true,
|
|
57
56
|
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -99,7 +98,7 @@ export declare class Sessions {
|
|
|
99
98
|
typeaheadV1(request: Chrt.tracking.SessionsTypeaheadV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<Chrt.TrackingTypeaheadResult[]>;
|
|
100
99
|
private __typeaheadV1;
|
|
101
100
|
/**
|
|
102
|
-
* Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Optionally seed a destination geofence (location + radius) to fire a destination geofence entered notification. Auto-termination is scheduled for ~1 week out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
|
|
101
|
+
* Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Optionally seed a destination geofence (location + radius) to fire a destination geofence entered notification; attach flights afterwards via set_flight_info. Auto-termination is scheduled for ~1 week out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
|
|
103
102
|
*
|
|
104
103
|
* @param {Chrt.tracking.SessionClientCreate1} request
|
|
105
104
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -146,7 +145,7 @@ export declare class Sessions {
|
|
|
146
145
|
updateSharedOrgsV1(request: Chrt.tracking.SessionsUpdateSharedOrgsReq1, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
147
146
|
private __updateSharedOrgsV1;
|
|
148
147
|
/**
|
|
149
|
-
* Terminates a session. Moves device.active_session_id to device.past_session_ids. | auth: api_key | () -> (bool)
|
|
148
|
+
* Terminates a session. Moves device.active_session_id to device.past_session_ids and deactivates the device. | auth: api_key | () -> (bool)
|
|
150
149
|
*
|
|
151
150
|
* @param {Chrt.tracking.SessionsTerminateV1Request} request
|
|
152
151
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -161,53 +160,59 @@ export declare class Sessions {
|
|
|
161
160
|
terminateV1(request: Chrt.tracking.SessionsTerminateV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
162
161
|
private __terminateV1;
|
|
163
162
|
/**
|
|
164
|
-
*
|
|
163
|
+
* Returns the session's flight legs in order, with Cirium-sourced status lazily resolved and refreshed on read. Access restricted to the caller's organization or shared organizations. | auth: api_key | authz: min_org_role=operator | () -> (list[FlightLeg1])
|
|
165
164
|
*
|
|
166
|
-
* @param {Chrt.tracking.
|
|
165
|
+
* @param {Chrt.tracking.SessionsFlightLegsV1Request} request
|
|
167
166
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
168
167
|
*
|
|
169
168
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
170
169
|
*
|
|
171
170
|
* @example
|
|
172
|
-
* await client.tracking.sessions.
|
|
173
|
-
* session_id: "session_id"
|
|
174
|
-
* flight_number: "flight_number",
|
|
175
|
-
* fa_flight_ids: ["fa_flight_ids"]
|
|
171
|
+
* await client.tracking.sessions.flightLegsV1({
|
|
172
|
+
* session_id: "session_id"
|
|
176
173
|
* })
|
|
177
174
|
*/
|
|
178
|
-
|
|
179
|
-
private
|
|
175
|
+
flightLegsV1(request: Chrt.tracking.SessionsFlightLegsV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<Chrt.FlightLeg1[]>;
|
|
176
|
+
private __flightLegsV1;
|
|
180
177
|
/**
|
|
181
|
-
*
|
|
178
|
+
* Returns the Cirium-sourced positional track for one of the session's flight legs — the live breadcrumb trail plus the planned path (waypoints + legacy route) — cached on read. Access restricted to the caller's organization or shared organizations. | auth: api_key | authz: min_org_role=operator | () -> (FlightTrackRes)
|
|
182
179
|
*
|
|
183
|
-
* @param {Chrt.tracking.
|
|
180
|
+
* @param {Chrt.tracking.SessionsFlightTrackV1Request} request
|
|
184
181
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
185
182
|
*
|
|
186
183
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
187
184
|
*
|
|
188
185
|
* @example
|
|
189
|
-
* await client.tracking.sessions.
|
|
186
|
+
* await client.tracking.sessions.flightTrackV1({
|
|
190
187
|
* session_id: "session_id",
|
|
191
|
-
*
|
|
192
|
-
* fa_flight_ids: ["fa_flight_ids"]
|
|
188
|
+
* flight_leg_id: "flight_leg_id"
|
|
193
189
|
* })
|
|
194
190
|
*/
|
|
195
|
-
|
|
196
|
-
private
|
|
191
|
+
flightTrackV1(request: Chrt.tracking.SessionsFlightTrackV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<Chrt.FlightTrackRes>;
|
|
192
|
+
private __flightTrackV1;
|
|
197
193
|
/**
|
|
198
|
-
*
|
|
194
|
+
* Replaces the session's followed flights: deletes the existing session-owned FlightLeg documents and creates new ones from the supplied flight details. Each leg's Cirium flightId and status resolve lazily on read. Pass an empty list to clear all flights. | auth: api_key | authz: min_org_role=operator | (SessionSetFlightInfoReq1) -> (bool)
|
|
199
195
|
*
|
|
200
|
-
* @param {Chrt.tracking.
|
|
196
|
+
* @param {Chrt.tracking.SessionSetFlightInfoReq1} request
|
|
201
197
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
202
198
|
*
|
|
203
199
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
204
200
|
*
|
|
205
201
|
* @example
|
|
206
|
-
* await client.tracking.sessions.
|
|
207
|
-
* session_id: "session_id"
|
|
202
|
+
* await client.tracking.sessions.setFlightInfoV1({
|
|
203
|
+
* session_id: "session_id",
|
|
204
|
+
* flight_legs: [{
|
|
205
|
+
* schema_version: 1,
|
|
206
|
+
* flight_number: "flight_number",
|
|
207
|
+
* provenance: "manual",
|
|
208
|
+
* origin_iata: "origin_iata",
|
|
209
|
+
* destination_iata: "destination_iata",
|
|
210
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
211
|
+
* carrier_iata: "carrier_iata"
|
|
212
|
+
* }]
|
|
208
213
|
* })
|
|
209
214
|
*/
|
|
210
|
-
|
|
211
|
-
private
|
|
215
|
+
setFlightInfoV1(request: Chrt.tracking.SessionSetFlightInfoReq1, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
216
|
+
private __setFlightInfoV1;
|
|
212
217
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
213
218
|
}
|
|
@@ -87,7 +87,6 @@ class Sessions {
|
|
|
87
87
|
* filter_device_id: "filter_device_id",
|
|
88
88
|
* filter_off_chrt_reference_id: "filter_off_chrt_reference_id",
|
|
89
89
|
* filter_flight_number: "filter_flight_number",
|
|
90
|
-
* filter_fa_flight_id: "filter_fa_flight_id",
|
|
91
90
|
* filter_flight_loaded_status: "filter_flight_loaded_status",
|
|
92
91
|
* filter_has_last_seen: true,
|
|
93
92
|
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -106,7 +105,7 @@ class Sessions {
|
|
|
106
105
|
__listV1() {
|
|
107
106
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
108
107
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
109
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, org_scope: orgScope, filter_terminated: filterTerminated, filter_public: filterPublic, filter_device_id: filterDeviceId, filter_off_chrt_reference_id: filterOffChrtReferenceId, filter_flight_number: filterFlightNumber,
|
|
108
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, org_scope: orgScope, filter_terminated: filterTerminated, filter_public: filterPublic, filter_device_id: filterDeviceId, filter_off_chrt_reference_id: filterOffChrtReferenceId, filter_flight_number: filterFlightNumber, filter_flight_loaded_status: filterFlightLoadedStatus, filter_has_last_seen: filterHasLastSeen, filter_created_at_timestamp_gte: filterCreatedAtTimestampGte, filter_created_at_timestamp_lte: filterCreatedAtTimestampLte, filter_last_seen_at_timestamp_gte: filterLastSeenAtTimestampGte, filter_last_seen_at_timestamp_lte: filterLastSeenAtTimestampLte, filter_termination_scheduled_for_timestamp_gte: filterTerminationScheduledForTimestampGte, filter_termination_scheduled_for_timestamp_lte: filterTerminationScheduledForTimestampLte, filter_terminated_at_timestamp_gte: filterTerminatedAtTimestampGte, filter_terminated_at_timestamp_lte: filterTerminatedAtTimestampLte, } = request;
|
|
110
109
|
const _queryParams = {};
|
|
111
110
|
if (sortBy !== undefined) {
|
|
112
111
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -141,9 +140,6 @@ class Sessions {
|
|
|
141
140
|
if (filterFlightNumber !== undefined) {
|
|
142
141
|
_queryParams["filter_flight_number"] = filterFlightNumber;
|
|
143
142
|
}
|
|
144
|
-
if (filterFaFlightId !== undefined) {
|
|
145
|
-
_queryParams["filter_fa_flight_id"] = filterFaFlightId;
|
|
146
|
-
}
|
|
147
143
|
if (filterFlightLoadedStatus !== undefined) {
|
|
148
144
|
_queryParams["filter_flight_loaded_status"] = filterFlightLoadedStatus;
|
|
149
145
|
}
|
|
@@ -353,7 +349,7 @@ class Sessions {
|
|
|
353
349
|
});
|
|
354
350
|
}
|
|
355
351
|
/**
|
|
356
|
-
* Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Optionally seed a destination geofence (location + radius) to fire a destination geofence entered notification. Auto-termination is scheduled for ~1 week out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
|
|
352
|
+
* Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Optionally seed a destination geofence (location + radius) to fire a destination geofence entered notification; attach flights afterwards via set_flight_info. Auto-termination is scheduled for ~1 week out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
|
|
357
353
|
*
|
|
358
354
|
* @param {Chrt.tracking.SessionClientCreate1} request
|
|
359
355
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -556,7 +552,7 @@ class Sessions {
|
|
|
556
552
|
});
|
|
557
553
|
}
|
|
558
554
|
/**
|
|
559
|
-
* Terminates a session. Moves device.active_session_id to device.past_session_ids. | auth: api_key | () -> (bool)
|
|
555
|
+
* Terminates a session. Moves device.active_session_id to device.past_session_ids and deactivates the device. | auth: api_key | () -> (bool)
|
|
560
556
|
*
|
|
561
557
|
* @param {Chrt.tracking.SessionsTerminateV1Request} request
|
|
562
558
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -620,35 +616,33 @@ class Sessions {
|
|
|
620
616
|
});
|
|
621
617
|
}
|
|
622
618
|
/**
|
|
623
|
-
*
|
|
619
|
+
* Returns the session's flight legs in order, with Cirium-sourced status lazily resolved and refreshed on read. Access restricted to the caller's organization or shared organizations. | auth: api_key | authz: min_org_role=operator | () -> (list[FlightLeg1])
|
|
624
620
|
*
|
|
625
|
-
* @param {Chrt.tracking.
|
|
621
|
+
* @param {Chrt.tracking.SessionsFlightLegsV1Request} request
|
|
626
622
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
627
623
|
*
|
|
628
624
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
629
625
|
*
|
|
630
626
|
* @example
|
|
631
|
-
* await client.tracking.sessions.
|
|
632
|
-
* session_id: "session_id"
|
|
633
|
-
* flight_number: "flight_number",
|
|
634
|
-
* fa_flight_ids: ["fa_flight_ids"]
|
|
627
|
+
* await client.tracking.sessions.flightLegsV1({
|
|
628
|
+
* session_id: "session_id"
|
|
635
629
|
* })
|
|
636
630
|
*/
|
|
637
|
-
|
|
638
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
631
|
+
flightLegsV1(request, requestOptions) {
|
|
632
|
+
return core.HttpResponsePromise.fromPromise(this.__flightLegsV1(request, requestOptions));
|
|
639
633
|
}
|
|
640
|
-
|
|
634
|
+
__flightLegsV1(request, requestOptions) {
|
|
641
635
|
return __awaiter(this, void 0, void 0, function* () {
|
|
642
636
|
var _a, _b, _c, _d;
|
|
637
|
+
const { session_id: sessionId } = request;
|
|
638
|
+
const _queryParams = {};
|
|
639
|
+
_queryParams["session_id"] = sessionId;
|
|
643
640
|
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);
|
|
644
641
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
645
|
-
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, "tracking/sessions/
|
|
646
|
-
method: "
|
|
642
|
+
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, "tracking/sessions/flight_legs/v1"),
|
|
643
|
+
method: "GET",
|
|
647
644
|
headers: _headers,
|
|
648
|
-
|
|
649
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
650
|
-
requestType: "json",
|
|
651
|
-
body: request,
|
|
645
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
652
646
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
653
647
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
654
648
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -676,7 +670,7 @@ class Sessions {
|
|
|
676
670
|
rawResponse: _response.rawResponse,
|
|
677
671
|
});
|
|
678
672
|
case "timeout":
|
|
679
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
673
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/sessions/flight_legs/v1.");
|
|
680
674
|
case "unknown":
|
|
681
675
|
throw new errors.ChrtError({
|
|
682
676
|
message: _response.error.errorMessage,
|
|
@@ -686,35 +680,35 @@ class Sessions {
|
|
|
686
680
|
});
|
|
687
681
|
}
|
|
688
682
|
/**
|
|
689
|
-
*
|
|
683
|
+
* Returns the Cirium-sourced positional track for one of the session's flight legs — the live breadcrumb trail plus the planned path (waypoints + legacy route) — cached on read. Access restricted to the caller's organization or shared organizations. | auth: api_key | authz: min_org_role=operator | () -> (FlightTrackRes)
|
|
690
684
|
*
|
|
691
|
-
* @param {Chrt.tracking.
|
|
685
|
+
* @param {Chrt.tracking.SessionsFlightTrackV1Request} request
|
|
692
686
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
693
687
|
*
|
|
694
688
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
695
689
|
*
|
|
696
690
|
* @example
|
|
697
|
-
* await client.tracking.sessions.
|
|
691
|
+
* await client.tracking.sessions.flightTrackV1({
|
|
698
692
|
* session_id: "session_id",
|
|
699
|
-
*
|
|
700
|
-
* fa_flight_ids: ["fa_flight_ids"]
|
|
693
|
+
* flight_leg_id: "flight_leg_id"
|
|
701
694
|
* })
|
|
702
695
|
*/
|
|
703
|
-
|
|
704
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
696
|
+
flightTrackV1(request, requestOptions) {
|
|
697
|
+
return core.HttpResponsePromise.fromPromise(this.__flightTrackV1(request, requestOptions));
|
|
705
698
|
}
|
|
706
|
-
|
|
699
|
+
__flightTrackV1(request, requestOptions) {
|
|
707
700
|
return __awaiter(this, void 0, void 0, function* () {
|
|
708
701
|
var _a, _b, _c, _d;
|
|
702
|
+
const { session_id: sessionId, flight_leg_id: flightLegId } = request;
|
|
703
|
+
const _queryParams = {};
|
|
704
|
+
_queryParams["session_id"] = sessionId;
|
|
705
|
+
_queryParams["flight_leg_id"] = flightLegId;
|
|
709
706
|
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);
|
|
710
707
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
711
|
-
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, "tracking/sessions/
|
|
712
|
-
method: "
|
|
708
|
+
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, "tracking/sessions/flight_track/v1"),
|
|
709
|
+
method: "GET",
|
|
713
710
|
headers: _headers,
|
|
714
|
-
|
|
715
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
716
|
-
requestType: "json",
|
|
717
|
-
body: request,
|
|
711
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
718
712
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
719
713
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
720
714
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -742,7 +736,7 @@ class Sessions {
|
|
|
742
736
|
rawResponse: _response.rawResponse,
|
|
743
737
|
});
|
|
744
738
|
case "timeout":
|
|
745
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
739
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/sessions/flight_track/v1.");
|
|
746
740
|
case "unknown":
|
|
747
741
|
throw new errors.ChrtError({
|
|
748
742
|
message: _response.error.errorMessage,
|
|
@@ -752,33 +746,42 @@ class Sessions {
|
|
|
752
746
|
});
|
|
753
747
|
}
|
|
754
748
|
/**
|
|
755
|
-
*
|
|
749
|
+
* Replaces the session's followed flights: deletes the existing session-owned FlightLeg documents and creates new ones from the supplied flight details. Each leg's Cirium flightId and status resolve lazily on read. Pass an empty list to clear all flights. | auth: api_key | authz: min_org_role=operator | (SessionSetFlightInfoReq1) -> (bool)
|
|
756
750
|
*
|
|
757
|
-
* @param {Chrt.tracking.
|
|
751
|
+
* @param {Chrt.tracking.SessionSetFlightInfoReq1} request
|
|
758
752
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
759
753
|
*
|
|
760
754
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
761
755
|
*
|
|
762
756
|
* @example
|
|
763
|
-
* await client.tracking.sessions.
|
|
764
|
-
* session_id: "session_id"
|
|
757
|
+
* await client.tracking.sessions.setFlightInfoV1({
|
|
758
|
+
* session_id: "session_id",
|
|
759
|
+
* flight_legs: [{
|
|
760
|
+
* schema_version: 1,
|
|
761
|
+
* flight_number: "flight_number",
|
|
762
|
+
* provenance: "manual",
|
|
763
|
+
* origin_iata: "origin_iata",
|
|
764
|
+
* destination_iata: "destination_iata",
|
|
765
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
766
|
+
* carrier_iata: "carrier_iata"
|
|
767
|
+
* }]
|
|
765
768
|
* })
|
|
766
769
|
*/
|
|
767
|
-
|
|
768
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
770
|
+
setFlightInfoV1(request, requestOptions) {
|
|
771
|
+
return core.HttpResponsePromise.fromPromise(this.__setFlightInfoV1(request, requestOptions));
|
|
769
772
|
}
|
|
770
|
-
|
|
773
|
+
__setFlightInfoV1(request, requestOptions) {
|
|
771
774
|
return __awaiter(this, void 0, void 0, function* () {
|
|
772
775
|
var _a, _b, _c, _d;
|
|
773
|
-
const { session_id: sessionId } = request;
|
|
774
|
-
const _queryParams = {};
|
|
775
|
-
_queryParams["session_id"] = sessionId;
|
|
776
776
|
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);
|
|
777
777
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
778
|
-
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, "tracking/sessions/
|
|
778
|
+
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, "tracking/sessions/set_flight_info/v1"),
|
|
779
779
|
method: "POST",
|
|
780
780
|
headers: _headers,
|
|
781
|
-
|
|
781
|
+
contentType: "application/json",
|
|
782
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
783
|
+
requestType: "json",
|
|
784
|
+
body: request,
|
|
782
785
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
783
786
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
784
787
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -806,7 +809,7 @@ class Sessions {
|
|
|
806
809
|
rawResponse: _response.rawResponse,
|
|
807
810
|
});
|
|
808
811
|
case "timeout":
|
|
809
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/
|
|
812
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/set_flight_info/v1.");
|
|
810
813
|
case "unknown":
|
|
811
814
|
throw new errors.ChrtError({
|
|
812
815
|
message: _response.error.errorMessage,
|
package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionClientCreate1.d.ts
CHANGED
|
@@ -20,8 +20,6 @@ export interface SessionClientCreate1 {
|
|
|
20
20
|
public?: boolean;
|
|
21
21
|
off_chrt_shipper_org_id?: string | null;
|
|
22
22
|
termination_scheduled_for_timestamp?: string | null;
|
|
23
|
-
flight_numbers?: string[];
|
|
24
|
-
fa_flight_ids?: string[];
|
|
25
23
|
destination_geofence_location?: Chrt.LocationFeature | null;
|
|
26
24
|
destination_geofence_radius_miles?: number;
|
|
27
25
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* session_id: "session_id",
|
|
9
|
+
* flight_legs: [{
|
|
10
|
+
* schema_version: 1,
|
|
11
|
+
* flight_number: "flight_number",
|
|
12
|
+
* provenance: "manual",
|
|
13
|
+
* origin_iata: "origin_iata",
|
|
14
|
+
* destination_iata: "destination_iata",
|
|
15
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
16
|
+
* carrier_iata: "carrier_iata"
|
|
17
|
+
* }]
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
export interface SessionSetFlightInfoReq1 {
|
|
21
|
+
session_id: string;
|
|
22
|
+
/** Ordered list of flights to follow for the session. Replaces any existing flight legs. Pass an empty list to clear all flight legs. */
|
|
23
|
+
flight_legs: Chrt.FlightLegClientCreate1[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* session_id: "session_id",
|
|
8
|
+
* flight_leg_id: "flight_leg_id"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface SessionsFlightTrackV1Request {
|
|
12
|
+
session_id: string;
|
|
13
|
+
flight_leg_id: string;
|
|
14
|
+
}
|