@edgeiq/edgeiq-api-js 1.7.6 → 1.7.8

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.
@@ -1,9 +1,12 @@
1
1
  import { Base, Execution, Filter, Filters, Pagination } from '../models';
2
+ import { RetryOptions } from '../retryOptions/models';
2
3
  export interface CommandExecution extends Base {
3
4
  command_id: string;
4
5
  device_id: string;
5
6
  execution_statuses: Execution[];
6
7
  generate_child_command_executions?: boolean;
8
+ original_payload?: string;
9
+ retry_options?: RetryOptions;
7
10
  }
8
11
  export interface CommandExecutionsFilters extends Filters {
9
12
  command_id?: Filter;
@@ -1,7 +1,7 @@
1
1
  import { BaseModelInterface } from '../core/ModelClass';
2
2
  import { BulkActionResponse, PaginationFilter } from '../models';
3
3
  import { Command, CommandInput, CommandsFilters, PaginatedCommands } from './models';
4
- import { CommandExecutionsFilters, PaginatedCommandExecutions } from '../commandExecutions/models';
4
+ import { CommandExecution, CommandExecutionsFilters, PaginatedCommandExecutions } from '../commandExecutions/models';
5
5
  interface CommandsInterface extends BaseModelInterface<Command, CommandInput, CommandsFilters, PaginatedCommands> {
6
6
  update(command: Command): Promise<Command>;
7
7
  deleteMultiple(ids: string[]): Promise<BulkActionResponse>;
@@ -11,7 +11,7 @@ interface CommandsInterface extends BaseModelInterface<Command, CommandInput, Co
11
11
  removeFromDeviceType(commandId: string, deviceTypeId: string): Promise<string>;
12
12
  executeOnDevice(commandId: string, deviceId: string, options?: {
13
13
  [key: string]: string | number;
14
- }): Promise<string>;
14
+ }): Promise<CommandExecution>;
15
15
  getCommandExecutions(id: string, filters: CommandExecutionsFilters, pagination: PaginationFilter): Promise<PaginatedCommandExecutions>;
16
16
  }
17
17
  export declare const Commands: CommandsInterface;
@@ -192,8 +192,8 @@ export const Commands = class extends BaseModelClass {
192
192
  try {
193
193
  this.logAction(`executing command ${commandId} on device ${deviceId}`);
194
194
  const axios = EdgeIQAPI.getAxios();
195
- yield axios.post(`${Endpoints.device}/${deviceId}/${Endpoints.command}/${commandId}/execute`, { options });
196
- return 'Command execution queued';
195
+ const result = yield axios.post(`${Endpoints.device}/${deviceId}/${Endpoints.command}/${commandId}/execute`, { options });
196
+ return result === null || result === void 0 ? void 0 : result.data;
197
197
  }
198
198
  catch (error) {
199
199
  if (isApiError(error)) {
@@ -74,6 +74,10 @@ export interface Capabilities {
74
74
  sms_at_commands?: SMSATCommands;
75
75
  observable_paths?: string[];
76
76
  }
77
+ export interface ImportantMetadata {
78
+ label: string;
79
+ value: string;
80
+ }
77
81
  export interface DeviceTypeInput {
78
82
  name: string;
79
83
  company_id: string;
@@ -93,7 +97,7 @@ export interface DeviceTypeInput {
93
97
  [key: string]: string;
94
98
  };
95
99
  default_thing_groups?: AwsThingGroup[];
96
- important_metadata?: string[];
100
+ important_metadata?: ImportantMetadata[];
97
101
  device_integration_id?: string;
98
102
  cloud_native_integration_id?: string;
99
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgeiq/edgeiq-api-js",
3
- "version": "1.7.6",
3
+ "version": "1.7.8",
4
4
  "author": "EdgeIQ",
5
5
  "license": "ISC",
6
6
  "description": "This project presents EdgeIQ API SDK.",