ne-room-digital-signage-contracts 0.1.1
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/README.md +26 -0
- package/asyncapi/admin-ws.yaml +24 -0
- package/asyncapi/device-mqtt.yaml +53 -0
- package/dist/schemas/admin/ws_events.json +35 -0
- package/dist/schemas/device/ack.json +53 -0
- package/dist/schemas/device/command.json +54 -0
- package/dist/schemas/device/manifest.json +32 -0
- package/dist/schemas/device/proof_of_play.json +58 -0
- package/dist/schemas/device/telemetry.json +138 -0
- package/dist/src/index.d.ts +298 -0
- package/dist/src/index.js +39 -0
- package/dist/src/types.d.ts +83 -0
- package/dist/src/types.js +2 -0
- package/openapi/admin-api.yaml +103 -0
- package/package.json +24 -0
- package/schemas/admin/ws_events.json +35 -0
- package/schemas/device/ack.json +53 -0
- package/schemas/device/command.json +54 -0
- package/schemas/device/manifest.json +32 -0
- package/schemas/device/proof_of_play.json +58 -0
- package/schemas/device/telemetry.json +138 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "DeviceManifestPointer",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"tenantId",
|
|
8
|
+
"deviceId",
|
|
9
|
+
"manifestVersion",
|
|
10
|
+
"manifestUrl",
|
|
11
|
+
"generatedAt"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"tenantId": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"deviceId": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"manifestVersion": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"manifestUrl": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"format": "uri"
|
|
26
|
+
},
|
|
27
|
+
"generatedAt": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": "date-time"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "ProofOfPlayEvent",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"tenantId",
|
|
8
|
+
"deviceId",
|
|
9
|
+
"eventId",
|
|
10
|
+
"assetId",
|
|
11
|
+
"startedAt",
|
|
12
|
+
"outcome"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"tenantId": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"deviceId": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"eventId": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 16
|
|
24
|
+
},
|
|
25
|
+
"assetId": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"playlistId": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"scheduleId": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"startedAt": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"format": "date-time"
|
|
37
|
+
},
|
|
38
|
+
"endedAt": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"format": "date-time"
|
|
41
|
+
},
|
|
42
|
+
"durationMs": {
|
|
43
|
+
"type": "integer",
|
|
44
|
+
"minimum": 0
|
|
45
|
+
},
|
|
46
|
+
"outcome": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"PLAYED",
|
|
50
|
+
"SKIPPED",
|
|
51
|
+
"FAILED"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"failureReason": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "DeviceTelemetry",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"tenantId",
|
|
8
|
+
"deviceId",
|
|
9
|
+
"timestamp",
|
|
10
|
+
"online",
|
|
11
|
+
"health"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"tenantId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1
|
|
17
|
+
},
|
|
18
|
+
"deviceId": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1
|
|
21
|
+
},
|
|
22
|
+
"timestamp": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "date-time"
|
|
25
|
+
},
|
|
26
|
+
"online": {
|
|
27
|
+
"type": "boolean"
|
|
28
|
+
},
|
|
29
|
+
"health": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"cpuPct": {
|
|
34
|
+
"type": "number",
|
|
35
|
+
"minimum": 0,
|
|
36
|
+
"maximum": 100
|
|
37
|
+
},
|
|
38
|
+
"memPct": {
|
|
39
|
+
"type": "number",
|
|
40
|
+
"minimum": 0,
|
|
41
|
+
"maximum": 100
|
|
42
|
+
},
|
|
43
|
+
"diskFreeBytes": {
|
|
44
|
+
"type": "integer",
|
|
45
|
+
"minimum": 0
|
|
46
|
+
},
|
|
47
|
+
"diskTotalBytes": {
|
|
48
|
+
"type": "integer",
|
|
49
|
+
"minimum": 0
|
|
50
|
+
},
|
|
51
|
+
"tempC": {
|
|
52
|
+
"type": "number"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"playback": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"properties": {
|
|
60
|
+
"state": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enum": [
|
|
63
|
+
"PLAYING",
|
|
64
|
+
"IDLE",
|
|
65
|
+
"ERROR"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"currentAssetId": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"currentPlaylistId": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
"currentScheduleId": {
|
|
75
|
+
"type": "string"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"network": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"properties": {
|
|
83
|
+
"type": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"enum": [
|
|
86
|
+
"WIFI",
|
|
87
|
+
"ETHERNET",
|
|
88
|
+
"CELLULAR",
|
|
89
|
+
"UNKNOWN"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"rssi": {
|
|
93
|
+
"type": "integer"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"app": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"properties": {
|
|
101
|
+
"version": {
|
|
102
|
+
"type": "string"
|
|
103
|
+
},
|
|
104
|
+
"build": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"errors": {
|
|
110
|
+
"type": "array",
|
|
111
|
+
"items": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"required": [
|
|
115
|
+
"code",
|
|
116
|
+
"message",
|
|
117
|
+
"severity"
|
|
118
|
+
],
|
|
119
|
+
"properties": {
|
|
120
|
+
"code": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"message": {
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
"severity": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"enum": [
|
|
129
|
+
"INFO",
|
|
130
|
+
"WARN",
|
|
131
|
+
"ERROR"
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|