@chrt-inc/typescript-sdk 1.259.2 → 1.262.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.
Files changed (26) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/tracking/client/Client.d.ts +3 -3
  3. package/dist/cjs/api/resources/tracking/client/Client.js +6 -6
  4. package/dist/cjs/api/resources/tracking/resources/index.d.ts +2 -2
  5. package/dist/cjs/api/resources/tracking/resources/index.js +3 -3
  6. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.d.ts +0 -15
  7. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.js +0 -70
  8. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/index.d.ts +0 -1
  9. package/dist/cjs/version.d.ts +1 -1
  10. package/dist/cjs/version.js +1 -1
  11. package/dist/esm/Client.mjs +2 -2
  12. package/dist/esm/api/resources/tracking/client/Client.d.mts +3 -3
  13. package/dist/esm/api/resources/tracking/client/Client.mjs +5 -5
  14. package/dist/esm/api/resources/tracking/resources/index.d.mts +2 -2
  15. package/dist/esm/api/resources/tracking/resources/index.mjs +2 -2
  16. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.d.mts +0 -15
  17. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.mjs +0 -70
  18. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/index.d.mts +0 -1
  19. package/dist/esm/version.d.mts +1 -1
  20. package/dist/esm/version.mjs +1 -1
  21. package/package.json +1 -1
  22. package/reference.md +34 -99
  23. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsFancyRequest.d.ts +0 -13
  24. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsFancyRequest.js +0 -5
  25. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsFancyRequest.d.mts +0 -13
  26. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsFancyRequest.mjs +0 -4
