@hello.nrfcloud.com/proto-map 14.0.0 → 14.1.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/DeviceJWT.ts +26 -11
- package/dist/api/DeviceJWT.js +21 -13
- package/package.json +2 -2
package/api/DeviceJWT.ts
CHANGED
|
@@ -3,20 +3,35 @@ import { DeviceId, PublicDeviceId } from './DeviceId.js'
|
|
|
3
3
|
import { Model } from './Devices.js'
|
|
4
4
|
import { Context } from './Context.js'
|
|
5
5
|
|
|
6
|
-
export const
|
|
6
|
+
export const DeviceJWTPayload = Type.Object(
|
|
7
7
|
{
|
|
8
|
-
'@context': Type.Literal(Context.deviceJWT.toString()),
|
|
9
8
|
id: PublicDeviceId,
|
|
10
9
|
deviceId: DeviceId,
|
|
11
10
|
model: Model,
|
|
12
|
-
jwt: Type.String({
|
|
13
|
-
title: 'JWT',
|
|
14
|
-
minLength: 5,
|
|
15
|
-
description: 'The JWT for a publicly shared device.',
|
|
16
|
-
examples: [
|
|
17
|
-
'eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6ImEyMGM0NzZkLTVlZjUtNDE1NS1iODllLTdkZWRiMzJjODVhNCJ9.eyJpZCI6ImQ0OThkNzZhLWQ0ZjktNGQ4YS1iMTYwLTNlODA5NGMzOGNmYSIsImRldmljZUlkIjoidGFsbXVkaWMtb3ZlcnJhdGUtcGVuc2l2ZWQiLCJtb2RlbCI6InRoaW5neTkxeCIsImlhdCI6MTcyMTI4NjA1NywiZXhwIjoxNzIxMjg5NjU3LCJhdWQiOiJoZWxsby5ucmZjbG91ZC5jb20ifQ.Afn2Vj7V4boatn3Dwf4yZCTh09lTpfAEfsaX2uTZv0z2EvcWVH3CeVVsEmvCtDb8mnpvxJcj88-l9PlJqShKzZF5AShz6Ps0Igkzm0PueGjK-nq12I8DTgraT6fdSB3v5ALzLC9ozwyuPN7kJDLMHMHkO3j24sveBvFLg2BLsharSRBN',
|
|
18
|
-
],
|
|
19
|
-
}),
|
|
20
11
|
},
|
|
21
|
-
{
|
|
12
|
+
{
|
|
13
|
+
title: 'DeviceJWTPayload',
|
|
14
|
+
description: 'The payload of the JWT for a publicly shared device.',
|
|
15
|
+
},
|
|
22
16
|
)
|
|
17
|
+
|
|
18
|
+
export const DeviceJWT = Type.Intersect([
|
|
19
|
+
Type.Object(
|
|
20
|
+
{
|
|
21
|
+
'@context': Type.Literal(Context.deviceJWT.toString()),
|
|
22
|
+
jwt: Type.String({
|
|
23
|
+
title: 'JWT',
|
|
24
|
+
minLength: 5,
|
|
25
|
+
description: 'The JWT for a publicly shared device.',
|
|
26
|
+
examples: [
|
|
27
|
+
'eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6ImEyMGM0NzZkLTVlZjUtNDE1NS1iODllLTdkZWRiMzJjODVhNCJ9.eyJpZCI6ImQ0OThkNzZhLWQ0ZjktNGQ4YS1iMTYwLTNlODA5NGMzOGNmYSIsImRldmljZUlkIjoidGFsbXVkaWMtb3ZlcnJhdGUtcGVuc2l2ZWQiLCJtb2RlbCI6InRoaW5neTkxeCIsImlhdCI6MTcyMTI4NjA1NywiZXhwIjoxNzIxMjg5NjU3LCJhdWQiOiJoZWxsby5ucmZjbG91ZC5jb20ifQ.Afn2Vj7V4boatn3Dwf4yZCTh09lTpfAEfsaX2uTZv0z2EvcWVH3CeVVsEmvCtDb8mnpvxJcj88-l9PlJqShKzZF5AShz6Ps0Igkzm0PueGjK-nq12I8DTgraT6fdSB3v5ALzLC9ozwyuPN7kJDLMHMHkO3j24sveBvFLg2BLsharSRBN',
|
|
28
|
+
],
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: 'DeviceJWT',
|
|
33
|
+
description: 'The JWT for a publicly shared device.',
|
|
34
|
+
},
|
|
35
|
+
),
|
|
36
|
+
DeviceJWTPayload,
|
|
37
|
+
])
|
package/dist/api/DeviceJWT.js
CHANGED
|
@@ -2,20 +2,28 @@ import { Type } from '@sinclair/typebox';
|
|
|
2
2
|
import { DeviceId, PublicDeviceId } from './DeviceId.js';
|
|
3
3
|
import { Model } from './Devices.js';
|
|
4
4
|
import { Context } from './Context.js';
|
|
5
|
-
export var
|
|
6
|
-
'@context': Type.Literal(Context.deviceJWT.toString()),
|
|
5
|
+
export var DeviceJWTPayload = Type.Object({
|
|
7
6
|
id: PublicDeviceId,
|
|
8
7
|
deviceId: DeviceId,
|
|
9
|
-
model: Model
|
|
10
|
-
jwt: Type.String({
|
|
11
|
-
title: 'JWT',
|
|
12
|
-
minLength: 5,
|
|
13
|
-
description: 'The JWT for a publicly shared device.',
|
|
14
|
-
examples: [
|
|
15
|
-
'eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6ImEyMGM0NzZkLTVlZjUtNDE1NS1iODllLTdkZWRiMzJjODVhNCJ9.eyJpZCI6ImQ0OThkNzZhLWQ0ZjktNGQ4YS1iMTYwLTNlODA5NGMzOGNmYSIsImRldmljZUlkIjoidGFsbXVkaWMtb3ZlcnJhdGUtcGVuc2l2ZWQiLCJtb2RlbCI6InRoaW5neTkxeCIsImlhdCI6MTcyMTI4NjA1NywiZXhwIjoxNzIxMjg5NjU3LCJhdWQiOiJoZWxsby5ucmZjbG91ZC5jb20ifQ.Afn2Vj7V4boatn3Dwf4yZCTh09lTpfAEfsaX2uTZv0z2EvcWVH3CeVVsEmvCtDb8mnpvxJcj88-l9PlJqShKzZF5AShz6Ps0Igkzm0PueGjK-nq12I8DTgraT6fdSB3v5ALzLC9ozwyuPN7kJDLMHMHkO3j24sveBvFLg2BLsharSRBN'
|
|
16
|
-
]
|
|
17
|
-
})
|
|
8
|
+
model: Model
|
|
18
9
|
}, {
|
|
19
|
-
title: '
|
|
20
|
-
description: 'The JWT for a publicly shared device.'
|
|
10
|
+
title: 'DeviceJWTPayload',
|
|
11
|
+
description: 'The payload of the JWT for a publicly shared device.'
|
|
21
12
|
});
|
|
13
|
+
export var DeviceJWT = Type.Intersect([
|
|
14
|
+
Type.Object({
|
|
15
|
+
'@context': Type.Literal(Context.deviceJWT.toString()),
|
|
16
|
+
jwt: Type.String({
|
|
17
|
+
title: 'JWT',
|
|
18
|
+
minLength: 5,
|
|
19
|
+
description: 'The JWT for a publicly shared device.',
|
|
20
|
+
examples: [
|
|
21
|
+
'eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6ImEyMGM0NzZkLTVlZjUtNDE1NS1iODllLTdkZWRiMzJjODVhNCJ9.eyJpZCI6ImQ0OThkNzZhLWQ0ZjktNGQ4YS1iMTYwLTNlODA5NGMzOGNmYSIsImRldmljZUlkIjoidGFsbXVkaWMtb3ZlcnJhdGUtcGVuc2l2ZWQiLCJtb2RlbCI6InRoaW5neTkxeCIsImlhdCI6MTcyMTI4NjA1NywiZXhwIjoxNzIxMjg5NjU3LCJhdWQiOiJoZWxsby5ucmZjbG91ZC5jb20ifQ.Afn2Vj7V4boatn3Dwf4yZCTh09lTpfAEfsaX2uTZv0z2EvcWVH3CeVVsEmvCtDb8mnpvxJcj88-l9PlJqShKzZF5AShz6Ps0Igkzm0PueGjK-nq12I8DTgraT6fdSB3v5ALzLC9ozwyuPN7kJDLMHMHkO3j24sveBvFLg2BLsharSRBN'
|
|
22
|
+
]
|
|
23
|
+
})
|
|
24
|
+
}, {
|
|
25
|
+
title: 'DeviceJWT',
|
|
26
|
+
description: 'The JWT for a publicly shared device.'
|
|
27
|
+
}),
|
|
28
|
+
DeviceJWTPayload
|
|
29
|
+
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hello.nrfcloud.com/proto-map",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.1.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": {
|
|
@@ -44,7 +44,7 @@
|
|
|
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.1",
|
|
48
48
|
"lint-staged": "15.2.7",
|
|
49
49
|
"prettier-plugin-organize-imports": "4.0.0",
|
|
50
50
|
"remark": "15.0.1",
|