@edgeiq/edgeiq-api-js 1.3.14 → 1.3.17
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,5 +1,6 @@
|
|
|
1
1
|
import { Base, Filter, Filters, Pagination } from '../models';
|
|
2
2
|
export declare type TypeDeviceType = 'gateway' | 'sensor' | 'cloud_native' | 'modem' | 'lwm2m';
|
|
3
|
+
export declare type DeviceTypeRole = 'gateway' | 'endpoint';
|
|
3
4
|
export interface NetworkConnection {
|
|
4
5
|
type: string;
|
|
5
6
|
interface?: string;
|
|
@@ -79,6 +80,7 @@ export interface DeviceTypeInput {
|
|
|
79
80
|
manufacturer: string;
|
|
80
81
|
long_description?: string;
|
|
81
82
|
type: TypeDeviceType;
|
|
83
|
+
role: DeviceTypeRole;
|
|
82
84
|
capabilities: Capabilities;
|
|
83
85
|
heartbeat_values?: string[];
|
|
84
86
|
origin_id?: string;
|
|
@@ -97,6 +99,7 @@ export interface DeviceTypesFilters extends Filters {
|
|
|
97
99
|
manufacturer?: Filter;
|
|
98
100
|
long_description?: string;
|
|
99
101
|
type?: Filter;
|
|
102
|
+
role?: Filter;
|
|
100
103
|
}
|
|
101
104
|
export interface PaginatedDeviceTypes {
|
|
102
105
|
deviceTypes: DeviceType[];
|
|
@@ -14,6 +14,8 @@ export interface EscrowDeviceInput {
|
|
|
14
14
|
export interface EscrowDevice extends EscrowDeviceInput, Base {
|
|
15
15
|
lwm2m_bootstrap_psk_secret_id?: string;
|
|
16
16
|
lwm2m_server_psk_secret_id?: string;
|
|
17
|
+
serial?: string;
|
|
18
|
+
part_number?: string;
|
|
17
19
|
}
|
|
18
20
|
export interface EscrowDevicesFilters extends Filters {
|
|
19
21
|
unique_id?: Filter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Lwm2mState, Lwm2mStatesFilters } from './models';
|
|
2
2
|
declare const Lwm2mStates: {
|
|
3
|
-
list: (filters?: Lwm2mStatesFilters | undefined) => Promise<Lwm2mState>;
|
|
3
|
+
list: (filters?: Lwm2mStatesFilters | undefined) => Promise<Lwm2mState[]>;
|
|
4
4
|
};
|
|
5
5
|
export { Lwm2mStates };
|
package/dist/lwm2mState/index.js
CHANGED
|
@@ -44,20 +44,21 @@ var __1 = require("..");
|
|
|
44
44
|
var Lwm2mStates = {
|
|
45
45
|
list: function (filters) { return __awaiter(void 0, void 0, void 0, function () {
|
|
46
46
|
var axios, result, error_1;
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
var _a;
|
|
48
|
+
return __generator(this, function (_b) {
|
|
49
|
+
switch (_b.label) {
|
|
49
50
|
case 0:
|
|
50
|
-
|
|
51
|
+
_b.trys.push([0, 2, , 3]);
|
|
51
52
|
__1.EdgeIQAPI.logAction("Listing bulk responses with following filters: " + (filters !== null && filters !== void 0 ? filters : '{}'));
|
|
52
53
|
axios = __1.EdgeIQAPI.getAxios();
|
|
53
54
|
return [4, axios.get(constants_1.Endpoints.lwm2mStates, {
|
|
54
55
|
params: (0, filtersParser_1.parseFilters)(filters),
|
|
55
56
|
})];
|
|
56
57
|
case 1:
|
|
57
|
-
result =
|
|
58
|
-
return [2, result === null || result === void 0 ? void 0 : result.data];
|
|
58
|
+
result = _b.sent();
|
|
59
|
+
return [2, (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.resources];
|
|
59
60
|
case 2:
|
|
60
|
-
error_1 =
|
|
61
|
+
error_1 = _b.sent();
|
|
61
62
|
if ((0, helpers_1.isApiError)(error_1)) {
|
|
62
63
|
throw error_1;
|
|
63
64
|
}
|
package/dist/testConstants.js
CHANGED
|
@@ -112,7 +112,7 @@ var deviceTypeCapabilities = {
|
|
|
112
112
|
network_connections: [],
|
|
113
113
|
peripherals: [],
|
|
114
114
|
};
|
|
115
|
-
exports.EmptyDeviceType = __assign(__assign({}, baseModel), { capabilities: deviceTypeCapabilities, manufacturer: '', model: '', name: '', type: 'cloud_native' });
|
|
115
|
+
exports.EmptyDeviceType = __assign(__assign({}, baseModel), { capabilities: deviceTypeCapabilities, manufacturer: '', model: '', name: '', type: 'cloud_native', role: 'endpoint' });
|
|
116
116
|
exports.TestDeviceType = {
|
|
117
117
|
company_id: parentCompanyId,
|
|
118
118
|
capabilities: deviceTypeCapabilities,
|
|
@@ -120,6 +120,7 @@ exports.TestDeviceType = {
|
|
|
120
120
|
model: 'API Test model',
|
|
121
121
|
name: 'API Test Device Type',
|
|
122
122
|
type: 'cloud_native',
|
|
123
|
+
role: 'endpoint',
|
|
123
124
|
};
|
|
124
125
|
exports.TestDeviceType2 = __assign(__assign({}, exports.TestDeviceType), { name: 'API Test Device Type 2' });
|
|
125
126
|
exports.NewTestDeviceTypeName = 'API Test Device Type updated';
|