@nebulahome/integration-sdk 0.0.0-stage → 1.0.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.
@@ -0,0 +1,354 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "$schema": {
6
+ "type": "string",
7
+ "description": "The JSON Schema an editor checks the file with."
8
+ },
9
+ "listen": {
10
+ "minItems": 1,
11
+ "maxItems": 4,
12
+ "type": "array",
13
+ "items": {
14
+ "anyOf": [
15
+ {
16
+ "type": "object",
17
+ "properties": {
18
+ "mdns": {
19
+ "type": "string",
20
+ "pattern": "^_[a-z0-9][a-z0-9-]{0,62}\\._(?:tcp|udp)$"
21
+ }
22
+ },
23
+ "required": [
24
+ "mdns"
25
+ ],
26
+ "additionalProperties": false
27
+ },
28
+ {
29
+ "type": "object",
30
+ "properties": {
31
+ "module": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "maxLength": 256
35
+ },
36
+ "lan": {
37
+ "default": true,
38
+ "type": "boolean"
39
+ }
40
+ },
41
+ "required": [
42
+ "module"
43
+ ],
44
+ "additionalProperties": false
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ "match": {
50
+ "default": [],
51
+ "maxItems": 16,
52
+ "type": "array",
53
+ "items": {
54
+ "anyOf": [
55
+ {
56
+ "type": "object",
57
+ "properties": {
58
+ "path": {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "maxLength": 256,
62
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
63
+ },
64
+ "equals": {
65
+ "type": [
66
+ "string",
67
+ "number",
68
+ "boolean"
69
+ ]
70
+ }
71
+ },
72
+ "required": [
73
+ "path",
74
+ "equals"
75
+ ],
76
+ "additionalProperties": false
77
+ },
78
+ {
79
+ "type": "object",
80
+ "properties": {
81
+ "path": {
82
+ "type": "string",
83
+ "minLength": 1,
84
+ "maxLength": 256,
85
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
86
+ },
87
+ "exists": {
88
+ "type": "boolean",
89
+ "const": true
90
+ }
91
+ },
92
+ "required": [
93
+ "path",
94
+ "exists"
95
+ ],
96
+ "additionalProperties": false
97
+ },
98
+ {
99
+ "type": "object",
100
+ "properties": {
101
+ "path": {
102
+ "type": "string",
103
+ "minLength": 1,
104
+ "maxLength": 256,
105
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
106
+ },
107
+ "oneOf": {
108
+ "minItems": 1,
109
+ "maxItems": 64,
110
+ "type": "array",
111
+ "items": {
112
+ "type": [
113
+ "string",
114
+ "number",
115
+ "boolean"
116
+ ]
117
+ }
118
+ }
119
+ },
120
+ "required": [
121
+ "path",
122
+ "oneOf"
123
+ ],
124
+ "additionalProperties": false
125
+ },
126
+ {
127
+ "type": "object",
128
+ "properties": {
129
+ "path": {
130
+ "type": "string",
131
+ "minLength": 1,
132
+ "maxLength": 256,
133
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
134
+ },
135
+ "startsWith": {
136
+ "type": "string",
137
+ "minLength": 1,
138
+ "maxLength": 64
139
+ }
140
+ },
141
+ "required": [
142
+ "path",
143
+ "startsWith"
144
+ ],
145
+ "additionalProperties": false
146
+ }
147
+ ]
148
+ }
149
+ },
150
+ "probe": {
151
+ "type": "object",
152
+ "properties": {
153
+ "transport": {
154
+ "type": "string",
155
+ "pattern": "^(?:[a-z][a-z0-9-]{1,63}\\/)?[a-z][a-z0-9-]{1,31}$"
156
+ },
157
+ "op": {
158
+ "type": "string",
159
+ "minLength": 1,
160
+ "maxLength": 32
161
+ },
162
+ "args": {
163
+ "default": {},
164
+ "type": "object",
165
+ "propertyNames": {
166
+ "type": "string"
167
+ },
168
+ "additionalProperties": {
169
+ "$ref": "#/$defs/__schema0"
170
+ }
171
+ },
172
+ "timeoutMs": {
173
+ "type": "integer",
174
+ "minimum": 500,
175
+ "maximum": 30000
176
+ }
177
+ },
178
+ "required": [
179
+ "transport",
180
+ "op"
181
+ ],
182
+ "additionalProperties": false
183
+ },
184
+ "identity": {
185
+ "type": "object",
186
+ "properties": {
187
+ "model": {
188
+ "anyOf": [
189
+ {
190
+ "type": "string",
191
+ "minLength": 1,
192
+ "maxLength": 256,
193
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
194
+ },
195
+ {
196
+ "minItems": 1,
197
+ "maxItems": 4,
198
+ "type": "array",
199
+ "items": {
200
+ "type": "string",
201
+ "minLength": 1,
202
+ "maxLength": 256,
203
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
204
+ }
205
+ }
206
+ ]
207
+ },
208
+ "externalId": {
209
+ "anyOf": [
210
+ {
211
+ "type": "string",
212
+ "minLength": 1,
213
+ "maxLength": 256,
214
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
215
+ },
216
+ {
217
+ "minItems": 1,
218
+ "maxItems": 4,
219
+ "type": "array",
220
+ "items": {
221
+ "type": "string",
222
+ "minLength": 1,
223
+ "maxLength": 256,
224
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
225
+ }
226
+ }
227
+ ]
228
+ },
229
+ "name": {
230
+ "anyOf": [
231
+ {
232
+ "type": "string",
233
+ "minLength": 1,
234
+ "maxLength": 256,
235
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
236
+ },
237
+ {
238
+ "minItems": 1,
239
+ "maxItems": 4,
240
+ "type": "array",
241
+ "items": {
242
+ "type": "string",
243
+ "minLength": 1,
244
+ "maxLength": 256,
245
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
246
+ }
247
+ }
248
+ ]
249
+ },
250
+ "swVersion": {
251
+ "anyOf": [
252
+ {
253
+ "type": "string",
254
+ "minLength": 1,
255
+ "maxLength": 256,
256
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
257
+ },
258
+ {
259
+ "minItems": 1,
260
+ "maxItems": 4,
261
+ "type": "array",
262
+ "items": {
263
+ "type": "string",
264
+ "minLength": 1,
265
+ "maxLength": 256,
266
+ "pattern": "^(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')(?:\\.(?:[A-Za-z_][A-Za-z0-9_]*|'[^']+')|\\[[0-9]+\\])*$"
267
+ }
268
+ }
269
+ ]
270
+ }
271
+ },
272
+ "additionalProperties": false
273
+ },
274
+ "adopt": {
275
+ "default": "owner",
276
+ "type": "string",
277
+ "enum": [
278
+ "owner",
279
+ "automatic"
280
+ ]
281
+ },
282
+ "pairing": {
283
+ "type": "object",
284
+ "properties": {
285
+ "driver": {
286
+ "type": "string",
287
+ "minLength": 1,
288
+ "maxLength": 64
289
+ },
290
+ "open": {
291
+ "type": "string",
292
+ "minLength": 1,
293
+ "maxLength": 64
294
+ },
295
+ "close": {
296
+ "type": "string",
297
+ "minLength": 1,
298
+ "maxLength": 64
299
+ },
300
+ "state": {
301
+ "type": "string",
302
+ "minLength": 1,
303
+ "maxLength": 64
304
+ }
305
+ },
306
+ "required": [
307
+ "driver",
308
+ "open",
309
+ "close",
310
+ "state"
311
+ ],
312
+ "additionalProperties": false
313
+ }
314
+ },
315
+ "required": [
316
+ "listen",
317
+ "identity"
318
+ ],
319
+ "additionalProperties": false,
320
+ "$defs": {
321
+ "__schema0": {
322
+ "anyOf": [
323
+ {
324
+ "type": "string"
325
+ },
326
+ {
327
+ "type": "number"
328
+ },
329
+ {
330
+ "type": "boolean"
331
+ },
332
+ {
333
+ "type": "null"
334
+ },
335
+ {
336
+ "type": "array",
337
+ "items": {
338
+ "$ref": "#/$defs/__schema0"
339
+ }
340
+ },
341
+ {
342
+ "type": "object",
343
+ "propertyNames": {
344
+ "type": "string"
345
+ },
346
+ "additionalProperties": {
347
+ "$ref": "#/$defs/__schema0"
348
+ }
349
+ }
350
+ ]
351
+ }
352
+ },
353
+ "title": "NebulaHome integration: discovery.json"
354
+ }
@@ -0,0 +1,118 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "$schema": {
6
+ "type": "string",
7
+ "description": "The JSON Schema an editor checks the file with."
8
+ },
9
+ "id": {
10
+ "type": "string",
11
+ "pattern": "^[a-z0-9][a-z0-9-]{1,63}$"
12
+ },
13
+ "name": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "maxLength": 128
17
+ },
18
+ "transport": {
19
+ "type": "string",
20
+ "pattern": "^(?:[a-z][a-z0-9-]{1,63}\\/)?[a-z][a-z0-9-]{1,31}$"
21
+ },
22
+ "models": {
23
+ "default": [],
24
+ "maxItems": 64,
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "maxLength": 64
30
+ }
31
+ },
32
+ "modelCodes": {
33
+ "type": "object",
34
+ "propertyNames": {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "maxLength": 64
38
+ },
39
+ "additionalProperties": {
40
+ "anyOf": [
41
+ {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "maxLength": 64
45
+ },
46
+ {
47
+ "minItems": 1,
48
+ "maxItems": 64,
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "maxLength": 64
54
+ }
55
+ }
56
+ ]
57
+ }
58
+ },
59
+ "modelSeries": {
60
+ "type": "object",
61
+ "propertyNames": {
62
+ "type": "string",
63
+ "minLength": 1,
64
+ "maxLength": 64
65
+ },
66
+ "additionalProperties": {
67
+ "type": "string",
68
+ "minLength": 1,
69
+ "maxLength": 64
70
+ }
71
+ },
72
+ "kind": {
73
+ "type": "string",
74
+ "enum": [
75
+ "declarative",
76
+ "code"
77
+ ]
78
+ },
79
+ "defaultIcon": {
80
+ "type": "string",
81
+ "pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
82
+ },
83
+ "webPagePort": {
84
+ "type": "integer",
85
+ "minimum": 1,
86
+ "maximum": 65535
87
+ },
88
+ "webPagePath": {
89
+ "type": "string",
90
+ "maxLength": 256,
91
+ "pattern": "^\\/[^\\s]*$"
92
+ },
93
+ "profile": {
94
+ "type": "string",
95
+ "minLength": 1,
96
+ "maxLength": 256
97
+ },
98
+ "entry": {
99
+ "type": "string",
100
+ "minLength": 1,
101
+ "maxLength": 256
102
+ },
103
+ "setup": {
104
+ "type": "string",
105
+ "minLength": 1,
106
+ "maxLength": 256
107
+ }
108
+ },
109
+ "required": [
110
+ "id",
111
+ "name",
112
+ "transport",
113
+ "kind",
114
+ "setup"
115
+ ],
116
+ "additionalProperties": false,
117
+ "title": "NebulaHome integration: driver.json"
118
+ }