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