@space-df/sdk 0.0.1-dev.44 → 0.0.1-dev.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.doc.md CHANGED
@@ -3012,7 +3012,7 @@ await client.trip.delete('trip-uuid-456');
3012
3012
 
3013
3013
  ## Overview
3014
3014
 
3015
- The `Telemetry` class provides methods for retrieving telemetry entities, alerts, events, automations, and geofences. This class allows you to search and filter telemetry entities by display type and search terms, retrieve alerts, query events by device, manage automations (list, create, retrieve, update, delete), and manage geofences (list, create, retrieve, update, delete, test).
3015
+ The `Telemetry` class provides methods for retrieving telemetry entities, alerts, events, automations, actions, and geofences. This class allows you to search and filter telemetry entities by display type and search terms, retrieve alerts, query events by device, list telemetry actions, manage automations (list, create, retrieve, update, delete), and manage geofences (list, create, retrieve, update, delete, test).
3016
3016
 
3017
3017
  ## Methods
3018
3018
 
@@ -3313,6 +3313,57 @@ await client.telemetry.automations.delete('automation-uuid-123');
3313
3313
 
3314
3314
  </details>
3315
3315
 
3316
+ <details>
3317
+ <summary><strong>actions.list</strong></summary>
3318
+
3319
+ List telemetry actions with optional filtering and pagination.
3320
+
3321
+ **Signature:**
3322
+
3323
+ ```typescript
3324
+ list(params: ActionsListParams, options?: Core.RequestOptions): Core.APIPromise<ActionsListResponse>
3325
+ ```
3326
+
3327
+ **Parameters:**
3328
+
3329
+ - `params` _(ActionsListParams)_: Query parameters for filtering and pagination:
3330
+ - `search` _(string, optional)_: A search term to filter results.
3331
+ - `ordering` _(string, optional)_: Which field to use when ordering the results.
3332
+ - `limit` _(integer, optional)_: Number of results to return per page.
3333
+ - `offset` _(integer, optional)_: The initial index from which to return the results.
3334
+ - `options` _(Core.RequestOptions)_: Additional request options.
3335
+
3336
+ **Returns:** `Promise<ActionsListResponse>`
3337
+
3338
+ **Response shape:**
3339
+
3340
+ - `count` _(integer)_: Total number of actions matching the query.
3341
+ - `next` _(string | null)_: URL to the next page of results, or `null`.
3342
+ - `previous` _(string | null)_: URL to the previous page of results, or `null`.
3343
+ - `results` _(Action[])_: Array of action objects.
3344
+
3345
+ **Action shape:**
3346
+
3347
+ - `id` _(string)_: Action UUID.
3348
+ - `name` _(string)_: Action name.
3349
+ - `created_at` _(string, optional)_: Creation timestamp.
3350
+ - `data` _(object)_: Action payload:
3351
+ - `channel` _(string)_: Channel identifier.
3352
+ - `message` _(string)_: Message content.
3353
+
3354
+ **Example:**
3355
+
3356
+ ```typescript
3357
+ const actions = await client.telemetry.actions.list({
3358
+ search: 'battery',
3359
+ limit: 10,
3360
+ offset: 0,
3361
+ });
3362
+ console.log(actions.results);
3363
+ ```
3364
+
3365
+ </details>
3366
+
3316
3367
  <details>
3317
3368
  <summary><strong>events.list</strong></summary>
3318
3369
 
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@space-df/sdk",
3
- "version": "0.0.1-dev.44",
3
+ "version": "0.0.1-dev.45",
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,23 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ import { ListParamsResponse, ListResponse } from "../../types/api.js";
4
+ export interface Action {
5
+ created_at?: string;
6
+ data: {
7
+ channel: string;
8
+ message: string;
9
+ };
10
+ id: string;
11
+ name: string;
12
+ key: string;
13
+ }
14
+ export type ActionsListResponse = ListResponse<Action>;
15
+ export interface ActionsListParams extends ListParamsResponse {
16
+ limit?: number;
17
+ offset?: number;
18
+ search?: string;
19
+ }
20
+ export declare class Actions extends APIResource {
21
+ list(params: ActionsListParams, options?: Core.RequestOptions): Core.APIPromise<ActionsListResponse>;
22
+ }
23
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/resources/telemetry/actions.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,MAAM;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE;QACF,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAEvD,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,OAAQ,SAAQ,WAAW;IACpC,IAAI,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;CAQvG"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Actions = void 0;
4
+ const resource_1 = require("../../resource.js");
5
+ class Actions extends resource_1.APIResource {
6
+ list(params, options) {
7
+ const { ...query } = params;
8
+ return this._client.get(`/telemetry/v1/actions`, {
9
+ query,
10
+ ...options,
11
+ headers: { ...options?.headers },
12
+ });
13
+ }
14
+ }
15
+ exports.Actions = Actions;
16
+ //# sourceMappingURL=actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/resources/telemetry/actions.ts"],"names":[],"mappings":";;;AAAA,gDAA6C;AAuB7C,MAAa,OAAQ,SAAQ,sBAAW;IACpC,IAAI,CAAC,MAAyB,EAAE,OAA6B;QACzD,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE;YAC7C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;CACJ;AATD,0BASC"}
@@ -0,0 +1,12 @@
1
+ import { APIResource } from "../../resource.mjs";
2
+ export class Actions extends APIResource {
3
+ list(params, options) {
4
+ const { ...query } = params;
5
+ return this._client.get(`/telemetry/v1/actions`, {
6
+ query,
7
+ ...options,
8
+ headers: { ...options?.headers },
9
+ });
10
+ }
11
+ }
12
+ //# sourceMappingURL=actions.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.mjs","sourceRoot":"","sources":["../../src/resources/telemetry/actions.ts"],"names":[],"mappings":"OAAO,EAAE,WAAW,EAAE;AAuBtB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACpC,IAAI,CAAC,MAAyB,EAAE,OAA6B;QACzD,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE;YAC7C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -4,11 +4,13 @@ import { Alerts } from "./alerts.js";
4
4
  import { Geofences } from "./geofences.js";
