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