@edgeiq/edgeiq-api-js 1.3.57 → 1.3.59

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.
@@ -2,6 +2,7 @@ import { BaseModelInterface } from '../core/ModelClass';
2
2
  import { CommandExecution, CommandExecutionsStatus, CommandExecutionInput, CommandExecutionsFilters, PaginatedCommandExecutions } from './models';
3
3
  interface CommandExecutionsInterface extends BaseModelInterface<CommandExecution, CommandExecutionInput, CommandExecutionsFilters, PaginatedCommandExecutions> {
4
4
  getStatuses(id: string): Promise<CommandExecutionsStatus[]>;
5
+ getCommandExecutionsOutput(id: string): Promise<string>;
5
6
  }
6
7
  export declare const CommandExecutions: CommandExecutionsInterface;
7
8
  export {};
@@ -192,5 +192,29 @@ exports.CommandExecutions = (function (_super) {
192
192
  });
193
193
  });
194
194
  };
195
+ class_1.getCommandExecutionsOutput = function (id) {
196
+ return __awaiter(this, void 0, void 0, function () {
197
+ var axios, result, error_6;
198
+ return __generator(this, function (_a) {
199
+ switch (_a.label) {
200
+ case 0:
201
+ _a.trys.push([0, 2, , 3]);
202
+ this.logAction("Getting command executions output for id " + id);
203
+ axios = core_1.EdgeIQAPI.getAxios();
204
+ return [4, axios.get(constants_1.Endpoints.commandExecution + "/" + id + "/output")];
205
+ case 1:
206
+ result = _a.sent();
207
+ return [2, result === null || result === void 0 ? void 0 : result.data];
208
+ case 2:
209
+ error_6 = _a.sent();
210
+ if ((0, helpers_1.isApiError)(error_6)) {
211
+ throw error_6;
212
+ }
213
+ throw error_6;
214
+ case 3: return [2];
215
+ }
216
+ });
217
+ });
218
+ };
195
219
  return class_1;
196
220
  }(ModelClass_1.BaseModelClass));
@@ -26,6 +26,7 @@ export interface CommandInput {
26
26
  [key: string]: unknown;
27
27
  };
28
28
  translator_id?: string;
29
+ save_command_output?: boolean;
29
30
  }
30
31
  export interface Command extends CommandInput, Base {
31
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgeiq/edgeiq-api-js",
3
- "version": "1.3.57",
3
+ "version": "1.3.59",
4
4
  "author": "EdgeIQ",
5
5
  "license": "ISC",
6
6
  "description": "This project presents EdgeIQ API SDK.",