@fugood/bricks-ctor 2.25.0-beta.60 → 2.25.0-beta.62

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 (192) hide show
  1. package/package.json +4 -28
  2. package/tools/__tests__/legacy-forwarder.test.js +91 -0
  3. package/tools/_forward.ts +26 -0
  4. package/tools/deploy.ts +3 -175
  5. package/tools/mcp-server.ts +3 -35
  6. package/tools/postinstall.ts +3 -291
  7. package/tools/pull.ts +3 -198
  8. package/tools/push-config.ts +3 -113
  9. package/tools/simulator.ts +3 -149
  10. package/compile/__tests__/config-diff.test.js +0 -100
  11. package/compile/__tests__/index.test.js +0 -461
  12. package/compile/__tests__/util.test.js +0 -450
  13. package/compile/action-name-map.ts +0 -1079
  14. package/compile/config-diff.ts +0 -155
  15. package/compile/index.ts +0 -1594
  16. package/compile/util.ts +0 -482
  17. package/index.ts +0 -6
  18. package/skills/bricks-ctor/SKILL.md +0 -38
  19. package/skills/bricks-ctor/references/animation.md +0 -160
  20. package/skills/bricks-ctor/references/architecture-patterns.md +0 -88
  21. package/skills/bricks-ctor/references/automations.md +0 -232
  22. package/skills/bricks-ctor/references/buttress.md +0 -245
  23. package/skills/bricks-ctor/references/data-calculation.md +0 -252
  24. package/skills/bricks-ctor/references/local-sync.md +0 -129
  25. package/skills/bricks-ctor/references/media-flow.md +0 -165
  26. package/skills/bricks-ctor/references/remote-data-bank.md +0 -196
  27. package/skills/bricks-ctor/references/simulator.md +0 -132
  28. package/skills/bricks-ctor/references/source-editing-tools.md +0 -81
  29. package/skills/bricks-ctor/references/standby-transition.md +0 -124
  30. package/skills/bricks-ctor/references/verification-toolchain.md +0 -200
  31. package/skills/bricks-design/SKILL.md +0 -171
  32. package/skills/bricks-design/references/architecture-truths.md +0 -132
  33. package/skills/bricks-design/references/avoiding-complexity.md +0 -91
  34. package/skills/bricks-design/references/design-critique.md +0 -195
  35. package/skills/bricks-design/references/design-languages.md +0 -265
  36. package/skills/bricks-design/references/performance.md +0 -116
  37. package/skills/bricks-design/references/presentation-and-slideshow.md +0 -137
  38. package/skills/bricks-design/references/translating-inputs.md +0 -152
  39. package/skills/bricks-design/references/variations-and-tweaks.md +0 -124
  40. package/skills/bricks-design/references/when-the-brief-is-branded.md +0 -284
  41. package/skills/bricks-design/references/when-the-brief-is-vague.md +0 -85
  42. package/skills/bricks-design/references/workflow.md +0 -134
  43. package/skills/bricks-ux/SKILL.md +0 -114
  44. package/skills/bricks-ux/references/accessibility.md +0 -162
  45. package/skills/bricks-ux/references/flow-states.md +0 -175
  46. package/skills/bricks-ux/references/interaction-archetypes.md +0 -189
  47. package/skills/bricks-ux/references/monitoring-screens.md +0 -153
  48. package/skills/bricks-ux/references/pressable-composition.md +0 -126
  49. package/skills/bricks-ux/references/user-journey.md +0 -168
  50. package/skills/bricks-ux/references/ux-critique.md +0 -256
  51. package/skills/rive-marketplace/SKILL.md +0 -99
  52. package/tools/__tests__/_cli-error.test.ts +0 -35
  53. package/tools/__tests__/_mcp-config.test.ts +0 -67
  54. package/tools/__tests__/pull.test.ts +0 -108
  55. package/tools/_cli-error.ts +0 -17
  56. package/tools/_edits-log.ts +0 -41
  57. package/tools/_git-author.ts +0 -37
  58. package/tools/_last-pushed-commit.ts +0 -28
  59. package/tools/_mcp-config.ts +0 -42
  60. package/tools/_shell.ts +0 -180
  61. package/tools/icons/.gitattributes +0 -1
  62. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  63. package/tools/icons/fa6pro-meta.json +0 -1
  64. package/tools/mcp-env.ts +0 -13
  65. package/tools/mcp-tools/__tests__/data-calc-editing.test.js +0 -516
  66. package/tools/mcp-tools/__tests__/entry-editing.test.js +0 -866
  67. package/tools/mcp-tools/__tests__/huggingface.test.ts +0 -49
  68. package/tools/mcp-tools/__tests__/icons.test.ts +0 -21
  69. package/tools/mcp-tools/__tests__/mcp-env.test.js +0 -19
  70. package/tools/mcp-tools/_editing-helpers.ts +0 -98
  71. package/tools/mcp-tools/_verify.ts +0 -50
  72. package/tools/mcp-tools/compile.ts +0 -104
  73. package/tools/mcp-tools/data-calc-editing.ts +0 -1311
  74. package/tools/mcp-tools/entry-editing.ts +0 -2297
  75. package/tools/mcp-tools/huggingface.ts +0 -772
  76. package/tools/mcp-tools/icons.ts +0 -97
  77. package/tools/mcp-tools/lottie.ts +0 -102
  78. package/tools/mcp-tools/media.ts +0 -113
  79. package/tools/simulator-main.mjs +0 -488
  80. package/tools/simulator-preload.cjs +0 -16
  81. package/types/animation.d.ts +0 -116
  82. package/types/automation.d.ts +0 -231
  83. package/types/brick-base.d.ts +0 -80
  84. package/types/bricks/Camera.d.ts +0 -246
  85. package/types/bricks/Chart.d.ts +0 -372
  86. package/types/bricks/GenerativeMedia.d.ts +0 -290
  87. package/types/bricks/Icon.d.ts +0 -98
  88. package/types/bricks/Image.d.ts +0 -126
  89. package/types/bricks/Items.d.ts +0 -480
  90. package/types/bricks/Lottie.d.ts +0 -168
  91. package/types/bricks/Maps.d.ts +0 -262
  92. package/types/bricks/QrCode.d.ts +0 -117
  93. package/types/bricks/Rect.d.ts +0 -150
  94. package/types/bricks/RichText.d.ts +0 -131
  95. package/types/bricks/Rive.d.ts +0 -220
  96. package/types/bricks/Scene3D.d.ts +0 -676
  97. package/types/bricks/Sketch.d.ts +0 -256
  98. package/types/bricks/Slideshow.d.ts +0 -201
  99. package/types/bricks/Svg.d.ts +0 -99
  100. package/types/bricks/Text.d.ts +0 -148
  101. package/types/bricks/TextInput.d.ts +0 -242
  102. package/types/bricks/Video.d.ts +0 -242
  103. package/types/bricks/VideoStreaming.d.ts +0 -112
  104. package/types/bricks/WebRtcStream.d.ts +0 -65
  105. package/types/bricks/WebView.d.ts +0 -168
  106. package/types/bricks/index.d.ts +0 -23
  107. package/types/canvas.d.ts +0 -82
  108. package/types/common.d.ts +0 -141
  109. package/types/data-calc-command/base.d.ts +0 -57
  110. package/types/data-calc-command/collection.d.ts +0 -418
  111. package/types/data-calc-command/color.d.ts +0 -432
  112. package/types/data-calc-command/constant.d.ts +0 -50
  113. package/types/data-calc-command/datetime.d.ts +0 -147
  114. package/types/data-calc-command/file.d.ts +0 -129
  115. package/types/data-calc-command/index.d.ts +0 -13
  116. package/types/data-calc-command/iteratee.d.ts +0 -23
  117. package/types/data-calc-command/logictype.d.ts +0 -190
  118. package/types/data-calc-command/math.d.ts +0 -275
  119. package/types/data-calc-command/object.d.ts +0 -119
  120. package/types/data-calc-command/sandbox.d.ts +0 -66
  121. package/types/data-calc-command/string.d.ts +0 -407
  122. package/types/data-calc-script.d.ts +0 -21
  123. package/types/data-calc.d.ts +0 -12
  124. package/types/data.d.ts +0 -97
  125. package/types/generators/AlarmClock.d.ts +0 -110
  126. package/types/generators/Assistant.d.ts +0 -640
  127. package/types/generators/BleCentral.d.ts +0 -247
  128. package/types/generators/BlePeripheral.d.ts +0 -208
  129. package/types/generators/CanvasMap.d.ts +0 -74
  130. package/types/generators/CastlesPay.d.ts +0 -87
  131. package/types/generators/DataBank.d.ts +0 -160
  132. package/types/generators/File.d.ts +0 -432
  133. package/types/generators/GraphQl.d.ts +0 -132
  134. package/types/generators/Http.d.ts +0 -222
  135. package/types/generators/HttpServer.d.ts +0 -230
  136. package/types/generators/Information.d.ts +0 -103
  137. package/types/generators/Intent.d.ts +0 -168
  138. package/types/generators/Iterator.d.ts +0 -108
  139. package/types/generators/Keyboard.d.ts +0 -105
  140. package/types/generators/LlmAnthropicCompat.d.ts +0 -212
  141. package/types/generators/LlmAppleBuiltin.d.ts +0 -159
  142. package/types/generators/LlmGgml.d.ts +0 -903
  143. package/types/generators/LlmMediaTekNeuroPilot.d.ts +0 -235
  144. package/types/generators/LlmMlx.d.ts +0 -228
  145. package/types/generators/LlmOnnx.d.ts +0 -213
  146. package/types/generators/LlmOpenAiCompat.d.ts +0 -312
  147. package/types/generators/LlmQualcommAiEngine.d.ts +0 -247
  148. package/types/generators/Mcp.d.ts +0 -637
  149. package/types/generators/McpServer.d.ts +0 -289
  150. package/types/generators/MediaFlow.d.ts +0 -170
  151. package/types/generators/MqttBroker.d.ts +0 -141
  152. package/types/generators/MqttClient.d.ts +0 -141
  153. package/types/generators/Question.d.ts +0 -408
  154. package/types/generators/RealtimeTranscription.d.ts +0 -287
  155. package/types/generators/RerankerGgml.d.ts +0 -195
  156. package/types/generators/SerialPort.d.ts +0 -151
  157. package/types/generators/SoundPlayer.d.ts +0 -94
  158. package/types/generators/SoundRecorder.d.ts +0 -139
  159. package/types/generators/SpeechToTextGgml.d.ts +0 -424
  160. package/types/generators/SpeechToTextOnnx.d.ts +0 -236
  161. package/types/generators/SpeechToTextPlatform.d.ts +0 -85
  162. package/types/generators/SqLite.d.ts +0 -159
  163. package/types/generators/Step.d.ts +0 -107
  164. package/types/generators/SttAppleBuiltin.d.ts +0 -153
  165. package/types/generators/Tcp.d.ts +0 -126
  166. package/types/generators/TcpServer.d.ts +0 -147
  167. package/types/generators/TextToSpeechAppleBuiltin.d.ts +0 -127
  168. package/types/generators/TextToSpeechGgml.d.ts +0 -221
  169. package/types/generators/TextToSpeechOnnx.d.ts +0 -178
  170. package/types/generators/TextToSpeechOpenAiLike.d.ts +0 -121
  171. package/types/generators/ThermalPrinter.d.ts +0 -193
  172. package/types/generators/Tick.d.ts +0 -83
  173. package/types/generators/Udp.d.ts +0 -120
  174. package/types/generators/VadGgml.d.ts +0 -260
  175. package/types/generators/VadOnnx.d.ts +0 -231
  176. package/types/generators/VadTraditional.d.ts +0 -138
  177. package/types/generators/VectorStore.d.ts +0 -257
  178. package/types/generators/Watchdog.d.ts +0 -107
  179. package/types/generators/WebCrawler.d.ts +0 -103
  180. package/types/generators/WebRtc.d.ts +0 -181
  181. package/types/generators/WebSocket.d.ts +0 -148
  182. package/types/generators/index.d.ts +0 -57
  183. package/types/index.d.ts +0 -13
  184. package/types/subspace.d.ts +0 -60
  185. package/types/switch.d.ts +0 -51
  186. package/types/system.d.ts +0 -707
  187. package/utils/__tests__/calc.test.js +0 -25
  188. package/utils/__tests__/id.test.js +0 -154
  189. package/utils/calc.ts +0 -130
  190. package/utils/data.ts +0 -495
  191. package/utils/event-props.ts +0 -912
  192. package/utils/id.ts +0 -133
