@chrt-inc/typescript-sdk 1.511.0 → 1.526.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 (50) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +30 -0
  3. package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +128 -0
  4. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesPauseV1Request.d.ts +12 -0
  5. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesPauseV1Request.js +5 -0
  6. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnpauseV1Request.d.ts +12 -0
  7. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnpauseV1Request.js +5 -0
  8. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/index.d.ts +2 -0
  9. package/dist/cjs/api/resources/utils/resources/dev/client/Client.d.ts +2 -2
  10. package/dist/cjs/api/resources/utils/resources/dev/client/Client.js +1 -1
  11. package/dist/cjs/api/resources/utils/resources/root/client/Client.d.ts +8 -8
  12. package/dist/cjs/api/resources/utils/resources/root/client/Client.js +14 -14
  13. package/dist/cjs/api/types/Caller.d.ts +1 -0
  14. package/dist/cjs/api/types/CargoByDeviceDataPointMetadata1.d.ts +1 -0
  15. package/dist/cjs/api/types/CredentialInfoRes.d.ts +9 -0
  16. package/dist/cjs/api/types/CredentialInfoRes.js +5 -0
  17. package/dist/cjs/api/types/DeviceLimitedForList1.d.ts +1 -0
  18. package/dist/cjs/api/types/SessionByDeviceDataPointMetadata1.d.ts +1 -0
  19. package/dist/cjs/api/types/index.d.ts +1 -1
  20. package/dist/cjs/api/types/index.js +1 -1
  21. package/dist/cjs/version.d.ts +1 -1
  22. package/dist/cjs/version.js +1 -1
  23. package/dist/esm/Client.mjs +2 -2
  24. package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +30 -0
  25. package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +128 -0
  26. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesPauseV1Request.d.mts +12 -0
  27. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesPauseV1Request.mjs +4 -0
  28. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnpauseV1Request.d.mts +12 -0
  29. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnpauseV1Request.mjs +4 -0
  30. package/dist/esm/api/resources/tracking/resources/devices/client/requests/index.d.mts +2 -0
  31. package/dist/esm/api/resources/utils/resources/dev/client/Client.d.mts +2 -2
  32. package/dist/esm/api/resources/utils/resources/dev/client/Client.mjs +1 -1
  33. package/dist/esm/api/resources/utils/resources/root/client/Client.d.mts +8 -8
  34. package/dist/esm/api/resources/utils/resources/root/client/Client.mjs +14 -14
  35. package/dist/esm/api/types/Caller.d.mts +1 -0
  36. package/dist/esm/api/types/CargoByDeviceDataPointMetadata1.d.mts +1 -0
  37. package/dist/esm/api/types/CredentialInfoRes.d.mts +9 -0
  38. package/dist/esm/api/types/CredentialInfoRes.mjs +4 -0
  39. package/dist/esm/api/types/DeviceLimitedForList1.d.mts +1 -0
  40. package/dist/esm/api/types/SessionByDeviceDataPointMetadata1.d.mts +1 -0
  41. package/dist/esm/api/types/index.d.mts +1 -1
  42. package/dist/esm/api/types/index.mjs +1 -1
  43. package/dist/esm/version.d.mts +1 -1
  44. package/dist/esm/version.mjs +1 -1
  45. package/package.json +1 -1
  46. package/reference.md +138 -8
  47. package/dist/cjs/api/types/CredentialInfoResponse.d.ts +0 -17
  48. package/dist/cjs/api/types/CredentialInfoResponse.js +0 -14
  49. package/dist/esm/api/types/CredentialInfoResponse.d.mts +0 -17
  50. package/dist/esm/api/types/CredentialInfoResponse.mjs +0 -11
