@fugood/bricks-project 2.24.0-beta.2 → 2.24.0-beta.21

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.
Files changed (110) hide show
  1. package/compile/action-name-map.ts +14 -0
  2. package/compile/index.ts +377 -129
  3. package/package.json +8 -3
  4. package/skills/bricks-project/rules/architecture-patterns.md +7 -0
  5. package/skills/bricks-project/rules/automations.md +74 -28
  6. package/skills/bricks-project/rules/buttress.md +9 -6
  7. package/tools/deploy.ts +39 -10
  8. package/tools/mcp-server.ts +10 -877
  9. package/tools/mcp-tools/compile.ts +91 -0
  10. package/tools/mcp-tools/huggingface.ts +762 -0
  11. package/tools/mcp-tools/icons.ts +60 -0
  12. package/tools/mcp-tools/lottie.ts +102 -0
  13. package/tools/mcp-tools/media.ts +110 -0
  14. package/tools/postinstall.ts +121 -33
  15. package/tools/preview-main.mjs +12 -8
  16. package/tools/pull.ts +37 -19
  17. package/tsconfig.json +16 -0
  18. package/types/animation.ts +4 -0
  19. package/types/automation.ts +3 -0
  20. package/types/brick-base.ts +1 -1
  21. package/types/bricks/Camera.ts +34 -7
  22. package/types/bricks/Chart.ts +1 -1
  23. package/types/bricks/GenerativeMedia.ts +6 -6
  24. package/types/bricks/Icon.ts +3 -3
  25. package/types/bricks/Image.ts +4 -4
  26. package/types/bricks/Items.ts +7 -7
  27. package/types/bricks/Lottie.ts +4 -4
  28. package/types/bricks/Maps.ts +4 -4
  29. package/types/bricks/QrCode.ts +4 -4
  30. package/types/bricks/Rect.ts +4 -4
  31. package/types/bricks/RichText.ts +3 -3
  32. package/types/bricks/Rive.ts +1 -1
  33. package/types/bricks/Slideshow.ts +4 -4
  34. package/types/bricks/Svg.ts +3 -3
  35. package/types/bricks/Text.ts +4 -4
  36. package/types/bricks/TextInput.ts +11 -7
  37. package/types/bricks/Video.ts +4 -4
  38. package/types/bricks/VideoStreaming.ts +3 -3
  39. package/types/bricks/WebRtcStream.ts +1 -1
  40. package/types/bricks/WebView.ts +4 -4
  41. package/types/canvas.ts +4 -2
  42. package/types/common.ts +9 -4
  43. package/types/data-calc-command.ts +2 -0
  44. package/types/data-calc.ts +1 -0
  45. package/types/data.ts +2 -0
  46. package/types/generators/AlarmClock.ts +5 -5
  47. package/types/generators/Assistant.ts +57 -12
  48. package/types/generators/BleCentral.ts +12 -4
  49. package/types/generators/BlePeripheral.ts +5 -5
  50. package/types/generators/CanvasMap.ts +4 -4
  51. package/types/generators/CastlesPay.ts +3 -3
  52. package/types/generators/DataBank.ts +31 -4
  53. package/types/generators/File.ts +63 -14
  54. package/types/generators/GraphQl.ts +3 -3
  55. package/types/generators/Http.ts +27 -8
  56. package/types/generators/HttpServer.ts +9 -9
  57. package/types/generators/Information.ts +2 -2
  58. package/types/generators/Intent.ts +8 -2
  59. package/types/generators/Iterator.ts +6 -6
  60. package/types/generators/Keyboard.ts +18 -8
  61. package/types/generators/LlmAnthropicCompat.ts +12 -6
  62. package/types/generators/LlmAppleBuiltin.ts +6 -6
  63. package/types/generators/LlmGgml.ts +75 -25
  64. package/types/generators/LlmMlx.ts +210 -0
  65. package/types/generators/LlmOnnx.ts +18 -9
  66. package/types/generators/LlmOpenAiCompat.ts +22 -6
  67. package/types/generators/LlmQualcommAiEngine.ts +32 -8
  68. package/types/generators/Mcp.ts +332 -17
  69. package/types/generators/McpServer.ts +38 -11
  70. package/types/generators/MediaFlow.ts +26 -8
  71. package/types/generators/MqttBroker.ts +10 -4
  72. package/types/generators/MqttClient.ts +11 -5
  73. package/types/generators/Question.ts +6 -6
  74. package/types/generators/RealtimeTranscription.ts +70 -11
  75. package/types/generators/RerankerGgml.ts +23 -9
  76. package/types/generators/SerialPort.ts +6 -6
  77. package/types/generators/SoundPlayer.ts +2 -2
  78. package/types/generators/SoundRecorder.ts +5 -5
  79. package/types/generators/SpeechToTextGgml.ts +34 -14
  80. package/types/generators/SpeechToTextOnnx.ts +8 -8
  81. package/types/generators/SpeechToTextPlatform.ts +4 -4
  82. package/types/generators/SqLite.ts +10 -6
  83. package/types/generators/Step.ts +3 -3
  84. package/types/generators/SttAppleBuiltin.ts +6 -6
  85. package/types/generators/Tcp.ts +5 -5
  86. package/types/generators/TcpServer.ts +7 -7
  87. package/types/generators/TextToSpeechApple.ts +1 -1
  88. package/types/generators/TextToSpeechAppleBuiltin.ts +5 -5
  89. package/types/generators/TextToSpeechGgml.ts +8 -8
  90. package/types/generators/TextToSpeechOnnx.ts +9 -9
  91. package/types/generators/TextToSpeechOpenAiLike.ts +5 -5
  92. package/types/generators/ThermalPrinter.ts +6 -6
  93. package/types/generators/Tick.ts +3 -3
  94. package/types/generators/Udp.ts +9 -4
  95. package/types/generators/VadGgml.ts +39 -10
  96. package/types/generators/VadOnnx.ts +31 -8
  97. package/types/generators/VadTraditional.ts +15 -9
  98. package/types/generators/VectorStore.ts +26 -9
  99. package/types/generators/Watchdog.ts +11 -6
  100. package/types/generators/WebCrawler.ts +5 -5
  101. package/types/generators/WebRtc.ts +17 -11
  102. package/types/generators/WebSocket.ts +5 -5
  103. package/types/generators/index.ts +1 -0
  104. package/types/subspace.ts +1 -0
  105. package/types/system.ts +1 -1
  106. package/utils/calc.ts +12 -8
  107. package/utils/event-props.ts +104 -87
  108. package/utils/id.ts +4 -0
  109. package/api/index.ts +0 -1
  110. package/api/instance.ts +0 -213
