@space-df/sdk 0.0.1-dev.32 → 0.0.1-dev.33

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 (32) hide show
  1. package/api.doc.md +53 -2
  2. package/dist/package.json +1 -1
  3. package/dist/resources/telemetry/alerts.d.ts +16 -0
  4. package/dist/resources/telemetry/alerts.d.ts.map +1 -0
  5. package/dist/resources/telemetry/alerts.js +16 -0
  6. package/dist/resources/telemetry/alerts.js.map +1 -0
  7. package/dist/resources/telemetry/alerts.mjs +12 -0
  8. package/dist/resources/telemetry/alerts.mjs.map +1 -0
  9. package/dist/resources/telemetry/entities.d.ts +1 -5
  10. package/dist/resources/telemetry/entities.d.ts.map +1 -1
  11. package/dist/resources/telemetry/entities.js +2 -8
  12. package/dist/resources/telemetry/entities.js.map +1 -1
  13. package/dist/resources/telemetry/entities.mjs +1 -7
  14. package/dist/resources/telemetry/entities.mjs.map +1 -1
  15. package/dist/resources/telemetry/index.d.ts +7 -0
  16. package/dist/resources/telemetry/index.d.ts.map +1 -1
  17. package/dist/resources/telemetry/index.js +12 -0
  18. package/dist/resources/telemetry/index.js.map +1 -1
  19. package/dist/resources/telemetry/index.mjs +10 -0
  20. package/dist/resources/telemetry/index.mjs.map +1 -1
  21. package/dist/src/resources/telemetry/alerts.ts +26 -0
  22. package/dist/src/resources/telemetry/entities.ts +17 -22
  23. package/dist/src/resources/telemetry/index.ts +9 -1
  24. package/dist/src/version.ts +1 -1
  25. package/dist/version.d.ts +1 -1
  26. package/dist/version.js +1 -1
  27. package/dist/version.mjs +1 -1
  28. package/package.json +1 -1
  29. package/src/resources/telemetry/alerts.ts +26 -0
  30. package/src/resources/telemetry/entities.ts +17 -22
  31. package/src/resources/telemetry/index.ts +9 -1
  32. package/src/version.ts +1 -1
package/api.doc.md CHANGED
@@ -3012,12 +3012,12 @@ await client.trip.delete('trip-uuid-456');
3012
3012
 
3013
3013
  ## Overview
3014
3014
 
3015
- The `Telemetry` class provides methods for retrieving telemetry entities. This class allows you to search and filter telemetry entities by display type and search terms.
3015
+ The `Telemetry` class provides methods for retrieving telemetry entities and alerts. This class allows you to search and filter telemetry entities by display type and search terms, as well as retrieve alerts.
3016
3016
 
3017
3017
  ## Methods
3018
3018
 
3019
3019
  <details>
3020
- <summary><strong>list</strong></summary>
3020
+ <summary><strong>entities.list</strong></summary>
3021
3021
 
3022
3022
  List telemetry entities with optional filtering, ordering, and pagination.
3023
3023
 
@@ -3070,6 +3070,57 @@ console.log(entities.count);
3070
3070
 
3071
3071
  </details>
3072
3072
 
3073
+ <details>
3074
+ <summary><strong>alerts.list</strong></summary>
3075
+
3076
+ List telemetry alerts with optional filtering, ordering, and pagination.
3077
+
3078
+ **Signature:**
3079
+
3080
+ ```typescript
3081
+ list(params: AlertsListParams, options?: Core.RequestOptions): Core.APIPromise<AlertsListResponse>
3082
+ ```
3083
+
3084
+ **Parameters:**
3085
+
3086
+ - `params` _(AlertsListParams)_: Query parameters for filtering, ordering, and pagination:
3087
+ - `search` _(string, optional)_: A search term to filter results.
3088
+ - `ordering` _(string, optional)_: Which field to use when ordering the results.
3089
+ - `limit` _(integer, optional)_: Number of results to return per page.
3090
+ - `offset` _(integer, optional)_: The initial index from which to return the results.
3091
+ - `options` _(Core.RequestOptions)_: Additional request options.
3092
+
3093
+ **Returns:** `Promise<AlertsListResponse>`
3094
+
3095
+ **Response shape:**
3096
+
3097
+ - `count` _(integer)_: Total number of alerts matching the query.
3098
+ - `next` _(string | null)_: URL to the next page of results, or `null`.
3099
+ - `previous` _(string | null)_: URL to the previous page of results, or `null`.
3100
+ - `results` _(Alert[])_: Array of alert objects.
3101
+
3102
+ **Example:**
3103
+
3104
+ ```typescript
3105
+ const alerts = await client.telemetry.alerts.list({
3106
+ search: 'critical',
3107
+ limit: 10,
3108
+ offset: 0,
3109
+ });
3110
+ console.log(alerts.results);
3111
+ ```
3112
+
3113
+ **Example with minimal parameters:**
3114
+
3115
+ ```typescript
3116
+ const alerts = await client.telemetry.alerts.list({
3117
+ search: 'critical',
3118
+ });
3119
+ console.log(alerts.count);
3120
+ ```
3121
+
3122
+ </details>
3123
+
3073
3124
  ---
