@chrt-inc/typescript-sdk 1.421.0 → 1.421.1
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/tracking/resources/devices/client/Client.d.ts +39 -52
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +94 -147
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/{DevicesRegisterToOrgReq1.d.ts → DeviceClientCreate1.d.ts} +4 -2
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DeviceClientUpdate1.d.ts +19 -0
- package/dist/{esm/api/resources/tracking/resources/sessions/client/requests/SessionsStartV1Request.d.mts → cjs/api/resources/tracking/resources/devices/client/requests/DevicesArchiveV1Request.d.ts} +3 -3
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesGetV1Request.d.ts +1 -3
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesListV1Request.d.ts +12 -12
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesSearchV1Request.d.ts +6 -2
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesTypeaheadV1Request.d.ts +20 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUpdateSharedOrgsReq1.d.ts +14 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/index.d.ts +5 -6
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +65 -52
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +160 -106
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionAddFlightReq1.d.ts +16 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionClientCreate1.d.ts +22 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionClientUpdate1.d.ts +19 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionRemoveFlightReq1.d.ts +16 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.ts +31 -19
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsSearchV1Request.d.ts +6 -2
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/{SessionsPauseRecordingV1Request.d.ts → SessionsSyncFlightStatusV1Request.d.ts} +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsTypeaheadV1Request.d.ts +20 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/{SessionsStartV1Request.d.ts → SessionsUpdateSharedOrgsReq1.d.ts} +3 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/index.d.ts +7 -7
- package/dist/cjs/api/types/DeviceExpandedRes.d.ts +11 -0
- package/dist/cjs/api/types/{Device1.d.ts → DeviceLimitedForList1.d.ts} +16 -6
- package/dist/cjs/api/types/DeviceListRes.d.ts +1 -1
- package/dist/cjs/api/types/DeviceSearchRes.d.ts +1 -1
- package/dist/cjs/api/types/FlightStatusEnum.d.ts +14 -0
- package/dist/cjs/api/types/FlightStatusEnum.js +16 -0
- package/dist/cjs/api/types/Session1.d.ts +15 -8
- package/dist/cjs/api/types/SessionSortByEnum.d.ts +4 -3
- package/dist/cjs/api/types/SessionSortByEnum.js +3 -2
- package/dist/cjs/api/types/TrackingOrgScopeEnum.d.ts +9 -0
- package/dist/cjs/api/types/TrackingOrgScopeEnum.js +11 -0
- package/dist/cjs/api/types/TrackingTypeaheadFieldEnum.d.ts +8 -0
- package/dist/cjs/api/types/TrackingTypeaheadFieldEnum.js +10 -0
- package/dist/cjs/api/types/TrackingTypeaheadResult.d.ts +8 -0
- package/dist/cjs/api/types/index.d.ts +6 -2
- package/dist/cjs/api/types/index.js +6 -2
- 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/tracking/resources/devices/client/Client.d.mts +39 -52
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +94 -147
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/{DevicesRegisterToOrgReq1.d.mts → DeviceClientCreate1.d.mts} +4 -2
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DeviceClientUpdate1.d.mts +19 -0
- package/dist/esm/api/resources/tracking/resources/{sessions/client/requests/SessionsDeleteV1Request.d.mts → devices/client/requests/DevicesArchiveV1Request.d.mts} +3 -3
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesGetV1Request.d.mts +1 -3
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesListV1Request.d.mts +12 -12
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesSearchV1Request.d.mts +6 -2
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesTypeaheadV1Request.d.mts +20 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUpdateSharedOrgsReq1.d.mts +14 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/index.d.mts +5 -6
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +65 -52
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +160 -106
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionAddFlightReq1.d.mts +16 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionClientCreate1.d.mts +22 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionClientUpdate1.d.mts +19 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionRemoveFlightReq1.d.mts +16 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.mts +31 -19
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsSearchV1Request.d.mts +6 -2
- package/dist/{cjs/api/resources/tracking/resources/sessions/client/requests/SessionsDeleteV1Request.d.ts → esm/api/resources/tracking/resources/sessions/client/requests/SessionsSyncFlightStatusV1Request.d.mts} +1 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsTypeaheadV1Request.d.mts +20 -0
- package/dist/{cjs/api/resources/tracking/resources/sessions/client/requests/SessionsResumeRecordingV1Request.d.ts → esm/api/resources/tracking/resources/sessions/client/requests/SessionsUpdateSharedOrgsReq1.d.mts} +3 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/index.d.mts +7 -7
- package/dist/esm/api/types/DeviceExpandedRes.d.mts +11 -0
- package/dist/esm/api/types/{Device1.d.mts → DeviceLimitedForList1.d.mts} +16 -6
- package/dist/esm/api/types/DeviceListRes.d.mts +1 -1
- package/dist/esm/api/types/DeviceSearchRes.d.mts +1 -1
- package/dist/esm/api/types/FlightStatusEnum.d.mts +14 -0
- package/dist/esm/api/types/FlightStatusEnum.mjs +13 -0
- package/dist/esm/api/types/Session1.d.mts +15 -8
- package/dist/esm/api/types/SessionSortByEnum.d.mts +4 -3
- package/dist/esm/api/types/SessionSortByEnum.mjs +3 -2
- package/dist/esm/api/types/TrackingOrgScopeEnum.d.mts +9 -0
- package/dist/esm/api/types/TrackingOrgScopeEnum.mjs +8 -0
- package/dist/esm/api/types/TrackingTypeaheadFieldEnum.d.mts +8 -0
- package/dist/esm/api/types/TrackingTypeaheadFieldEnum.mjs +7 -0
- package/dist/esm/api/types/TrackingTypeaheadResult.d.mts +8 -0
- package/dist/esm/api/types/index.d.mts +6 -2
- package/dist/esm/api/types/index.mjs +6 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +82 -132
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesDeleteV1Request.d.ts +0 -14
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoV1Request.d.ts +0 -14
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesTypeaheadOffChrtOrderIdV1Request.d.ts +0 -16
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoV1Request.d.ts +0 -12
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUpdateRequest1.d.ts +0 -18
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionCreateSessionRequest1.d.ts +0 -16
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionUpdateRequest1.d.ts +0 -20
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsTypeaheadOffChrtOrderIdV1Request.d.ts +0 -16
- package/dist/cjs/api/types/SessionDeleteResponse1.d.ts +0 -7
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesDeleteV1Request.d.mts +0 -14
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoV1Request.d.mts +0 -14
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesTypeaheadOffChrtOrderIdV1Request.d.mts +0 -16
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoV1Request.d.mts +0 -12
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUpdateRequest1.d.mts +0 -18
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionCreateSessionRequest1.d.mts +0 -16
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionUpdateRequest1.d.mts +0 -20
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsPauseRecordingV1Request.d.mts +0 -12
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsResumeRecordingV1Request.d.mts +0 -12
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsTypeaheadOffChrtOrderIdV1Request.d.mts +0 -16
- package/dist/esm/api/types/SessionDeleteResponse1.d.mts +0 -7
- /package/dist/cjs/api/resources/tracking/resources/devices/client/requests/{DevicesDeleteV1Request.js → DeviceClientCreate1.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/devices/client/requests/{DevicesLinkToCargoV1Request.js → DeviceClientUpdate1.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/devices/client/requests/{DevicesRegisterToOrgReq1.js → DevicesArchiveV1Request.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/devices/client/requests/{DevicesTypeaheadOffChrtOrderIdV1Request.js → DevicesTypeaheadV1Request.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/devices/client/requests/{DevicesUnlinkFromCargoV1Request.js → DevicesUpdateSharedOrgsReq1.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{devices/client/requests/DevicesUpdateRequest1.js → sessions/client/requests/SessionAddFlightReq1.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/{SessionCreateSessionRequest1.js → SessionClientCreate1.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/{SessionUpdateRequest1.js → SessionClientUpdate1.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/{SessionsDeleteV1Request.js → SessionRemoveFlightReq1.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/{SessionsPauseRecordingV1Request.js → SessionsSyncFlightStatusV1Request.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/{SessionsResumeRecordingV1Request.js → SessionsTypeaheadV1Request.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/{SessionsStartV1Request.js → SessionsUpdateSharedOrgsReq1.js} +0 -0
- /package/dist/cjs/api/{resources/tracking/resources/sessions/client/requests/SessionsTypeaheadOffChrtOrderIdV1Request.js → types/DeviceExpandedRes.js} +0 -0
- /package/dist/cjs/api/types/{Device1.js → DeviceLimitedForList1.js} +0 -0
- /package/dist/cjs/api/types/{SessionDeleteResponse1.js → TrackingTypeaheadResult.js} +0 -0
- /package/dist/esm/api/resources/tracking/resources/devices/client/requests/{DevicesDeleteV1Request.mjs → DeviceClientCreate1.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/devices/client/requests/{DevicesLinkToCargoV1Request.mjs → DeviceClientUpdate1.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/devices/client/requests/{DevicesRegisterToOrgReq1.mjs → DevicesArchiveV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/devices/client/requests/{DevicesTypeaheadOffChrtOrderIdV1Request.mjs → DevicesTypeaheadV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/devices/client/requests/{DevicesUnlinkFromCargoV1Request.mjs → DevicesUpdateSharedOrgsReq1.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/{devices/client/requests/DevicesUpdateRequest1.mjs → sessions/client/requests/SessionAddFlightReq1.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/sessions/client/requests/{SessionCreateSessionRequest1.mjs → SessionClientCreate1.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/sessions/client/requests/{SessionUpdateRequest1.mjs → SessionClientUpdate1.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/sessions/client/requests/{SessionsDeleteV1Request.mjs → SessionRemoveFlightReq1.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/sessions/client/requests/{SessionsPauseRecordingV1Request.mjs → SessionsSyncFlightStatusV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/sessions/client/requests/{SessionsResumeRecordingV1Request.mjs → SessionsTypeaheadV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/sessions/client/requests/{SessionsStartV1Request.mjs → SessionsUpdateSharedOrgsReq1.mjs} +0 -0
- /package/dist/esm/api/{resources/tracking/resources/sessions/client/requests/SessionsTypeaheadOffChrtOrderIdV1Request.mjs → types/DeviceExpandedRes.mjs} +0 -0
- /package/dist/esm/api/types/{Device1.mjs → DeviceLimitedForList1.mjs} +0 -0
- /package/dist/esm/api/types/{SessionDeleteResponse1.mjs → TrackingTypeaheadResult.mjs} +0 -0
|
@@ -10,6 +10,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
13
24
|
import * as environments from "../../../../../../environments.mjs";
|
|
14
25
|
import * as core from "../../../../../../core/index.mjs";
|
|
15
26
|
import * as Chrt from "../../../../../index.mjs";
|
|
@@ -20,7 +31,7 @@ export class Sessions {
|
|
|
20
31
|
this._options = _options;
|
|
21
32
|
}
|
|
22
33
|
/**
|
|
23
|
-
* Lists sessions with filtering, sorting, and pagination. | authz: min_org_role=operator | () -> (SessionListRes)
|
|
34
|
+
* Lists sessions with filtering, sorting, and pagination. Use org_scope to restrict to owned, shared, or both (default). | authz: min_org_role=operator | () -> (SessionListRes)
|
|
24
35
|
*
|
|
25
36
|
* @param {Chrt.tracking.SessionsListV1Request} request
|
|
26
37
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -29,20 +40,24 @@ export class Sessions {
|
|
|
29
40
|
*
|
|
30
41
|
* @example
|
|
31
42
|
* await client.tracking.sessions.listV1({
|
|
32
|
-
* sort_by: "
|
|
43
|
+
* sort_by: "created_at_timestamp",
|
|
33
44
|
* sort_order: "asc",
|
|
34
45
|
* page: 1,
|
|
35
46
|
* page_size: 1,
|
|
36
|
-
*
|
|
47
|
+
* org_scope: "owned",
|
|
37
48
|
* filter_terminated: true,
|
|
38
49
|
* filter_public: true,
|
|
39
50
|
* filter_device_id: "filter_device_id",
|
|
40
|
-
*
|
|
51
|
+
* filter_off_chrt_reference_id: "filter_off_chrt_reference_id",
|
|
41
52
|
* filter_flight_number: "filter_flight_number",
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
53
|
+
* filter_fa_flight_id: "filter_fa_flight_id",
|
|
54
|
+
* filter_flight_loaded_status: "filter_flight_loaded_status",
|
|
55
|
+
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
56
|
+
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
57
|
+
* filter_termination_scheduled_for_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
58
|
+
* filter_termination_scheduled_for_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
59
|
+
* filter_terminated_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
60
|
+
* filter_terminated_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
46
61
|
* })
|
|
47
62
|
*/
|
|
48
63
|
listV1(request = {}, requestOptions) {
|
|
@@ -50,8 +65,8 @@ export class Sessions {
|
|
|
50
65
|
}
|
|
51
66
|
__listV1() {
|
|
52
67
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
53
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
54
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize,
|
|
68
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
69
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, org_scope: orgScope, filter_terminated: filterTerminated, filter_public: filterPublic, filter_device_id: filterDeviceId, filter_off_chrt_reference_id: filterOffChrtReferenceId, filter_flight_number: filterFlightNumber, filter_fa_flight_id: filterFaFlightId, filter_flight_loaded_status: filterFlightLoadedStatus, filter_created_at_timestamp_gte: filterCreatedAtTimestampGte, filter_created_at_timestamp_lte: filterCreatedAtTimestampLte, 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;
|
|
55
70
|
const _queryParams = {};
|
|
56
71
|
if (sortBy !== undefined) {
|
|
57
72
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -65,39 +80,51 @@ export class Sessions {
|
|
|
65
80
|
if (pageSize !== undefined) {
|
|
66
81
|
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
67
82
|
}
|
|
68
|
-
if (
|
|
69
|
-
_queryParams["
|
|
83
|
+
if (orgScope !== undefined) {
|
|
84
|
+
_queryParams["org_scope"] = orgScope;
|
|
70
85
|
}
|
|
71
86
|
if (filterTerminated !== undefined) {
|
|
72
|
-
_queryParams["filter_terminated"] = (
|
|
87
|
+
_queryParams["filter_terminated"] = (_c = filterTerminated === null || filterTerminated === void 0 ? void 0 : filterTerminated.toString()) !== null && _c !== void 0 ? _c : null;
|
|
73
88
|
}
|
|
74
89
|
if (filterPublic !== undefined) {
|
|
75
|
-
_queryParams["filter_public"] = (
|
|
90
|
+
_queryParams["filter_public"] = (_d = filterPublic === null || filterPublic === void 0 ? void 0 : filterPublic.toString()) !== null && _d !== void 0 ? _d : null;
|
|
76
91
|
}
|
|
77
92
|
if (filterDeviceId !== undefined) {
|
|
78
93
|
_queryParams["filter_device_id"] = filterDeviceId;
|
|
79
94
|
}
|
|
80
|
-
if (
|
|
81
|
-
_queryParams["
|
|
95
|
+
if (filterOffChrtReferenceId !== undefined) {
|
|
96
|
+
_queryParams["filter_off_chrt_reference_id"] = filterOffChrtReferenceId;
|
|
82
97
|
}
|
|
83
98
|
if (filterFlightNumber !== undefined) {
|
|
84
99
|
_queryParams["filter_flight_number"] = filterFlightNumber;
|
|
85
100
|
}
|
|
86
|
-
if (
|
|
87
|
-
_queryParams["
|
|
101
|
+
if (filterFaFlightId !== undefined) {
|
|
102
|
+
_queryParams["filter_fa_flight_id"] = filterFaFlightId;
|
|
103
|
+
}
|
|
104
|
+
if (filterFlightLoadedStatus !== undefined) {
|
|
105
|
+
_queryParams["filter_flight_loaded_status"] = filterFlightLoadedStatus;
|
|
106
|
+
}
|
|
107
|
+
if (filterCreatedAtTimestampGte !== undefined) {
|
|
108
|
+
_queryParams["filter_created_at_timestamp_gte"] = filterCreatedAtTimestampGte;
|
|
109
|
+
}
|
|
110
|
+
if (filterCreatedAtTimestampLte !== undefined) {
|
|
111
|
+
_queryParams["filter_created_at_timestamp_lte"] = filterCreatedAtTimestampLte;
|
|
88
112
|
}
|
|
89
|
-
if (
|
|
90
|
-
_queryParams["
|
|
113
|
+
if (filterTerminationScheduledForTimestampGte !== undefined) {
|
|
114
|
+
_queryParams["filter_termination_scheduled_for_timestamp_gte"] = filterTerminationScheduledForTimestampGte;
|
|
91
115
|
}
|
|
92
|
-
if (
|
|
93
|
-
_queryParams["
|
|
116
|
+
if (filterTerminationScheduledForTimestampLte !== undefined) {
|
|
117
|
+
_queryParams["filter_termination_scheduled_for_timestamp_lte"] = filterTerminationScheduledForTimestampLte;
|
|
94
118
|
}
|
|
95
|
-
if (
|
|
96
|
-
_queryParams["
|
|
119
|
+
if (filterTerminatedAtTimestampGte !== undefined) {
|
|
120
|
+
_queryParams["filter_terminated_at_timestamp_gte"] = filterTerminatedAtTimestampGte;
|
|
97
121
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
122
|
+
if (filterTerminatedAtTimestampLte !== undefined) {
|
|
123
|
+
_queryParams["filter_terminated_at_timestamp_lte"] = filterTerminatedAtTimestampLte;
|
|
124
|
+
}
|
|
125
|
+
let _headers = mergeHeaders((_e = this._options) === null || _e === void 0 ? void 0 : _e.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
126
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
127
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.ChrtEnvironment.Local, "tracking/sessions/list/v1"),
|
|
101
128
|
method: "GET",
|
|
102
129
|
headers: _headers,
|
|
103
130
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -138,7 +165,7 @@ export class Sessions {
|
|
|
138
165
|
});
|
|
139
166
|
}
|
|
140
167
|
/**
|
|
141
|
-
* Retrieves a single session by its ID. Access restricted to the caller's organization. | authz: min_org_role=operator | () -> (Session1)
|
|
168
|
+
* Retrieves a single session by its ID. Access restricted to the caller's organization or shared organizations. | authz: min_org_role=operator | () -> (Session1)
|
|
142
169
|
*
|
|
143
170
|
* @param {Chrt.tracking.SessionsGetV1Request} request
|
|
144
171
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -202,34 +229,38 @@ export class Sessions {
|
|
|
202
229
|
});
|
|
203
230
|
}
|
|
204
231
|
/**
|
|
205
|
-
* Returns distinct
|
|
232
|
+
* Returns distinct device_mac_address and off_chrt_reference_id values matching the query via case-insensitive regex, searching sessions. Use org_scope to restrict to owned, shared, or both (default). | authz: min_org_role=operator | () -> (list[TrackingTypeaheadResult])
|
|
206
233
|
*
|
|
207
|
-
* @param {Chrt.tracking.
|
|
234
|
+
* @param {Chrt.tracking.SessionsTypeaheadV1Request} request
|
|
208
235
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
209
236
|
*
|
|
210
237
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
211
238
|
*
|
|
212
239
|
* @example
|
|
213
|
-
* await client.tracking.sessions.
|
|
240
|
+
* await client.tracking.sessions.typeaheadV1({
|
|
214
241
|
* query: "query",
|
|
215
|
-
* limit: 1
|
|
242
|
+
* limit: 1,
|
|
243
|
+
* org_scope: "owned"
|
|
216
244
|
* })
|
|
217
245
|
*/
|
|
218
|
-
|
|
219
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
246
|
+
typeaheadV1(request, requestOptions) {
|
|
247
|
+
return core.HttpResponsePromise.fromPromise(this.__typeaheadV1(request, requestOptions));
|
|
220
248
|
}
|
|
221
|
-
|
|
249
|
+
__typeaheadV1(request, requestOptions) {
|
|
222
250
|
return __awaiter(this, void 0, void 0, function* () {
|
|
223
251
|
var _a, _b, _c, _d, _e;
|
|
224
|
-
const { query, limit } = request;
|
|
252
|
+
const { query, limit, org_scope: orgScope } = request;
|
|
225
253
|
const _queryParams = {};
|
|
226
254
|
_queryParams["query"] = query;
|
|
227
255
|
if (limit !== undefined) {
|
|
228
256
|
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
229
257
|
}
|
|
258
|
+
if (orgScope !== undefined) {
|
|
259
|
+
_queryParams["org_scope"] = orgScope;
|
|
260
|
+
}
|
|
230
261
|
let _headers = mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
231
262
|
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
232
|
-
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/sessions/typeahead/
|
|
263
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/sessions/typeahead/v1"),
|
|
233
264
|
method: "GET",
|
|
234
265
|
headers: _headers,
|
|
235
266
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -260,7 +291,7 @@ export class Sessions {
|
|
|
260
291
|
rawResponse: _response.rawResponse,
|
|
261
292
|
});
|
|
262
293
|
case "timeout":
|
|
263
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/sessions/typeahead/
|
|
294
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/sessions/typeahead/v1.");
|
|
264
295
|
case "unknown":
|
|
265
296
|
throw new errors.ChrtError({
|
|
266
297
|
message: _response.error.errorMessage,
|
|
@@ -270,7 +301,7 @@ export class Sessions {
|
|
|
270
301
|
});
|
|
271
302
|
}
|
|
272
303
|
/**
|
|
273
|
-
*
|
|
304
|
+
* Search across session comments, device_mac_address, flight_numbers, and off_chrt_reference_id. Handles both partial and full matches. Use org_scope to restrict to owned, shared, or both (default). | authz: min_org_role=operator | () -> (SessionSearchRes)
|
|
274
305
|
*
|
|
275
306
|
* @param {Chrt.tracking.SessionsSearchV1Request} request
|
|
276
307
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -281,7 +312,8 @@ export class Sessions {
|
|
|
281
312
|
* await client.tracking.sessions.searchV1({
|
|
282
313
|
* query: "query",
|
|
283
314
|
* page: 1,
|
|
284
|
-
* page_size: 1
|
|
315
|
+
* page_size: 1,
|
|
316
|
+
* org_scope: "owned"
|
|
285
317
|
* })
|
|
286
318
|
*/
|
|
287
319
|
searchV1(request, requestOptions) {
|
|
@@ -290,7 +322,7 @@ export class Sessions {
|
|
|
290
322
|
__searchV1(request, requestOptions) {
|
|
291
323
|
return __awaiter(this, void 0, void 0, function* () {
|
|
292
324
|
var _a, _b, _c, _d, _e, _f;
|
|
293
|
-
const { query, page, page_size: pageSize } = request;
|
|
325
|
+
const { query, page, page_size: pageSize, org_scope: orgScope } = request;
|
|
294
326
|
const _queryParams = {};
|
|
295
327
|
_queryParams["query"] = query;
|
|
296
328
|
if (page !== undefined) {
|
|
@@ -299,6 +331,9 @@ export class Sessions {
|
|
|
299
331
|
if (pageSize !== undefined) {
|
|
300
332
|
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
301
333
|
}
|
|
334
|
+
if (orgScope !== undefined) {
|
|
335
|
+
_queryParams["org_scope"] = orgScope;
|
|
336
|
+
}
|
|
302
337
|
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
303
338
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
304
339
|
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "tracking/sessions/search/v1"),
|
|
@@ -342,16 +377,18 @@ export class Sessions {
|
|
|
342
377
|
});
|
|
343
378
|
}
|
|
344
379
|
/**
|
|
345
|
-
* Creates a new tracking session for a device
|
|
380
|
+
* Creates a new tracking session for a device. The device must already be registered to the caller's org and must not have an active session. Recording starts immediately and auto-termination is scheduled for ~3 days out at 8 PM PT. | (SessionClientCreate1) -> (PydanticObjectId)
|
|
346
381
|
*
|
|
347
|
-
* @param {Chrt.tracking.
|
|
382
|
+
* @param {Chrt.tracking.SessionClientCreate1} request
|
|
348
383
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
349
384
|
*
|
|
350
385
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
351
386
|
*
|
|
352
387
|
* @example
|
|
353
388
|
* await client.tracking.sessions.createSessionV1({
|
|
354
|
-
*
|
|
389
|
+
* device_id: "device_id",
|
|
390
|
+
* termination_scheduled_for_timestamp: "2024-01-15T09:30:00Z",
|
|
391
|
+
* schema_version: 1
|
|
355
392
|
* })
|
|
356
393
|
*/
|
|
357
394
|
createSessionV1(request, requestOptions) {
|
|
@@ -360,15 +397,21 @@ export class Sessions {
|
|
|
360
397
|
__createSessionV1(request, requestOptions) {
|
|
361
398
|
return __awaiter(this, void 0, void 0, function* () {
|
|
362
399
|
var _a, _b, _c, _d;
|
|
400
|
+
const { device_id: deviceId, termination_scheduled_for_timestamp: terminationScheduledForTimestamp } = request, _body = __rest(request, ["device_id", "termination_scheduled_for_timestamp"]);
|
|
401
|
+
const _queryParams = {};
|
|
402
|
+
_queryParams["device_id"] = deviceId;
|
|
403
|
+
if (terminationScheduledForTimestamp !== undefined) {
|
|
404
|
+
_queryParams["termination_scheduled_for_timestamp"] = terminationScheduledForTimestamp;
|
|
405
|
+
}
|
|
363
406
|
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);
|
|
364
407
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
365
408
|
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/create_session/v1"),
|
|
366
409
|
method: "POST",
|
|
367
410
|
headers: _headers,
|
|
368
411
|
contentType: "application/json",
|
|
369
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
412
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
370
413
|
requestType: "json",
|
|
371
|
-
body:
|
|
414
|
+
body: _body,
|
|
372
415
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
373
416
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
374
417
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -406,16 +449,17 @@ export class Sessions {
|
|
|
406
449
|
});
|
|
407
450
|
}
|
|
408
451
|
/**
|
|
409
|
-
* Updates a session's
|
|
452
|
+
* Updates a session's metadata and/or termination_scheduled_for_timestamp. | (SessionClientUpdate1) -> (bool)
|
|
410
453
|
*
|
|
411
|
-
* @param {Chrt.tracking.
|
|
454
|
+
* @param {Chrt.tracking.SessionClientUpdate1} request
|
|
412
455
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
413
456
|
*
|
|
414
457
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
415
458
|
*
|
|
416
459
|
* @example
|
|
417
460
|
* await client.tracking.sessions.updateV1({
|
|
418
|
-
* session_id: "session_id"
|
|
461
|
+
* session_id: "session_id",
|
|
462
|
+
* termination_scheduled_for_timestamp: "2024-01-15T09:30:00Z"
|
|
419
463
|
* })
|
|
420
464
|
*/
|
|
421
465
|
updateV1(request, requestOptions) {
|
|
@@ -424,15 +468,21 @@ export class Sessions {
|
|
|
424
468
|
__updateV1(request, requestOptions) {
|
|
425
469
|
return __awaiter(this, void 0, void 0, function* () {
|
|
426
470
|
var _a, _b, _c, _d;
|
|
471
|
+
const { session_id: sessionId, termination_scheduled_for_timestamp: terminationScheduledForTimestamp } = request, _body = __rest(request, ["session_id", "termination_scheduled_for_timestamp"]);
|
|
472
|
+
const _queryParams = {};
|
|
473
|
+
_queryParams["session_id"] = sessionId;
|
|
474
|
+
if (terminationScheduledForTimestamp !== undefined) {
|
|
475
|
+
_queryParams["termination_scheduled_for_timestamp"] = terminationScheduledForTimestamp;
|
|
476
|
+
}
|
|
427
477
|
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);
|
|
428
478
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
429
479
|
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/update/v1"),
|
|
430
480
|
method: "POST",
|
|
431
481
|
headers: _headers,
|
|
432
482
|
contentType: "application/json",
|
|
433
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
483
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
434
484
|
requestType: "json",
|
|
435
|
-
body:
|
|
485
|
+
body: _body,
|
|
436
486
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
437
487
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
438
488
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -470,33 +520,33 @@ export class Sessions {
|
|
|
470
520
|
});
|
|
471
521
|
}
|
|
472
522
|
/**
|
|
473
|
-
*
|
|
523
|
+
* Adds and/or removes org_ids from a session's shared_with_org_ids list. Only the owning org may modify sharing. Removal overrides addition. | (SessionsUpdateSharedOrgsReq1) -> (bool)
|
|
474
524
|
*
|
|
475
|
-
* @param {Chrt.tracking.
|
|
525
|
+
* @param {Chrt.tracking.SessionsUpdateSharedOrgsReq1} request
|
|
476
526
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
477
527
|
*
|
|
478
528
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
479
529
|
*
|
|
480
530
|
* @example
|
|
481
|
-
* await client.tracking.sessions.
|
|
531
|
+
* await client.tracking.sessions.updateSharedOrgsV1({
|
|
482
532
|
* session_id: "session_id"
|
|
483
533
|
* })
|
|
484
534
|
*/
|
|
485
|
-
|
|
486
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
535
|
+
updateSharedOrgsV1(request, requestOptions) {
|
|
536
|
+
return core.HttpResponsePromise.fromPromise(this.__updateSharedOrgsV1(request, requestOptions));
|
|
487
537
|
}
|
|
488
|
-
|
|
538
|
+
__updateSharedOrgsV1(request, requestOptions) {
|
|
489
539
|
return __awaiter(this, void 0, void 0, function* () {
|
|
490
540
|
var _a, _b, _c, _d;
|
|
491
|
-
const { session_id: sessionId } = request;
|
|
492
|
-
const _queryParams = {};
|
|
493
|
-
_queryParams["session_id"] = sessionId;
|
|
494
541
|
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);
|
|
495
542
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
496
|
-
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/
|
|
543
|
+
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/update_shared_orgs/v1"),
|
|
497
544
|
method: "POST",
|
|
498
545
|
headers: _headers,
|
|
499
|
-
|
|
546
|
+
contentType: "application/json",
|
|
547
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
548
|
+
requestType: "json",
|
|
549
|
+
body: request,
|
|
500
550
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
501
551
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
502
552
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -524,7 +574,7 @@ export class Sessions {
|
|
|
524
574
|
rawResponse: _response.rawResponse,
|
|
525
575
|
});
|
|
526
576
|
case "timeout":
|
|
527
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/
|
|
577
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/update_shared_orgs/v1.");
|
|
528
578
|
case "unknown":
|
|
529
579
|
throw new errors.ChrtError({
|
|
530
580
|
message: _response.error.errorMessage,
|
|
@@ -534,22 +584,22 @@ export class Sessions {
|
|
|
534
584
|
});
|
|
535
585
|
}
|
|
536
586
|
/**
|
|
537
|
-
*
|
|
587
|
+
* Terminates a session. Moves device.active_session_id to device.past_session_ids. | () -> (bool)
|
|
538
588
|
*
|
|
539
|
-
* @param {Chrt.tracking.
|
|
589
|
+
* @param {Chrt.tracking.SessionsTerminateV1Request} request
|
|
540
590
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
541
591
|
*
|
|
542
592
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
543
593
|
*
|
|
544
594
|
* @example
|
|
545
|
-
* await client.tracking.sessions.
|
|
595
|
+
* await client.tracking.sessions.terminateV1({
|
|
546
596
|
* session_id: "session_id"
|
|
547
597
|
* })
|
|
548
598
|
*/
|
|
549
|
-
|
|
550
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
599
|
+
terminateV1(request, requestOptions) {
|
|
600
|
+
return core.HttpResponsePromise.fromPromise(this.__terminateV1(request, requestOptions));
|
|
551
601
|
}
|
|
552
|
-
|
|
602
|
+
__terminateV1(request, requestOptions) {
|
|
553
603
|
return __awaiter(this, void 0, void 0, function* () {
|
|
554
604
|
var _a, _b, _c, _d;
|
|
555
605
|
const { session_id: sessionId } = request;
|
|
@@ -557,7 +607,7 @@ export class Sessions {
|
|
|
557
607
|
_queryParams["session_id"] = sessionId;
|
|
558
608
|
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);
|
|
559
609
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
560
|
-
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/
|
|
610
|
+
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/terminate/v1"),
|
|
561
611
|
method: "POST",
|
|
562
612
|
headers: _headers,
|
|
563
613
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -588,7 +638,7 @@ export class Sessions {
|
|
|
588
638
|
rawResponse: _response.rawResponse,
|
|
589
639
|
});
|
|
590
640
|
case "timeout":
|
|
591
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/
|
|
641
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/terminate/v1.");
|
|
592
642
|
case "unknown":
|
|
593
643
|
throw new errors.ChrtError({
|
|
594
644
|
message: _response.error.errorMessage,
|
|
@@ -598,33 +648,35 @@ export class Sessions {
|
|
|
598
648
|
});
|
|
599
649
|
}
|
|
600
650
|
/**
|
|
601
|
-
*
|
|
651
|
+
* Adds a flight number and FA flight IDs to an existing session. Creates or reuses a FlightAware alert. | authz: min_org_role=operator | (SessionAddFlightReq1) -> (bool)
|
|
602
652
|
*
|
|
603
|
-
* @param {Chrt.tracking.
|
|
653
|
+
* @param {Chrt.tracking.SessionAddFlightReq1} request
|
|
604
654
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
605
655
|
*
|
|
606
656
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
607
657
|
*
|
|
608
658
|
* @example
|
|
609
|
-
* await client.tracking.sessions.
|
|
610
|
-
* session_id: "session_id"
|
|
659
|
+
* await client.tracking.sessions.addFlightV1({
|
|
660
|
+
* session_id: "session_id",
|
|
661
|
+
* flight_number: "flight_number",
|
|
662
|
+
* fa_flight_ids: ["fa_flight_ids"]
|
|
611
663
|
* })
|
|
612
664
|
*/
|
|
613
|
-
|
|
614
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
665
|
+
addFlightV1(request, requestOptions) {
|
|
666
|
+
return core.HttpResponsePromise.fromPromise(this.__addFlightV1(request, requestOptions));
|
|
615
667
|
}
|
|
616
|
-
|
|
668
|
+
__addFlightV1(request, requestOptions) {
|
|
617
669
|
return __awaiter(this, void 0, void 0, function* () {
|
|
618
670
|
var _a, _b, _c, _d;
|
|
619
|
-
const { session_id: sessionId } = request;
|
|
620
|
-
const _queryParams = {};
|
|
621
|
-
_queryParams["session_id"] = sessionId;
|
|
622
671
|
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);
|
|
623
672
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
624
|
-
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/
|
|
673
|
+
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/add_flight/v1"),
|
|
625
674
|
method: "POST",
|
|
626
675
|
headers: _headers,
|
|
627
|
-
|
|
676
|
+
contentType: "application/json",
|
|
677
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
678
|
+
requestType: "json",
|
|
679
|
+
body: request,
|
|
628
680
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
629
681
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
630
682
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -652,7 +704,7 @@ export class Sessions {
|
|
|
652
704
|
rawResponse: _response.rawResponse,
|
|
653
705
|
});
|
|
654
706
|
case "timeout":
|
|
655
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/
|
|
707
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/add_flight/v1.");
|
|
656
708
|
case "unknown":
|
|
657
709
|
throw new errors.ChrtError({
|
|
658
710
|
message: _response.error.errorMessage,
|
|
@@ -662,33 +714,35 @@ export class Sessions {
|
|
|
662
714
|
});
|
|
663
715
|
}
|
|
664
716
|
/**
|
|
665
|
-
*
|
|
717
|
+
* Removes a flight number and FA flight IDs from a session. Runs the shared-aware FlightAware unsubscribe cycle before removing. | authz: min_org_role=operator | (SessionRemoveFlightReq1) -> (bool)
|
|
666
718
|
*
|
|
667
|
-
* @param {Chrt.tracking.
|
|
719
|
+
* @param {Chrt.tracking.SessionRemoveFlightReq1} request
|
|
668
720
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
669
721
|
*
|
|
670
722
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
671
723
|
*
|
|
672
724
|
* @example
|
|
673
|
-
* await client.tracking.sessions.
|
|
674
|
-
* session_id: "session_id"
|
|
725
|
+
* await client.tracking.sessions.removeFlightV1({
|
|
726
|
+
* session_id: "session_id",
|
|
727
|
+
* flight_number: "flight_number",
|
|
728
|
+
* fa_flight_ids: ["fa_flight_ids"]
|
|
675
729
|
* })
|
|
676
730
|
*/
|
|
677
|
-
|
|
678
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
731
|
+
removeFlightV1(request, requestOptions) {
|
|
732
|
+
return core.HttpResponsePromise.fromPromise(this.__removeFlightV1(request, requestOptions));
|
|
679
733
|
}
|
|
680
|
-
|
|
734
|
+
__removeFlightV1(request, requestOptions) {
|
|
681
735
|
return __awaiter(this, void 0, void 0, function* () {
|
|
682
736
|
var _a, _b, _c, _d;
|
|
683
|
-
const { session_id: sessionId } = request;
|
|
684
|
-
const _queryParams = {};
|
|
685
|
-
_queryParams["session_id"] = sessionId;
|
|
686
737
|
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);
|
|
687
738
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
688
|
-
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/
|
|
739
|
+
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/remove_flight/v1"),
|
|
689
740
|
method: "POST",
|
|
690
741
|
headers: _headers,
|
|
691
|
-
|
|
742
|
+
contentType: "application/json",
|
|
743
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
744
|
+
requestType: "json",
|
|
745
|
+
body: request,
|
|
692
746
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
693
747
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
694
748
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -716,7 +770,7 @@ export class Sessions {
|
|
|
716
770
|
rawResponse: _response.rawResponse,
|
|
717
771
|
});
|
|
718
772
|
case "timeout":
|
|
719
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/
|
|
773
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/remove_flight/v1.");
|
|
720
774
|
case "unknown":
|
|
721
775
|
throw new errors.ChrtError({
|
|
722
776
|
message: _response.error.errorMessage,
|
|
@@ -726,22 +780,22 @@ export class Sessions {
|
|
|
726
780
|
});
|
|
727
781
|
}
|
|
728
782
|
/**
|
|
729
|
-
*
|
|
783
|
+
* Fetches current OOOI timestamps from FlightAware for each fa_flight_id on the session and updates flight_status_by_fa_flight_id. Use when the webhook may have left state out of sync. | authz: min_org_role=operator | () -> (bool)
|
|
730
784
|
*
|
|
731
|
-
* @param {Chrt.tracking.
|
|
785
|
+
* @param {Chrt.tracking.SessionsSyncFlightStatusV1Request} request
|
|
732
786
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
733
787
|
*
|
|
734
788
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
735
789
|
*
|
|
736
790
|
* @example
|
|
737
|
-
* await client.tracking.sessions.
|
|
791
|
+
* await client.tracking.sessions.syncFlightStatusV1({
|
|
738
792
|
* session_id: "session_id"
|
|
739
793
|
* })
|
|
740
794
|
*/
|
|
741
|
-
|
|
742
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
795
|
+
syncFlightStatusV1(request, requestOptions) {
|
|
796
|
+
return core.HttpResponsePromise.fromPromise(this.__syncFlightStatusV1(request, requestOptions));
|
|
743
797
|
}
|
|
744
|
-
|
|
798
|
+
__syncFlightStatusV1(request, requestOptions) {
|
|
745
799
|
return __awaiter(this, void 0, void 0, function* () {
|
|
746
800
|
var _a, _b, _c, _d;
|
|
747
801
|
const { session_id: sessionId } = request;
|
|
@@ -749,8 +803,8 @@ export class Sessions {
|
|
|
749
803
|
_queryParams["session_id"] = sessionId;
|
|
750
804
|
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);
|
|
751
805
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
752
|
-
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/
|
|
753
|
-
method: "
|
|
806
|
+
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/sync_flight_status/v1"),
|
|
807
|
+
method: "POST",
|
|
754
808
|
headers: _headers,
|
|
755
809
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
756
810
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -780,7 +834,7 @@ export class Sessions {
|
|
|
780
834
|
rawResponse: _response.rawResponse,
|
|
781
835
|
});
|
|
782
836
|
case "timeout":
|
|
783
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
837
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/sync_flight_status/v1.");
|
|
784
838
|
case "unknown":
|
|
785
839
|
throw new errors.ChrtError({
|
|
786
840
|
message: _response.error.errorMessage,
|
|
@@ -0,0 +1,16 @@
|
|
|
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_number: "flight_number",
|
|
9
|
+
* fa_flight_ids: ["fa_flight_ids"]
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface SessionAddFlightReq1 {
|
|
13
|
+
session_id: string;
|
|
14
|
+
flight_number: string;
|
|
15
|
+
fa_flight_ids: string[];
|
|
16
|
+
}
|