@@ -223,37 +223,352 @@ Default property:
223
223
  }
224
224
  outlets?: {
225
225
  /* Connection state */
226
- connectionState?: () => Data
226
+ connectionState?: () => Data<string>
227
227
  /* List resources response */
228
- listResourcesResponse?: () => Data
228
+ listResourcesResponse?: () => Data<{
229
+ id?: string
230
+ response?: {
231
+ resources?: Array<{
232
+ name?: string
233
+ [key: string]: any
234
+ }>
235
+ resourceTemplates?: Array<{
236
+ name?: string
237
+ [key: string]: any
238
+ }>
239
+ contents?: Array<{
240
+ uri?: string
241
+ text?: string
242
+ blob?: string
243
+ mimeType?: string
244
+ [key: string]: any
245
+ }>
246
+ tools?: Array<{
247
+ name?: string
248
+ description?: string
249
+ inputSchema?: { [key: string]: any }
250
+ [key: string]: any
251
+ }>
252
+ content?: Array<{
253
+ type?: string
254
+ text?: string
255
+ [key: string]: any
256
+ }>
257
+ prompts?: Array<{
258
+ name?: string
259
+ [key: string]: any
260
+ }>
261
+ messages?: Array<{
262
+ role?: string
263
+ content?: any
264
+ [key: string]: any
265
+ }>
266
+ [key: string]: any
267
+ }
268
+ [key: string]: any
269
+ }>
229
270
  /* List resources error */
230
- listResourcesError?: () => Data
271
+ listResourcesError?: () => Data<{
272
+ id?: string
273
+ error?: string
274
+ [key: string]: any
275
+ }>
231
276
  /* List resource templates response */
232
- listResourceTemplatesResponse?: () => Data
277
+ listResourceTemplatesResponse?: () => Data<{
278
+ id?: string
279
+ response?: {
280
+ resources?: Array<{
281
+ name?: string
282
+ [key: string]: any
283
+ }>
284
+ resourceTemplates?: Array<{
285
+ name?: string
286
+ [key: string]: any
287
+ }>
288
+ contents?: Array<{
289
+ uri?: string
290
+ text?: string
291
+ blob?: string
292
+ mimeType?: string
293
+ [key: string]: any
294
+ }>
295
+ tools?: Array<{
296
+ name?: string
297
+ description?: string
298
+ inputSchema?: { [key: string]: any }
299
+ [key: string]: any
300
+ }>
301
+ content?: Array<{
302
+ type?: string
303
+ text?: string
304
+ [key: string]: any
305
+ }>
306
+ prompts?: Array<{
307
+ name?: string
308
+ [key: string]: any
309
+ }>
310
+ messages?: Array<{
311
+ role?: string
312
+ content?: any
313
+ [key: string]: any
314
+ }>
315
+ [key: string]: any
316
+ }
317
+ [key: string]: any
318
+ }>
233
319
  /* List resource templates error */
234
- listResourceTemplatesError?: () => Data
320
+ listResourceTemplatesError?: () => Data<{
321
+ id?: string
322
+ error?: string
323
+ [key: string]: any
324
+ }>
235
325
  /* Read resource response */
236
- readResourceResponse?: () => Data
326
+ readResourceResponse?: () => Data<{
327
+ id?: string
328
+ response?: {
329
+ resources?: Array<{
330
+ name?: string
331
+ [key: string]: any
332
+ }>
333
+ resourceTemplates?: Array<{
334
+ name?: string
335
+ [key: string]: any
336
+ }>
337
+ contents?: Array<{
338
+ uri?: string
339
+ text?: string
340
+ blob?: string
341
+ mimeType?: string
342
+ [key: string]: any
343
+ }>
344
+ tools?: Array<{
345
+ name?: string
346
+ description?: string
347
+ inputSchema?: { [key: string]: any }
348
+ [key: string]: any
349
+ }>
350
+ content?: Array<{
351
+ type?: string
352
+ text?: string
353
+ [key: string]: any
354
+ }>
355
+ prompts?: Array<{
356
+ name?: string
357
+ [key: string]: any
358
+ }>
359
+ messages?: Array<{
360
+ role?: string
361
+ content?: any
362
+ [key: string]: any
363
+ }>
364
+ [key: string]: any
365
+ }
366
+ [key: string]: any
367
+ }>
237
368
  /* Read resource error */
238
- readResourceError?: () => Data
369
+ readResourceError?: () => Data<{
370
+ id?: string
371
+ error?: string
372
+ [key: string]: any
373
+ }>
239
374
  /* List tools response */
240
- listToolsResponse?: () => Data
375
+ listToolsResponse?: () => Data<{
376
+ id?: string
377
+ response?: {
378
+ resources?: Array<{
379
+ name?: string
380
+ [key: string]: any
381
+ }>
382
+ resourceTemplates?: Array<{
383
+ name?: string
384
+ [key: string]: any
385
+ }>
386
+ contents?: Array<{
387
+ uri?: string
388
+ text?: string
389
+ blob?: string
390
+ mimeType?: string
391
+ [key: string]: any
392
+ }>
393
+ tools?: Array<{
394
+ name?: string
395
+ description?: string
396
+ inputSchema?: { [key: string]: any }
397
+ [key: string]: any
398
+ }>
399
+ content?: Array<{
400
+ type?: string
401
+ text?: string
402
+ [key: string]: any
403
+ }>
404
+ prompts?: Array<{
405
+ name?: string
406
+ [key: string]: any
407
+ }>
408
+ messages?: Array<{
409
+ role?: string
410
+ content?: any
411
+ [key: string]: any
412
+ }>
413
+ [key: string]: any
414
+ }
415
+ [key: string]: any
416
+ }>
241
417
  /* List tools error */
242
- listToolsError?: () => Data
418
+ listToolsError?: () => Data<{
419
+ id?: string
420
+ error?: string
421
+ [key: string]: any
422
+ }>
243
423
  /* Call tool response */
244
- callToolResponse?: () => Data
424
+ callToolResponse?: () => Data<{
425
+ id?: string
426
+ response?: {
427
+ resources?: Array<{
428
+ name?: string
429
+ [key: string]: any
430
+ }>
431
+ resourceTemplates?: Array<{
432
+ name?: string
433
+ [key: string]: any
434
+ }>
435
+ contents?: Array<{
436
+ uri?: string
437
+ text?: string
438
+ blob?: string
439
+ mimeType?: string
440
+ [key: string]: any
441
+ }>
442
+ tools?: Array<{
443
+ name?: string
444
+ description?: string
445
+ inputSchema?: { [key: string]: any }
446
+ [key: string]: any
447
+ }>
448
+ content?: Array<{
449
+ type?: string
450
+ text?: string
451
+ [key: string]: any
452
+ }>
453
+ prompts?: Array<{
454
+ name?: string
455
+ [key: string]: any
456
+ }>
457
+ messages?: Array<{
458
+ role?: string
459
+ content?: any
460
+ [key: string]: any
461
+ }>
462
+ [key: string]: any
463
+ }
464
+ [key: string]: any
465
+ }>
245
466
  /* Call tool error */
246
- callToolError?: () => Data
467
+ callToolError?: () => Data<{
468
+ id?: string
469
+ error?: string
470
+ [key: string]: any
471
+ }>
247
472
  /* List prompts response */
248
- listPromptsResponse?: () => Data
473
+ listPromptsResponse?: () => Data<{
474
+ id?: string
475
+ response?: {
476
+ resources?: Array<{
477
+ name?: string
478
+ [key: string]: any
479
+ }>
480
+ resourceTemplates?: Array<{
481
+ name?: string
482
+ [key: string]: any
483
+ }>
484
+ contents?: Array<{
485
+ uri?: string
486
+ text?: string
487
+ blob?: string
488
+ mimeType?: string
489
+ [key: string]: any
490
+ }>
491
+ tools?: Array<{
492
+ name?: string
493
+ description?: string
494
+ inputSchema?: { [key: string]: any }
495
+ [key: string]: any
496
+ }>
497
+ content?: Array<{
498
+ type?: string
499
+ text?: string
500
+ [key: string]: any
501
+ }>
502
+ prompts?: Array<{
503
+ name?: string
504
+ [key: string]: any
505
+ }>
506
+ messages?: Array<{
507
+ role?: string
508
+ content?: any
509
+ [key: string]: any
510
+ }>
511
+ [key: string]: any
512
+ }
513
+ [key: string]: any
514
+ }>
249
515
  /* List prompts error */
250
- listPromptsError?: () => Data
516
+ listPromptsError?: () => Data<{
517
+ id?: string
518
+ error?: string
519
+ [key: string]: any
520
+ }>
251
521
  /* Get prompt response */
252
- getPromptResponse?: () => Data
522
+ getPromptResponse?: () => Data<{
523
+ id?: string
524
+ response?: {
525
+ resources?: Array<{
526
+ name?: string
527
+ [key: string]: any
528
+ }>
529
+ resourceTemplates?: Array<{
530
+ name?: string
531
+ [key: string]: any
532
+ }>
533
+ contents?: Array<{
534
+ uri?: string
535
+ text?: string
536
+ blob?: string
537
+ mimeType?: string
538
+ [key: string]: any
539
+ }>
540
+ tools?: Array<{
541
+ name?: string
542
+ description?: string
543
+ inputSchema?: { [key: string]: any }
544
+ [key: string]: any
545
+ }>
546
+ content?: Array<{
547
+ type?: string
548
+ text?: string
549
+ [key: string]: any
550
+ }>
551
+ prompts?: Array<{
552
+ name?: string
553
+ [key: string]: any
554
+ }>
555
+ messages?: Array<{
556
+ role?: string
557
+ content?: any
558
+ [key: string]: any
559
+ }>
560
+ [key: string]: any
561
+ }
562
+ [key: string]: any
563
+ }>
253
564
  /* Request prompt error */
254
- getPromptError?: () => Data
565
+ getPromptError?: () => Data<{
566
+ id?: string
567
+ error?: string
568
+ [key: string]: any
569
+ }>
255
570
  /* Last error */
256
- lastError?: () => Data
571
+ lastError?: () => Data<string>
257
572
  }