@@ -53,8 +53,8 @@ class ChrtClient {
53
53
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
54
54
  "X-Fern-Language": "JavaScript",
55
55
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
56
- "X-Fern-SDK-Version": "1.511.0",
57
- "User-Agent": "@chrt-inc/typescript-sdk/1.511.0",
56
+ "X-Fern-SDK-Version": "1.526.0",
57
+ "User-Agent": "@chrt-inc/typescript-sdk/1.526.0",
58
58
  "X-Fern-Runtime": core.RUNTIME.type,
59
59
  "X-Fern-Runtime-Version": core.RUNTIME.version,
60
60
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -76,6 +76,36 @@ export declare class Devices {
76
76
  */
77
77
  archiveV1(request: Chrt.tracking.DevicesArchiveV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
78
78
  private __archiveV1;
79
+ /**
80
+ * Pauses a device. Cargo-by-device and session-by-device data points are marked as paused and excluded from data point queries. | () -> (bool)
81
+ *
82
+ * @param {Chrt.tracking.DevicesPauseV1Request} request
83
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
84
+ *
85
+ * @throws {@link Chrt.UnprocessableEntityError}
86
+ *
87
+ * @example
88
+ * await client.tracking.devices.pauseV1({
89
+ * device_id: "device_id"
90
+ * })
91
+ */
92
+ pauseV1(request: Chrt.tracking.DevicesPauseV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
93
+ private __pauseV1;
94
+ /**
95
+ * Unpauses a device. | () -> (bool)
96
+ *
97
+ * @param {Chrt.tracking.DevicesUnpauseV1Request} request
98
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
99
+ *
100
+ * @throws {@link Chrt.UnprocessableEntityError}
101
+ *
102
+ * @example
103
+ * await client.tracking.devices.unpauseV1({
104
+ * device_id: "device_id"
105
+ * })
106
+ */
107
+ unpauseV1(request: Chrt.tracking.DevicesUnpauseV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
108
+ private __unpauseV1;
79
109
  /**
80
110
  * Adds and/or removes org_ids from a device's shared_with_org_ids list. Removal overrides addition. | (DevicesUpdateSharedOrgsReq1) -> (bool)
81
111
  *
@@ -262,6 +262,134 @@ class Devices {
262
262
  }
263
263
  });
264
264
  }
265
+ /**
266
+ * Pauses a device. Cargo-by-device and session-by-device data points are marked as paused and excluded from data point queries. | () -> (bool)
267
+ *
268
+ * @param {Chrt.tracking.DevicesPauseV1Request} request
269
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
270
+ *
271
+ * @throws {@link Chrt.UnprocessableEntityError}
272
+ *
273
+ * @example
274
+ * await client.tracking.devices.pauseV1({
275
+ * device_id: "device_id"
276
+ * })
277
+ */
278
+ pauseV1(request, requestOptions) {
279
+ return core.HttpResponsePromise.fromPromise(this.__pauseV1(request, requestOptions));
280
+ }
281
+ __pauseV1(request, requestOptions) {
282
+ return __awaiter(this, void 0, void 0, function* () {
283
+ var _a, _b, _c, _d;
284
+ const { device_id: deviceId } = request;
285
+ const _queryParams = {};
286
+ _queryParams["device_id"] = deviceId;
287
+ 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);
288
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
289
+ 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/devices/pause/v1"),
290
+ method: "POST",
291
+ headers: _headers,
292
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
293
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
294
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
295
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
296
+ });
297
+ if (_response.ok) {
298
+ return { data: _response.body, rawResponse: _response.rawResponse };
299
+ }
300
+ if (_response.error.reason === "status-code") {
301
+ switch (_response.error.statusCode) {
302
+ case 422:
303
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
304
+ default:
305
+ throw new errors.ChrtError({
306
+ statusCode: _response.error.statusCode,
307
+ body: _response.error.body,
308
+ rawResponse: _response.rawResponse,
309
+ });
310
+ }
311
+ }
312
+ switch (_response.error.reason) {
313
+ case "non-json":
314
+ throw new errors.ChrtError({
315
+ statusCode: _response.error.statusCode,
316
+ body: _response.error.rawBody,
317
+ rawResponse: _response.rawResponse,
318
+ });
319
+ case "timeout":
320
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/devices/pause/v1.");
321
+ case "unknown":
322
+ throw new errors.ChrtError({
323
+ message: _response.error.errorMessage,
324
+ rawResponse: _response.rawResponse,
325
+ });
326
+ }
327
+ });
328
+ }
329
+ /**
330
+ * Unpauses a device. | () -> (bool)
331
+ *
332
+ * @param {Chrt.tracking.DevicesUnpauseV1Request} request
333
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
334
+ *
335
+ * @throws {@link Chrt.UnprocessableEntityError}
336
+ *
337
+ * @example
338
+ * await client.tracking.devices.unpauseV1({
339
+ * device_id: "device_id"
340
+ * })
341
+ */
342
+ unpauseV1(request, requestOptions) {
343
+ return core.HttpResponsePromise.fromPromise(this.__unpauseV1(request, requestOptions));
344
+ }
345
+ __unpauseV1(request, requestOptions) {
346
+ return __awaiter(this, void 0, void 0, function* () {
347
+ var _a, _b, _c, _d;
348
+ const { device_id: deviceId } = request;
349
+ const _queryParams = {};
350
+ _queryParams["device_id"] = deviceId;
351
+ 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);
352
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
353
+ 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/devices/unpause/v1"),
354
+ method: "POST",
355
+ headers: _headers,
356
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
357
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
358
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
359
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
360
+ });
361
+ if (_response.ok) {
362
+ return { data: _response.body, rawResponse: _response.rawResponse };
363
+ }
364
+ if (_response.error.reason === "status-code") {
365
+ switch (_response.error.statusCode) {
366
+ case 422:
367
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
368
+ default:
369
+ throw new errors.ChrtError({
370
+ statusCode: _response.error.statusCode,
371
+ body: _response.error.body,
372
+ rawResponse: _response.rawResponse,
373
+ });
374
+ }
375
+ }
376
+ switch (_response.error.reason) {
377
+ case "non-json":
378
+ throw new errors.ChrtError({
379
+ statusCode: _response.error.statusCode,
380
+ body: _response.error.rawBody,
381
+ rawResponse: _response.rawResponse,
382
+ });
383
+ case "timeout":
384
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/devices/unpause/v1.");
385
+ case "unknown":
386
+ throw new errors.ChrtError({
387
+ message: _response.error.errorMessage,
388
+ rawResponse: _response.rawResponse,
389
+ });
390
+ }
391
+ });
392
+ }
265
393
  /**
266
394
  * Adds and/or removes org_ids from a device's shared_with_org_ids list. Removal overrides addition. | (DevicesUpdateSharedOrgsReq1) -> (bool)
267
395
  *
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * device_id: "device_id"
8
+ * }
9
+ */
10
+ export interface DevicesPauseV1Request {
11
+ device_id: string;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * device_id: "device_id"
8
+ * }
9
+ */
10
+ export interface DevicesUnpauseV1Request {
11
+ device_id: string;
12
+ }
@@ -0,0 +1,5 @@
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,6 +1,8 @@
1
1
  export { type DeviceClientCreate1 } from "./DeviceClientCreate1.js";
2
2
  export { type DeviceClientUpdate1 } from "./DeviceClientUpdate1.js";
3
3
  export { type DevicesArchiveV1Request } from "./DevicesArchiveV1Request.js";
4
+ export { type DevicesPauseV1Request } from "./DevicesPauseV1Request.js";
5
+ export { type DevicesUnpauseV1Request } from "./DevicesUnpauseV1Request.js";
4
6
  export { type DevicesUpdateSharedOrgsReq1 } from "./DevicesUpdateSharedOrgsReq1.js";
