@fugood/bricks-project 2.23.6 → 2.23.8
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/action-name-map.ts +6 -0
- package/compile/index.ts +64 -43
- package/compile/util.ts +2 -0
- package/package.json +2 -2
- package/skills/bricks-design/LICENSE.txt +180 -0
- package/skills/bricks-design/SKILL.md +66 -0
- package/tools/deploy.ts +2 -2
- package/tools/preview.ts +1 -1
- package/types/automation.ts +1 -1
- package/types/bricks/Camera.ts +15 -7
- package/types/bricks/Chart.ts +9 -3
- package/types/bricks/GenerativeMedia.ts +24 -8
- package/types/bricks/Icon.ts +6 -2
- package/types/bricks/Image.ts +7 -3
- package/types/bricks/Items.ts +22 -8
- package/types/bricks/Lottie.ts +12 -4
- package/types/bricks/Maps.ts +13 -5
- package/types/bricks/QrCode.ts +6 -2
- package/types/bricks/Rect.ts +6 -2
- package/types/bricks/RichText.ts +6 -2
- package/types/bricks/Rive.ts +20 -10
- package/types/bricks/Slideshow.ts +17 -7
- package/types/bricks/Svg.ts +5 -1
- package/types/bricks/Text.ts +6 -2
- package/types/bricks/TextInput.ts +13 -7
- package/types/bricks/Video.ts +8 -4
- package/types/bricks/VideoStreaming.ts +5 -1
- package/types/bricks/WebRtcStream.ts +6 -2
- package/types/bricks/WebView.ts +9 -5
- package/types/common.ts +10 -8
- package/types/generators/AlarmClock.ts +12 -6
- package/types/generators/Assistant.ts +12 -6
- package/types/generators/BleCentral.ts +19 -7
- package/types/generators/BlePeripheral.ts +6 -2
- package/types/generators/CanvasMap.ts +6 -2
- package/types/generators/CastlesPay.ts +12 -4
- package/types/generators/DataBank.ts +13 -5
- package/types/generators/File.ts +46 -16
- package/types/generators/GraphQl.ts +9 -3
- package/types/generators/Http.ts +6 -2
- package/types/generators/HttpServer.ts +14 -6
- package/types/generators/Information.ts +7 -3
- package/types/generators/Intent.ts +7 -3
- package/types/generators/Iterator.ts +9 -5
- package/types/generators/Keyboard.ts +9 -5
- package/types/generators/LlmAnthropicCompat.ts +21 -5
- package/types/generators/LlmAppleBuiltin.ts +19 -4
- package/types/generators/LlmGgml.ts +65 -6
- package/types/generators/LlmMediaTekNeuroPilot.ts +16 -5
- package/types/generators/LlmMlx.ts +22 -5
- package/types/generators/LlmOnnx.ts +16 -5
- package/types/generators/LlmOpenAiCompat.ts +25 -5
- package/types/generators/LlmQualcommAiEngine.ts +13 -5
- package/types/generators/Mcp.ts +43 -17
- package/types/generators/McpServer.ts +20 -8
- package/types/generators/MediaFlow.ts +12 -4
- package/types/generators/MqttBroker.ts +19 -7
- package/types/generators/MqttClient.ts +8 -4
- package/types/generators/Question.ts +7 -3
- package/types/generators/RealtimeTranscription.ts +26 -8
- package/types/generators/RerankerGgml.ts +20 -3
- package/types/generators/SerialPort.ts +12 -4
- package/types/generators/SoundPlayer.ts +8 -2
- package/types/generators/SoundRecorder.ts +7 -3
- package/types/generators/SpeechToTextGgml.ts +18 -4
- package/types/generators/SpeechToTextOnnx.ts +10 -3
- package/types/generators/SpeechToTextPlatform.ts +11 -3
- package/types/generators/SqLite.ts +10 -4
- package/types/generators/Step.ts +6 -2
- package/types/generators/SttAppleBuiltin.ts +16 -3
- package/types/generators/Tcp.ts +8 -4
- package/types/generators/TcpServer.ts +13 -7
- package/types/generators/TextToSpeechAppleBuiltin.ts +16 -3
- package/types/generators/TextToSpeechGgml.ts +21 -3
- package/types/generators/TextToSpeechOnnx.ts +10 -3
- package/types/generators/TextToSpeechOpenAiLike.ts +9 -3
- package/types/generators/ThermalPrinter.ts +7 -3
- package/types/generators/Tick.ts +8 -4
- package/types/generators/Udp.ts +8 -4
- package/types/generators/VadGgml.ts +12 -4
- package/types/generators/VadOnnx.ts +11 -4
- package/types/generators/VadTraditional.ts +13 -4
- package/types/generators/VectorStore.ts +7 -3
- package/types/generators/Watchdog.ts +8 -4
- package/types/generators/WebCrawler.ts +6 -2
- package/types/generators/WebRtc.ts +13 -5
- package/types/generators/WebSocket.ts +6 -2
- package/types/subspace.ts +2 -0
- package/utils/event-props.ts +833 -1059
package/types/bricks/WebView.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Embedded web browser with JS injection, DOM query selectors, content cropping, navigation control, and permission management
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -12,6 +15,7 @@ import type {
|
|
|
12
15
|
EventProperty,
|
|
13
16
|
} from '../common'
|
|
14
17
|
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
18
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
15
19
|
|
|
16
20
|
/* Run Javascript on the WebView */
|
|
17
21
|
export type BrickWebViewActionInjectJavascript = ActionWithParams & {
|
|
@@ -122,11 +126,11 @@ Default property:
|
|
|
122
126
|
}
|
|
123
127
|
events?: BrickBasicEvents & {
|
|
124
128
|
/* Event of the WebView on load */
|
|
125
|
-
onLoad?: Array<EventAction
|
|
129
|
+
onLoad?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onLoad']>>
|
|
126
130
|
/* Event when the WebView load fails */
|
|
127
|
-
onError?: Array<EventAction
|
|
131
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onError']>>
|
|
128
132
|
/* Event of the webview on message by `window.ReactNativeWebView.postMessage` on you're injected javascript code */
|
|
129
|
-
onMessage?: Array<EventAction
|
|
133
|
+
onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onMessage']>>
|
|
130
134
|
}
|
|
131
135
|
outlets?: {
|
|
132
136
|
/* The result of the query selector action */
|
|
@@ -141,7 +145,7 @@ Default property:
|
|
|
141
145
|
}
|
|
142
146
|
}
|
|
143
147
|
|
|
144
|
-
/*
|
|
148
|
+
/* Embedded web browser with JS injection, DOM query selectors, content cropping, navigation control, and permission management */
|
|
145
149
|
export type BrickWebView = Brick &
|
|
146
150
|
BrickWebViewDef & {
|
|
147
151
|
templateKey: 'BRICK_WEBVIEW'
|
package/types/common.ts
CHANGED
|
@@ -47,34 +47,36 @@ export type Action = {
|
|
|
47
47
|
name?: string
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
//
|
|
50
|
+
// For standalone action types where specific event properties are not known
|
|
51
51
|
export type EventProperty = string
|
|
52
52
|
|
|
53
|
-
export type ActionWithParams = Action & {
|
|
53
|
+
export type ActionWithParams<EP extends string = string> = Action & {
|
|
54
54
|
params?: Array<{
|
|
55
55
|
input: string
|
|
56
|
-
value?: any |
|
|
56
|
+
value?: any | EP
|
|
57
57
|
mapping?: string
|
|
58
58
|
}>
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export type ActionWithDataParams = Action & {
|
|
61
|
+
export type ActionWithDataParams<EP extends string = string> = Action & {
|
|
62
62
|
dataParams?: Array<{
|
|
63
63
|
input: () => Data
|
|
64
|
-
value?: any |
|
|
64
|
+
value?: any | EP
|
|
65
65
|
mapping?: string
|
|
66
66
|
}>
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
export type ItemBrickID = string
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
// EP carries available event property keys for this event context
|
|
72
|
+
// Use: EventAction<string & keyof TemplateEventPropsMap['Name']['event']>
|
|
73
|
+
export type EventAction<EP extends string = string> = {
|
|
72
74
|
handler: 'system' | (() => Brick | Generator) | SubspaceID | ItemBrickID
|
|
73
|
-
action: ActionWithParams | ActionWithDataParams
|
|
75
|
+
action: ActionWithParams<EP> | ActionWithDataParams<EP>
|
|
74
76
|
waitAsync?: boolean
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
export type EventActionForItem = {
|
|
79
|
+
export type EventActionForItem<EP extends string = string> = {
|
|
78
80
|
handler:
|
|
79
81
|
| 'system'
|
|
80
82
|
| (() => Brick | Generator | { brickId: string; templateKey: string })
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Schedule events using cron expressions (e.g. daily, hourly)
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start the alarm clock */
|
|
15
19
|
export type GeneratorAlarmClockActionStart = Action & {
|
|
@@ -61,13 +65,15 @@ Default property:
|
|
|
61
65
|
}
|
|
62
66
|
events?: {
|
|
63
67
|
/* Event for cron rule is not invalid */
|
|
64
|
-
onRuleInvalid?: Array<
|
|
68
|
+
onRuleInvalid?: Array<
|
|
69
|
+
EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onRuleInvalid']>
|
|
70
|
+
>
|
|
65
71
|
/* Event for alarm clock start */
|
|
66
|
-
onStart?: Array<EventAction
|
|
72
|
+
onStart?: Array<EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onStart']>>
|
|
67
73
|
/* Event for alarm clock trig */
|
|
68
|
-
onTrig?: Array<EventAction
|
|
74
|
+
onTrig?: Array<EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onTrig']>>
|
|
69
75
|
/* Event for alarm clock stop */
|
|
70
|
-
onEnd?: Array<EventAction
|
|
76
|
+
onEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onEnd']>>
|
|
71
77
|
}
|
|
72
78
|
outlets?: {
|
|
73
79
|
/* Current time of each alarm clock trig */
|
|
@@ -81,7 +87,7 @@ Default property:
|
|
|
81
87
|
}
|
|
82
88
|
}
|
|
83
89
|
|
|
84
|
-
/*
|
|
90
|
+
/* Schedule events using cron expressions (e.g. daily, hourly) */
|
|
85
91
|
export type GeneratorAlarmClock = Generator &
|
|
86
92
|
GeneratorAlarmClockDef & {
|
|
87
93
|
templateKey: 'GENERATOR_ALARM_CLOCK'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Conversational AI agent orchestrating LLM (GGML/MLX/OpenAI/QNN/ONNX/Anthropic/NeuroPilot), STT, TTS, MCP tool-use, and file search (RAG) with auto-summary
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Add a message to the assistant */
|
|
15
19
|
export type GeneratorAssistantActionAddMessage = ActionWithParams & {
|
|
@@ -510,17 +514,19 @@ Default property:
|
|
|
510
514
|
}
|
|
511
515
|
events?: {
|
|
512
516
|
/* Error event */
|
|
513
|
-
onError?: Array<EventAction
|
|
517
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Assistant']['onError']>>
|
|
514
518
|
/* Log event */
|
|
515
|
-
onLogs?: Array<EventAction
|
|
519
|
+
onLogs?: Array<EventAction<string & keyof TemplateEventPropsMap['Assistant']['onLogs']>>
|
|
516
520
|
/* Messages update event */
|
|
517
|
-
onMessagesUpdate?: Array<
|
|
521
|
+
onMessagesUpdate?: Array<
|
|
522
|
+
EventAction<string & keyof TemplateEventPropsMap['Assistant']['onMessagesUpdate']>
|
|
523
|
+
>
|
|
518
524
|
/* Heatup finished event */
|
|
519
525
|
onHeatupFinished?: Array<EventAction>
|
|
520
526
|
/* Generating event (triggered when assistant starts generating response) */
|
|
521
527
|
onGenerating?: Array<EventAction>
|
|
522
528
|
/* Finished event (triggered when assistant finishes generating response) */
|
|
523
|
-
onFinished?: Array<EventAction
|
|
529
|
+
onFinished?: Array<EventAction<string & keyof TemplateEventPropsMap['Assistant']['onFinished']>>
|
|
524
530
|
}
|
|
525
531
|
outlets?: {
|
|
526
532
|
/* Whether the assistant is heating up */
|
|
@@ -585,7 +591,7 @@ Default property:
|
|
|
585
591
|
}
|
|
586
592
|
}
|
|
587
593
|
|
|
588
|
-
/* AI
|
|
594
|
+
/* Conversational AI agent orchestrating LLM (GGML/MLX/OpenAI/QNN/ONNX/Anthropic/NeuroPilot), STT, TTS, MCP tool-use, and file search (RAG) with auto-summary */
|
|
589
595
|
export type GeneratorAssistant = Generator &
|
|
590
596
|
GeneratorAssistantDef & {
|
|
591
597
|
templateKey: 'GENERATOR_ASSISTANT'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Bluetooth Low Energy central: scan, connect, and communicate with BLE peripherals
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start scan */
|
|
15
19
|
export type GeneratorBleCentralActionStartScan = Action & {
|
|
@@ -178,21 +182,29 @@ Default property:
|
|
|
178
182
|
/* Event for state change */
|
|
179
183
|
onStateChange?: Array<EventAction>
|
|
180
184
|
/* Event for error occurred */
|
|
181
|
-
onError?: Array<EventAction
|
|
185
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['BleCentral']['onError']>>
|
|
182
186
|
/* Event for start scan */
|
|
183
187
|
onStartScan?: Array<EventAction>
|
|
184
188
|
/* Event for stop scan */
|
|
185
189
|
onStopScan?: Array<EventAction>
|
|
186
190
|
/* Event for discover device */
|
|
187
|
-
onDiscoverDevice?: Array<
|
|
191
|
+
onDiscoverDevice?: Array<
|
|
192
|
+
EventAction<string & keyof TemplateEventPropsMap['BleCentral']['onDiscoverDevice']>
|
|
193
|
+
>
|
|
188
194
|
/* Event for device connected */
|
|
189
|
-
onConnectDevice?: Array<
|
|
195
|
+
onConnectDevice?: Array<
|
|
196
|
+
EventAction<string & keyof TemplateEventPropsMap['BleCentral']['onConnectDevice']>
|
|
197
|
+
>
|
|
190
198
|
/* Event for device disconnected */
|
|
191
199
|
onDisconnectDevice?: Array<EventAction>
|
|
192
200
|
/* Event for receive on read */
|
|
193
|
-
onReadReceive?: Array<
|
|
201
|
+
onReadReceive?: Array<
|
|
202
|
+
EventAction<string & keyof TemplateEventPropsMap['BleCentral']['onReadReceive']>
|
|
203
|
+
>
|
|
194
204
|
/* Event for receive on monitor */
|
|
195
|
-
onMonitorReceive?: Array<
|
|
205
|
+
onMonitorReceive?: Array<
|
|
206
|
+
EventAction<string & keyof TemplateEventPropsMap['BleCentral']['onMonitorReceive']>
|
|
207
|
+
>
|
|
196
208
|
}
|
|
197
209
|
outlets?: {
|
|
198
210
|
/* Is scaning */
|
|
@@ -212,7 +224,7 @@ Default property:
|
|
|
212
224
|
}
|
|
213
225
|
}
|
|
214
226
|
|
|
215
|
-
/*
|
|
227
|
+
/* Bluetooth Low Energy central: scan, connect, and communicate with BLE peripherals */
|
|
216
228
|
export type GeneratorBleCentral = Generator &
|
|
217
229
|
GeneratorBleCentralDef & {
|
|
218
230
|
templateKey: 'GENERATOR_BLE_CENTRAL'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Bluetooth Low Energy peripheral: advertise services and respond to central connections
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start advertise */
|
|
15
19
|
export type GeneratorBlePeripheralActionStart = Action & {
|
|
@@ -181,7 +185,7 @@ Default property:
|
|
|
181
185
|
}
|
|
182
186
|
}
|
|
183
187
|
|
|
184
|
-
/*
|
|
188
|
+
/* Bluetooth Low Energy peripheral: advertise services and respond to central connections */
|
|
185
189
|
export type GeneratorBlePeripheral = Generator &
|
|
186
190
|
GeneratorBlePeripheralDef & {
|
|
187
191
|
templateKey: 'GENERATOR_BLE_PERIPHERAL'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Trigger canvas navigation by setup rules
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
interface GeneratorCanvasMapDef {
|
|
15
19
|
/*
|
|
@@ -35,7 +39,7 @@ Default property:
|
|
|
35
39
|
}
|
|
36
40
|
events?: {
|
|
37
41
|
/* Event triggered when a rule matches and canvas navigation occurs */
|
|
38
|
-
onNavigate?: Array<EventAction
|
|
42
|
+
onNavigate?: Array<EventAction<string & keyof TemplateEventPropsMap['CanvasMap']['onNavigate']>>
|
|
39
43
|
}
|
|
40
44
|
outlets?: {
|
|
41
45
|
/* Last matched trigger rule that caused canvas navigation */
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Payment processing integration for Castles payment terminals
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Sale */
|
|
15
19
|
export type GeneratorCastlesPayActionSale = ActionWithParams & {
|
|
@@ -44,9 +48,13 @@ Default property:
|
|
|
44
48
|
property?: {}
|
|
45
49
|
events?: {
|
|
46
50
|
/* Action Success */
|
|
47
|
-
onActionSuccess?: Array<
|
|
51
|
+
onActionSuccess?: Array<
|
|
52
|
+
EventAction<string & keyof TemplateEventPropsMap['CastlesPay']['onActionSuccess']>
|
|
53
|
+
>
|
|
48
54
|
/* Action Error */
|
|
49
|
-
onActionError?: Array<
|
|
55
|
+
onActionError?: Array<
|
|
56
|
+
EventAction<string & keyof TemplateEventPropsMap['CastlesPay']['onActionError']>
|
|
57
|
+
>
|
|
50
58
|
}
|
|
51
59
|
outlets?: {
|
|
52
60
|
/* Last Transaction Result */
|
|
@@ -56,7 +64,7 @@ Default property:
|
|
|
56
64
|
}
|
|
57
65
|
}
|
|
58
66
|
|
|
59
|
-
/* Castles
|
|
67
|
+
/* Payment processing integration for Castles payment terminals */
|
|
60
68
|
export type GeneratorCastlesPay = Generator &
|
|
61
69
|
GeneratorCastlesPayDef & {
|
|
62
70
|
templateKey: 'GENERATOR_CASTLES_PAY'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Access and subscribe to shared Data properties from the project Data Bank
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Run Data Bank fetch */
|
|
15
19
|
export type GeneratorDataBankActionFetch = Action & {
|
|
@@ -82,17 +86,21 @@ Default property:
|
|
|
82
86
|
}
|
|
83
87
|
events?: {
|
|
84
88
|
/* Event of Data Bank fetch response */
|
|
85
|
-
onFetchResponse?: Array<
|
|
89
|
+
onFetchResponse?: Array<
|
|
90
|
+
EventAction<string & keyof TemplateEventPropsMap['DataBank']['onFetchResponse']>
|
|
91
|
+
>
|
|
86
92
|
/* Event of Data Bank change from subscription */
|
|
87
93
|
onChange?: Array<EventAction>
|
|
88
94
|
/* Event of Data Bank fetch error */
|
|
89
95
|
onFetchError?: Array<EventAction>
|
|
90
96
|
/* Event of error */
|
|
91
|
-
onError?: Array<EventAction
|
|
97
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['DataBank']['onError']>>
|
|
92
98
|
/* Event of subscription on connection */
|
|
93
99
|
subscribeDataOnConnect?: Array<EventAction>
|
|
94
100
|
/* Server connections error of subscription */
|
|
95
|
-
subscribeDataOnConnectError?: Array<
|
|
101
|
+
subscribeDataOnConnectError?: Array<
|
|
102
|
+
EventAction<string & keyof TemplateEventPropsMap['DataBank']['subscribeDataOnConnectError']>
|
|
103
|
+
>
|
|
96
104
|
}
|
|
97
105
|
outlets?: {
|
|
98
106
|
/* Response for Data Bank fetch request, it will save to Data */
|
|
@@ -129,7 +137,7 @@ Default property:
|
|
|
129
137
|
}
|
|
130
138
|
}
|
|
131
139
|
|
|
132
|
-
/*
|
|
140
|
+
/* Access and subscribe to shared Data properties from the project Data Bank */
|
|
133
141
|
export type GeneratorDataBank = Generator &
|
|
134
142
|
GeneratorDataBankDef & {
|
|
135
143
|
templateKey: 'GENERATOR_DATA_BANK'
|
package/types/generators/File.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* File system operations: read, write, copy, delete, and list files
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Read stats */
|
|
15
19
|
export type GeneratorFileActionReadStats = Action & {
|
|
@@ -259,33 +263,59 @@ Default property:
|
|
|
259
263
|
}
|
|
260
264
|
events?: {
|
|
261
265
|
/* On file handler init error */
|
|
262
|
-
initError?: Array<EventAction
|
|
266
|
+
initError?: Array<EventAction<string & keyof TemplateEventPropsMap['File']['initError']>>
|
|
263
267
|
/* On file status change */
|
|
264
|
-
onFileStatusChange?: Array<
|
|
268
|
+
onFileStatusChange?: Array<
|
|
269
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onFileStatusChange']>
|
|
270
|
+
>
|
|
265
271
|
/* On read stats error */
|
|
266
|
-
onReadStatsError?: Array<
|
|
272
|
+
onReadStatsError?: Array<
|
|
273
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onReadStatsError']>
|
|
274
|
+
>
|
|
267
275
|
/* On read content error */
|
|
268
|
-
onReadContentError?: Array<
|
|
276
|
+
onReadContentError?: Array<
|
|
277
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onReadContentError']>
|
|
278
|
+
>
|
|
269
279
|
/* On read content error */
|
|
270
|
-
onAppendContentError?: Array<
|
|
280
|
+
onAppendContentError?: Array<
|
|
281
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onAppendContentError']>
|
|
282
|
+
>
|
|
271
283
|
/* On write content error */
|
|
272
|
-
onWriteContentError?: Array<
|
|
284
|
+
onWriteContentError?: Array<
|
|
285
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onWriteContentError']>
|
|
286
|
+
>
|
|
273
287
|
/* On upload progress */
|
|
274
|
-
onUploadProgress?: Array<
|
|
288
|
+
onUploadProgress?: Array<
|
|
289
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onUploadProgress']>
|
|
290
|
+
>
|
|
275
291
|
/* On upload error */
|
|
276
|
-
onUploadError?: Array<
|
|
292
|
+
onUploadError?: Array<
|
|
293
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onUploadError']>
|
|
294
|
+
>
|
|
277
295
|
/* On upload complete */
|
|
278
|
-
onUploadComplete?: Array<
|
|
296
|
+
onUploadComplete?: Array<
|
|
297
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onUploadComplete']>
|
|
298
|
+
>
|
|
279
299
|
/* On upload all done */
|
|
280
|
-
onUploadAllComplete?: Array<
|
|
300
|
+
onUploadAllComplete?: Array<
|
|
301
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onUploadAllComplete']>
|
|
302
|
+
>
|
|
281
303
|
/* On download progress */
|
|
282
|
-
onDownloadProgress?: Array<
|
|
304
|
+
onDownloadProgress?: Array<
|
|
305
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadProgress']>
|
|
306
|
+
>
|
|
283
307
|
/* On download error */
|
|
284
|
-
onDownloadError?: Array<
|
|
308
|
+
onDownloadError?: Array<
|
|
309
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadError']>
|
|
310
|
+
>
|
|
285
311
|
/* On download complete */
|
|
286
|
-
onDownloadComplete?: Array<
|
|
312
|
+
onDownloadComplete?: Array<
|
|
313
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadComplete']>
|
|
314
|
+
>
|
|
287
315
|
/* On download all done */
|
|
288
|
-
onDownloadAllComplete?: Array<
|
|
316
|
+
onDownloadAllComplete?: Array<
|
|
317
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadAllComplete']>
|
|
318
|
+
>
|
|
289
319
|
}
|
|
290
320
|
outlets?: {
|
|
291
321
|
/* File init error result will be stored in Data */
|
|
@@ -366,7 +396,7 @@ Default property:
|
|
|
366
396
|
}
|
|
367
397
|
}
|
|
368
398
|
|
|
369
|
-
/* File
|
|
399
|
+
/* File system operations: read, write, copy, delete, and list files */
|
|
370
400
|
export type GeneratorFile = Generator &
|
|
371
401
|
GeneratorFileDef & {
|
|
372
402
|
templateKey: 'GENERATOR_FILE'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* GraphQL client for Query, Mutation, and Subscription (WebSocket) with response caching and optional Firebase Realtime Database link
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Execute GraphQL request with defined properties */
|
|
15
19
|
export type GeneratorGraphQLActionRunQuery = ActionWithParams & {
|
|
@@ -93,7 +97,9 @@ Default property:
|
|
|
93
97
|
/* Event triggered when subscription connection is successful */
|
|
94
98
|
subscriptionOnConnection?: Array<EventAction>
|
|
95
99
|
/* Event triggered when subscription connection error occurs */
|
|
96
|
-
subscriptionOnConnectionError?: Array<
|
|
100
|
+
subscriptionOnConnectionError?: Array<
|
|
101
|
+
EventAction<string & keyof TemplateEventPropsMap['Graphql']['subscriptionOnConnectionError']>
|
|
102
|
+
>
|
|
97
103
|
}
|
|
98
104
|
outlets?: {
|
|
99
105
|
/* Response for GraphQL request, it will save to Data */
|
|
@@ -103,7 +109,7 @@ Default property:
|
|
|
103
109
|
}
|
|
104
110
|
}
|
|
105
111
|
|
|
106
|
-
/*
|
|
112
|
+
/* GraphQL client for Query, Mutation, and Subscription (WebSocket) with response caching and optional Firebase Realtime Database link */
|
|
107
113
|
export type GeneratorGraphQL = Generator &
|
|
108
114
|
GeneratorGraphQLDef & {
|
|
109
115
|
templateKey: 'GENERATOR_GRAPHQL'
|
package/types/generators/Http.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* HTTP client supporting all methods (GET/POST/PUT/DELETE/PATCH/...), response parsing (JSON/text/XML/CSV), SSE event streams, and multipart file uploads
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Run HTTP request with defined properties */
|
|
15
19
|
export type GeneratorHTTPActionRunRequest = ActionWithParams & {
|
|
@@ -189,7 +193,7 @@ Default property:
|
|
|
189
193
|
}
|
|
190
194
|
}
|
|
191
195
|
|
|
192
|
-
/*
|
|
196
|
+
/* HTTP client supporting all methods (GET/POST/PUT/DELETE/PATCH/...), response parsing (JSON/text/XML/CSV), SSE event streams, and multipart file uploads */
|
|
193
197
|
export type GeneratorHTTP = Generator &
|
|
194
198
|
GeneratorHTTPDef & {
|
|
195
199
|
templateKey: 'GENERATOR_HTTP'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Embedded HTTP/HTTPS server with route matching, CORS, auth (Basic/Bearer), SSE streaming, file upload, and async response mode
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start HTTP server */
|
|
15
19
|
export type GeneratorHTTPServerActionStart = Action & {
|
|
@@ -123,15 +127,19 @@ Default property:
|
|
|
123
127
|
/* Event of HTTP server is ready */
|
|
124
128
|
onReady?: Array<EventAction>
|
|
125
129
|
/* Event of HTTP server accept the request */
|
|
126
|
-
onRequest?: Array<EventAction
|
|
130
|
+
onRequest?: Array<EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onRequest']>>
|
|
127
131
|
/* Event of client close connection */
|
|
128
|
-
onClientClose?: Array<
|
|
132
|
+
onClientClose?: Array<
|
|
133
|
+
EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onClientClose']>
|
|
134
|
+
>
|
|
129
135
|
/* Event of client error */
|
|
130
|
-
onClientError?: Array<
|
|
136
|
+
onClientError?: Array<
|
|
137
|
+
EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onClientError']>
|
|
138
|
+
>
|
|
131
139
|
/* Event of server close */
|
|
132
140
|
onClose?: Array<EventAction>
|
|
133
141
|
/* Event of server error */
|
|
134
|
-
onError?: Array<EventAction
|
|
142
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onError']>>
|
|
135
143
|
}
|
|
136
144
|
outlets?: {
|
|
137
145
|
/* Server is listening */
|
|
@@ -145,7 +153,7 @@ Default property:
|
|
|
145
153
|
}
|
|
146
154
|
}
|
|
147
155
|
|
|
148
|
-
/* HTTP
|
|
156
|
+
/* Embedded HTTP/HTTPS server with route matching, CORS, auth (Basic/Bearer), SSE streaming, file upload, and async response mode */
|
|
149
157
|
export type GeneratorHTTPServer = Generator &
|
|
150
158
|
GeneratorHTTPServerDef & {
|
|
151
159
|
templateKey: 'GENERATOR_HTTP_SERVER'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Display informational dialog or toast messages to the user
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Show information */
|
|
15
19
|
export type GeneratorInformationActionShow = ActionWithParams & {
|
|
@@ -68,7 +72,7 @@ Default property:
|
|
|
68
72
|
/* Trigger when user confirms the information */
|
|
69
73
|
onConfirm?: Array<EventAction>
|
|
70
74
|
/* Trigger when error occurs */
|
|
71
|
-
onError?: Array<EventAction
|
|
75
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Information']['onError']>>
|
|
72
76
|
}
|
|
73
77
|
outlets?: {
|
|
74
78
|
/* Error message */
|
|
@@ -76,7 +80,7 @@ Default property:
|
|
|
76
80
|
}
|
|
77
81
|
}
|
|
78
82
|
|
|
79
|
-
/*
|
|
83
|
+
/* Display informational dialog or toast messages to the user */
|
|
80
84
|
export type GeneratorInformation = Generator &
|
|
81
85
|
GeneratorInformationDef & {
|
|
82
86
|
templateKey: 'GENERATOR_INFORMATION'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Send intent to app and get result (Android only)
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Read stats */
|
|
15
19
|
export type GeneratorIntentActionSendIntent = ActionWithParams & {
|
|
@@ -125,9 +129,9 @@ Default property:
|
|
|
125
129
|
}
|
|
126
130
|
events?: {
|
|
127
131
|
/* On intent return a result trigger */
|
|
128
|
-
onResult?: Array<EventAction
|
|
132
|
+
onResult?: Array<EventAction<string & keyof TemplateEventPropsMap['Intent']['onResult']>>
|
|
129
133
|
/* On intent error trigger */
|
|
130
|
-
onError?: Array<EventAction
|
|
134
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Intent']['onError']>>
|
|
131
135
|
}
|
|
132
136
|
outlets?: {
|
|
133
137
|
/* Last intent result */
|