@edgeiq/edgeiq-api-js 1.3.54 → 1.3.56

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.
@@ -64,12 +64,25 @@ export interface WidgetVisibility {
64
64
  software_updates_hidden: boolean;
65
65
  data_usage_hidden: boolean;
66
66
  }
67
+ export interface UIConfiguration {
68
+ navigation: UINavigationVisibility;
69
+ }
70
+ export interface UINavigationVisibility {
71
+ dashboard_hidden: boolean;
72
+ devices_hidden: boolean;
73
+ configuration_hidden: boolean;
74
+ software_hidden: boolean;
75
+ data_management_hidden: boolean;
76
+ automation_hidden: boolean;
77
+ messages_hidden: boolean;
78
+ }
67
79
  export interface CompanyInput {
68
80
  _id: string;
69
81
  company_id: string;
70
82
  name: string;
71
83
  view_abilities: ViewAbilities;
72
84
  portal_configuration: PortalConfiguration;
85
+ ui_configuration: UIConfiguration;
73
86
  website?: string;
74
87
  branding?: Branding;
75
88
  aliases?: Aliases;
@@ -1,6 +1,6 @@
1
1
  import { BaseModelInterface } from '../core/ModelClass';
2
2
  import { BulkActionResponse } from '../models';
3
- import { SoftwareUpdate, SoftwareUpdateInput, SoftwareUpdatesFilters, PaginatedSoftwareUpdates, IssueSoftwareUpdateInput } from './models';
3
+ import { SoftwareUpdate, SoftwareUpdateInput, SoftwareUpdatesFilters, PaginatedSoftwareUpdates, IssueSoftwareUpdateInput, FileLocation } from './models';
4
4
  interface SoftwareUpdatesInterface extends BaseModelInterface<SoftwareUpdate, SoftwareUpdateInput, SoftwareUpdatesFilters, PaginatedSoftwareUpdates> {
5
5
  update(softwareUpdate: SoftwareUpdate): Promise<SoftwareUpdate>;
6
6
  deleteMultiple(ids: string[]): Promise<BulkActionResponse>;
@@ -9,6 +9,7 @@ interface SoftwareUpdatesInterface extends BaseModelInterface<SoftwareUpdate, So
9
9
  removeFromDevice(softwareUpdateId: string, deviceId: string): Promise<string>;
10
10
  removeFromDeviceType(softwareUpdateId: string, deviceTypeId: string): Promise<string>;
11
11
  bulkSoftwareUpdate(payload: IssueSoftwareUpdateInput): Promise<BulkActionResponse>;
12
+ uploadFile(id: string, file: File[]): Promise<FileLocation[]>;
12
13
  }
13
14
  export declare const SoftwareUpdates: SoftwareUpdatesInterface;
14
15
  export {};
@@ -340,5 +340,35 @@ exports.SoftwareUpdates = (function (_super) {
340
340
  });
341
341
  });
342
342
  };
343
+ class_1.uploadFile = function (id, files) {
344
+ return __awaiter(this, void 0, void 0, function () {
345
+ var axios, form_1, result, error_12;
346
+ return __generator(this, function (_a) {
347
+ switch (_a.label) {
348
+ case 0:
349
+ _a.trys.push([0, 2, , 3]);
350
+ this.logAction("Uploading file to software update");
351
+ axios = __1.EdgeIQAPI.getAxios();
352
+ form_1 = new FormData();
353
+ files.forEach(function (file) { return form_1.append('files[]', file); });
354
+ return [4, axios.post(constants_1.Endpoints.softwareUpdate + "/" + id + "/upload", form_1, {
355
+ headers: {
356
+ 'Content-Type': 'multipart/form-data',
357
+ },
358
+ })];
359
+ case 1:
360
+ result = _a.sent();
361
+ return [2, result === null || result === void 0 ? void 0 : result.data];
362
+ case 2:
363
+ error_12 = _a.sent();
364
+ if ((0, helpers_1.isApiError)(error_12)) {
365
+ throw error_12;
366
+ }
367
+ throw error_12;
368
+ case 3: return [2];
369
+ }
370
+ });
371
+ });
372
+ };
343
373
  return class_1;
344
374
  }(ModelClass_1.BaseModelClass));
@@ -82,6 +82,17 @@ var portaleConfig = {
82
82
  software_updates_hidden: false,
83
83
  },
84
84
  };
85
+ var uiConfiguration = {
86
+ navigation: {
87
+ dashboard_hidden: false,
88
+ devices_hidden: false,
89
+ configuration_hidden: false,
90
+ software_hidden: false,
91
+ data_management_hidden: false,
92
+ automation_hidden: false,
93
+ messages_hidden: false,
94
+ },
95
+ };
85
96
  var viewAbilities = {
86
97
  dashboard: false,
87
98
  gateways: false,
@@ -95,12 +106,13 @@ var viewAbilities = {
95
106
  notifications: false,
96
107
  firmware: false,
97
108
  };
98
- exports.EmptyCompany = __assign(__assign({}, baseModel), { name: '', device_tags: [], inherited_device_type_ids: [], inherited_ingestor_ids: [], inherited_integration_ids: [], inherited_pollable_attributes_ids: [], inherited_rule_ids: [], inherited_translator_ids: [], inherited_workflow_definition_ids: [], portal_configuration: portaleConfig, view_abilities: viewAbilities });
109
+ exports.EmptyCompany = __assign(__assign({}, baseModel), { name: '', device_tags: [], inherited_device_type_ids: [], inherited_ingestor_ids: [], inherited_integration_ids: [], inherited_pollable_attributes_ids: [], inherited_rule_ids: [], inherited_translator_ids: [], inherited_workflow_definition_ids: [], portal_configuration: portaleConfig, ui_configuration: uiConfiguration, view_abilities: viewAbilities });
99
110
  exports.TestCompany = {
100
111
  _id: 'edgeiq_api_js_test_account',
101
112
  company_id: parentCompanyId,
102
113
  name: 'API Test Account',
103
114
  portal_configuration: portaleConfig,
115
+ ui_configuration: uiConfiguration,
104
116
  view_abilities: viewAbilities,
105
117
  };
106
118
  exports.TestCompany2 = __assign(__assign({}, exports.TestCompany), { _id: 'edgeiq_api_js_test_account_2', name: 'API Test Account 2' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgeiq/edgeiq-api-js",
3
- "version": "1.3.54",
3
+ "version": "1.3.56",
4
4
  "author": "EdgeIQ",
5
5
  "license": "ISC",
6
6
  "description": "This project presents EdgeIQ API SDK.",