@hello.nrfcloud.com/proto-map 14.1.2 → 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/package.json +3 -3
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
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": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@commitlint/config-conventional": "19.2.2",
|
|
41
41
|
"@swc/cli": "0.4.0",
|
|
42
42
|
"@swc/core": "1.7.3",
|
|
43
|
-
"@types/node": "
|
|
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",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"remark": "15.0.1",
|
|
51
51
|
"remark-frontmatter": "5.0.0",
|
|
52
52
|
"tsmatchers": "5.0.2",
|
|
53
|
-
"tsx": "4.16.
|
|
53
|
+
"tsx": "4.16.3",
|
|
54
54
|
"typescript": "5.5.4",
|
|
55
55
|
"xml2js": "0.6.2",
|
|
56
56
|
"yaml": "2.5.0"
|