@nebulahome/integration-sdk 0.0.0-stage → 1.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.
@@ -0,0 +1,119 @@
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
+ "matter"
78
+ ]
79
+ },
80
+ "defaultIcon": {
81
+ "type": "string",
82
+ "pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
83
+ },
84
+ "webPagePort": {
85
+ "type": "integer",
86
+ "minimum": 1,
87
+ "maximum": 65535
88
+ },
89
+ "webPagePath": {
90
+ "type": "string",
91
+ "maxLength": 256,
92
+ "pattern": "^\\/[^\\s]*$"
93
+ },
94
+ "profile": {
95
+ "type": "string",
96
+ "minLength": 1,
97
+ "maxLength": 256
98
+ },
99
+ "entry": {
100
+ "type": "string",
101
+ "minLength": 1,
102
+ "maxLength": 256
103
+ },
104
+ "setup": {
105
+ "type": "string",
106
+ "minLength": 1,
107
+ "maxLength": 256
108
+ }
109
+ },
110
+ "required": [
111
+ "id",
112
+ "name",
113
+ "transport",
114
+ "kind",
115
+ "setup"
116
+ ],
117
+ "additionalProperties": false,
118
+ "title": "NebulaHome integration: driver.json"
119
+ }
@@ -0,0 +1,557 @@
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-z][a-z0-9-]{1,63}$"
12
+ },
13
+ "name": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "maxLength": 128
17
+ },
18
+ "description": {
19
+ "type": "string",
20
+ "maxLength": 512
21
+ },
22
+ "url": {
23
+ "type": "string",
24
+ "format": "uri"
25
+ },
26
+ "color": {
27
+ "type": "string",
28
+ "pattern": "^#[0-9a-fA-F]{6}$"
29
+ },
30
+ "logo": {
31
+ "anyOf": [
32
+ {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "maxLength": 256
36
+ },
37
+ {
38
+ "type": "object",
39
+ "properties": {
40
+ "path": {
41
+ "type": "string",
42
+ "minLength": 1,
43
+ "maxLength": 256
44
+ },
45
+ "padding": {
46
+ "default": 0,
47
+ "type": "integer",
48
+ "minimum": 0,
49
+ "maximum": 16
50
+ }
51
+ },
52
+ "required": [
53
+ "path"
54
+ ],
55
+ "additionalProperties": false
56
+ }
57
+ ]
58
+ },
59
+ "internetRequired": {
60
+ "default": false,
61
+ "type": "boolean"
62
+ },
63
+ "setup": {
64
+ "type": "string",
65
+ "minLength": 1,
66
+ "maxLength": 256
67
+ },
68
+ "account": {
69
+ "type": "string",
70
+ "minLength": 1,
71
+ "maxLength": 256
72
+ },
73
+ "transports": {
74
+ "default": {},
75
+ "type": "object",
76
+ "propertyNames": {
77
+ "type": "string",
78
+ "pattern": "^[a-z][a-z0-9-]{1,31}$"
79
+ },
80
+ "additionalProperties": {
81
+ "anyOf": [
82
+ {
83
+ "type": "string",
84
+ "minLength": 1,
85
+ "maxLength": 256
86
+ },
87
+ {
88
+ "type": "object",
89
+ "properties": {
90
+ "module": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "maxLength": 256
94
+ },
95
+ "wires": {
96
+ "minItems": 1,
97
+ "maxItems": 7,
98
+ "type": "array",
99
+ "items": {
100
+ "type": "string",
101
+ "enum": [
102
+ "http",
103
+ "mqtt",
104
+ "ble",
105
+ "zigbee",
106
+ "udp",
107
+ "modbus",
108
+ "matter"
109
+ ]
110
+ }
111
+ }
112
+ },
113
+ "required": [
114
+ "module",
115
+ "wires"
116
+ ],
117
+ "additionalProperties": false
118
+ }
119
+ ]
120
+ }
121
+ },
122
+ "streams": {
123
+ "default": {},
124
+ "type": "object",
125
+ "propertyNames": {
126
+ "type": "string",
127
+ "pattern": "^[a-z][a-z0-9-]{1,31}$"
128
+ },
129
+ "additionalProperties": {
130
+ "type": "string",
131
+ "minLength": 1,
132
+ "maxLength": 256
133
+ }
134
+ },
135
+ "containers": {
136
+ "default": [],
137
+ "maxItems": 4,
138
+ "type": "array",
139
+ "items": {
140
+ "type": "object",
141
+ "properties": {
142
+ "id": {
143
+ "type": "string",
144
+ "pattern": "^(?!(?:installed|compose|packages)$)[a-z][a-z0-9-]{1,31}$"
145
+ },
146
+ "name": {
147
+ "type": "string",
148
+ "minLength": 1,
149
+ "maxLength": 128
150
+ },
151
+ "image": {
152
+ "type": "string",
153
+ "pattern": "^[a-z0-9][a-z0-9._/:-]{0,254}$"
154
+ },
155
+ "minVersion": {
156
+ "type": "string",
157
+ "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-[\\da-z-]+(?:\\.[\\da-z-]+)*)?(?:\\+[\\da-z-]+(?:\\.[\\da-z-]+)*)?$"
158
+ },
159
+ "volumes": {
160
+ "default": [],
161
+ "maxItems": 8,
162
+ "type": "array",
163
+ "items": {
164
+ "type": "object",
165
+ "properties": {
166
+ "name": {
167
+ "type": "string",
168
+ "pattern": "^[a-z][a-z0-9-]{0,31}$"
169
+ },
170
+ "path": {
171
+ "type": "string",
172
+ "pattern": "^\\/[^\\s]*$"
173
+ },
174
+ "cache": {
175
+ "default": false,
176
+ "type": "boolean"
177
+ }
178
+ },
179
+ "required": [
180
+ "name",
181
+ "path"
182
+ ],
183
+ "additionalProperties": false
184
+ }
185
+ },
186
+ "env": {
187
+ "default": [],
188
+ "maxItems": 64,
189
+ "type": "array",
190
+ "items": {
191
+ "type": "object",
192
+ "properties": {
193
+ "name": {
194
+ "type": "string",
195
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,127}$"
196
+ },
197
+ "value": {
198
+ "type": "string",
199
+ "maxLength": 4096
200
+ },
201
+ "when": {
202
+ "type": "object",
203
+ "properties": {
204
+ "key": {
205
+ "type": "string",
206
+ "minLength": 1,
207
+ "maxLength": 64
208
+ },
209
+ "equals": {
210
+ "minItems": 1,
211
+ "maxItems": 16,
212
+ "type": "array",
213
+ "items": {
214
+ "type": [
215
+ "string",
216
+ "boolean"
217
+ ]
218
+ }
219
+ }
220
+ },
221
+ "required": [
222
+ "key",
223
+ "equals"
224
+ ],
225
+ "additionalProperties": false
226
+ }
227
+ },
228
+ "required": [
229
+ "name",
230
+ "value"
231
+ ],
232
+ "additionalProperties": false
233
+ }
234
+ },
235
+ "devices": {
236
+ "default": [],
237
+ "maxItems": 8,
238
+ "type": "array",
239
+ "items": {
240
+ "type": "object",
241
+ "properties": {
242
+ "host": {
243
+ "type": "string",
244
+ "minLength": 1,
245
+ "maxLength": 256
246
+ },
247
+ "container": {
248
+ "type": "string",
249
+ "pattern": "^\\/dev\\/[A-Za-z0-9._/:+-]+$"
250
+ },
251
+ "when": {
252
+ "type": "object",
253
+ "properties": {
254
+ "key": {
255
+ "type": "string",
256
+ "minLength": 1,
257
+ "maxLength": 64
258
+ },
259
+ "equals": {
260
+ "minItems": 1,
261
+ "maxItems": 16,
262
+ "type": "array",
263
+ "items": {
264
+ "type": [
265
+ "string",
266
+ "boolean"
267
+ ]
268
+ }
269
+ }
270
+ },
271
+ "required": [
272
+ "key",
273
+ "equals"
274
+ ],
275
+ "additionalProperties": false
276
+ }
277
+ },
278
+ "required": [
279
+ "host",
280
+ "container"
281
+ ],
282
+ "additionalProperties": false
283
+ }
284
+ },
285
+ "ports": {
286
+ "default": [],
287
+ "maxItems": 8,
288
+ "type": "array",
289
+ "items": {
290
+ "type": "object",
291
+ "properties": {
292
+ "container": {
293
+ "anyOf": [
294
+ {
295
+ "type": "integer",
296
+ "minimum": 1,
297
+ "maximum": 65535
298
+ },
299
+ {
300
+ "type": "string",
301
+ "pattern": "^\\{setup\\.([a-zA-Z][a-zA-Z0-9]*)\\}$"
302
+ }
303
+ ]
304
+ },
305
+ "host": {
306
+ "anyOf": [
307
+ {
308
+ "type": "integer",
309
+ "minimum": 1,
310
+ "maximum": 65535
311
+ },
312
+ {
313
+ "type": "string",
314
+ "pattern": "^\\{setup\\.([a-zA-Z][a-zA-Z0-9]*)\\}$"
315
+ }
316
+ ]
317
+ },
318
+ "protocol": {
319
+ "default": "tcp",
320
+ "type": "string",
321
+ "enum": [
322
+ "tcp",
323
+ "udp"
324
+ ]
325
+ },
326
+ "when": {
327
+ "type": "object",
328
+ "properties": {
329
+ "key": {
330
+ "type": "string",
331
+ "minLength": 1,
332
+ "maxLength": 64
333
+ },
334
+ "equals": {
335
+ "minItems": 1,
336
+ "maxItems": 16,
337
+ "type": "array",
338
+ "items": {
339
+ "type": [
340
+ "string",
341
+ "boolean"
342
+ ]
343
+ }
344
+ }
345
+ },
346
+ "required": [
347
+ "key",
348
+ "equals"
349
+ ],
350
+ "additionalProperties": false
351
+ }
352
+ },
353
+ "required": [
354
+ "container",
355
+ "host"
356
+ ],
357
+ "additionalProperties": false
358
+ }
359
+ },
360
+ "seed": {
361
+ "default": [],
362
+ "maxItems": 8,
363
+ "type": "array",
364
+ "items": {
365
+ "type": "object",
366
+ "properties": {
367
+ "volume": {
368
+ "type": "string",
369
+ "minLength": 1,
370
+ "maxLength": 32
371
+ },
372
+ "path": {
373
+ "type": "string",
374
+ "pattern": "^[a-zA-Z0-9._-][a-zA-Z0-9._/-]{0,254}$"
375
+ },
376
+ "content": {
377
+ "type": "string",
378
+ "maxLength": 65536
379
+ }
380
+ },
381
+ "required": [
382
+ "volume",
383
+ "path",
384
+ "content"
385
+ ],
386
+ "additionalProperties": false
387
+ }
388
+ },
389
+ "mqttTopics": {
390
+ "minItems": 1,
391
+ "maxItems": 16,
392
+ "type": "array",
393
+ "items": {
394
+ "type": "string",
395
+ "minLength": 1,
396
+ "maxLength": 256,
397
+ "pattern": "^[^$]"
398
+ }
399
+ },
400
+ "webPort": {
401
+ "anyOf": [
402
+ {
403
+ "type": "integer",
404
+ "minimum": 1,
405
+ "maximum": 65535
406
+ },
407
+ {
408
+ "type": "string",
409
+ "pattern": "^\\{setup\\.([a-zA-Z][a-zA-Z0-9]*)\\}$"
410
+ }
411
+ ]
412
+ },
413
+ "webPortWhen": {
414
+ "type": "object",
415
+ "properties": {
416
+ "key": {
417
+ "type": "string",
418
+ "minLength": 1,
419
+ "maxLength": 64
420
+ },
421
+ "equals": {
422
+ "minItems": 1,
423
+ "maxItems": 16,
424
+ "type": "array",
425
+ "items": {
426
+ "type": [
427
+ "string",
428
+ "boolean"
429
+ ]
430
+ }
431
+ }
432
+ },
433
+ "required": [
434
+ "key",
435
+ "equals"
436
+ ],
437
+ "additionalProperties": false
438
+ },
439
+ "command": {
440
+ "minItems": 1,
441
+ "maxItems": 64,
442
+ "type": "array",
443
+ "items": {
444
+ "type": "string",
445
+ "maxLength": 4096
446
+ }
447
+ },
448
+ "healthcheck": {
449
+ "type": "object",
450
+ "properties": {
451
+ "test": {
452
+ "minItems": 2,
453
+ "maxItems": 64,
454
+ "type": "array",
455
+ "items": {
456
+ "type": "string",
457
+ "minLength": 1,
458
+ "maxLength": 4096
459
+ }
460
+ },
461
+ "intervalMs": {
462
+ "type": "integer",
463
+ "minimum": 1000,
464
+ "maximum": 3600000
465
+ },
466
+ "timeoutMs": {
467
+ "type": "integer",
468
+ "minimum": 1000,
469
+ "maximum": 600000
470
+ },
471
+ "retries": {
472
+ "type": "integer",
473
+ "minimum": 1,
474
+ "maximum": 100
475
+ },
476
+ "startPeriodMs": {
477
+ "type": "integer",
478
+ "minimum": 0,
479
+ "maximum": 3600000
480
+ }
481
+ },
482
+ "required": [
483
+ "test"
484
+ ],
485
+ "additionalProperties": false
486
+ },
487
+ "dependsOn": {
488
+ "type": "object",
489
+ "propertyNames": {
490
+ "type": "string",
491
+ "pattern": "^(?!(?:installed|compose|packages)$)[a-z][a-z0-9-]{1,31}$"
492
+ },
493
+ "additionalProperties": {
494
+ "type": "string",
495
+ "enum": [
496
+ "started",
497
+ "healthy"
498
+ ]
499
+ }
500
+ }
501
+ },
502
+ "required": [
503
+ "id",
504
+ "name",
505
+ "image",
506
+ "minVersion"
507
+ ],
508
+ "additionalProperties": false
509
+ }
510
+ },
511
+ "requires": {
512
+ "default": {
513
+ "packages": {},
514
+ "services": []
515
+ },
516
+ "type": "object",
517
+ "properties": {
518
+ "platform": {
519
+ "type": "string",
520
+ "minLength": 1,
521
+ "maxLength": 64,
522
+ "pattern": "^\\s*(?:(?:0|[1-9]\\d*|[xX*])(?:\\.(?:0|[1-9]\\d*|[xX*])){0,2}(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?\\s+-\\s+(?:0|[1-9]\\d*|[xX*])(?:\\.(?:0|[1-9]\\d*|[xX*])){0,2}(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?|(?:(?:\\^|~|>=|<=|>|<|=)?\\s*(?:0|[1-9]\\d*|[xX*])(?:\\.(?:0|[1-9]\\d*|[xX*])){0,2}(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?)(?:\\s+(?:(?:\\^|~|>=|<=|>|<|=)?\\s*(?:0|[1-9]\\d*|[xX*])(?:\\.(?:0|[1-9]\\d*|[xX*])){0,2}(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?))*)(?:\\s*\\|\\|\\s*(?:(?:0|[1-9]\\d*|[xX*])(?:\\.(?:0|[1-9]\\d*|[xX*])){0,2}(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?\\s+-\\s+(?:0|[1-9]\\d*|[xX*])(?:\\.(?:0|[1-9]\\d*|[xX*])){0,2}(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?|(?:(?:\\^|~|>=|<=|>|<|=)?\\s*(?:0|[1-9]\\d*|[xX*])(?:\\.(?:0|[1-9]\\d*|[xX*])){0,2}(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?)(?:\\s+(?:(?:\\^|~|>=|<=|>|<|=)?\\s*(?:0|[1-9]\\d*|[xX*])(?:\\.(?:0|[1-9]\\d*|[xX*])){0,2}(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?))*))*\\s*$"
523
+ },
524
+ "packages": {
525
+ "default": {},
526
+ "type": "object",
527
+ "propertyNames": {
528
+ "type": "string",
529
+ "pattern": "^[a-z0-9][a-z0-9-]{1,63}$"
530
+ },
531
+ "additionalProperties": {
532
+ "type": "string",
533
+ "minLength":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+ "items": {
543
+ "type": "string",
544
+ "pattern": "^[a-z][a-z0-9-]{1,63}$"
545
+ }
546
+ }
547
+ },
548
+ "additionalProperties": false
549
+ }
550
+ },
551
+ "required": [
552
+ "id",
553
+ "name"
554
+ ],
555
+ "additionalProperties": false,
556
+ "title": "NebulaHome integration: manifest.json"
557
+ }