@edgeiq/edgeiq-api-js 1.13.7 → 1.13.9
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.
- package/dist/devices/models.d.ts +2 -1
- package/dist/lwm2m/index.js +17 -4
- package/dist/lwm2m/index.js.map +1 -1
- package/package.json +1 -1
package/dist/devices/models.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CommandExecution } from '../commandExecutions/models';
|
|
|
7
7
|
import { GatewayCommand } from '../gatewayCommands/models';
|
|
8
8
|
import { WorkflowExecution } from '../workflowExecutions/models';
|
|
9
9
|
export declare type DeviceClass = 'discovered' | 'escrow' | 'standard';
|
|
10
|
-
export declare type DeviceActivityType = 'heartbeat' | 'device_event' | 'device_error' | 'report' | 'command_execution' | 'gateway_command' | 'software_update' | 'workflow_execution';
|
|
10
|
+
export declare type DeviceActivityType = 'heartbeat' | 'device_event' | 'device_error' | 'health_status' | 'report' | 'command_execution' | 'gateway_command' | 'software_update' | 'workflow_execution';
|
|
11
11
|
export declare type BoundingBox = {
|
|
12
12
|
topLeft: string;
|
|
13
13
|
bottomRight: string;
|
|
@@ -168,6 +168,7 @@ export interface DevicesFilters extends Filters {
|
|
|
168
168
|
command_ids?: Filter;
|
|
169
169
|
attached_device_ids?: Filter;
|
|
170
170
|
location?: Filter;
|
|
171
|
+
last_known_geographic_location?: Filter;
|
|
171
172
|
metadata?: {
|
|
172
173
|
[key: string]: Filter;
|
|
173
174
|
};
|
package/dist/lwm2m/index.js
CHANGED
|
@@ -7,6 +7,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
+
var t = {};
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
+
t[p] = s[p];
|
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
+
t[p[i]] = s[p[i]];
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
10
21
|
import { Endpoints } from '../constants';
|
|
11
22
|
import { isApiError } from '../helpers';
|
|
12
23
|
import { parseFilters } from '../filtersParser';
|
|
@@ -17,10 +28,12 @@ const LWM2M = {
|
|
|
17
28
|
try {
|
|
18
29
|
EdgeIQAPI.logAction(`Listing bulk responses with following filters: ${filters !== null && filters !== void 0 ? filters : '{}'}`);
|
|
19
30
|
const axios = EdgeIQAPI.getAxios();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
31
|
+
const _b = filters !== null && filters !== void 0 ? filters : {}, { withModels } = _b, filtersWithoutModels = __rest(_b, ["withModels"]);
|
|
32
|
+
const parsedParams = parseFilters(Object.keys(filtersWithoutModels).length > 0
|
|
33
|
+
? filtersWithoutModels
|
|
34
|
+
: undefined);
|
|
35
|
+
const params = withModels
|
|
36
|
+
? Object.assign(Object.assign({}, parsedParams), { related: 'models' }) : parsedParams;
|
|
24
37
|
const result = yield axios.get(Endpoints.lwm2mStates, { params });
|
|
25
38
|
return (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.resources;
|
|
26
39
|
}
|
package/dist/lwm2m/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lwm2m/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lwm2m/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CA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