3074
3125
 
3075
3126
  # Organizations
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@space-df/sdk",
3
- "version": "0.0.1-dev.32",
3
+ "version": "0.0.1-dev.33",
4
4
  "description": "The official TypeScript library for the Spacedf SDK API",
5
5
  "author": "Spacedf SDK <support@digitalfortress.dev>",
6
6
  "types": "./index.d.ts",
@@ -0,0 +1,16 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ import { ListParamsResponse, ListResponse } from "../../types/api.js";
4
+ export interface Alert {
5
+ [key: string]: any;
6
+ }
7
+ export type AlertsListResponse = ListResponse<Alert>;
8
+ export interface AlertsListParams extends ListParamsResponse {
9
+ device_id?: string;
10
+ category?: string;
11
+ date?: string;
12
+ }
13
+ export declare class Alerts extends APIResource {
14
+ list(params: AlertsListParams, options?: Core.RequestOptions): Core.APIPromise<AlertsListResponse>;
15
+ }
16
+ //# sourceMappingURL=alerts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alerts.d.ts","sourceRoot":"","sources":["../../src/resources/telemetry/alerts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEnE,MAAM,WAAW,KAAK;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;AAErD,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,MAAO,SAAQ,WAAW;IACnC,IAAI,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;CAQrG"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Alerts = void 0;
4
+ const resource_1 = require("../../resource.js");
5
+ class Alerts extends resource_1.APIResource {
6
+ list(params, options) {
7
+ const { ...query } = params;
8
+ return this._client.get(`/telemetry/v1/alerts`, {
9
+ query,
10
+ ...options,
11
+ headers: { ...options?.headers },
12
+ });
13
+ }
14
+ }
15
+ exports.Alerts = Alerts;
16
+ //# sourceMappingURL=alerts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alerts.js","sourceRoot":"","sources":["../../src/resources/telemetry/alerts.ts"],"names":[],"mappings":";;;AAAA,gDAA6C;AAgB7C,MAAa,MAAO,SAAQ,sBAAW;IACnC,IAAI,CAAC,MAAwB,EAAE,OAA6B;QACxD,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE;YAC5C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;CACJ;AATD,wBASC"}
@@ -0,0 +1,12 @@
1
+ import { APIResource } from "../../resource.mjs";
2
+ export class Alerts extends APIResource {
3
+ list(params, options) {
4
+ const { ...query } = params;
5
+ return this._client.get(`/telemetry/v1/alerts`, {
6
+ query,
7
+ ...options,
8
+ headers: { ...options?.headers },
9
+ });
10
+ }
11
+ }
12
+ //# sourceMappingURL=alerts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alerts.mjs","sourceRoot":"","sources":["../../src/resources/telemetry/alerts.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;AAgBtB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACnC,IAAI,CAAC,MAAwB,EAAE,OAA6B;QACxD,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE;YAC5C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -1,10 +1,7 @@
1
1
  import { APIResource } from "../../resource.js";
2
2
  import * as Core from "../../core.js";
3
3
  import { ListParamsResponse, ListResponse } from "../../types/api.js";
