@edgeiq/edgeiq-api-js 1.4.6 → 1.4.7
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.
|
@@ -8,7 +8,7 @@ interface SoftwareUpdatesInterface extends BaseModelInterface<SoftwareUpdate, So
|
|
|
8
8
|
assignToDeviceType(softwareUpdateId: string, deviceTypeId: string): Promise<string>;
|
|
9
9
|
removeFromDevice(softwareUpdateId: string, deviceId: string): Promise<string>;
|
|
10
10
|
removeFromDeviceType(softwareUpdateId: string, deviceTypeId: string): Promise<string>;
|
|
11
|
-
bulkSoftwareUpdate(payload: IssueSoftwareUpdateInput): Promise<BulkActionResponse>;
|
|
11
|
+
bulkSoftwareUpdate(payload: IssueSoftwareUpdateInput, generateChildCommandExecutions?: boolean): Promise<BulkActionResponse>;
|
|
12
12
|
uploadFile(id: string, file: File[]): Promise<FileLocation[]>;
|
|
13
13
|
}
|
|
14
14
|
export declare const SoftwareUpdates: SoftwareUpdatesInterface;
|
|
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
17
28
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
29
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
30
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -316,7 +327,7 @@ exports.SoftwareUpdates = (function (_super) {
|
|
|
316
327
|
});
|
|
317
328
|
});
|
|
318
329
|
};
|
|
319
|
-
class_1.bulkSoftwareUpdate = function (payload) {
|
|
330
|
+
class_1.bulkSoftwareUpdate = function (payload, generateChildCommandExecutions) {
|
|
320
331
|
return __awaiter(this, void 0, void 0, function () {
|
|
321
332
|
var axios, result, error_11;
|
|
322
333
|
return __generator(this, function (_a) {
|
|
@@ -325,7 +336,7 @@ exports.SoftwareUpdates = (function (_super) {
|
|
|
325
336
|
_a.trys.push([0, 2, , 3]);
|
|
326
337
|
this.logAction("Issuing software updates with payload " + payload);
|
|
327
338
|
axios = __1.EdgeIQAPI.getAxios();
|
|
328
|
-
return [4, axios.post(constants_1.Endpoints.device + "/bulk/software_update", payload)];
|
|
339
|
+
return [4, axios.post(constants_1.Endpoints.device + "/bulk/software_update", __assign(__assign({}, payload), { generate_child_command_executions: generateChildCommandExecutions !== null && generateChildCommandExecutions !== void 0 ? generateChildCommandExecutions : false }))];
|
|
329
340
|
case 1:
|
|
330
341
|
result = _a.sent();
|
|
331
342
|
return [2, result === null || result === void 0 ? void 0 : result.data];
|