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