@@ -1,132 +0,0 @@
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
- */
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
- /* Execute GraphQL request with defined properties */
19
- export type GeneratorGraphQLActionRunQuery = ActionWithParams & {
20
- __actionName: 'GENERATOR_GRAPHQL_RUN_QUERY'
21
- params?: Array<
22
- | {
23
- input: 'type'
24
- value?: 'query' | 'mutation' | 'subscription' | DataLink | EventProperty
25
- mapping?: string
26
- }
27
- | {
28
- input: 'query'
29
- value?: string | DataLink | EventProperty
30
- mapping?: string
31
- }
32
- | {
33
- input: 'variables'
34
- value?: {} | DataLink | EventProperty
35
- mapping?: string
36
- }
37
- >
38
- }
39
-
40
- /* Reset cache of GraphQL client */
41
- export type GeneratorGraphQLActionResetCache = Action & {
42
- __actionName: 'GENERATOR_GRAPHQL_RESET_CACHE'
43
- }
44
-
45
- /* Cancel current running subscription */
46
- export type GeneratorGraphQLActionCancelSubscription = Action & {
47
- __actionName: 'GENERATOR_GRAPHQL_CANCEL_SUBSCRIPTION'
48
- }
49
-
50
- interface GeneratorGraphQLDef {
51
- /*
52
- Default property:
53
- {
54
- "init": false,
55
- "type": "query",
56
- "headers": {},
57
- "query": "",
58
- "variables": {},
59
- "firebaseEnabled": false
60
- }
61
- */
62
- property?: {
63
- /* Start GraphQL request immediately after generator initialization */
64
- init?: boolean | DataLink
65
- /* GraphQL request type */
66
- type?: 'query' | 'mutation' | 'subscription' | DataLink
67
- /* HTTP request headers */
68
- headers?: {} | DataLink
69
- /* HTTP request URL endpoint */
70
- endpoint?: string | DataLink
71
- /* Subscription endpoint */
72
- endpointForSubscription?: string | DataLink
73
- /* Subscription connection params */
74
- connectionParams?: {} | DataLink
75
- /* Query content */
76
- query?: string | DataLink
77
- /* Query variables */
78
- variables?: {} | DataLink
79
- /* Data id from response, it is useful for caching data */
80
- dataIdFromObject?: string | DataLink
81
- /* Enable Firebase link */
82
- firebaseEnabled?: boolean | DataLink
83
- /* Firebase API Key */
84
- firebaseAPIKey?: string | DataLink
85
- /* Firebase Realtime Database `authDomain` field */
86
- firebaseAuthDomain?: string | DataLink
87
- /* Firebase Realtime Database `databaseURL` field */
88
- firebaseDatabaseURL?: string | DataLink
89
- /* Firebase Realtime Database `projectId` field */
90
- firebaseProjectId?: string | DataLink
91
- /* Firebase Realtime Database `storageBucket` field */
92
- firebaseStorageBucket?: string | DataLink
93
- /* Firebase Realtime Database `messagingSenderId` field */
94
- firebaseMessagingSenderId?: string | DataLink
95
- }
96
- events?: {
97
- /* Event triggered when subscription connection is successful */
98
- subscriptionOnConnection?: Array<EventAction>
99
- /* Event triggered when subscription connection error occurs */
100
- subscriptionOnConnectionError?: Array<
101
- EventAction<string & keyof TemplateEventPropsMap['Graphql']['subscriptionOnConnectionError']>
102
- >
103
- }
104
- outlets?: {
105
- /* Response for GraphQL request, it will save to Data */
106
- response?: () => Data<{ [key: string]: any }>
107
- /* Server response error of GraphQL request, it will save to Data */
108
- error?: () => Data<string>
109
- }
110
- }
111
-
112
- /* GraphQL client for Query, Mutation, and Subscription (WebSocket) with response caching and optional Firebase Realtime Database link */
113
- export type GeneratorGraphQL = Generator &
114
- GeneratorGraphQLDef & {
115
- templateKey: 'GENERATOR_GRAPHQL'
116
- switches?: Array<
117
- SwitchDef &
118
- GeneratorGraphQLDef & {
119
- conds?: Array<{
120
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
121
- cond:
122
- | SwitchCondInnerStateCurrentCanvas
123
- | SwitchCondData
124
- | {
125
- __typename: 'SwitchCondInnerStateOutlet'
126
- outlet: 'response' | 'error'
127
- value: any
128
- }
129
- }>
130
- }
131
- >
132
- }
@@ -1,222 +0,0 @@
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
- */
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
- /* Run HTTP request with defined properties */
19
- export type GeneratorHTTPActionRunRequest = ActionWithParams & {
20
- __actionName: 'GENERATOR_HTTP_RUN_REQUEST'
21
- params?: Array<
22
- | {
23
- input: 'url'
24
- value?: string | DataLink | EventProperty
25
- mapping?: string
26
- }
27
- | {
28
- input: 'method'
29
- value?:
30
- | 'GET'
31
- | 'POST'
32
- | 'PUT'
33
- | 'DELETE'
34
- | 'HEAD'
35
- | 'PATCH'
36
- | 'OPTIONS'
37
- | 'CONNECT'
38
- | 'TRACE'
39
- | DataLink
40
- | EventProperty
41
- mapping?: string
42
- }
43
- | {
44
- input: 'headers'
45
- value?: {} | DataLink | EventProperty
46
- mapping?: string
47
- }
48
- | {
49
- input: 'body'
50
- value?: {} | DataLink | EventProperty
51
- mapping?: string
52
- }
53
- | {
54
- input: 'timeout'
55
- value?: number | DataLink | EventProperty
56
- mapping?: string
57
- }
58
- | {
59
- input: 'mode'
60
- value?: 'same-origin' | 'no-cors' | 'cors' | DataLink | EventProperty
61
- mapping?: string
62
- }
63
- | {
64
- input: 'credentials'
65
- value?: 'include' | 'same-origin' | 'omit' | DataLink | EventProperty
66
- mapping?: string
67
- }
68
- | {
69
- input: 'redirect'
70
- value?: 'manual' | 'follow' | 'error' | DataLink | EventProperty
71
- mapping?: string
72
- }
73
- | {
74
- input: 'referrer'
75
- value?: 'no-referrer' | 'client' | DataLink | EventProperty
76
- mapping?: string
77
- }
78
- | {
79
- input: 'resType'
80
- value?: 'json' | 'text' | 'xml' | 'csv' | DataLink | EventProperty
81
- mapping?: string
82
- }
83
- | {
84
- input: 'resSelector'
85
- value?: string | DataLink | EventProperty
86
- mapping?: string
87
- }
88
- | {
89
- input: 'eventStream'
90
- value?: boolean | DataLink | EventProperty
91
- mapping?: string
92
- }
93
- | {
94
- input: 'eventName'
95
- value?: string | DataLink | EventProperty
96
- mapping?: string
97
- }
98
- >
99
- }
100
-
101
- /* Abort HTTP request or SSE */
102
- export type GeneratorHTTPActionAbort = Action & {
103
- __actionName: 'GENERATOR_HTTP_ABORT'
104
- }
105
-
106
- interface GeneratorHTTPDef {
107
- /*
108
- Default property:
109
- {
110
- "init": false,
111
- "method": "GET",
112
- "headers": {},
113
- "body": {},
114
- "resType": "json",
115
- "eventStream": false,
116
- "eventName": "message"
117
- }
118
- */
119
- property?: {
120
- /* Start HTTP request on generator initialized */
121
- init?: boolean | DataLink
122
- /* URL of HTTP request */
123
- url?: string | DataLink
124
- /* Method of HTTP request */
125
- method?:
126
- | 'GET'
127
- | 'POST'
128
- | 'PUT'
129
- | 'DELETE'
130
- | 'HEAD'
131
- | 'PATCH'
132
- | 'OPTIONS'
133
- | 'CONNECT'
134
- | 'TRACE'
135
- | DataLink
136
- /* HTTP request headers */
137
- headers?: {} | DataLink
138
- /* Timeout of HTTP request */
139
- timeout?: number | DataLink
140
- /* Mode of HTTP request */
141
- mode?: 'same-origin' | 'no-cors' | 'cors' | DataLink
142
- /* Credentials of HTTP request */
143
- credentials?: 'include' | 'same-origin' | 'omit' | DataLink
144
- /* Redirect of HTTP request */
145
- redirect?: 'manual' | 'follow' | 'error' | DataLink
146
- /* Referrer of HTTP request */
147
- referrer?: 'no-referrer' | 'client' | DataLink
148
- /* HTTP request body, it will transform depends on `headers.Content-Type` (`application/json`, `application/x-www-form-urlencoded` or `multipart/form-data`)
149
- The multipart schema like `{ file: { uri: File, type: File MIME, name: File Name }, field: "value" }` */
150
- body?: {} | DataLink
151
- /* HTTP response type */
152
- resType?: 'json' | 'text' | 'xml' | 'csv' | DataLink
153
- /* Response selector path to extract specific data from parsed response (e.g., "data.items" for JSON, "root.element" for XML) */
154
- resSelector?: string | DataLink
155
- /* Receive event stream (SSE) */
156
- eventStream?: boolean | DataLink
157
- /* Event name to listen on SSE */
158
- eventName?: string | DataLink | Array<string | DataLink> | DataLink | DataLink
159
- }
160
- events?: {}
161
- outlets?: {
162
- /* Response for HTTP request */
163
- response?: () => Data<string | { [key: string]: any }>
164
- /* Response details for HTTP request */
165
- responseDetails?: () => Data<{
166
- ok?: boolean
167
- redirected?: boolean
168
- type?: string
169
- status?: number
170
- statusText?: string
171
- headers?: { [key: string]: any }
172
- body?: any
173
- event?: string
174
- id?: string
175
- data?: any
176
- [key: string]: any
177
- }>
178
- /* All received data from event stream */
179
- eventLog?: () => Data<Array<any>>
180
- /* All received event details from event stream */
181
- eventLogDetails?: () => Data<
182
- Array<{
183
- event?: string
184
- id?: string
185
- data?: any
186
- [key: string]: any
187
- }>
188
- >
189
- /* EventSource state */
190
- sseState?: () => Data<string>
191
- /* Server response error of HTTP request */
192
- error?: () => Data<string>
193
- }
194
- }
195
-
196
- /* HTTP client supporting all methods (GET/POST/PUT/DELETE/PATCH/...), response parsing (JSON/text/XML/CSV), SSE event streams, and multipart file uploads */
197
- export type GeneratorHTTP = Generator &
198
- GeneratorHTTPDef & {
199
- templateKey: 'GENERATOR_HTTP'
200
- switches?: Array<
201
- SwitchDef &
202
- GeneratorHTTPDef & {
203
- conds?: Array<{
204
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
205
- cond:
206
- | SwitchCondInnerStateCurrentCanvas
207
- | SwitchCondData
208
- | {
209
- __typename: 'SwitchCondInnerStateOutlet'
210
- outlet:
211
- | 'response'
212
- | 'responseDetails'
213
- | 'eventLog'
214
- | 'eventLogDetails'
215
- | 'sseState'
216
- | 'error'
217
- value: any
218
- }
219
- }>
220
- }
221
- >
222
- }
@@ -1,230 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Embedded HTTP/HTTPS server with route matching, CORS, auth (Basic/Bearer), SSE streaming, file upload, async response mode, and JS Sandbox route handlers
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 HTTP server */
19
- export type GeneratorHTTPServerActionStart = Action & {
20
- __actionName: 'GENERATOR_HTTP_SERVER_START'
21
- }
22
-
23
- /* Stop HTTP server */
24
- export type GeneratorHTTPServerActionStop = Action & {
25
- __actionName: 'GENERATOR_HTTP_SERVER_STOP'
26
- }
27
-
28
- /* Clear upload temp files */
29
- export type GeneratorHTTPServerActionClearTempFiles = Action & {
30
- __actionName: 'GENERATOR_HTTP_SERVER_CLEAR_TEMP_FILES'
31
- }
32
-
33
- /* End stream */
34
- export type GeneratorHTTPServerActionEndStream = Action & {
35
- __actionName: 'GENERATOR_HTTP_SERVER_END_STREAM'
36
- }
37
-
38
- interface GeneratorHTTPServerDef {
39
- /*
40
- Default property:
41
- {
42
- "init": false,
43
- "method": "GET",
44
- "path": "/",
45
- "methods": [],
46
- "idleTimeout": 10000,
47
- "authType": "none",
48
- "asyncMode": false,
49
- "resStatusCode": 200,
50
- "resContentType": "text/plain",
51
- "tls": false,
52
- "tlsKeyPairPassword": ""
53
- }
54
- */
55
- property?: {
56
- /* Start HTTP server on generator initialized */
57
- init?: boolean | DataLink
58
- /* Bind port of HTTP server */
59
- port?: number | DataLink
60
- /* Method of HTTP request */
61
- method?:
62
- | 'GET'
63
- | 'POST'
64
- | 'PUT'
65
- | 'DELETE'
66
- | 'HEAD'
67
- | 'PATCH'
68
- | 'OPTIONS'
69
- | 'CONNECT'
70
- | 'TRACE'
71
- | DataLink
72
- /* Path of HTTP request */
73
- path?: string | DataLink
74
- /* Additional route methods handled by JS Sandbox scripts. The script receives `inputs.request`, `inputs.query`, `inputs.headers`, `inputs.body`, and configured `additionalParams`. `scriptConfig.members` can expose generator or brick script-member functions, same as MCP Server. */
75
- methods?:
76
- | Array<
77
- | DataLink
78
- | {
79
- enabled?: boolean | DataLink
80
- name?: string | DataLink
81
- method?:
82
- | 'GET'
83
- | 'POST'
84
- | 'PUT'
85
- | 'DELETE'
86
- | 'HEAD'
87
- | 'PATCH'
88
- | 'OPTIONS'
89
- | 'CONNECT'
90
- | 'TRACE'
91
- | DataLink
92
- path?: string | DataLink
93
- resStatusCode?: number | DataLink
94
- resContentType?:
95
- | 'text/plain'
96
- | 'text/html'
97
- | 'text/javascript'
98
- | 'text/css'
99
- | 'text/xml'
100
- | 'application/xml'
101
- | 'application/json'
102
- | 'application/octet-stream'
103
- | 'text/event-stream'
104
- | DataLink
105
- resHeader?: {} | DataLink
106
- resBody?: any
107
- sseEvent?: string | DataLink
108
- scriptConfig?:
109
- | DataLink
110
- | {
111
- code?: string | DataLink
112
- timeout?: number | DataLink
113
- members?:
114
- | Array<
115
- | DataLink
116
- | {
117
- handler?: string | DataLink
118
- varName?: string | DataLink
119
- }
120
- >
121
- | DataLink
122
- additionalParams?: {} | DataLink
123
- }
124
- }
125
- >
126
- | DataLink
127
- /* Max connection idle time, 0 is disable */
128
- idleTimeout?: number | DataLink
129
- /* HTTP request body limit, 0 is unlimited */
130
- bodyLimit?: number | DataLink
131
- /* CORS allowed origins
132
- You can use wildcard like `*`, `*.example.com`, `http://*.example.com` */
133
- corsOrigins?: Array<string | DataLink> | DataLink
134
- /* Authorization type of HTTP request */
135
- authType?: 'none' | 'basic' | 'bearer' | DataLink
136
- /* Username of basic auth */
137
- basicAuthUser?: string | DataLink
138
- /* Password of basic auth */
139
- basicAuthPassword?: string | DataLink
140
- /* Token of bearer auth */
141
- bearerToken?: string | DataLink
142
- /* Asynchronous response mode
143
- Will block connection until Response Body update. */
144
- asyncMode?: boolean | DataLink
145
- /* Save request body as file
146
- Only work on `application/octet-stream` or `multipart/form-data`. */
147
- saveBodyAsFile?: boolean | DataLink
148
- /* Response status code */
149
- resStatusCode?: number | DataLink
150
- /* Response Content-Type
151
- `text/*` will not convert body.
152
- `application/xml` convert object to XML, [example object struct](https://github.com/davidcalhoun/jstoxml#example-10-podcast-rss-feed)
153
- `application/octet-stream` body should be Base64 string or file path. */
154
- resContentType?:
155
- | 'text/plain'
156
- | 'text/html'
157
- | 'text/javascript'
158
- | 'text/css'
159
- | 'text/xml'
160
- | 'application/xml'
161
- | 'application/json'
162
- | 'application/octet-stream'
163
- | 'text/event-stream'
164
- | DataLink
165
- /* Response Body */
166
- resBody?: any
167
- /* Custom response headers */
168
- resHeader?: {} | DataLink
169
- /* Event name of SSE */
170
- sseEvent?: string | DataLink
171
- /* SSE single request mode, block new request until the previous request is processed */
172
- sseSingleRequest?: boolean | DataLink
173
- /* Enable TLS (HTTPS) */
174
- tls?: boolean | DataLink
175
- /* Server side key pair (Base64 encoded PKCS #12) */
176
- tlsKeyPair?: string | DataLink
177
- /* Password of key pair, leave empty if no password */
178
- tlsKeyPairPassword?: string | DataLink
179
- }
180
- events?: {
181
- /* Event of HTTP server is ready */
182
- onReady?: Array<EventAction>
183
- /* Event of HTTP server accept the request */
184
- onRequest?: Array<EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onRequest']>>
185
- /* Event of client close connection */
186
- onClientClose?: Array<
187
- EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onClientClose']>
188
- >
189
- /* Event of client error */
190
- onClientError?: Array<
191
- EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onClientError']>
192
- >
193
- /* Event of server close */
194
- onClose?: Array<EventAction>
195
- /* Event of server error */
196
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onError']>>
197
- }
198
- outlets?: {
199
- /* Server is listening */
200
- isListening?: () => Data<boolean>
201
- /* Query of request */
202
- requestQuery?: () => Data<{ [key: string]: any }>
203
- /* Body of request */
204
- requestBody?: () => Data<any>
205
- /* Remote address of request */
206
- clientAddress?: () => Data<string>
207
- }
208
- }
209
-
210
- /* Embedded HTTP/HTTPS server with route matching, CORS, auth (Basic/Bearer), SSE streaming, file upload, async response mode, and JS Sandbox route handlers */
211
- export type GeneratorHTTPServer = Generator &
212
- GeneratorHTTPServerDef & {
213
- templateKey: 'GENERATOR_HTTP_SERVER'
214
- switches?: Array<
215
- SwitchDef &
216
- GeneratorHTTPServerDef & {
217
- conds?: Array<{
218
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
219
- cond:
220
- | SwitchCondInnerStateCurrentCanvas
221
- | SwitchCondData
222
- | {
223
- __typename: 'SwitchCondInnerStateOutlet'
224
- outlet: 'isListening' | 'requestQuery' | 'requestBody' | 'clientAddress'
225
- value: any
226
- }
227
- }>
228
- }
229
- >
230
- }
@@ -1,103 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Display informational dialog or toast messages to the user
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
- /* Show information */
19
- export type GeneratorInformationActionShow = ActionWithParams & {
20
- __actionName: 'GENERATOR_INFORMATION_SHOW'
21
- params?: Array<
22
- | {
23
- input: 'displayLanguage'
24
- value?: string | DataLink | EventProperty
25
- mapping?: string
26
- }
27
- | {
28
- input: 'content'
29
- value?: {} | DataLink | EventProperty
30
- mapping?: string
31
- }
32
- >
33
- }
34
-
35
- /* Close information */
36
- export type GeneratorInformationActionClose = Action & {
37
- __actionName: 'GENERATOR_INFORMATION_CLOSE'
38
- }
39
-
40
- interface GeneratorInformationDef {
41
- /*
42
- Default property:
43
- {
44
- "modalMode": "root",
45
- "backgroundColor": "#161616"
46
- }
47
- */
48
- property?: {
49
- /* Modal mode */
50
- modalMode?: 'root' | 'in-subspace' | DataLink
51
- /* Information contents */
52
- content?:
53
- | DataLink
54
- | {
55
- type?: 'loading' | 'info' | 'warning' | 'success' | 'queue-number' | DataLink
56
- title?: string | DataLink
57
- description?: string | DataLink
58
- queueNumberLabel?:
59
- | DataLink
60
- | {
61
- number?: string | DataLink
62
- labelTitle?: string | DataLink
63
- note?: string | DataLink
64
- }
65
- }
66
- /* Display language */
67
- displayLanguage?: string | DataLink
68
- /* Background color */
69
- backgroundColor?: string | DataLink
70
- }
71
- events?: {
72
- /* Trigger when user confirms the information */
73
- onConfirm?: Array<EventAction>
74
- /* Trigger when error occurs */
75
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Information']['onError']>>
76
- }
77
- outlets?: {
78
- /* Error message */
79
- errorMessage?: () => Data<string>
80
- }
81
- }
82
-
83
- /* Display informational dialog or toast messages to the user */
84
- export type GeneratorInformation = Generator &
85
- GeneratorInformationDef & {
86
- templateKey: 'GENERATOR_INFORMATION'
87
- switches?: Array<
88
- SwitchDef &
89
- GeneratorInformationDef & {
90
- conds?: Array<{
91
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
92
- cond:
93
- | SwitchCondInnerStateCurrentCanvas
94
- | SwitchCondData
95
- | {
96
- __typename: 'SwitchCondInnerStateOutlet'
97
- outlet: 'errorMessage'
98
- value: any
99
- }
100
- }>
101
- }
102
- >
103
- }