@fugood/bricks-ctor 2.25.0-beta.7 → 2.25.0-beta.71

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 (135) hide show
  1. package/package.json +4 -24
  2. package/tools/__tests__/legacy-forwarder.test.js +91 -0
  3. package/tools/_forward.ts +26 -0
  4. package/tools/deploy.ts +3 -164
  5. package/tools/mcp-server.ts +3 -27
  6. package/tools/postinstall.ts +3 -234
  7. package/tools/pull.ts +3 -121
  8. package/tools/push-config.ts +4 -0
  9. package/tools/simulator.ts +4 -0
  10. package/compile/action-name-map.ts +0 -1015
  11. package/compile/index.ts +0 -1278
  12. package/compile/util.ts +0 -358
  13. package/index.ts +0 -6
  14. package/skills/bricks-ctor/SKILL.md +0 -32
  15. package/skills/bricks-ctor/rules/animation.md +0 -159
  16. package/skills/bricks-ctor/rules/architecture-patterns.md +0 -69
  17. package/skills/bricks-ctor/rules/automations.md +0 -221
  18. package/skills/bricks-ctor/rules/buttress.md +0 -156
  19. package/skills/bricks-ctor/rules/data-calculation.md +0 -209
  20. package/skills/bricks-ctor/rules/local-sync.md +0 -129
  21. package/skills/bricks-ctor/rules/media-flow.md +0 -158
  22. package/skills/bricks-ctor/rules/remote-data-bank.md +0 -196
  23. package/skills/bricks-ctor/rules/standby-transition.md +0 -124
  24. package/skills/bricks-design/LICENSE.txt +0 -180
  25. package/skills/bricks-design/SKILL.md +0 -66
  26. package/skills/rive-marketplace/SKILL.md +0 -99
  27. package/tools/_git-author.ts +0 -29
  28. package/tools/_shell.ts +0 -173
  29. package/tools/icons/.gitattributes +0 -1
  30. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  31. package/tools/icons/fa6pro-meta.json +0 -1
  32. package/tools/mcp-tools/compile.ts +0 -92
  33. package/tools/mcp-tools/huggingface.ts +0 -762
  34. package/tools/mcp-tools/icons.ts +0 -81
  35. package/tools/mcp-tools/lottie.ts +0 -102
  36. package/tools/mcp-tools/media.ts +0 -110
  37. package/tools/preview-main.mjs +0 -293
  38. package/tools/preview.ts +0 -150
  39. package/types/animation.ts +0 -100
  40. package/types/automation.ts +0 -235
  41. package/types/brick-base.ts +0 -80
  42. package/types/bricks/Camera.ts +0 -246
  43. package/types/bricks/Chart.ts +0 -372
  44. package/types/bricks/GenerativeMedia.ts +0 -290
  45. package/types/bricks/Icon.ts +0 -98
  46. package/types/bricks/Image.ts +0 -126
  47. package/types/bricks/Items.ts +0 -476
  48. package/types/bricks/Lottie.ts +0 -168
  49. package/types/bricks/Maps.ts +0 -262
  50. package/types/bricks/QrCode.ts +0 -117
  51. package/types/bricks/Rect.ts +0 -150
  52. package/types/bricks/RichText.ts +0 -128
  53. package/types/bricks/Rive.ts +0 -220
  54. package/types/bricks/Sketch.ts +0 -254
  55. package/types/bricks/Slideshow.ts +0 -201
  56. package/types/bricks/Svg.ts +0 -99
  57. package/types/bricks/Text.ts +0 -148
  58. package/types/bricks/TextInput.ts +0 -242
  59. package/types/bricks/Video.ts +0 -175
  60. package/types/bricks/VideoStreaming.ts +0 -112
  61. package/types/bricks/WebRtcStream.ts +0 -65
  62. package/types/bricks/WebView.ts +0 -168
  63. package/types/bricks/index.ts +0 -22
  64. package/types/canvas.ts +0 -82
  65. package/types/common.ts +0 -144
  66. package/types/data-calc-command.ts +0 -7005
  67. package/types/data-calc-script.ts +0 -21
  68. package/types/data-calc.ts +0 -11
  69. package/types/data.ts +0 -95
  70. package/types/generators/AlarmClock.ts +0 -110
  71. package/types/generators/Assistant.ts +0 -621
  72. package/types/generators/BleCentral.ts +0 -247
  73. package/types/generators/BlePeripheral.ts +0 -208
  74. package/types/generators/CanvasMap.ts +0 -74
  75. package/types/generators/CastlesPay.ts +0 -87
  76. package/types/generators/DataBank.ts +0 -160
  77. package/types/generators/File.ts +0 -432
  78. package/types/generators/GraphQl.ts +0 -132
  79. package/types/generators/Http.ts +0 -222
  80. package/types/generators/HttpServer.ts +0 -176
  81. package/types/generators/Information.ts +0 -103
  82. package/types/generators/Intent.ts +0 -168
  83. package/types/generators/Iterator.ts +0 -108
  84. package/types/generators/Keyboard.ts +0 -105
  85. package/types/generators/LlmAnthropicCompat.ts +0 -212
  86. package/types/generators/LlmAppleBuiltin.ts +0 -159
  87. package/types/generators/LlmGgml.ts +0 -861
  88. package/types/generators/LlmMediaTekNeuroPilot.ts +0 -235
  89. package/types/generators/LlmMlx.ts +0 -227
  90. package/types/generators/LlmOnnx.ts +0 -213
  91. package/types/generators/LlmOpenAiCompat.ts +0 -312
  92. package/types/generators/LlmQualcommAiEngine.ts +0 -247
  93. package/types/generators/Mcp.ts +0 -637
  94. package/types/generators/McpServer.ts +0 -289
  95. package/types/generators/MediaFlow.ts +0 -170
  96. package/types/generators/MqttBroker.ts +0 -141
  97. package/types/generators/MqttClient.ts +0 -141
  98. package/types/generators/Question.ts +0 -408
  99. package/types/generators/RealtimeTranscription.ts +0 -287
  100. package/types/generators/RerankerGgml.ts +0 -191
  101. package/types/generators/SerialPort.ts +0 -151
  102. package/types/generators/SoundPlayer.ts +0 -94
  103. package/types/generators/SoundRecorder.ts +0 -130
  104. package/types/generators/SpeechToTextGgml.ts +0 -419
  105. package/types/generators/SpeechToTextOnnx.ts +0 -236
  106. package/types/generators/SpeechToTextPlatform.ts +0 -85
  107. package/types/generators/SqLite.ts +0 -159
  108. package/types/generators/Step.ts +0 -107
  109. package/types/generators/SttAppleBuiltin.ts +0 -130
  110. package/types/generators/Tcp.ts +0 -126
  111. package/types/generators/TcpServer.ts +0 -147
  112. package/types/generators/TextToSpeechAppleBuiltin.ts +0 -127
  113. package/types/generators/TextToSpeechGgml.ts +0 -221
  114. package/types/generators/TextToSpeechOnnx.ts +0 -178
  115. package/types/generators/TextToSpeechOpenAiLike.ts +0 -121
  116. package/types/generators/ThermalPrinter.ts +0 -191
  117. package/types/generators/Tick.ts +0 -83
  118. package/types/generators/Udp.ts +0 -120
  119. package/types/generators/VadGgml.ts +0 -250
  120. package/types/generators/VadOnnx.ts +0 -231
  121. package/types/generators/VadTraditional.ts +0 -138
  122. package/types/generators/VectorStore.ts +0 -257
  123. package/types/generators/Watchdog.ts +0 -107
  124. package/types/generators/WebCrawler.ts +0 -103
  125. package/types/generators/WebRtc.ts +0 -181
  126. package/types/generators/WebSocket.ts +0 -148
  127. package/types/generators/index.ts +0 -57
  128. package/types/index.ts +0 -13
  129. package/types/subspace.ts +0 -60
  130. package/types/switch.ts +0 -51
  131. package/types/system.ts +0 -707
  132. package/utils/calc.ts +0 -126
  133. package/utils/data.ts +0 -497
  134. package/utils/event-props.ts +0 -886
  135. package/utils/id.ts +0 -80
