losant_rest 1.8.9 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +5 -5
  2. data/docs/_schemas.md +26390 -4889
  3. data/docs/device.md +1 -1
  4. data/docs/devices.md +44 -4
  5. data/lib/losant_rest/client.rb +2 -2
  6. data/lib/losant_rest/device.rb +1 -1
  7. data/lib/losant_rest/devices.rb +52 -4
  8. data/lib/losant_rest/version.rb +1 -1
  9. data/schemas/application.json +25 -0
  10. data/schemas/applicationApiTokenPost.json +1 -0
  11. data/schemas/applicationPatch.json +25 -0
  12. data/schemas/applicationPost.json +25 -0
  13. data/schemas/applications.json +25 -0
  14. data/schemas/authedDevice.json +2 -1
  15. data/schemas/dashboard.json +34 -11
  16. data/schemas/dashboardPatch.json +34 -11
  17. data/schemas/dashboardPost.json +34 -11
  18. data/schemas/dashboards.json +34 -11
  19. data/schemas/device.json +110 -1
  20. data/schemas/deviceClassFilter.json +31 -0
  21. data/schemas/devicePatch.json +110 -1
  22. data/schemas/devicePost.json +110 -1
  23. data/schemas/deviceRecipe.json +110 -1
  24. data/schemas/deviceRecipePatch.json +110 -1
  25. data/schemas/deviceRecipePost.json +110 -1
  26. data/schemas/deviceRecipes.json +110 -1
  27. data/schemas/devices.json +123 -2
  28. data/schemas/devicesPatch.json +209 -0
  29. data/schemas/flow.json +1491 -54
  30. data/schemas/flowPatch.json +1491 -54
  31. data/schemas/flowPost.json +1491 -54
  32. data/schemas/flowVersion.json +3319 -445
  33. data/schemas/flowVersionPost.json +1491 -54
  34. data/schemas/flowVersions.json +3319 -445
  35. data/schemas/flows.json +1491 -54
  36. data/schemas/flowsImportPost.json +3313 -439
  37. data/schemas/flowsImportResult.json +5129 -818
  38. data/schemas/githubLogin.json +1 -0
  39. data/schemas/userCredentials.json +1 -0
  40. data/schemas/userPost.json +1 -0
  41. metadata +5 -3
