@fugood/bricks-project 2.21.0 → 2.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ import type {
6
6
  ActionWithDataParams,
7
7
  ActionWithParams,
8
8
  Action,
9
+ EventProperty,
9
10
  } from './common'
10
11
 
11
12
  /* Start the tick */
@@ -41,35 +42,9 @@ Default property:
41
42
  }
42
43
  events?: {
43
44
  /* Event for each tick start */
44
- ticking?: Array<
45
- EventAction & {
46
- eventPropertyMapping?: {
47
- countdown: {
48
- type: 'number'
49
- path: string
50
- }
51
- value: {
52
- type: 'any'
53
- path: string
54
- }
55
- }
56
- }
57
- >
45
+ ticking?: Array<EventAction>
58
46
  /* Event for tick completed */
59
- completed?: Array<
60
- EventAction & {
61
- eventPropertyMapping?: {
62
- countdown: {
63
- type: 'number'
64
- path: string
65
- }
66
- value: {
67
- type: 'any'
68
- path: string
69
- }
70
- }
71
- }
72
- >
47
+ completed?: Array<EventAction>
73
48
  }
74
49
  outlets?: {
75
50
  /* Result of each countdown change */
@@ -149,89 +124,13 @@ Default property:
149
124
  }
150
125
  events?: {
151
126
  /* Event for cron rule is not invalid */
152
- onRuleInvalid?: Array<
153
- EventAction & {
154
- eventPropertyMapping?: {
155
- errorMessage: {
156
- type: 'string'
157
- path: string
158
- }
159
- }
160
- }
161
- >
127
+ onRuleInvalid?: Array<EventAction>
162
128
  /* Event for alarm clock start */
163
- onStart?: Array<
164
- EventAction & {
165
- eventPropertyMapping?: {
166
- currentTime: {
167
- type: 'string'
168
- path: string
169
- }
170
- currentTimestamp: {
171
- type: 'number'
172
- path: string
173
- }
174
- nextTrigTime: {
175
- type: 'string'
176
- path: string
177
- }
178
- nextTrigTimestamp: {
179
- type: 'number'
180
- path: string
181
- }
182
- }
183
- }
184
- >
129
+ onStart?: Array<EventAction>
185
130
  /* Event for alarm clock trig */
186
- onTrig?: Array<
187
- EventAction & {
188
- eventPropertyMapping?: {
189
- currentTime: {
190
- type: 'string'
191
- path: string
192
- }
193
- currentTimestamp: {
194
- type: 'number'
195
- path: string
196
- }
197
- nextTrigTime: {
198
- type: 'string'
199
- path: string
200
- }
201
- nextTrigTimestamp: {
202
- type: 'number'
203
- path: string
204
- }
205
- }
206
- }
207
- >
131
+ onTrig?: Array<EventAction>
208
132
  /* Event for alarm clock stop */
209
- onEnd?: Array<
210
- EventAction & {
211
- eventPropertyMapping?: {
212
- currentTime: {
213
- type: 'string'
214
- path: string
215
- }
216
- currentTimestamp: {
217
- type: 'number'
218
- path: string
219
- }
220
- reason: {
221
- type: 'string'
222
- path: string
223
- }
224
- maxTrigs: {
225
- type: 'nummber'
226
- path: string
227
- }
228
- stopAt: {
229
- type: 'string'
230
- path: string
231
- }
232
- }
233
- }
234
- >
133
+ onEnd?: Array<EventAction>
235
134
  }
