@edgeiq/edgeiq-api-js 1.4.18 → 1.5.0

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.
@@ -6,6 +6,7 @@ interface CompaniesInterface extends BaseModelInterface<Company, CompanyInput, C
6
6
  getFiles(id: string): Promise<EIQFile[]>;
7
7
  getDescendantsIds(id: string): Promise<string[]>;
8
8
  getAncestors(id: string): Promise<Company[]>;
9
+ uploadCompanyLogo(id: string, logo: File): Promise<string>;
9
10
  }
10
11
  export declare const Companies: CompaniesInterface;
11
12
  export {};
@@ -266,5 +266,35 @@ exports.Companies = (function (_super) {
266
266
  });
267
267
  });
268
268
  };
269
+ class_1.uploadCompanyLogo = function (id, logo) {
270
+ return __awaiter(this, void 0, void 0, function () {
271
+ var axios, form, result, error_9;
272
+ return __generator(this, function (_a) {
273
+ switch (_a.label) {
274
+ case 0:
275
+ _a.trys.push([0, 2, , 3]);
276
+ this.logAction("Updating logo of company with id " + id);
277
+ axios = __1.EdgeIQAPI.getAxios();
278
+ form = new FormData();
279
+ form.append('file', logo);
280
+ return [4, axios.post(constants_1.Endpoints.company + "/" + id + "/logo", form, {
281
+ headers: {
282
+ 'Content-Type': 'multipart/form-data',
283
+ },
284
+ })];
285
+ case 1:
286
+ result = _a.sent();
287
+ return [2, result === null || result === void 0 ? void 0 : result.data];
288
+ case 2:
289
+ error_9 = _a.sent();
290
+ if ((0, helpers_1.isApiError)(error_9)) {
291
+ throw error_9;
292
+ }
293
+ throw error_9;
294
+ case 3: return [2];
295
+ }
296
+ });
297
+ });
298
+ };
269
299
  return class_1;
270
300
  }(ModelClass_1.BaseModelClass));
@@ -8,7 +8,7 @@ interface DiscoveredDevicesInterface extends BaseModelInterface<DiscoveredDevice
8
8
  promote(discoveredDevice: DiscoveredDevice, deviceTypeId: string): Promise<Device>;
9
9
  getOneByUniqueId(uniqueId: string): Promise<DiscoveredDevice>;
10
10
  deleteMultiple(ids: string[]): Promise<BulkActionResponse>;
11
- csvBulkPromote(file: File): Promise<BulkActionResponse>;
11
+ csvBulkPromote(file: File, company_id: string): Promise<BulkActionResponse>;
12
12
  csvBulkDownload(filters?: DiscoveredDevicesFilters): Promise<File>;
13
13
  }
14
14
  export declare const DiscoveredDevices: DiscoveredDevicesInterface;
@@ -301,7 +301,7 @@ exports.DiscoveredDevices = (function (_super) {
301
301
  });
302
302
  });
303
303
  };
304
- class_1.csvBulkPromote = function (file) {
304
+ class_1.csvBulkPromote = function (file, company_id) {
305
305
  return __awaiter(this, void 0, void 0, function () {
306
306
  var axios, form, result, error_10;
307
307
  return __generator(this, function (_a) {
@@ -312,6 +312,7 @@ exports.DiscoveredDevices = (function (_super) {
312
312
  axios = __1.EdgeIQAPI.getAxios();
313
313
  form = new FormData();
314
314
  form.append('csv_upload', file);
315
+ form.append('company_id', company_id);
315
316
  return [4, axios.post(constants_1.Endpoints.discoveredDevice + "/csv_bulk_upload_promote", form, {
316
317
  headers: {
317
318
  'Content-Type': 'multipart/form-data',
@@ -11,6 +11,7 @@ export interface SoftwareUpdateInput {
11
11
  files?: (FileLocation | undefined)[];
12
12
  script?: string;
13
13
  reboot?: boolean;
14
+ enforce_secure_download?: boolean;
14
15
  }
15
16
  export interface SoftwareUpdate extends SoftwareUpdateInput, Base {
16
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgeiq/edgeiq-api-js",
3
- "version": "1.4.18",
3
+ "version": "1.5.0",
4
4
  "author": "EdgeIQ",
5
5
  "license": "ISC",
6
6
  "description": "This project presents EdgeIQ API SDK.",