5
7
  export { type DevicesGetV1Request } from "./DevicesGetV1Request.js";
6
8
  export { type DevicesListV1Request } from "./DevicesListV1Request.js";
@@ -95,14 +95,14 @@ export declare class Dev {
95
95
  getUserIdV2(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<string>;
96
96
  private __getUserIdV2;
97
97
  /**
98
- * Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoResponse)
98
+ * Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoRes)
99
99
  *
100
100
  * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
101
101
  *
102
102
  * @example
103
103
  * await client.utils.dev.getCredentialInfoV1()
104
104
  */
105
- getCredentialInfoV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.CredentialInfoResponse>;
105
+ getCredentialInfoV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.CredentialInfoRes>;
106
106
  private __getCredentialInfoV1;
107
107
  /**
108
108
  * Retrieves the primary email address for the caller from the authentication service. | () -> (str)
@@ -349,7 +349,7 @@ class Dev {
349
349
  });
350
350
  }
351
351
  /**
352
- * Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoResponse)
352
+ * Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoRes)
353
353
  *
354
354
  * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
355
355
  *
@@ -60,24 +60,24 @@ export declare class Root {
60
60
  pingUnauthd(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
61
61
  private __pingUnauthd;
62
62
  /**
63
- * Returns a health status message used for monitoring system availability and uptime. | () -> (dict)
63
+ * Test endpoint that intentionally fails for error handling validation and monitoring purposes. | () -> (None)
64
64
  *
65
65
  * @param {Root.RequestOptions} requestOptions - Request-specific configuration.
66
66
  *
67
67
  * @example
68
- * await client.utils.root.health()
68
+ * await client.utils.root.failure()
69
69
  */
70
- health(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
71
- private __health;
70
+ failure(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
71
+ private __failure;
72
72
  /**
73
- * Test endpoint that intentionally fails for error handling validation and monitoring purposes. | () -> (None)
73
+ * Returns a health status message used for monitoring system availability and uptime. | () -> (dict)
74
74
  *
75
75
  * @param {Root.RequestOptions} requestOptions - Request-specific configuration.
76
76
  *
77
77
  * @example
78
- * await client.utils.root.failure()
78
+ * await client.utils.root.health()
79
79
  */
80
- failure(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
81
- private __failure;
80
+ health(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
81
+ private __health;
82
82
  protected _getAuthorizationHeader(): Promise<string | undefined>;
83
83
  }
@@ -208,22 +208,22 @@ class Root {
208
208
  });
209
209
  }
210
210
  /**
211
- * Returns a health status message used for monitoring system availability and uptime. | () -> (dict)
211
+ * Test endpoint that intentionally fails for error handling validation and monitoring purposes. | () -> (None)
212
212
  *
213
213
  * @param {Root.RequestOptions} requestOptions - Request-specific configuration.
214
214
  *
215
215
  * @example
216
- * await client.utils.root.health()
216
+ * await client.utils.root.failure()
217
217
  */
218
- health(requestOptions) {
219
- return core.HttpResponsePromise.fromPromise(this.__health(requestOptions));
218
+ failure(requestOptions) {
219
+ return core.HttpResponsePromise.fromPromise(this.__failure(requestOptions));
220
220
  }
221
- __health(requestOptions) {
221
+ __failure(requestOptions) {
222
222
  return __awaiter(this, void 0, void 0, function* () {
223
223
  var _a, _b, _c, _d;
224
224
  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);
225
225
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
226
- 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, "health"),
226
+ 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, "failure"),
227
227
  method: "GET",
228
228
  headers: _headers,
229
229
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -249,7 +249,7 @@ class Root {
249
249
  rawResponse: _response.rawResponse,
250
250
  });
251
251
  case "timeout":
252
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /health.");
252
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /failure.");
253
253
  case "unknown":
254
254
  throw new errors.ChrtError({
255
255
  message: _response.error.errorMessage,
@@ -259,22 +259,22 @@ class Root {
259
259
  });
260
260
  }
261
261
  /**
262
- * Test endpoint that intentionally fails for error handling validation and monitoring purposes. | () -> (None)
262
+ * Returns a health status message used for monitoring system availability and uptime. | () -> (dict)
263
263
  *
264
264
  * @param {Root.RequestOptions} requestOptions - Request-specific configuration.
265
265
  *
266
266
  * @example
267
- * await client.utils.root.failure()
267
+ * await client.utils.root.health()
268
268
  */
269
- failure(requestOptions) {
270
- return core.HttpResponsePromise.fromPromise(this.__failure(requestOptions));
269
+ health(requestOptions) {
270
+ return core.HttpResponsePromise.fromPromise(this.__health(requestOptions));
271
271
  }
272
- __failure(requestOptions) {
272
+ __health(requestOptions) {
273
273
  return __awaiter(this, void 0, void 0, function* () {
274
274
  var _a, _b, _c, _d;
275
275
  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);
276
276
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
277
- 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, "failure"),
277
+ 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, "health"),
278
278
  method: "GET",
279
279
  headers: _headers,
280
280
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -300,7 +300,7 @@ class Root {
300
300
  rawResponse: _response.rawResponse,
301
301
  });
302
302
  case "timeout":
303
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /failure.");
303
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /health.");
304
304
  case "unknown":
305
305
  throw new errors.ChrtError({
306
306
  message: _response.error.errorMessage,
@@ -4,6 +4,7 @@
4
4
  import * as Chrt from "../index.js";
5
5
  export interface Caller {
6
6
  credential_type: Chrt.CallerCredentialTypeEnum;
7
+ credential?: string | null;
7
8
  o: Chrt.ClerkOrgData;
8
9
  /** Must be a string starting with `user_` */
9
10
  user_id: string;
@@ -8,5 +8,6 @@ export interface CargoByDeviceDataPointMetadata1 {
8
8
  device_id: string;
9
9
  outlier?: boolean | null;
10
10
  outlier_labeller?: Chrt.OutlierLabellerEnum | null;
11
+ paused?: boolean;
11
12
  pytest?: boolean | null;
12
13
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface CredentialInfoRes {
6
+ credential_type: Chrt.CallerCredentialTypeEnum;
7
+ caller: Chrt.Caller;
8
+ raw_claims: Record<string, unknown>;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -25,6 +25,7 @@ export interface DeviceLimitedForList1 {
25
25
  last_seen_at_timestamp?: string | null;
26
26
  last_seen_battery_level?: string | null;
27
27
  archived?: boolean;
28
+ paused?: boolean;
28
29
  shared_with_org_ids?: string[];
29
30
  off_chrt_shipper_org_id?: string | null;
30
31
  active_session_id?: string | null;
@@ -6,5 +6,6 @@ export interface SessionByDeviceDataPointMetadata1 {
6
6
  session_id: string;
7
7
  outlier?: boolean | null;
8
8
  outlier_labeller?: Chrt.OutlierLabellerEnum | null;
9
+ paused?: boolean;
9
10
  pytest?: boolean | null;
10
11
  }
@@ -78,7 +78,7 @@ export * from "./CreateCheckoutSessionRes.js";
78
78
  export * from "./CreateConnectionReq.js";
79
79
  export * from "./CreateOrgPublicDataRes.js";
80
80
  export * from "./CreateStripeConnectAccountRes.js";
81
- export * from "./CredentialInfoResponse.js";
81
+ export * from "./CredentialInfoRes.js";
82
82
  export * from "./DeviceExpandedRes.js";
83
83
  export * from "./DeviceLimitedForList1.js";
84
84
  export * from "./DeviceListRes.js";
@@ -94,7 +94,7 @@ __exportStar(require("./CreateCheckoutSessionRes.js"), exports);
94
94
  __exportStar(require("./CreateConnectionReq.js"), exports);
95
95
  __exportStar(require("./CreateOrgPublicDataRes.js"), exports);
96
96
  __exportStar(require("./CreateStripeConnectAccountRes.js"), exports);
97
- __exportStar(require("./CredentialInfoResponse.js"), exports);
97
+ __exportStar(require("./CredentialInfoRes.js"), exports);
98
98
  __exportStar(require("./DeviceExpandedRes.js"), exports);
99
99
  __exportStar(require("./DeviceLimitedForList1.js"), exports);
100
100
  __exportStar(require("./DeviceListRes.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.511.0";
1
+ export declare const SDK_VERSION = "1.526.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.511.0";
4
+ exports.SDK_VERSION = "1.526.0";
@@ -17,8 +17,8 @@ export class ChrtClient {
17
17
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
18
18
  "X-Fern-Language": "JavaScript",
19
19
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
20
- "X-Fern-SDK-Version": "1.511.0",
21
- "User-Agent": "@chrt-inc/typescript-sdk/1.511.0",
20
+ "X-Fern-SDK-Version": "1.526.0",
21
+ "User-Agent": "@chrt-inc/typescript-sdk/1.526.0",
22
22
  "X-Fern-Runtime": core.RUNTIME.type,
23
23
  "X-Fern-Runtime-Version": core.RUNTIME.version,
24
24
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -76,6 +76,36 @@ export declare class Devices {
76
76
  */
77
77
  archiveV1(request: Chrt.tracking.DevicesArchiveV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
78
78
  private __archiveV1;
79
+ /**
80
+ * Pauses a device. Cargo-by-device and session-by-device data points are marked as paused and excluded from data point queries. | () -> (bool)
81
+ *
82
+ * @param {Chrt.tracking.DevicesPauseV1Request} request
83
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
84
+ *
85
+ * @throws {@link Chrt.UnprocessableEntityError}
86
+ *
87
+ * @example
88
+ * await client.tracking.devices.pauseV1({
89
+ * device_id: "device_id"
90
+ * })
91
+ */
92
+ pauseV1(request: Chrt.tracking.DevicesPauseV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
93
+ private __pauseV1;
94
+ /**
95
+ * Unpauses a device. | () -> (bool)
96
+ *
97
+ * @param {Chrt.tracking.DevicesUnpauseV1Request} request
98
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
99
+ *
100
+ * @throws {@link Chrt.UnprocessableEntityError}
101
+ *
102
+ * @example
103
+ * await client.tracking.devices.unpauseV1({
104
+ * device_id: "device_id"
105
+ * })
106
+ */
107
+ unpauseV1(request: Chrt.tracking.DevicesUnpauseV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
108
+ private __unpauseV1;
79
109
  /**
80
110
  * Adds and/or removes org_ids from a device's shared_with_org_ids list. Removal overrides addition. | (DevicesUpdateSharedOrgsReq1) -> (bool)
81
111
  *
@@ -226,6 +226,134 @@ export class Devices {
226
226
  }
227
227
  });
228
228
  }
229
+ /**
230
+ * Pauses a device. Cargo-by-device and session-by-device data points are marked as paused and excluded from data point queries. | () -> (bool)
231
+ *
232
+ * @param {Chrt.tracking.DevicesPauseV1Request} request
233
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
234
+ *
235
+ * @throws {@link Chrt.UnprocessableEntityError}
236
+ *
237
+ * @example
238
+ * await client.tracking.devices.pauseV1({
239
+ * device_id: "device_id"
240
+ * })
241
+ */
242
+ pauseV1(request, requestOptions) {
243
+ return core.HttpResponsePromise.fromPromise(this.__pauseV1(request, requestOptions));
244
+ }
245
+ __pauseV1(request, requestOptions) {
246
+ return __awaiter(this, void 0, void 0, function* () {
247
+ var _a, _b, _c, _d;
248
+ const { device_id: deviceId } = request;
249
+ const _queryParams = {};
250
+ _queryParams["device_id"] = deviceId;
251
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
252
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
253
+ 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/devices/pause/v1"),
254
+ method: "POST",
255
+ headers: _headers,
256
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
257
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
258
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
259
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
260
+ });
261
+ if (_response.ok) {
262
+ return { data: _response.body, rawResponse: _response.rawResponse };
263
+ }
264
+ if (_response.error.reason === "status-code") {
265
+ switch (_response.error.statusCode) {
266
+ case 422:
267
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
268
+ default:
269
+ throw new errors.ChrtError({
270
+ statusCode: _response.error.statusCode,
271
+ body: _response.error.body,
272
+ rawResponse: _response.rawResponse,
273
+ });
274
+ }
275
+ }
276
+ switch (_response.error.reason) {
277
+ case "non-json":
278
+ throw new errors.ChrtError({
279
+ statusCode: _response.error.statusCode,
280
+ body: _response.error.rawBody,
281
+ rawResponse: _response.rawResponse,
282
+ });
283
+ case "timeout":
284
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/devices/pause/v1.");
285
+ case "unknown":
286
+ throw new errors.ChrtError({
287
+ message: _response.error.errorMessage,
288
+ rawResponse: _response.rawResponse,
289
+ });
290
+ }
291
+ });
292
+ }
293
+ /**
294
+ * Unpauses a device. | () -> (bool)
295
+ *
296
+ * @param {Chrt.tracking.DevicesUnpauseV1Request} request
297
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
298
+ *
299
+ * @throws {@link Chrt.UnprocessableEntityError}
300
+ *
301
+ * @example
302
+ * await client.tracking.devices.unpauseV1({
303
+ * device_id: "device_id"
304
+ * })
305
+ */
306
+ unpauseV1(request, requestOptions) {
307
+ return core.HttpResponsePromise.fromPromise(this.__unpauseV1(request, requestOptions));
308
+ }
309
+ __unpauseV1(request, requestOptions) {
310
+ return __awaiter(this, void 0, void 0, function* () {
311
+ var _a, _b, _c, _d;
312
+ const { device_id: deviceId } = request;
313
+ const _queryParams = {};
314
+ _queryParams["device_id"] = deviceId;
315
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
316
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
317
+ 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/devices/unpause/v1"),
318
+ method: "POST",
319
+ headers: _headers,
320
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
321
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
322
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
323
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
324
+ });
325
+ if (_response.ok) {
326
+ return { data: _response.body, rawResponse: _response.rawResponse };
327
+ }
328
+ if (_response.error.reason === "status-code") {
329
+ switch (_response.error.statusCode) {
330
+ case 422:
331
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
332
+ default:
333
+ throw new errors.ChrtError({
334
+ statusCode: _response.error.statusCode,
335
+ body: _response.error.body,
336
+ rawResponse: _response.rawResponse,
337
+ });
338
+ }
339
+ }
340
+ switch (_response.error.reason) {
341
+ case "non-json":
342
+ throw new errors.ChrtError({
343
+ statusCode: _response.error.statusCode,
344
+ body: _response.error.rawBody,
345
+ rawResponse: _response.rawResponse,
346
+ });
347
+ case "timeout":
348
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/devices/unpause/v1.");
349
+ case "unknown":
350
+ throw new errors.ChrtError({
351
+ message: _response.error.errorMessage,
352
+ rawResponse: _response.rawResponse,
353
+ });
354
+ }
355
+ });
356
+ }
229
357
  /**
230
358
  * Adds and/or removes org_ids from a device's shared_with_org_ids list. Removal overrides addition. | (DevicesUpdateSharedOrgsReq1) -> (bool)
231
359
  *
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * device_id: "device_id"
8
+ * }
9
+ */
10
+ export interface DevicesPauseV1Request {
11
+ device_id: string;
12
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * device_id: "device_id"
8
+ * }
9
+ */
10
+ export interface DevicesUnpauseV1Request {
11
+ device_id: string;
12
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,6 +1,8 @@
1
1
  export { type DeviceClientCreate1 } from "./DeviceClientCreate1.mjs";
2
2
  export { type DeviceClientUpdate1 } from "./DeviceClientUpdate1.mjs";
3
3
  export { type DevicesArchiveV1Request } from "./DevicesArchiveV1Request.mjs";
4
+ export { type DevicesPauseV1Request } from "./DevicesPauseV1Request.mjs";
5
+ export { type DevicesUnpauseV1Request } from "./DevicesUnpauseV1Request.mjs";
4
6
  export { type DevicesUpdateSharedOrgsReq1 } from "./DevicesUpdateSharedOrgsReq1.mjs";
5
7
  export { type DevicesGetV1Request } from "./DevicesGetV1Request.mjs";
6
8
  export { type DevicesListV1Request } from "./DevicesListV1Request.mjs";
@@ -95,14 +95,14 @@ export declare class Dev {
95
95
  getUserIdV2(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<string>;
96
96
  private __getUserIdV2;
97
97
  /**
98
- * Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoResponse)
98
+ * Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoRes)
99
99
  *
100
100
  * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
101
101
  *
102
102
  * @example
103
103
  * await client.utils.dev.getCredentialInfoV1()
104
104
  */
105
- getCredentialInfoV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.CredentialInfoResponse>;
105
+ getCredentialInfoV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.CredentialInfoRes>;
106
106
  private __getCredentialInfoV1;
107
107
  /**
108
108
  * Retrieves the primary email address for the caller from the authentication service. | () -> (str)
@@ -313,7 +313,7 @@ export class Dev {
313
313
  });
314
314
  }
315
315
  /**
316
- * Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoResponse)
316
+ * Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoRes)
317
317
  *
318
318
  * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
319
319
  *
@@ -60,24 +60,24 @@ export declare class Root {
60
60
  pingUnauthd(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
61
61
  private __pingUnauthd;
62
62
  /**
63
- * Returns a health status message used for monitoring system availability and uptime. | () -> (dict)
63
+ * Test endpoint that intentionally fails for error handling validation and monitoring purposes. | () -> (None)
64
64
  *
65
65
  * @param {Root.RequestOptions} requestOptions - Request-specific configuration.
66
66
  *
67
67
  * @example
68
- * await client.utils.root.health()
68
+ * await client.utils.root.failure()
69
69
  */
70
- health(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
71
- private __health;
70
+ failure(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
71
+ private __failure;
72
72
  /**
73
- * Test endpoint that intentionally fails for error handling validation and monitoring purposes. | () -> (None)
73
+ * Returns a health status message used for monitoring system availability and uptime. | () -> (dict)
74
74
  *
75
75
  * @param {Root.RequestOptions} requestOptions - Request-specific configuration.
76
76
  *
77
77
  * @example
78
- * await client.utils.root.failure()
78
+ * await client.utils.root.health()
79
79
  */
80
- failure(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<unknown>;
81
- private __failure;
80
+ health(requestOptions?: Root.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
81
+ private __health;
82
82
  protected _getAuthorizationHeader(): Promise<string | undefined>;
83
83
  }
@@ -172,22 +172,22 @@ export class Root {
172
172
  });
173
173
  }
174
174
  /**
175
- * Returns a health status message used for monitoring system availability and uptime. | () -> (dict)
175
+ * Test endpoint that intentionally fails for error handling validation and monitoring purposes. | () -> (None)
176
176
  *
177
177
  * @param {Root.RequestOptions} requestOptions - Request-specific configuration.
178
178
  *
179
179
  * @example
180
- * await client.utils.root.health()
180
+ * await client.utils.root.failure()
181
181
  */
182
- health(requestOptions) {
183
- return core.HttpResponsePromise.fromPromise(this.__health(requestOptions));
182
+ failure(requestOptions) {
183
+ return core.HttpResponsePromise.fromPromise(this.__failure(requestOptions));
184
184
  }
185
- __health(requestOptions) {
185
+ __failure(requestOptions) {
186
186
  return __awaiter(this, void 0, void 0, function* () {
187
187
  var _a, _b, _c, _d;
188
188
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
189
189
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
190
- 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, "health"),
190
+ 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, "failure"),
191
191
  method: "GET",
192
192
  headers: _headers,
193
193
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -213,7 +213,7 @@ export class Root {
213
213
  rawResponse: _response.rawResponse,
214
214
  });
215
215
  case "timeout":
216
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /health.");
216
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /failure.");
217
217
  case "unknown":
218
218
  throw new errors.ChrtError({
219
219
  message: _response.error.errorMessage,
@@ -223,22 +223,22 @@ export class Root {
223
223
  });
224
224
  }
225
225
  /**
226
- * Test endpoint that intentionally fails for error handling validation and monitoring purposes. | () -> (None)
226
+ * Returns a health status message used for monitoring system availability and uptime. | () -> (dict)
227
227
  *
228
228
  * @param {Root.RequestOptions} requestOptions - Request-specific configuration.
229
229
  *
230
230
  * @example
231
- * await client.utils.root.failure()
231
+ * await client.utils.root.health()
232
232
  */
233
- failure(requestOptions) {
234
- return core.HttpResponsePromise.fromPromise(this.__failure(requestOptions));
233
+ health(requestOptions) {
234
+ return core.HttpResponsePromise.fromPromise(this.__health(requestOptions));
235
235
  }
236
- __failure(requestOptions) {
236
+ __health(requestOptions) {
237
237
  return __awaiter(this, void 0, void 0, function* () {
238
238
  var _a, _b, _c, _d;
239
239
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
240
240
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
241
- 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, "failure"),
241
+ 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, "health"),
242
242
  method: "GET",
243
243
  headers: _headers,
244
244
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -264,7 +264,7 @@ export class Root {
264
264
  rawResponse: _response.rawResponse,
265
265
  });
266
266
  case "timeout":
267
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /failure.");
267
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /health.");
268
268
  case "unknown":
269
269
  throw new errors.ChrtError({
270
270
  message: _response.error.errorMessage,
@@ -4,6 +4,7 @@
4
4
  import * as Chrt from "../index.mjs";
5
5
  export interface Caller {
6
6
  credential_type: Chrt.CallerCredentialTypeEnum;
7
+ credential?: string | null;
7
8
  o: Chrt.ClerkOrgData;
8
9
  /** Must be a string starting with `user_` */
9
10
  user_id: string;
@@ -8,5 +8,6 @@ export interface CargoByDeviceDataPointMetadata1 {
8
8
  device_id: string;
9
9
  outlier?: boolean | null;
10
10
  outlier_labeller?: Chrt.OutlierLabellerEnum | null;
11
+ paused?: boolean;
11
12
  pytest?: boolean | null;
12
13
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface CredentialInfoRes {
6
+ credential_type: Chrt.CallerCredentialTypeEnum;
7
+ caller: Chrt.Caller;
8
+ raw_claims: Record<string, unknown>;
9
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -25,6 +25,7 @@ export interface DeviceLimitedForList1 {
25
25
  last_seen_at_timestamp?: string | null;
26
26
  last_seen_battery_level?: string | null;
27
27
  archived?: boolean;
28
+ paused?: boolean;
28
29
  shared_with_org_ids?: string[];
29
30
  off_chrt_shipper_org_id?: string | null;
30
31
  active_session_id?: string | null;
@@ -6,5 +6,6 @@ export interface SessionByDeviceDataPointMetadata1 {
6
6
  session_id: string;
7
7
  outlier?: boolean | null;
8
8
  outlier_labeller?: Chrt.OutlierLabellerEnum | null;
9
+ paused?: boolean;
9
10
  pytest?: boolean | null;
10
11
  }
@@ -78,7 +78,7 @@ export * from "./CreateCheckoutSessionRes.mjs";
78
78
  export * from "./CreateConnectionReq.mjs";
79
79
  export * from "./CreateOrgPublicDataRes.mjs";
80
80
  export * from "./CreateStripeConnectAccountRes.mjs";
81
- export * from "./CredentialInfoResponse.mjs";
81
+ export * from "./CredentialInfoRes.mjs";
82
82
  export * from "./DeviceExpandedRes.mjs";
83
83
  export * from "./DeviceLimitedForList1.mjs";
84
84
  export * from "./DeviceListRes.mjs";
@@ -78,7 +78,7 @@ export * from "./CreateCheckoutSessionRes.mjs";
78
78
  export * from "./CreateConnectionReq.mjs";
79
79
  export * from "./CreateOrgPublicDataRes.mjs";
80
80
  export * from "./CreateStripeConnectAccountRes.mjs";
81
- export * from "./CredentialInfoResponse.mjs";
81
+ export * from "./CredentialInfoRes.mjs";
82
82
  export * from "./DeviceExpandedRes.mjs";
83
83
  export * from "./DeviceLimitedForList1.mjs";
84
84
  export * from "./DeviceListRes.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.511.0";
1
+ export declare const SDK_VERSION = "1.526.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.511.0";
1
+ export const SDK_VERSION = "1.526.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.511.0",
3
+ "version": "1.526.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -12531,6 +12531,136 @@ await client.tracking.devices.archiveV1({
12531
12531
  </dl>
12532
12532
  </details>
12533
12533
 
12534
+ <details><summary><code>client.tracking.devices.<a href="/src/api/resources/tracking/resources/devices/client/Client.ts">pauseV1</a>({ ...params }) -> boolean</code></summary>
12535
+ <dl>
12536
+ <dd>
12537
+
12538
+ #### 📝 Description
12539
+
12540
+ <dl>
12541
+ <dd>
12542
+
12543
+ <dl>
12544
+ <dd>
12545
+
12546
+ Pauses a device. Cargo-by-device and session-by-device data points are marked as paused and excluded from data point queries. | () -> (bool)
12547
+
12548
+ </dd>
12549
+ </dl>
12550
+ </dd>
12551
+ </dl>
12552
+
12553
+ #### 🔌 Usage
12554
+
12555
+ <dl>
12556
+ <dd>
12557
+
12558
+ <dl>
12559
+ <dd>
12560
+
12561
+ ```typescript
12562
+ await client.tracking.devices.pauseV1({
12563
+ device_id: "device_id",
12564
+ });
12565
+ ```
12566
+
12567
+ </dd>
12568
+ </dl>
12569
+ </dd>
12570
+ </dl>
12571
+
12572
+ #### ⚙️ Parameters
12573
+
12574
+ <dl>
12575
+ <dd>
12576
+
12577
+ <dl>
12578
+ <dd>
12579
+
12580
+ **request:** `Chrt.tracking.DevicesPauseV1Request`
12581
+
12582
+ </dd>
12583
+ </dl>
12584
+
12585
+ <dl>
12586
+ <dd>
12587
+
12588
+ **requestOptions:** `Devices.RequestOptions`
12589
+
12590
+ </dd>
12591
+ </dl>
12592
+ </dd>
12593
+ </dl>
12594
+
12595
+ </dd>
12596
+ </dl>
12597
+ </details>
12598
+
12599
+ <details><summary><code>client.tracking.devices.<a href="/src/api/resources/tracking/resources/devices/client/Client.ts">unpauseV1</a>({ ...params }) -> boolean</code></summary>
12600
+ <dl>
12601
+ <dd>
12602
+
12603
+ #### 📝 Description
12604
+
12605
+ <dl>
12606
+ <dd>
12607
+
12608
+ <dl>
12609
+ <dd>
12610
+
12611
+ Unpauses a device. | () -> (bool)
12612
+
12613
+ </dd>
12614
+ </dl>
12615
+ </dd>
12616
+ </dl>
12617
+
12618
+ #### 🔌 Usage
12619
+
12620
+ <dl>
12621
+ <dd>
12622
+
12623
+ <dl>
12624
+ <dd>
12625
+
12626
+ ```typescript
12627
+ await client.tracking.devices.unpauseV1({
12628
+ device_id: "device_id",
12629
+ });
12630
+ ```
12631
+
12632
+ </dd>
12633
+ </dl>
12634
+ </dd>
12635
+ </dl>
12636
+
12637
+ #### ⚙️ Parameters
12638
+
12639
+ <dl>
12640
+ <dd>
12641
+
12642
+ <dl>
12643
+ <dd>
12644
+
12645
+ **request:** `Chrt.tracking.DevicesUnpauseV1Request`
12646
+
12647
+ </dd>
12648
+ </dl>
12649
+
12650
+ <dl>
12651
+ <dd>
12652
+
12653
+ **requestOptions:** `Devices.RequestOptions`
12654
+
12655
+ </dd>
12656
+ </dl>
12657
+ </dd>
12658
+ </dl>
12659
+
12660
+ </dd>
12661
+ </dl>
12662
+ </details>
12663
+
12534
12664
  <details><summary><code>client.tracking.devices.<a href="/src/api/resources/tracking/resources/devices/client/Client.ts">updateSharedOrgsV1</a>({ ...params }) -> boolean</code></summary>
12535
12665
  <dl>
12536
12666
  <dd>
@@ -16097,7 +16227,7 @@ await client.utils.dev.getUserIdV2();
16097
16227
  </dl>
16098
16228
  </details>
16099
16229
 
16100
- <details><summary><code>client.utils.dev.<a href="/src/api/resources/utils/resources/dev/client/Client.ts">getCredentialInfoV1</a>() -> Chrt.CredentialInfoResponse</code></summary>
16230
+ <details><summary><code>client.utils.dev.<a href="/src/api/resources/utils/resources/dev/client/Client.ts">getCredentialInfoV1</a>() -> Chrt.CredentialInfoRes</code></summary>
16101
16231
  <dl>
16102
16232
  <dd>
16103
16233
 
@@ -16109,7 +16239,7 @@ await client.utils.dev.getUserIdV2();
16109
16239
  <dl>
16110
16240
  <dd>
16111
16241
 
16112
- Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoResponse)
16242
+ Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoRes)
16113
16243
 
16114
16244
  </dd>
16115
16245
  </dl>
@@ -16551,7 +16681,7 @@ await client.utils.root.pingUnauthd();
16551
16681
  </dl>
16552
16682
  </details>
16553
16683
 
16554
- <details><summary><code>client.utils.root.<a href="/src/api/resources/utils/resources/root/client/Client.ts">health</a>() -> Record&lt;string, unknown&gt;</code></summary>
16684
+ <details><summary><code>client.utils.root.<a href="/src/api/resources/utils/resources/root/client/Client.ts">failure</a>() -> unknown</code></summary>
16555
16685
  <dl>
16556
16686
  <dd>
16557
16687
 
@@ -16563,7 +16693,7 @@ await client.utils.root.pingUnauthd();
16563
16693
  <dl>
16564
16694
  <dd>
16565
16695
 
16566
- Returns a health status message used for monitoring system availability and uptime. | () -> (dict)
16696
+ Test endpoint that intentionally fails for error handling validation and monitoring purposes. | () -> (None)
16567
16697
 
16568
16698
  </dd>
16569
16699
  </dl>
@@ -16579,7 +16709,7 @@ Returns a health status message used for monitoring system availability and upti
16579
16709
  <dd>
16580
16710
 
16581
16711
  ```typescript
16582
- await client.utils.root.health();
16712
+ await client.utils.root.failure();
16583
16713
  ```
16584
16714
 
16585
16715
  </dd>
@@ -16606,7 +16736,7 @@ await client.utils.root.health();
16606
16736
  </dl>
16607
16737
  </details>
16608
16738
 
16609
- <details><summary><code>client.utils.root.<a href="/src/api/resources/utils/resources/root/client/Client.ts">failure</a>() -> unknown</code></summary>
16739
+ <details><summary><code>client.utils.root.<a href="/src/api/resources/utils/resources/root/client/Client.ts">health</a>() -> Record&lt;string, unknown&gt;</code></summary>
16610
16740
  <dl>
16611
16741
  <dd>
16612
16742
 
@@ -16618,7 +16748,7 @@ await client.utils.root.health();
16618
16748
  <dl>
16619
16749
  <dd>
16620
16750
 
16621
- Test endpoint that intentionally fails for error handling validation and monitoring purposes. | () -> (None)
16751
+ Returns a health status message used for monitoring system availability and uptime. | () -> (dict)
16622
16752
 
16623
16753
  </dd>
16624
16754
  </dl>
@@ -16634,7 +16764,7 @@ Test endpoint that intentionally fails for error handling validation and monitor
16634
16764
  <dd>
16635
16765
 
16636
16766
  ```typescript
16637
- await client.utils.root.failure();
16767
+ await client.utils.root.health();
16638
16768
  ```
16639
16769
 
16640
16770
  </dd>
@@ -1,17 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Chrt from "../index.js";
5
- export interface CredentialInfoResponse {
6
- credential_type: CredentialInfoResponse.CredentialType;
7
- caller: Chrt.Caller;
8
- raw_claims: Record<string, unknown>;
9
- }
10
- export declare namespace CredentialInfoResponse {
11
- type CredentialType = "session" | "m2m" | "api_key";
12
- const CredentialType: {
13
- readonly Session: "session";
14
- readonly M2M: "m2m";
15
- readonly ApiKey: "api_key";
16
- };
17
- }
@@ -1,14 +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 });
6
- exports.CredentialInfoResponse = void 0;
7
- var CredentialInfoResponse;
8
- (function (CredentialInfoResponse) {
9
- CredentialInfoResponse.CredentialType = {
10
- Session: "session",
11
- M2M: "m2m",
12
- ApiKey: "api_key",
13
- };
14
- })(CredentialInfoResponse || (exports.CredentialInfoResponse = CredentialInfoResponse = {}));
@@ -1,17 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Chrt from "../index.mjs";
5
- export interface CredentialInfoResponse {
6
- credential_type: CredentialInfoResponse.CredentialType;
7
- caller: Chrt.Caller;
8
- raw_claims: Record<string, unknown>;
9
- }
10
- export declare namespace CredentialInfoResponse {
11
- type CredentialType = "session" | "m2m" | "api_key";
12
- const CredentialType: {
13
- readonly Session: "session";
14
- readonly M2M: "m2m";
15
- readonly ApiKey: "api_key";
16
- };
17
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export var CredentialInfoResponse;
5
- (function (CredentialInfoResponse) {
6
- CredentialInfoResponse.CredentialType = {
7
- Session: "session",
8
- M2M: "m2m",
9
- ApiKey: "api_key",
10
- };
11
- })(CredentialInfoResponse || (CredentialInfoResponse = {}));