4
- export declare class Telemetry extends APIResource {
5
- entities: Entities;
6
- }
7
- declare class Entities extends APIResource {
4
+ export declare class Entities extends APIResource {
8
5
  list(params: EntitiesListParams, options?: Core.RequestOptions): Core.APIPromise<EntitiesListResponse>;
9
6
  }
10
7
  export interface Entity {
@@ -40,5 +37,4 @@ export interface EntitiesListParams extends ListParamsResponse {
40
37
  */
41
38
  search?: string;
42
39
  }
43
- export {};
44
40
  //# sourceMappingURL=entities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/resources/telemetry/entities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEnE,qBAAa,SAAU,SAAQ,WAAW;IACtC,QAAQ,EAAE,QAAQ,CAA8B;CACnD;AAED,cAAM,QAAS,SAAQ,WAAW;IAC9B,IAAI,CAAC,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;CAQzG;AAED,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE;QACX,EAAE,EAAE,MAAM,CAAC;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC1D;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/resources/telemetry/entities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEnE,qBAAa,QAAS,SAAQ,WAAW;IACrC,IAAI,CAAC,MAAM,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;CAQzG;AAED,MAAM,WAAW,MAAM;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE;QACT,EAAE,EAAE,MAAM,CAAC;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC1D;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1,14 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Telemetry = void 0;
3
+ exports.Entities = void 0;
4
4
  const resource_1 = require("../../resource.js");
5
- class Telemetry extends resource_1.APIResource {
6
- constructor() {
7
- super(...arguments);
8
- this.entities = new Entities(this._client);
9
- }
10
- }
11
- exports.Telemetry = Telemetry;
12
5
  class Entities extends resource_1.APIResource {
13
6
  list(params, options) {
14
7
  const { ...query } = params;
@@ -19,4 +12,5 @@ class Entities extends resource_1.APIResource {
19
12
  });
20
13
  }
21
14
  }
15
+ exports.Entities = Entities;
22
16
  //# sourceMappingURL=entities.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"entities.js","sourceRoot":"","sources":["../../src/resources/telemetry/entities.ts"],"names":[],"mappings":";;;AAAA,gDAA6C;AAI7C,MAAa,SAAU,SAAQ,sBAAW;IAA1C;;QACI,aAAQ,GAAa,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;CAAA;AAFD,8BAEC;AAED,MAAM,QAAS,SAAQ,sBAAW;IAC9B,IAAI,CAAC,MAA0B,EAAE,OAA6B;QAC1D,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE;YAC9C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;CACJ"}
1
+ {"version":3,"file":"entities.js","sourceRoot":"","sources":["../../src/resources/telemetry/entities.ts"],"names":[],"mappings":";;;AAAA,gDAA6C;AAI7C,MAAa,QAAS,SAAQ,sBAAW;IACrC,IAAI,CAAC,MAA0B,EAAE,OAA6B;QAC1D,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE;YAC9C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;CACJ;AATD,4BASC"}
@@ -1,11 +1,5 @@
1
1
  import { APIResource } from "../../resource.mjs";
2
- export class Telemetry extends APIResource {
3
- constructor() {
4
- super(...arguments);
5
- this.entities = new Entities(this._client);
6
- }
7
- }
8
- class Entities extends APIResource {
2
+ export class Entities extends APIResource {
9
3
  list(params, options) {
10
4
  const { ...query } = params;
11
5
  return this._client.get(`/telemetry/v1/entities`, {
@@ -1 +1 @@
1
- {"version":3,"file":"entities.mjs","sourceRoot":"","sources":["../../src/resources/telemetry/entities.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QACI,aAAQ,GAAa,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;CAAA;AAED,MAAM,QAAS,SAAQ,WAAW;IAC9B,IAAI,CAAC,MAA0B,EAAE,OAA6B;QAC1D,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE;YAC9C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;CACJ"}
1
+ {"version":3,"file":"entities.mjs","sourceRoot":"","sources":["../../src/resources/telemetry/entities.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,QAAS,SAAQ,WAAW;IACrC,IAAI,CAAC,MAA0B,EAAE,OAA6B;QAC1D,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE;YAC9C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -1,2 +1,9 @@
1
+ import { APIResource } from '@space-df/sdk/resource';
2
+ import { Entities } from "./entities.js";
3
+ import { Alerts } from "./alerts.js";
4
+ export declare class Telemetry extends APIResource {
5
+ entities: Entities;
6
+ alerts: Alerts;
7
+ }
1
8
  export * from "./entities.js";
2
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/telemetry/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/telemetry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,qBAAa,SAAU,SAAQ,WAAW;IACtC,QAAQ,EAAE,QAAQ,CAA8B;IAChD,MAAM,EAAE,MAAM,CAA4B;CAC7C;AAED,cAAc,YAAY,CAAC"}
@@ -14,5 +14,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Telemetry = void 0;
18
+ const resource_1 = require("@space-df/sdk/resource");
19
+ const entities_1 = require("./entities.js");
20
+ const alerts_1 = require("./alerts.js");
21
+ class Telemetry extends resource_1.APIResource {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.entities = new entities_1.Entities(this._client);
25
+ this.alerts = new alerts_1.Alerts(this._client);
26
+ }
27
+ }
28
+ exports.Telemetry = Telemetry;
17
29
  __exportStar(require("./entities.js"), exports);
18
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/telemetry/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/telemetry/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAqD;AACrD,4CAAsC;AACtC,wCAAkC;AAElC,MAAa,SAAU,SAAQ,sBAAW;IAA1C;;QACI,aAAQ,GAAa,IAAI,mBAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChD,WAAM,GAAW,IAAI,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;CAAA;AAHD,8BAGC;AAED,gDAA2B"}
@@ -1,2 +1,12 @@
1
+ import { APIResource } from '@space-df/sdk/resource';
2
+ import { Entities } from "./entities.mjs";
3
+ import { Alerts } from "./alerts.mjs";
4
+ export class Telemetry extends APIResource {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.entities = new Entities(this._client);
8
+ this.alerts = new Alerts(this._client);
9
+ }
10
+ }
1
11
  export * from "./entities.mjs";
2
12
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/telemetry/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/telemetry/index.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB;OAC7C,EAAE,QAAQ,EAAE;OACZ,EAAE,MAAM,EAAE;AAEjB,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QACI,aAAQ,GAAa,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChD,WAAM,GAAW,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;CAAA"}
@@ -0,0 +1,26 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export interface Alert {
6
+ [key: string]: any;
7
+ }
8
+
9
+ export type AlertsListResponse = ListResponse<Alert>;
10
+
11
+ export interface AlertsListParams extends ListParamsResponse {
12
+ device_id?: string;
13
+ category?: string;
14
+ date?: string;
15
+ }
16
+
17
+ export class Alerts extends APIResource {
18
+ list(params: AlertsListParams, options?: Core.RequestOptions): Core.APIPromise<AlertsListResponse> {
19
+ const { ...query } = params;
20
+ return this._client.get(`/telemetry/v1/alerts`, {
21
+ query,
22
+ ...options,
23
+ headers: { ...options?.headers },
24
+ });
25
+ }
26
+ }
@@ -2,11 +2,7 @@ import { APIResource } from '../../resource';
2
2
  import * as Core from '../../core';
3
3
  import { ListParamsResponse, ListResponse } from '../../types/api';
4
4
 
5
- export class Telemetry extends APIResource {
6
- entities: Entities = new Entities(this._client);
7
- }
8
-
9
- class Entities extends APIResource {
5
+ export class Entities extends APIResource {
10
6
  list(params: EntitiesListParams, options?: Core.RequestOptions): Core.APIPromise<EntitiesListResponse> {
11
7
  const { ...query } = params;
12
8
  return this._client.get(`/telemetry/v1/entities`, {
@@ -18,26 +14,26 @@ class Entities extends APIResource {
18
14
  }
19
15
 
20
16
  export interface Entity {
21
- category: string;
22
- created_at: string;
23
- device_id: string;
24
- device_name: string;
25
- display_type: string[];
26
- entity_type: {
17
+ category: string;
18
+ created_at: string;
19
+ device_id: string;
20
+ device_name: string;
21
+ display_type: string[];
22
+ entity_type: {
23
+ id: string;
24
+ image_url: string;
25
+ name: string;
26
+ unique_key: string;
27
+ };
27
28
  id: string;
28
29
  image_url: string;
30
+ is_enabled: boolean;
29
31
  name: string;
32
+ time_end: string;
33
+ time_start: string;
30
34
  unique_key: string;
31
- };
32
- id: string;
33
- image_url: string;
34
- is_enabled: boolean;
35
- name: string;
36
- time_end: string;
37
- time_start: string;
38
- unique_key: string;
39
- unit_of_measurement: string;
40
- updated_at: string;
35
+ unit_of_measurement: string;
36
+ updated_at: string;
41
37
  }
42
38
 
43
39
  export type EntitiesListResponse = ListResponse<Entity>;
@@ -53,4 +49,3 @@ export interface EntitiesListParams extends ListParamsResponse {
53
49
  */
54
50
  search?: string;
55
51
  }
56
-
@@ -1,2 +1,10 @@
1
- export * from './entities';
1
+ import { APIResource } from "../../resource";
2
+ import { Entities } from './entities';
3
+ import { Alerts } from './alerts';
4
+
5
+ export class Telemetry extends APIResource {
6
+ entities: Entities = new Entities(this._client);
7
+ alerts: Alerts = new Alerts(this._client);
8
+ }
2
9
 
10
+ export * from './entities';
@@ -1 +1 @@
1
- export const VERSION = '0.0.1-dev.32';
1
+ export const VERSION = '0.0.1-dev.33';
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.1-dev.32";
1
+ export declare const VERSION = "0.0.1-dev.33";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.0.1-dev.32';
4
+ exports.VERSION = '0.0.1-dev.33';
5
5
  //# sourceMappingURL=version.js.map
package/dist/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.0.1-dev.32';
1
+ export const VERSION = '0.0.1-dev.33';
2
2
  //# sourceMappingURL=version.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@space-df/sdk",
3
- "version": "0.0.1-dev.32",
3
+ "version": "0.0.1-dev.33",
4
4
  "description": "The official TypeScript library for the Spacedf SDK API",
5
5
  "author": "Spacedf SDK <support@digitalfortress.dev>",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,26 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export interface Alert {
6
+ [key: string]: any;
7
+ }
8
+
9
+ export type AlertsListResponse = ListResponse<Alert>;
10
+
11
+ export interface AlertsListParams extends ListParamsResponse {
12
+ device_id?: string;
13
+ category?: string;
14
+ date?: string;
15
+ }
16
+
17
+ export class Alerts extends APIResource {
18
+ list(params: AlertsListParams, options?: Core.RequestOptions): Core.APIPromise<AlertsListResponse> {
19
+ const { ...query } = params;
20
+ return this._client.get(`/telemetry/v1/alerts`, {
21
+ query,
22
+ ...options,
23
+ headers: { ...options?.headers },
24
+ });
25
+ }
26
+ }
@@ -2,11 +2,7 @@ import { APIResource } from '../../resource';
2
2
  import * as Core from '../../core';
3
3
  import { ListParamsResponse, ListResponse } from '../../types/api';
4
4
 
5
- export class Telemetry extends APIResource {
6
- entities: Entities = new Entities(this._client);
7
- }
8
-
9
- class Entities extends APIResource {
5
+ export class Entities extends APIResource {
10
6
  list(params: EntitiesListParams, options?: Core.RequestOptions): Core.APIPromise<EntitiesListResponse> {
11
7
  const { ...query } = params;
12
8
  return this._client.get(`/telemetry/v1/entities`, {
@@ -18,26 +14,26 @@ class Entities extends APIResource {
18
14
  }
19
15
 
20
16
  export interface Entity {
21
- category: string;
22
- created_at: string;
23
- device_id: string;
24
- device_name: string;
25
- display_type: string[];
26
- entity_type: {
17
+ category: string;
18
+ created_at: string;
19
+ device_id: string;
20
+ device_name: string;
21
+ display_type: string[];
22
+ entity_type: {
23
+ id: string;
24
+ image_url: string;
25
+ name: string;
26
+ unique_key: string;
27
+ };
27
28
  id: string;
28
29
  image_url: string;
30
+ is_enabled: boolean;
29
31
  name: string;
32
+ time_end: string;
33
+ time_start: string;
30
34
  unique_key: string;
31
- };
32
- id: string;
33
- image_url: string;
34
- is_enabled: boolean;
35
- name: string;
36
- time_end: string;
37
- time_start: string;
38
- unique_key: string;
39
- unit_of_measurement: string;
40
- updated_at: string;
35
+ unit_of_measurement: string;
36
+ updated_at: string;
41
37
  }
42
38
 
43
39
  export type EntitiesListResponse = ListResponse<Entity>;
@@ -53,4 +49,3 @@ export interface EntitiesListParams extends ListParamsResponse {
53
49
  */
54
50
  search?: string;
55
51
  }
56
-
@@ -1,2 +1,10 @@
1
- export * from './entities';
1
+ import { APIResource } from '@space-df/sdk/resource';
2
+ import { Entities } from './entities';
3
+ import { Alerts } from './alerts';
4
+
5
+ export class Telemetry extends APIResource {
6
+ entities: Entities = new Entities(this._client);
7
+ alerts: Alerts = new Alerts(this._client);
8
+ }
2
9
 
10
+ export * from './entities';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.0.1-dev.32';
1
+ export const VERSION = '0.0.1-dev.33';