@edgeiq/edgeiq-api-js 1.3.70 → 1.4.1

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.
@@ -1,7 +1,10 @@
1
+ import { EIQFile } from '..';
1
2
  import { BaseModelInterface } from '../core/ModelClass';
2
3
  import { Company, PaginatedCompanies, CompaniesFilters, CompanyInput } from './models';
3
4
  interface CompaniesInterface extends BaseModelInterface<Company, CompanyInput, CompaniesFilters, PaginatedCompanies> {
4
- update(command: Company): Promise<Company>;
5
+ update(company: Company): Promise<Company>;
6
+ getFiles(id: string): Promise<EIQFile[]>;
7
+ getDescendantsIds(id: string): Promise<string[]>;
5
8
  }
6
9
  export declare const Companies: CompaniesInterface;
7
10
  export {};
@@ -218,5 +218,29 @@ exports.Companies = (function (_super) {
218
218
  });
219
219
  });
220
220
  };
221
+ class_1.getDescendantsIds = function (id) {
222
+ return __awaiter(this, void 0, void 0, function () {
223
+ var axios, result, error_7;
224
+ return __generator(this, function (_a) {
225
+ switch (_a.label) {
226
+ case 0:
227
+ _a.trys.push([0, 2, , 3]);
228
+ this.logAction("Getting descendants ids company with id " + id);
229
+ axios = __1.EdgeIQAPI.getAxios();
230
+ return [4, axios.get(constants_1.Endpoints.company + "/" + id + "/descendants")];
231
+ case 1:
232
+ result = _a.sent();
233
+ return [2, result === null || result === void 0 ? void 0 : result.data];
234
+ case 2:
235
+ error_7 = _a.sent();
236
+ if ((0, helpers_1.isApiError)(error_7)) {
237
+ throw error_7;
238
+ }
239
+ throw error_7;
240
+ case 3: return [2];
241
+ }
242
+ });
243
+ });
244
+ };
221
245
  return class_1;
222
246
  }(ModelClass_1.BaseModelClass));
@@ -60,6 +60,7 @@ export interface DeviceInput {
60
60
  lwm2m_role?: string;
61
61
  lwm2m_lifetime?: number;
62
62
  part_number?: string;
63
+ parent_device_id?: string;
63
64
  }
64
65
  export interface Device extends DeviceInput, Base {
65
66
  device_online?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgeiq/edgeiq-api-js",
3
- "version": "1.3.70",
3
+ "version": "1.4.1",
4
4
  "author": "EdgeIQ",
5
5
  "license": "ISC",
6
6
  "description": "This project presents EdgeIQ API SDK.",