236
135
  outlets?: {
237
136
  /* Current time of each alarm clock trig */
@@ -277,7 +176,7 @@ export type GeneratorFileActionReadContent = ActionWithParams & {
277
176
  __actionName: 'GENERATOR_FILE_READ_CONTENT'
278
177
  params?: Array<{
279
178
  input: 'encoding'
280
- value?: 'utf8' | 'base64' | DataLink
179
+ value?: 'utf8' | 'base64' | DataLink | EventProperty
281
180
  mapping?: string
282
181
  }>
283
182
  }
@@ -293,17 +192,17 @@ export type GeneratorFileActionAppendContent = ActionWithParams & {
293
192
  params?: Array<
294
193
  | {
295
194
  input: 'content'
296
- value?: string | DataLink
195
+ value?: string | DataLink | EventProperty
297
196
  mapping?: string
298
197
  }
299
198
  | {
300
199
  input: 'encoding'
301
- value?: 'utf8' | 'base64' | DataLink
200
+ value?: 'utf8' | 'base64' | DataLink | EventProperty
302
201
  mapping?: string
303
202
  }
304
203
  | {
305
204
  input: 'contentList'
306
- value?: Array<any> | DataLink
205
+ value?: Array<any> | DataLink | EventProperty
307
206
  mapping?: string
308
207
  }
309
208
  >
@@ -315,22 +214,22 @@ export type GeneratorFileActionWriteContent = ActionWithParams & {
315
214
  params?: Array<
316
215
  | {
317
216
  input: 'content'
318
- value?: string | DataLink
217
+ value?: string | DataLink | EventProperty
319
218
  mapping?: string
320
219
  }
321
220
  | {
322
221
  input: 'encoding'
323
- value?: 'utf8' | 'base64' | DataLink
222
+ value?: 'utf8' | 'base64' | DataLink | EventProperty
324
223
  mapping?: string
325
224
  }
326
225
  | {
327
226
  input: 'position'
328
- value?: number | DataLink
227
+ value?: number | DataLink | EventProperty
329
228
  mapping?: string
330
229
  }
331
230
  | {
332
231
  input: 'contentList'
333
- value?: Array<any> | DataLink
232
+ value?: Array<any> | DataLink | EventProperty
334
233
  mapping?: string
335
234
  }
336
235
  >
@@ -342,17 +241,17 @@ export type GeneratorFileActionStartUpload = ActionWithParams & {
342
241
  params?: Array<
343
242
  | {
344
243
  input: 'withAll'
345
- value?: boolean | DataLink
244
+ value?: boolean | DataLink | EventProperty
346
245
  mapping?: string
347
246
  }
348
247
  | {
349
248
  input: 'withId'
350
- value?: string | DataLink
249
+ value?: string | DataLink | EventProperty
351
250
  mapping?: string
352
251
  }
353
252
  | {
354
253
  input: 'withIndex'
355
- value?: number | DataLink
254
+ value?: number | DataLink | EventProperty
356
255
  mapping?: string
357
256
  }
358
257
  >
@@ -364,17 +263,17 @@ export type GeneratorFileActionStopUpload = ActionWithParams & {
364
263
  params?: Array<
365
264
  | {
366
265
  input: 'withAll'
367
- value?: boolean | DataLink
266
+ value?: boolean | DataLink | EventProperty
368
267
  mapping?: string
369
268
  }
370
269
  | {
371
270
  input: 'withId'
372
- value?: string | DataLink
271
+ value?: string | DataLink | EventProperty
373
272
  mapping?: string
374
273
  }
375
274
  | {
376
275
  input: 'withIndex'
377
- value?: number | DataLink
276
+ value?: number | DataLink | EventProperty
378
277
  mapping?: string
379
278
  }
380
279
  >
@@ -386,17 +285,17 @@ export type GeneratorFileActionStartDownload = ActionWithParams & {
386
285
  params?: Array<
387
286
  | {
388
287
  input: 'withAll'
389
- value?: boolean | DataLink
288
+ value?: boolean | DataLink | EventProperty
390
289
  mapping?: string
391
290
  }
392
291
  | {
393
292
  input: 'withId'
394
- value?: string | DataLink
293
+ value?: string | DataLink | EventProperty
395
294
  mapping?: string
396
295
  }
397
296
  | {
398
297
  input: 'withIndex'
399
- value?: number | DataLink
298
+ value?: number | DataLink | EventProperty
400
299
  mapping?: string
401
300
  }
402
301
  >
@@ -408,17 +307,17 @@ export type GeneratorFileActionStopDownload = ActionWithParams & {
408
307
  params?: Array<
409
308
  | {
410
309
  input: 'withAll'
411
- value?: boolean | DataLink
310
+ value?: boolean | DataLink | EventProperty
412
311
  mapping?: string
413
312
  }
414
313
  | {
415
314
  input: 'withId'
416
- value?: string | DataLink
315
+ value?: string | DataLink | EventProperty
417
316
  mapping?: string
418
317
  }
419
318
  | {
420
319
  input: 'withIndex'
421
- value?: number | DataLink
320
+ value?: number | DataLink | EventProperty
422
321
  mapping?: string
423
322
  }
424
323
  >
@@ -515,275 +414,33 @@ Default property:
515
414
  }
516
415
  events?: {
517
416
  /* On file handler init error */
518
- initError?: Array<
519
- EventAction & {
520
- eventPropertyMapping?: {
521
- error: {
522
- type: 'string'
523
- path: string
524
- }
525
- }
526
- }
527
- >
417
+ initError?: Array<EventAction>
528
418
  /* On file status change */
529
- onFileStatusChange?: Array<
530
- EventAction & {
531
- eventPropertyMapping?: {
532
- path: {
533
- type: 'string'
534
- path: string
535
- }
536
- status: {
537
- type: 'string'
538
- path: string
539
- }
540
- }
541
- }
542
- >
419
+ onFileStatusChange?: Array<EventAction>
543
420
  /* On read stats error */
544
- onReadStatsError?: Array<
545
- EventAction & {
546
- eventPropertyMapping?: {
547
- path: {
548
- type: 'string'
549
- path: string
550
- }
551
- list: {
552
- type: 'array'
553
- path: string
554
- }
555
- error: {
556
- type: 'string'
557
- path: string
558
- }
559
- }
560
- }
561
- >
421
+ onReadStatsError?: Array<EventAction>
562
422
  /* On read content error */
563
- onReadContentError?: Array<
564
- EventAction & {
565
- eventPropertyMapping?: {
566
- path: {
567
- type: 'string'
568
- path: string
569
- }
570
- list: {
571
- type: 'array'
572
- path: string
573
- }
574
- error: {
575
- type: 'string'
576
- path: string
577
- }
578
- }
579
- }
580
- >
423
+ onReadContentError?: Array<EventAction>
581
424
  /* On read content error */
582
- onAppendContentError?: Array<
583
- EventAction & {
584
- eventPropertyMapping?: {
585
- path: {
586
- type: 'string'
587
- path: string
588
- }
589
- list: {
590
- type: 'array'
591
- path: string
592
- }
593
- error: {
594
- type: 'string'
595
- path: string
596
- }
597
- }
598
- }
599
- >
425
+ onAppendContentError?: Array<EventAction>
600
426
  /* On write content error */
601
- onWriteContentError?: Array<
602
- EventAction & {
603
- eventPropertyMapping?: {
604
- path: {
605
- type: 'string'
606
- path: string
607
- }
608
- list: {
609
- type: 'array'
610
- path: string
611
- }
612
- error: {
613
- type: 'string'
614
- path: string
615
- }
616
- }
617
- }
618
- >
427
+ onWriteContentError?: Array<EventAction>
619
428
  /* On upload progress */
620
- onUploadProgress?: Array<
621
- EventAction & {
622
- eventPropertyMapping?: {
623
- id: {
624
- type: 'string'
625
- path: string
626
- }
627
- index: {
628
- type: 'number'
629
- path: string
630
- }
631
- progress: {
632
- type: 'number'
633
- path: string
634
- }
635
- list: {
636
- type: 'array'
637
- path: string
638
- }
639
- }
640
- }
641
- >
429
+ onUploadProgress?: Array<EventAction>
642
430
  /* On upload error */
643
- onUploadError?: Array<
644
- EventAction & {
645
- eventPropertyMapping?: {
646
- id: {
647
- type: 'string'
648
- path: string
649
- }
650
- index: {
651
- type: 'number'
652
- path: string
653
- }
654
- error: {
655
- type: 'string'
656
- path: string
657
- }
658
- }
659
- }
660
- >
431
+ onUploadError?: Array<EventAction>
661
432
  /* On upload complete */
662
- onUploadComplete?: Array<
663
- EventAction & {
664
- eventPropertyMapping?: {
665
- id: {
666
- type: 'string'
667
- path: string
668
- }
669
- index: {
670
- type: 'number'
671
- path: string
672
- }
673
- path: {
674
- type: 'string'
675
- path: string
676
- }
677
- }
678
- }
679
- >
433
+ onUploadComplete?: Array<EventAction>
680
434
  /* On upload all done */
681
- onUploadAllComplete?: Array<
682
- EventAction & {
683
- eventPropertyMapping?: {
684
- single: {
685
- type: 'object'
686
- path: string
687
- }
688
- singlePath: {
689
- type: 'string'
690
- path: string
691
- }
692
- list: {
693
- type: 'array'
694
- path: string
695
- }
696
- listPaths: {
697
- type: 'array'
698
- path: string
699
- }
700
- }
701
- }
702
- >
435
+ onUploadAllComplete?: Array<EventAction>
703
436
  /* On download progress */
704
- onDownloadProgress?: Array<
705
- EventAction & {
706
- eventPropertyMapping?: {
707
- id: {
708
- type: 'string'
709
- path: string
710
- }
711
- index: {
712
- type: 'number'
713
- path: string
714
- }
715
- progress: {
716
- type: 'number'
717
- path: string
718
- }
719
- list: {
720
- type: 'array'
721
- path: string
722
- }
723
- }
724
- }
725
- >
437
+ onDownloadProgress?: Array<EventAction>
726
438
  /* On download error */
727
- onDownloadError?: Array<
728
- EventAction & {
729
- eventPropertyMapping?: {
730
- id: {
731
- type: 'string'
732
- path: string
733
- }
734
- index: {
735
- type: 'number'
736
- path: string
737
- }
738
- error: {
739
- type: 'string'
740
- path: string
741
- }
742
- }
743
- }
744
- >
439
+ onDownloadError?: Array<EventAction>
745
440
  /* On download complete */
746
- onDownloadComplete?: Array<
747
- EventAction & {
748
- eventPropertyMapping?: {
749
- id: {
750
- type: 'string'
751
- path: string
752
- }
753
- index: {
754
- type: 'number'
755
- path: string
756
- }
757
- path: {
758
- type: 'string'
759
- path: string
760
- }
761
- }
762
- }
763
- >
441
+ onDownloadComplete?: Array<EventAction>
764
442
  /* On download all done */
765
- onDownloadAllComplete?: Array<
766
- EventAction & {
767
- eventPropertyMapping?: {
768
- single: {
769
- type: 'object'
770
- path: string
771
- }
772
- singlePath: {
773
- type: 'string'
774
- path: string
775
- }
776
- list: {
777
- type: 'array'
778
- path: string
779
- }
780
- listPaths: {
781
- type: 'array'
782
- path: string
783
- }
784
- }
785
- }
786
- >
443
+ onDownloadAllComplete?: Array<EventAction>
787
444
  }
788
445
  outlets?: {
789
446
  /* File init error result will be stored in Data */
@@ -926,44 +583,13 @@ Default property:
926
583
  }
927
584
  events?: {
928
585
  /* Event of media box fetch error */
929
- fetchError?: Array<
930
- EventAction & {
931
- eventPropertyMapping?: {
932
- error: {
933
- type: 'string'
934
- path: string
935
- }
936
- errorIsFromCache: {
937
- type: 'boolean'
938
- path: string
939
- }
940
- }
941
- }
942
- >
586
+ fetchError?: Array<EventAction>
943
587
  /* Event of subscribe box change connected (If set `Subscribe Box Change`) */
944
588
  subscribeBoxConnect?: Array<EventAction>
945
589
  /* Event of subscribe box change error (If set `Subscribe Box Change`) */
946
- subscribeBoxError?: Array<
947
- EventAction & {
948
- eventPropertyMapping?: {
949
- error: {
950
- type: 'string'
951
- path: string
952
- }
953
- }
954
- }
955
- >
590
+ subscribeBoxError?: Array<EventAction>
956
591
  /* Event of subscribe box change connection error (If set `Subscribe Box Change`) */
957
- subscribeBoxConnectError?: Array<
958
- EventAction & {
959
- eventPropertyMapping?: {
960
- error: {
961
- type: 'string'
962
- path: string
963
- }
964
- }
965
- }
966
- >
592
+ subscribeBoxConnectError?: Array<EventAction>
967
593
  /* Event of file sync completed for used `saveToStorage` */
968
594
  saveStorageCompleted?: Array<EventAction>
969
595
  /* Event when file list size exceed of Load size limit */
@@ -1024,12 +650,12 @@ export type GeneratorDataBankActionUpdateProperty = ActionWithParams & {
1024
650
  params?: Array<
1025
651
  | {
1026
652
  input: 'propertyId'
1027
- value?: string | DataLink
653
+ value?: string | DataLink | EventProperty
1028
654
  mapping?: string
1029
655
  }
1030
656
  | {
1031
657
  input: 'propertyValue'
1032
- value?: any
658
+ value?: any | EventProperty
1033
659
  mapping?: string
1034
660
  }
1035
661
  >
@@ -1040,7 +666,7 @@ export type GeneratorDataBankActionRemoveProperty = ActionWithParams & {
1040
666
  __actionName: 'GENERATOR_DATA_BANK_REMOVE_PROPERTY'
1041
667
  params?: Array<{
1042
668
  input: 'propertyId'
1043
- value?: string | DataLink
669
+ value?: string | DataLink | EventProperty
1044
670
  mapping?: string
1045
671
  }>
1046
672
  }
@@ -1084,44 +710,17 @@ Default property:
1084
710
  }
1085
711
  events?: {
1086
712
  /* Event of Data Bank fetch response */
1087
- onFetchResponse?: Array<
1088
- EventAction & {
1089
- eventPropertyMapping?: {
1090
- responseProperties: {
1091
- type: 'array'
1092
- path: string
1093
- }
1094
- }
1095
- }
1096
- >
713
+ onFetchResponse?: Array<EventAction>
1097
714
  /* Event of Data Bank change from subscription */
1098
715
  onChange?: Array<EventAction>
1099
716
  /* Event of Data Bank fetch error */
1100
717
  onFetchError?: Array<EventAction>
1101
718
  /* Event of error */
1102
- onError?: Array<
1103
- EventAction & {
1104
- eventPropertyMapping?: {
1105
- error: {
1106
- type: 'object'
1107
- path: string
1108
- }
1109
- }
1110
- }
1111
- >
719
+ onError?: Array<EventAction>
1112
720
  /* Event of subscription on connection */
1113
721
  subscribeDataOnConnect?: Array<EventAction>
1114
722
  /* Server connections error of subscription */
1115
- subscribeDataOnConnectError?: Array<
1116
- EventAction & {
1117
- eventPropertyMapping?: {
1118
- error: {
1119
- type: 'object'
1120
- path: string
1121
- }
1122
- }
1123
- }
1124
- >
723
+ subscribeDataOnConnectError?: Array<EventAction>
1125
724
  }
1126
725
  outlets?: {
1127
726
  /* Response for Data Bank fetch request, it will save to Data */
@@ -1159,17 +758,17 @@ export type GeneratorGraphQLActionRunQuery = ActionWithParams & {
1159
758
  params?: Array<
1160
759
  | {
1161
760
  input: 'type'
1162
- value?: 'query' | 'mutation' | 'subscription' | DataLink
761
+ value?: 'query' | 'mutation' | 'subscription' | DataLink | EventProperty
1163
762
  mapping?: string
1164
763
  }
1165
764
  | {
1166
765
  input: 'query'
1167
- value?: string | DataLink
766
+ value?: string | DataLink | EventProperty
1168
767
  mapping?: string
1169
768
  }
1170
769
  | {
1171
770
  input: 'variables'
1172
- value?: {} | DataLink
771
+ value?: {} | DataLink | EventProperty
1173
772
  mapping?: string
1174
773
  }
1175
774
  >
@@ -1235,16 +834,7 @@ Default property:
1235
834
  /* Event of subscription on connection */
1236
835
  subscriptionOnConnection?: Array<EventAction>
1237
836
  /* Server connections error of GraphQL subscription */
1238
- subscriptionOnConnectionError?: Array<
1239
- EventAction & {
1240
- eventPropertyMapping?: {
1241
- error: {
1242
- type: 'object'
1243
- path: string
1244
- }
1245
- }
1246
- }
1247
- >
837
+ subscriptionOnConnectionError?: Array<EventAction>
1248
838
  }
1249
839
  outlets?: {
1250
840
  /* Response for GraphQL request, it will save to Data */
@@ -1425,16 +1015,7 @@ Default property:
1425
1015
  /* Event on sound file loaded */
1426
1016
  onLoad?: Array<EventAction>
1427
1017
  /* Event on load error */
1428
- onLoadError?: Array<
1429
- EventAction & {
1430
- eventPropertyMapping?: {
1431
- error: {
1432
- type: 'string'
1433
- path: string
1434
- }
1435
- }
1436
- }
1437
- >
1018
+ onLoadError?: Array<EventAction>
1438
1019
  /* Event on sound play */
1439
1020
  onPlay?: Array<EventAction>
1440
1021
  /* Event on sound end */
@@ -1497,78 +1078,11 @@ Please note that the key code is not supported on iOS / tvOS, so it will use `ke
1497
1078
  }
1498
1079
  events?: {
1499
1080
  /* Event of key down */
1500
- onDown?: Array<
1501
- EventAction & {
1502
- eventPropertyMapping?: {
1503
- key: {
1504
- type: 'string'
1505
- path: string
1506
- }
1507
- keyNoMapping: {
1508
- type: 'string'
1509
- path: string
1510
- }
1511
- keyCode: {
1512
- type: 'string'
1513
- path: string
1514
- }
1515
- keyCodeNoMapping: {
1516
- type: 'string'
1517
- path: string
1518
- }
1519
- keyFlags: {
1520
- type: 'object'
1521
- path: string
1522
- }
1523
- keyDetails: {
1524
- type: 'object'
1525
- path: string
1526
- }
1527
- }
1528
- }
1529
- >
1081
+ onDown?: Array<EventAction>
1530
1082
  /* Event of key up */
1531
- onUp?: Array<
1532
- EventAction & {
1533
- eventPropertyMapping?: {
1534
- key: {
1535
- type: 'string'
1536
- path: string
1537
- }
1538
- keyNoMapping: {
1539
- type: 'string'
1540
- path: string
1541
- }
1542
- keyCode: {
1543
- type: 'string'
1544
- path: string
1545
- }
1546
- keyCodeNoMapping: {
1547
- type: 'string'
1548
- path: string
1549
- }
1550
- keyFlags: {
1551
- type: 'object'
1552
- path: string
1553
- }
1554
- keyDetails: {
1555
- type: 'object'
1556
- path: string
1557
- }
1558
- }
1559
- }
1560
- >
1083
+ onUp?: Array<EventAction>
1561
1084
  /* Event of batch input finished */
1562
- onBatch?: Array<
1563
- EventAction & {
1564
- eventPropertyMapping?: {
1565
- batchEvents: {
1566
- type: 'array'
1567
- path: string
1568
- }
1569
- }
1570
- }
1571
- >
1085
+ onBatch?: Array<EventAction>
1572
1086
  }
1573
1087
  outlets?: {
1574
1088
  /* Last key down code */
@@ -1627,22 +1141,22 @@ export type GeneratorWebSocketActionEmit = ActionWithParams & {
1627
1141
  params?: Array<
1628
1142
  | {
1629
1143
  input: 'eventName'
1630
- value?: string | DataLink
1144
+ value?: string | DataLink | EventProperty
1631
1145
  mapping?: string
1632
1146
  }
1633
1147
  | {
1634
1148
  input: 'arguments'
1635
- value?: Array<any> | DataLink
1149
+ value?: Array<any> | DataLink | EventProperty
1636
1150
  mapping?: string
1637
1151
  }
1638
1152
  | {
1639
1153
  input: 'acknowledgementType'
1640
- value?: 'text' | 'json' | DataLink
1154
+ value?: 'text' | 'json' | DataLink | EventProperty
1641
1155
  mapping?: string
1642
1156
  }
1643
1157
  | {
1644
1158
  input: 'withAcknowledgement'
1645
- value?: boolean | DataLink
1159
+ value?: boolean | DataLink | EventProperty
1646
1160
  mapping?: string
1647
1161
  }
1648
1162
  >
@@ -1653,7 +1167,7 @@ export type GeneratorWebSocketActionSend = ActionWithParams & {
1653
1167
  __actionName: 'GENERATOR_WEB_SOCKET_SEND'
1654
1168
  params?: Array<{
1655
1169
  input: 'value'
1656
- value?: string | DataLink
1170
+ value?: string | DataLink | EventProperty
1657
1171
  mapping?: string
1658
1172
  }>
1659
1173
  }
@@ -1705,16 +1219,7 @@ Default property:
1705
1219
  /* Event for disconnect from server */
1706
1220
  onClose?: Array<EventAction>
1707
1221
  /* Event for receive message */
1708
- onMessage?: Array<
1709
- EventAction & {
1710
- eventPropertyMapping?: {
1711
- message: {
1712
- type: 'any'
1713
- path: string
1714
- }
1715
- }
1716
- }
1717
- >
1222
+ onMessage?: Array<EventAction>
1718
1223
  /* Event for error occurred */
1719
1224
  onError?: Array<EventAction>
1720
1225
  }
@@ -1858,20 +1363,7 @@ Default property:
1858
1363
  }
1859
1364
  events?: {
1860
1365
  /* Event on step (If action is `event`) */
1861
- onStep?: Array<
1862
- EventAction & {
1863
- eventPropertyMapping?: {
1864
- payload: {
1865
- type: 'string'
1866
- path: string
1867
- }
1868
- index: {
1869
- type: 'number'
1870
- path: string
1871
- }
1872
- }
1873
- }
1874
- >
1366
+ onStep?: Array<EventAction>
1875
1367
  }
1876
1368
  outlets?: {
1877
1369
  /* Result of step payload (If action is `outlet`) */
@@ -1946,24 +1438,7 @@ Default property:
1946
1438
  }
1947
1439
  events?: {
1948
1440
  /* Event on iterate */
1949
- iterate?: Array<
1950
- EventAction & {
1951
- eventPropertyMapping?: {
1952
- iterateValue: {
1953
- type: 'any'
1954
- path: string
1955
- }
1956
- iterateKey: {
1957
- type: 'any'
1958
- path: string
1959
- }
1960
- iterateIndex: {
1961
- type: 'string'
1962
- path: string
1963
- }
1964
- }
1965
- }
1966
- >
1441
+ iterate?: Array<EventAction>
1967
1442
  /* Event on iterate round start */
1968
1443
  first?: Array<EventAction>
1969
1444
  /* Event on iterate round end */
@@ -2046,47 +1521,9 @@ Default property:
2046
1521
  }
2047
1522
  events?: {
2048
1523
  /* Event on specific sender id trigger event */
2049
- onEvent?: Array<
2050
- EventAction & {
2051
- eventPropertyMapping?: {
2052
- eventType: {
2053
- type: 'string'
2054
- path: string
2055
- }
2056
- eventTriggerType: {
2057
- type: 'string'
2058
- path: string
2059
- }
2060
- eventSenderId: {
2061
- type: 'string'
2062
- path: string
2063
- }
2064
- }
2065
- }
2066
- >
1524
+ onEvent?: Array<EventAction>
2067
1525
  /* Event on timeout */
2068
- onTimeout?: Array<
2069
- EventAction & {
2070
- eventPropertyMapping?: {
2071
- lastEventType: {
2072
- type: 'string'
2073
- path: string
2074
- }
2075
- lastEventTriggerType: {
2076
- type: 'string'
2077
- path: string
2078
- }
2079
- lastEventSenderId: {
2080
- type: 'string'
2081
- path: string
2082
- }
2083
- timeout: {
2084
- type: 'number'
2085
- path: string
2086
- }
2087
- }
2088
- }
2089
- >
1526
+ onTimeout?: Array<EventAction>
2090
1527
  }
2091
1528
  outlets?: {
2092
1529
  /* The last event */
@@ -2145,22 +1582,22 @@ export type GeneratorMQTTActionPublish = ActionWithParams & {
2145
1582
  params?: Array<
2146
1583
  | {
2147
1584
  input: 'topic'
2148
- value?: string | DataLink
1585
+ value?: string | DataLink | EventProperty
2149
1586
  mapping?: string
2150
1587
  }
2151
1588
  | {
2152
1589
  input: 'payload'
2153
- value?: any
1590
+ value?: any | EventProperty
2154
1591
  mapping?: string
2155
1592
  }
2156
1593
  | {
2157
1594
  input: 'qos'
2158
- value?: '0' | '1' | '2' | DataLink
1595
+ value?: '0' | '1' | '2' | DataLink | EventProperty
2159
1596
  mapping?: string
2160
1597
  }
2161
1598
  | {
2162
1599
  input: 'retain'
2163
- value?: boolean | DataLink
1600
+ value?: boolean | DataLink | EventProperty
2164
1601
  mapping?: string
2165
1602
  }
2166
1603
  >
@@ -2210,39 +1647,9 @@ Default property:
2210
1647
  /* When disconnected from MQTT broker */
2211
1648
  onDisconnected?: Array<EventAction>
2212
1649
  /* When error occurred */
2213
- onError?: Array<
2214
- EventAction & {
2215
- eventPropertyMapping?: {
2216
- errorMessage: {
2217
- type: 'string'
2218
- path: string
2219
- }
2220
- }
2221
- }
2222
- >
1650
+ onError?: Array<EventAction>
2223
1651
  /* When received message from MQTT broker within subscribe topic */
2224
- onMessage?: Array<
2225
- EventAction & {
2226
- eventPropertyMapping?: {
2227
- payload: {
2228
- type: 'any'
2229
- path: string
2230
- }
2231
- topic: {
2232
- type: 'string'
2233
- path: string
2234
- }
2235
- qos: {
2236
- type: 'number'
2237
- path: string
2238
- }
2239
- retain: {
2240
- type: 'bool'
2241
- path: string
2242
- }
2243
- }
2244
- }
2245
- >
1652
+ onMessage?: Array<EventAction>
2246
1653
  }
2247
1654
  outlets?: {
2248
1655
  /* Connected or not */
@@ -2289,17 +1696,17 @@ export type GeneratorMQTTBrokerActionPublish = ActionWithParams & {
2289
1696
  params?: Array<
2290
1697
  | {
2291
1698
  input: 'topic'
2292
- value?: string | DataLink
1699
+ value?: string | DataLink | EventProperty
2293
1700
  mapping?: string
2294
1701
  }
2295
1702
  | {
2296
1703
  input: 'payload'
2297
- value?: string | DataLink
1704
+ value?: string | DataLink | EventProperty
2298
1705
  mapping?: string
2299
1706
  }
2300
1707
  | {
2301
1708
  input: 'messageId'
2302
- value?: number | DataLink
1709
+ value?: number | DataLink | EventProperty
2303
1710
  mapping?: string
2304
1711
  }
2305
1712
  >
@@ -2347,68 +1754,15 @@ Default property:
2347
1754
  /* Event of MQTT server is ready */
2348
1755
  onReady?: Array<EventAction>
2349
1756
  /* Event of server or connection error */
2350
- onError?: Array<
2351
- EventAction & {
2352
- eventPropertyMapping?: {
2353
- errorMessage: {
2354
- type: 'string'
2355
- path: string
2356
- }
2357
- }
2358
- }
2359
- >
1757
+ onError?: Array<EventAction>
2360
1758
  /* Event of client connected */
2361
- onClientConnected?: Array<
2362
- EventAction & {
2363
- eventPropertyMapping?: {
2364
- clientId: {
2365
- type: 'string'
2366
- path: string
2367
- }
2368
- }
2369
- }
2370
- >
1759
+ onClientConnected?: Array<EventAction>
2371
1760
  /* Event of client disconnected */
2372
- onClientDisconnected?: Array<
2373
- EventAction & {
2374
- eventPropertyMapping?: {
2375
- clientId: {
2376
- type: 'string'
2377
- path: string
2378
- }
2379
- }
2380
- }
2381
- >
1761
+ onClientDisconnected?: Array<EventAction>
2382
1762
  /* Event of message received */
2383
- onMessageReceived?: Array<
2384
- EventAction & {
2385
- eventPropertyMapping?: {
2386
- topic: {
2387
- type: 'string'
2388
- path: string
2389
- }
2390
- payload: {
2391
- type: 'string'
2392
- path: string
2393
- }
2394
- }
2395
- }
2396
- >
1763
+ onMessageReceived?: Array<EventAction>
2397
1764
  /* Event of message published */
2398
- onMessagePublished?: Array<
2399
- EventAction & {
2400
- eventPropertyMapping?: {
2401
- clientId: {
2402
- type: 'string'
2403
- path: string
2404
- }
2405
- messageId: {
2406
- type: 'number'
2407
- path: string
2408
- }
2409
- }
2410
- }
2411
- >
1765
+ onMessagePublished?: Array<EventAction>
2412
1766
  }
2413
1767
  outlets?: {
2414
1768
  /* Is server started */
@@ -2457,7 +1811,7 @@ export type GeneratorBleCentralActionConnect = ActionWithParams & {
2457
1811
  __actionName: 'GENERATOR_BLE_CENTRAL_CONNECT'
2458
1812
  params?: Array<{
2459
1813
  input: 'deviceId'
2460
- value?: string | DataLink
1814
+ value?: string | DataLink | EventProperty
2461
1815
  mapping?: string
2462
1816
  }>
2463
1817
  }
@@ -2468,17 +1822,17 @@ export type GeneratorBleCentralActionReadCharacteristic = ActionWithParams & {
2468
1822
  params?: Array<
2469
1823
  | {
2470
1824
  input: 'deviceId'
2471
- value?: string | DataLink
1825
+ value?: string | DataLink | EventProperty
2472
1826
  mapping?: string
2473
1827
  }
2474
1828
  | {
2475
1829
  input: 'serviceId'
2476
- value?: string | DataLink
1830
+ value?: string | DataLink | EventProperty
2477
1831
  mapping?: string
2478
1832
  }
2479
1833
  | {
2480
1834
  input: 'characteristicId'
2481
- value?: string | DataLink
1835
+ value?: string | DataLink | EventProperty
2482
1836
  mapping?: string
2483
1837
  }
2484
1838
  >
@@ -2490,17 +1844,17 @@ export type GeneratorBleCentralActionMonitorCharacteristic = ActionWithParams &
2490
1844
  params?: Array<
2491
1845
  | {
2492
1846
  input: 'deviceId'
2493
- value?: string | DataLink
1847
+ value?: string | DataLink | EventProperty
2494
1848
  mapping?: string
2495
1849
  }
2496
1850
  | {
2497
1851
  input: 'serviceId'
2498
- value?: string | DataLink
1852
+ value?: string | DataLink | EventProperty
2499
1853
  mapping?: string
2500
1854
  }
2501
1855
  | {
2502
1856
  input: 'characteristicId'
2503
- value?: string | DataLink
1857
+ value?: string | DataLink | EventProperty
2504
1858
  mapping?: string
2505
1859
  }
2506
1860
  >
@@ -2512,17 +1866,17 @@ export type GeneratorBleCentralActionCancelMonitorCharacteristic = ActionWithPar
2512
1866
  params?: Array<
2513
1867
  | {
2514
1868
  input: 'deviceId'
2515
- value?: string | DataLink
1869
+ value?: string | DataLink | EventProperty
2516
1870
  mapping?: string
2517
1871
  }
2518
1872
  | {
2519
1873
  input: 'serviceId'
2520
- value?: string | DataLink
1874
+ value?: string | DataLink | EventProperty
2521
1875
  mapping?: string
2522
1876
  }
2523
1877
  | {
2524
1878
  input: 'characteristicId'
2525
- value?: string | DataLink
1879
+ value?: string | DataLink | EventProperty
2526
1880
  mapping?: string
2527
1881
  }
2528
1882
  >
@@ -2534,27 +1888,27 @@ export type GeneratorBleCentralActionWriteCharacteristic = ActionWithParams & {
2534
1888
  params?: Array<
2535
1889
  | {
2536
1890
  input: 'deviceId'
2537
- value?: string | DataLink
1891
+ value?: string | DataLink | EventProperty
2538
1892
  mapping?: string
2539
1893
  }
2540
1894
  | {
2541
1895
  input: 'serviceId'
2542
- value?: string | DataLink
1896
+ value?: string | DataLink | EventProperty
2543
1897
  mapping?: string
2544
1898
  }
2545
1899
  | {
2546
1900
  input: 'characteristicId'
2547
- value?: string | DataLink
1901
+ value?: string | DataLink | EventProperty
2548
1902
  mapping?: string
2549
1903
  }
2550
1904
  | {
2551
1905
  input: 'dataHex'
2552
- value?: string | DataLink
1906
+ value?: string | DataLink | EventProperty
2553
1907
  mapping?: string
2554
1908
  }
2555
1909
  | {
2556
1910
  input: 'writeWithoutResponse'
2557
- value?: boolean | DataLink
1911
+ value?: boolean | DataLink | EventProperty
2558
1912
  mapping?: string
2559
1913
  }
2560
1914
  >
@@ -2565,7 +1919,7 @@ export type GeneratorBleCentralActionDisconnect = ActionWithParams & {
2565
1919
  __actionName: 'GENERATOR_BLE_CENTRAL_DISCONNECT'
2566
1920
  params?: Array<{
2567
1921
  input: 'deviceId'
2568
- value?: string | DataLink
1922
+ value?: string | DataLink | EventProperty
2569
1923
  mapping?: string
2570
1924
  }>
2571
1925
  }
@@ -2608,94 +1962,21 @@ Default property:
2608
1962
  /* Event for state change */
2609
1963
  onStateChange?: Array<EventAction>
2610
1964
  /* Event for error occurred */
2611
- onError?: Array<
2612
- EventAction & {
2613
- eventPropertyMapping?: {
2614
- errorMessage: {
2615
- type: 'string'
2616
- path: string
2617
- }
2618
- }
2619
- }
2620
- >
1965
+ onError?: Array<EventAction>
2621
1966
  /* Event for start scan */
2622
1967
  onStartScan?: Array<EventAction>
2623
1968
  /* Event for stop scan */
2624
1969
  onStopScan?: Array<EventAction>
2625
1970
  /* Event for discover device */
2626
- onDiscoverDevice?: Array<
2627
- EventAction & {
2628
- eventPropertyMapping?: {
2629
- deviceInfo: {
2630
- type: 'object'
2631
- path: string
2632
- }
2633
- }
2634
- }
2635
- >
1971
+ onDiscoverDevice?: Array<EventAction>
2636
1972
  /* Event for device connected */
2637
- onConnectDevice?: Array<
2638
- EventAction & {
2639
- eventPropertyMapping?: {
2640
- deviceId: {
2641
- type: 'string'
2642
- path: string
2643
- }
2644
- characteristicList: {
2645
- type: 'array'
2646
- path: string
2647
- }
2648
- }
2649
- }
2650
- >
1973
+ onConnectDevice?: Array<EventAction>
2651
1974
  /* Event for device disconnected */
2652
1975
  onDisconnectDevice?: Array<EventAction>
2653
1976
  /* Event for receive on read */
2654
- onReadReceive?: Array<
2655
- EventAction & {
2656
- eventPropertyMapping?: {
2657
- deviceId: {
2658
- type: 'string'
2659
- path: string
2660
- }
2661
- serviceId: {
2662
- type: 'string'
2663
- path: string
2664
- }
2665
- characteristicId: {
2666
- type: 'string'
2667
- path: string
2668
- }
2669
- dataBase64: {
2670
- type: 'string'
2671
- path: string
2672
- }
2673
- }
2674
- }
2675
- >
1977
+ onReadReceive?: Array<EventAction>
2676
1978
  /* Event for receive on monitor */
2677
- onMonitorReceive?: Array<
2678
- EventAction & {
2679
- eventPropertyMapping?: {
2680
- deviceId: {
2681
- type: 'string'
2682
- path: string
2683
- }
2684
- serviceId: {
2685
- type: 'string'
2686
- path: string
2687
- }
2688
- characteristicId: {
2689
- type: 'string'
2690
- path: string
2691
- }
2692
- dataBase64: {
2693
- type: 'string'
2694
- path: string
2695
- }
2696
- }
2697
- }
2698
- >
1979
+ onMonitorReceive?: Array<EventAction>
2699
1980
  }
2700
1981
  outlets?: {
2701
1982
  /* Is scaning */
@@ -2750,12 +2031,12 @@ export type GeneratorSerialPortActionGeneratorSerialSendString = ActionWithParam
2750
2031
  params?: Array<
2751
2032
  | {
2752
2033
  input: 'generatorSerialStringValue'
2753
- value?: string | DataLink
2034
+ value?: string | DataLink | EventProperty
2754
2035
  mapping?: string
2755
2036
  }
2756
2037
  | {
2757
2038
  input: 'generatorSerialStringEncoding'
2758
- value?: string | DataLink
2039
+ value?: string | DataLink | EventProperty
2759
2040
  mapping?: string
2760
2041
  }
2761
2042
  >
@@ -2766,7 +2047,7 @@ export type GeneratorSerialPortActionGeneratorSerialSendHex = ActionWithParams &
2766
2047
  __actionName: 'GENERATOR_SERIAL_SEND_HEX'
2767
2048
  params?: Array<{
2768
2049
  input: 'generatorSerialHexValue'
2769
- value?: string | DataLink
2050
+ value?: string | DataLink | EventProperty
2770
2051
  mapping?: string
2771
2052
  }>
2772
2053
  }
@@ -2818,31 +2099,9 @@ Default property:
2818
2099
  /* Event for detach the device */
2819
2100
  generatorSerialOnDetach?: Array<EventAction>
2820
2101
  /* Event on error */
2821
- generatorSerialOnError?: Array<
2822
- EventAction & {
2823
- eventPropertyMapping?: {
2824
- generatorSerialErrorMessage: {
2825
- type: 'string'
2826
- path: string
2827
- }
2828
- }
2829
- }
2830
- >
2102
+ generatorSerialOnError?: Array<EventAction>
2831
2103
  /* Event for receive data */
2832
- generatorSerialOnData?: Array<
2833
- EventAction & {
2834
- eventPropertyMapping?: {
2835
- generatorSerialDataBase64: {
2836
- type: 'string'
2837
- path: string
2838
- }
2839
- generatorSerialDataString: {
2840
- type: 'string'
2841
- path: string
2842
- }
2843
- }
2844
- }
2845
- >
2104
+ generatorSerialOnData?: Array<EventAction>
2846
2105
  }
2847
2106
  outlets?: {
2848
2107
  /* Available serial devices */
@@ -2895,7 +2154,7 @@ export type GeneratorTCPActionSend = ActionWithParams & {
2895
2154
  __actionName: 'GENERATOR_TCP_SEND'
2896
2155
  params?: Array<{
2897
2156
  input: 'sendData'
2898
- value?: string | DataLink
2157
+ value?: string | DataLink | EventProperty
2899
2158
  mapping?: string
2900
2159
  }>
2901
2160
  }
@@ -2905,7 +2164,7 @@ export type GeneratorTCPActionEnd = ActionWithParams & {
2905
2164
  __actionName: 'GENERATOR_TCP_END'
2906
2165
  params?: Array<{
2907
2166
  input: 'endWithData'
2908
- value?: string | DataLink
2167
+ value?: string | DataLink | EventProperty
2909
2168
  mapping?: string
2910
2169
  }>
2911
2170
  }
@@ -2955,31 +2214,13 @@ Default property:
2955
2214
  /* Event of connect successful */
2956
2215
  onConnected?: Array<EventAction>
2957
2216
  /* Event of receive data */
2958
- onData?: Array<
2959
- EventAction & {
2960
- eventPropertyMapping?: {
2961
- data: {
2962
- type: 'string'
2963
- path: string
2964
- }
2965
- }
2966
- }
2967
- >
2217
+ onData?: Array<EventAction>
2968
2218
  /* Event of connection idle timeout */
2969
2219
  onTimeout?: Array<EventAction>
2970
2220
  /* Event of connection close */
2971
2221
  onClose?: Array<EventAction>
2972
2222
  /* Event of connection error */
2973
- onError?: Array<
2974
- EventAction & {
2975
- eventPropertyMapping?: {
2976
- errorMessage: {
2977
- type: 'string'
2978
- path: string
2979
- }
2980
- }
2981
- }
2982
- >
2223
+ onError?: Array<EventAction>
2983
2224
  }
2984
2225
  outlets?: {
2985
2226
  /* Connection status */
@@ -3024,12 +2265,12 @@ export type GeneratorTCPServerActionSend = ActionWithParams & {
3024
2265
  params?: Array<
3025
2266
  | {
3026
2267
  input: 'remote'
3027
- value?: string | DataLink
2268
+ value?: string | DataLink | EventProperty
3028
2269
  mapping?: string
3029
2270
  }
3030
2271
  | {
3031
2272
  input: 'sendData'
3032
- value?: string | DataLink
2273
+ value?: string | DataLink | EventProperty
3033
2274
  mapping?: string
3034
2275
  }
3035
2276
  >
@@ -3041,12 +2282,12 @@ export type GeneratorTCPServerActionEnd = ActionWithParams & {
3041
2282
  params?: Array<
3042
2283
  | {
3043
2284
  input: 'remote'
3044
- value?: string | DataLink
2285
+ value?: string | DataLink | EventProperty
3045
2286
  mapping?: string
3046
2287
  }
3047
2288
  | {
3048
2289
  input: 'generatorTcpClientEndWithData'
3049
- value?: string | DataLink
2290
+ value?: string | DataLink | EventProperty
3050
2291
  mapping?: string
3051
2292
  }
3052
2293
  >
@@ -3096,64 +2337,15 @@ Default property:
3096
2337
  /* Event of TCP server is ready */
3097
2338
  onReady?: Array<EventAction>
3098
2339
  /* Event of TCP server accept the connection */
3099
- onAcceptConnection?: Array<
3100
- EventAction & {
3101
- eventPropertyMapping?: {
3102
- remote: {
3103
- type: 'string'
3104
- path: string
3105
- }
3106
- }
3107
- }
3108
- >
2340
+ onAcceptConnection?: Array<EventAction>
3109
2341
  /* Event of receive data */
3110
- onData?: Array<
3111
- EventAction & {
3112
- eventPropertyMapping?: {
3113
- remote: {
3114
- type: 'string'
3115
- path: string
3116
- }
3117
- data: {
3118
- type: 'string'
3119
- path: string
3120
- }
3121
- }
3122
- }
3123
- >
2342
+ onData?: Array<EventAction>
3124
2343
  /* Event of connection idle timeout */
3125
- onTimeout?: Array<
3126
- EventAction & {
3127
- eventPropertyMapping?: {
3128
- remote: {
3129
- type: 'string'
3130
- path: string
3131
- }
3132
- }
3133
- }
3134
- >
2344
+ onTimeout?: Array<EventAction>
3135
2345
  /* Event of connection close */
3136
- onClose?: Array<
3137
- EventAction & {
3138
- eventPropertyMapping?: {
3139
- remote: {
3140
- type: 'string'
3141
- path: string
3142
- }
3143
- }
3144
- }
3145
- >
2346
+ onClose?: Array<EventAction>
3146
2347
  /* Event of server or connection error */
3147
- onError?: Array<
3148
- EventAction & {
3149
- eventPropertyMapping?: {
3150
- errorMessage: {
3151
- type: 'string'
3152
- path: string
3153
- }
3154
- }
3155
- }
3156
- >
2348
+ onError?: Array<EventAction>
3157
2349
  }
3158
2350
  outlets?: {
3159
2351
  /* Is server started */
@@ -3200,17 +2392,17 @@ export type GeneratorUDPActionSend = ActionWithParams & {
3200
2392
  params?: Array<
3201
2393
  | {
3202
2394
  input: 'targetHost'
3203
- value?: string | DataLink
2395
+ value?: string | DataLink | EventProperty
3204
2396
  mapping?: string
3205
2397
  }
3206
2398
  | {
3207
2399
  input: 'targetPort'
3208
- value?: number | DataLink
2400
+ value?: number | DataLink | EventProperty
3209
2401
  mapping?: string
3210
2402
  }
3211
2403
  | {
3212
2404
  input: 'sendData'
3213
- value?: string | DataLink
2405
+ value?: string | DataLink | EventProperty
3214
2406
  mapping?: string
3215
2407
  }
3216
2408
  >
@@ -3250,37 +2442,11 @@ Default property:
3250
2442
  /* Event of UDP port is binded */
3251
2443
  onReady?: Array<EventAction>
3252
2444
  /* Event of receive data */
3253
- onData?: Array<
3254
- EventAction & {
3255
- eventPropertyMapping?: {
3256
- remoteAddress: {
3257
- type: 'string'
3258
- path: string
3259
- }
3260
- remotePort: {
3261
- type: 'number'
3262
- path: string
3263
- }
3264
- data: {
3265
- type: 'string'
3266
- path: string
3267
- }
3268
- }
3269
- }
3270
- >
2445
+ onData?: Array<EventAction>
3271
2446
  /* Event of socket closeed */
3272
2447
  onClose?: Array<EventAction>
3273
2448
  /* Event of socket error */
3274
- onError?: Array<
3275
- EventAction & {
3276
- eventPropertyMapping?: {
3277
- errorMessage: {
3278
- type: 'string'
3279
- path: string
3280
- }
3281
- }
3282
- }
3283
- >
2449
+ onError?: Array<EventAction>
3284
2450
  }
3285
2451
  outlets?: {
3286
2452
  /* Local UDP binded port */
@@ -3413,67 +2579,15 @@ Default property:
3413
2579
  /* Event of HTTP server is ready */
3414
2580
  onReady?: Array<EventAction>
3415
2581
  /* Event of HTTP server accept the request */
3416
- onRequest?: Array<
3417
- EventAction & {
3418
- eventPropertyMapping?: {
3419
- clientAddress: {
3420
- type: 'string'
3421
- path: string
3422
- }
3423
- requestQuery: {
3424
- type: 'object'
3425
- path: string
3426
- }
3427
- requestHeaders: {
3428
- type: 'object'
3429
- path: string
3430
- }
3431
- requestBody: {
3432
- type: 'any'
3433
- path: string
3434
- }
3435
- }
3436
- }
3437
- >
2582
+ onRequest?: Array<EventAction>
3438
2583
  /* Event of client close connection */
3439
- onClientClose?: Array<
3440
- EventAction & {
3441
- eventPropertyMapping?: {
3442
- clientAddress: {
3443
- type: 'string'
3444
- path: string
3445
- }
3446
- }
3447
- }
3448
- >
2584
+ onClientClose?: Array<EventAction>
3449
2585
  /* Event of client error */
3450
- onClientError?: Array<
3451
- EventAction & {
3452
- eventPropertyMapping?: {
3453
- clientAddress: {
3454
- type: 'string'
3455
- path: string
3456
- }
3457
- errorMessage: {
3458
- type: 'string'
3459
- path: string
3460
- }
3461
- }
3462
- }
3463
- >
2586
+ onClientError?: Array<EventAction>
3464
2587
  /* Event of server close */
3465
2588
  onClose?: Array<EventAction>
3466
2589
  /* Event of server error */
3467
- onError?: Array<
3468
- EventAction & {
3469
- eventPropertyMapping?: {
3470
- errorMessage: {
3471
- type: 'string'
3472
- path: string
3473
- }
3474
- }
3475
- }
3476
- >
2590
+ onError?: Array<EventAction>
3477
2591
  }
3478
2592
  outlets?: {
3479
2593
  /* Query of request */
@@ -3517,7 +2631,7 @@ export type GeneratorWebRTCActionProcessInputSignal = ActionWithParams & {
3517
2631
  __actionName: 'GENERATOR_WEBRTC_PROCESS_INPUT_SIGNAL'
3518
2632
  params?: Array<{
3519
2633
  input: 'inputSignal'
3520
- value?: any
2634
+ value?: any | EventProperty
3521
2635
  mapping?: string
3522
2636
  }>
3523
2637
  }
@@ -3532,7 +2646,7 @@ export type GeneratorWebRTCActionChannelSend = ActionWithParams & {
3532
2646
  __actionName: 'GENERATOR_WEBRTC_CHANNEL_SEND'
3533
2647
  params?: Array<{
3534
2648
  input: 'textMessage'
3535
- value?: string | DataLink
2649
+ value?: string | DataLink | EventProperty
3536
2650
  mapping?: string
3537
2651
  }>
3538
2652
  }
@@ -3598,46 +2712,19 @@ Default property:
3598
2712
  }
3599
2713
  events?: {
3600
2714
  /* Event of signal update */
3601
- onSignalUpdate?: Array<
3602
- EventAction & {
3603
- eventPropertyMapping?: {
3604
- signal: {
3605
- type: 'any'
3606
- path: string
3607
- }
3608
- }
3609
- }
3610
- >
2715
+ onSignalUpdate?: Array<EventAction>
3611
2716
  /* Event of peer connected */
3612
2717
  onConnected?: Array<EventAction>
3613
2718
  /* Event of peer disconnected */
3614
2719
  onDisconnected?: Array<EventAction>
3615
2720
  /* Event of handshake error */
3616
- onError?: Array<
3617
- EventAction & {
3618
- eventPropertyMapping?: {
3619
- errorMessage: {
3620
- type: 'string'
3621
- path: string
3622
- }
3623
- }
3624
- }
3625
- >
2721
+ onError?: Array<EventAction>
3626
2722
  /* Event of data channel open */
3627
2723
  onChannelOpen?: Array<EventAction>
3628
2724
  /* Event of data channel close */
3629
2725
  onChannelClose?: Array<EventAction>
3630
2726
  /* Event of received message on data channel */
3631
- onChannelMessage?: Array<
3632
- EventAction & {
3633
- eventPropertyMapping?: {
3634
- textMessage: {
3635
- type: 'string'
3636
- path: string
3637
- }
3638
- }
3639
- }
3640
- >
2727
+ onChannelMessage?: Array<EventAction>
3641
2728
  }
3642
2729
  outlets?: {
3643
2730
  /* Signal to create peer connection */
@@ -3841,27 +2928,9 @@ Default property:
3841
2928
  }
3842
2929
  events?: {
3843
2930
  /* Event for chunk data (Base64 encoded PCM) */
3844
- chunk?: Array<
3845
- EventAction & {
3846
- eventPropertyMapping?: {
3847
- chunkData: {
3848
- type: 'string'
3849
- path: string
3850
- }
3851
- }
3852
- }
3853
- >
2931
+ chunk?: Array<EventAction>
3854
2932
  /* Event for recorded file */
3855
- recorded?: Array<
3856
- EventAction & {
3857
- eventPropertyMapping?: {
3858
- recordedPath: {
3859
- type: 'string'
3860
- path: string
3861
- }
3862
- }
3863
- }
3864
- >
2933
+ recorded?: Array<EventAction>
3865
2934
  }
3866
2935
  outlets?: {
3867
2936
  /* Is recording */
@@ -3908,22 +2977,22 @@ export type GeneratorBlePeripheralActionNotify = ActionWithParams & {
3908
2977
  params?: Array<
3909
2978
  | {
3910
2979
  input: 'serviceId'
3911
- value?: string | DataLink
2980
+ value?: string | DataLink | EventProperty
3912
2981
  mapping?: string
3913
2982
  }
3914
2983
  | {
3915
2984
  input: 'charId'
3916
- value?: string | DataLink
2985
+ value?: string | DataLink | EventProperty
3917
2986
  mapping?: string
3918
2987
  }
3919
2988
  | {
3920
2989
  input: 'value'
3921
- value?: string | DataLink
2990
+ value?: string | DataLink | EventProperty
3922
2991
  mapping?: string
3923
2992
  }
3924
2993
  | {
3925
2994
  input: 'encoding'
3926
- value?: 'utf8' | 'hex' | 'base64' | DataLink
2995
+ value?: 'utf8' | 'hex' | 'base64' | DataLink | EventProperty
3927
2996
  mapping?: string
3928
2997
  }
3929
2998
  >
@@ -4114,6 +3183,7 @@ Default property:
4114
3183
  "cameraType": "back",
4115
3184
  "cameraPosition": "top",
4116
3185
  "selectColumns": 3,
3186
+ "selectAutoColumns": true,
4117
3187
  "sizeFactor": 1,
4118
3188
  "containerBackgroundColor": "#ffffff",
4119
3189
  "titleColor": "#000000",
@@ -4378,6 +3448,8 @@ Default property:
4378
3448
  doneButtonText?: string | DataLink
4379
3449
  /* Select columns */
4380
3450
  selectColumns?: number | DataLink
3451
+ /* Select auto calculate columns */
3452
+ selectAutoColumns?: boolean | DataLink
4381
3453
  /* Fixed model width, default is auto */
4382
3454
  fixedModelWidth?: number | DataLink
4383
3455
  /* Fixed model height, default is auto */
@@ -4435,16 +3507,7 @@ Default property:
4435
3507
  /* Event of completed inquire */
4436
3508
  onCompleted?: Array<EventAction>
4437
3509
  /* Event of error occured */
4438
- onError?: Array<
4439
- EventAction & {
4440
- eventPropertyMapping?: {
4441
- errorMessage: {
4442
- type: 'string'
4443
- path: string
4444
- }
4445
- }
4446
- }
4447
- >
3510
+ onError?: Array<EventAction>
4448
3511
  }
4449
3512
  outlets?: {
4450
3513
  /* Result data */
@@ -4486,12 +3549,12 @@ export type GeneratorInformationActionShow = ActionWithParams & {
4486
3549
  params?: Array<
4487
3550
  | {
4488
3551
  input: 'displayLanguage'
4489
- value?: string | DataLink
3552
+ value?: string | DataLink | EventProperty
4490
3553
  mapping?: string
4491
3554
  }
4492
3555
  | {
4493
3556
  input: 'content'
4494
- value?: {} | DataLink
3557
+ value?: {} | DataLink | EventProperty
4495
3558
  mapping?: string
4496
3559
  }
4497
3560
  >
@@ -4537,16 +3600,7 @@ Default property:
4537
3600
  /* Trigger when user confirms the information */
4538
3601
  onConfirm?: Array<EventAction>
4539
3602
  /* Trigger when error occurs */
4540
- onError?: Array<
4541
- EventAction & {
4542
- eventPropertyMapping?: {
4543
- error: {
4544
- type: 'string'
4545
- path: string
4546
- }
4547
- }
4548
- }
4549
- >
3603
+ onError?: Array<EventAction>
4550
3604
  }
4551
3605
  outlets?: {
4552
3606
  /* Error message */
@@ -4582,37 +3636,37 @@ export type GeneratorIntentActionSendIntent = ActionWithParams & {
4582
3636
  params?: Array<
4583
3637
  | {
4584
3638
  input: 'action'
4585
- value?: string | DataLink
3639
+ value?: string | DataLink | EventProperty
4586
3640
  mapping?: string
4587
3641
  }
4588
3642
  | {
4589
3643
  input: 'data'
4590
- value?: string | DataLink
3644
+ value?: string | DataLink | EventProperty
4591
3645
  mapping?: string
4592
3646
  }
4593
3647
  | {
4594
3648
  input: 'type'
4595
- value?: string | DataLink
3649
+ value?: string | DataLink | EventProperty
4596
3650
  mapping?: string
4597
3651
  }
4598
3652
  | {
4599
3653
  input: 'extra'
4600
- value?: {} | DataLink
3654
+ value?: {} | DataLink | EventProperty
4601
3655
  mapping?: string
4602
3656
  }
4603
3657
  | {
4604
3658
  input: 'className'
4605
- value?: string | DataLink
3659
+ value?: string | DataLink | EventProperty
4606
3660
  mapping?: string
4607
3661
  }
4608
3662
  | {
4609
3663
  input: 'packageName'
4610
- value?: string | DataLink
3664
+ value?: string | DataLink | EventProperty
4611
3665
  mapping?: string
4612
3666
  }
4613
3667
  | {
4614
3668
  input: 'category'
4615
- value?: string | DataLink
3669
+ value?: string | DataLink | EventProperty
4616
3670
  mapping?: string
4617
3671
  }
4618
3672
  >
@@ -4641,35 +3695,9 @@ Default property:
4641
3695
  }
4642
3696
  events?: {
4643
3697
  /* On intent return a result trigger */
4644
- onResult?: Array<
4645
- EventAction & {
4646
- eventPropertyMapping?: {
4647
- resultCode: {
4648
- type: 'number'
4649
- path: string
4650
- }
4651
- resultData: {
4652
- type: 'string'
4653
- path: string
4654
- }
4655
- resultExtras: {
4656
- type: 'object'
4657
- path: string
4658
- }
4659
- }
4660
- }
4661
- >
3698
+ onResult?: Array<EventAction>
4662
3699
  /* On intent error trigger */
4663
- onError?: Array<
4664
- EventAction & {
4665
- eventPropertyMapping?: {
4666
- error: {
4667
- type: 'string'
4668
- path: string
4669
- }
4670
- }
4671
- }
4672
- >
3700
+ onError?: Array<EventAction>
4673
3701
  }
4674
3702
  outlets?: {
4675
3703
  /* Last intent result */
@@ -4715,12 +3743,12 @@ export type GeneratorTapPayT2PActionBind = ActionWithParams & {
4715
3743
  params?: Array<
4716
3744
  | {
4717
3745
  input: 'bindId'
4718
- value?: number | DataLink
3746
+ value?: number | DataLink | EventProperty
4719
3747
  mapping?: string
4720
3748
  }
4721
3749
  | {
4722
3750
  input: 'bindDescription'
4723
- value?: string | DataLink
3751
+ value?: string | DataLink | EventProperty
4724
3752
  mapping?: string
4725
3753
  }
4726
3754
  >
@@ -4742,17 +3770,17 @@ export type GeneratorTapPayT2PActionReadCardAndAuthorization = ActionWithParams
4742
3770
  params?: Array<
4743
3771
  | {
4744
3772
  input: 'amount'
4745
- value?: number | DataLink
3773
+ value?: number | DataLink | EventProperty
4746
3774
  mapping?: string
4747
3775
  }
4748
3776
  | {
4749
3777
  input: 'orderNumber'
4750
- value?: string | DataLink
3778
+ value?: string | DataLink | EventProperty
4751
3779
  mapping?: string
4752
3780
  }
4753
3781
  | {
4754
3782
  input: 'bankTransactionId'
4755
- value?: string | DataLink
3783
+ value?: string | DataLink | EventProperty
4756
3784
  mapping?: string
4757
3785
  }
4758
3786
  >
@@ -4764,17 +3792,17 @@ export type GeneratorTapPayT2PActionGetReceipt = ActionWithParams & {
4764
3792
  params?: Array<
4765
3793
  | {
4766
3794
  input: 'receiptIdentifier'
4767
- value?: string | DataLink
3795
+ value?: string | DataLink | EventProperty
4768
3796
  mapping?: string
4769
3797
  }
4770
3798
  | {
4771
3799
  input: 'type'
4772
- value?: 'html' | 'pkpass' | DataLink
3800
+ value?: 'html' | 'pkpass' | DataLink | EventProperty
4773
3801
  mapping?: string
4774
3802
  }
4775
3803
  | {
4776
3804
  input: 'email'
4777
- value?: string | DataLink
3805
+ value?: string | DataLink | EventProperty
4778
3806
  mapping?: string
4779
3807
  }
4780
3808
  >
@@ -4814,46 +3842,11 @@ Default property:
4814
3842
  /* <No doc yet> */
4815
3843
  readerStartConfiguring?: Array<EventAction>
4816
3844
  /* <No doc yet> */
4817
- readerEndConfiguring?: Array<
4818
- EventAction & {
4819
- eventPropertyMapping?: {
4820
- error: {
4821
- type: 'string'
4822
- path: string
4823
- }
4824
- }
4825
- }
4826
- >
3845
+ readerEndConfiguring?: Array<EventAction>
4827
3846
  /* <No doc yet> */
4828
- readerEventDidUpdated?: Array<
4829
- EventAction & {
4830
- eventPropertyMapping?: {
4831
- eventName: {
4832
- type: 'string'
4833
- path: string
4834
- }
4835
- eventData: {
4836
- type: 'any'
4837
- path: string
4838
- }
4839
- }
4840
- }
4841
- >
3847
+ readerEventDidUpdated?: Array<EventAction>
4842
3848
  /* <No doc yet> */
4843
- onError?: Array<
4844
- EventAction & {
4845
- eventPropertyMapping?: {
4846
- method: {
4847
- type: 'string'
4848
- path: string
4849
- }
4850
- error: {
4851
- type: 'string'
4852
- path: string
4853
- }
4854
- }
4855
- }
4856
- >
3849
+ onError?: Array<EventAction>
4857
3850
  }
4858
3851
  outlets?: {
4859
3852
  /* undefined */
@@ -4904,7 +3897,7 @@ export type GeneratorCastlesPayActionSale = ActionWithParams & {
4904
3897
  __actionName: 'GENERATOR_CASTLES_PAY_SALE'
4905
3898
  params?: Array<{
4906
3899
  input: 'amount'
4907
- value?: number | DataLink
3900
+ value?: number | DataLink | EventProperty
4908
3901
  mapping?: string
4909
3902
  }>
4910
3903
  }
@@ -4914,7 +3907,7 @@ export type GeneratorCastlesPayActionCancelTransaction = ActionWithParams & {
4914
3907
  __actionName: 'GENERATOR_CASTLES_PAY_CANCEL_TRANSACTION'
4915
3908
  params?: Array<{
4916
3909
  input: 'transactionId'
4917
- value?: string | DataLink
3910
+ value?: string | DataLink | EventProperty
4918
3911
  mapping?: string
4919
3912
  }>
4920
3913
  }
@@ -4932,27 +3925,9 @@ Default property:
4932
3925
  property?: {}
4933
3926
  events?: {
4934
3927
  /* Action Success */
4935
- onActionSuccess?: Array<
4936
- EventAction & {
4937
- eventPropertyMapping?: {
4938
- actionResult: {
4939
- type: 'object'
4940
- path: string
4941
- }
4942
- }
4943
- }
4944
- >
3928
+ onActionSuccess?: Array<EventAction>
4945
3929
  /* Action Error */
4946
- onActionError?: Array<
4947
- EventAction & {
4948
- eventPropertyMapping?: {
4949
- error: {
4950
- type: 'string'
4951
- path: string
4952
- }
4953
- }
4954
- }
4955
- >
3930
+ onActionError?: Array<EventAction>
4956
3931
  }
4957
3932
  outlets?: {
4958
3933
  /* Last Transaction Result */
@@ -5013,27 +3988,9 @@ Default property:
5013
3988
  /* Event for speech recognition end */
5014
3989
  onSpeechEnd?: Array<EventAction>
5015
3990
  /* Event for speech recognition results */
5016
- onSpeechResults?: Array<
5017
- EventAction & {
5018
- eventPropertyMapping?: {
5019
- recognizedText: {
5020
- type: 'string'
5021
- path: string
5022
- }
5023
- }
5024
- }
5025
- >
3991
+ onSpeechResults?: Array<EventAction>
5026
3992
  /* Event for speech recognition error */
5027
- onSpeechError?: Array<
5028
- EventAction & {
5029
- eventPropertyMapping?: {
5030
- error: {
5031
- type: 'string'
5032
- path: string
5033
- }
5034
- }
5035
- }
5036
- >
3993
+ onSpeechError?: Array<EventAction>
5037
3994
  }
5038
3995
  outlets?: {
5039
3996
  /* Recognized speech text */
@@ -5088,17 +4045,17 @@ export type GeneratorThermalPrinterActionPrint = ActionWithParams & {
5088
4045
  params?: Array<
5089
4046
  | {
5090
4047
  input: 'options'
5091
- value?: {} | DataLink
4048
+ value?: {} | DataLink | EventProperty
5092
4049
  mapping?: string
5093
4050
  }
5094
4051
  | {
5095
4052
  input: 'payload'
5096
- value?: Array<any> | DataLink
4053
+ value?: Array<any> | DataLink | EventProperty
5097
4054
  mapping?: string
5098
4055
  }
5099
4056
  | {
5100
4057
  input: 'rawCommands'
5101
- value?: string | DataLink
4058
+ value?: string | DataLink | EventProperty
5102
4059
  mapping?: string
5103
4060
  }
5104
4061
  >
@@ -5206,16 +4163,7 @@ Default property:
5206
4163
  }
5207
4164
  events?: {
5208
4165
  /* Event of connection error */
5209
- onError?: Array<
5210
- EventAction & {
5211
- eventPropertyMapping?: {
5212
- errorMessage: {
5213
- type: 'string'
5214
- path: string
5215
- }
5216
- }
5217
- }
5218
- >
4166
+ onError?: Array<EventAction>
5219
4167
  }
5220
4168
  outlets?: {
5221
4169
  /* Is thermal printer initialized */
@@ -5257,17 +4205,17 @@ export type GeneratorSqliteActionExecute = ActionWithParams & {
5257
4205
  params?: Array<
5258
4206
  | {
5259
4207
  input: 'sql'
5260
- value?: string | DataLink
4208
+ value?: string | DataLink | EventProperty
5261
4209
  mapping?: string
5262
4210
  }
5263
4211
  | {
5264
4212
  input: 'params'
5265
- value?: Array<any> | DataLink
4213
+ value?: Array<any> | DataLink | EventProperty
5266
4214
  mapping?: string
5267
4215
  }
5268
4216
  | {
5269
4217
  input: 'paramsString'
5270
- value?: string | DataLink
4218
+ value?: string | DataLink | EventProperty
5271
4219
  mapping?: string
5272
4220
  }
5273
4221
  >
@@ -5279,17 +4227,17 @@ export type GeneratorSqliteActionQuery = ActionWithParams & {
5279
4227
  params?: Array<
5280
4228
  | {
5281
4229
  input: 'sql'
5282
- value?: string | DataLink
4230
+ value?: string | DataLink | EventProperty
5283
4231
  mapping?: string
5284
4232
  }
5285
4233
  | {
5286
4234
  input: 'params'
5287
- value?: Array<any> | DataLink
4235
+ value?: Array<any> | DataLink | EventProperty
5288
4236
  mapping?: string
5289
4237
  }
5290
4238
  | {
5291
4239
  input: 'paramsString'
5292
- value?: string | DataLink
4240
+ value?: string | DataLink | EventProperty
5293
4241
  mapping?: string
5294
4242
  }
5295
4243
  >
@@ -5321,27 +4269,9 @@ Default property:
5321
4269
  }
5322
4270
  events?: {
5323
4271
  /* Event triggered when error occurs */
5324
- onError?: Array<
5325
- EventAction & {
5326
- eventPropertyMapping?: {
5327
- error: {
5328
- type: 'string'
5329
- path: string
5330
- }
5331
- }
5332
- }
5333
- >
4272
+ onError?: Array<EventAction>
5334
4273
  /* Event triggered when query result is ready */
5335
- onQueryResult?: Array<
5336
- EventAction & {
5337
- eventPropertyMapping?: {
5338
- queryResult: {
5339
- type: 'array'
5340
- path: string
5341
- }
5342
- }
5343
- }
5344
- >
4274
+ onQueryResult?: Array<EventAction>
5345
4275
  }
5346
4276
  outlets?: {
5347
4277
  /* Whether the database is ready */
@@ -5377,6 +4307,408 @@ export type GeneratorSqlite = Generator &
5377
4307
  >
5378
4308
  }
5379
4309
 
4310
+ /* Refresh tools and resources, used for case if tools or resources are changed. Note that the current connections will be closed. */
4311
+ export type GeneratorMCPServerActionRefreshResources = Action & {
4312
+ __actionName: 'GENERATOR_MCP_SERVER_REFRESH_RESOURCES'
4313
+ }
4314
+
4315
+ /* End stream */
4316
+ export type GeneratorMCPServerActionEndStream = Action & {
4317
+ __actionName: 'GENERATOR_MCP_SERVER_END_STREAM'
4318
+ }
4319
+
4320
+ interface GeneratorMCPServerDef {
4321
+ /*
4322
+ Default property:
4323
+ {
4324
+ "enabled": true,
4325
+ "listening": true,
4326
+ "authType": "none",
4327
+ "name": "bricks-foundation-mcp-server-default",
4328
+ "version": "1.0.0",
4329
+ "resources": [],
4330
+ "tools": []
4331
+ }
4332
+ */
4333
+ property?: {
4334
+ /* Enable MCP server. If enabled and Listening is false, the generator can still provide application-scoped resources. */
4335
+ enabled?: boolean | DataLink
4336
+ /* Start MCP server */
4337
+ listening?: boolean | DataLink
4338
+ /* HTTP server port */
4339
+ port?: number | DataLink
4340
+ /* Authorization type of HTTP request */
4341
+ authType?: 'none' | 'bearer' | DataLink
4342
+ /* Token of bearer auth */
4343
+ bearerToken?: string | DataLink
4344
+ /* Name of the MCP server */
4345
+ name?: string | DataLink
4346
+ /* Version of the MCP server */
4347
+ version?: string | DataLink
4348
+ /* Resources
4349
+ Type:
4350
+ `static`: Return static data
4351
+ `detect-data-change`: Watch data target change to return data,
4352
+ please update data with ({ id: string, content: string | object }),
4353
+ and ensure the id is same with request id
4354
+ `script`: Not implemented yet */
4355
+ resources?:
4356
+ | Array<
4357
+ | DataLink
4358
+ | {
4359
+ enabled?: boolean | DataLink
4360
+ name?: string | DataLink
4361
+ description?: string | DataLink
4362
+ uriOrTemplate?: string | DataLink
4363
+ type?: 'static' | 'detect-data-change' | 'script' | DataLink
4364
+ staticData?: any
4365
+ dataChangeConfig?:
4366
+ | DataLink
4367
+ | {
4368
+ target?: string | DataLink
4369
+ timeout?: number | DataLink
4370
+ payload?: any
4371
+ }
4372
+ scriptConfig?:
4373
+ | DataLink
4374
+ | {
4375
+ code?: string | DataLink
4376
+ timeout?: number | DataLink
4377
+ members?:
4378
+ | Array<
4379
+ | DataLink
4380
+ | {
4381
+ handler?: string | DataLink
4382
+ varName?: string | DataLink
4383
+ }
4384
+ >
4385
+ | DataLink
4386
+ payload?: any
4387
+ }
4388
+ }
4389
+ >
4390
+ | DataLink
4391
+ /* Tools
4392
+ Type:
4393
+ `detect-data-change`: Watch data target change to return data,
4394
+ please update data with ({ id: string, content: string | object }),
4395
+ and ensure the id is same with request id.
4396
+ `script`: Not implemented yet */
4397
+ tools?:
4398
+ | Array<
4399
+ | DataLink
4400
+ | {
4401
+ enabled?: boolean | DataLink
4402
+ name?: string | DataLink
4403
+ description?: string | DataLink
4404
+ params?: {} | DataLink
4405
+ type?: 'detect-data-change' | 'script' | DataLink
4406
+ dataChangeConfig?:
4407
+ | DataLink
4408
+ | {
4409
+ target?: string | DataLink
4410
+ timeout?: number | DataLink
4411
+ payload?: any
4412
+ }
4413
+ scriptConfig?:
4414
+ | DataLink
4415
+ | {
4416
+ code?: string | DataLink
4417
+ timeout?: number | DataLink
4418
+ members?:
4419
+ | Array<
4420
+ | DataLink
4421
+ | {
4422
+ handler?: string | DataLink
4423
+ varName?: string | DataLink
4424
+ }
4425
+ >
4426
+ | DataLink
4427
+ payload?: any
4428
+ }
4429
+ }
4430
+ >
4431
+ | DataLink
4432
+ }
4433
+ events?: {
4434
+ /* Listening of HTTP server */
4435
+ onListening?: Array<EventAction>
4436
+ /* Error of HTTP server */
4437
+ onError?: Array<EventAction>
4438
+ /* Client error of HTTP server */
4439
+ onClientError?: Array<EventAction>
4440
+ /* Client close of HTTP server */
4441
+ onClientClose?: Array<EventAction>
4442
+ /* On request resource (Request: { name: string, uri: string, params: object }) */
4443
+ onRequestResource?: Array<EventAction>
4444
+ /* On call tool (Request: { name: string, params: object }) */
4445
+ onCallTool?: Array<EventAction>
4446
+ }
4447
+ outlets?: {
4448
+ /* Whether the HTTP server is listening */
4449
+ isListening?: () => Data
4450
+ /* Last error of HTTP server */
4451
+ lastError?: () => Data
4452
+ /* Connected remotes (Session ID) */
4453
+ connectedRemotes?: () => Data
4454
+ /* Last resource request ({ name: string, uri: string, params: object }) */
4455
+ lastResourceRequest?: () => Data
4456
+ /* Last tool call ({ name: string, params: object }) */
4457
+ lastToolCall?: () => Data
4458
+ }
4459
+ }
4460
+
4461
+ /* Model Context Protocol (MCP) Server (https://docs.anthropic.com/en/docs/agents-and-tools/mcp) */
4462
+ export type GeneratorMCPServer = Generator &
4463
+ GeneratorMCPServerDef & {
4464
+ templateKey: 'GENERATOR_MCP_SERVER'
4465
+ switches: Array<
4466
+ SwitchDef &
4467
+ GeneratorMCPServerDef & {
4468
+ conds?: Array<{
4469
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
4470
+ cond:
4471
+ | SwitchCondInnerStateCurrentCanvas
4472
+ | SwitchCondData
4473
+ | {
4474
+ __typename: 'SwitchCondInnerStateOutlet'
4475
+ outlet:
4476
+ | 'isListening'
4477
+ | 'lastError'
4478
+ | 'connectedRemotes'
4479
+ | 'lastResourceRequest'
4480
+ | 'lastToolCall'
4481
+ value: any
4482
+ }
4483
+ }>
4484
+ }
4485
+ >
4486
+ }
4487
+
4488
+ /* Connect to MCP server */
4489
+ export type GeneratorMCPActionConnect = Action & {
4490
+ __actionName: 'GENERATOR_MCP_CONNECT'
4491
+ }
4492
+
4493
+ /* Disconnect from MCP server */
4494
+ export type GeneratorMCPActionDisconnect = Action & {
4495
+ __actionName: 'GENERATOR_MCP_DISCONNECT'
4496
+ }
4497
+
4498
+ /* List resources */
4499
+ export type GeneratorMCPActionListResources = ActionWithParams & {
4500
+ __actionName: 'GENERATOR_MCP_LIST_RESOURCES'
4501
+ params?: Array<{
4502
+ input: 'requestId'
4503
+ value?: string | DataLink | EventProperty
4504
+ mapping?: string
4505
+ }>
4506
+ }
4507
+
4508
+ /* List resource templates */
4509
+ export type GeneratorMCPActionListResourceTemplates = ActionWithParams & {
4510
+ __actionName: 'GENERATOR_MCP_LIST_RESOURCE_TEMPLATES'
4511
+ params?: Array<{
4512
+ input: 'requestId'
4513
+ value?: string | DataLink | EventProperty
4514
+ mapping?: string
4515
+ }>
4516
+ }
4517
+
4518
+ /* Read resource */
4519
+ export type GeneratorMCPActionReadResource = ActionWithParams & {
4520
+ __actionName: 'GENERATOR_MCP_READ_RESOURCE'
4521
+ params?: Array<
4522
+ | {
4523
+ input: 'requestId'
4524
+ value?: string | DataLink | EventProperty
4525
+ mapping?: string
4526
+ }
4527
+ | {
4528
+ input: 'uri'
4529
+ value?: string | DataLink | EventProperty
4530
+ mapping?: string
4531
+ }
4532
+ | {
4533
+ input: 'variables'
4534
+ value?: {} | DataLink | EventProperty
4535
+ mapping?: string
4536
+ }
4537
+ >
4538
+ }
4539
+
4540
+ /* List tools */
4541
+ export type GeneratorMCPActionListTools = ActionWithParams & {
4542
+ __actionName: 'GENERATOR_MCP_LIST_TOOLS'
4543
+ params?: Array<{
4544
+ input: 'requestId'
4545
+ value?: string | DataLink | EventProperty
4546
+ mapping?: string
4547
+ }>
4548
+ }
4549
+
4550
+ /* Call tool */
4551
+ export type GeneratorMCPActionCallTool = ActionWithParams & {
4552
+ __actionName: 'GENERATOR_MCP_CALL_TOOL'
4553
+ params?: Array<
4554
+ | {
4555
+ input: 'requestId'
4556
+ value?: string | DataLink | EventProperty
4557
+ mapping?: string
4558
+ }
4559
+ | {
4560
+ input: 'name'
4561
+ value?: string | DataLink | EventProperty
4562
+ mapping?: string
4563
+ }
4564
+ | {
4565
+ input: 'variables'
4566
+ value?: {} | DataLink | EventProperty
4567
+ mapping?: string
4568
+ }
4569
+ >
4570
+ }
4571
+
4572
+ interface GeneratorMCPDef {
4573
+ /*
4574
+ Default property:
4575
+ {
4576
+ "init": false,
4577
+ "type": "sse",
4578
+ "url": "",
4579
+ "autoReconnect": true,
4580
+ "maxReconnectAttempts": 10,
4581
+ "reconnectInterval": 1000,
4582
+ "generatorId": "",
4583
+ "name": "bricks-foundation-mcp-client-default",
4584
+ "version": "1.0.0",
4585
+ "ignoreResourceInList": [],
4586
+ "ignoreToolInList": [],
4587
+ "requestTimeout": 60000
4588
+ }
4589
+ */
4590
+ property?: {
4591
+ /* Initialize the MCP client on start */
4592
+ init?: boolean | DataLink
4593
+ /* Type of the MCP connection, e.g. sse or direct-link (generator) */
4594
+ type?: 'sse' | 'direct-link' | DataLink
4595
+ /* URL of the MCP server, e.g. http://localhost:19853/sse */
4596
+ url?: string | DataLink
4597
+ /* Whether to automatically reconnect to the MCP server */
4598
+ autoReconnect?: boolean | DataLink
4599
+ /* Maximum number of reconnection attempts */
4600
+ maxReconnectAttempts?: number | DataLink
4601
+ /* Reconnection interval in milliseconds */
4602
+ reconnectInterval?: number | DataLink
4603
+ /* SSE connection headers */
4604
+ sseHeaders?: {} | DataLink
4605
+ /* Send request headers */
4606
+ sendHeaders?: {} | DataLink
4607
+ /* Bearer token for authentication */
4608
+ bearerToken?: string | DataLink
4609
+ /* Generator MCPServer ID for direct link */
4610
+ generatorId?: string | DataLink
4611
+ /* Name of the MCP client */
4612
+ name?: string | DataLink
4613
+ /* Version of the MCP client */
4614
+ version?: string | DataLink
4615
+ /* Ignore resources in list response */
4616
+ ignoreResourceInList?: Array<string | DataLink> | DataLink
4617
+ /* Ignore tools in list response */
4618
+ ignoreToolInList?: Array<string | DataLink> | DataLink
4619
+ /* Request timeout in milliseconds */
4620
+ requestTimeout?: number | DataLink
4621
+ }
4622
+ events?: {
4623
+ /* On connected */
4624
+ onConnected?: Array<EventAction>
4625
+ /* On connection error */
4626
+ onConnectionError?: Array<EventAction>
4627
+ /* On disconnected */
4628
+ onDisconnected?: Array<EventAction>
4629
+ /* On list resources */
4630
+ onListResources?: Array<EventAction>
4631
+ /* On list resources error */
4632
+ onListResourcesError?: Array<EventAction>
4633
+ /* On list resource templates */
4634
+ onListResourceTemplates?: Array<EventAction>
4635
+ /* On list resource templates error */
4636
+ onListResourceTemplatesError?: Array<EventAction>
4637
+ /* On read resource */
4638
+ onReadResource?: Array<EventAction>
4639
+ /* On read resource error */
4640
+ onReadResourceError?: Array<EventAction>
4641
+ /* On list tools */
4642
+ onListTools?: Array<EventAction>
4643
+ /* On list tools error */
4644
+ onListToolsError?: Array<EventAction>
4645
+ /* On call tool */
4646
+ onCallTool?: Array<EventAction>
4647
+ /* On call tool error */
4648
+ onCallToolError?: Array<EventAction>
4649
+ }
4650
+ outlets?: {
4651
+ /* Connection state */
4652
+ connectionState?: () => Data
4653
+ /* List resources response */
4654
+ listResourcesResponse?: () => Data
4655
+ /* List resources error */
4656
+ listResourcesError?: () => Data
4657
+ /* List resource templates response */
4658
+ listResourceTemplatesResponse?: () => Data
4659
+ /* List resource templates error */
4660
+ listResourceTemplatesError?: () => Data
4661
+ /* Read resource response */
4662
+ readResourceResponse?: () => Data
4663
+ /* Read resource error */
4664
+ readResourceError?: () => Data
4665
+ /* List tools response */
4666
+ listToolsResponse?: () => Data
4667
+ /* List tools error */
4668
+ listToolsError?: () => Data
4669
+ /* Call tool response */
4670
+ callToolResponse?: () => Data
4671
+ /* Call tool error */
4672
+ callToolError?: () => Data
4673
+ /* Last error */
4674
+ lastError?: () => Data
4675
+ }
4676
+ }
4677
+
4678
+ /* Model Context Protocol (MCP) Client, support SSE and Generator MCPServer direct link */
4679
+ export type GeneratorMCP = Generator &
4680
+ GeneratorMCPDef & {
4681
+ templateKey: 'GENERATOR_MCP'
4682
+ switches: Array<
4683
+ SwitchDef &
4684
+ GeneratorMCPDef & {
4685
+ conds?: Array<{
4686
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
4687
+ cond:
4688
+ | SwitchCondInnerStateCurrentCanvas
4689
+ | SwitchCondData
4690
+ | {
4691
+ __typename: 'SwitchCondInnerStateOutlet'
4692
+ outlet:
4693
+ | 'connectionState'
4694
+ | 'listResourcesResponse'
4695
+ | 'listResourcesError'
4696
+ | 'listResourceTemplatesResponse'
4697
+ | 'listResourceTemplatesError'
4698
+ | 'readResourceResponse'
4699
+ | 'readResourceError'
4700
+ | 'listToolsResponse'
4701
+ | 'listToolsError'
4702
+ | 'callToolResponse'
4703
+ | 'callToolError'
4704
+ | 'lastError'
4705
+ value: any
4706
+ }
4707
+ }>
4708
+ }
4709
+ >
4710
+ }
4711
+
5380
4712
  /* Load the model */
5381
4713
  export type GeneratorTTSActionLoadModel = Action & {
5382
4714
  __actionName: 'GENERATOR_TTS_LOAD_MODEL'
@@ -5387,7 +4719,7 @@ export type GeneratorTTSActionGenerate = ActionWithParams & {
5387
4719
  __actionName: 'GENERATOR_TTS_GENERATE'
5388
4720
  params?: Array<{
5389
4721
  input: 'text'
5390
- value?: string | DataLink
4722
+ value?: string | DataLink | EventProperty
5391
4723
  mapping?: string
5392
4724
  }>
5393
4725
  }
@@ -5498,27 +4830,9 @@ Default property:
5498
4830
  }
5499
4831
  events?: {
5500
4832
  /* Event triggered when state change */
5501
- onContextStateChange?: Array<
5502
- EventAction & {
5503
- eventPropertyMapping?: {
5504
- contextState: {
5505
- type: 'string'
5506
- path: string
5507
- }
5508
- }
5509
- }
5510
- >
4833
+ onContextStateChange?: Array<EventAction>
5511
4834
  /* Event triggered when error occurs */
5512
- onError?: Array<
5513
- EventAction & {
5514
- eventPropertyMapping?: {
5515
- error: {
5516
- type: 'string'
5517
- path: string
5518
- }
5519
- }
5520
- }
5521
- >
4835
+ onError?: Array<EventAction>
5522
4836
  }
5523
4837
  outlets?: {
5524
4838
  /* Context state */
@@ -5564,12 +4878,12 @@ export type GeneratorOnnxLLMActionInfer = ActionWithParams & {
5564
4878
  params?: Array<
5565
4879
  | {
5566
4880
  input: 'prompt'
5567
- value?: string | DataLink
4881
+ value?: string | DataLink | EventProperty
5568
4882
  mapping?: string
5569
4883
  }
5570
4884
  | {
5571
4885
  input: 'chat'
5572
- value?: Array<any> | DataLink
4886
+ value?: Array<any> | DataLink | EventProperty
5573
4887
  mapping?: string
5574
4888
  }
5575
4889
  >
@@ -5719,27 +5033,9 @@ Default property:
5719
5033
  }
5720
5034
  events?: {
5721
5035
  /* Event triggered when state change */
5722
- onContextStateChange?: Array<
5723
- EventAction & {
5724
- eventPropertyMapping?: {
5725
- contextState: {
5726
- type: 'string'
5727
- path: string
5728
- }
5729
- }
5730
- }
5731
- >
5036
+ onContextStateChange?: Array<EventAction>
5732
5037
  /* Event triggered when error occurs */
5733
- onError?: Array<
5734
- EventAction & {
5735
- eventPropertyMapping?: {
5736
- error: {
5737
- type: 'string'
5738
- path: string
5739
- }
5740
- }
5741
- }
5742
- >
5038
+ onError?: Array<EventAction>
5743
5039
  }
5744
5040
  outlets?: {
5745
5041
  /* Context state */
@@ -5784,7 +5080,7 @@ export type GeneratorOnnxSTTActionInfer = ActionWithParams & {
5784
5080
  __actionName: 'GENERATOR_ONNX_STT_INFER'
5785
5081
  params?: Array<{
5786
5082
  input: 'audioUri'
5787
- value?: string | DataLink
5083
+ value?: string | DataLink | EventProperty
5788
5084
  mapping?: string
5789
5085
  }>
5790
5086
  }
@@ -5975,27 +5271,9 @@ Default property:
5975
5271
  }
5976
5272
  events?: {
5977
5273
  /* Event triggered when state change */
5978
- onContextStateChange?: Array<
5979
- EventAction & {
5980
- eventPropertyMapping?: {
5981
- contextState: {
5982
- type: 'string'
5983
- path: string
5984
- }
5985
- }
5986
- }
5987
- >
5274
+ onContextStateChange?: Array<EventAction>
5988
5275
  /* Event triggered when error occurs */
5989
- onError?: Array<
5990
- EventAction & {
5991
- eventPropertyMapping?: {
5992
- error: {
5993
- type: 'string'
5994
- path: string
5995
- }
5996
- }
5997
- }
5998
- >
5276
+ onError?: Array<EventAction>
5999
5277
  }
6000
5278
  outlets?: {
6001
5279
  /* Context state */
@@ -6041,27 +5319,27 @@ export type GeneratorSpeechInferenceActionTranscribeFile = ActionWithParams & {
6041
5319
  params?: Array<
6042
5320
  | {
6043
5321
  input: 'fileUrl'
6044
- value?: string | DataLink
5322
+ value?: string | DataLink | EventProperty
6045
5323
  mapping?: string
6046
5324
  }
6047
5325
  | {
6048
5326
  input: 'prompt'
6049
- value?: string | DataLink
5327
+ value?: string | DataLink | EventProperty
6050
5328
  mapping?: string
6051
5329
  }
6052
5330
  | {
6053
5331
  input: 'beamSize'
6054
- value?: number | DataLink
5332
+ value?: number | DataLink | EventProperty
6055
5333
  mapping?: string
6056
5334
  }
6057
5335
  | {
6058
5336
  input: 'language'
6059
- value?: string | DataLink
5337
+ value?: string | DataLink | EventProperty
6060
5338
  mapping?: string
6061
5339
  }
6062
5340
  | {
6063
5341
  input: 'translate'
6064
- value?: boolean | DataLink
5342
+ value?: boolean | DataLink | EventProperty
6065
5343
  mapping?: string
6066
5344
  }
6067
5345
  >
@@ -6073,27 +5351,27 @@ export type GeneratorSpeechInferenceActionTranscribeData = ActionWithParams & {
6073
5351
  params?: Array<
6074
5352
  | {
6075
5353
  input: 'data'
6076
- value?: any
5354
+ value?: any | EventProperty
6077
5355
  mapping?: string
6078
5356
  }
6079
5357
  | {
6080
5358
  input: 'prompt'
6081
- value?: string | DataLink
5359
+ value?: string | DataLink | EventProperty
6082
5360
  mapping?: string
6083
5361
  }
6084
5362
  | {
6085
5363
  input: 'beamSize'
6086
- value?: number | DataLink
5364
+ value?: number | DataLink | EventProperty
6087
5365
  mapping?: string
6088
5366
  }
6089
5367
  | {
6090
5368
  input: 'language'
6091
- value?: string | DataLink
5369
+ value?: string | DataLink | EventProperty
6092
5370
  mapping?: string
6093
5371
  }
6094
5372
  | {
6095
5373
  input: 'translate'
6096
- value?: boolean | DataLink
5374
+ value?: boolean | DataLink | EventProperty
6097
5375
  mapping?: string
6098
5376
  }
6099
5377
  >
@@ -6105,62 +5383,62 @@ export type GeneratorSpeechInferenceActionTranscribeRealtime = ActionWithParams
6105
5383
  params?: Array<
6106
5384
  | {
6107
5385
  input: 'prompt'
6108
- value?: string | DataLink
5386
+ value?: string | DataLink | EventProperty
6109
5387
  mapping?: string
6110
5388
  }
6111
5389
  | {
6112
5390
  input: 'beamSize'
6113
- value?: number | DataLink
5391
+ value?: number | DataLink | EventProperty
6114
5392
  mapping?: string
6115
5393
  }
6116
5394
  | {
6117
5395
  input: 'language'
6118
- value?: string | DataLink
5396
+ value?: string | DataLink | EventProperty
6119
5397
  mapping?: string
6120
5398
  }
6121
5399
  | {
6122
5400
  input: 'translate'
6123
- value?: boolean | DataLink
5401
+ value?: boolean | DataLink | EventProperty
6124
5402
  mapping?: string
6125
5403
  }
6126
5404
  | {
6127
5405
  input: 'realtimeAudioSeconds'
6128
- value?: number | DataLink
5406
+ value?: number | DataLink | EventProperty
6129
5407
  mapping?: string
6130
5408
  }
6131
5409
  | {
6132
5410
  input: 'realtimeAudioSliceSeconds'
6133
- value?: number | DataLink
5411
+ value?: number | DataLink | EventProperty
6134
5412
  mapping?: string
6135
5413
  }
6136
5414
  | {
6137
5415
  input: 'realtimeAudioMinSeconds'
6138
- value?: number | DataLink
5416
+ value?: number | DataLink | EventProperty
6139
5417
  mapping?: string
6140
5418
  }
6141
5419
  | {
6142
5420
  input: 'realtimeSaveAudio'
6143
- value?: boolean | DataLink
5421
+ value?: boolean | DataLink | EventProperty
6144
5422
  mapping?: string
6145
5423
  }
6146
5424
  | {
6147
5425
  input: 'realtimeVadEnabled'
6148
- value?: boolean | DataLink
5426
+ value?: boolean | DataLink | EventProperty
6149
5427
  mapping?: string
6150
5428
  }
6151
5429
  | {
6152
5430
  input: 'realtimeVadMs'
6153
- value?: number | DataLink
5431
+ value?: number | DataLink | EventProperty
6154
5432
  mapping?: string
6155
5433
  }
6156
5434
  | {
6157
5435
  input: 'realtimeVadThold'
6158
- value?: number | DataLink
5436
+ value?: number | DataLink | EventProperty
6159
5437
  mapping?: string
6160
5438
  }
6161
5439
  | {
6162
5440
  input: 'realtimeVadFreqThold'
6163
- value?: number | DataLink
5441
+ value?: number | DataLink | EventProperty
6164
5442
  mapping?: string
6165
5443
  }
6166
5444
  >
@@ -6415,54 +5693,11 @@ Default property:
6415
5693
  }
6416
5694
  events?: {
6417
5695
  /* Event triggered when load is done */
6418
- onContextStateChange?: Array<
6419
- EventAction & {
6420
- eventPropertyMapping?: {
6421
- contextState: {
6422
- type: 'string'
6423
- path: string
6424
- }
6425
- contextDetails: {
6426
- type: 'object'
6427
- path: string
6428
- }
6429
- }
6430
- }
6431
- >
5696
+ onContextStateChange?: Array<EventAction>
6432
5697
  /* Event triggered when error occurs */
6433
- onError?: Array<
6434
- EventAction & {
6435
- eventPropertyMapping?: {
6436
- error: {
6437
- type: 'string'
6438
- path: string
6439
- }
6440
- }
6441
- }
6442
- >
5698
+ onError?: Array<EventAction>
6443
5699
  /* Event triggered when got transcribe result */
6444
- onTranscribed?: Array<
6445
- EventAction & {
6446
- eventPropertyMapping?: {
6447
- transcribeResult: {
6448
- type: 'string'
6449
- path: string
6450
- }
6451
- transcribeStartTime: {
6452
- type: 'number'
6453
- path: string
6454
- }
6455
- transcribeEndTime: {
6456
- type: 'number'
6457
- path: string
6458
- }
6459
- transcribeTime: {
6460
- type: 'number'
6461
- path: string
6462
- }
6463
- }
6464
- }
6465
- >
5700
+ onTranscribed?: Array<EventAction>
6466
5701
  /* Event triggered when transcribe realtime done */
6467
5702
  onRealtimeStop?: Array<EventAction>
6468
5703
  }
@@ -6524,52 +5759,52 @@ export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
6524
5759
  params?: Array<
6525
5760
  | {
6526
5761
  input: 'sessionKey'
6527
- value?: string | DataLink
5762
+ value?: string | DataLink | EventProperty
6528
5763
  mapping?: string
6529
5764
  }
6530
5765
  | {
6531
5766
  input: 'mode'
6532
- value?: string | DataLink
5767
+ value?: string | DataLink | EventProperty
6533
5768
  mapping?: string
6534
5769
  }
6535
5770
  | {
6536
5771
  input: 'messages'
6537
- value?: Array<any> | DataLink
5772
+ value?: Array<any> | DataLink | EventProperty
6538
5773
  mapping?: string
6539
5774
  }
6540
5775
  | {
6541
5776
  input: 'tools'
6542
- value?: Array<any> | DataLink
5777
+ value?: Array<any> | DataLink | EventProperty
6543
5778
  mapping?: string
6544
5779
  }
6545
5780
  | {
6546
5781
  input: 'parallelToolCalls'
6547
- value?: boolean | DataLink
5782
+ value?: boolean | DataLink | EventProperty
6548
5783
  mapping?: string
6549
5784
  }
6550
5785
  | {
6551
5786
  input: 'toolChoice'
6552
- value?: string | DataLink
5787
+ value?: string | DataLink | EventProperty
6553
5788
  mapping?: string
6554
5789
  }
6555
5790
  | {
6556
5791
  input: 'prompt'
6557
- value?: string | DataLink
5792
+ value?: string | DataLink | EventProperty
6558
5793
  mapping?: string
6559
5794
  }
6560
5795
  | {
6561
5796
  input: 'promptTemplateData'
6562
- value?: {} | DataLink
5797
+ value?: {} | DataLink | EventProperty
6563
5798
  mapping?: string
6564
5799
  }
6565
5800
  | {
6566
5801
  input: 'promptTemplateType'
6567
- value?: string | DataLink
5802
+ value?: string | DataLink | EventProperty
6568
5803
  mapping?: string
6569
5804
  }
6570
5805
  | {
6571
5806
  input: 'responseFormat'
6572
- value?: {} | DataLink
5807
+ value?: {} | DataLink | EventProperty
6573
5808
  mapping?: string
6574
5809
  }
6575
5810
  >
@@ -6581,187 +5816,187 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
6581
5816
  params?: Array<
6582
5817
  | {
6583
5818
  input: 'sessionKey'
6584
- value?: string | DataLink
5819
+ value?: string | DataLink | EventProperty
6585
5820
  mapping?: string
6586
5821
  }
6587
5822
  | {
6588
5823
  input: 'mode'
6589
- value?: string | DataLink
5824
+ value?: string | DataLink | EventProperty
6590
5825
  mapping?: string
6591
5826
  }
6592
5827
  | {
6593
5828
  input: 'messages'
6594
- value?: Array<any> | DataLink
5829
+ value?: Array<any> | DataLink | EventProperty
6595
5830
  mapping?: string
6596
5831
  }
6597
5832
  | {
6598
5833
  input: 'tools'
6599
- value?: Array<any> | DataLink
5834
+ value?: Array<any> | DataLink | EventProperty
6600
5835
  mapping?: string
6601
5836
  }
6602
5837
  | {
6603
5838
  input: 'parallelToolCalls'
6604
- value?: boolean | DataLink
5839
+ value?: boolean | DataLink | EventProperty
6605
5840
  mapping?: string
6606
5841
  }
6607
5842
  | {
6608
5843
  input: 'toolChoice'
6609
- value?: string | DataLink
5844
+ value?: string | DataLink | EventProperty
6610
5845
  mapping?: string
6611
5846
  }
6612
5847
  | {
6613
5848
  input: 'prompt'
6614
- value?: string | DataLink
5849
+ value?: string | DataLink | EventProperty
6615
5850
  mapping?: string
6616
5851
  }
6617
5852
  | {
6618
5853
  input: 'promptTemplateData'
6619
- value?: {} | DataLink
5854
+ value?: {} | DataLink | EventProperty
6620
5855
  mapping?: string
6621
5856
  }
6622
5857
  | {
6623
5858
  input: 'promptTemplateType'
6624
- value?: string | DataLink
5859
+ value?: string | DataLink | EventProperty
6625
5860
  mapping?: string
6626
5861
  }
6627
5862
  | {
6628
5863
  input: 'responseFormat'
6629
- value?: {} | DataLink
5864
+ value?: {} | DataLink | EventProperty
6630
5865
  mapping?: string
6631
5866
  }
6632
5867
  | {
6633
5868
  input: 'grammar'
6634
- value?: string | DataLink
5869
+ value?: string | DataLink | EventProperty
6635
5870
  mapping?: string
6636
5871
  }
6637
5872
  | {
6638
5873
  input: 'stopWords'
6639
- value?: Array<any> | DataLink
5874
+ value?: Array<any> | DataLink | EventProperty
6640
5875
  mapping?: string
6641
5876
  }
6642
5877
  | {
6643
5878
  input: 'predict'
6644
- value?: number | DataLink
5879
+ value?: number | DataLink | EventProperty
6645
5880
  mapping?: string
6646
5881
  }
6647
5882
  | {
6648
5883
  input: 'temperature'
6649
- value?: number | DataLink
5884
+ value?: number | DataLink | EventProperty
6650
5885
  mapping?: string
6651
5886
  }
6652
5887
  | {
6653
5888
  input: 'probs'
6654
- value?: number | DataLink
5889
+ value?: number | DataLink | EventProperty
6655
5890
  mapping?: string
6656
5891
  }
6657
5892
  | {
6658
5893
  input: 'topK'
6659
- value?: number | DataLink
5894
+ value?: number | DataLink | EventProperty
6660
5895
  mapping?: string
6661
5896
  }
6662
5897
  | {
6663
5898
  input: 'topP'
6664
- value?: number | DataLink
5899
+ value?: number | DataLink | EventProperty
6665
5900
  mapping?: string
6666
5901
  }
6667
5902
  | {
6668
5903
  input: 'xtcThreshold'
6669
- value?: number | DataLink
5904
+ value?: number | DataLink | EventProperty
6670
5905
  mapping?: string
6671
5906
  }
6672
5907
  | {
6673
5908
  input: 'xtcProbability'
6674
- value?: number | DataLink
5909
+ value?: number | DataLink | EventProperty
6675
5910
  mapping?: string
6676
5911
  }
6677
5912
  | {
6678
5913
  input: 'dryMultiplier'
6679
- value?: number | DataLink
5914
+ value?: number | DataLink | EventProperty
6680
5915
  mapping?: string
6681
5916
  }
6682
5917
  | {
6683
5918
  input: 'dryBase'
6684
- value?: number | DataLink
5919
+ value?: number | DataLink | EventProperty
6685
5920
  mapping?: string
6686
5921
  }
6687
5922
  | {
6688
5923
  input: 'dryAllowedLength'
6689
- value?: number | DataLink
5924
+ value?: number | DataLink | EventProperty
6690
5925
  mapping?: string
6691
5926
  }
6692
5927
  | {
6693
5928
  input: 'dryPenaltyLastN'
6694
- value?: number | DataLink
5929
+ value?: number | DataLink | EventProperty
6695
5930
  mapping?: string
6696
5931
  }
6697
5932
  | {
6698
5933
  input: 'drySequenceBreakers'
6699
- value?: Array<any> | DataLink
5934
+ value?: Array<any> | DataLink | EventProperty
6700
5935
  mapping?: string
6701
5936
  }
6702
5937
  | {
6703
5938
  input: 'mirostat'
6704
- value?: number | DataLink
5939
+ value?: number | DataLink | EventProperty
6705
5940
  mapping?: string
6706
5941
  }
6707
5942
  | {
6708
5943
  input: 'mirostatTau'
6709
- value?: number | DataLink
5944
+ value?: number | DataLink | EventProperty
6710
5945
  mapping?: string
6711
5946
  }
6712
5947
  | {
6713
5948
  input: 'mirostatEta'
6714
- value?: number | DataLink
5949
+ value?: number | DataLink | EventProperty
6715
5950
  mapping?: string
6716
5951
  }
6717
5952
  | {
6718
5953
  input: 'penaltyLastN'
6719
- value?: number | DataLink
5954
+ value?: number | DataLink | EventProperty
6720
5955
  mapping?: string
6721
5956
  }
6722
5957
  | {
6723
5958
  input: 'penaltyRepeat'
6724
- value?: number | DataLink
5959
+ value?: number | DataLink | EventProperty
6725
5960
  mapping?: string
6726
5961
  }
6727
5962
  | {
6728
5963
  input: 'penaltyFrequency'
6729
- value?: number | DataLink
5964
+ value?: number | DataLink | EventProperty
6730
5965
  mapping?: string
6731
5966
  }
6732
5967
  | {
6733
5968
  input: 'penaltyPresent'
6734
- value?: number | DataLink
5969
+ value?: number | DataLink | EventProperty
6735
5970
  mapping?: string
6736
5971
  }
6737
5972
  | {
6738
5973
  input: 'penalizeNewline'
6739
- value?: boolean | DataLink
5974
+ value?: boolean | DataLink | EventProperty
6740
5975
  mapping?: string
6741
5976
  }
6742
5977
  | {
6743
5978
  input: 'seed'
6744
- value?: number | DataLink
5979
+ value?: number | DataLink | EventProperty
6745
5980
  mapping?: string
6746
5981
  }
6747
5982
  | {
6748
5983
  input: 'typicalP'
6749
- value?: number | DataLink
5984
+ value?: number | DataLink | EventProperty
6750
5985
  mapping?: string
6751
5986
  }
6752
5987
  | {
6753
5988
  input: 'ignoreEos'
6754
- value?: boolean | DataLink
5989
+ value?: boolean | DataLink | EventProperty
6755
5990
  mapping?: string
6756
5991
  }
6757
5992
  | {
6758
5993
  input: 'functionCallEnabled'
6759
- value?: boolean | DataLink
5994
+ value?: boolean | DataLink | EventProperty
6760
5995
  mapping?: string
6761
5996
  }
6762
5997
  | {
6763
5998
  input: 'functionCallSchema'
6764
- value?: Array<any> | DataLink
5999
+ value?: Array<any> | DataLink | EventProperty
6765
6000
  mapping?: string
6766
6001
  }
6767
6002
  >
@@ -6773,12 +6008,12 @@ export type GeneratorLLMActionClearSession = ActionWithParams & {
6773
6008
  params?: Array<
6774
6009
  | {
6775
6010
  input: 'sessionId'
6776
- value?: string | DataLink
6011
+ value?: string | DataLink | EventProperty
6777
6012
  mapping?: string
6778
6013
  }
6779
6014
  | {
6780
6015
  input: 'sessionCustomKey'
6781
- value?: string | DataLink
6016
+ value?: string | DataLink | EventProperty
6782
6017
  mapping?: string
6783
6018
  }
6784
6019
  >
@@ -7011,104 +6246,15 @@ Default property:
7011
6246
  }
7012
6247
  events?: {
7013
6248
  /* Event triggered when load is done */
7014
- onContextStateChange?: Array<
7015
- EventAction & {
7016
- eventPropertyMapping?: {
7017
- contextState: {
7018
- type: 'string'
7019
- path: string
7020
- }
7021
- contextDetails: {
7022
- type: 'object'
7023
- path: string
7024
- }
7025
- }
7026
- }
7027
- >
6249
+ onContextStateChange?: Array<EventAction>
7028
6250
  /* Event triggered when error occurs */
7029
- onError?: Array<
7030
- EventAction & {
7031
- eventPropertyMapping?: {
7032
- error: {
7033
- type: 'string'
7034
- path: string
7035
- }
7036
- }
7037
- }
7038
- >
6251
+ onError?: Array<EventAction>
7039
6252
  /* Event triggered when completion */
7040
- onCompletion?: Array<
7041
- EventAction & {
7042
- eventPropertyMapping?: {
7043
- completionSessionKey: {
7044
- type: 'string'
7045
- path: string
7046
- }
7047
- completionResult: {
7048
- type: 'string'
7049
- path: string
7050
- }
7051
- completionFullContext: {
7052
- type: 'string'
7053
- path: string
7054
- }
7055
- completionResultDetails: {
7056
- type: 'object'
7057
- path: string
7058
- }
7059
- }
7060
- }
7061
- >
6253
+ onCompletion?: Array<EventAction>
7062
6254
  /* Event triggered when completion finished */
7063
- onCompletionFinished?: Array<
7064
- EventAction & {
7065
- eventPropertyMapping?: {
7066
- completionSessionKey: {
7067
- type: 'string'
7068
- path: string
7069
- }
7070
- completionResult: {
7071
- type: 'string'
7072
- path: string
7073
- }
7074
- completionToolCalls: {
7075
- type: 'array'
7076
- path: string
7077
- }
7078
- completionFullContext: {
7079
- type: 'string'
7080
- path: string
7081
- }
7082
- completionResultDetails: {
7083
- type: 'object'
7084
- path: string
7085
- }
7086
- }
7087
- }
7088
- >
6255
+ onCompletionFinished?: Array<EventAction>
7089
6256
  /* Event triggered on get function call request */
7090
- onCompletionFunctionCall?: Array<
7091
- EventAction & {
7092
- eventPropertyMapping?: {
7093
- completionSessionKey: {
7094
- type: 'string'
7095
- path: string
7096
- }
7097
- completionFunctionCallName: {
7098
- type: 'string'
7099
- path: string
7100
- }
7101
- completionFunctionArguments: {
7102
- type: 'object'
7103
- path: string
7104
- }
7105
- completionFunctionDetails: {
7106
- type: 'object'
7107
- path: string
7108
- }
7109
- }
7110
- }
7111
- >
6257
+ onCompletionFunctionCall?: Array<EventAction>
7112
6258
  }
7113
6259
  outlets?: {
7114
6260
  /* Context state */
@@ -7173,63 +6319,223 @@ export type GeneratorLLM = Generator &
7173
6319
  >
7174
6320
  }
7175
6321
 
6322
+ /* Load the model */
6323
+ export type GeneratorQnnLlmActionLoadModel = Action & {
6324
+ __actionName: 'GENERATOR_QNN_LLM_LOAD_MODEL'
6325
+ }
6326
+
6327
+ /* Abort model download */
6328
+ export type GeneratorQnnLlmActionAbortModelDownload = Action & {
6329
+ __actionName: 'GENERATOR_QNN_LLM_ABORT_MODEL_DOWNLOAD'
6330
+ }
6331
+
6332
+ /* Generate text */
6333
+ export type GeneratorQnnLlmActionGenerate = ActionWithParams & {
6334
+ __actionName: 'GENERATOR_QNN_LLM_GENERATE'
6335
+ params?: Array<
6336
+ | {
6337
+ input: 'prompt'
6338
+ value?: string | DataLink | EventProperty
6339
+ mapping?: string
6340
+ }
6341
+ | {
6342
+ input: 'messages'
6343
+ value?: Array<any> | DataLink | EventProperty
6344
+ mapping?: string
6345
+ }
6346
+ >
6347
+ }
6348
+
6349
+ /* Abort generation */
6350
+ export type GeneratorQnnLlmActionAbortGeneration = Action & {
6351
+ __actionName: 'GENERATOR_QNN_LLM_ABORT_GENERATION'
6352
+ }
6353
+
6354
+ /* Release context */
6355
+ export type GeneratorQnnLlmActionReleaseContext = Action & {
6356
+ __actionName: 'GENERATOR_QNN_LLM_RELEASE_CONTEXT'
6357
+ }
6358
+
6359
+ interface GeneratorQnnLlmDef {
6360
+ /*
6361
+ Default property:
6362
+ {
6363
+ "modelType": "Llama 3.2 3B Chat",
6364
+ "chatFormat": "Llama 3.x",
6365
+ "toolCallParser": "llama3_json",
6366
+ "toolChoice": "auto",
6367
+ "parallelToolCalls": false,
6368
+ "greedy": false
6369
+ }
6370
+ */
6371
+ property?: {
6372
+ /* Load model context when generator is initialized */
6373
+ init?: boolean | DataLink
6374
+ /* Model type */
6375
+ modelType?:
6376
+ | 'Llama 3 8B Chat'
6377
+ | 'Llama 3.1 8B Chat'
6378
+ | 'Llama 3.2 3B Chat'
6379
+ | 'Mistral 7B Instruct v0.3'
6380
+ | 'Qwen 2 7B Chat'
6381
+ | 'Phi 3.5 Mini'
6382
+ | 'Granite v3.1 8B Instruct'
6383
+ | 'Custom'
6384
+ | DataLink
6385
+ /* SOC model */
6386
+ socModel?: 'X Elite' | 'X Plus' | '8 Elite' | '8 Gen 3' | 'QCS8550' | DataLink
6387
+ /* Custom model base URL
6388
+ The URL directory should contain `config.json` (model config) file, `model_part_*_of_*.bin` (model split files) files and `tokenizer.json` (tokenizer config) file. */
6389
+ customModelUrl?: string | DataLink
6390
+ /* Custom model split parts */
6391
+ customModelSplitParts?: number | DataLink
6392
+ /* Chat format */
6393
+ chatFormat?: 'Llama 2' | 'Llama 3' | 'Llama 3.x' | 'Mistral v0.3' | 'Qwen 2' | DataLink
6394
+ /* Custom chat format template */
6395
+ customChatFormat?: string | DataLink
6396
+ /* Prompt to generate */
6397
+ prompt?: string | DataLink
6398
+ /* Chat messages */
6399
+ messages?:
6400
+ | Array<
6401
+ | DataLink
6402
+ | {
6403
+ role?: string | DataLink
6404
+ content?: string | DataLink
6405
+ }
6406
+ >
6407
+ | DataLink
6408
+ /* Stop words */
6409
+ stopWords?: Array<string | DataLink> | DataLink
6410
+ /* Tool call parser */
6411
+ toolCallParser?: 'llama3_json' | 'mistral' | DataLink
6412
+ /* Tools for chat mode */
6413
+ tools?: {} | DataLink
6414
+ /* Tool choice for chat mode */
6415
+ toolChoice?: 'none' | 'auto' | 'required' | DataLink
6416
+ /* Enable parallel tool calls */
6417
+ parallelToolCalls?: boolean | DataLink
6418
+ /* Number of threads, -1 to use n-threads from model config */
6419
+ nThreads?: number | DataLink
6420
+ /* Temperature, -1 to use temperature from model config */
6421
+ temperature?: number | DataLink
6422
+ /* Seed, -1 to use seed from model config */
6423
+ seed?: number | DataLink
6424
+ /* Top K, -1 to use top-k from model config */
6425
+ topK?: number | DataLink
6426
+ /* Top P, -1 to use top-p from model config */
6427
+ topP?: number | DataLink
6428
+ /* Greedy, use greedy sampling */
6429
+ greedy?: boolean | DataLink
6430
+ }
6431
+ events?: {
6432
+ /* Event triggered when load is done */
6433
+ onContextStateChange?: Array<EventAction>
6434
+ /* Event triggered when generate is done */
6435
+ onGenerate?: Array<EventAction>
6436
+ /* Event triggered on get function call request */
6437
+ onFunctionCall?: Array<EventAction>
6438
+ /* Event triggered when error occurs */
6439
+ onError?: Array<EventAction>
6440
+ }
6441
+ outlets?: {
6442
+ /* Context state */
6443
+ contextState?: () => Data
6444
+ /* Generation result */
6445
+ result?: () => Data
6446
+ /* Full context (Prompt + Generation Result) */
6447
+ fullContext?: () => Data
6448
+ /* Last function call details */
6449
+ lastFunctionCall?: () => Data
6450
+ /* Completion details */
6451
+ completionDetails?: () => Data
6452
+ }
6453
+ }
6454
+
6455
+ /* Local LLM inference using Qualcomm AI Engine */
6456
+ export type GeneratorQnnLlm = Generator &
6457
+ GeneratorQnnLlmDef & {
6458
+ templateKey: 'GENERATOR_QNN_LLM'
6459
+ switches: Array<
6460
+ SwitchDef &
6461
+ GeneratorQnnLlmDef & {
6462
+ conds?: Array<{
6463
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
6464
+ cond:
6465
+ | SwitchCondInnerStateCurrentCanvas
6466
+ | SwitchCondData
6467
+ | {
6468
+ __typename: 'SwitchCondInnerStateOutlet'
6469
+ outlet:
6470
+ | 'contextState'
6471
+ | 'result'
6472
+ | 'fullContext'
6473
+ | 'lastFunctionCall'
6474
+ | 'completionDetails'
6475
+ value: any
6476
+ }
6477
+ }>
6478
+ }
6479
+ >
6480
+ }
6481
+
7176
6482
  /* Run text completion */
7177
6483
  export type GeneratorOpenAILLMActionCompletion = ActionWithParams & {
7178
6484
  __actionName: 'GENERATOR_OPENAI_LLM_COMPLETION'
7179
6485
  params?: Array<
7180
6486
  | {
7181
6487
  input: 'messages'
7182
- value?: Array<any> | DataLink
6488
+ value?: Array<any> | DataLink | EventProperty
7183
6489
  mapping?: string
7184
6490
  }
7185
6491
  | {
7186
6492
  input: 'maxTokens'
7187
- value?: number | DataLink
6493
+ value?: number | DataLink | EventProperty
7188
6494
  mapping?: string
7189
6495
  }
7190
6496
  | {
7191
6497
  input: 'temperature'
7192
- value?: number | DataLink
6498
+ value?: number | DataLink | EventProperty
7193
6499
  mapping?: string
7194
6500
  }
7195
6501
  | {
7196
6502
  input: 'topP'
7197
- value?: number | DataLink
6503
+ value?: number | DataLink | EventProperty
7198
6504
  mapping?: string
7199
6505
  }
7200
6506
  | {
7201
6507
  input: 'frequencyPenalty'
7202
- value?: number | DataLink
6508
+ value?: number | DataLink | EventProperty
7203
6509
  mapping?: string
7204
6510
  }
7205
6511
  | {
7206
6512
  input: 'presencePenalty'
7207
- value?: number | DataLink
6513
+ value?: number | DataLink | EventProperty
7208
6514
  mapping?: string
7209
6515
  }
7210
6516
  | {
7211
6517
  input: 'stop'
7212
- value?: Array<any> | DataLink
6518
+ value?: Array<any> | DataLink | EventProperty
7213
6519
  mapping?: string
7214
6520
  }
7215
6521
  | {
7216
6522
  input: 'tools'
7217
- value?: {} | DataLink
6523
+ value?: {} | DataLink | EventProperty
7218
6524
  mapping?: string
7219
6525
  }
7220
6526
  | {
7221
6527
  input: 'toolChoice'
7222
- value?: string | DataLink
6528
+ value?: string | DataLink | EventProperty
7223
6529
  mapping?: string
7224
6530
  }
7225
6531
  | {
7226
6532
  input: 'parallelToolCalls'
7227
- value?: boolean | DataLink
6533
+ value?: boolean | DataLink | EventProperty
7228
6534
  mapping?: string
7229
6535
  }
7230
6536
  | {
7231
6537
  input: 'responseFormat'
7232
- value?: {} | DataLink
6538
+ value?: {} | DataLink | EventProperty
7233
6539
  mapping?: string
7234
6540
  }
7235
6541
  >
@@ -7316,61 +6622,13 @@ Default property:
7316
6622
  }
7317
6623
  events?: {
7318
6624
  /* Error event */
7319
- onError?: Array<
7320
- EventAction & {
7321
- eventPropertyMapping?: {
7322
- error: {
7323
- type: 'string'
7324
- path: string
7325
- }
7326
- }
7327
- }
7328
- >
6625
+ onError?: Array<EventAction>
7329
6626
  /* Completion event */
7330
- onCompletion?: Array<
7331
- EventAction & {
7332
- eventPropertyMapping?: {
7333
- completionResult: {
7334
- type: 'string'
7335
- path: string
7336
- }
7337
- completionDetails: {
7338
- type: 'object'
7339
- path: string
7340
- }
7341
- }
7342
- }
7343
- >
6627
+ onCompletion?: Array<EventAction>
7344
6628
  /* Completion finished event */
7345
- onCompletionFinished?: Array<
7346
- EventAction & {
7347
- eventPropertyMapping?: {
7348
- completionResult: {
7349
- type: 'string'
7350
- path: string
7351
- }
7352
- toolCalls: {
7353
- type: 'array'
7354
- path: string
7355
- }
7356
- }
7357
- }
7358
- >
6629
+ onCompletionFinished?: Array<EventAction>
7359
6630
  /* Completion function call event */
7360
- onCompletionFunctionCall?: Array<
7361
- EventAction & {
7362
- eventPropertyMapping?: {
7363
- completionFunctionCallName: {
7364
- type: 'string'
7365
- path: string
7366
- }
7367
- completionFunctionArguments: {
7368
- type: 'string'
7369
- path: string
7370
- }
7371
- }
7372
- }
7373
- >
6631
+ onCompletionFunctionCall?: Array<EventAction>
7374
6632
  }
7375
6633
  outlets?: {
7376
6634
  /* Evaluating outlet */
@@ -7410,58 +6668,156 @@ export type GeneratorOpenAILLM = Generator &
7410
6668
  >
7411
6669
  }
7412
6670
 
6671
+ /* Generate audio */
6672
+ export type GeneratorOpenAiTTSActionGenerate = ActionWithParams & {
6673
+ __actionName: 'GENERATOR_OPENAI_TTS_GENERATE'
6674
+ params?: Array<{
6675
+ input: 'text'
6676
+ value?: string | DataLink | EventProperty
6677
+ mapping?: string
6678
+ }>
6679
+ }
6680
+
6681
+ /* Clean cache */
6682
+ export type GeneratorOpenAiTTSActionCleanCache = Action & {
6683
+ __actionName: 'GENERATOR_OPENAI_TTS_CLEAN_CACHE'
6684
+ }
6685
+
6686
+ interface GeneratorOpenAiTTSDef {
6687
+ /*
6688
+ Default property:
6689
+ {
6690
+ "apiEndpoint": "https://api.openai.com/v1",
6691
+ "model": "tts-1",
6692
+ "voice": "alloy",
6693
+ "speed": 1,
6694
+ "outputType": "play",
6695
+ "playbackVolume": 100,
6696
+ "cacheGenerated": true,
6697
+ "autoInferEnable": false,
6698
+ "softBreakRegex": "^[^\\r\\n\\t\\f\\v]*([\\r\\n]+|[。!?!?.]\\B)",
6699
+ "hardBreakTime": 500
6700
+ }
6701
+ */
6702
+ property?: {
6703
+ /* API endpoint URL */
6704
+ apiEndpoint?: string | DataLink
6705
+ /* OpenAI API Key */
6706
+ apiKey?: string | DataLink
6707
+ /* OpenAI TTS model */
6708
+ model?: string | DataLink
6709
+ /* Voice to use
6710
+ Select voice from https://openai.fm , default alloy */
6711
+ voice?: string | DataLink
6712
+ /* Additional instructions for the speech generation */
6713
+ instructions?: string | DataLink
6714
+ /* Speed of the generated audio */
6715
+ speed?: number | DataLink
6716
+ /* Output mode */
6717
+ outputType?: 'play' | 'file' | DataLink
6718
+ /* Playback volume (0 - 100) */
6719
+ playbackVolume?: number | DataLink
6720
+ /* Enable cache for generated audio */
6721
+ cacheGenerated?: boolean | DataLink
6722
+ /* Text to generate */
6723
+ prompt?: string | DataLink
6724
+ /* Auto inference when prompt changes */
6725
+ autoInferEnable?: boolean | DataLink
6726
+ /* Segmentation rule for auto inference */
6727
+ softBreakRegex?: string | DataLink
6728
+ /* Time to force inference when softBreakRegex is not satisfied */
6729
+ hardBreakTime?: number | DataLink
6730
+ }
6731
+ events?: {
6732
+ /* Event triggered when state change */
6733
+ onContextStateChange?: Array<EventAction>
6734
+ /* Event triggered when error occurs */
6735
+ onError?: Array<EventAction>
6736
+ }
6737
+ outlets?: {
6738
+ /* Context state */
6739
+ contextState?: () => Data
6740
+ /* Generated audio file */
6741
+ generatedAudio?: () => Data
6742
+ /* Generated audio file is playing */
6743
+ generatedAudioPlaying?: () => Data
6744
+ }
6745
+ }
6746
+
6747
+ /* Generate speech from text using OpenAI's Text-to-Speech API */
6748
+ export type GeneratorOpenAiTTS = Generator &
6749
+ GeneratorOpenAiTTSDef & {
6750
+ templateKey: 'GENERATOR_OPENAI_TTS'
6751
+ switches: Array<
6752
+ SwitchDef &
6753
+ GeneratorOpenAiTTSDef & {
6754
+ conds?: Array<{
6755
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
6756
+ cond:
6757
+ | SwitchCondInnerStateCurrentCanvas
6758
+ | SwitchCondData
6759
+ | {
6760
+ __typename: 'SwitchCondInnerStateOutlet'
6761
+ outlet: 'contextState' | 'generatedAudio' | 'generatedAudioPlaying'
6762
+ value: any
6763
+ }
6764
+ }>
6765
+ }
6766
+ >
6767
+ }
6768
+
7413
6769
  /* Add a message to the assistant */
7414
6770
  export type GeneratorAssistantActionAddMessage = ActionWithParams & {
7415
6771
  __actionName: 'GENERATOR_ASSISTANT_ADD_MESSAGE'
7416
6772
  params?: Array<
7417
6773
  | {
7418
6774
  input: 'role'
7419
- value?: string | DataLink
6775
+ value?: string | DataLink | EventProperty
7420
6776
  mapping?: string
7421
6777
  }
7422
6778
  | {
7423
6779
  input: 'content'
7424
- value?: string | DataLink
6780
+ value?: string | DataLink | EventProperty
7425
6781
  mapping?: string
7426
6782
  }
7427
6783
  | {
7428
6784
  input: 'payload'
7429
- value?: {} | DataLink
6785
+ value?: {} | DataLink | EventProperty
7430
6786
  mapping?: string
7431
6787
  }
7432
6788
  | {
7433
6789
  input: 'useFileSearch'
7434
- value?: boolean | DataLink
6790
+ value?: boolean | DataLink | EventProperty
7435
6791
  mapping?: string
7436
6792
  }
7437
6793
  | {
7438
6794
  input: 'filePath'
7439
- value?: string | DataLink
6795
+ value?: string | DataLink | EventProperty
7440
6796
  mapping?: string
7441
6797
  }
7442
6798
  | {
7443
6799
  input: 'fileName'
7444
- value?: string | DataLink
6800
+ value?: string | DataLink | EventProperty
7445
6801
  mapping?: string
7446
6802
  }
7447
6803
  | {
7448
6804
  input: 'fileExtension'
7449
- value?: string | DataLink
6805
+ value?: string | DataLink | EventProperty
7450
6806
  mapping?: string
7451
6807
  }
7452
6808
  | {
7453
6809
  input: 'filePayload'
7454
- value?: {} | DataLink
6810
+ value?: {} | DataLink | EventProperty
7455
6811
  mapping?: string
7456
6812
  }
7457
6813
  | {
7458
6814
  input: 'fileSearchCitationCount'
7459
- value?: number | DataLink
6815
+ value?: number | DataLink | EventProperty
7460
6816
  mapping?: string
7461
6817
  }
7462
6818
  | {
7463
6819
  input: 'fileSearchInsertMethod'
7464
- value?: 'in-user-message' | 'new-assistant-message' | DataLink
6820
+ value?: 'in-user-message' | 'new-assistant-message' | DataLink | EventProperty
7465
6821
  mapping?: string
7466
6822
  }
7467
6823
  >
@@ -7473,17 +6829,17 @@ export type GeneratorAssistantActionUpdateMessageAtIndex = ActionWithParams & {
7473
6829
  params?: Array<
7474
6830
  | {
7475
6831
  input: 'index'
7476
- value?: number | DataLink
6832
+ value?: number | DataLink | EventProperty
7477
6833
  mapping?: string
7478
6834
  }
7479
6835
  | {
7480
6836
  input: 'content'
7481
- value?: string | DataLink
6837
+ value?: string | DataLink | EventProperty
7482
6838
  mapping?: string
7483
6839
  }
7484
6840
  | {
7485
6841
  input: 'payload'
7486
- value?: {} | DataLink
6842
+ value?: {} | DataLink | EventProperty
7487
6843
  mapping?: string
7488
6844
  }
7489
6845
  >
@@ -7495,57 +6851,57 @@ export type GeneratorAssistantActionAddAudioMessage = ActionWithParams & {
7495
6851
  params?: Array<
7496
6852
  | {
7497
6853
  input: 'role'
7498
- value?: string | DataLink
6854
+ value?: string | DataLink | EventProperty
7499
6855
  mapping?: string
7500
6856
  }
7501
6857
  | {
7502
6858
  input: 'contentFile'
7503
- value?: string | DataLink
6859
+ value?: string | DataLink | EventProperty
7504
6860
  mapping?: string
7505
6861
  }
7506
6862
  | {
7507
6863
  input: 'contentBase64'
7508
- value?: string | DataLink
6864
+ value?: string | DataLink | EventProperty
7509
6865
  mapping?: string
7510
6866
  }
7511
6867
  | {
7512
6868
  input: 'useFileSearch'
7513
- value?: boolean | DataLink
6869
+ value?: boolean | DataLink | EventProperty
7514
6870
  mapping?: string
7515
6871
  }
7516
6872
  | {
7517
6873
  input: 'payload'
7518
- value?: {} | DataLink
6874
+ value?: {} | DataLink | EventProperty
7519
6875
  mapping?: string
7520
6876
  }
7521
6877
  | {
7522
6878
  input: 'filePath'
7523
- value?: string | DataLink
6879
+ value?: string | DataLink | EventProperty
7524
6880
  mapping?: string
7525
6881
  }
7526
6882
  | {
7527
6883
  input: 'fileName'
7528
- value?: string | DataLink
6884
+ value?: string | DataLink | EventProperty
7529
6885
  mapping?: string
7530
6886
  }
7531
6887
  | {
7532
6888
  input: 'fileExtension'
7533
- value?: string | DataLink
6889
+ value?: string | DataLink | EventProperty
7534
6890
  mapping?: string
7535
6891
  }
7536
6892
  | {
7537
6893
  input: 'filePayload'
7538
- value?: {} | DataLink
6894
+ value?: {} | DataLink | EventProperty
7539
6895
  mapping?: string
7540
6896
  }
7541
6897
  | {
7542
6898
  input: 'fileSearchCitationCount'
7543
- value?: number | DataLink
6899
+ value?: number | DataLink | EventProperty
7544
6900
  mapping?: string
7545
6901
  }
7546
6902
  | {
7547
6903
  input: 'fileSearchInsertMethod'
7548
- value?: 'in-user-message' | 'new-assistant-message' | DataLink
6904
+ value?: 'in-user-message' | 'new-assistant-message' | DataLink | EventProperty
7549
6905
  mapping?: string
7550
6906
  }
7551
6907
  >
@@ -7557,22 +6913,22 @@ export type GeneratorAssistantActionAddFile = ActionWithParams & {
7557
6913
  params?: Array<
7558
6914
  | {
7559
6915
  input: 'filePath'
7560
- value?: string | DataLink
6916
+ value?: string | DataLink | EventProperty
7561
6917
  mapping?: string
7562
6918
  }
7563
6919
  | {
7564
6920
  input: 'fileName'
7565
- value?: string | DataLink
6921
+ value?: string | DataLink | EventProperty
7566
6922
  mapping?: string
7567
6923
  }
7568
6924
  | {
7569
6925
  input: 'fileExtension'
7570
- value?: string | DataLink
6926
+ value?: string | DataLink | EventProperty
7571
6927
  mapping?: string
7572
6928
  }
7573
6929
  | {
7574
6930
  input: 'filePayload'
7575
- value?: {} | DataLink
6931
+ value?: {} | DataLink | EventProperty
7576
6932
  mapping?: string
7577
6933
  }
7578
6934
  >
@@ -7583,7 +6939,7 @@ export type GeneratorAssistantActionRemoveFile = ActionWithParams & {
7583
6939
  __actionName: 'GENERATOR_ASSISTANT_REMOVE_FILE'
7584
6940
  params?: Array<{
7585
6941
  input: 'fileName'
7586
- value?: string | DataLink
6942
+ value?: string | DataLink | EventProperty
7587
6943
  mapping?: string
7588
6944
  }>
7589
6945
  }
@@ -7594,22 +6950,22 @@ export type GeneratorAssistantActionUpdateAudioMessageAtIndex = ActionWithParams
7594
6950
  params?: Array<
7595
6951
  | {
7596
6952
  input: 'index'
7597
- value?: number | DataLink
6953
+ value?: number | DataLink | EventProperty
7598
6954
  mapping?: string
7599
6955
  }
7600
6956
  | {
7601
6957
  input: 'contentFile'
7602
- value?: string | DataLink
6958
+ value?: string | DataLink | EventProperty
7603
6959
  mapping?: string
7604
6960
  }
7605
6961
  | {
7606
6962
  input: 'contentBase64'
7607
- value?: string | DataLink
6963
+ value?: string | DataLink | EventProperty
7608
6964
  mapping?: string
7609
6965
  }
7610
6966
  | {
7611
6967
  input: 'payload'
7612
- value?: {} | DataLink
6968
+ value?: {} | DataLink | EventProperty
7613
6969
  mapping?: string
7614
6970
  }
7615
6971
  >
@@ -7620,7 +6976,7 @@ export type GeneratorAssistantActionRemoveMessageAtIndex = ActionWithParams & {
7620
6976
  __actionName: 'GENERATOR_ASSISTANT_REMOVE_MESSAGE_AT_INDEX'
7621
6977
  params?: Array<{
7622
6978
  input: 'index'
7623
- value?: number | DataLink
6979
+ value?: number | DataLink | EventProperty
7624
6980
  mapping?: string
7625
6981
  }>
7626
6982
  }
@@ -7636,8 +6992,25 @@ export type GeneratorAssistantActionReset = Action & {
7636
6992
  }
7637
6993
 
7638
6994
  /* Submit the assistant */
7639
- export type GeneratorAssistantActionSubmit = Action & {
6995
+ export type GeneratorAssistantActionSubmit = ActionWithParams & {
7640
6996
  __actionName: 'GENERATOR_ASSISTANT_SUBMIT'
6997
+ params?: Array<
6998
+ | {
6999
+ input: 'continueOnToolCallConfirm'
7000
+ value?: boolean | DataLink | EventProperty
7001
+ mapping?: string
7002
+ }
7003
+ | {
7004
+ input: 'continueOnToolCallStrategy'
7005
+ value?: 'never' | 'success' | 'always' | DataLink | EventProperty
7006
+ mapping?: string
7007
+ }
7008
+ | {
7009
+ input: 'continueOnToolCallLimit'
7010
+ value?: number | DataLink | EventProperty
7011
+ mapping?: string
7012
+ }
7013
+ >
7641
7014
  }
7642
7015
 
7643
7016
  /* Cancel the assistant responding */
@@ -7645,6 +7018,38 @@ export type GeneratorAssistantActionCancel = Action & {
7645
7018
  __actionName: 'GENERATOR_ASSISTANT_CANCEL'
7646
7019
  }
7647
7020
 
7021
+ /* Check the enabled MCP clients connection status and available tools */
7022
+ export type GeneratorAssistantActionCheckMcpServers = Action & {
7023
+ __actionName: 'GENERATOR_ASSISTANT_CHECK_MCP_SERVERS'
7024
+ }
7025
+
7026
+ /* Insert an MCP resource as a new assistant message */
7027
+ export type GeneratorAssistantActionInsertMcpResource = ActionWithParams & {
7028
+ __actionName: 'GENERATOR_ASSISTANT_INSERT_MCP_RESOURCE'
7029
+ params?: Array<
7030
+ | {
7031
+ input: 'mcpClientName'
7032
+ value?: string | DataLink | EventProperty
7033
+ mapping?: string
7034
+ }
7035
+ | {
7036
+ input: 'mcpResourceUri'
7037
+ value?: string | DataLink | EventProperty
7038
+ mapping?: string
7039
+ }
7040
+ | {
7041
+ input: 'mcpVariables'
7042
+ value?: {} | DataLink | EventProperty
7043
+ mapping?: string
7044
+ }
7045
+ | {
7046
+ input: 'role'
7047
+ value?: string | DataLink | EventProperty
7048
+ mapping?: string
7049
+ }
7050
+ >
7051
+ }
7052
+
7648
7053
  interface GeneratorAssistantDef {
7649
7054
  /*
7650
7055
  Default property:
@@ -7708,41 +7113,25 @@ Default property:
7708
7113
  ttsEnabled?: boolean | DataLink
7709
7114
  /* TTS Live Policy. If the policy is `only-in-use`, the TTS context will be released when the assistant is not in use. */
7710
7115
  ttsLivePolicy?: 'only-in-use' | 'manual' | DataLink
7116
+ /* MCP Generators (Add a unique name if generator name property are duplicate) */
7117
+ mcpGenerators?:
7118
+ | Array<
7119
+ | DataLink
7120
+ | {
7121
+ generatorId?: string | DataLink
7122
+ name?: string | DataLink
7123
+ enabled?: boolean | DataLink
7124
+ }
7125
+ >
7126
+ | DataLink
7711
7127
  }
7712
7128
  events?: {
7713
7129
  /* Error event */
7714
- onError?: Array<
7715
- EventAction & {
7716
- eventPropertyMapping?: {
7717
- error: {
7718
- type: 'string'
7719
- path: string
7720
- }
7721
- }
7722
- }
7723
- >
7130
+ onError?: Array<EventAction>
7724
7131
  /* Log event */
7725
- onLogs?: Array<
7726
- EventAction & {
7727
- eventPropertyMapping?: {
7728
- logs: {
7729
- type: 'array'
7730
- path: string
7731
- }
7732
- }
7733
- }
7734
- >
7132
+ onLogs?: Array<EventAction>
7735
7133
  /* Messages update event */
7736
- onMessagesUpdate?: Array<
7737
- EventAction & {
7738
- eventPropertyMapping?: {
7739
- messages: {
7740
- type: 'array'
7741
- path: string
7742
- }
7743
- }
7744
- }
7745
- >
7134
+ onMessagesUpdate?: Array<EventAction>
7746
7135
  }
7747
7136
  outlets?: {
7748
7137
  /* Whether the assistant is heating up */
@@ -7757,6 +7146,8 @@ Default property:
7757
7146
  files?: () => Data
7758
7147
  /* Messages of the assistant */
7759
7148
  messages?: () => Data
7149
+ /* MCP servers status and available tools */
7150
+ mcpServers?: () => Data
7760
7151
  }
7761
7152
  }
7762
7153
 
@@ -7781,6 +7172,7 @@ export type GeneratorAssistant = Generator &
7781
7172
  | 'isBusy'
7782
7173
  | 'files'
7783
7174
  | 'messages'
7175
+ | 'mcpServers'
7784
7176
  value: any
7785
7177
  }
7786
7178
  }>
@@ -7803,7 +7195,7 @@ export type GeneratorVectorStoreActionReset = ActionWithParams & {
7803
7195
  __actionName: 'GENERATOR_VECTOR_STORE_RESET'
7804
7196
  params?: Array<{
7805
7197
  input: 'resetType'
7806
- value?: 'session' | 'all' | DataLink
7198
+ value?: 'session' | 'all' | DataLink | EventProperty
7807
7199
  mapping?: string
7808
7200
  }>
7809
7201
  }
@@ -7816,22 +7208,22 @@ export type GeneratorVectorStoreActionInsertFile = ActionWithParams & {
7816
7208
  params?: Array<
7817
7209
  | {
7818
7210
  input: 'filePath'
7819
- value?: string | DataLink
7211
+ value?: string | DataLink | EventProperty
7820
7212
  mapping?: string
7821
7213
  }
7822
7214
  | {
7823
7215
  input: 'fileName'
7824
- value?: string | DataLink
7216
+ value?: string | DataLink | EventProperty
7825
7217
  mapping?: string
7826
7218
  }
7827
7219
  | {
7828
7220
  input: 'fileExtension'
7829
- value?: string | DataLink
7221
+ value?: string | DataLink | EventProperty
7830
7222
  mapping?: string
7831
7223
  }
7832
7224
  | {
7833
7225
  input: 'chunkSize'
7834
- value?: number | DataLink
7226
+ value?: number | DataLink | EventProperty
7835
7227
  mapping?: string
7836
7228
  }
7837
7229
  >
@@ -7848,22 +7240,22 @@ export type GeneratorVectorStoreActionInsertContent = ActionWithParams & {
7848
7240
  params?: Array<
7849
7241
  | {
7850
7242
  input: 'textContent'
7851
- value?: string | DataLink
7243
+ value?: string | DataLink | EventProperty
7852
7244
  mapping?: string
7853
7245
  }
7854
7246
  | {
7855
7247
  input: 'fileName'
7856
- value?: string | DataLink
7248
+ value?: string | DataLink | EventProperty
7857
7249
  mapping?: string
7858
7250
  }
7859
7251
  | {
7860
7252
  input: 'payload'
7861
- value?: {} | DataLink
7253
+ value?: {} | DataLink | EventProperty
7862
7254
  mapping?: string
7863
7255
  }
7864
7256
  | {
7865
7257
  input: 'chunkSize'
7866
- value?: number | DataLink
7258
+ value?: number | DataLink | EventProperty
7867
7259
  mapping?: string
7868
7260
  }
7869
7261
  >
@@ -7874,7 +7266,7 @@ export type GeneratorVectorStoreActionRemoveFile = ActionWithParams & {
7874
7266
  __actionName: 'GENERATOR_VECTOR_STORE_REMOVE_FILE'
7875
7267
  params?: Array<{
7876
7268
  input: 'fileName'
7877
- value?: string | DataLink
7269
+ value?: string | DataLink | EventProperty
7878
7270
  mapping?: string
7879
7271
  }>
7880
7272
  }
@@ -7885,27 +7277,27 @@ export type GeneratorVectorStoreActionSearch = ActionWithParams & {
7885
7277
  params?: Array<
7886
7278
  | {
7887
7279
  input: 'text'
7888
- value?: string | DataLink
7280
+ value?: string | DataLink | EventProperty
7889
7281
  mapping?: string
7890
7282
  }
7891
7283
  | {
7892
7284
  input: 'filename'
7893
- value?: string | DataLink
7285
+ value?: string | DataLink | EventProperty
7894
7286
  mapping?: string
7895
7287
  }
7896
7288
  | {
7897
7289
  input: 'limit'
7898
- value?: number | DataLink
7290
+ value?: number | DataLink | EventProperty
7899
7291
  mapping?: string
7900
7292
  }
7901
7293
  | {
7902
7294
  input: 'threshold'
7903
- value?: number | DataLink
7295
+ value?: number | DataLink | EventProperty
7904
7296
  mapping?: string
7905
7297
  }
7906
7298
  | {
7907
7299
  input: 'ignoreThreshold'
7908
- value?: boolean | DataLink
7300
+ value?: boolean | DataLink | EventProperty
7909
7301
  mapping?: string
7910
7302
  }
7911
7303
  >
@@ -7963,16 +7355,7 @@ Default property:
7963
7355
  }
7964
7356
  events?: {
7965
7357
  /* Event triggered when error occurs */
7966
- onError?: Array<
7967
- EventAction & {
7968
- eventPropertyMapping?: {
7969
- error: {
7970
- type: 'string'
7971
- path: string
7972
- }
7973
- }
7974
- }
7975
- >
7358
+ onError?: Array<EventAction>
7976
7359
  }
7977
7360
  outlets?: {
7978
7361
  /* undefined */