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