@chrt-inc/typescript-sdk 1.400.0 → 1.405.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 +1 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesRegisterToOrgReq1.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUpdateRequest1.d.ts +2 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +56 -5
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +225 -18
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionCreateSessionRequest1.d.ts +3 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionUpdateRequest1.d.ts +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.ts +51 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsSearchV1Request.d.ts +17 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsSearchV1Request.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsTypeaheadOffChrtOrderIdV1Request.d.ts +16 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsTypeaheadOffChrtOrderIdV1Request.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/types/Device1.d.ts +1 -0
- package/dist/cjs/api/types/Session1.d.ts +3 -0
- package/dist/cjs/api/types/SessionListRes.d.ts +8 -0
- package/dist/cjs/api/types/SessionListRes.js +5 -0
- package/dist/cjs/api/types/SessionSearchRes.d.ts +8 -0
- package/dist/cjs/api/types/SessionSearchRes.js +5 -0
- package/dist/cjs/api/types/SessionSortByEnum.d.ts +8 -0
- package/dist/cjs/api/types/SessionSortByEnum.js +10 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesRegisterToOrgReq1.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUpdateRequest1.d.mts +2 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +56 -5
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +225 -18
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionCreateSessionRequest1.d.mts +3 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionUpdateRequest1.d.mts +5 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.mts +51 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsSearchV1Request.d.mts +17 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsSearchV1Request.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsTypeaheadOffChrtOrderIdV1Request.d.mts +16 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsTypeaheadOffChrtOrderIdV1Request.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessions/client/requests/index.d.mts +3 -0
- package/dist/esm/api/types/Device1.d.mts +1 -0
- package/dist/esm/api/types/Session1.d.mts +3 -0
- package/dist/esm/api/types/SessionListRes.d.mts +8 -0
- package/dist/esm/api/types/SessionListRes.mjs +4 -0
- package/dist/esm/api/types/SessionSearchRes.d.mts +8 -0
- package/dist/esm/api/types/SessionSearchRes.mjs +4 -0
- package/dist/esm/api/types/SessionSortByEnum.d.mts +8 -0
- package/dist/esm/api/types/SessionSortByEnum.mjs +7 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +162 -6
|
@@ -104,6 +104,9 @@ export * from "./SessionByDeviceDataPoint1.js";
|
|
|
104
104
|
export * from "./SessionByDeviceDataPointMetadata1.js";
|
|
105
105
|
export * from "./SessionByDeviceMarkOutliersResponse1.js";
|
|
106
106
|
export * from "./SessionDeleteResponse1.js";
|
|
107
|
+
export * from "./SessionListRes.js";
|
|
108
|
+
export * from "./SessionSearchRes.js";
|
|
109
|
+
export * from "./SessionSortByEnum.js";
|
|
107
110
|
export * from "./SetFlightInfoReq.js";
|
|
108
111
|
export * from "./SettlementTypeEnum1.js";
|
|
109
112
|
export * from "./ShipperConnectionRes.js";
|
|
@@ -120,6 +120,9 @@ __exportStar(require("./SessionByDeviceDataPoint1.js"), exports);
|
|
|
120
120
|
__exportStar(require("./SessionByDeviceDataPointMetadata1.js"), exports);
|
|
121
121
|
__exportStar(require("./SessionByDeviceMarkOutliersResponse1.js"), exports);
|
|
122
122
|
__exportStar(require("./SessionDeleteResponse1.js"), exports);
|
|
123
|
+
__exportStar(require("./SessionListRes.js"), exports);
|
|
124
|
+
__exportStar(require("./SessionSearchRes.js"), exports);
|
|
125
|
+
__exportStar(require("./SessionSortByEnum.js"), exports);
|
|
123
126
|
__exportStar(require("./SetFlightInfoReq.js"), exports);
|
|
124
127
|
__exportStar(require("./SettlementTypeEnum1.js"), exports);
|
|
125
128
|
__exportStar(require("./ShipperConnectionRes.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.405.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -31,8 +31,8 @@ export class ChrtClient {
|
|
|
31
31
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
32
32
|
"X-Fern-Language": "JavaScript",
|
|
33
33
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
34
|
-
"X-Fern-SDK-Version": "1.
|
|
35
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
34
|
+
"X-Fern-SDK-Version": "1.405.0",
|
|
35
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.405.0",
|
|
36
36
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
37
37
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
38
38
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -46,7 +46,7 @@ export declare class Devices {
|
|
|
46
46
|
registerToOrgV1(request: Chrt.tracking.DevicesRegisterToOrgReq1, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<string>;
|
|
47
47
|
private __registerToOrgV1;
|
|
48
48
|
/**
|
|
49
|
-
* Updates a device's type and/or
|
|
49
|
+
* Updates a device's type, comments, and/or off_chrt_order_id. Can update one or more fields, or delete them by setting delete flags. | (DevicesUpdateRequest1) -> (bool)
|
|
50
50
|
*
|
|
51
51
|
* @param {Chrt.tracking.DevicesUpdateRequest1} request
|
|
52
52
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -84,7 +84,7 @@ export class Devices {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
|
-
* Updates a device's type and/or
|
|
87
|
+
* Updates a device's type, comments, and/or off_chrt_order_id. Can update one or more fields, or delete them by setting delete flags. | (DevicesUpdateRequest1) -> (bool)
|
|
88
88
|
*
|
|
89
89
|
* @param {Chrt.tracking.DevicesUpdateRequest1} request
|
|
90
90
|
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -31,17 +31,35 @@ export declare class Sessions {
|
|
|
31
31
|
protected readonly _options: Sessions.Options;
|
|
32
32
|
constructor(_options?: Sessions.Options);
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Lists sessions with filtering, sorting, and pagination. | authz: min_org_role=operator | () -> (SessionListRes)
|
|
35
35
|
*
|
|
36
|
+
* @param {Chrt.tracking.SessionsListV1Request} request
|
|
36
37
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
38
|
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
38
41
|
* @example
|
|
39
|
-
* await client.tracking.sessions.listV1(
|
|
42
|
+
* await client.tracking.sessions.listV1({
|
|
43
|
+
* sort_by: "session_created_at_timestamp",
|
|
44
|
+
* sort_order: "asc",
|
|
45
|
+
* page: 1,
|
|
46
|
+
* page_size: 1,
|
|
47
|
+
* filter_recording: true,
|
|
48
|
+
* filter_terminated: true,
|
|
49
|
+
* filter_public: true,
|
|
50
|
+
* filter_device_id: "filter_device_id",
|
|
51
|
+
* filter_off_chrt_order_id: "filter_off_chrt_order_id",
|
|
52
|
+
* filter_flight_number: "filter_flight_number",
|
|
53
|
+
* filter_session_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
54
|
+
* filter_session_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
55
|
+
* filter_recording_initiated_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
56
|
+
* filter_recording_initiated_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
57
|
+
* })
|
|
40
58
|
*/
|
|
41
|
-
listV1(requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<Chrt.
|
|
59
|
+
listV1(request?: Chrt.tracking.SessionsListV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<Chrt.SessionListRes>;
|
|
42
60
|
private __listV1;
|
|
43
61
|
/**
|
|
44
|
-
* Retrieves a single session by its ID. Access restricted to the caller's organization. | () -> (Session1)
|
|
62
|
+
* Retrieves a single session by its ID. Access restricted to the caller's organization. | authz: min_org_role=operator | () -> (Session1)
|
|
45
63
|
*
|
|
46
64
|
* @param {Chrt.tracking.SessionsGetV1Request} request
|
|
47
65
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -55,6 +73,39 @@ export declare class Sessions {
|
|
|
55
73
|
*/
|
|
56
74
|
getV1(request: Chrt.tracking.SessionsGetV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<Chrt.Session1>;
|
|
57
75
|
private __getV1;
|
|
76
|
+
/**
|
|
77
|
+
* Returns distinct off_chrt_order_id values matching the query via case-insensitive regex, searching across both sessions and devices. | authz: min_org_role=operator | () -> (list[str])
|
|
78
|
+
*
|
|
79
|
+
* @param {Chrt.tracking.SessionsTypeaheadOffChrtOrderIdV1Request} request
|
|
80
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* await client.tracking.sessions.typeaheadOffChrtOrderIdV1({
|
|
86
|
+
* query: "query",
|
|
87
|
+
* limit: 1
|
|
88
|
+
* })
|
|
89
|
+
*/
|
|
90
|
+
typeaheadOffChrtOrderIdV1(request: Chrt.tracking.SessionsTypeaheadOffChrtOrderIdV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<string[]>;
|
|
91
|
+
private __typeaheadOffChrtOrderIdV1;
|
|
92
|
+
/**
|
|
93
|
+
* Full-text search across session comments, device_mac_address, flight_number, and off_chrt_order_id using Atlas Search. | authz: min_org_role=operator | () -> (SessionSearchRes)
|
|
94
|
+
*
|
|
95
|
+
* @param {Chrt.tracking.SessionsSearchV1Request} request
|
|
96
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
97
|
+
*
|
|
98
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* await client.tracking.sessions.searchV1({
|
|
102
|
+
* query: "query",
|
|
103
|
+
* page: 1,
|
|
104
|
+
* page_size: 1
|
|
105
|
+
* })
|
|
106
|
+
*/
|
|
107
|
+
searchV1(request: Chrt.tracking.SessionsSearchV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<Chrt.SessionSearchRes>;
|
|
108
|
+
private __searchV1;
|
|
58
109
|
/**
|
|
59
110
|
* Creates a new tracking session for a device and links the device to it. The device must be registered to the caller's organization. | (SessionCreateSessionRequest1) -> (PydanticObjectId)
|
|
60
111
|
*
|
|
@@ -71,7 +122,7 @@ export declare class Sessions {
|
|
|
71
122
|
createSessionV1(request: Chrt.tracking.SessionCreateSessionRequest1, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<string>;
|
|
72
123
|
private __createSessionV1;
|
|
73
124
|
/**
|
|
74
|
-
* Updates a session's comments
|
|
125
|
+
* Updates a session's mutable fields (comments, public, off_chrt_order_id, flight_number, fa_flight_ids). | (SessionUpdateRequest1) -> (bool)
|
|
75
126
|
*
|
|
76
127
|
* @param {Chrt.tracking.SessionUpdateRequest1} request
|
|
77
128
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -20,25 +20,87 @@ export class Sessions {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Lists sessions with filtering, sorting, and pagination. | authz: min_org_role=operator | () -> (SessionListRes)
|
|
24
24
|
*
|
|
25
|
+
* @param {Chrt.tracking.SessionsListV1Request} request
|
|
25
26
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
27
|
*
|
|
28
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
+
*
|
|
27
30
|
* @example
|
|
28
|
-
* await client.tracking.sessions.listV1(
|
|
31
|
+
* await client.tracking.sessions.listV1({
|
|
32
|
+
* sort_by: "session_created_at_timestamp",
|
|
33
|
+
* sort_order: "asc",
|
|
34
|
+
* page: 1,
|
|
35
|
+
* page_size: 1,
|
|
36
|
+
* filter_recording: true,
|
|
37
|
+
* filter_terminated: true,
|
|
38
|
+
* filter_public: true,
|
|
39
|
+
* filter_device_id: "filter_device_id",
|
|
40
|
+
* filter_off_chrt_order_id: "filter_off_chrt_order_id",
|
|
41
|
+
* filter_flight_number: "filter_flight_number",
|
|
42
|
+
* filter_session_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
43
|
+
* filter_session_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
44
|
+
* filter_recording_initiated_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
45
|
+
* filter_recording_initiated_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
46
|
+
* })
|
|
29
47
|
*/
|
|
30
|
-
listV1(requestOptions) {
|
|
31
|
-
return core.HttpResponsePromise.fromPromise(this.__listV1(requestOptions));
|
|
48
|
+
listV1(request = {}, requestOptions) {
|
|
49
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(request, requestOptions));
|
|
32
50
|
}
|
|
33
|
-
__listV1(
|
|
34
|
-
return __awaiter(this,
|
|
35
|
-
var _a, _b, _c, _d;
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
51
|
+
__listV1() {
|
|
52
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
53
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
54
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_recording: filterRecording, filter_terminated: filterTerminated, filter_public: filterPublic, filter_device_id: filterDeviceId, filter_off_chrt_order_id: filterOffChrtOrderId, filter_flight_number: filterFlightNumber, filter_session_created_at_timestamp_gte: filterSessionCreatedAtTimestampGte, filter_session_created_at_timestamp_lte: filterSessionCreatedAtTimestampLte, filter_recording_initiated_at_timestamp_gte: filterRecordingInitiatedAtTimestampGte, filter_recording_initiated_at_timestamp_lte: filterRecordingInitiatedAtTimestampLte, } = request;
|
|
55
|
+
const _queryParams = {};
|
|
56
|
+
if (sortBy !== undefined) {
|
|
57
|
+
_queryParams["sort_by"] = sortBy;
|
|
58
|
+
}
|
|
59
|
+
if (sortOrder !== undefined) {
|
|
60
|
+
_queryParams["sort_order"] = sortOrder;
|
|
61
|
+
}
|
|
62
|
+
if (page !== undefined) {
|
|
63
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
64
|
+
}
|
|
65
|
+
if (pageSize !== undefined) {
|
|
66
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
67
|
+
}
|
|
68
|
+
if (filterRecording !== undefined) {
|
|
69
|
+
_queryParams["filter_recording"] = (_c = filterRecording === null || filterRecording === void 0 ? void 0 : filterRecording.toString()) !== null && _c !== void 0 ? _c : null;
|
|
70
|
+
}
|
|
71
|
+
if (filterTerminated !== undefined) {
|
|
72
|
+
_queryParams["filter_terminated"] = (_d = filterTerminated === null || filterTerminated === void 0 ? void 0 : filterTerminated.toString()) !== null && _d !== void 0 ? _d : null;
|
|
73
|
+
}
|
|
74
|
+
if (filterPublic !== undefined) {
|
|
75
|
+
_queryParams["filter_public"] = (_e = filterPublic === null || filterPublic === void 0 ? void 0 : filterPublic.toString()) !== null && _e !== void 0 ? _e : null;
|
|
76
|
+
}
|
|
77
|
+
if (filterDeviceId !== undefined) {
|
|
78
|
+
_queryParams["filter_device_id"] = filterDeviceId;
|
|
79
|
+
}
|
|
80
|
+
if (filterOffChrtOrderId !== undefined) {
|
|
81
|
+
_queryParams["filter_off_chrt_order_id"] = filterOffChrtOrderId;
|
|
82
|
+
}
|
|
83
|
+
if (filterFlightNumber !== undefined) {
|
|
84
|
+
_queryParams["filter_flight_number"] = filterFlightNumber;
|
|
85
|
+
}
|
|
86
|
+
if (filterSessionCreatedAtTimestampGte !== undefined) {
|
|
87
|
+
_queryParams["filter_session_created_at_timestamp_gte"] = filterSessionCreatedAtTimestampGte;
|
|
88
|
+
}
|
|
89
|
+
if (filterSessionCreatedAtTimestampLte !== undefined) {
|
|
90
|
+
_queryParams["filter_session_created_at_timestamp_lte"] = filterSessionCreatedAtTimestampLte;
|
|
91
|
+
}
|
|
92
|
+
if (filterRecordingInitiatedAtTimestampGte !== undefined) {
|
|
93
|
+
_queryParams["filter_recording_initiated_at_timestamp_gte"] = filterRecordingInitiatedAtTimestampGte;
|
|
94
|
+
}
|
|
95
|
+
if (filterRecordingInitiatedAtTimestampLte !== undefined) {
|
|
96
|
+
_queryParams["filter_recording_initiated_at_timestamp_lte"] = filterRecordingInitiatedAtTimestampLte;
|
|
97
|
+
}
|
|
98
|
+
let _headers = mergeHeaders((_f = this._options) === null || _f === void 0 ? void 0 : _f.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
99
|
+
const _response = yield ((_g = this._options.fetcher) !== null && _g !== void 0 ? _g : core.fetcher)({
|
|
100
|
+
url: core.url.join((_j = (_h = (yield core.Supplier.get(this._options.baseUrl))) !== null && _h !== void 0 ? _h : (yield core.Supplier.get(this._options.environment))) !== null && _j !== void 0 ? _j : environments.ChrtEnvironment.Local, "tracking/sessions/list/v1"),
|
|
39
101
|
method: "GET",
|
|
40
102
|
headers: _headers,
|
|
41
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
103
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
42
104
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
43
105
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
44
106
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -47,11 +109,16 @@ export class Sessions {
|
|
|
47
109
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
48
110
|
}
|
|
49
111
|
if (_response.error.reason === "status-code") {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
112
|
+
switch (_response.error.statusCode) {
|
|
113
|
+
case 422:
|
|
114
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
115
|
+
default:
|
|
116
|
+
throw new errors.ChrtError({
|
|
117
|
+
statusCode: _response.error.statusCode,
|
|
118
|
+
body: _response.error.body,
|
|
119
|
+
rawResponse: _response.rawResponse,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
55
122
|
}
|
|
56
123
|
switch (_response.error.reason) {
|
|
57
124
|
case "non-json":
|
|
@@ -71,7 +138,7 @@ export class Sessions {
|
|
|
71
138
|
});
|
|
72
139
|
}
|
|
73
140
|
/**
|
|
74
|
-
* Retrieves a single session by its ID. Access restricted to the caller's organization. | () -> (Session1)
|
|
141
|
+
* Retrieves a single session by its ID. Access restricted to the caller's organization. | authz: min_org_role=operator | () -> (Session1)
|
|
75
142
|
*
|
|
76
143
|
* @param {Chrt.tracking.SessionsGetV1Request} request
|
|
77
144
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -134,6 +201,146 @@ export class Sessions {
|
|
|
134
201
|
}
|
|
135
202
|
});
|
|
136
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* Returns distinct off_chrt_order_id values matching the query via case-insensitive regex, searching across both sessions and devices. | authz: min_org_role=operator | () -> (list[str])
|
|
206
|
+
*
|
|
207
|
+
* @param {Chrt.tracking.SessionsTypeaheadOffChrtOrderIdV1Request} request
|
|
208
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
209
|
+
*
|
|
210
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* await client.tracking.sessions.typeaheadOffChrtOrderIdV1({
|
|
214
|
+
* query: "query",
|
|
215
|
+
* limit: 1
|
|
216
|
+
* })
|
|
217
|
+
*/
|
|
218
|
+
typeaheadOffChrtOrderIdV1(request, requestOptions) {
|
|
219
|
+
return core.HttpResponsePromise.fromPromise(this.__typeaheadOffChrtOrderIdV1(request, requestOptions));
|
|
220
|
+
}
|
|
221
|
+
__typeaheadOffChrtOrderIdV1(request, requestOptions) {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
var _a, _b, _c, _d, _e;
|
|
224
|
+
const { query, limit } = request;
|
|
225
|
+
const _queryParams = {};
|
|
226
|
+
_queryParams["query"] = query;
|
|
227
|
+
if (limit !== undefined) {
|
|
228
|
+
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
229
|
+
}
|
|
230
|
+
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
|
+
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/off_chrt_order_id/v1"),
|
|
233
|
+
method: "GET",
|
|
234
|
+
headers: _headers,
|
|
235
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
236
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
237
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
238
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
239
|
+
});
|
|
240
|
+
if (_response.ok) {
|
|
241
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
242
|
+
}
|
|
243
|
+
if (_response.error.reason === "status-code") {
|
|
244
|
+
switch (_response.error.statusCode) {
|
|
245
|
+
case 422:
|
|
246
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
247
|
+
default:
|
|
248
|
+
throw new errors.ChrtError({
|
|
249
|
+
statusCode: _response.error.statusCode,
|
|
250
|
+
body: _response.error.body,
|
|
251
|
+
rawResponse: _response.rawResponse,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
switch (_response.error.reason) {
|
|
256
|
+
case "non-json":
|
|
257
|
+
throw new errors.ChrtError({
|
|
258
|
+
statusCode: _response.error.statusCode,
|
|
259
|
+
body: _response.error.rawBody,
|
|
260
|
+
rawResponse: _response.rawResponse,
|
|
261
|
+
});
|
|
262
|
+
case "timeout":
|
|
263
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/sessions/typeahead/off_chrt_order_id/v1.");
|
|
264
|
+
case "unknown":
|
|
265
|
+
throw new errors.ChrtError({
|
|
266
|
+
message: _response.error.errorMessage,
|
|
267
|
+
rawResponse: _response.rawResponse,
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Full-text search across session comments, device_mac_address, flight_number, and off_chrt_order_id using Atlas Search. | authz: min_org_role=operator | () -> (SessionSearchRes)
|
|
274
|
+
*
|
|
275
|
+
* @param {Chrt.tracking.SessionsSearchV1Request} request
|
|
276
|
+
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
277
|
+
*
|
|
278
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
279
|
+
*
|
|
280
|
+
* @example
|
|
281
|
+
* await client.tracking.sessions.searchV1({
|
|
282
|
+
* query: "query",
|
|
283
|
+
* page: 1,
|
|
284
|
+
* page_size: 1
|
|
285
|
+
* })
|
|
286
|
+
*/
|
|
287
|
+
searchV1(request, requestOptions) {
|
|
288
|
+
return core.HttpResponsePromise.fromPromise(this.__searchV1(request, requestOptions));
|
|
289
|
+
}
|
|
290
|
+
__searchV1(request, requestOptions) {
|
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
+
var _a, _b, _c, _d, _e, _f;
|
|
293
|
+
const { query, page, page_size: pageSize } = request;
|
|
294
|
+
const _queryParams = {};
|
|
295
|
+
_queryParams["query"] = query;
|
|
296
|
+
if (page !== undefined) {
|
|
297
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
298
|
+
}
|
|
299
|
+
if (pageSize !== undefined) {
|
|
300
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
301
|
+
}
|
|
302
|
+
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
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
304
|
+
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"),
|
|
305
|
+
method: "GET",
|
|
306
|
+
headers: _headers,
|
|
307
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
308
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
309
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
310
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
311
|
+
});
|
|
312
|
+
if (_response.ok) {
|
|
313
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
314
|
+
}
|
|
315
|
+
if (_response.error.reason === "status-code") {
|
|
316
|
+
switch (_response.error.statusCode) {
|
|
317
|
+
case 422:
|
|
318
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
319
|
+
default:
|
|
320
|
+
throw new errors.ChrtError({
|
|
321
|
+
statusCode: _response.error.statusCode,
|
|
322
|
+
body: _response.error.body,
|
|
323
|
+
rawResponse: _response.rawResponse,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
switch (_response.error.reason) {
|
|
328
|
+
case "non-json":
|
|
329
|
+
throw new errors.ChrtError({
|
|
330
|
+
statusCode: _response.error.statusCode,
|
|
331
|
+
body: _response.error.rawBody,
|
|
332
|
+
rawResponse: _response.rawResponse,
|
|
333
|
+
});
|
|
334
|
+
case "timeout":
|
|
335
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/sessions/search/v1.");
|
|
336
|
+
case "unknown":
|
|
337
|
+
throw new errors.ChrtError({
|
|
338
|
+
message: _response.error.errorMessage,
|
|
339
|
+
rawResponse: _response.rawResponse,
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
}
|
|
137
344
|
/**
|
|
138
345
|
* Creates a new tracking session for a device and links the device to it. The device must be registered to the caller's organization. | (SessionCreateSessionRequest1) -> (PydanticObjectId)
|
|
139
346
|
*
|
|
@@ -199,7 +406,7 @@ export class Sessions {
|
|
|
199
406
|
});
|
|
200
407
|
}
|
|
201
408
|
/**
|
|
202
|
-
* Updates a session's comments
|
|
409
|
+
* Updates a session's mutable fields (comments, public, off_chrt_order_id, flight_number, fa_flight_ids). | (SessionUpdateRequest1) -> (bool)
|
|
203
410
|
*
|
|
204
411
|
* @param {Chrt.tracking.SessionUpdateRequest1} request
|
|
205
412
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -12,4 +12,9 @@ export interface SessionUpdateRequest1 {
|
|
|
12
12
|
comments?: string | null;
|
|
13
13
|
delete_comments?: boolean;
|
|
14
14
|
public?: boolean | null;
|
|
15
|
+
off_chrt_order_id?: string | null;
|
|
16
|
+
delete_off_chrt_order_id?: boolean;
|
|
17
|
+
flight_number?: string | null;
|
|
18
|
+
delete_flight_number?: boolean;
|
|
19
|
+
fa_flight_ids?: string[] | null;
|
|
15
20
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* sort_by: "session_created_at_timestamp",
|
|
9
|
+
* sort_order: "asc",
|
|
10
|
+
* page: 1,
|
|
11
|
+
* page_size: 1,
|
|
12
|
+
* filter_recording: true,
|
|
13
|
+
* filter_terminated: true,
|
|
14
|
+
* filter_public: true,
|
|
15
|
+
* filter_device_id: "filter_device_id",
|
|
16
|
+
* filter_off_chrt_order_id: "filter_off_chrt_order_id",
|
|
17
|
+
* filter_flight_number: "filter_flight_number",
|
|
18
|
+
* filter_session_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
19
|
+
* filter_session_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
20
|
+
* filter_recording_initiated_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
21
|
+
* filter_recording_initiated_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
22
|
+
* }
|
|
23
|
+
*/
|
|
24
|
+
export interface SessionsListV1Request {
|
|
25
|
+
/** Field to sort by */
|
|
26
|
+
sort_by?: Chrt.SessionSortByEnum | null;
|
|
27
|
+
/** Sort order (ascending or descending) */
|
|
28
|
+
sort_order?: Chrt.SortOrderEnum | null;
|
|
29
|
+
page?: number | null;
|
|
30
|
+
page_size?: number | null;
|
|
31
|
+
/** Filter by recording status */
|
|
32
|
+
filter_recording?: boolean | null;
|
|
33
|
+
/** Filter by terminated status */
|
|
34
|
+
filter_terminated?: boolean | null;
|
|
35
|
+
/** Filter by public visibility */
|
|
36
|
+
filter_public?: boolean | null;
|
|
37
|
+
/** Filter by device ID */
|
|
38
|
+
filter_device_id?: string | null;
|
|
39
|
+
/** Filter by off-CHRT order ID (exact match) */
|
|
40
|
+
filter_off_chrt_order_id?: string | null;
|
|
41
|
+
/** Filter by flight number (exact match) */
|
|
42
|
+
filter_flight_number?: string | null;
|
|
43
|
+
/** Filter by session_created_at_timestamp >= value */
|
|
44
|
+
filter_session_created_at_timestamp_gte?: string | null;
|
|
45
|
+
/** Filter by session_created_at_timestamp <= value */
|
|
46
|
+
filter_session_created_at_timestamp_lte?: string | null;
|
|
47
|
+
/** Filter by recording_initiated_at_timestamp >= value */
|
|
48
|
+
filter_recording_initiated_at_timestamp_gte?: string | null;
|
|
49
|
+
/** Filter by recording_initiated_at_timestamp <= value */
|
|
50
|
+
filter_recording_initiated_at_timestamp_lte?: string | null;
|
|
51
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* query: "query",
|
|
8
|
+
* page: 1,
|
|
9
|
+
* page_size: 1
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface SessionsSearchV1Request {
|
|
13
|
+
/** Full-text search query */
|
|
14
|
+
query: string;
|
|
15
|
+
page?: number | null;
|
|
16
|
+
page_size?: number | null;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* query: "query",
|
|
8
|
+
* limit: 1
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface SessionsTypeaheadOffChrtOrderIdV1Request {
|
|
12
|
+
/** Typeahead search query */
|
|
13
|
+
query: string;
|
|
14
|
+
/** Max results */
|
|
15
|
+
limit?: number | null;
|
|
16
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
export { type SessionsListV1Request } from "./SessionsListV1Request.mjs";
|
|
1
2
|
export { type SessionsGetV1Request } from "./SessionsGetV1Request.mjs";
|
|
3
|
+
export { type SessionsTypeaheadOffChrtOrderIdV1Request } from "./SessionsTypeaheadOffChrtOrderIdV1Request.mjs";
|
|
4
|
+
export { type SessionsSearchV1Request } from "./SessionsSearchV1Request.mjs";
|
|
2
5
|
export { type SessionCreateSessionRequest1 } from "./SessionCreateSessionRequest1.mjs";
|
|
3
6
|
export { type SessionUpdateRequest1 } from "./SessionUpdateRequest1.mjs";
|
|
4
7
|
export { type SessionsStartV1Request } from "./SessionsStartV1Request.mjs";
|
|
@@ -13,5 +13,8 @@ export interface Session1 {
|
|
|
13
13
|
session_created_at_timestamp: string;
|
|
14
14
|
recording_initiated_at_timestamp?: string | null;
|
|
15
15
|
public?: boolean;
|
|
16
|
+
flight_number?: string | null;
|
|
17
|
+
fa_flight_ids?: string[];
|
|
18
|
+
off_chrt_order_id?: string | null;
|
|
16
19
|
_id: string;
|
|
17
20
|
}
|