258
573
  }
259
574
 
@@ -261,7 +576,7 @@ Default property:
261
576
  export type GeneratorMCP = Generator &
262
577
  GeneratorMCPDef & {
263
578
  templateKey: 'GENERATOR_MCP'
264
- switches: Array<
579
+ switches?: Array<
265
580
  SwitchDef &
266
581
  GeneratorMCPDef & {
267
582
  conds?: Array<{
@@ -47,7 +47,7 @@ Default property:
47
47
  name?: string | DataLink
48
48
  /* Version of the MCP server */
49
49
  version?: string | DataLink
50
- /* Resources
50
+ /* Resources
51
51
  Type:
52
52
  `static`: Return static data
53
53
  `detect-data-change`: Watch data target change to return data,
@@ -93,7 +93,7 @@ Default property:
93
93
  }
94
94
  >
95
95
  | DataLink
96
- /* Tools
96
+ /* Tools
97
97
  Type:
98
98
  `static`: Return static data
99
99
  `detect-data-change`: Watch data target change to return data,
@@ -139,7 +139,7 @@ Default property:
139
139
  }
140
140
  >
141
141
  | DataLink
142
- /* Prompts
142
+ /* Prompts
143
143
  Type:
144
144
  `static`: Return static data
145
145
  `detect-data-change`: Watch data target change to return data,
@@ -204,19 +204,46 @@ Default property:
204
204
  }
205
205
  outlets?: {
206
206
  /* Whether the HTTP server is listening */
207
- isListening?: () => Data
207
+ isListening?: () => Data<boolean>
208
208
  /* Last error of HTTP server */
209
- lastError?: () => Data
209
+ lastError?: () => Data<string>
210
210
  /* MCP server endpoint URL */
211
- endpoint?: () => Data
211
+ endpoint?: () => Data<string>
212
212
  /* Connected remotes (Session ID) */
213
- connectedRemotes?: () => Data
213
+ connectedRemotes?: () => Data<Array<string>>
214
214
  /* Last resource request ({ name: string, uri: string, params: object }) */
215
- lastResourceRequest?: () => Data
215
+ lastResourceRequest?: () => Data<{
216
+ type?: string
217
+ id?: string
218
+ name?: string
219
+ uri?: string
220
+ params?: { [key: string]: any }
221
+ arguments?: { [key: string]: any }
222
+ timeout?: number
223
+ [key: string]: any
224
+ }>
216
225
  /* Last tool call ({ name: string, params: object }) */
217
- lastToolCall?: () => Data
226
+ lastToolCall?: () => Data<{
227
+ type?: string
228
+ id?: string
229
+ name?: string
230
+ uri?: string
231
+ params?: { [key: string]: any }
232
+ arguments?: { [key: string]: any }
233
+ timeout?: number
234
+ [key: string]: any
235
+ }>
218
236
  /* Last prompt get ({ name: string, arguments: object }) */
219
- lastPromptGet?: () => Data
237
+ lastPromptGet?: () => Data<{
238
+ type?: string
239
+ id?: string
240
+ name?: string
241
+ uri?: string
242
+ params?: { [key: string]: any }
243
+ arguments?: { [key: string]: any }
244
+ timeout?: number
245
+ [key: string]: any
246
+ }>
220
247
  }
221
248
  }
222
249
 
@@ -224,7 +251,7 @@ Default property:
224
251
  export type GeneratorMCPServer = Generator &
225
252
  GeneratorMCPServerDef & {
226
253
  templateKey: 'GENERATOR_MCP_SERVER'
227
- switches: Array<
254
+ switches?: Array<
228
255
  SwitchDef &
229
256
  GeneratorMCPServerDef & {
230
257
  conds?: Array<{
@@ -54,7 +54,7 @@ Default property:
54
54
  passcode?: string | DataLink
55
55
  /* Include File Types */
56
56
  includeTypes?: Array<'IMAGE' | 'VIDEO' | 'AUDIO' | 'FILE' | DataLink> | DataLink
57
- /* Determine the cache behavior
57
+ /* Determine the cache behavior
58
58
 
59
59
  cache-first: Cache first if existing, then fetch from network
60
60
  network-and-cache: Fetch from network, then save cache
@@ -101,17 +101,35 @@ Default property:
101
101
  }
102
102
  outlets?: {
103
103
  /* File sync status */
104
- downloadStatus?: () => Data
104
+ downloadStatus?: () => Data<string>
105
105
  /* File sync progress */
106
- downloadProgress?: () => Data
106
+ downloadProgress?: () => Data<
107
+ Array<{
108
+ key?: string
109
+ progress?: number
110
+ finished?: boolean
111
+ [key: string]: any
112
+ }>
113
+ >
107
114
  /* File sync download errors */
108
- downloadErrors?: () => Data
115
+ downloadErrors?: () => Data<Array<string>>
109
116
  /* Media box info */
110
- box?: () => Data
117
+ box?: () => Data<{ [key: string]: any }>
111
118
  /* Save Media Flow fetch result [ { "url": "https://d1kk0369g9vrck.cloudfront.net/box/5b431e29efd40c01e8b2019c/photo5b431e37efd40c01e8b201d1" "extension": "", // enum("jpg", "png", "mp4") "id": "5b431e37efd40c01e8b201d1", "md5": "6134ab412351651324" // md5 came from media resource api } ] */
112
- result?: () => Data
119
+ result?: () => Data<
120
+ Array<{
121
+ id?: string
122
+ key?: string
123
+ mediaType?: string
124
+ extension?: string
125
+ original?: string
126
+ url?: string
127
+ metadata?: { [key: string]: any }
128
+ [key: string]: any
129
+ }>
130
+ >
113
131
  /* File sync result [ { "url": "/storage/emulated/0/Download/SyncFolder/Asset/1.png", "mediaType": "photo" // enum("photo", "video"), used to distingiush "id": "", } ] */
114
- downloadFileUrls?: () => Data
132
+ downloadFileUrls?: () => Data<Array<string>>
115
133
  }
116
134
  }
117
135
 
@@ -119,7 +137,7 @@ Default property:
119
137
  export type GeneratorMediaFlow = Generator &
120
138
  GeneratorMediaFlowDef & {
121
139
  templateKey: 'GENERATOR_MEDIA_FLOW'
122
- switches: Array<
140
+ switches?: Array<
123
141
  SwitchDef &
124
142
  GeneratorMediaFlowDef & {
125
143
  conds?: Array<{
@@ -92,11 +92,17 @@ Default property:
92
92
  }
93
93
  outlets?: {
94
94
  /* Is server started */
95
- started?: () => Data
95
+ started?: () => Data<boolean>
96
96
  /* Last received message */
97
- lastMessage?: () => Data
97
+ lastMessage?: () => Data<{
98
+ topic?: string
99
+ payload?: any
100
+ qos?: number
101
+ retain?: boolean
102
+ [key: string]: any
103
+ }>
98
104
  /* Error message */
99
- errorMessage?: () => Data
105
+ errorMessage?: () => Data<string>
100
106
  }
101
107
  }
102
108
 
@@ -104,7 +110,7 @@ Default property:
104
110
  export type GeneratorMQTTBroker = Generator &
105
111
  GeneratorMQTTBrokerDef & {
106
112
  templateKey: 'GENERATOR_MQTT_BROKER'
107
- switches: Array<
113
+ switches?: Array<
108
114
  SwitchDef &
109
115
  GeneratorMQTTBrokerDef & {
110
116
  conds?: Array<{
@@ -98,13 +98,19 @@ Default property:
98
98
  }
99
99
  outlets?: {
100
100
  /* Connected or not */
101
- connected?: () => Data
101
+ connected?: () => Data<boolean>
102
102
  /* Error Message */
103
- error?: () => Data
103
+ error?: () => Data<string>
104
104
  /* The receive message */
105
- message?: () => Data
105
+ message?: () => Data<{
106
+ topic?: string
107
+ payload?: any
108
+ qos?: number
109
+ retain?: boolean
110
+ [key: string]: any
111
+ }>
106
112
  /* The receive message (payload only) */
107
- messagePayload?: () => Data
113
+ messagePayload?: () => Data<any>
108
114
  }
109
115
  }
110
116
 
@@ -112,7 +118,7 @@ Default property:
112
118
  export type GeneratorMQTT = Generator &
113
119
  GeneratorMQTTDef & {
114
120
  templateKey: 'GENERATOR_MQTT'
115
- switches: Array<
121
+ switches?: Array<
116
122
  SwitchDef &
117
123
  GeneratorMQTTDef & {
118
124
  conds?: Array<{
@@ -60,7 +60,7 @@ Default property:
60
60
  property?: {
61
61
  /* Modal mode */
62
62
  modalMode?: 'root' | 'in-subspace' | DataLink
63
- /* Inquirer schema
63
+ /* Inquirer schema
64
64
  `key`: Field key (unique, required)
65
65
  `kind`: Field type (required)
66
66
  `title`: Field or message title
@@ -371,13 +371,13 @@ Default property:
371
371
  }
372
372
  outlets?: {
373
373
  /* Result data */
374
- data?: () => Data
374
+ data?: () => Data<{ [key: string]: any }>
375
375
  /* Currnet question */
376
- currectKey?: () => Data
376
+ currectKey?: () => Data<string>
377
377
  /* Currnet input value */
378
- currectValue?: () => Data
378
+ currectValue?: () => Data<any>
379
379
  /* Error message */
380
- errorMessage?: () => Data
380
+ errorMessage?: () => Data<string>
381
381
  }
382
382
  }
383
383
 
@@ -385,7 +385,7 @@ Default property:
385
385
  export type GeneratorQuestion = Generator &
386
386
  GeneratorQuestionDef & {
387
387
  templateKey: 'GENERATOR_QUESTION'
388
- switches: Array<
388
+ switches?: Array<
389
389
  SwitchDef &
390
390
  GeneratorQuestionDef & {
391
391
  conds?: Array<{