@hello.nrfcloud.com/proto-map 14.1.1 → 14.2.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.
- package/api/Context.ts +1 -0
- package/api/DeviceCredentials.ts +27 -0
- package/api/index.ts +1 -0
- package/dist/api/Context.js +1 -0
- package/dist/api/DeviceCredentials.js +23 -0
- package/dist/api/index.js +1 -0
- package/dist/lwm2m/definitions.js +4 -4
- package/lwm2m/14202.xml +2 -2
- package/lwm2m/14205.xml +1 -1
- package/lwm2m/definitions.ts +4 -4
- package/lwm2m/object/14202.d.ts +2 -2
- package/lwm2m/object/14205.d.ts +1 -1
- package/package.json +8 -8
package/api/Context.ts
CHANGED
|
@@ -2,6 +2,7 @@ const baseURL = `https://github.com/hello-nrfcloud/proto-map`
|
|
|
2
2
|
|
|
3
3
|
export const Context = {
|
|
4
4
|
device: new URL(`${baseURL}/device`),
|
|
5
|
+
deviceCredentials: new URL(`${baseURL}/device/credentials`),
|
|
5
6
|
devices: new URL(`${baseURL}/devices`),
|
|
6
7
|
deviceJWT: new URL(`${baseURL}/device-jwt`),
|
|
7
8
|
shareDevice: {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Type } from '@sinclair/typebox'
|
|
2
|
+
import { Context } from './Context.js'
|
|
3
|
+
import { DeviceId, PublicDeviceId } from './DeviceId.js'
|
|
4
|
+
|
|
5
|
+
export const DeviceCredentials = Type.Object(
|
|
6
|
+
{
|
|
7
|
+
'@context': Type.Literal(Context.deviceCredentials.toString()),
|
|
8
|
+
id: PublicDeviceId,
|
|
9
|
+
deviceId: DeviceId,
|
|
10
|
+
credentials: Type.Object({
|
|
11
|
+
privateKey: Type.String({
|
|
12
|
+
minLength: 1,
|
|
13
|
+
title: 'Private Key',
|
|
14
|
+
description: 'PEM encoded private key',
|
|
15
|
+
}),
|
|
16
|
+
certificate: Type.String({
|
|
17
|
+
minLength: 1,
|
|
18
|
+
title: 'Certificate',
|
|
19
|
+
description: 'PEM encoded certificate',
|
|
20
|
+
}),
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: 'Device credentials',
|
|
25
|
+
description: 'contains credentials for custom devices',
|
|
26
|
+
},
|
|
27
|
+
)
|
package/api/index.ts
CHANGED
package/dist/api/Context.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
var baseURL = "https://github.com/hello-nrfcloud/proto-map";
|
|
2
2
|
export var Context = {
|
|
3
3
|
device: new URL("".concat(baseURL, "/device")),
|
|
4
|
+
deviceCredentials: new URL("".concat(baseURL, "/device/credentials")),
|
|
4
5
|
devices: new URL("".concat(baseURL, "/devices")),
|
|
5
6
|
deviceJWT: new URL("".concat(baseURL, "/device-jwt")),
|
|
6
7
|
shareDevice: {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Type } from '@sinclair/typebox';
|
|
2
|
+
import { Context } from './Context.js';
|
|
3
|
+
import { DeviceId, PublicDeviceId } from './DeviceId.js';
|
|
4
|
+
export var DeviceCredentials = Type.Object({
|
|
5
|
+
'@context': Type.Literal(Context.deviceCredentials.toString()),
|
|
6
|
+
id: PublicDeviceId,
|
|
7
|
+
deviceId: DeviceId,
|
|
8
|
+
credentials: Type.Object({
|
|
9
|
+
privateKey: Type.String({
|
|
10
|
+
minLength: 1,
|
|
11
|
+
title: 'Private Key',
|
|
12
|
+
description: 'PEM encoded private key'
|
|
13
|
+
}),
|
|
14
|
+
certificate: Type.String({
|
|
15
|
+
minLength: 1,
|
|
16
|
+
title: 'Certificate',
|
|
17
|
+
description: 'PEM encoded certificate'
|
|
18
|
+
})
|
|
19
|
+
})
|
|
20
|
+
}, {
|
|
21
|
+
title: 'Device credentials',
|
|
22
|
+
description: 'contains credentials for custom devices'
|
|
23
|
+
});
|
package/dist/api/index.js
CHANGED
|
@@ -193,15 +193,15 @@ var _obj;
|
|
|
193
193
|
/**
|
|
194
194
|
* Battery temperature (Float)
|
|
195
195
|
*
|
|
196
|
-
* Battery temperature in Celsius. Examples: 21.7, 23.123.
|
|
196
|
+
* Battery temperature in degree Celsius. Examples: 21.7, 23.123.
|
|
197
197
|
*/ 3: {
|
|
198
198
|
ResourceID: 3,
|
|
199
199
|
Name: "Battery temperature",
|
|
200
200
|
Mandatory: false,
|
|
201
201
|
Type: ResourceType.Float,
|
|
202
202
|
Multiple: false,
|
|
203
|
-
Description: "Battery temperature in Celsius. Examples: 21.7, 23.123.",
|
|
204
|
-
Units: "
|
|
203
|
+
Description: "Battery temperature in degree Celsius. Examples: 21.7, 23.123.",
|
|
204
|
+
Units: "\u00B0C"
|
|
205
205
|
},
|
|
206
206
|
/**
|
|
207
207
|
* Time to full (Integer)
|
|
@@ -485,7 +485,7 @@ var _obj;
|
|
|
485
485
|
Mandatory: false,
|
|
486
486
|
Type: ResourceType.Float,
|
|
487
487
|
Multiple: false,
|
|
488
|
-
Description: "Environmental temperature in Celsius. Examples: 23.5, -10.2.",
|
|
488
|
+
Description: "Environmental temperature in degree Celsius. Examples: 23.5, -10.2.",
|
|
489
489
|
Units: "\u00B0C"
|
|
490
490
|
},
|
|
491
491
|
/**
|
package/lwm2m/14202.xml
CHANGED
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
<Mandatory>Optional</Mandatory>
|
|
46
46
|
<Type>Float</Type>
|
|
47
47
|
<RangeEnumeration/>
|
|
48
|
-
<Units
|
|
49
|
-
<Description><![CDATA[Battery temperature in Celsius. Examples: 21.7, 23.123.]]></Description>
|
|
48
|
+
<Units>°C</Units>
|
|
49
|
+
<Description><![CDATA[Battery temperature in degree Celsius. Examples: 21.7, 23.123.]]></Description>
|
|
50
50
|
</Item>
|
|
51
51
|
<Item ID="4">
|
|
52
52
|
<Name>Time to full</Name>
|
package/lwm2m/14205.xml
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<Type>Float</Type>
|
|
17
17
|
<RangeEnumeration/>
|
|
18
18
|
<Units>°C</Units>
|
|
19
|
-
<Description><![CDATA[Environmental temperature in Celsius. Examples: 23.5, -10.2.]]></Description>
|
|
19
|
+
<Description><![CDATA[Environmental temperature in degree Celsius. Examples: 23.5, -10.2.]]></Description>
|
|
20
20
|
</Item>
|
|
21
21
|
<Item ID="1">
|
|
22
22
|
<Name>Humidity</Name>
|
package/lwm2m/definitions.ts
CHANGED
|
@@ -85,9 +85,9 @@ export const definitions: Record<LwM2MObjectID, LWM2MObjectInfo> = { /**
|
|
|
85
85
|
2: { ResourceID: 2, Name: "Charge current", Mandatory: false, Type: ResourceType.Float, Multiple: false, Description: "Charge current in mA. Examples: 429, -244.", Units: "mA" }, /**
|
|
86
86
|
* Battery temperature (Float)
|
|
87
87
|
*
|
|
88
|
-
* Battery temperature in Celsius. Examples: 21.7, 23.123.
|
|
88
|
+
* Battery temperature in degree Celsius. Examples: 21.7, 23.123.
|
|
89
89
|
*/
|
|
90
|
-
3: { ResourceID: 3, Name: "Battery temperature", Mandatory: false, Type: ResourceType.Float, Multiple: false, Description: "Battery temperature in Celsius. Examples: 21.7, 23.123.", Units: "
|
|
90
|
+
3: { ResourceID: 3, Name: "Battery temperature", Mandatory: false, Type: ResourceType.Float, Multiple: false, Description: "Battery temperature in degree Celsius. Examples: 21.7, 23.123.", Units: "\u00B0C" }, /**
|
|
91
91
|
* Time to full (Integer)
|
|
92
92
|
*
|
|
93
93
|
* Time to full in seconds. Examples: 4652.
|
|
@@ -212,9 +212,9 @@ export const definitions: Record<LwM2MObjectID, LWM2MObjectInfo> = { /**
|
|
|
212
212
|
[LwM2MObjectID.Environment_14205]: { ObjectID: LwM2MObjectID.Environment_14205, ObjectVersion: "1.0", Name: "Environment", Description: "Environment information.", Resources: { /**
|
|
213
213
|
* Temperature (Float)
|
|
214
214
|
*
|
|
215
|
-
* Environmental temperature in Celsius. Examples: 23.5, -10.2.
|
|
215
|
+
* Environmental temperature in degree Celsius. Examples: 23.5, -10.2.
|
|
216
216
|
*/
|
|
217
|
-
0: { ResourceID: 0, Name: "Temperature", Mandatory: false, Type: ResourceType.Float, Multiple: false, Description: "Environmental temperature in Celsius. Examples: 23.5, -10.2.", Units: "\u00B0C" }, /**
|
|
217
|
+
0: { ResourceID: 0, Name: "Temperature", Mandatory: false, Type: ResourceType.Float, Multiple: false, Description: "Environmental temperature in degree Celsius. Examples: 23.5, -10.2.", Units: "\u00B0C" }, /**
|
|
218
218
|
* Humidity (Float)
|
|
219
219
|
*
|
|
220
220
|
* Environmental humidity in percent. Examples: 44.2, 72.
|
package/lwm2m/object/14202.d.ts
CHANGED
|
@@ -37,9 +37,9 @@ export type BatteryAndPower_14202 = LwM2MObject<{
|
|
|
37
37
|
*/
|
|
38
38
|
2?: number;
|
|
39
39
|
/**
|
|
40
|
-
* Battery temperature (C)
|
|
40
|
+
* Battery temperature (°C)
|
|
41
41
|
*
|
|
42
|
-
* Battery temperature in Celsius. Examples: 21.7, 23.123.
|
|
42
|
+
* Battery temperature in degree Celsius. Examples: 21.7, 23.123.
|
|
43
43
|
*/
|
|
44
44
|
3?: number;
|
|
45
45
|
/**
|
package/lwm2m/object/14205.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hello.nrfcloud.com/proto-map",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.2.0",
|
|
4
4
|
"description": "Documents the communication protocol between devices, the hello.nrfcloud.com/map backend and web application",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -35,25 +35,25 @@
|
|
|
35
35
|
"prepublishOnly": "./compile.sh"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@bifravst/eslint-config-typescript": "6.1.
|
|
38
|
+
"@bifravst/eslint-config-typescript": "6.1.13",
|
|
39
39
|
"@bifravst/prettier-config": "1.0.4",
|
|
40
40
|
"@commitlint/config-conventional": "19.2.2",
|
|
41
41
|
"@swc/cli": "0.4.0",
|
|
42
|
-
"@swc/core": "1.7.
|
|
43
|
-
"@types/node": "
|
|
42
|
+
"@swc/core": "1.7.3",
|
|
43
|
+
"@types/node": "22.0.0",
|
|
44
44
|
"@types/xml2js": "0.4.14",
|
|
45
45
|
"chalk": "5.3.0",
|
|
46
46
|
"globstar": "1.0.0",
|
|
47
|
-
"husky": "9.1.
|
|
47
|
+
"husky": "9.1.4",
|
|
48
48
|
"lint-staged": "15.2.7",
|
|
49
49
|
"prettier-plugin-organize-imports": "4.0.0",
|
|
50
50
|
"remark": "15.0.1",
|
|
51
51
|
"remark-frontmatter": "5.0.0",
|
|
52
52
|
"tsmatchers": "5.0.2",
|
|
53
|
-
"tsx": "4.16.
|
|
54
|
-
"typescript": "5.5.
|
|
53
|
+
"tsx": "4.16.3",
|
|
54
|
+
"typescript": "5.5.4",
|
|
55
55
|
"xml2js": "0.6.2",
|
|
56
|
-
"yaml": "2.
|
|
56
|
+
"yaml": "2.5.0"
|
|
57
57
|
},
|
|
58
58
|
"lint-staged": {
|
|
59
59
|
"*.{ts,tsx}": [
|