@@ -17,68 +17,1505 @@
17
17
  "triggers": {
18
18
  "type": "array",
19
19
  "items": {
20
- "type": "object",
21
- "properties": {
22
- "key": {
23
- "type": "string",
24
- "maxLength": 1024
20
+ "oneOf": [
21
+ {
22
+ "type": "object",
23
+ "properties": {
24
+ "key": {
25
+ "type": "string",
26
+ "maxLength": 1024
27
+ },
28
+ "type": {
29
+ "type": "string",
30
+ "enum": [
31
+ "customNodeStart",
32
+ "deviceCommand",
33
+ "deviceIdConnect",
34
+ "deviceTagConnect",
35
+ "deviceIdDisconnect",
36
+ "deviceTagDisconnect",
37
+ "integration",
38
+ "mqttTopic",
39
+ "notebook",
40
+ "onBoot",
41
+ "onConnect",
42
+ "onDisconnect",
43
+ "request",
44
+ "udp",
45
+ "webhook"
46
+ ]
47
+ },
48
+ "config": {
49
+ "type": "object",
50
+ "additionalProperties": false
51
+ },
52
+ "meta": {
53
+ "type": "object",
54
+ "properties": {
55
+ "category": {
56
+ "type": "string",
57
+ "enum": [
58
+ "trigger"
59
+ ]
60
+ },
61
+ "name": {
62
+ "type": "string",
63
+ "enum": [
64
+ "customNodeStart",
65
+ "deviceCommand",
66
+ "deviceIdsTagsConnect",
67
+ "deviceIdsTagsDisconnect",
68
+ "googlePubSub",
69
+ "meridian",
70
+ "mqtt",
71
+ "notebook",
72
+ "onBoot",
73
+ "onConnect",
74
+ "onDisconnect",
75
+ "particle",
76
+ "request",
77
+ "udp",
78
+ "webhook"
79
+ ]
80
+ },
81
+ "label": {
82
+ "type": "string",
83
+ "minLength": 1,
84
+ "maxLength": 255
85
+ },
86
+ "x": {
87
+ "type": "number"
88
+ },
89
+ "y": {
90
+ "type": "number"
91
+ },
92
+ "uiId": {
93
+ "type": "string",
94
+ "maxLength": 48
95
+ },
96
+ "description": {
97
+ "type": "string",
98
+ "maxLength": 32767
99
+ },
100
+ "icon": {
101
+ "type": "string",
102
+ "maxLength": 1024
103
+ },
104
+ "color": {
105
+ "type": "string",
106
+ "maxLength": 1024
107
+ },
108
+ "inputCount": {
109
+ "type": "number"
110
+ },
111
+ "outputCount": {
112
+ "type": "number"
113
+ },
114
+ "triggerId": {
115
+ "type": "string",
116
+ "maxLength": 48
117
+ },
118
+ "id": {
119
+ "type": "string",
120
+ "maxLength": 48
121
+ }
122
+ },
123
+ "additionalProperties": false
124
+ },
125
+ "outputIds": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "array",
129
+ "items": {
130
+ "type": "string",
131
+ "maxLength": 255
132
+ },
133
+ "maxItems": 100
134
+ },
135
+ "maxItems": 100
136
+ }
137
+ },
138
+ "required": [
139
+ "type"
140
+ ],
141
+ "additionalProperties": false
142
+ },
143
+ {
144
+ "type": "object",
145
+ "properties": {
146
+ "key": {
147
+ "type": "string",
148
+ "maxLength": 1024
149
+ },
150
+ "type": {
151
+ "type": "string",
152
+ "enum": [
153
+ "dataTable"
154
+ ]
155
+ },
156
+ "config": {
157
+ "type": "object",
158
+ "properties": {
159
+ "bulkInsert": {
160
+ "type": "boolean"
161
+ },
162
+ "delete": {
163
+ "type": "boolean"
164
+ },
165
+ "insert": {
166
+ "type": "boolean"
167
+ },
168
+ "update": {
169
+ "type": "boolean"
170
+ }
171
+ },
172
+ "additionalProperties": false
173
+ },
174
+ "meta": {
175
+ "type": "object",
176
+ "properties": {
177
+ "category": {
178
+ "type": "string",
179
+ "enum": [
180
+ "trigger"
181
+ ]
182
+ },
183
+ "name": {
184
+ "type": "string",
185
+ "enum": [
186
+ "dataTable"
187
+ ]
188
+ },
189
+ "label": {
190
+ "type": "string",
191
+ "minLength": 1,
192
+ "maxLength": 255
193
+ },
194
+ "x": {
195
+ "type": "number"
196
+ },
197
+ "y": {
198
+ "type": "number"
199
+ },
200
+ "uiId": {
201
+ "type": "string",
202
+ "maxLength": 48
203
+ },
204
+ "description": {
205
+ "type": "string",
206
+ "maxLength": 32767
207
+ },
208
+ "icon": {
209
+ "type": "string",
210
+ "maxLength": 1024
211
+ },
212
+ "color": {
213
+ "type": "string",
214
+ "maxLength": 1024
215
+ },
216
+ "inputCount": {
217
+ "type": "number"
218
+ },
219
+ "outputCount": {
220
+ "type": "number"
221
+ },
222
+ "id": {
223
+ "type": "string",
224
+ "maxLength": 48
225
+ }
226
+ },
227
+ "additionalProperties": false
228
+ },
229
+ "outputIds": {
230
+ "type": "array",
231
+ "items": {
232
+ "type": "array",
233
+ "items": {
234
+ "type": "string",
235
+ "maxLength": 255
236
+ },
237
+ "maxItems": 100
238
+ },
239
+ "maxItems": 100
240
+ }
241
+ },
242
+ "required": [
243
+ "type"
244
+ ],
245
+ "additionalProperties": false
246
+ },
247
+ {
248
+ "type": "object",
249
+ "properties": {
250
+ "key": {
251
+ "type": "string",
252
+ "maxLength": 1024
253
+ },
254
+ "type": {
255
+ "type": "string",
256
+ "enum": [
257
+ "deviceId",
258
+ "deviceTag"
259
+ ]
260
+ },
261
+ "config": {
262
+ "type": "object",
263
+ "properties": {
264
+ "attributeBlacklist": {
265
+ "type": "array",
266
+ "maxItems": 100,
267
+ "items": {
268
+ "type": "string",
269
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
270
+ }
271
+ },
272
+ "attributeWhitelist": {
273
+ "type": "array",
274
+ "maxItems": 100,
275
+ "items": {
276
+ "type": "string",
277
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
278
+ }
279
+ },
280
+ "maxAge": {
281
+ "type": "number"
282
+ }
283
+ },
284
+ "additionalProperties": false
285
+ },
286
+ "meta": {
287
+ "type": "object",
288
+ "properties": {
289
+ "category": {
290
+ "type": "string",
291
+ "enum": [
292
+ "trigger"
293
+ ]
294
+ },
295
+ "name": {
296
+ "type": "string",
297
+ "enum": [
298
+ "deviceIdsTags",
299
+ "device",
300
+ "deviceTag"
301
+ ]
302
+ },
303
+ "label": {
304
+ "type": "string",
305
+ "minLength": 1,
306
+ "maxLength": 255
307
+ },
308
+ "x": {
309
+ "type": "number"
310
+ },
311
+ "y": {
312
+ "type": "number"
313
+ },
314
+ "uiId": {
315
+ "type": "string",
316
+ "maxLength": 48
317
+ },
318
+ "description": {
319
+ "type": "string",
320
+ "maxLength": 32767
321
+ },
322
+ "icon": {
323
+ "type": "string",
324
+ "maxLength": 1024
325
+ },
326
+ "color": {
327
+ "type": "string",
328
+ "maxLength": 1024
329
+ },
330
+ "inputCount": {
331
+ "type": "number"
332
+ },
333
+ "outputCount": {
334
+ "type": "number"
335
+ },
336
+ "id": {
337
+ "type": "string",
338
+ "maxLength": 48
339
+ },
340
+ "timeUnit": {
341
+ "type": "string",
342
+ "maxLength": 48
343
+ },
344
+ "maxAgeToggle": {
345
+ "type": "boolean"
346
+ },
347
+ "allowedAttributeType": {
348
+ "type": "string",
349
+ "enum": [
350
+ "attributeWhitelist",
351
+ "any",
352
+ "attributeBlacklist"
353
+ ]
354
+ }
355
+ },
356
+ "additionalProperties": false
357
+ },
358
+ "outputIds": {
359
+ "type": "array",
360
+ "items": {
361
+ "type": "array",
362
+ "items": {
363
+ "type": "string",
364
+ "maxLength": 255
365
+ },
366
+ "maxItems": 100
367
+ },
368
+ "maxItems": 100
369
+ }
370
+ },
371
+ "required": [
372
+ "type"
373
+ ],
374
+ "additionalProperties": false
375
+ },
376
+ {
377
+ "type": "object",
378
+ "properties": {
379
+ "key": {
380
+ "type": "string",
381
+ "maxLength": 1024
382
+ },
383
+ "type": {
384
+ "type": "string",
385
+ "enum": [
386
+ "deviceIdInactivity",
387
+ "deviceTagInactivity"
388
+ ]
389
+ },
390
+ "config": {
391
+ "type": "object",
392
+ "properties": {
393
+ "seconds": {
394
+ "type": "number"
395
+ }
396
+ },
397
+ "additionalProperties": false
398
+ },
399
+ "meta": {
400
+ "type": "object",
401
+ "properties": {
402
+ "category": {
403
+ "type": "string",
404
+ "enum": [
405
+ "trigger"
406
+ ]
407
+ },
408
+ "name": {
409
+ "type": "string",
410
+ "enum": [
411
+ "deviceIdsTagsInactivity"
412
+ ]
413
+ },
414
+ "label": {
415
+ "type": "string",
416
+ "minLength": 1,
417
+ "maxLength": 255
418
+ },
419
+ "x": {
420
+ "type": "number"
421
+ },
422
+ "y": {
423
+ "type": "number"
424
+ },
425
+ "uiId": {
426
+ "type": "string",
427
+ "maxLength": 48
428
+ },
429
+ "description": {
430
+ "type": "string",
431
+ "maxLength": 32767
432
+ },
433
+ "icon": {
434
+ "type": "string",
435
+ "maxLength": 1024
436
+ },
437
+ "color": {
438
+ "type": "string",
439
+ "maxLength": 1024
440
+ },
441
+ "inputCount": {
442
+ "type": "number"
443
+ },
444
+ "outputCount": {
445
+ "type": "number"
446
+ },
447
+ "id": {
448
+ "type": "string",
449
+ "maxLength": 48
450
+ }
451
+ },
452
+ "additionalProperties": false
453
+ },
454
+ "outputIds": {
455
+ "type": "array",
456
+ "items": {
457
+ "type": "array",
458
+ "items": {
459
+ "type": "string",
460
+ "maxLength": 255
461
+ },
462
+ "maxItems": 100
463
+ },
464
+ "maxItems": 100
465
+ }
466
+ },
467
+ "required": [
468
+ "type"
469
+ ],
470
+ "additionalProperties": false
471
+ },
472
+ {
473
+ "type": "object",
474
+ "properties": {
475
+ "key": {
476
+ "type": "string",
477
+ "maxLength": 1024
478
+ },
479
+ "type": {
480
+ "type": "string",
481
+ "enum": [
482
+ "endpoint"
483
+ ]
484
+ },
485
+ "config": {
486
+ "type": "object",
487
+ "properties": {
488
+ "experienceVersion": {
489
+ "type": "string",
490
+ "minLength": 1,
491
+ "maxLength": 255
492
+ }
493
+ },
494
+ "additionalProperties": false
495
+ },
496
+ "meta": {
497
+ "type": "object",
498
+ "properties": {
499
+ "category": {
500
+ "type": "string",
501
+ "enum": [
502
+ "trigger"
503
+ ]
504
+ },
505
+ "name": {
506
+ "type": "string",
507
+ "enum": [
508
+ "endpoint"
509
+ ]
510
+ },
511
+ "label": {
512
+ "type": "string",
513
+ "minLength": 1,
514
+ "maxLength": 255
515
+ },
516
+ "x": {
517
+ "type": "number"
518
+ },
519
+ "y": {
520
+ "type": "number"
521
+ },
522
+ "uiId": {
523
+ "type": "string",
524
+ "maxLength": 48
525
+ },
526
+ "description": {
527
+ "type": "string",
528
+ "maxLength": 32767
529
+ },
530
+ "icon": {
531
+ "type": "string",
532
+ "maxLength": 1024
533
+ },
534
+ "color": {
535
+ "type": "string",
536
+ "maxLength": 1024
537
+ },
538
+ "inputCount": {
539
+ "type": "number"
540
+ },
541
+ "outputCount": {
542
+ "type": "number"
543
+ },
544
+ "id": {
545
+ "type": "string",
546
+ "maxLength": 48
547
+ }
548
+ },
549
+ "additionalProperties": false
550
+ },
551
+ "outputIds": {
552
+ "type": "array",
553
+ "items": {
554
+ "type": "array",
555
+ "items": {
556
+ "type": "string",
557
+ "maxLength": 255
558
+ },
559
+ "maxItems": 100
560
+ },
561
+ "maxItems": 100
562
+ }
563
+ },
564
+ "required": [
565
+ "type"
566
+ ],
567
+ "additionalProperties": false
568
+ },
569
+ {
570
+ "type": "object",
571
+ "properties": {
572
+ "key": {
573
+ "type": "string",
574
+ "maxLength": 1024
575
+ },
576
+ "type": {
577
+ "type": "string",
578
+ "enum": [
579
+ "event"
580
+ ]
581
+ },
582
+ "config": {
583
+ "type": "object",
584
+ "properties": {
585
+ "subject": {
586
+ "type": "string",
587
+ "maxLength": 255
588
+ },
589
+ "new": {
590
+ "type": "boolean"
591
+ },
592
+ "acknowledged": {
593
+ "type": "boolean"
594
+ },
595
+ "resolved": {
596
+ "type": "boolean"
597
+ }
598
+ },
599
+ "additionalProperties": false
600
+ },
601
+ "meta": {
602
+ "type": "object",
603
+ "properties": {
604
+ "category": {
605
+ "type": "string",
606
+ "enum": [
607
+ "trigger"
608
+ ]
609
+ },
610
+ "name": {
611
+ "type": "string",
612
+ "enum": [
613
+ "event"
614
+ ]
615
+ },
616
+ "label": {
617
+ "type": "string",
618
+ "minLength": 1,
619
+ "maxLength": 255
620
+ },
621
+ "x": {
622
+ "type": "number"
623
+ },
624
+ "y": {
625
+ "type": "number"
626
+ },
627
+ "uiId": {
628
+ "type": "string",
629
+ "maxLength": 48
630
+ },
631
+ "description": {
632
+ "type": "string",
633
+ "maxLength": 32767
634
+ },
635
+ "icon": {
636
+ "type": "string",
637
+ "maxLength": 1024
638
+ },
639
+ "color": {
640
+ "type": "string",
641
+ "maxLength": 1024
642
+ },
643
+ "inputCount": {
644
+ "type": "number"
645
+ },
646
+ "outputCount": {
647
+ "type": "number"
648
+ },
649
+ "id": {
650
+ "type": "string",
651
+ "maxLength": 48
652
+ }
653
+ },
654
+ "additionalProperties": false
655
+ },
656
+ "outputIds": {
657
+ "type": "array",
658
+ "items": {
659
+ "type": "array",
660
+ "items": {
661
+ "type": "string",
662
+ "maxLength": 255
663
+ },
664
+ "maxItems": 100
665
+ },
666
+ "maxItems": 100
667
+ }
668
+ },
669
+ "required": [
670
+ "type"
671
+ ],
672
+ "additionalProperties": false
25
673
  },
26
- "type": {
27
- "type": "string",
28
- "enum": [
29
- "customNodeStart",
30
- "dataTable",
31
- "deviceCommand",
32
- "deviceId",
33
- "deviceIdConnect",
34
- "deviceIdDisconnect",
35
- "deviceIdInactivity",
36
- "deviceTag",
37
- "deviceTagConnect",
38
- "deviceTagDisconnect",
39
- "deviceTagInactivity",
40
- "endpoint",
41
- "event",
42
- "fileTail",
43
- "fileWatch",
44
- "integration",
45
- "mqttTopic",
46
- "notebook",
47
- "onBoot",
48
- "onConnect",
49
- "onDisconnect",
50
- "opcua",
51
- "redis",
52
- "request",
53
- "serial",
54
- "timer",
55
- "udp",
56
- "virtualButton",
57
- "webhook"
58
- ]
674
+ {
675
+ "type": "object",
676
+ "properties": {
677
+ "key": {
678
+ "type": "string",
679
+ "maxLength": 1024
680
+ },
681
+ "type": {
682
+ "type": "string",
683
+ "enum": [
684
+ "fileTail"
685
+ ]
686
+ },
687
+ "config": {
688
+ "type": "object",
689
+ "properties": {
690
+ "path": {
691
+ "type": "string",
692
+ "maxLength": 1024
693
+ },
694
+ "encoding": {
695
+ "type": "string",
696
+ "maxLength": 48
697
+ },
698
+ "byteLength": {
699
+ "type": "string",
700
+ "maxLength": 48
701
+ },
702
+ "delimiter": {
703
+ "type": "string",
704
+ "maxLength": 48
705
+ }
706
+ },
707
+ "additionalProperties": false
708
+ },
709
+ "meta": {
710
+ "type": "object",
711
+ "properties": {
712
+ "category": {
713
+ "type": "string",
714
+ "enum": [
715
+ "trigger"
716
+ ]
717
+ },
718
+ "name": {
719
+ "type": "string",
720
+ "enum": [
721
+ "fileTail"
722
+ ]
723
+ },
724
+ "label": {
725
+ "type": "string",
726
+ "minLength": 1,
727
+ "maxLength": 255
728
+ },
729
+ "x": {
730
+ "type": "number"
731
+ },
732
+ "y": {
733
+ "type": "number"
734
+ },
735
+ "uiId": {
736
+ "type": "string",
737
+ "maxLength": 48
738
+ },
739
+ "description": {
740
+ "type": "string",
741
+ "maxLength": 32767
742
+ },
743
+ "icon": {
744
+ "type": "string",
745
+ "maxLength": 1024
746
+ },
747
+ "color": {
748
+ "type": "string",
749
+ "maxLength": 1024
750
+ },
751
+ "inputCount": {
752
+ "type": "number"
753
+ },
754
+ "outputCount": {
755
+ "type": "number"
756
+ },
757
+ "id": {
758
+ "type": "string",
759
+ "maxLength": 48
760
+ }
761
+ },
762
+ "additionalProperties": false
763
+ },
764
+ "outputIds": {
765
+ "type": "array",
766
+ "items": {
767
+ "type": "array",
768
+ "items": {
769
+ "type": "string",
770
+ "maxLength": 255
771
+ },
772
+ "maxItems": 100
773
+ },
774
+ "maxItems": 100
775
+ }
776
+ },
777
+ "required": [
778
+ "type"
779
+ ],
780
+ "additionalProperties": false
781
+ },
782
+ {
783
+ "type": "object",
784
+ "properties": {
785
+ "key": {
786
+ "type": "string",
787
+ "maxLength": 1024
788
+ },
789
+ "type": {
790
+ "type": "string",
791
+ "enum": [
792
+ "fileWatch"
793
+ ]
794
+ },
795
+ "config": {
796
+ "type": "object",
797
+ "properties": {
798
+ "path": {
799
+ "type": "string",
800
+ "maxLength": 1024
801
+ },
802
+ "fileAdded": {
803
+ "type": "boolean"
804
+ },
805
+ "fileChanged": {
806
+ "type": "boolean"
807
+ },
808
+ "fileRemoved": {
809
+ "type": "boolean"
810
+ },
811
+ "directoryAdded": {
812
+ "type": "boolean"
813
+ },
814
+ "directoryRemoved": {
815
+ "type": "boolean"
816
+ }
817
+ },
818
+ "additionalProperties": false
819
+ },
820
+ "meta": {
821
+ "type": "object",
822
+ "properties": {
823
+ "category": {
824
+ "type": "string",
825
+ "enum": [
826
+ "trigger"
827
+ ]
828
+ },
829
+ "name": {
830
+ "type": "string",
831
+ "enum": [
832
+ "fileWatch"
833
+ ]
834
+ },
835
+ "label": {
836
+ "type": "string",
837
+ "minLength": 1,
838
+ "maxLength": 255
839
+ },
840
+ "x": {
841
+ "type": "number"
842
+ },
843
+ "y": {
844
+ "type": "number"
845
+ },
846
+ "uiId": {
847
+ "type": "string",
848
+ "maxLength": 48
849
+ },
850
+ "description": {
851
+ "type": "string",
852
+ "maxLength": 32767
853
+ },
854
+ "icon": {
855
+ "type": "string",
856
+ "maxLength": 1024
857
+ },
858
+ "color": {
859
+ "type": "string",
860
+ "maxLength": 1024
861
+ },
862
+ "inputCount": {
863
+ "type": "number"
864
+ },
865
+ "outputCount": {
866
+ "type": "number"
867
+ },
868
+ "id": {
869
+ "type": "string",
870
+ "maxLength": 48
871
+ }
872
+ },
873
+ "additionalProperties": false
874
+ },
875
+ "outputIds": {
876
+ "type": "array",
877
+ "items": {
878
+ "type": "array",
879
+ "items": {
880
+ "type": "string",
881
+ "maxLength": 255
882
+ },
883
+ "maxItems": 100
884
+ },
885
+ "maxItems": 100
886
+ }
887
+ },
888
+ "required": [
889
+ "type"
890
+ ],
891
+ "additionalProperties": false
892
+ },
893
+ {
894
+ "type": "object",
895
+ "properties": {
896
+ "key": {
897
+ "type": "string",
898
+ "maxLength": 1024
899
+ },
900
+ "type": {
901
+ "type": "string",
902
+ "enum": [
903
+ "opcua"
904
+ ]
905
+ },
906
+ "config": {
907
+ "type": "object",
908
+ "properties": {
909
+ "uri": {
910
+ "type": "string",
911
+ "maxLength": 1024
912
+ },
913
+ "securityPolicy": {
914
+ "type": "string",
915
+ "maxLength": 255
916
+ },
917
+ "securityMode": {
918
+ "type": "string",
919
+ "maxLength": 255
920
+ },
921
+ "username": {
922
+ "type": "string",
923
+ "maxLength": 1024
924
+ },
925
+ "password": {
926
+ "type": "string",
927
+ "maxLength": 1024
928
+ },
929
+ "cert": {
930
+ "type": "string",
931
+ "maxLength": 32767
932
+ },
933
+ "privateKey": {
934
+ "type": "string",
935
+ "maxLength": 32767
936
+ },
937
+ "nameSpace": {
938
+ "type": "string",
939
+ "maxLength": 255
940
+ },
941
+ "identifier": {
942
+ "type": "string",
943
+ "maxLength": 255
944
+ },
945
+ "samplingInterval": {
946
+ "type": "string",
947
+ "maxLength": 255
948
+ },
949
+ "eventFilter": {
950
+ "type": "array",
951
+ "maxItems": 100,
952
+ "items": {
953
+ "type": "string",
954
+ "maxLength": 255
955
+ }
956
+ }
957
+ },
958
+ "additionalProperties": false
959
+ },
960
+ "meta": {
961
+ "type": "object",
962
+ "properties": {
963
+ "category": {
964
+ "type": "string",
965
+ "enum": [
966
+ "trigger"
967
+ ]
968
+ },
969
+ "name": {
970
+ "type": "string",
971
+ "enum": [
972
+ "opcua"
973
+ ]
974
+ },
975
+ "label": {
976
+ "type": "string",
977
+ "minLength": 1,
978
+ "maxLength": 255
979
+ },
980
+ "x": {
981
+ "type": "number"
982
+ },
983
+ "y": {
984
+ "type": "number"
985
+ },
986
+ "uiId": {
987
+ "type": "string",
988
+ "maxLength": 48
989
+ },
990
+ "description": {
991
+ "type": "string",
992
+ "maxLength": 32767
993
+ },
994
+ "icon": {
995
+ "type": "string",
996
+ "maxLength": 1024
997
+ },
998
+ "color": {
999
+ "type": "string",
1000
+ "maxLength": 1024
1001
+ },
1002
+ "inputCount": {
1003
+ "type": "number"
1004
+ },
1005
+ "outputCount": {
1006
+ "type": "number"
1007
+ },
1008
+ "id": {
1009
+ "type": "string",
1010
+ "maxLength": 48
1011
+ }
1012
+ },
1013
+ "additionalProperties": false
1014
+ },
1015
+ "outputIds": {
1016
+ "type": "array",
1017
+ "items": {
1018
+ "type": "array",
1019
+ "items": {
1020
+ "type": "string",
1021
+ "maxLength": 255
1022
+ },
1023
+ "maxItems": 100
1024
+ },
1025
+ "maxItems": 100
1026
+ }
1027
+ },
1028
+ "required": [
1029
+ "type"
1030
+ ],
1031
+ "additionalProperties": false
1032
+ },
1033
+ {
1034
+ "type": "object",
1035
+ "properties": {
1036
+ "key": {
1037
+ "type": "string",
1038
+ "maxLength": 1024
1039
+ },
1040
+ "type": {
1041
+ "type": "string",
1042
+ "enum": [
1043
+ "redis"
1044
+ ]
1045
+ },
1046
+ "config": {
1047
+ "type": "object",
1048
+ "properties": {
1049
+ "host": {
1050
+ "type": "string",
1051
+ "maxLength": 1024
1052
+ },
1053
+ "port": {
1054
+ "type": "string",
1055
+ "maxLength": 16
1056
+ },
1057
+ "password": {
1058
+ "type": "string",
1059
+ "maxLength": 1024
1060
+ },
1061
+ "topic": {
1062
+ "type": "string",
1063
+ "maxLength": 1024
1064
+ },
1065
+ "fileAdded": {
1066
+ "type": "boolean"
1067
+ },
1068
+ "fileChanged": {
1069
+ "type": "boolean"
1070
+ },
1071
+ "fileRemoved": {
1072
+ "type": "boolean"
1073
+ },
1074
+ "directoryAdded": {
1075
+ "type": "boolean"
1076
+ },
1077
+ "directoryRemoved": {
1078
+ "type": "boolean"
1079
+ }
1080
+ },
1081
+ "additionalProperties": false
1082
+ },
1083
+ "meta": {
1084
+ "type": "object",
1085
+ "properties": {
1086
+ "category": {
1087
+ "type": "string",
1088
+ "enum": [
1089
+ "trigger"
1090
+ ]
1091
+ },
1092
+ "name": {
1093
+ "type": "string",
1094
+ "enum": [
1095
+ "redisTrigger"
1096
+ ]
1097
+ },
1098
+ "label": {
1099
+ "type": "string",
1100
+ "minLength": 1,
1101
+ "maxLength": 255
1102
+ },
1103
+ "x": {
1104
+ "type": "number"
1105
+ },
1106
+ "y": {
1107
+ "type": "number"
1108
+ },
1109
+ "uiId": {
1110
+ "type": "string",
1111
+ "maxLength": 48
1112
+ },
1113
+ "description": {
1114
+ "type": "string",
1115
+ "maxLength": 32767
1116
+ },
1117
+ "icon": {
1118
+ "type": "string",
1119
+ "maxLength": 1024
1120
+ },
1121
+ "color": {
1122
+ "type": "string",
1123
+ "maxLength": 1024
1124
+ },
1125
+ "inputCount": {
1126
+ "type": "number"
1127
+ },
1128
+ "outputCount": {
1129
+ "type": "number"
1130
+ },
1131
+ "id": {
1132
+ "type": "string",
1133
+ "maxLength": 48
1134
+ }
1135
+ },
1136
+ "additionalProperties": false
1137
+ },
1138
+ "outputIds": {
1139
+ "type": "array",
1140
+ "items": {
1141
+ "type": "array",
1142
+ "items": {
1143
+ "type": "string",
1144
+ "maxLength": 255
1145
+ },
1146
+ "maxItems": 100
1147
+ },
1148
+ "maxItems": 100
1149
+ }
1150
+ },
1151
+ "required": [
1152
+ "type"
1153
+ ],
1154
+ "additionalProperties": false
59
1155
  },
60
- "config": {
61
- "type": "object"
1156
+ {
1157
+ "type": "object",
1158
+ "properties": {
1159
+ "key": {
1160
+ "type": "string",
1161
+ "maxLength": 1024
1162
+ },
1163
+ "type": {
1164
+ "type": "string",
1165
+ "enum": [
1166
+ "serial"
1167
+ ]
1168
+ },
1169
+ "config": {
1170
+ "type": "object",
1171
+ "properties": {
1172
+ "path": {
1173
+ "type": "string",
1174
+ "maxLength": 1024
1175
+ },
1176
+ "baudRate": {
1177
+ "type": "number"
1178
+ },
1179
+ "encoding": {
1180
+ "type": "string",
1181
+ "maxLength": 48
1182
+ },
1183
+ "writeOnOpen": {
1184
+ "type": "string",
1185
+ "maxLength": 1024
1186
+ },
1187
+ "byteLength": {
1188
+ "type": "string",
1189
+ "maxLength": 48
1190
+ },
1191
+ "delimiter": {
1192
+ "type": "string",
1193
+ "maxLength": 48
1194
+ }
1195
+ },
1196
+ "additionalProperties": false
1197
+ },
1198
+ "meta": {
1199
+ "type": "object",
1200
+ "properties": {
1201
+ "category": {
1202
+ "type": "string",
1203
+ "enum": [
1204
+ "trigger"
1205
+ ]
1206
+ },
1207
+ "name": {
1208
+ "type": "string",
1209
+ "enum": [
1210
+ "serial"
1211
+ ]
1212
+ },
1213
+ "label": {
1214
+ "type": "string",
1215
+ "minLength": 1,
1216
+ "maxLength": 255
1217
+ },
1218
+ "x": {
1219
+ "type": "number"
1220
+ },
1221
+ "y": {
1222
+ "type": "number"
1223
+ },
1224
+ "uiId": {
1225
+ "type": "string",
1226
+ "maxLength": 48
1227
+ },
1228
+ "description": {
1229
+ "type": "string",
1230
+ "maxLength": 32767
1231
+ },
1232
+ "icon": {
1233
+ "type": "string",
1234
+ "maxLength": 1024
1235
+ },
1236
+ "color": {
1237
+ "type": "string",
1238
+ "maxLength": 1024
1239
+ },
1240
+ "inputCount": {
1241
+ "type": "number"
1242
+ },
1243
+ "outputCount": {
1244
+ "type": "number"
1245
+ },
1246
+ "id": {
1247
+ "type": "string",
1248
+ "maxLength": 48
1249
+ },
1250
+ "parseBy": {
1251
+ "type": "string",
1252
+ "enum": [
1253
+ "byteLength",
1254
+ "delimiter"
1255
+ ]
1256
+ }
1257
+ },
1258
+ "additionalProperties": false
1259
+ },
1260
+ "outputIds": {
1261
+ "type": "array",
1262
+ "items": {
1263
+ "type": "array",
1264
+ "items": {
1265
+ "type": "string",
1266
+ "maxLength": 255
1267
+ },
1268
+ "maxItems": 100
1269
+ },
1270
+ "maxItems": 100
1271
+ }
1272
+ },
1273
+ "required": [
1274
+ "type"
1275
+ ],
1276
+ "additionalProperties": false
62
1277
  },
63
- "meta": {
64
- "type": "object"
1278
+ {
1279
+ "type": "object",
1280
+ "properties": {
1281
+ "key": {
1282
+ "type": "string",
1283
+ "maxLength": 1024
1284
+ },
1285
+ "type": {
1286
+ "type": "string",
1287
+ "enum": [
1288
+ "timer"
1289
+ ]
1290
+ },
1291
+ "config": {
1292
+ "type": "object",
1293
+ "properties": {
1294
+ "seconds": {
1295
+ "type": "number"
1296
+ },
1297
+ "cron": {
1298
+ "type": "string",
1299
+ "maxLength": 255
1300
+ },
1301
+ "tz": {
1302
+ "type": "string",
1303
+ "maxLength": 255
1304
+ }
1305
+ },
1306
+ "additionalProperties": false
1307
+ },
1308
+ "meta": {
1309
+ "type": "object",
1310
+ "properties": {
1311
+ "category": {
1312
+ "type": "string",
1313
+ "enum": [
1314
+ "trigger"
1315
+ ]
1316
+ },
1317
+ "name": {
1318
+ "type": "string",
1319
+ "enum": [
1320
+ "timer"
1321
+ ]
1322
+ },
1323
+ "label": {
1324
+ "type": "string",
1325
+ "minLength": 1,
1326
+ "maxLength": 255
1327
+ },
1328
+ "x": {
1329
+ "type": "number"
1330
+ },
1331
+ "y": {
1332
+ "type": "number"
1333
+ },
1334
+ "uiId": {
1335
+ "type": "string",
1336
+ "maxLength": 48
1337
+ },
1338
+ "description": {
1339
+ "type": "string",
1340
+ "maxLength": 32767
1341
+ },
1342
+ "icon": {
1343
+ "type": "string",
1344
+ "maxLength": 1024
1345
+ },
1346
+ "color": {
1347
+ "type": "string",
1348
+ "maxLength": 1024
1349
+ },
1350
+ "inputCount": {
1351
+ "type": "number"
1352
+ },
1353
+ "outputCount": {
1354
+ "type": "number"
1355
+ },
1356
+ "id": {
1357
+ "type": "string",
1358
+ "maxLength": 48
1359
+ },
1360
+ "timerTypeSelect": {
1361
+ "type": "string",
1362
+ "enum": [
1363
+ "cronWeekly",
1364
+ "seconds",
1365
+ "cron"
1366
+ ]
1367
+ },
1368
+ "timeAt": {
1369
+ "type": "string",
1370
+ "maxLength": 255
1371
+ },
1372
+ "timezone": {
1373
+ "type": "string",
1374
+ "maxLength": 255
1375
+ },
1376
+ "weekdays": {
1377
+ "type": "array",
1378
+ "maxItems": 7,
1379
+ "items": {
1380
+ "type": "number"
1381
+ }
1382
+ }
1383
+ },
1384
+ "additionalProperties": false
1385
+ },
1386
+ "outputIds": {
1387
+ "type": "array",
1388
+ "items": {
1389
+ "type": "array",
1390
+ "items": {
1391
+ "type": "string",
1392
+ "maxLength": 255
1393
+ },
1394
+ "maxItems": 100
1395
+ },
1396
+ "maxItems": 100
1397
+ }
1398
+ },
1399
+ "required": [
1400
+ "type"
1401
+ ],
1402
+ "additionalProperties": false
65
1403
  },
66
- "outputIds": {
67
- "type": "array",
68
- "items": {
69
- "type": "array",
70
- "items": {
1404
+ {
1405
+ "type": "object",
1406
+ "properties": {
1407
+ "key": {
71
1408
  "type": "string",
72
- "maxLength": 255
1409
+ "maxLength": 1024
73
1410
  },
74
- "maxItems": 100
1411
+ "type": {
1412
+ "type": "string",
1413
+ "enum": [
1414
+ "virtualButton"
1415
+ ]
1416
+ },
1417
+ "config": {
1418
+ "type": "object",
1419
+ "additionalProperties": false
1420
+ },
1421
+ "meta": {
1422
+ "type": "object",
1423
+ "properties": {
1424
+ "category": {
1425
+ "type": "string",
1426
+ "enum": [
1427
+ "trigger"
1428
+ ]
1429
+ },
1430
+ "name": {
1431
+ "type": "string",
1432
+ "enum": [
1433
+ "virtualButton"
1434
+ ]
1435
+ },
1436
+ "label": {
1437
+ "type": "string",
1438
+ "minLength": 1,
1439
+ "maxLength": 255
1440
+ },
1441
+ "x": {
1442
+ "type": "number"
1443
+ },
1444
+ "y": {
1445
+ "type": "number"
1446
+ },
1447
+ "uiId": {
1448
+ "type": "string",
1449
+ "maxLength": 48
1450
+ },
1451
+ "groupId": {
1452
+ "type": "string",
1453
+ "maxLength": 48
1454
+ },
1455
+ "description": {
1456
+ "type": "string",
1457
+ "maxLength": 32767
1458
+ },
1459
+ "icon": {
1460
+ "type": "string",
1461
+ "maxLength": 1024
1462
+ },
1463
+ "color": {
1464
+ "type": "string",
1465
+ "maxLength": 1024
1466
+ },
1467
+ "inputCount": {
1468
+ "type": "number"
1469
+ },
1470
+ "outputCount": {
1471
+ "type": "number"
1472
+ },
1473
+ "id": {
1474
+ "type": "string",
1475
+ "maxLength": 48
1476
+ },
1477
+ "payload": {
1478
+ "type": "string",
1479
+ "maxLength": 262144
1480
+ },
1481
+ "deviceId": {
1482
+ "oneOf": [
1483
+ {
1484
+ "type": "string",
1485
+ "pattern": "^[A-Fa-f\\d]{24}$"
1486
+ },
1487
+ {
1488
+ "type": "string",
1489
+ "enum": [
1490
+ ""
1491
+ ]
1492
+ },
1493
+ {
1494
+ "type": "null"
1495
+ }
1496
+ ]
1497
+ }
1498
+ },
1499
+ "additionalProperties": false
1500
+ },
1501
+ "outputIds": {
1502
+ "type": "array",
1503
+ "items": {
1504
+ "type": "array",
1505
+ "items": {
1506
+ "type": "string",
1507
+ "maxLength": 255
1508
+ },
1509
+ "maxItems": 100
1510
+ },
1511
+ "maxItems": 100
1512
+ }
75
1513
  },
76
- "maxItems": 100
1514
+ "required": [
1515
+ "type"
1516
+ ],
1517
+ "additionalProperties": false
77
1518
  }
78
- },
79
- "additionalProperties": false,
80
- "required": [
81
- "type"
82
1519
  ]
83
1520
  }
84
1521
  },