5
5
  import { Automations } from "./automations.js";
6
6
  import { Events } from "./events.js";
7
+ import { Actions } from "./actions.js";
7
8
  export declare class Telemetry extends APIResource {
8
9
  entities: Entities;
9
10
  alerts: Alerts;
10
11
  geofences: Geofences;
11
12
  automations: Automations;
12
13
  events: Events;
14
+ actions: Actions;
13
15
  }
14
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,qBAAa,SAAU,SAAQ,WAAW;IACtC,QAAQ,EAAE,QAAQ,CAA8B;IAChD,MAAM,EAAE,MAAM,CAA4B;IAC1C,SAAS,EAAE,SAAS,CAA+B;IACnD,WAAW,EAAE,WAAW,CAAiC;IACzD,MAAM,EAAE,MAAM,CAA4B;CAC7C"}
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;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,qBAAa,SAAU,SAAQ,WAAW;IACtC,QAAQ,EAAE,QAAQ,CAA8B;IAChD,MAAM,EAAE,MAAM,CAA4B;IAC1C,SAAS,EAAE,SAAS,CAA+B;IACnD,WAAW,EAAE,WAAW,CAAiC;IACzD,MAAM,EAAE,MAAM,CAA4B;IAC1C,OAAO,EAAE,OAAO,CAA6B;CAChD"}
@@ -7,6 +7,7 @@ const alerts_1 = require("./alerts.js");
7
7
  const geofences_1 = require("./geofences.js");
8
8
  const automations_1 = require("./automations.js");
9
9
  const events_1 = require("./events.js");
