@edgeiq/edgeiq-api-js 1.4.9 → 1.4.10

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.
@@ -25,7 +25,9 @@ interface DevicesInterface extends BaseModelInterface<Device, DeviceInput, Devic
25
25
  deviceLwm2mObjetLinks(id: string): Promise<Lwm2mObjectLinks[]>;
26
26
  processGatewayCommand(deviceId: string, gatewayCommandRequest: GatewayCommandRequest): Promise<GatewayCommand>;
27
27
  bulkExecuteGatewayCommand(ids: string[], gatewayCommandRequest: GatewayCommandRequest, generateChildCommandExecutions?: boolean): Promise<BulkActionResponse>;
28
- bulkExecuteCommand(ids: string[], command: Command, generateChildCommandExecutions?: boolean): Promise<BulkActionResponse>;
28
+ bulkExecuteCommand(commandId: string, ids: string[], options?: {
29
+ [key: string]: string | number;
30
+ }, generateChildCommandExecutions?: boolean): Promise<BulkActionResponse>;
29
31
  getFiles(id: string): Promise<EIQFile[]>;
30
32
  getCommandExecutions(id: string, filters: CommandExecutionsFilters, pagination: PaginationFilter): Promise<PaginatedCommandExecutions>;
31
33
  startRemoteTerminal(id: string, executable?: string): Promise<string>;
@@ -668,20 +668,21 @@ exports.Devices = (function (_super) {
668
668
  });
669
669
  });
670
670
  };
671
- class_1.bulkExecuteCommand = function (ids, command, generateChildCommandExecutions) {
671
+ class_1.bulkExecuteCommand = function (commandId, ids, options, generateChildCommandExecutions) {
672
672
  return __awaiter(this, void 0, void 0, function () {
673
- var axios, result, error_24;
673
+ var axios, data, result, error_24;
674
674
  return __generator(this, function (_a) {
675
675
  switch (_a.label) {
676
676
  case 0:
677
677
  _a.trys.push([0, 2, , 3]);
678
- this.logAction("Execute command with ID: " + command._id + " on devices with IDs: " + ids);
678
+ this.logAction("Execute command with ID: " + commandId + " on devices with IDs: " + ids);
679
679
  axios = __1.EdgeIQAPI.getAxios();
680
- return [4, axios.post(constants_1.Endpoints.device + "/bulk/commands/" + command._id + "/execute", {
681
- command: command,
682
- ids: ids,
683
- generate_child_command_executions: generateChildCommandExecutions !== null && generateChildCommandExecutions !== void 0 ? generateChildCommandExecutions : false,
684
- })];
680
+ data = {
681
+ ids: ids,
682
+ generate_child_command_executions: generateChildCommandExecutions !== null && generateChildCommandExecutions !== void 0 ? generateChildCommandExecutions : false,
683
+ };
684
+ return [4, axios.post(constants_1.Endpoints.device + "/bulk/commands/" + commandId + "/execute", options
685
+ ? __assign(__assign({}, data), { options: options }) : __assign({}, data))];
685
686
  case 1:
686
687
  result = _a.sent();
687
688
  return [2, result === null || result === void 0 ? void 0 : result.data];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgeiq/edgeiq-api-js",
3
- "version": "1.4.9",
3
+ "version": "1.4.10",
4
4
  "author": "EdgeIQ",
5
5
  "license": "ISC",
6
6
  "description": "This project presents EdgeIQ API SDK.",