@@ -1,141 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * MQTT client with topic subscribe/publish, QoS levels (0/1/2), auto-reconnect, and auth support. Connects via mqtt:// or wss://
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type {
8
- Brick,
9
- Generator,
10
- EventAction,
11
- ActionWithDataParams,
12
- ActionWithParams,
13
- Action,
14
- EventProperty,
15
- } from '../common'
16
- import type { TemplateEventPropsMap } from '../../utils/event-props'
17
-
18
- /* Connect to MQTT broker */
19
- export type GeneratorMQTTActionConnect = Action & {
20
- __actionName: 'GENERATOR_MQTT_CONNECT'
21
- }
22
-
23
- /* Disconnect from MQTT broker */
24
- export type GeneratorMQTTActionDisconnect = Action & {
25
- __actionName: 'GENERATOR_MQTT_DISCONNECT'
26
- }
27
-
28
- /* Send message to MQTT broker */
29
- export type GeneratorMQTTActionPublish = ActionWithParams & {
30
- __actionName: 'GENERATOR_MQTT_PUBLISH'
31
- params?: Array<
32
- | {
33
- input: 'topic'
34
- value?: string | DataLink | EventProperty
35
- mapping?: string
36
- }
37
- | {
38
- input: 'payload'
39
- value?: any | EventProperty
40
- mapping?: string
41
- }
42
- | {
43
- input: 'qos'
44
- value?: '0' | '1' | '2' | DataLink | EventProperty
45
- mapping?: string
46
- }
47
- | {
48
- input: 'retain'
49
- value?: boolean | DataLink | EventProperty
50
- mapping?: string
51
- }
52
- >
53
- }
54
-
55
- interface GeneratorMQTTDef {
56
- /*
57
- Default property:
58
- {
59
- "init": false,
60
- "auth": false,
61
- "autoReconnect": true,
62
- "autoReconnectAttemptTime": 1000,
63
- "qos": "0",
64
- "messageType": "text"
65
- }
66
- */
67
- property?: {
68
- /* Auto connect when generator start */
69
- init?: boolean | DataLink
70
- /* Broker endpoint (mqtt://) */
71
- uri?: string | DataLink
72
- /* Broker need auth or not, if set false will ignore username and password setting */
73
- auth?: boolean | DataLink
74
- /* Username */
75
- username?: string | DataLink
76
- /* Password */
77
- password?: string | DataLink
78
- /* Client ID */
79
- clientId?: string | DataLink
80
- /* Second */
81
- keepAlive?: number | DataLink
82
- /* If true, BRICKS will auto reconnect when connection lose */
83
- autoReconnect?: boolean | DataLink
84
- /* How many times BRICKS will try to reconnect */
85
- autoReconnectAttemptTime?: number | DataLink
86
- /* Topic name to subscribe */
87
- topic?: string | DataLink
88
- /* Setting the mode of quality of service mode */
89
- qos?: '0' | '1' | '2' | DataLink
90
- /* If set to text the outlet and event property will be string, if set to json will parse to object */
91
- messageType?: 'text' | 'json' | DataLink
92
- }
93
- events?: {
94
- /* When connected to MQTT broker */
95
- onConnected?: Array<EventAction>
96
- /* When disconnected from MQTT broker */
97
- onDisconnected?: Array<EventAction>
98
- /* When error occurred */
99
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Mqtt']['onError']>>
100
- /* When received message from MQTT broker within subscribe topic */
101
- onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['Mqtt']['onMessage']>>
102
- }
103
- outlets?: {
104
- /* Connected or not */
105
- connected?: () => Data<boolean>
106
- /* Error Message */
107
- error?: () => Data<string>
108
- /* The receive message */
109
- message?: () => Data<{
110
- topic?: string
111
- payload?: any
112
- qos?: number
113
- retain?: boolean
114
- [key: string]: any
115
- }>
116
- /* The receive message (payload only) */
117
- messagePayload?: () => Data<any>
118
- }
119
- }
120
-
121
- /* MQTT client with topic subscribe/publish, QoS levels (0/1/2), auto-reconnect, and auth support. Connects via mqtt:// or wss:// */
122
- export type GeneratorMQTT = Generator &
123
- GeneratorMQTTDef & {
124
- templateKey: 'GENERATOR_MQTT'
125
- switches?: Array<
126
- SwitchDef &
127
- GeneratorMQTTDef & {
128
- conds?: Array<{
129
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
130
- cond:
131
- | SwitchCondInnerStateCurrentCanvas
132
- | SwitchCondData
133
- | {
134
- __typename: 'SwitchCondInnerStateOutlet'
135
- outlet: 'connected' | 'error' | 'message' | 'messagePayload'
136
- value: any
137
- }
138
- }>
139
- }
140
- >
141
- }
@@ -1,408 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Prompt user for input via dialog and return the response
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type {
8
- Brick,
9
- Generator,
10
- EventAction,
11
- ActionWithDataParams,
12
- ActionWithParams,
13
- Action,
14
- EventProperty,
15
- } from '../common'
16
- import type { TemplateEventPropsMap } from '../../utils/event-props'
17
-
18
- /* Start inquire */
19
- export type GeneratorQuestionActionStart = Action & {
20
- __actionName: 'GENERATOR_QUESTION_START'
21
- }
22
-
23
- /* Stop inquire */
24
- export type GeneratorQuestionActionStop = Action & {
25
- __actionName: 'GENERATOR_QUESTION_STOP'
26
- }
27
-
28
- /* Pause inquire */
29
- export type GeneratorQuestionActionPause = Action & {
30
- __actionName: 'GENERATOR_QUESTION_PAUSE'
31
- }
32
-
33
- interface GeneratorQuestionDef {
34
- /*
35
- Default property:
36
- {
37
- "modalMode": "root",
38
- "showClose": true,
39
- "showBack": true,
40
- "cameraType": "back",
41
- "cameraPosition": "top",
42
- "selectColumns": 3,
43
- "selectAutoColumns": true,
44
- "sizeFactor": 1,
45
- "containerBackgroundColor": "#ffffff",
46
- "titleColor": "#000000",
47
- "descriptionColor": "#2e2e2e",
48
- "fieldBackgroundColor": "#E2E2E2",
49
- "fieldTextColor": "#1e1e1e",
50
- "fieldPlaceholderColor": "#333333",
51
- "fieldActiveBackgroundColor": "#FDCB8F",
52
- "fieldActiveTextColor": "#7D7D7D",
53
- "fieldControlColor": "#f08400",
54
- "primaryControlBtnBackgroundColor": "#1e1e1e",
55
- "primaryControlBtnTextColor": "#ffffff",
56
- "primaryControlBtnBorderColor": "#1e1e1e",
57
- "secondaryControlBtnBackgroundColor": "#ffffff",
58
- "secondaryControlBtnTextColor": "#1e1e1e",
59
- "secondaryControlBtnBorderColor": "#1e1e1e",
60
- "warnColor": "#ff4f00",
61
- "errorColor": "#ff0000"
62
- }
63
- */
64
- property?: {
65
- /* Modal mode */
66
- modalMode?: 'root' | 'in-subspace' | DataLink
67
- /* Inquirer schema
68
- `key`: Field key (unique, required)
69
- `kind`: Field type (required)
70
- `title`: Field or message title
71
- `description`: Field or message description
72
- `required`: Whether the field is required
73
- `defaultValue`: Default value of the field
74
- `[kind]Options`: Field configuration
75
- `condition`: Condition to show field */
76
- schema?:
77
- | Array<
78
- | DataLink
79
- | {
80
- key?: string | DataLink
81
- title?: string | DataLink
82
- description?: string | DataLink
83
- kind?:
84
- | 'language'
85
- | 'number'
86
- | 'numeric-string'
87
- | 'text'
88
- | 'phone'
89
- | 'email'
90
- | 'color'
91
- | 'uri'
92
- | 'select'
93
- | 'multi-select'
94
- | 'yesno'
95
- | 'qty-list'
96
- | 'cart'
97
- | 'preference'
98
- | 'voice-record'
99
- | 'video-record'
100
- | 'code-scan'
101
- | 'message'
102
- | DataLink
103
- required?: boolean | DataLink
104
- defaultValue?:
105
- | string
106
- | DataLink
107
- | number
108
- | DataLink
109
- | boolean
110
- | DataLink
111
- | Array<string | DataLink>
112
- | DataLink
113
- | DataLink
114
- languageOptions?:
115
- | DataLink
116
- | {
117
- availableLangs?: Array<string | DataLink> | DataLink
118
- }
119
- numberOptions?:
120
- | DataLink
121
- | {
122
- min?: number | DataLink
123
- max?: number | DataLink
124
- step?: number | DataLink
125
- }
126
- textOptions?:
127
- | DataLink
128
- | {
129
- placeholder?: string | DataLink
130
- }
131
- phoneOptions?:
132
- | DataLink
133
- | {
134
- placeholder?: string | DataLink
135
- usePhysicalKeyboard?: boolean | DataLink
136
- }
137
- emailOptions?:
138
- | DataLink
139
- | {
140
- placeholder?: string | DataLink
141
- }
142
- uriOptions?:
143
- | DataLink
144
- | {
145
- placeholder?: string | DataLink
146
- }
147
- selectOptions?:
148
- | DataLink
149
- | {
150
- withConfirmButton?: boolean | DataLink
151
- options?:
152
- | Array<
153
- | DataLink
154
- | {
155
- value?: string | DataLink
156
- image_uri?: string | DataLink
157
- label?: string | DataLink
158
- icon?: string | DataLink
159
- }
160
- >
161
- | DataLink
162
- }
163
- multiSelectOptions?:
164
- | DataLink
165
- | {
166
- options?:
167
- | Array<
168
- | DataLink
169
- | {
170
- value?: string | DataLink
171
- image_uri?: string | DataLink
172
- label?: string | DataLink
173
- icon?: string | DataLink
174
- }
175
- >
176
- | DataLink
177
- minimum?: number | DataLink
178
- maximum?: number | DataLink
179
- }
180
- yesnoOptions?:
181
- | DataLink
182
- | {
183
- imageUri?: string | DataLink
184
- withConfirmButton?: boolean | DataLink
185
- yesBtnText?: string | DataLink
186
- noBtnText?: string | DataLink
187
- }
188
- qtyListOptions?:
189
- | DataLink
190
- | {
191
- items?:
192
- | Array<
193
- | DataLink
194
- | {
195
- id?: string | DataLink
196
- title?: string | DataLink
197
- description?: string | DataLink
198
- imageUri?: string | DataLink
199
- price?: number | DataLink
200
- }
201
- >
202
- | DataLink
203
- }
204
- cartOptions?:
205
- | DataLink
206
- | {
207
- items?:
208
- | Array<
209
- | DataLink
210
- | {
211
- id?: string | DataLink
212
- title?: string | DataLink
213
- description?: string | DataLink
214
- imageUri?: string | DataLink
215
- price?: number | DataLink
216
- qty?: number | DataLink
217
- }
218
- >
219
- | DataLink
220
- }
221
- preferenceOptions?:
222
- | DataLink
223
- | {
224
- settings?:
225
- | Array<
226
- | DataLink
227
- | {
228
- key?: string | DataLink
229
- title?: string | DataLink
230
- options?:
231
- | Array<
232
- | DataLink
233
- | {
234
- label?: string | DataLink
235
- value?: string | DataLink
236
- }
237
- >
238
- | DataLink
239
- multiple?: boolean | DataLink
240
- required?: boolean | DataLink
241
- maximum?: number | DataLink
242
- minimum?: number | DataLink
243
- }
244
- >
245
- | DataLink
246
- }
247
- voiceRecordOptions?:
248
- | DataLink
249
- | {
250
- sampleRate?: number | DataLink
251
- bitDepth?: '8bit' | '16bit' | DataLink
252
- channels?: 'mono' | 'stereo' | DataLink
253
- maxDuration?: number | DataLink
254
- }
255
- videoRecordOptions?:
256
- | DataLink
257
- | {
258
- manuallyStart?: boolean | DataLink
259
- recordDuration?: number | DataLink
260
- }
261
- codeScanOptions?:
262
- | DataLink
263
- | {
264
- inputSource?: 'camera' | 'hid-barcode-scanner' | DataLink
265
- hidFlushMode?: 'enter-key' | 'timeout' | DataLink
266
- hidFlushTimeout?: number | DataLink
267
- }
268
- messageOptions?:
269
- | DataLink
270
- | {
271
- symbol?: 'success' | DataLink
272
- duration?: number | DataLink
273
- }
274
- condition?:
275
- | DataLink
276
- | {
277
- key?: string | DataLink
278
- operator?:
279
- | 'eq'
280
- | 'neq'
281
- | 'contains'
282
- | 'notContains'
283
- | 'isTrue'
284
- | 'isFalse'
285
- | DataLink
286
- value?: string | DataLink
287
- }
288
- }
289
- >
290
- | DataLink
291
- /* Display language (RFC 3066) */
292
- displayLang?: string | DataLink
293
- /* Banner image */
294
- bannerImage?: string | DataLink
295
- /* Banner image md5 */
296
- bannerImageMd5?: string | DataLink
297
- /* Show AI transcribe tip on the bottom of the modal */
298
- aiTranscribeTip?: boolean | DataLink
299
- /* Show close button */
300
- showClose?: boolean | DataLink
301
- /* Show back button */
302
- showBack?: boolean | DataLink
303
- /* Camera type */
304
- cameraType?: 'front' | 'back' | DataLink
305
- /* Camera position */
306
- cameraPosition?: 'top' | 'left' | 'bottom' | 'right' | DataLink
307
- /* "Next" button text */
308
- nextButtonText?: string | DataLink
309
- /* "Skip" button text */
310
- skipButtonText?: string | DataLink
311
- /* "Done" button text */
312
- doneButtonText?: string | DataLink
313
- /* Select columns */
314
- selectColumns?: number | DataLink
315
- /* Select auto calculate columns */
316
- selectAutoColumns?: boolean | DataLink
317
- /* Fixed model width, default is auto */
318
- fixedModelWidth?: number | DataLink
319
- /* Fixed model height, default is auto */
320
- fixedModelHeight?: number | DataLink
321
- /* Size factor */
322
- sizeFactor?: number | DataLink
323
- /* Background color */
324
- backgroundColor?: string | DataLink
325
- /* Container background color */
326
- containerBackgroundColor?: string | DataLink
327
- /* Title color */
328
- titleColor?: string | DataLink
329
- /* Description color */
330
- descriptionColor?: string | DataLink
331
- /* Input field background color */
332
- fieldBackgroundColor?: string | DataLink
333
- /* Input field text color */
334
- fieldTextColor?: string | DataLink
335
- /* Input field placeholder color */
336
- fieldPlaceholderColor?: string | DataLink
337
- /* Selected option background color */
338
- fieldActiveBackgroundColor?: string | DataLink
339
- /* Selected option text color */
340
- fieldActiveTextColor?: string | DataLink
341
- /* Field control button color */
342
- fieldControlColor?: string | DataLink
343
- /* Primary control button background color */
344
- primaryControlBtnBackgroundColor?: string | DataLink
345
- /* Primary control button text color */
346
- primaryControlBtnTextColor?: string | DataLink
347
- /* Primary control button border color */
348
- primaryControlBtnBorderColor?: string | DataLink
349
- /* Secondary control button background color */
350
- secondaryControlBtnBackgroundColor?: string | DataLink
351
- /* Secondary control button text color */
352
- secondaryControlBtnTextColor?: string | DataLink
353
- /* Secondary control button border color */
354
- secondaryControlBtnBorderColor?: string | DataLink
355
- /* Warn color */
356
- warnColor?: string | DataLink
357
- /* Error color */
358
- errorColor?: string | DataLink
359
- }
360
- events?: {
361
- /* Event of go next */
362
- onNextQuestion?: Array<EventAction>
363
- /* Event of go back */
364
- onBackQuestion?: Array<EventAction>
365
- /* Event of change question */
366
- onQuestionChange?: Array<EventAction>
367
- /* Event of user close question modal */
368
- onClose?: Array<EventAction>
369
- /* Event of warning showed */
370
- onWarning?: Array<EventAction>
371
- /* Event of completed inquire */
372
- onCompleted?: Array<EventAction>
373
- /* Event of error occured */
374
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Question']['onError']>>
375
- }
376
- outlets?: {
377
- /* Result data */
378
- data?: () => Data<{ [key: string]: any }>
379
- /* Currnet question */
380
- currectKey?: () => Data<string>
381
- /* Currnet input value */
382
- currectValue?: () => Data<any>
383
- /* Error message */
384
- errorMessage?: () => Data<string>
385
- }
386
- }
387
-
388
- /* Prompt user for input via dialog and return the response */
389
- export type GeneratorQuestion = Generator &
390
- GeneratorQuestionDef & {
391
- templateKey: 'GENERATOR_QUESTION'
392
- switches?: Array<
393
- SwitchDef &
394
- GeneratorQuestionDef & {
395
- conds?: Array<{
396
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
397
- cond:
398
- | SwitchCondInnerStateCurrentCanvas
399
- | SwitchCondData
400
- | {
401
- __typename: 'SwitchCondInnerStateOutlet'
402
- outlet: 'data' | 'currectKey' | 'currectValue' | 'errorMessage'
403
- value: any
404
- }
405
- }>
406
- }
407
- >
408
- }