@fugood/bricks-project 2.22.0-beta.27 → 2.22.0-beta.28
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/package.json +2 -2
- package/types/animation.ts +1 -0
- package/types/brick-base.ts +77 -0
- package/types/bricks/3DViewer.ts +200 -0
- package/types/bricks/Camera.ts +195 -0
- package/types/bricks/Chart.ts +362 -0
- package/types/bricks/GenerativeMedia.ts +237 -0
- package/types/bricks/Icon.ts +90 -0
- package/types/bricks/Image.ts +101 -0
- package/types/bricks/Items.ts +461 -0
- package/types/bricks/Lottie.ts +156 -0
- package/types/bricks/Qrcode.ts +109 -0
- package/types/bricks/Rect.ts +107 -0
- package/types/bricks/RichText.ts +120 -0
- package/types/bricks/Rive.ts +209 -0
- package/types/bricks/Slideshow.ts +155 -0
- package/types/bricks/Svg.ts +91 -0
- package/types/bricks/Text.ts +140 -0
- package/types/bricks/TextInput.ts +231 -0
- package/types/bricks/Video.ts +167 -0
- package/types/bricks/VideoStreaming.ts +104 -0
- package/types/bricks/WebRTCStream.ts +60 -0
- package/types/bricks/WebView.ts +157 -0
- package/types/bricks/index.ts +20 -0
- package/types/generators/AlarmClock.ts +102 -0
- package/types/generators/Assistant.ts +546 -0
- package/types/generators/BleCentral.ts +225 -0
- package/types/generators/BlePeripheral.ts +202 -0
- package/types/generators/CanvasMap.ts +57 -0
- package/types/generators/CastlesPay.ts +77 -0
- package/types/generators/DataBank.ts +123 -0
- package/types/generators/File.ts +351 -0
- package/types/generators/GraphQL.ts +124 -0
- package/types/generators/HTTP.ts +117 -0
- package/types/generators/HTTPServer.ts +156 -0
- package/types/generators/Information.ts +97 -0
- package/types/generators/Intent.ts +107 -0
- package/types/generators/Iterator.ts +95 -0
- package/types/generators/Keyboard.ts +85 -0
- package/types/generators/LlmAnthropicCompat.ts +188 -0
- package/types/generators/LlmGgml.ts +719 -0
- package/types/generators/LlmOnnx.ts +184 -0
- package/types/generators/LlmOpenAiCompat.ts +206 -0
- package/types/generators/LlmQualcommAiEngine.ts +213 -0
- package/types/generators/MCP.ts +294 -0
- package/types/generators/MCPServer.ts +245 -0
- package/types/generators/MQTTBroker.ts +121 -0
- package/types/generators/MediaFlow.ts +142 -0
- package/types/generators/MqttClient.ts +129 -0
- package/types/generators/Question.ts +395 -0
- package/types/generators/RealtimeTranscription.ts +172 -0
- package/types/generators/RerankerGgml.ts +153 -0
- package/types/generators/SerialPort.ts +141 -0
- package/types/generators/SoundPlayer.ts +86 -0
- package/types/generators/SoundRecorder.ts +113 -0
- package/types/generators/SpeechToTextGgml.ts +462 -0
- package/types/generators/SpeechToTextOnnx.ts +227 -0
- package/types/generators/SpeechToTextPlatform.ts +75 -0
- package/types/generators/Sqlite.ts +118 -0
- package/types/generators/Step.ts +101 -0
- package/types/generators/TCP.ts +120 -0
- package/types/generators/TCPServer.ts +137 -0
- package/types/generators/TapToPayOnIPhone.ts +175 -0
- package/types/generators/TextToSpeechGgml.ts +182 -0
- package/types/generators/TextToSpeechOnnx.ts +169 -0
- package/types/generators/TextToSpeechOpenAiLike.ts +113 -0
- package/types/generators/ThermalPrinter.ts +185 -0
- package/types/generators/Tick.ts +75 -0
- package/types/generators/UDP.ts +109 -0
- package/types/generators/VadGgml.ts +211 -0
- package/types/generators/VectorStore.ts +223 -0
- package/types/generators/Watchdog.ts +96 -0
- package/types/generators/WebCrawler.ts +97 -0
- package/types/generators/WebRTC.ts +165 -0
- package/types/generators/WebSocket.ts +142 -0
- package/types/generators/index.ts +51 -0
- package/types/bricks.ts +0 -3269
- package/types/generators.ts +0 -8632
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
2
|
+
import type { Data, DataLink } from '../data'
|
|
3
|
+
import type {
|
|
4
|
+
Generator,
|
|
5
|
+
EventAction,
|
|
6
|
+
ActionWithDataParams,
|
|
7
|
+
ActionWithParams,
|
|
8
|
+
Action,
|
|
9
|
+
EventProperty,
|
|
10
|
+
} from '../common'
|
|
11
|
+
|
|
12
|
+
/* Connect */
|
|
13
|
+
export type GeneratorWebSocketActionConnect = Action & {
|
|
14
|
+
__actionName: 'GENERATOR_WEB_SOCKET_CONNECT'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Disconnect */
|
|
18
|
+
export type GeneratorWebSocketActionDisconnect = Action & {
|
|
19
|
+
__actionName: 'GENERATOR_WEB_SOCKET_DISCONNECT'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Emit event (Acknowledgement: It's callback, the channel of Socket.IO server can used it as last argument) */
|
|
23
|
+
export type GeneratorWebSocketActionEmit = ActionWithParams & {
|
|
24
|
+
__actionName: 'GENERATOR_WEB_SOCKET_EMIT'
|
|
25
|
+
params?: Array<
|
|
26
|
+
| {
|
|
27
|
+
input: 'eventName'
|
|
28
|
+
value?: string | DataLink | EventProperty
|
|
29
|
+
mapping?: string
|
|
30
|
+
}
|
|
31
|
+
| {
|
|
32
|
+
input: 'arguments'
|
|
33
|
+
value?: Array<any> | DataLink | EventProperty
|
|
34
|
+
mapping?: string
|
|
35
|
+
}
|
|
36
|
+
| {
|
|
37
|
+
input: 'acknowledgementType'
|
|
38
|
+
value?: 'text' | 'json' | DataLink | EventProperty
|
|
39
|
+
mapping?: string
|
|
40
|
+
}
|
|
41
|
+
| {
|
|
42
|
+
input: 'withAcknowledgement'
|
|
43
|
+
value?: boolean | DataLink | EventProperty
|
|
44
|
+
mapping?: string
|
|
45
|
+
}
|
|
46
|
+
>
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Emit `message` */
|
|
50
|
+
export type GeneratorWebSocketActionSend = ActionWithParams & {
|
|
51
|
+
__actionName: 'GENERATOR_WEB_SOCKET_SEND'
|
|
52
|
+
params?: Array<{
|
|
53
|
+
input: 'value'
|
|
54
|
+
value?: string | DataLink | EventProperty
|
|
55
|
+
mapping?: string
|
|
56
|
+
}>
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface GeneratorWebSocketDef {
|
|
60
|
+
/*
|
|
61
|
+
Default property:
|
|
62
|
+
{}
|
|
63
|
+
*/
|
|
64
|
+
property?: {
|
|
65
|
+
/* Try to connect on generator initialized */
|
|
66
|
+
init?: boolean | DataLink
|
|
67
|
+
/* Endpoint URL (support namespace) */
|
|
68
|
+
url?: string | DataLink
|
|
69
|
+
/* Name of the path that is captured on the server side */
|
|
70
|
+
path?: string | DataLink
|
|
71
|
+
/* URL query parameters */
|
|
72
|
+
query?: {} | DataLink
|
|
73
|
+
/* Whether to reconnect automatically */
|
|
74
|
+
reconnection?: boolean | DataLink
|
|
75
|
+
/* Number of reconnection attempts before giving up */
|
|
76
|
+
attemptTimes?: number | DataLink
|
|
77
|
+
/* How long to initially wait before attempting a new reconnection (1000). Affected by +/- randomizationFactor, for example the default initial delay will be between 500 to 1500ms. */
|
|
78
|
+
delayBase?: number | DataLink
|
|
79
|
+
/* Maximum amount of time to wait between reconnections (5000). Each attempt increases the reconnection delay by 2x along with a randomization as above */
|
|
80
|
+
delayMax?: number | DataLink
|
|
81
|
+
/* Randomization factor 0 <= deplayRandom <= 1 */
|
|
82
|
+
delayRandom?: number | DataLink
|
|
83
|
+
/* Message type, if type is json it's will auto transform to object */
|
|
84
|
+
messageType?: 'json' | 'text' | DataLink
|
|
85
|
+
/* Use Socket.IO as transport channel */
|
|
86
|
+
socketIoEnable?: boolean | DataLink
|
|
87
|
+
/* Socket.IO Version */
|
|
88
|
+
socketIoVersion?: 'latest' | 'v4' | 'v2' | DataLink
|
|
89
|
+
/* Whether to reuse an existing connection */
|
|
90
|
+
socketIoForceNew?: boolean | DataLink
|
|
91
|
+
/* Connection timeout before a connect_error and connect_timeout events are emitted */
|
|
92
|
+
socketIoTimeout?: number | DataLink
|
|
93
|
+
/* Event name to be subscribe */
|
|
94
|
+
socketIoEventName?: string | DataLink
|
|
95
|
+
/* Additional query parameters that are sent when connecting a namespace (then found in socket.handshake.query object on the server-side) */
|
|
96
|
+
socketIoQuery?: {} | DataLink
|
|
97
|
+
/* Protocols to be used in the WebSocket connection */
|
|
98
|
+
wsProtocols?: Array<string | DataLink> | DataLink | string | DataLink | DataLink
|
|
99
|
+
}
|
|
100
|
+
events?: {
|
|
101
|
+
/* Event for connected to server */
|
|
102
|
+
onOpen?: Array<EventAction>
|
|
103
|
+
/* Event for disconnect from server */
|
|
104
|
+
onClose?: Array<EventAction>
|
|
105
|
+
/* Event for receive message */
|
|
106
|
+
onMessage?: Array<EventAction>
|
|
107
|
+
/* Event for error occurred */
|
|
108
|
+
onError?: Array<EventAction>
|
|
109
|
+
}
|
|
110
|
+
outlets?: {
|
|
111
|
+
/* Show socket.io connected or not */
|
|
112
|
+
readyState?: () => Data
|
|
113
|
+
/* Results of each countdown change, it will save to Data */
|
|
114
|
+
message?: () => Data
|
|
115
|
+
/* When Socket.IO mode server can response acknowledgemnt with data to client */
|
|
116
|
+
acknowledgeData?: () => Data
|
|
117
|
+
/* Error message */
|
|
118
|
+
errorMessage?: () => Data
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* WebSocket or Socket.IO Generator */
|
|
123
|
+
export type GeneratorWebSocket = Generator &
|
|
124
|
+
GeneratorWebSocketDef & {
|
|
125
|
+
templateKey: 'GENERATOR_WEB_SOCKET'
|
|
126
|
+
switches: Array<
|
|
127
|
+
SwitchDef &
|
|
128
|
+
GeneratorWebSocketDef & {
|
|
129
|
+
conds?: Array<{
|
|
130
|
+
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
131
|
+
cond:
|
|
132
|
+
| SwitchCondInnerStateCurrentCanvas
|
|
133
|
+
| SwitchCondData
|
|
134
|
+
| {
|
|
135
|
+
__typename: 'SwitchCondInnerStateOutlet'
|
|
136
|
+
outlet: 'readyState' | 'message' | 'acknowledgeData' | 'errorMessage'
|
|
137
|
+
value: any
|
|
138
|
+
}
|
|
139
|
+
}>
|
|
140
|
+
}
|
|
141
|
+
>
|
|
142
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export * from './Tick'
|
|
2
|
+
export * from './AlarmClock'
|
|
3
|
+
export * from './File'
|
|
4
|
+
export * from './MediaFlow'
|
|
5
|
+
export * from './DataBank'
|
|
6
|
+
export * from './GraphQl'
|
|
7
|
+
export * from './Http'
|
|
8
|
+
export * from './SoundPlayer'
|
|
9
|
+
export * from './Keyboard'
|
|
10
|
+
export * from './WebSocket'
|
|
11
|
+
export * from './CanvasMap'
|
|
12
|
+
export * from './Step'
|
|
13
|
+
export * from './Iterator'
|
|
14
|
+
export * from './Watchdog'
|
|
15
|
+
export * from './MqttClient'
|
|
16
|
+
export * from './MqttBroker'
|
|
17
|
+
export * from './BleCentral'
|
|
18
|
+
export * from './SerialPort'
|
|
19
|
+
export * from './Tcp'
|
|
20
|
+
export * from './TcpServer'
|
|
21
|
+
export * from './Udp'
|
|
22
|
+
export * from './HttpServer'
|
|
23
|
+
export * from './WebRtc'
|
|
24
|
+
export * from './WebCrawler'
|
|
25
|
+
export * from './SoundRecorder'
|
|
26
|
+
export * from './BlePeripheral'
|
|
27
|
+
export * from './Question'
|
|
28
|
+
export * from './Information'
|
|
29
|
+
export * from './Intent'
|
|
30
|
+
export * from './TapToPayOnIPhone'
|
|
31
|
+
export * from './CastlesPay'
|
|
32
|
+
export * from './SpeechToTextPlatform'
|
|
33
|
+
export * from './ThermalPrinter'
|
|
34
|
+
export * from './SqLite'
|
|
35
|
+
export * from './McpServer'
|
|
36
|
+
export * from './Mcp'
|
|
37
|
+
export * from './TextToSpeechOnnx'
|
|
38
|
+
export * from './LlmOnnx'
|
|
39
|
+
export * from './SpeechToTextOnnx'
|
|
40
|
+
export * from './SpeechToTextGgml'
|
|
41
|
+
export * from './VadGgml'
|
|
42
|
+
export * from './RealtimeTranscription'
|
|
43
|
+
export * from './LlmGgml'
|
|
44
|
+
export * from './TextToSpeechGgml'
|
|
45
|
+
export * from './RerankerGgml'
|
|
46
|
+
export * from './LlmQualcommAiEngine'
|
|
47
|
+
export * from './LlmOpenAiCompat'
|
|
48
|
+
export * from './TextToSpeechOpenAiLike'
|
|
49
|
+
export * from './LlmAnthropicCompat'
|
|
50
|
+
export * from './Assistant'
|
|
51
|
+
export * from './VectorStore'
|