@chrt-inc/typescript-sdk 1.421.0 → 1.431.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/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
|
@@ -44,6 +44,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
44
44
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
|
+
var t = {};
|
|
49
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
+
t[p] = s[p];
|
|
51
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
+
t[p[i]] = s[p[i]];
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
};
|
|
47
58
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
59
|
exports.Sessions = void 0;
|
|
49
60
|
const environments = __importStar(require("../../../../../../environments.js"));
|
|
@@ -56,7 +67,7 @@ class Sessions {
|
|
|
56
67
|
this._options = _options;
|
|
57
68
|
}
|
|
58
69
|
/**
|
|
59
|
-
* Lists sessions with filtering, sorting, and pagination. | authz: min_org_role=operator | () -> (SessionListRes)
|
|
70
|
+
* Lists sessions with filtering, sorting, and pagination. Use org_scope to restrict to owned, shared, or both (default). | authz: min_org_role=operator | () -> (SessionListRes)
|
|
60
71
|
*
|
|
61
72
|
* @param {Chrt.tracking.SessionsListV1Request} request
|
|
62
73
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -65,20 +76,24 @@ class Sessions {
|
|
|
65
76
|
*
|
|
66
77
|
* @example
|
|
67
78
|
* await client.tracking.sessions.listV1({
|
|
68
|
-
* sort_by: "
|
|
79
|
+
* sort_by: "created_at_timestamp",
|
|
69
80
|
* sort_order: "asc",
|
|
70
81
|
* page: 1,
|
|
71
82
|
* page_size: 1,
|
|
72
|
-
*
|
|
83
|
+
* org_scope: "owned",
|
|
73
84
|
* filter_terminated: true,
|
|
74
85
|
* filter_public: true,
|
|
75
86
|
* filter_device_id: "filter_device_id",
|
|
76
|
-
*
|
|
87
|
+
* filter_off_chrt_reference_id: "filter_off_chrt_reference_id",
|
|
77
88
|
* filter_flight_number: "filter_flight_number",
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
89
|
+
* filter_fa_flight_id: "filter_fa_flight_id",
|
|
90
|
+
* filter_flight_loaded_status: "filter_flight_loaded_status",
|
|
91
|
+
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
92
|
+
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
93
|
+
* filter_termination_scheduled_for_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
94
|
+
* filter_termination_scheduled_for_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
95
|
+
* filter_terminated_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
96
|
+
* filter_terminated_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
82
97
|
* })
|
|
83
98
|
*/
|
|
84
99
|
listV1(request = {}, requestOptions) {
|
|
@@ -86,8 +101,8 @@ class Sessions {
|
|
|
86
101
|
}
|
|
87
102
|
__listV1() {
|
|
88
103
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
89
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
90
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize,
|
|
104
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
105
|
+
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;
|
|
91
106
|
const _queryParams = {};
|
|
92
107
|
if (sortBy !== undefined) {
|
|
93
108
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -101,39 +116,51 @@ class Sessions {
|
|
|
101
116
|
if (pageSize !== undefined) {
|
|
102
117
|
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
103
118
|
}
|
|
104
|
-
if (
|
|
105
|
-
_queryParams["
|
|
119
|
+
if (orgScope !== undefined) {
|
|
120
|
+
_queryParams["org_scope"] = orgScope;
|
|
106
121
|
}
|
|
107
122
|
if (filterTerminated !== undefined) {
|
|
108
|
-
_queryParams["filter_terminated"] = (
|
|
123
|
+
_queryParams["filter_terminated"] = (_c = filterTerminated === null || filterTerminated === void 0 ? void 0 : filterTerminated.toString()) !== null && _c !== void 0 ? _c : null;
|
|
109
124
|
}
|
|
110
125
|
if (filterPublic !== undefined) {
|
|
111
|
-
_queryParams["filter_public"] = (
|
|
126
|
+
_queryParams["filter_public"] = (_d = filterPublic === null || filterPublic === void 0 ? void 0 : filterPublic.toString()) !== null && _d !== void 0 ? _d : null;
|
|
112
127
|
}
|
|
113
128
|
if (filterDeviceId !== undefined) {
|
|
114
129
|
_queryParams["filter_device_id"] = filterDeviceId;
|
|
115
130
|
}
|
|
116
|
-
if (
|
|
117
|
-
_queryParams["
|
|
131
|
+
if (filterOffChrtReferenceId !== undefined) {
|
|
132
|
+
_queryParams["filter_off_chrt_reference_id"] = filterOffChrtReferenceId;
|
|
118
133
|
}
|
|
119
134
|
if (filterFlightNumber !== undefined) {
|
|
120
135
|
_queryParams["filter_flight_number"] = filterFlightNumber;
|
|
121
136
|
}
|
|
122
|
-
if (
|
|
123
|
-
_queryParams["
|
|
137
|
+
if (filterFaFlightId !== undefined) {
|
|
138
|
+
_queryParams["filter_fa_flight_id"] = filterFaFlightId;
|
|
139
|
+
}
|
|
140
|
+
if (filterFlightLoadedStatus !== undefined) {
|
|
141
|
+
_queryParams["filter_flight_loaded_status"] = filterFlightLoadedStatus;
|
|
142
|
+
}
|
|
143
|
+
if (filterCreatedAtTimestampGte !== undefined) {
|
|
144
|
+
_queryParams["filter_created_at_timestamp_gte"] = filterCreatedAtTimestampGte;
|
|
145
|
+
}
|
|
146
|
+
if (filterCreatedAtTimestampLte !== undefined) {
|
|
147
|
+
_queryParams["filter_created_at_timestamp_lte"] = filterCreatedAtTimestampLte;
|
|
124
148
|
}
|
|
125
|
-
if (
|
|
126
|
-
_queryParams["
|
|
149
|
+
if (filterTerminationScheduledForTimestampGte !== undefined) {
|
|
150
|
+
_queryParams["filter_termination_scheduled_for_timestamp_gte"] = filterTerminationScheduledForTimestampGte;
|
|
127
151
|
}
|
|
128
|
-
if (
|
|
129
|
-
_queryParams["
|
|
152
|
+
if (filterTerminationScheduledForTimestampLte !== undefined) {
|
|
153
|
+
_queryParams["filter_termination_scheduled_for_timestamp_lte"] = filterTerminationScheduledForTimestampLte;
|
|
130
154
|
}
|
|
131
|
-
if (
|
|
132
|
-
_queryParams["
|
|
155
|
+
if (filterTerminatedAtTimestampGte !== undefined) {
|
|
156
|
+
_queryParams["filter_terminated_at_timestamp_gte"] = filterTerminatedAtTimestampGte;
|
|
133
157
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
158
|
+
if (filterTerminatedAtTimestampLte !== undefined) {
|
|
159
|
+
_queryParams["filter_terminated_at_timestamp_lte"] = filterTerminatedAtTimestampLte;
|
|
160
|
+
}
|
|
161
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_e = this._options) === null || _e === void 0 ? void 0 : _e.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
162
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
163
|
+
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"),
|
|
137
164
|
method: "GET",
|
|
138
165
|
headers: _headers,
|
|
139
166
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -174,7 +201,7 @@ class Sessions {
|
|
|
174
201
|
});
|
|
175
202
|
}
|
|
176
203
|
/**
|
|
177
|
-
* Retrieves a single session by its ID. Access restricted to the caller's organization. | authz: min_org_role=operator | () -> (Session1)
|
|
204
|
+
* Retrieves a single session by its ID. Access restricted to the caller's organization or shared organizations. | authz: min_org_role=operator | () -> (Session1)
|
|
178
205
|
*
|
|
179
206
|
* @param {Chrt.tracking.SessionsGetV1Request} request
|
|
180
207
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -238,34 +265,38 @@ class Sessions {
|
|
|
238
265
|
});
|
|
239
266
|
}
|
|
240
267
|
/**
|
|
241
|
-
* Returns distinct
|
|
268
|
+
* 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])
|
|
242
269
|
*
|
|
243
|
-
* @param {Chrt.tracking.
|
|
270
|
+
* @param {Chrt.tracking.SessionsTypeaheadV1Request} request
|
|
244
271
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
245
272
|
*
|
|
246
273
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
247
274
|
*
|
|
248
275
|
* @example
|
|
249
|
-
* await client.tracking.sessions.
|
|
276
|
+
* await client.tracking.sessions.typeaheadV1({
|
|
250
277
|
* query: "query",
|
|
251
|
-
* limit: 1
|
|
278
|
+
* limit: 1,
|
|
279
|
+
* org_scope: "owned"
|
|
252
280
|
* })
|
|
253
281
|
*/
|
|
254
|
-
|
|
255
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
282
|
+
typeaheadV1(request, requestOptions) {
|
|
283
|
+
return core.HttpResponsePromise.fromPromise(this.__typeaheadV1(request, requestOptions));
|
|
256
284
|
}
|
|
257
|
-
|
|
285
|
+
__typeaheadV1(request, requestOptions) {
|
|
258
286
|
return __awaiter(this, void 0, void 0, function* () {
|
|
259
287
|
var _a, _b, _c, _d, _e;
|
|
260
|
-
const { query, limit } = request;
|
|
288
|
+
const { query, limit, org_scope: orgScope } = request;
|
|
261
289
|
const _queryParams = {};
|
|
262
290
|
_queryParams["query"] = query;
|
|
263
291
|
if (limit !== undefined) {
|
|
264
292
|
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
265
293
|
}
|
|
294
|
+
if (orgScope !== undefined) {
|
|
295
|
+
_queryParams["org_scope"] = orgScope;
|
|
296
|
+
}
|
|
266
297
|
let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
267
298
|
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
268
|
-
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/
|
|
299
|
+
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"),
|
|
269
300
|
method: "GET",
|
|
270
301
|
headers: _headers,
|
|
271
302
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -296,7 +327,7 @@ class Sessions {
|
|
|
296
327
|
rawResponse: _response.rawResponse,
|
|
297
328
|
});
|
|
298
329
|
case "timeout":
|
|
299
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/sessions/typeahead/
|
|
330
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/sessions/typeahead/v1.");
|
|
300
331
|
case "unknown":
|
|
301
332
|
throw new errors.ChrtError({
|
|
302
333
|
message: _response.error.errorMessage,
|
|
@@ -306,7 +337,7 @@ class Sessions {
|
|
|
306
337
|
});
|
|
307
338
|
}
|
|
308
339
|
/**
|
|
309
|
-
*
|
|
340
|
+
* 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)
|
|
310
341
|
*
|
|
311
342
|
* @param {Chrt.tracking.SessionsSearchV1Request} request
|
|
312
343
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -317,7 +348,8 @@ class Sessions {
|
|
|
317
348
|
* await client.tracking.sessions.searchV1({
|
|
318
349
|
* query: "query",
|
|
319
350
|
* page: 1,
|
|
320
|
-
* page_size: 1
|
|
351
|
+
* page_size: 1,
|
|
352
|
+
* org_scope: "owned"
|
|
321
353
|
* })
|
|
322
354
|
*/
|
|
323
355
|
searchV1(request, requestOptions) {
|
|
@@ -326,7 +358,7 @@ class Sessions {
|
|
|
326
358
|
__searchV1(request, requestOptions) {
|
|
327
359
|
return __awaiter(this, void 0, void 0, function* () {
|
|
328
360
|
var _a, _b, _c, _d, _e, _f;
|
|
329
|
-
const { query, page, page_size: pageSize } = request;
|
|
361
|
+
const { query, page, page_size: pageSize, org_scope: orgScope } = request;
|
|
330
362
|
const _queryParams = {};
|
|
331
363
|
_queryParams["query"] = query;
|
|
332
364
|
if (page !== undefined) {
|
|
@@ -335,6 +367,9 @@ class Sessions {
|
|
|
335
367
|
if (pageSize !== undefined) {
|
|
336
368
|
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
337
369
|
}
|
|
370
|
+
if (orgScope !== undefined) {
|
|
371
|
+
_queryParams["org_scope"] = orgScope;
|
|
372
|
+
}
|
|
338
373
|
let _headers = (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
339
374
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
340
375
|
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"),
|
|
@@ -378,16 +413,18 @@ class Sessions {
|
|
|
378
413
|
});
|
|
379
414
|
}
|
|
380
415
|
/**
|
|
381
|
-
* Creates a new tracking session for a device
|
|
416
|
+
* 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)
|
|
382
417
|
*
|
|
383
|
-
* @param {Chrt.tracking.
|
|
418
|
+
* @param {Chrt.tracking.SessionClientCreate1} request
|
|
384
419
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
385
420
|
*
|
|
386
421
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
387
422
|
*
|
|
388
423
|
* @example
|
|
389
424
|
* await client.tracking.sessions.createSessionV1({
|
|
390
|
-
*
|
|
425
|
+
* device_id: "device_id",
|
|
426
|
+
* termination_scheduled_for_timestamp: "2024-01-15T09:30:00Z",
|
|
427
|
+
* schema_version: 1
|
|
391
428
|
* })
|
|
392
429
|
*/
|
|
393
430
|
createSessionV1(request, requestOptions) {
|
|
@@ -396,15 +433,21 @@ class Sessions {
|
|
|
396
433
|
__createSessionV1(request, requestOptions) {
|
|
397
434
|
return __awaiter(this, void 0, void 0, function* () {
|
|
398
435
|
var _a, _b, _c, _d;
|
|
436
|
+
const { device_id: deviceId, termination_scheduled_for_timestamp: terminationScheduledForTimestamp } = request, _body = __rest(request, ["device_id", "termination_scheduled_for_timestamp"]);
|
|
437
|
+
const _queryParams = {};
|
|
438
|
+
_queryParams["device_id"] = deviceId;
|
|
439
|
+
if (terminationScheduledForTimestamp !== undefined) {
|
|
440
|
+
_queryParams["termination_scheduled_for_timestamp"] = terminationScheduledForTimestamp;
|
|
441
|
+
}
|
|
399
442
|
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);
|
|
400
443
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
401
444
|
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"),
|
|
402
445
|
method: "POST",
|
|
403
446
|
headers: _headers,
|
|
404
447
|
contentType: "application/json",
|
|
405
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
448
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
406
449
|
requestType: "json",
|
|
407
|
-
body:
|
|
450
|
+
body: _body,
|
|
408
451
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
409
452
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
410
453
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -442,16 +485,17 @@ class Sessions {
|
|
|
442
485
|
});
|
|
443
486
|
}
|
|
444
487
|
/**
|
|
445
|
-
* Updates a session's
|
|
488
|
+
* Updates a session's metadata and/or termination_scheduled_for_timestamp. | (SessionClientUpdate1) -> (bool)
|
|
446
489
|
*
|
|
447
|
-
* @param {Chrt.tracking.
|
|
490
|
+
* @param {Chrt.tracking.SessionClientUpdate1} request
|
|
448
491
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
449
492
|
*
|
|
450
493
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
451
494
|
*
|
|
452
495
|
* @example
|
|
453
496
|
* await client.tracking.sessions.updateV1({
|
|
454
|
-
* session_id: "session_id"
|
|
497
|
+
* session_id: "session_id",
|
|
498
|
+
* termination_scheduled_for_timestamp: "2024-01-15T09:30:00Z"
|
|
455
499
|
* })
|
|
456
500
|
*/
|
|
457
501
|
updateV1(request, requestOptions) {
|
|
@@ -460,15 +504,21 @@ class Sessions {
|
|
|
460
504
|
__updateV1(request, requestOptions) {
|
|
461
505
|
return __awaiter(this, void 0, void 0, function* () {
|
|
462
506
|
var _a, _b, _c, _d;
|
|
507
|
+
const { session_id: sessionId, termination_scheduled_for_timestamp: terminationScheduledForTimestamp } = request, _body = __rest(request, ["session_id", "termination_scheduled_for_timestamp"]);
|
|
508
|
+
const _queryParams = {};
|
|
509
|
+
_queryParams["session_id"] = sessionId;
|
|
510
|
+
if (terminationScheduledForTimestamp !== undefined) {
|
|
511
|
+
_queryParams["termination_scheduled_for_timestamp"] = terminationScheduledForTimestamp;
|
|
512
|
+
}
|
|
463
513
|
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);
|
|
464
514
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
465
515
|
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"),
|
|
466
516
|
method: "POST",
|
|
467
517
|
headers: _headers,
|
|
468
518
|
contentType: "application/json",
|
|
469
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
519
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
470
520
|
requestType: "json",
|
|
471
|
-
body:
|
|
521
|
+
body: _body,
|
|
472
522
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
473
523
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
474
524
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -506,33 +556,33 @@ class Sessions {
|
|
|
506
556
|
});
|
|
507
557
|
}
|
|
508
558
|
/**
|
|
509
|
-
*
|
|
559
|
+
* 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)
|
|
510
560
|
*
|
|
511
|
-
* @param {Chrt.tracking.
|
|
561
|
+
* @param {Chrt.tracking.SessionsUpdateSharedOrgsReq1} request
|
|
512
562
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
513
563
|
*
|
|
514
564
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
515
565
|
*
|
|
516
566
|
* @example
|
|
517
|
-
* await client.tracking.sessions.
|
|
567
|
+
* await client.tracking.sessions.updateSharedOrgsV1({
|
|
518
568
|
* session_id: "session_id"
|
|
519
569
|
* })
|
|
520
570
|
*/
|
|
521
|
-
|
|
522
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
571
|
+
updateSharedOrgsV1(request, requestOptions) {
|
|
572
|
+
return core.HttpResponsePromise.fromPromise(this.__updateSharedOrgsV1(request, requestOptions));
|
|
523
573
|
}
|
|
524
|
-
|
|
574
|
+
__updateSharedOrgsV1(request, requestOptions) {
|
|
525
575
|
return __awaiter(this, void 0, void 0, function* () {
|
|
526
576
|
var _a, _b, _c, _d;
|
|
527
|
-
const { session_id: sessionId } = request;
|
|
528
|
-
const _queryParams = {};
|
|
529
|
-
_queryParams["session_id"] = sessionId;
|
|
530
577
|
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);
|
|
531
578
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
532
|
-
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/
|
|
579
|
+
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"),
|
|
533
580
|
method: "POST",
|
|
534
581
|
headers: _headers,
|
|
535
|
-
|
|
582
|
+
contentType: "application/json",
|
|
583
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
584
|
+
requestType: "json",
|
|
585
|
+
body: request,
|
|
536
586
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
537
587
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
538
588
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -560,7 +610,7 @@ class Sessions {
|
|
|
560
610
|
rawResponse: _response.rawResponse,
|
|
561
611
|
});
|
|
562
612
|
case "timeout":
|
|
563
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/
|
|
613
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/update_shared_orgs/v1.");
|
|
564
614
|
case "unknown":
|
|
565
615
|
throw new errors.ChrtError({
|
|
566
616
|
message: _response.error.errorMessage,
|
|
@@ -570,22 +620,22 @@ class Sessions {
|
|
|
570
620
|
});
|
|
571
621
|
}
|
|
572
622
|
/**
|
|
573
|
-
*
|
|
623
|
+
* Terminates a session. Moves device.active_session_id to device.past_session_ids. | () -> (bool)
|
|
574
624
|
*
|
|
575
|
-
* @param {Chrt.tracking.
|
|
625
|
+
* @param {Chrt.tracking.SessionsTerminateV1Request} request
|
|
576
626
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
577
627
|
*
|
|
578
628
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
579
629
|
*
|
|
580
630
|
* @example
|
|
581
|
-
* await client.tracking.sessions.
|
|
631
|
+
* await client.tracking.sessions.terminateV1({
|
|
582
632
|
* session_id: "session_id"
|
|
583
633
|
* })
|
|
584
634
|
*/
|
|
585
|
-
|
|
586
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
635
|
+
terminateV1(request, requestOptions) {
|
|
636
|
+
return core.HttpResponsePromise.fromPromise(this.__terminateV1(request, requestOptions));
|
|
587
637
|
}
|
|
588
|
-
|
|
638
|
+
__terminateV1(request, requestOptions) {
|
|
589
639
|
return __awaiter(this, void 0, void 0, function* () {
|
|
590
640
|
var _a, _b, _c, _d;
|
|
591
641
|
const { session_id: sessionId } = request;
|
|
@@ -593,7 +643,7 @@ class Sessions {
|
|
|
593
643
|
_queryParams["session_id"] = sessionId;
|
|
594
644
|
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);
|
|
595
645
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
596
|
-
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
|
+
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"),
|
|
597
647
|
method: "POST",
|
|
598
648
|
headers: _headers,
|
|
599
649
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -624,7 +674,7 @@ class Sessions {
|
|
|
624
674
|
rawResponse: _response.rawResponse,
|
|
625
675
|
});
|
|
626
676
|
case "timeout":
|
|
627
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/
|
|
677
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/terminate/v1.");
|
|
628
678
|
case "unknown":
|
|
629
679
|
throw new errors.ChrtError({
|
|
630
680
|
message: _response.error.errorMessage,
|
|
@@ -634,33 +684,35 @@ class Sessions {
|
|
|
634
684
|
});
|
|
635
685
|
}
|
|
636
686
|
/**
|
|
637
|
-
*
|
|
687
|
+
* 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)
|
|
638
688
|
*
|
|
639
|
-
* @param {Chrt.tracking.
|
|
689
|
+
* @param {Chrt.tracking.SessionAddFlightReq1} request
|
|
640
690
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
641
691
|
*
|
|
642
692
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
643
693
|
*
|
|
644
694
|
* @example
|
|
645
|
-
* await client.tracking.sessions.
|
|
646
|
-
* session_id: "session_id"
|
|
695
|
+
* await client.tracking.sessions.addFlightV1({
|
|
696
|
+
* session_id: "session_id",
|
|
697
|
+
* flight_number: "flight_number",
|
|
698
|
+
* fa_flight_ids: ["fa_flight_ids"]
|
|
647
699
|
* })
|
|
648
700
|
*/
|
|
649
|
-
|
|
650
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
701
|
+
addFlightV1(request, requestOptions) {
|
|
702
|
+
return core.HttpResponsePromise.fromPromise(this.__addFlightV1(request, requestOptions));
|
|
651
703
|
}
|
|
652
|
-
|
|
704
|
+
__addFlightV1(request, requestOptions) {
|
|
653
705
|
return __awaiter(this, void 0, void 0, function* () {
|
|
654
706
|
var _a, _b, _c, _d;
|
|
655
|
-
const { session_id: sessionId } = request;
|
|
656
|
-
const _queryParams = {};
|
|
657
|
-
_queryParams["session_id"] = sessionId;
|
|
658
707
|
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);
|
|
659
708
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
660
|
-
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/
|
|
709
|
+
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"),
|
|
661
710
|
method: "POST",
|
|
662
711
|
headers: _headers,
|
|
663
|
-
|
|
712
|
+
contentType: "application/json",
|
|
713
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
714
|
+
requestType: "json",
|
|
715
|
+
body: request,
|
|
664
716
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
665
717
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
666
718
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -688,7 +740,7 @@ class Sessions {
|
|
|
688
740
|
rawResponse: _response.rawResponse,
|
|
689
741
|
});
|
|
690
742
|
case "timeout":
|
|
691
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/
|
|
743
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/add_flight/v1.");
|
|
692
744
|
case "unknown":
|
|
693
745
|
throw new errors.ChrtError({
|
|
694
746
|
message: _response.error.errorMessage,
|
|
@@ -698,33 +750,35 @@ class Sessions {
|
|
|
698
750
|
});
|
|
699
751
|
}
|
|
700
752
|
/**
|
|
701
|
-
*
|
|
753
|
+
* 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)
|
|
702
754
|
*
|
|
703
|
-
* @param {Chrt.tracking.
|
|
755
|
+
* @param {Chrt.tracking.SessionRemoveFlightReq1} request
|
|
704
756
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
705
757
|
*
|
|
706
758
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
707
759
|
*
|
|
708
760
|
* @example
|
|
709
|
-
* await client.tracking.sessions.
|
|
710
|
-
* session_id: "session_id"
|
|
761
|
+
* await client.tracking.sessions.removeFlightV1({
|
|
762
|
+
* session_id: "session_id",
|
|
763
|
+
* flight_number: "flight_number",
|
|
764
|
+
* fa_flight_ids: ["fa_flight_ids"]
|
|
711
765
|
* })
|
|
712
766
|
*/
|
|
713
|
-
|
|
714
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
767
|
+
removeFlightV1(request, requestOptions) {
|
|
768
|
+
return core.HttpResponsePromise.fromPromise(this.__removeFlightV1(request, requestOptions));
|
|
715
769
|
}
|
|
716
|
-
|
|
770
|
+
__removeFlightV1(request, requestOptions) {
|
|
717
771
|
return __awaiter(this, void 0, void 0, function* () {
|
|
718
772
|
var _a, _b, _c, _d;
|
|
719
|
-
const { session_id: sessionId } = request;
|
|
720
|
-
const _queryParams = {};
|
|
721
|
-
_queryParams["session_id"] = sessionId;
|
|
722
773
|
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);
|
|
723
774
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
724
|
-
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/
|
|
775
|
+
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"),
|
|
725
776
|
method: "POST",
|
|
726
777
|
headers: _headers,
|
|
727
|
-
|
|
778
|
+
contentType: "application/json",
|
|
779
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
780
|
+
requestType: "json",
|
|
781
|
+
body: request,
|
|
728
782
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
729
783
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
730
784
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -752,7 +806,7 @@ class Sessions {
|
|
|
752
806
|
rawResponse: _response.rawResponse,
|
|
753
807
|
});
|
|
754
808
|
case "timeout":
|
|
755
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/
|
|
809
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/remove_flight/v1.");
|
|
756
810
|
case "unknown":
|
|
757
811
|
throw new errors.ChrtError({
|
|
758
812
|
message: _response.error.errorMessage,
|
|
@@ -762,22 +816,22 @@ class Sessions {
|
|
|
762
816
|
});
|
|
763
817
|
}
|
|
764
818
|
/**
|
|
765
|
-
*
|
|
819
|
+
* 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)
|
|
766
820
|
*
|
|
767
|
-
* @param {Chrt.tracking.
|
|
821
|
+
* @param {Chrt.tracking.SessionsSyncFlightStatusV1Request} request
|
|
768
822
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
769
823
|
*
|
|
770
824
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
771
825
|
*
|
|
772
826
|
* @example
|
|
773
|
-
* await client.tracking.sessions.
|
|
827
|
+
* await client.tracking.sessions.syncFlightStatusV1({
|
|
774
828
|
* session_id: "session_id"
|
|
775
829
|
* })
|
|
776
830
|
*/
|
|
777
|
-
|
|
778
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
831
|
+
syncFlightStatusV1(request, requestOptions) {
|
|
832
|
+
return core.HttpResponsePromise.fromPromise(this.__syncFlightStatusV1(request, requestOptions));
|
|
779
833
|
}
|
|
780
|
-
|
|
834
|
+
__syncFlightStatusV1(request, requestOptions) {
|
|
781
835
|
return __awaiter(this, void 0, void 0, function* () {
|
|
782
836
|
var _a, _b, _c, _d;
|
|
783
837
|
const { session_id: sessionId } = request;
|
|
@@ -785,8 +839,8 @@ class Sessions {
|
|
|
785
839
|
_queryParams["session_id"] = sessionId;
|
|
786
840
|
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);
|
|
787
841
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
788
|
-
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/
|
|
789
|
-
method: "
|
|
842
|
+
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"),
|
|
843
|
+
method: "POST",
|
|
790
844
|
headers: _headers,
|
|
791
845
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
792
846
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -816,7 +870,7 @@ class Sessions {
|
|
|
816
870
|
rawResponse: _response.rawResponse,
|
|
817
871
|
});
|
|
818
872
|
case "timeout":
|
|
819
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
873
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sessions/sync_flight_status/v1.");
|
|
820
874
|
case "unknown":
|
|
821
875
|
throw new errors.ChrtError({
|
|
822
876
|
message: _response.error.errorMessage,
|
package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionAddFlightReq1.d.ts
ADDED
|
@@ -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
|
+
}
|