@fugood/bricks-project 2.24.0-beta.35 → 2.24.0-beta.37
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.
- package/compile/index.ts +14 -6
- package/package.json +2 -2
- package/types/bricks/Camera.ts +10 -5
- package/types/bricks/Chart.ts +5 -2
- package/types/bricks/GenerativeMedia.ts +20 -7
- package/types/bricks/Icon.ts +3 -2
- package/types/bricks/Image.ts +2 -1
- package/types/bricks/Items.ts +19 -8
- package/types/bricks/Lottie.ts +9 -4
- package/types/bricks/Maps.ts +10 -5
- package/types/bricks/QrCode.ts +1 -0
- package/types/bricks/Rect.ts +1 -0
- package/types/bricks/RichText.ts +3 -2
- package/types/bricks/Rive.ts +17 -10
- package/types/bricks/Slideshow.ts +12 -5
- package/types/bricks/Svg.ts +1 -0
- package/types/bricks/Text.ts +1 -0
- package/types/bricks/TextInput.ts +8 -5
- package/types/bricks/Video.ts +3 -2
- package/types/bricks/VideoStreaming.ts +1 -0
- package/types/bricks/WebRtcStream.ts +1 -0
- package/types/bricks/WebView.ts +6 -5
- package/types/common.ts +10 -8
- package/types/generators/AlarmClock.ts +7 -4
- package/types/generators/Assistant.ts +9 -6
- package/types/generators/BleCentral.ts +14 -5
- package/types/generators/BlePeripheral.ts +1 -0
- package/types/generators/CanvasMap.ts +2 -1
- package/types/generators/CastlesPay.ts +7 -2
- package/types/generators/DataBank.ts +8 -3
- package/types/generators/File.ts +41 -14
- package/types/generators/GraphQl.ts +6 -3
- package/types/generators/Http.ts +3 -2
- package/types/generators/HttpServer.ts +11 -6
- package/types/generators/Information.ts +2 -1
- package/types/generators/Intent.ts +3 -2
- package/types/generators/Iterator.ts +5 -4
- package/types/generators/Keyboard.ts +4 -3
- package/types/generators/LlmAnthropicCompat.ts +11 -4
- package/types/generators/LlmAppleBuiltin.ts +8 -3
- package/types/generators/LlmGgml.ts +12 -5
- package/types/generators/LlmMediaTekNeuroPilot.ts +11 -4
- package/types/generators/LlmMlx.ts +11 -4
- package/types/generators/LlmOnnx.ts +11 -4
- package/types/generators/LlmOpenAiCompat.ts +11 -4
- package/types/generators/LlmQualcommAiEngine.ts +9 -4
- package/types/generators/Mcp.ts +40 -17
- package/types/generators/McpServer.ts +17 -8
- package/types/generators/MediaFlow.ts +8 -3
- package/types/generators/MqttBroker.ts +16 -7
- package/types/generators/MqttClient.ts +5 -4
- package/types/generators/Question.ts +2 -1
- package/types/generators/RealtimeTranscription.ts +22 -7
- package/types/generators/RerankerGgml.ts +5 -2
- package/types/generators/SerialPort.ts +7 -2
- package/types/generators/SoundPlayer.ts +4 -1
- package/types/generators/SoundRecorder.ts +3 -2
- package/types/generators/SpeechToTextGgml.ts +8 -3
- package/types/generators/SpeechToTextOnnx.ts +5 -2
- package/types/generators/SpeechToTextPlatform.ts +7 -2
- package/types/generators/SqLite.ts +5 -2
- package/types/generators/Step.ts +2 -1
- package/types/generators/SttAppleBuiltin.ts +5 -2
- package/types/generators/Tcp.ts +5 -4
- package/types/generators/TcpServer.ts +10 -7
- package/types/generators/TextToSpeechAppleBuiltin.ts +5 -2
- package/types/generators/TextToSpeechGgml.ts +5 -2
- package/types/generators/TextToSpeechOnnx.ts +5 -2
- package/types/generators/TextToSpeechOpenAiLike.ts +5 -2
- package/types/generators/ThermalPrinter.ts +2 -1
- package/types/generators/Tick.ts +3 -2
- package/types/generators/Udp.ts +3 -2
- package/types/generators/VadGgml.ts +8 -3
- package/types/generators/VadOnnx.ts +6 -3
- package/types/generators/VadTraditional.ts +8 -3
- package/types/generators/VectorStore.ts +4 -3
- package/types/generators/Watchdog.ts +3 -2
- package/types/generators/WebCrawler.ts +3 -2
- package/types/generators/WebRtc.ts +8 -3
- package/types/generators/WebSocket.ts +2 -1
- package/utils/event-props.ts +833 -1059
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Load or validate the NeuroPilot model context */
|
|
18
19
|
export type GeneratorNeuropilotLlmActionLoadModel = ActionWithParams & {
|
|
@@ -172,13 +173,19 @@ Default property:
|
|
|
172
173
|
}
|
|
173
174
|
events?: {
|
|
174
175
|
/* Event triggered when the NeuroPilot context state changes */
|
|
175
|
-
onContextStateChange?: Array<
|
|
176
|
+
onContextStateChange?: Array<
|
|
177
|
+
EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onContextStateChange']>
|
|
178
|
+
>
|
|
176
179
|
/* Event triggered when a completion token or partial result is emitted */
|
|
177
|
-
onCompletion?: Array<
|
|
180
|
+
onCompletion?: Array<
|
|
181
|
+
EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onCompletion']>
|
|
182
|
+
>
|
|
178
183
|
/* Event triggered when generation finishes */
|
|
179
|
-
onCompletionFinished?: Array<
|
|
184
|
+
onCompletionFinished?: Array<
|
|
185
|
+
EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onCompletionFinished']>
|
|
186
|
+
>
|
|
180
187
|
/* Event triggered when a NeuroPilot error occurs */
|
|
181
|
-
onError?: Array<EventAction
|
|
188
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onError']>>
|
|
182
189
|
}
|
|
183
190
|
outlets?: {
|
|
184
191
|
/* Current NeuroPilot context state */
|
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
Action,
|
|
21
21
|
EventProperty,
|
|
22
22
|
} from '../common'
|
|
23
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
23
24
|
|
|
24
25
|
/* Load model */
|
|
25
26
|
export type GeneratorMlxLLMActionLoadModel = ActionWithParams & {
|
|
@@ -163,13 +164,19 @@ Default property:
|
|
|
163
164
|
}
|
|
164
165
|
events?: {
|
|
165
166
|
/* Event triggered when context state changes */
|
|
166
|
-
onContextStateChange?: Array<
|
|
167
|
+
onContextStateChange?: Array<
|
|
168
|
+
EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onContextStateChange']>
|
|
169
|
+
>
|
|
167
170
|
/* Error event */
|
|
168
|
-
onError?: Array<EventAction
|
|
171
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onError']>>
|
|
169
172
|
/* Completion streaming event (emitted for each token) */
|
|
170
|
-
onCompletion?: Array<
|
|
173
|
+
onCompletion?: Array<
|
|
174
|
+
EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onCompletion']>
|
|
175
|
+
>
|
|
171
176
|
/* Completion finished event */
|
|
172
|
-
onCompletionFinished?: Array<
|
|
177
|
+
onCompletionFinished?: Array<
|
|
178
|
+
EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onCompletionFinished']>
|
|
179
|
+
>
|
|
173
180
|
}
|
|
174
181
|
outlets?: {
|
|
175
182
|
/* Context state */
|
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
Action,
|
|
15
15
|
EventProperty,
|
|
16
16
|
} from '../common'
|
|
17
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
17
18
|
|
|
18
19
|
/* Load the model */
|
|
19
20
|
export type GeneratorOnnxLLMActionLoadModel = Action & {
|
|
@@ -153,13 +154,19 @@ Default property:
|
|
|
153
154
|
}
|
|
154
155
|
events?: {
|
|
155
156
|
/* Event triggered when state change */
|
|
156
|
-
onContextStateChange?: Array<
|
|
157
|
+
onContextStateChange?: Array<
|
|
158
|
+
EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onContextStateChange']>
|
|
159
|
+
>
|
|
157
160
|
/* Event triggered on get function call request */
|
|
158
|
-
onFunctionCall?: Array<
|
|
161
|
+
onFunctionCall?: Array<
|
|
162
|
+
EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onFunctionCall']>
|
|
163
|
+
>
|
|
159
164
|
/* Event triggered on completion finished */
|
|
160
|
-
onCompletionFinished?: Array<
|
|
165
|
+
onCompletionFinished?: Array<
|
|
166
|
+
EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onCompletionFinished']>
|
|
167
|
+
>
|
|
161
168
|
/* Event triggered when error occurs */
|
|
162
|
-
onError?: Array<EventAction
|
|
169
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onError']>>
|
|
163
170
|
}
|
|
164
171
|
outlets?: {
|
|
165
172
|
/* Context state */
|
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
Action,
|
|
24
24
|
EventProperty,
|
|
25
25
|
} from '../common'
|
|
26
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
26
27
|
|
|
27
28
|
/* Run text completion */
|
|
28
29
|
export type GeneratorOpenAILLMActionCompletion = ActionWithParams & {
|
|
@@ -170,13 +171,19 @@ Default property:
|
|
|
170
171
|
}
|
|
171
172
|
events?: {
|
|
172
173
|
/* Error event */
|
|
173
|
-
onError?: Array<EventAction
|
|
174
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onError']>>
|
|
174
175
|
/* Completion event */
|
|
175
|
-
onCompletion?: Array<
|
|
176
|
+
onCompletion?: Array<
|
|
177
|
+
EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onCompletion']>
|
|
178
|
+
>
|
|
176
179
|
/* Completion finished event */
|
|
177
|
-
onCompletionFinished?: Array<
|
|
180
|
+
onCompletionFinished?: Array<
|
|
181
|
+
EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onCompletionFinished']>
|
|
182
|
+
>
|
|
178
183
|
/* Completion function call event */
|
|
179
|
-
onCompletionFunctionCall?: Array<
|
|
184
|
+
onCompletionFunctionCall?: Array<
|
|
185
|
+
EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onCompletionFunctionCall']>
|
|
186
|
+
>
|
|
180
187
|
}
|
|
181
188
|
outlets?: {
|
|
182
189
|
/* Evaluating outlet */
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Load the model */
|
|
18
19
|
export type GeneratorQnnLlmActionLoadModel = Action & {
|
|
@@ -168,13 +169,17 @@ Default property:
|
|
|
168
169
|
}
|
|
169
170
|
events?: {
|
|
170
171
|
/* Event triggered when context state changes */
|
|
171
|
-
onContextStateChange?: Array<
|
|
172
|
+
onContextStateChange?: Array<
|
|
173
|
+
EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onContextStateChange']>
|
|
174
|
+
>
|
|
172
175
|
/* Event triggered when generate is done */
|
|
173
|
-
onGenerate?: Array<EventAction
|
|
176
|
+
onGenerate?: Array<EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onGenerate']>>
|
|
174
177
|
/* Event triggered on get function call request */
|
|
175
|
-
onFunctionCall?: Array<
|
|
178
|
+
onFunctionCall?: Array<
|
|
179
|
+
EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onFunctionCall']>
|
|
180
|
+
>
|
|
176
181
|
/* Event triggered when error occurs */
|
|
177
|
-
onError?: Array<EventAction
|
|
182
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onError']>>
|
|
178
183
|
}
|
|
179
184
|
outlets?: {
|
|
180
185
|
/* Context state */
|
package/types/generators/Mcp.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Auto generated by build script
|
|
2
2
|
*
|
|
3
|
-
*
|
|
3
|
+
* MCP client connecting to tool servers via Streamable HTTP, SSE, or direct-link to in-app MCP Server generator. Provides tools, resources, and prompts for Assistant
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Connect to MCP server */
|
|
18
19
|
export type GeneratorMCPActionConnect = Action & {
|
|
@@ -192,37 +193,59 @@ Default property:
|
|
|
192
193
|
/* On connected */
|
|
193
194
|
onConnected?: Array<EventAction>
|
|
194
195
|
/* On connection error */
|
|
195
|
-
onConnectionError?: Array<
|
|
196
|
+
onConnectionError?: Array<
|
|
197
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onConnectionError']>
|
|
198
|
+
>
|
|
196
199
|
/* On disconnected */
|
|
197
200
|
onDisconnected?: Array<EventAction>
|
|
198
201
|
/* On list resources */
|
|
199
|
-
onListResources?: Array<
|
|
202
|
+
onListResources?: Array<
|
|
203
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResources']>
|
|
204
|
+
>
|
|
200
205
|
/* On list resources error */
|
|
201
|
-
onListResourcesError?: Array<
|
|
206
|
+
onListResourcesError?: Array<
|
|
207
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResourcesError']>
|
|
208
|
+
>
|
|
202
209
|
/* On list resource templates */
|
|
203
|
-
onListResourceTemplates?: Array<
|
|
210
|
+
onListResourceTemplates?: Array<
|
|
211
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResourceTemplates']>
|
|
212
|
+
>
|
|
204
213
|
/* On list resource templates error */
|
|
205
|
-
onListResourceTemplatesError?: Array<
|
|
214
|
+
onListResourceTemplatesError?: Array<
|
|
215
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResourceTemplatesError']>
|
|
216
|
+
>
|
|
206
217
|
/* On read resource */
|
|
207
|
-
onReadResource?: Array<
|
|
218
|
+
onReadResource?: Array<
|
|
219
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onReadResource']>
|
|
220
|
+
>
|
|
208
221
|
/* On read resource error */
|
|
209
|
-
onReadResourceError?: Array<
|
|
222
|
+
onReadResourceError?: Array<
|
|
223
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onReadResourceError']>
|
|
224
|
+
>
|
|
210
225
|
/* On list tools */
|
|
211
|
-
onListTools?: Array<EventAction
|
|
226
|
+
onListTools?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListTools']>>
|
|
212
227
|
/* On list tools error */
|
|
213
|
-
onListToolsError?: Array<
|
|
228
|
+
onListToolsError?: Array<
|
|
229
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListToolsError']>
|
|
230
|
+
>
|
|
214
231
|
/* On call tool */
|
|
215
|
-
onCallTool?: Array<EventAction
|
|
232
|
+
onCallTool?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onCallTool']>>
|
|
216
233
|
/* On call tool error */
|
|
217
|
-
onCallToolError?: Array<
|
|
234
|
+
onCallToolError?: Array<
|
|
235
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onCallToolError']>
|
|
236
|
+
>
|
|
218
237
|
/* On list prompts */
|
|
219
|
-
onListPrompts?: Array<EventAction
|
|
238
|
+
onListPrompts?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListPrompts']>>
|
|
220
239
|
/* On list prompts error */
|
|
221
|
-
onListPromptsError?: Array<
|
|
240
|
+
onListPromptsError?: Array<
|
|
241
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListPromptsError']>
|
|
242
|
+
>
|
|
222
243
|
/* On get prompt */
|
|
223
|
-
onGetPrompt?: Array<EventAction
|
|
244
|
+
onGetPrompt?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onGetPrompt']>>
|
|
224
245
|
/* On get prompt error */
|
|
225
|
-
onGetPromptError?: Array<
|
|
246
|
+
onGetPromptError?: Array<
|
|
247
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onGetPromptError']>
|
|
248
|
+
>
|
|
226
249
|
}
|
|
227
250
|
outlets?: {
|
|
228
251
|
/* Connection state */
|
|
@@ -575,7 +598,7 @@ Default property:
|
|
|
575
598
|
}
|
|
576
599
|
}
|
|
577
600
|
|
|
578
|
-
/*
|
|
601
|
+
/* MCP client connecting to tool servers via Streamable HTTP, SSE, or direct-link to in-app MCP Server generator. Provides tools, resources, and prompts for Assistant */
|
|
579
602
|
export type GeneratorMCP = Generator &
|
|
580
603
|
GeneratorMCPDef & {
|
|
581
604
|
templateKey: 'GENERATOR_MCP'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Auto generated by build script
|
|
2
2
|
*
|
|
3
|
-
*
|
|
3
|
+
* MCP server exposing tools, resources (static/detect-data-change/script), and prompts. Supports HTTP listening with Bearer auth or direct-link from in-app MCP client
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Refresh tools and resources, used for case if tools or resources are changed. Note that the current connections will be closed. */
|
|
18
19
|
export type GeneratorMCPServerActionRefreshResources = Action & {
|
|
@@ -193,17 +194,25 @@ Default property:
|
|
|
193
194
|
/* Listening of HTTP server */
|
|
194
195
|
onListening?: Array<EventAction>
|
|
195
196
|
/* Error of HTTP server */
|
|
196
|
-
onError?: Array<EventAction
|
|
197
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['McpServer']['onError']>>
|
|
197
198
|
/* Client error of HTTP server */
|
|
198
|
-
onClientError?: Array<
|
|
199
|
+
onClientError?: Array<
|
|
200
|
+
EventAction<string & keyof TemplateEventPropsMap['McpServer']['onClientError']>
|
|
201
|
+
>
|
|
199
202
|
/* Client close of HTTP server */
|
|
200
|
-
onClientClose?: Array<
|
|
203
|
+
onClientClose?: Array<
|
|
204
|
+
EventAction<string & keyof TemplateEventPropsMap['McpServer']['onClientClose']>
|
|
205
|
+
>
|
|
201
206
|
/* On request resource (Request: { name: string, uri: string, params: object }) */
|
|
202
|
-
onRequestResource?: Array<
|
|
207
|
+
onRequestResource?: Array<
|
|
208
|
+
EventAction<string & keyof TemplateEventPropsMap['McpServer']['onRequestResource']>
|
|
209
|
+
>
|
|
203
210
|
/* On call tool (Request: { name: string, params: object }) */
|
|
204
|
-
onCallTool?: Array<EventAction
|
|
211
|
+
onCallTool?: Array<EventAction<string & keyof TemplateEventPropsMap['McpServer']['onCallTool']>>
|
|
205
212
|
/* On get prompt (Request: { name: string, arguments: object }) */
|
|
206
|
-
onGetPrompt?: Array<
|
|
213
|
+
onGetPrompt?: Array<
|
|
214
|
+
EventAction<string & keyof TemplateEventPropsMap['McpServer']['onGetPrompt']>
|
|
215
|
+
>
|
|
207
216
|
}
|
|
208
217
|
outlets?: {
|
|
209
218
|
/* Whether the HTTP server is listening */
|
|
@@ -250,7 +259,7 @@ Default property:
|
|
|
250
259
|
}
|
|
251
260
|
}
|
|
252
261
|
|
|
253
|
-
/*
|
|
262
|
+
/* MCP server exposing tools, resources (static/detect-data-change/script), and prompts. Supports HTTP listening with Bearer auth or direct-link from in-app MCP client */
|
|
254
263
|
export type GeneratorMCPServer = Generator &
|
|
255
264
|
GeneratorMCPServerDef & {
|
|
256
265
|
templateKey: 'GENERATOR_MCP_SERVER'
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Start fetcn Media box file list */
|
|
18
19
|
export type GeneratorMediaFlowActionFetch = Action & {
|
|
@@ -90,13 +91,17 @@ Default property:
|
|
|
90
91
|
}
|
|
91
92
|
events?: {
|
|
92
93
|
/* Event of media box fetch error */
|
|
93
|
-
fetchError?: Array<EventAction
|
|
94
|
+
fetchError?: Array<EventAction<string & keyof TemplateEventPropsMap['MediaFlow']['fetchError']>>
|
|
94
95
|
/* Event of subscribe box change connected (If set `Subscribe Box Change`) */
|
|
95
96
|
subscribeBoxConnect?: Array<EventAction>
|
|
96
97
|
/* Event of subscribe box change error (If set `Subscribe Box Change`) */
|
|
97
|
-
subscribeBoxError?: Array<
|
|
98
|
+
subscribeBoxError?: Array<
|
|
99
|
+
EventAction<string & keyof TemplateEventPropsMap['MediaFlow']['subscribeBoxError']>
|
|
100
|
+
>
|
|
98
101
|
/* Event of subscribe box change connection error (If set `Subscribe Box Change`) */
|
|
99
|
-
subscribeBoxConnectError?: Array<
|
|
102
|
+
subscribeBoxConnectError?: Array<
|
|
103
|
+
EventAction<string & keyof TemplateEventPropsMap['MediaFlow']['subscribeBoxConnectError']>
|
|
104
|
+
>
|
|
100
105
|
/* Event of file sync completed for used `saveToStorage` */
|
|
101
106
|
saveStorageCompleted?: Array<EventAction>
|
|
102
107
|
/* Event when file list size exceed of Load size limit */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Auto generated by build script
|
|
2
2
|
*
|
|
3
|
-
* MQTT
|
|
3
|
+
* Embedded MQTT broker server with client authentication, publish/subscribe messaging, keepalive, and retry support
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Start MQTT broker server */
|
|
18
19
|
export type GeneratorMQTTBrokerActionStart = Action & {
|
|
@@ -83,15 +84,23 @@ Default property:
|
|
|
83
84
|
/* Event of MQTT server is ready */
|
|
84
85
|
onReady?: Array<EventAction>
|
|
85
86
|
/* Event of server or connection error */
|
|
86
|
-
onError?: Array<EventAction
|
|
87
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onError']>>
|
|
87
88
|
/* Event of client connected */
|
|
88
|
-
onClientConnected?: Array<
|
|
89
|
+
onClientConnected?: Array<
|
|
90
|
+
EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onClientConnected']>
|
|
91
|
+
>
|
|
89
92
|
/* Event of client disconnected */
|
|
90
|
-
onClientDisconnected?: Array<
|
|
93
|
+
onClientDisconnected?: Array<
|
|
94
|
+
EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onClientDisconnected']>
|
|
95
|
+
>
|
|
91
96
|
/* Event of message received */
|
|
92
|
-
onMessageReceived?: Array<
|
|
97
|
+
onMessageReceived?: Array<
|
|
98
|
+
EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onMessageReceived']>
|
|
99
|
+
>
|
|
93
100
|
/* Event of message published */
|
|
94
|
-
onMessagePublished?: Array<
|
|
101
|
+
onMessagePublished?: Array<
|
|
102
|
+
EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onMessagePublished']>
|
|
103
|
+
>
|
|
95
104
|
}
|
|
96
105
|
outlets?: {
|
|
97
106
|
/* Is server started */
|
|
@@ -109,7 +118,7 @@ Default property:
|
|
|
109
118
|
}
|
|
110
119
|
}
|
|
111
120
|
|
|
112
|
-
/* MQTT
|
|
121
|
+
/* Embedded MQTT broker server with client authentication, publish/subscribe messaging, keepalive, and retry support */
|
|
113
122
|
export type GeneratorMQTTBroker = Generator &
|
|
114
123
|
GeneratorMQTTBrokerDef & {
|
|
115
124
|
templateKey: 'GENERATOR_MQTT_BROKER'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Auto generated by build script
|
|
2
2
|
*
|
|
3
|
-
* MQTT
|
|
3
|
+
* MQTT client with topic subscribe/publish, QoS levels (0/1/2), auto-reconnect, and auth support. Connects via mqtt:// or wss://
|
|
4
4
|
*/
|
|
5
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
6
6
|
import type { Data, DataLink } from '../data'
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Connect to MQTT broker */
|
|
18
19
|
export type GeneratorMQTTActionConnect = Action & {
|
|
@@ -95,9 +96,9 @@ Default property:
|
|
|
95
96
|
/* When disconnected from MQTT broker */
|
|
96
97
|
onDisconnected?: Array<EventAction>
|
|
97
98
|
/* When error occurred */
|
|
98
|
-
onError?: Array<EventAction
|
|
99
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Mqtt']['onError']>>
|
|
99
100
|
/* When received message from MQTT broker within subscribe topic */
|
|
100
|
-
onMessage?: Array<EventAction
|
|
101
|
+
onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['Mqtt']['onMessage']>>
|
|
101
102
|
}
|
|
102
103
|
outlets?: {
|
|
103
104
|
/* Connected or not */
|
|
@@ -117,7 +118,7 @@ Default property:
|
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
/* MQTT
|
|
121
|
+
/* MQTT client with topic subscribe/publish, QoS levels (0/1/2), auto-reconnect, and auth support. Connects via mqtt:// or wss:// */
|
|
121
122
|
export type GeneratorMQTT = Generator &
|
|
122
123
|
GeneratorMQTTDef & {
|
|
123
124
|
templateKey: 'GENERATOR_MQTT'
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Start inquire */
|
|
18
19
|
export type GeneratorQuestionActionStart = Action & {
|
|
@@ -370,7 +371,7 @@ Default property:
|
|
|
370
371
|
/* Event of completed inquire */
|
|
371
372
|
onCompleted?: Array<EventAction>
|
|
372
373
|
/* Event of error occured */
|
|
373
|
-
onError?: Array<EventAction
|
|
374
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Question']['onError']>>
|
|
374
375
|
}
|
|
375
376
|
outlets?: {
|
|
376
377
|
/* Result data */
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Start realtime transcription */
|
|
18
19
|
export type GeneratorRealtimeTranscriptionActionStart = Action & {
|
|
@@ -131,19 +132,33 @@ Default property:
|
|
|
131
132
|
}
|
|
132
133
|
events?: {
|
|
133
134
|
/* Event triggered when transcription starts, processes, or ends */
|
|
134
|
-
onTranscribe?: Array<
|
|
135
|
+
onTranscribe?: Array<
|
|
136
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onTranscribe']>
|
|
137
|
+
>
|
|
135
138
|
/* Event triggered on VAD (Voice Activity Detection) events */
|
|
136
|
-
onVad?: Array<
|
|
139
|
+
onVad?: Array<
|
|
140
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onVad']>
|
|
141
|
+
>
|
|
137
142
|
/* Event triggered when error occurs */
|
|
138
|
-
onError?: Array<
|
|
143
|
+
onError?: Array<
|
|
144
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onError']>
|
|
145
|
+
>
|
|
139
146
|
/* Event triggered when status changes */
|
|
140
|
-
onStatusChange?: Array<
|
|
147
|
+
onStatusChange?: Array<
|
|
148
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onStatusChange']>
|
|
149
|
+
>
|
|
141
150
|
/* Event triggered when statistics update */
|
|
142
|
-
onStatsUpdate?: Array<
|
|
151
|
+
onStatsUpdate?: Array<
|
|
152
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onStatsUpdate']>
|
|
153
|
+
>
|
|
143
154
|
/* Event triggered when slice transcription is stabilized */
|
|
144
|
-
onStabilized?: Array<
|
|
155
|
+
onStabilized?: Array<
|
|
156
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onStabilized']>
|
|
157
|
+
>
|
|
145
158
|
/* Event triggered when transcription ends */
|
|
146
|
-
onEnd?: Array<
|
|
159
|
+
onEnd?: Array<
|
|
160
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onEnd']>
|
|
161
|
+
>
|
|
147
162
|
}
|
|
148
163
|
outlets?: {
|
|
149
164
|
/* Is realtime transcription currently active */
|
|
@@ -24,6 +24,7 @@ import type {
|
|
|
24
24
|
Action,
|
|
25
25
|
EventProperty,
|
|
26
26
|
} from '../common'
|
|
27
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
27
28
|
|
|
28
29
|
/* Load the model */
|
|
29
30
|
export type GeneratorRerankerActionLoadModel = Action & {
|
|
@@ -117,9 +118,11 @@ Default property:
|
|
|
117
118
|
}
|
|
118
119
|
events?: {
|
|
119
120
|
/* Event triggered when the reranker context state changes (loading, ready, error, released) */
|
|
120
|
-
onContextStateChange?: Array<
|
|
121
|
+
onContextStateChange?: Array<
|
|
122
|
+
EventAction<string & keyof TemplateEventPropsMap['Reranker']['onContextStateChange']>
|
|
123
|
+
>
|
|
121
124
|
/* Event triggered when an error occurs during reranker operations */
|
|
122
|
-
onError?: Array<EventAction
|
|
125
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Reranker']['onError']>>
|
|
123
126
|
}
|
|
124
127
|
outlets?: {
|
|
125
128
|
/* Current state of the reranker context (loading, ready, error, released) */
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Get available serial devices */
|
|
18
19
|
export type GeneratorSerialPortActionGeneratorSerialGetDeviceList = Action & {
|
|
@@ -100,9 +101,13 @@ Default property:
|
|
|
100
101
|
/* Event for detach the device */
|
|
101
102
|
generatorSerialOnDetach?: Array<EventAction>
|
|
102
103
|
/* Event on error */
|
|
103
|
-
generatorSerialOnError?: Array<
|
|
104
|
+
generatorSerialOnError?: Array<
|
|
105
|
+
EventAction<string & keyof TemplateEventPropsMap['SerialPort']['generatorSerialOnError']>
|
|
106
|
+
>
|
|
104
107
|
/* Event for receive data */
|
|
105
|
-
generatorSerialOnData?: Array<
|
|
108
|
+
generatorSerialOnData?: Array<
|
|
109
|
+
EventAction<string & keyof TemplateEventPropsMap['SerialPort']['generatorSerialOnData']>
|
|
110
|
+
>
|
|
106
111
|
}
|
|
107
112
|
outlets?: {
|
|
108
113
|
/* Available serial devices */
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Start playing sound */
|
|
18
19
|
export type GeneratorSoundPlayerActionPlay = Action & {
|
|
@@ -56,7 +57,9 @@ Default property:
|
|
|
56
57
|
/* Sound file loaded successfully */
|
|
57
58
|
onLoad?: Array<EventAction>
|
|
58
59
|
/* Sound file load error */
|
|
59
|
-
onLoadError?: Array<
|
|
60
|
+
onLoadError?: Array<
|
|
61
|
+
EventAction<string & keyof TemplateEventPropsMap['SoundPlayer']['onLoadError']>
|
|
62
|
+
>
|
|
60
63
|
/* Sound playback complete */
|
|
61
64
|
onPlay?: Array<EventAction>
|
|
62
65
|
/* Sound file playback end */
|
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
Action,
|
|
14
14
|
EventProperty,
|
|
15
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
16
17
|
|
|
17
18
|
/* Start record */
|
|
18
19
|
export type GeneratorSoundRecorderActionStart = Action & {
|
|
@@ -88,9 +89,9 @@ Default property:
|
|
|
88
89
|
}
|
|
89
90
|
events?: {
|
|
90
91
|
/* Event for chunk data (Base64 encoded PCM) */
|
|
91
|
-
chunk?: Array<EventAction
|
|
92
|
+
chunk?: Array<EventAction<string & keyof TemplateEventPropsMap['SoundRecorder']['chunk']>>
|
|
92
93
|
/* Event for recorded file */
|
|
93
|
-
recorded?: Array<EventAction
|
|
94
|
+
recorded?: Array<EventAction<string & keyof TemplateEventPropsMap['SoundRecorder']['recorded']>>
|
|
94
95
|
}
|
|
95
96
|
outlets?: {
|
|
96
97
|
/* Is recording */
|
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
Action,
|
|
20
20
|
EventProperty,
|
|
21
21
|
} from '../common'
|
|
22
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
22
23
|
|
|
23
24
|
/* Load the model */
|
|
24
25
|
export type GeneratorSpeechInferenceActionLoadModel = Action & {
|
|
@@ -328,11 +329,15 @@ Default property:
|
|
|
328
329
|
}
|
|
329
330
|
events?: {
|
|
330
331
|
/* Event triggered when context state changes */
|
|
331
|
-
onContextStateChange?: Array<
|
|
332
|
+
onContextStateChange?: Array<
|
|
333
|
+
EventAction<string & keyof TemplateEventPropsMap['SpeechInference']['onContextStateChange']>
|
|
334
|
+
>
|
|
332
335
|
/* Event triggered when error occurs */
|
|
333
|
-
onError?: Array<EventAction
|
|
336
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['SpeechInference']['onError']>>
|
|
334
337
|
/* Event triggered when got transcribe result */
|
|
335
|
-
onTranscribed?: Array<
|
|
338
|
+
onTranscribed?: Array<
|
|
339
|
+
EventAction<string & keyof TemplateEventPropsMap['SpeechInference']['onTranscribed']>
|
|
340
|
+
>
|
|
336
341
|
/* Event triggered when transcribe realtime done */
|
|
337
342
|
onRealtimeStop?: Array<EventAction>
|
|
338
343
|
}
|
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
Action,
|
|
15
15
|
EventProperty,
|
|
16
16
|
} from '../common'
|
|
17
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
17
18
|
|
|
18
19
|
/* Load the model */
|
|
19
20
|
export type GeneratorOnnxSTTActionLoadModel = Action & {
|
|
@@ -195,9 +196,11 @@ Default property:
|
|
|
195
196
|
}
|
|
196
197
|
events?: {
|
|
197
198
|
/* Event triggered when state change */
|
|
198
|
-
onContextStateChange?: Array<
|
|
199
|
+
onContextStateChange?: Array<
|
|
200
|
+
EventAction<string & keyof TemplateEventPropsMap['OnnxStt']['onContextStateChange']>
|
|
201
|
+
>
|
|
199
202
|
/* Event triggered when error occurs */
|
|
200
|
-
onError?: Array<EventAction
|
|
203
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxStt']['onError']>>
|
|
201
204
|
}
|
|
202
205
|
outlets?: {
|
|
203
206
|
/* Context state */
|