@@ -68,8 +68,8 @@ class ChrtClient {
68
68
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
69
69
  "X-Fern-Language": "JavaScript",
70
70
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
71
- "X-Fern-SDK-Version": "1.259.2",
72
- "User-Agent": "@chrt-inc/typescript-sdk/1.259.2",
71
+ "X-Fern-SDK-Version": "1.262.0",
72
+ "User-Agent": "@chrt-inc/typescript-sdk/1.262.0",
73
73
  "X-Fern-Runtime": core.RUNTIME.type,
74
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
75
75
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -7,8 +7,8 @@ import { CargoByDevice } from "../resources/cargoByDevice/client/Client.js";
7
7
  import { CargoByDriver } from "../resources/cargoByDriver/client/Client.js";
8
8
  import { Devices } from "../resources/devices/client/Client.js";
9
9
  import { Driver } from "../resources/driver/client/Client.js";
10
- import { TaskGroupByDriver } from "../resources/taskGroupByDriver/client/Client.js";
11
10
  import { SessionByDevice } from "../resources/sessionByDevice/client/Client.js";
11
+ import { TaskGroupByDriver } from "../resources/taskGroupByDriver/client/Client.js";
12
12
  export declare namespace Tracking {
13
13
  interface Options {
14
14
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -26,13 +26,13 @@ export declare class Tracking {
26
26
  protected _cargoByDriver: CargoByDriver | undefined;
27
27
  protected _devices: Devices | undefined;
28
28
  protected _driver: Driver | undefined;
29
- protected _taskGroupByDriver: TaskGroupByDriver | undefined;
30
29
  protected _sessionByDevice: SessionByDevice | undefined;
30
+ protected _taskGroupByDriver: TaskGroupByDriver | undefined;
31
31
  constructor(_options?: Tracking.Options);
32
32
  get cargoByDevice(): CargoByDevice;
33
33
  get cargoByDriver(): CargoByDriver;
34
34
  get devices(): Devices;
35
35
  get driver(): Driver;
36
- get taskGroupByDriver(): TaskGroupByDriver;
37
36
  get sessionByDevice(): SessionByDevice;
37
+ get taskGroupByDriver(): TaskGroupByDriver;
38
38
  }
@@ -8,8 +8,8 @@ const Client_js_1 = require("../resources/cargoByDevice/client/Client.js");
8
8
  const Client_js_2 = require("../resources/cargoByDriver/client/Client.js");
9
9
  const Client_js_3 = require("../resources/devices/client/Client.js");
10
10
  const Client_js_4 = require("../resources/driver/client/Client.js");
11
- const Client_js_5 = require("../resources/taskGroupByDriver/client/Client.js");
12
- const Client_js_6 = require("../resources/sessionByDevice/client/Client.js");
11
+ const Client_js_5 = require("../resources/sessionByDevice/client/Client.js");
12
+ const Client_js_6 = require("../resources/taskGroupByDriver/client/Client.js");
13
13
  class Tracking {
14
14
  constructor(_options = {}) {
15
15
  this._options = _options;
@@ -30,13 +30,13 @@ class Tracking {
30
30
  var _a;
31
31
  return ((_a = this._driver) !== null && _a !== void 0 ? _a : (this._driver = new Client_js_4.Driver(this._options)));
32
32
  }
33
- get taskGroupByDriver() {
33
+ get sessionByDevice() {
34
34
  var _a;
35
- return ((_a = this._taskGroupByDriver) !== null && _a !== void 0 ? _a : (this._taskGroupByDriver = new Client_js_5.TaskGroupByDriver(this._options)));
35
+ return ((_a = this._sessionByDevice) !== null && _a !== void 0 ? _a : (this._sessionByDevice = new Client_js_5.SessionByDevice(this._options)));
36
36
  }
37
- get sessionByDevice() {
37
+ get taskGroupByDriver() {
38
38
  var _a;
39
- return ((_a = this._sessionByDevice) !== null && _a !== void 0 ? _a : (this._sessionByDevice = new Client_js_6.SessionByDevice(this._options)));
39
+ return ((_a = this._taskGroupByDriver) !== null && _a !== void 0 ? _a : (this._taskGroupByDriver = new Client_js_6.TaskGroupByDriver(this._options)));
40
40
  }
41
41
  }
42
42
  exports.Tracking = Tracking;
@@ -2,11 +2,11 @@ export * as cargoByDevice from "./cargoByDevice/index.js";
2
2
  export * as cargoByDriver from "./cargoByDriver/index.js";
3
3
  export * as devices from "./devices/index.js";
4
4
  export * as driver from "./driver/index.js";
5
- export * as taskGroupByDriver from "./taskGroupByDriver/index.js";
6
5
  export * as sessionByDevice from "./sessionByDevice/index.js";
6
+ export * as taskGroupByDriver from "./taskGroupByDriver/index.js";
7
7
  export * from "./cargoByDevice/client/requests/index.js";
8
8
  export * from "./cargoByDriver/client/requests/index.js";
9
9
  export * from "./devices/client/requests/index.js";
10
10
  export * from "./driver/client/requests/index.js";
11
- export * from "./taskGroupByDriver/client/requests/index.js";
12
11
  export * from "./sessionByDevice/client/requests/index.js";
12
+ export * from "./taskGroupByDriver/client/requests/index.js";
@@ -36,16 +36,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.sessionByDevice = exports.taskGroupByDriver = exports.driver = exports.devices = exports.cargoByDriver = exports.cargoByDevice = void 0;
39
+ exports.taskGroupByDriver = exports.sessionByDevice = exports.driver = exports.devices = exports.cargoByDriver = exports.cargoByDevice = void 0;
40
40
  exports.cargoByDevice = __importStar(require("./cargoByDevice/index.js"));
41
41
  exports.cargoByDriver = __importStar(require("./cargoByDriver/index.js"));
42
42
  exports.devices = __importStar(require("./devices/index.js"));
43
43
  exports.driver = __importStar(require("./driver/index.js"));
44
- exports.taskGroupByDriver = __importStar(require("./taskGroupByDriver/index.js"));
45
44
  exports.sessionByDevice = __importStar(require("./sessionByDevice/index.js"));
45
+ exports.taskGroupByDriver = __importStar(require("./taskGroupByDriver/index.js"));
46
46
  __exportStar(require("./cargoByDevice/client/requests/index.js"), exports);
47
47
  __exportStar(require("./cargoByDriver/client/requests/index.js"), exports);
48
48
  __exportStar(require("./devices/client/requests/index.js"), exports);
49
49
  __exportStar(require("./driver/client/requests/index.js"), exports);
50
- __exportStar(require("./taskGroupByDriver/client/requests/index.js"), exports);
51
50
  __exportStar(require("./sessionByDevice/client/requests/index.js"), exports);
51
+ __exportStar(require("./taskGroupByDriver/client/requests/index.js"), exports);
@@ -70,21 +70,6 @@ export declare class SessionByDevice {
70
70
  */
71
71
  dataPoints(request: Chrt.tracking.SessionByDeviceDataPointsRequest, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.TrackingSessionByDeviceDataPoint1[]>;
72
72
  private __dataPoints;
73
- /**
74
- * Return data points for a session with intelligent stop/movement detection. Detects stops (location barely changes for >5 minutes) and shows up to 5 markers. For movement, samples data points lightly.
75
- *
76
- * @param {Chrt.tracking.SessionByDeviceDataPointsFancyRequest} request
77
- * @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
78
- *
79
- * @throws {@link Chrt.UnprocessableEntityError}
80
- *
81
- * @example
82
- * await client.tracking.sessionByDevice.dataPointsFancy({
83
- * session_id: "session_id"
84
- * })
85
- */
86
- dataPointsFancy(request: Chrt.tracking.SessionByDeviceDataPointsFancyRequest, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.TrackingSessionByDeviceDataPoint1[]>;
87
- private __dataPointsFancy;
88
73
  /**
89
74
  * Create a session for a device and link the device to it.
90
75
  *
@@ -243,76 +243,6 @@ class SessionByDevice {
243
243
  }
244
244
  });
245
245
  }
246
- /**
247
- * Return data points for a session with intelligent stop/movement detection. Detects stops (location barely changes for >5 minutes) and shows up to 5 markers. For movement, samples data points lightly.
248
- *
249
- * @param {Chrt.tracking.SessionByDeviceDataPointsFancyRequest} request
250
- * @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
251
- *
252
- * @throws {@link Chrt.UnprocessableEntityError}
253
- *
254
- * @example
255
- * await client.tracking.sessionByDevice.dataPointsFancy({
256
- * session_id: "session_id"
257
- * })
258
- */
259
- dataPointsFancy(request, requestOptions) {
260
- return core.HttpResponsePromise.fromPromise(this.__dataPointsFancy(request, requestOptions));
261
- }
262
- __dataPointsFancy(request, requestOptions) {
263
- return __awaiter(this, void 0, void 0, function* () {
264
- var _a, _b, _c, _d, _e;
265
- const { session_id: sessionId, limit } = request;
266
- const _queryParams = {};
267
- _queryParams["session_id"] = sessionId;
268
- if (limit !== undefined) {
269
- _queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
270
- }
271
- 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);
272
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
273
- 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/session_by_device/data_points_fancy"),
274
- method: "GET",
275
- headers: _headers,
276
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
277
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
278
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
279
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
280
- });
281
- if (_response.ok) {
282
- return {
283
- data: _response.body,
284
- rawResponse: _response.rawResponse,
285
- };
286
- }
287
- if (_response.error.reason === "status-code") {
288
- switch (_response.error.statusCode) {
289
- case 422:
290
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
291
- default:
292
- throw new errors.ChrtError({
293
- statusCode: _response.error.statusCode,
294
- body: _response.error.body,
295
- rawResponse: _response.rawResponse,
296
- });
297
- }
298
- }
299
- switch (_response.error.reason) {
300
- case "non-json":
301
- throw new errors.ChrtError({
302
- statusCode: _response.error.statusCode,
303
- body: _response.error.rawBody,
304
- rawResponse: _response.rawResponse,
305
- });
306
- case "timeout":
307
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/data_points_fancy.");
308
- case "unknown":
309
- throw new errors.ChrtError({
310
- message: _response.error.errorMessage,
311
- rawResponse: _response.rawResponse,
312
- });
313
- }
314
- });
315
- }
316
246
  /**
317
247
  * Create a session for a device and link the device to it.
318
248
  *
@@ -1,6 +1,5 @@
1
1
  export { type SessionByDeviceLastSeenRequest } from "./SessionByDeviceLastSeenRequest.js";
2
2
  export { type SessionByDeviceDataPointsRequest } from "./SessionByDeviceDataPointsRequest.js";
3
- export { type SessionByDeviceDataPointsFancyRequest } from "./SessionByDeviceDataPointsFancyRequest.js";
4
3
  export { type SessionByDeviceCreateSessionRequest1 } from "./SessionByDeviceCreateSessionRequest1.js";
5
4
  export { type SessionByDeviceUpdateCommentsRequest1 } from "./SessionByDeviceUpdateCommentsRequest1.js";
6
5
  export { type SessionByDeviceStartSessionRequest } from "./SessionByDeviceStartSessionRequest.js";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.259.2";
1
+ export declare const SDK_VERSION = "1.262.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.259.2";
4
+ exports.SDK_VERSION = "1.262.0";
@@ -32,8 +32,8 @@ export class ChrtClient {
32
32
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
33
33
  "X-Fern-Language": "JavaScript",
34
34
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
35
- "X-Fern-SDK-Version": "1.259.2",
36
- "User-Agent": "@chrt-inc/typescript-sdk/1.259.2",
35
+ "X-Fern-SDK-Version": "1.262.0",
36
+ "User-Agent": "@chrt-inc/typescript-sdk/1.262.0",
37
37
  "X-Fern-Runtime": core.RUNTIME.type,
38
38
  "X-Fern-Runtime-Version": core.RUNTIME.version,
39
39
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -7,8 +7,8 @@ import { CargoByDevice } from "../resources/cargoByDevice/client/Client.mjs";
7
7
  import { CargoByDriver } from "../resources/cargoByDriver/client/Client.mjs";
8
8
  import { Devices } from "../resources/devices/client/Client.mjs";
9
9
  import { Driver } from "../resources/driver/client/Client.mjs";
10
- import { TaskGroupByDriver } from "../resources/taskGroupByDriver/client/Client.mjs";
11
10
  import { SessionByDevice } from "../resources/sessionByDevice/client/Client.mjs";
11
+ import { TaskGroupByDriver } from "../resources/taskGroupByDriver/client/Client.mjs";
12
12
  export declare namespace Tracking {
13
13
  interface Options {
14
14
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -26,13 +26,13 @@ export declare class Tracking {
26
26
  protected _cargoByDriver: CargoByDriver | undefined;
27
27
  protected _devices: Devices | undefined;
28
28
  protected _driver: Driver | undefined;
29
- protected _taskGroupByDriver: TaskGroupByDriver | undefined;
30
29
  protected _sessionByDevice: SessionByDevice | undefined;
30
+ protected _taskGroupByDriver: TaskGroupByDriver | undefined;
31
31
  constructor(_options?: Tracking.Options);
32
32
  get cargoByDevice(): CargoByDevice;
33
33
  get cargoByDriver(): CargoByDriver;
34
34
  get devices(): Devices;
35
35
  get driver(): Driver;
36
- get taskGroupByDriver(): TaskGroupByDriver;
37
36
  get sessionByDevice(): SessionByDevice;
37
+ get taskGroupByDriver(): TaskGroupByDriver;
38
38
  }
@@ -5,8 +5,8 @@ import { CargoByDevice } from "../resources/cargoByDevice/client/Client.mjs";
5
5
  import { CargoByDriver } from "../resources/cargoByDriver/client/Client.mjs";
6
6
  import { Devices } from "../resources/devices/client/Client.mjs";
7
7
  import { Driver } from "../resources/driver/client/Client.mjs";
8
- import { TaskGroupByDriver } from "../resources/taskGroupByDriver/client/Client.mjs";
9
8
  import { SessionByDevice } from "../resources/sessionByDevice/client/Client.mjs";
9
+ import { TaskGroupByDriver } from "../resources/taskGroupByDriver/client/Client.mjs";
10
10
  export class Tracking {
11
11
  constructor(_options = {}) {
12
12
  this._options = _options;
@@ -27,12 +27,12 @@ export class Tracking {
27
27
  var _a;
28
28
  return ((_a = this._driver) !== null && _a !== void 0 ? _a : (this._driver = new Driver(this._options)));
29
29
  }
30
- get taskGroupByDriver() {
31
- var _a;
32
- return ((_a = this._taskGroupByDriver) !== null && _a !== void 0 ? _a : (this._taskGroupByDriver = new TaskGroupByDriver(this._options)));
33
- }
34
30
  get sessionByDevice() {
35
31
  var _a;
36
32
  return ((_a = this._sessionByDevice) !== null && _a !== void 0 ? _a : (this._sessionByDevice = new SessionByDevice(this._options)));
37
33
  }
34
+ get taskGroupByDriver() {
35
+ var _a;
36
+ return ((_a = this._taskGroupByDriver) !== null && _a !== void 0 ? _a : (this._taskGroupByDriver = new TaskGroupByDriver(this._options)));
37
+ }
38
38
  }
@@ -2,11 +2,11 @@ export * as cargoByDevice from "./cargoByDevice/index.mjs";
2
2
  export * as cargoByDriver from "./cargoByDriver/index.mjs";
3
3
  export * as devices from "./devices/index.mjs";
4
4
  export * as driver from "./driver/index.mjs";
5
- export * as taskGroupByDriver from "./taskGroupByDriver/index.mjs";
6
5
  export * as sessionByDevice from "./sessionByDevice/index.mjs";
6
+ export * as taskGroupByDriver from "./taskGroupByDriver/index.mjs";
7
7
  export * from "./cargoByDevice/client/requests/index.mjs";
8
8
  export * from "./cargoByDriver/client/requests/index.mjs";
9
9
  export * from "./devices/client/requests/index.mjs";
10
10
  export * from "./driver/client/requests/index.mjs";
11
- export * from "./taskGroupByDriver/client/requests/index.mjs";
12
11
  export * from "./sessionByDevice/client/requests/index.mjs";
12
+ export * from "./taskGroupByDriver/client/requests/index.mjs";
@@ -2,11 +2,11 @@ export * as cargoByDevice from "./cargoByDevice/index.mjs";
2
2
  export * as cargoByDriver from "./cargoByDriver/index.mjs";
3
3
  export * as devices from "./devices/index.mjs";
4
4
  export * as driver from "./driver/index.mjs";
5
- export * as taskGroupByDriver from "./taskGroupByDriver/index.mjs";
6
5
  export * as sessionByDevice from "./sessionByDevice/index.mjs";
6
+ export * as taskGroupByDriver from "./taskGroupByDriver/index.mjs";
7
7
  export * from "./cargoByDevice/client/requests/index.mjs";
8
8
  export * from "./cargoByDriver/client/requests/index.mjs";
9
9
  export * from "./devices/client/requests/index.mjs";
10
10
  export * from "./driver/client/requests/index.mjs";
11
- export * from "./taskGroupByDriver/client/requests/index.mjs";
12
11
  export * from "./sessionByDevice/client/requests/index.mjs";
12
+ export * from "./taskGroupByDriver/client/requests/index.mjs";
@@ -70,21 +70,6 @@ export declare class SessionByDevice {
70
70
  */
71
71
  dataPoints(request: Chrt.tracking.SessionByDeviceDataPointsRequest, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.TrackingSessionByDeviceDataPoint1[]>;
72
72
  private __dataPoints;
73
- /**
74
- * Return data points for a session with intelligent stop/movement detection. Detects stops (location barely changes for >5 minutes) and shows up to 5 markers. For movement, samples data points lightly.
75
- *
76
- * @param {Chrt.tracking.SessionByDeviceDataPointsFancyRequest} request
77
- * @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
78
- *
79
- * @throws {@link Chrt.UnprocessableEntityError}
80
- *
81
- * @example
82
- * await client.tracking.sessionByDevice.dataPointsFancy({
83
- * session_id: "session_id"
84
- * })
85
- */
86
- dataPointsFancy(request: Chrt.tracking.SessionByDeviceDataPointsFancyRequest, requestOptions?: SessionByDevice.RequestOptions): core.HttpResponsePromise<Chrt.TrackingSessionByDeviceDataPoint1[]>;
87
- private __dataPointsFancy;
88
73
  /**
89
74
  * Create a session for a device and link the device to it.
90
75
  *
@@ -207,76 +207,6 @@ export class SessionByDevice {
207
207
  }
208
208
  });
209
209
  }
210
- /**
211
- * Return data points for a session with intelligent stop/movement detection. Detects stops (location barely changes for >5 minutes) and shows up to 5 markers. For movement, samples data points lightly.
212
- *
213
- * @param {Chrt.tracking.SessionByDeviceDataPointsFancyRequest} request
214
- * @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
215
- *
216
- * @throws {@link Chrt.UnprocessableEntityError}
217
- *
218
- * @example
219
- * await client.tracking.sessionByDevice.dataPointsFancy({
220
- * session_id: "session_id"
221
- * })
222
- */
223
- dataPointsFancy(request, requestOptions) {
224
- return core.HttpResponsePromise.fromPromise(this.__dataPointsFancy(request, requestOptions));
225
- }
226
- __dataPointsFancy(request, requestOptions) {
227
- return __awaiter(this, void 0, void 0, function* () {
228
- var _a, _b, _c, _d, _e;
229
- const { session_id: sessionId, limit } = request;
230
- const _queryParams = {};
231
- _queryParams["session_id"] = sessionId;
232
- if (limit !== undefined) {
233
- _queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
234
- }
235
- 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);
236
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
237
- 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/session_by_device/data_points_fancy"),
238
- method: "GET",
239
- headers: _headers,
240
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
241
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
242
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
243
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
244
- });
245
- if (_response.ok) {
246
- return {
247
- data: _response.body,
248
- rawResponse: _response.rawResponse,
249
- };
250
- }
251
- if (_response.error.reason === "status-code") {
252
- switch (_response.error.statusCode) {
253
- case 422:
254
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
255
- default:
256
- throw new errors.ChrtError({
257
- statusCode: _response.error.statusCode,
258
- body: _response.error.body,
259
- rawResponse: _response.rawResponse,
260
- });
261
- }
262
- }
263
- switch (_response.error.reason) {
264
- case "non-json":
265
- throw new errors.ChrtError({
266
- statusCode: _response.error.statusCode,
267
- body: _response.error.rawBody,
268
- rawResponse: _response.rawResponse,
269
- });
270
- case "timeout":
271
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/data_points_fancy.");
272
- case "unknown":
273
- throw new errors.ChrtError({
274
- message: _response.error.errorMessage,
275
- rawResponse: _response.rawResponse,
276
- });
277
- }
278
- });
279
- }
280
210
  /**
281
211
  * Create a session for a device and link the device to it.
282
212
  *
@@ -1,6 +1,5 @@
1
1
  export { type SessionByDeviceLastSeenRequest } from "./SessionByDeviceLastSeenRequest.mjs";
2
2
  export { type SessionByDeviceDataPointsRequest } from "./SessionByDeviceDataPointsRequest.mjs";
3
- export { type SessionByDeviceDataPointsFancyRequest } from "./SessionByDeviceDataPointsFancyRequest.mjs";
4
3
  export { type SessionByDeviceCreateSessionRequest1 } from "./SessionByDeviceCreateSessionRequest1.mjs";
5
4
  export { type SessionByDeviceUpdateCommentsRequest1 } from "./SessionByDeviceUpdateCommentsRequest1.mjs";
6
5
  export { type SessionByDeviceStartSessionRequest } from "./SessionByDeviceStartSessionRequest.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.259.2";
1
+ export declare const SDK_VERSION = "1.262.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.259.2";
1
+ export const SDK_VERSION = "1.262.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.259.2",
3
+ "version": "1.262.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -8831,73 +8831,6 @@ await client.tracking.driver.update({
8831
8831
  </dl>
8832
8832
  </details>
8833
8833
 
8834
- ## Tracking TaskGroupByDriver
8835
-
8836
- <details><summary><code>client.tracking.taskGroupByDriver.<a href="/src/api/resources/tracking/resources/taskGroupByDriver/client/Client.ts">lastSeen</a>({ ...params }) -> (Chrt.TrackingTaskGroupByDriverDataPoint1 | null) | undefined</code></summary>
8837
- <dl>
8838
- <dd>
8839
-
8840
- #### 📝 Description
8841
-
8842
- <dl>
8843
- <dd>
8844
-
8845
- <dl>
8846
- <dd>
8847
-
8848
- Returns the most recent data point in tracking.task_group_by_driver for the given task_group_id. Data is written by the unified /driver/update endpoint.
8849
-
8850
- </dd>
8851
- </dl>
8852
- </dd>
8853
- </dl>
8854
-
8855
- #### 🔌 Usage
8856
-
8857
- <dl>
8858
- <dd>
8859
-
8860
- <dl>
8861
- <dd>
8862
-
8863
- ```typescript
8864
- await client.tracking.taskGroupByDriver.lastSeen({
8865
- task_group_id: "task_group_id",
8866
- });
8867
- ```
8868
-
8869
- </dd>
8870
- </dl>
8871
- </dd>
8872
- </dl>
8873
-
8874
- #### ⚙️ Parameters
8875
-
8876
- <dl>
8877
- <dd>
8878
-
8879
- <dl>
8880
- <dd>
8881
-
8882
- **request:** `Chrt.tracking.TaskGroupByDriverLastSeenRequest`
8883
-
8884
- </dd>
8885
- </dl>
8886
-
8887
- <dl>
8888
- <dd>
8889
-
8890
- **requestOptions:** `TaskGroupByDriver.RequestOptions`
8891
-
8892
- </dd>
8893
- </dl>
8894
- </dd>
8895
- </dl>
8896
-
8897
- </dd>
8898
- </dl>
8899
- </details>
8900
-
8901
8834
  ## Tracking SessionByDevice
8902
8835
 
8903
8836
  <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">list</a>() -> Chrt.Session1[]</code></summary>
@@ -9085,7 +9018,7 @@ await client.tracking.sessionByDevice.dataPoints({
9085
9018
  </dl>
9086
9019
  </details>
9087
9020
 
9088
- <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">dataPointsFancy</a>({ ...params }) -> Chrt.TrackingSessionByDeviceDataPoint1[]</code></summary>
9021
+ <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">createSession</a>({ ...params }) -> string</code></summary>
9089
9022
  <dl>
9090
9023
  <dd>
9091
9024
 
@@ -9097,7 +9030,7 @@ await client.tracking.sessionByDevice.dataPoints({
9097
9030
  <dl>
9098
9031
  <dd>
9099
9032
 
9100
- Return data points for a session with intelligent stop/movement detection. Detects stops (location barely changes for >5 minutes) and shows up to 5 markers. For movement, samples data points lightly.
9033
+ Create a session for a device and link the device to it.
9101
9034
 
9102
9035
  </dd>
9103
9036
  </dl>
@@ -9113,8 +9046,8 @@ Return data points for a session with intelligent stop/movement detection. Detec
9113
9046
  <dd>
9114
9047
 
9115
9048
  ```typescript
9116
- await client.tracking.sessionByDevice.dataPointsFancy({
9117
- session_id: "session_id",
9049
+ await client.tracking.sessionByDevice.createSession({
9050
+ device_mac_address: "device_mac_address",
9118
9051
  });
9119
9052
  ```
9120
9053
 
@@ -9131,7 +9064,7 @@ await client.tracking.sessionByDevice.dataPointsFancy({
9131
9064
  <dl>
9132
9065
  <dd>
9133
9066
 
9134
- **request:** `Chrt.tracking.SessionByDeviceDataPointsFancyRequest`
9067
+ **request:** `Chrt.tracking.SessionByDeviceCreateSessionRequest1`
9135
9068
 
9136
9069
  </dd>
9137
9070
  </dl>
@@ -9150,7 +9083,7 @@ await client.tracking.sessionByDevice.dataPointsFancy({
9150
9083
  </dl>
9151
9084
  </details>
9152
9085
 
9153
- <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">createSession</a>({ ...params }) -> string</code></summary>
9086
+ <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">updateComments</a>({ ...params }) -> boolean</code></summary>
9154
9087
  <dl>
9155
9088
  <dd>
9156
9089
 
@@ -9162,7 +9095,7 @@ await client.tracking.sessionByDevice.dataPointsFancy({
9162
9095
  <dl>
9163
9096
  <dd>
9164
9097
 
9165
- Create a session for a device and link the device to it.
9098
+ Overwrite or delete the comments for a session.
9166
9099
 
9167
9100
  </dd>
9168
9101
  </dl>
@@ -9178,8 +9111,8 @@ Create a session for a device and link the device to it.
9178
9111
  <dd>
9179
9112
 
9180
9113
  ```typescript
9181
- await client.tracking.sessionByDevice.createSession({
9182
- device_mac_address: "device_mac_address",
9114
+ await client.tracking.sessionByDevice.updateComments({
9115
+ session_id: "session_id",
9183
9116
  });
9184
9117
  ```
9185
9118
 
@@ -9196,7 +9129,7 @@ await client.tracking.sessionByDevice.createSession({
9196
9129
  <dl>
9197
9130
  <dd>
9198
9131
 
9199
- **request:** `Chrt.tracking.SessionByDeviceCreateSessionRequest1`
9132
+ **request:** `Chrt.tracking.SessionByDeviceUpdateCommentsRequest1`
9200
9133
 
9201
9134
  </dd>
9202
9135
  </dl>
@@ -9215,7 +9148,7 @@ await client.tracking.sessionByDevice.createSession({
9215
9148
  </dl>
9216
9149
  </details>
9217
9150
 
9218
- <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">updateComments</a>({ ...params }) -> boolean</code></summary>
9151
+ <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">startSession</a>({ ...params }) -> boolean</code></summary>
9219
9152
  <dl>
9220
9153
  <dd>
9221
9154
 
@@ -9227,7 +9160,7 @@ await client.tracking.sessionByDevice.createSession({
9227
9160
  <dl>
9228
9161
  <dd>
9229
9162
 
9230
- Overwrite or delete the comments for a session.
9163
+ Start a session (set recording=true).
9231
9164
 
9232
9165
  </dd>
9233
9166
  </dl>
@@ -9243,7 +9176,7 @@ Overwrite or delete the comments for a session.
9243
9176
  <dd>
9244
9177
 
9245
9178
  ```typescript
9246
- await client.tracking.sessionByDevice.updateComments({
9179
+ await client.tracking.sessionByDevice.startSession({
9247
9180
  session_id: "session_id",
9248
9181
  });
9249
9182
  ```
@@ -9261,7 +9194,7 @@ await client.tracking.sessionByDevice.updateComments({
9261
9194
  <dl>
9262
9195
  <dd>
9263
9196
 
9264
- **request:** `Chrt.tracking.SessionByDeviceUpdateCommentsRequest1`
9197
+ **request:** `Chrt.tracking.SessionByDeviceStartSessionRequest`
9265
9198
 
9266
9199
  </dd>
9267
9200
  </dl>
@@ -9280,7 +9213,7 @@ await client.tracking.sessionByDevice.updateComments({
9280
9213
  </dl>
9281
9214
  </details>
9282
9215
 
9283
- <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">startSession</a>({ ...params }) -> boolean</code></summary>
9216
+ <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">pauseSession</a>({ ...params }) -> boolean</code></summary>
9284
9217
  <dl>
9285
9218
  <dd>
9286
9219
 
@@ -9292,7 +9225,7 @@ await client.tracking.sessionByDevice.updateComments({
9292
9225
  <dl>
9293
9226
  <dd>
9294
9227
 
9295
- Start a session (set recording=true).
9228
+ Pause a session (set recording=false).
9296
9229
 
9297
9230
  </dd>
9298
9231
  </dl>
@@ -9308,7 +9241,7 @@ Start a session (set recording=true).
9308
9241
  <dd>
9309
9242
 
9310
9243
  ```typescript
9311
- await client.tracking.sessionByDevice.startSession({
9244
+ await client.tracking.sessionByDevice.pauseSession({
9312
9245
  session_id: "session_id",
9313
9246
  });
9314
9247
  ```
@@ -9326,7 +9259,7 @@ await client.tracking.sessionByDevice.startSession({
9326
9259
  <dl>
9327
9260
  <dd>
9328
9261
 
9329
- **request:** `Chrt.tracking.SessionByDeviceStartSessionRequest`
9262
+ **request:** `Chrt.tracking.SessionByDevicePauseSessionRequest`
9330
9263
 
9331
9264
  </dd>
9332
9265
  </dl>
@@ -9345,7 +9278,7 @@ await client.tracking.sessionByDevice.startSession({
9345
9278
  </dl>
9346
9279
  </details>
9347
9280
 
9348
- <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">pauseSession</a>({ ...params }) -> boolean</code></summary>
9281
+ <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">resumeSession</a>({ ...params }) -> boolean</code></summary>
9349
9282
  <dl>
9350
9283
  <dd>
9351
9284
 
@@ -9357,7 +9290,7 @@ await client.tracking.sessionByDevice.startSession({
9357
9290
  <dl>
9358
9291
  <dd>
9359
9292
 
9360
- Pause a session (set recording=false).
9293
+ Resume a session (set recording=true).
9361
9294
 
9362
9295
  </dd>
9363
9296
  </dl>
@@ -9373,7 +9306,7 @@ Pause a session (set recording=false).
9373
9306
  <dd>
9374
9307
 
9375
9308
  ```typescript
9376
- await client.tracking.sessionByDevice.pauseSession({
9309
+ await client.tracking.sessionByDevice.resumeSession({
9377
9310
  session_id: "session_id",
9378
9311
  });
9379
9312
  ```
@@ -9391,7 +9324,7 @@ await client.tracking.sessionByDevice.pauseSession({
9391
9324
  <dl>
9392
9325
  <dd>
9393
9326
 
9394
- **request:** `Chrt.tracking.SessionByDevicePauseSessionRequest`
9327
+ **request:** `Chrt.tracking.SessionByDeviceResumeSessionRequest`
9395
9328
 
9396
9329
  </dd>
9397
9330
  </dl>
@@ -9410,7 +9343,7 @@ await client.tracking.sessionByDevice.pauseSession({
9410
9343
  </dl>
9411
9344
  </details>
9412
9345
 
9413
- <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">resumeSession</a>({ ...params }) -> boolean</code></summary>
9346
+ <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">endSession</a>({ ...params }) -> boolean</code></summary>
9414
9347
  <dl>
9415
9348
  <dd>
9416
9349
 
@@ -9422,7 +9355,7 @@ await client.tracking.sessionByDevice.pauseSession({
9422
9355
  <dl>
9423
9356
  <dd>
9424
9357
 
9425
- Resume a session (set recording=true).
9358
+ End a session (set recording=false).
9426
9359
 
9427
9360
  </dd>
9428
9361
  </dl>
@@ -9438,7 +9371,7 @@ Resume a session (set recording=true).
9438
9371
  <dd>
9439
9372
 
9440
9373
  ```typescript
9441
- await client.tracking.sessionByDevice.resumeSession({
9374
+ await client.tracking.sessionByDevice.endSession({
9442
9375
  session_id: "session_id",
9443
9376
  });
9444
9377
  ```
@@ -9456,7 +9389,7 @@ await client.tracking.sessionByDevice.resumeSession({
9456
9389
  <dl>
9457
9390
  <dd>
9458
9391
 
9459
- **request:** `Chrt.tracking.SessionByDeviceResumeSessionRequest`
9392
+ **request:** `Chrt.tracking.SessionByDeviceEndSessionRequest`
9460
9393
 
9461
9394
  </dd>
9462
9395
  </dl>
@@ -9475,7 +9408,9 @@ await client.tracking.sessionByDevice.resumeSession({
9475
9408
  </dl>
9476
9409
  </details>
9477
9410
 
9478
- <details><summary><code>client.tracking.sessionByDevice.<a href="/src/api/resources/tracking/resources/sessionByDevice/client/Client.ts">endSession</a>({ ...params }) -> boolean</code></summary>
9411
+ ## Tracking TaskGroupByDriver
9412
+
9413
+ <details><summary><code>client.tracking.taskGroupByDriver.<a href="/src/api/resources/tracking/resources/taskGroupByDriver/client/Client.ts">lastSeen</a>({ ...params }) -> (Chrt.TrackingTaskGroupByDriverDataPoint1 | null) | undefined</code></summary>
9479
9414
  <dl>
9480
9415
  <dd>
9481
9416
 
@@ -9487,7 +9422,7 @@ await client.tracking.sessionByDevice.resumeSession({
9487
9422
  <dl>
9488
9423
  <dd>
9489
9424
 
9490
- End a session (set recording=false).
9425
+ Returns the most recent data point in tracking.task_group_by_driver for the given task_group_id. Data is written by the unified /driver/update endpoint.
9491
9426
 
9492
9427
  </dd>
9493
9428
  </dl>
@@ -9503,8 +9438,8 @@ End a session (set recording=false).
9503
9438
  <dd>
9504
9439
 
9505
9440
  ```typescript
9506
- await client.tracking.sessionByDevice.endSession({
9507
- session_id: "session_id",
9441
+ await client.tracking.taskGroupByDriver.lastSeen({
9442
+ task_group_id: "task_group_id",
9508
9443
  });
9509
9444
  ```
9510
9445
 
@@ -9521,7 +9456,7 @@ await client.tracking.sessionByDevice.endSession({
9521
9456
  <dl>
9522
9457
  <dd>
9523
9458
 
9524
- **request:** `Chrt.tracking.SessionByDeviceEndSessionRequest`
9459
+ **request:** `Chrt.tracking.TaskGroupByDriverLastSeenRequest`
9525
9460
 
9526
9461
  </dd>
9527
9462
  </dl>
@@ -9529,7 +9464,7 @@ await client.tracking.sessionByDevice.endSession({
9529
9464
  <dl>
9530
9465
  <dd>
9531
9466
 
9532
- **requestOptions:** `SessionByDevice.RequestOptions`
9467
+ **requestOptions:** `TaskGroupByDriver.RequestOptions`
9533
9468
 
9534
9469
  </dd>
9535
9470
  </dl>
@@ -1,13 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * @example
6
- * {
7
- * session_id: "session_id"
8
- * }
9
- */
10
- export interface SessionByDeviceDataPointsFancyRequest {
11
- session_id: string;
12
- limit?: number | null;
13
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,13 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * @example
6
- * {
7
- * session_id: "session_id"
8
- * }
9
- */
10
- export interface SessionByDeviceDataPointsFancyRequest {
11
- session_id: string;
12
- limit?: number | null;
13
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};