10
+ const actions_1 = require("./actions.js");
10
11
  class Telemetry extends resource_1.APIResource {
11
12
  constructor() {
12
13
  super(...arguments);
@@ -15,6 +16,7 @@ class Telemetry extends resource_1.APIResource {
15
16
  this.geofences = new geofences_1.Geofences(this._client);
16
17
  this.automations = new automations_1.Automations(this._client);
17
18
  this.events = new events_1.Events(this._client);
19
+ this.actions = new actions_1.Actions(this._client);
18
20
  }
19
21
  }
20
22
  exports.Telemetry = Telemetry;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/telemetry/index.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,4CAAsC;AACtC,wCAAkC;AAClC,8CAAwC;AACxC,kDAA4C;AAC5C,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;QAC1C,cAAS,GAAc,IAAI,qBAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,gBAAW,GAAgB,IAAI,yBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,WAAM,GAAW,IAAI,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;CAAA;AAND,8BAMC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/telemetry/index.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,4CAAsC;AACtC,wCAAkC;AAClC,8CAAwC;AACxC,kDAA4C;AAC5C,wCAAkC;AAClC,0CAAoC;AAEpC,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;QAC1C,cAAS,GAAc,IAAI,qBAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,gBAAW,GAAgB,IAAI,yBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,WAAM,GAAW,IAAI,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1C,YAAO,GAAY,IAAI,iBAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;CAAA;AAPD,8BAOC"}
@@ -4,6 +4,7 @@ import { Alerts } from "./alerts.mjs";
4
4
  import { Geofences } from "./geofences.mjs";
5
5
  import { Automations } from "./automations.mjs";
6
6
  import { Events } from "./events.mjs";
7
+ import { Actions } from "./actions.mjs";
7
8
  export class Telemetry extends APIResource {
8
9
  constructor() {
9
10
  super(...arguments);
@@ -12,6 +13,7 @@ export class Telemetry extends APIResource {
12
13
  this.geofences = new Geofences(this._client);
13
14
  this.automations = new Automations(this._client);
14
15
  this.events = new Events(this._client);
16
+ this.actions = new Actions(this._client);
15
17
  }
16
18
  }
17
19
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
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;OACV,EAAE,SAAS,EAAE;OACb,EAAE,WAAW,EAAE;OACf,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;QAC1C,cAAS,GAAc,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,gBAAW,GAAgB,IAAI,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,WAAM,GAAW,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;CAAA"}
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;OACV,EAAE,SAAS,EAAE;OACb,EAAE,WAAW,EAAE;OACf,EAAE,MAAM,EAAE;OACV,EAAE,OAAO,EAAE;AAElB,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;QAC1C,cAAS,GAAc,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,gBAAW,GAAgB,IAAI,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,WAAM,GAAW,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1C,YAAO,GAAY,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;CAAA"}
@@ -0,0 +1,33 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export interface Action {
6
+ created_at?: string;
7
+ data: {
8
+ channel: string;
9
+ message: string;
10
+ };
11
+ id: string;
12
+ name: string;
13
+ key: string;
14
+ }
15
+
16
+ export type ActionsListResponse = ListResponse<Action>;
17
+
18
+ export interface ActionsListParams extends ListParamsResponse {
19
+ limit?: number;
20
+ offset?: number;
21
+ search?: string;
22
+ }
23
+
24
+ export class Actions extends APIResource {
25
+ list(params: ActionsListParams, options?: Core.RequestOptions): Core.APIPromise<ActionsListResponse> {
26
+ const { ...query } = params;
27
+ return this._client.get(`/telemetry/v1/actions`, {
28
+ query,
29
+ ...options,
30
+ headers: { ...options?.headers },
31
+ });
32
+ }
33
+ }
@@ -4,6 +4,7 @@ import { Alerts } from './alerts';
4
4
  import { Geofences } from './geofences';
5
5
  import { Automations } from './automations';
6
6
  import { Events } from './events';
7
+ import { Actions } from './actions';
7
8
 
8
9
  export class Telemetry extends APIResource {
9
10
  entities: Entities = new Entities(this._client);
@@ -11,4 +12,5 @@ export class Telemetry extends APIResource {
11
12
  geofences: Geofences = new Geofences(this._client);
12
13
  automations: Automations = new Automations(this._client);
13
14
  events: Events = new Events(this._client);
15
+ actions: Actions = new Actions(this._client);
14
16
  }
@@ -1 +1 @@
1
- export const VERSION = '0.0.1-dev.44';
1
+ export const VERSION = '0.0.1-dev.45';
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.1-dev.44";
1
+ export declare const VERSION = "0.0.1-dev.45";
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.44';
4
+ exports.VERSION = '0.0.1-dev.45';
5
5
  //# sourceMappingURL=version.js.map
package/dist/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.0.1-dev.44';
1
+ export const VERSION = '0.0.1-dev.45';
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.44",
3
+ "version": "0.0.1-dev.45",
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,33 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export interface Action {
6
+ created_at?: string;
7
+ data: {
8
+ channel: string;
9
+ message: string;
10
+ };
11
+ id: string;
12
+ name: string;
13
+ key: string;
14
+ }
15
+
16
+ export type ActionsListResponse = ListResponse<Action>;
17
+
18
+ export interface ActionsListParams extends ListParamsResponse {
19
+ limit?: number;
20
+ offset?: number;
21
+ search?: string;
22
+ }
23
+
24
+ export class Actions extends APIResource {
25
+ list(params: ActionsListParams, options?: Core.RequestOptions): Core.APIPromise<ActionsListResponse> {
26
+ const { ...query } = params;
27
+ return this._client.get(`/telemetry/v1/actions`, {
28
+ query,
29
+ ...options,
30
+ headers: { ...options?.headers },
31
+ });
32
+ }
33
+ }
@@ -4,6 +4,7 @@ import { Alerts } from './alerts';
4
4
  import { Geofences } from './geofences';
5
5
  import { Automations } from './automations';
6
6
  import { Events } from './events';
7
+ import { Actions } from './actions';
7
8
 
8
9
  export class Telemetry extends APIResource {
9
10
  entities: Entities = new Entities(this._client);
@@ -11,4 +12,5 @@ export class Telemetry extends APIResource {
11
12
  geofences: Geofences = new Geofences(this._client);
12
13
  automations: Automations = new Automations(this._client);
13
14
  events: Events = new Events(this._client);
15
+ actions: Actions = new Actions(this._client);
14
16
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.0.1-dev.44';
1
+ export const VERSION = '0.0.1-dev.45';