@edgeiq/edgeiq-api-js 1.6.16 → 1.6.17

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.
@@ -40,6 +40,7 @@ interface DevicesInterface extends BaseModelInterface<Device, DeviceInput, Devic
40
40
  dryRunCommand(id: string, commandId: string, data?: {
41
41
  [key: string]: unknown;
42
42
  }): Promise<Command>;
43
+ bulkExecuteWorkflow(workflowId: string, ids: string[]): Promise<BulkActionResponse>;
43
44
  }
44
45
  export declare const Devices: DevicesInterface;
45
46
  export {};
@@ -925,5 +925,33 @@ exports.Devices = (function (_super) {
925
925
  });
926
926
  });
927
927
  };
928
+ class_1.bulkExecuteWorkflow = function (workflowId, ids) {
929
+ return __awaiter(this, void 0, void 0, function () {
930
+ var axios, data, result, error_34;
931
+ return __generator(this, function (_a) {
932
+ switch (_a.label) {
933
+ case 0:
934
+ _a.trys.push([0, 2, , 3]);
935
+ this.logAction("Execute workflow with ID: " + workflowId + " on devices with IDs: " + ids);
936
+ axios = __1.EdgeIQAPI.getAxios();
937
+ data = {
938
+ ids: ids,
939
+ definition_id: workflowId,
940
+ };
941
+ return [4, axios.post(constants_1.Endpoints.device + "/bulk_workflow", __assign({}, data))];
942
+ case 1:
943
+ result = _a.sent();
944
+ return [2, result === null || result === void 0 ? void 0 : result.data];
945
+ case 2:
946
+ error_34 = _a.sent();
947
+ if ((0, helpers_1.isApiError)(error_34)) {
948
+ throw error_34;
949
+ }
950
+ throw error_34;
951
+ case 3: return [2];
952
+ }
953
+ });
954
+ });
955
+ };
928
956
  return class_1;
929
957
  }(ModelClass_1.BaseModelClass));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgeiq/edgeiq-api-js",
3
- "version": "1.6.16",
3
+ "version": "1.6.17",
4
4
  "author": "EdgeIQ",
5
5
  "license": "ISC",
6
6
  "description": "This project presents EdgeIQ API SDK.",