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

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 (190) hide show
  1. package/package.json +4 -28
  2. package/tools/deploy.ts +19 -176
  3. package/tools/mcp-server.ts +16 -33
  4. package/tools/postinstall.ts +21 -292
  5. package/tools/pull.ts +15 -195
  6. package/tools/push-config.ts +18 -113
  7. package/tools/simulator.ts +19 -148
  8. package/compile/__tests__/config-diff.test.js +0 -100
  9. package/compile/__tests__/index.test.js +0 -461
  10. package/compile/__tests__/util.test.js +0 -450
  11. package/compile/action-name-map.ts +0 -1079
  12. package/compile/config-diff.ts +0 -155
  13. package/compile/index.ts +0 -1594
  14. package/compile/util.ts +0 -482
  15. package/index.ts +0 -6
  16. package/skills/bricks-ctor/SKILL.md +0 -38
  17. package/skills/bricks-ctor/references/animation.md +0 -160
  18. package/skills/bricks-ctor/references/architecture-patterns.md +0 -88
  19. package/skills/bricks-ctor/references/automations.md +0 -232
  20. package/skills/bricks-ctor/references/buttress.md +0 -245
  21. package/skills/bricks-ctor/references/data-calculation.md +0 -252
  22. package/skills/bricks-ctor/references/local-sync.md +0 -129
  23. package/skills/bricks-ctor/references/media-flow.md +0 -165
  24. package/skills/bricks-ctor/references/remote-data-bank.md +0 -196
  25. package/skills/bricks-ctor/references/simulator.md +0 -132
  26. package/skills/bricks-ctor/references/source-editing-tools.md +0 -81
  27. package/skills/bricks-ctor/references/standby-transition.md +0 -124
  28. package/skills/bricks-ctor/references/verification-toolchain.md +0 -200
  29. package/skills/bricks-design/SKILL.md +0 -171
  30. package/skills/bricks-design/references/architecture-truths.md +0 -132
  31. package/skills/bricks-design/references/avoiding-complexity.md +0 -91
  32. package/skills/bricks-design/references/design-critique.md +0 -195
  33. package/skills/bricks-design/references/design-languages.md +0 -265
  34. package/skills/bricks-design/references/performance.md +0 -116
  35. package/skills/bricks-design/references/presentation-and-slideshow.md +0 -137
  36. package/skills/bricks-design/references/translating-inputs.md +0 -152
  37. package/skills/bricks-design/references/variations-and-tweaks.md +0 -124
  38. package/skills/bricks-design/references/when-the-brief-is-branded.md +0 -284
  39. package/skills/bricks-design/references/when-the-brief-is-vague.md +0 -85
  40. package/skills/bricks-design/references/workflow.md +0 -134
  41. package/skills/bricks-ux/SKILL.md +0 -114
  42. package/skills/bricks-ux/references/accessibility.md +0 -162
  43. package/skills/bricks-ux/references/flow-states.md +0 -175
  44. package/skills/bricks-ux/references/interaction-archetypes.md +0 -189
  45. package/skills/bricks-ux/references/monitoring-screens.md +0 -153
  46. package/skills/bricks-ux/references/pressable-composition.md +0 -126
  47. package/skills/bricks-ux/references/user-journey.md +0 -168
  48. package/skills/bricks-ux/references/ux-critique.md +0 -256
  49. package/skills/rive-marketplace/SKILL.md +0 -99
  50. package/tools/__tests__/_cli-error.test.ts +0 -35
  51. package/tools/__tests__/_mcp-config.test.ts +0 -67
  52. package/tools/__tests__/pull.test.ts +0 -108
  53. package/tools/_cli-error.ts +0 -17
  54. package/tools/_edits-log.ts +0 -41
  55. package/tools/_git-author.ts +0 -37
  56. package/tools/_last-pushed-commit.ts +0 -28
  57. package/tools/_mcp-config.ts +0 -42
  58. package/tools/_shell.ts +0 -180
  59. package/tools/icons/.gitattributes +0 -1
  60. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  61. package/tools/icons/fa6pro-meta.json +0 -1
  62. package/tools/mcp-env.ts +0 -13
  63. package/tools/mcp-tools/__tests__/data-calc-editing.test.js +0 -516
  64. package/tools/mcp-tools/__tests__/entry-editing.test.js +0 -866
  65. package/tools/mcp-tools/__tests__/huggingface.test.ts +0 -49
  66. package/tools/mcp-tools/__tests__/icons.test.ts +0 -21
  67. package/tools/mcp-tools/__tests__/mcp-env.test.js +0 -19
  68. package/tools/mcp-tools/_editing-helpers.ts +0 -98
  69. package/tools/mcp-tools/_verify.ts +0 -50
  70. package/tools/mcp-tools/compile.ts +0 -104
  71. package/tools/mcp-tools/data-calc-editing.ts +0 -1311
  72. package/tools/mcp-tools/entry-editing.ts +0 -2297
  73. package/tools/mcp-tools/huggingface.ts +0 -772
  74. package/tools/mcp-tools/icons.ts +0 -97
  75. package/tools/mcp-tools/lottie.ts +0 -102
  76. package/tools/mcp-tools/media.ts +0 -113
  77. package/tools/simulator-main.mjs +0 -488
  78. package/tools/simulator-preload.cjs +0 -16
  79. package/types/animation.d.ts +0 -116
  80. package/types/automation.d.ts +0 -231
  81. package/types/brick-base.d.ts +0 -80
  82. package/types/bricks/Camera.d.ts +0 -246
  83. package/types/bricks/Chart.d.ts +0 -372
  84. package/types/bricks/GenerativeMedia.d.ts +0 -290
  85. package/types/bricks/Icon.d.ts +0 -98
  86. package/types/bricks/Image.d.ts +0 -126
  87. package/types/bricks/Items.d.ts +0 -480
  88. package/types/bricks/Lottie.d.ts +0 -168
  89. package/types/bricks/Maps.d.ts +0 -262
  90. package/types/bricks/QrCode.d.ts +0 -117
  91. package/types/bricks/Rect.d.ts +0 -150
  92. package/types/bricks/RichText.d.ts +0 -131
  93. package/types/bricks/Rive.d.ts +0 -220
  94. package/types/bricks/Scene3D.d.ts +0 -676
  95. package/types/bricks/Sketch.d.ts +0 -256
  96. package/types/bricks/Slideshow.d.ts +0 -201
  97. package/types/bricks/Svg.d.ts +0 -99
  98. package/types/bricks/Text.d.ts +0 -148
  99. package/types/bricks/TextInput.d.ts +0 -242
  100. package/types/bricks/Video.d.ts +0 -242
  101. package/types/bricks/VideoStreaming.d.ts +0 -112
  102. package/types/bricks/WebRtcStream.d.ts +0 -65
  103. package/types/bricks/WebView.d.ts +0 -168
  104. package/types/bricks/index.d.ts +0 -23
  105. package/types/canvas.d.ts +0 -82
  106. package/types/common.d.ts +0 -141
  107. package/types/data-calc-command/base.d.ts +0 -57
  108. package/types/data-calc-command/collection.d.ts +0 -418
  109. package/types/data-calc-command/color.d.ts +0 -432
  110. package/types/data-calc-command/constant.d.ts +0 -50
  111. package/types/data-calc-command/datetime.d.ts +0 -147
  112. package/types/data-calc-command/file.d.ts +0 -129
  113. package/types/data-calc-command/index.d.ts +0 -13
  114. package/types/data-calc-command/iteratee.d.ts +0 -23
  115. package/types/data-calc-command/logictype.d.ts +0 -190
  116. package/types/data-calc-command/math.d.ts +0 -275
  117. package/types/data-calc-command/object.d.ts +0 -119
  118. package/types/data-calc-command/sandbox.d.ts +0 -66
  119. package/types/data-calc-command/string.d.ts +0 -407
  120. package/types/data-calc-script.d.ts +0 -21
  121. package/types/data-calc.d.ts +0 -12
  122. package/types/data.d.ts +0 -97
  123. package/types/generators/AlarmClock.d.ts +0 -110
  124. package/types/generators/Assistant.d.ts +0 -640
  125. package/types/generators/BleCentral.d.ts +0 -247
  126. package/types/generators/BlePeripheral.d.ts +0 -208
  127. package/types/generators/CanvasMap.d.ts +0 -74
  128. package/types/generators/CastlesPay.d.ts +0 -87
  129. package/types/generators/DataBank.d.ts +0 -160
  130. package/types/generators/File.d.ts +0 -432
  131. package/types/generators/GraphQl.d.ts +0 -132
  132. package/types/generators/Http.d.ts +0 -222
  133. package/types/generators/HttpServer.d.ts +0 -230
  134. package/types/generators/Information.d.ts +0 -103
  135. package/types/generators/Intent.d.ts +0 -168
  136. package/types/generators/Iterator.d.ts +0 -108
  137. package/types/generators/Keyboard.d.ts +0 -105
  138. package/types/generators/LlmAnthropicCompat.d.ts +0 -212
  139. package/types/generators/LlmAppleBuiltin.d.ts +0 -159
  140. package/types/generators/LlmGgml.d.ts +0 -903
  141. package/types/generators/LlmMediaTekNeuroPilot.d.ts +0 -235
  142. package/types/generators/LlmMlx.d.ts +0 -228
  143. package/types/generators/LlmOnnx.d.ts +0 -213
  144. package/types/generators/LlmOpenAiCompat.d.ts +0 -312
  145. package/types/generators/LlmQualcommAiEngine.d.ts +0 -247
  146. package/types/generators/Mcp.d.ts +0 -637
  147. package/types/generators/McpServer.d.ts +0 -289
  148. package/types/generators/MediaFlow.d.ts +0 -170
  149. package/types/generators/MqttBroker.d.ts +0 -141
  150. package/types/generators/MqttClient.d.ts +0 -141
  151. package/types/generators/Question.d.ts +0 -408
  152. package/types/generators/RealtimeTranscription.d.ts +0 -287
  153. package/types/generators/RerankerGgml.d.ts +0 -195
  154. package/types/generators/SerialPort.d.ts +0 -151
  155. package/types/generators/SoundPlayer.d.ts +0 -94
  156. package/types/generators/SoundRecorder.d.ts +0 -139
  157. package/types/generators/SpeechToTextGgml.d.ts +0 -424
  158. package/types/generators/SpeechToTextOnnx.d.ts +0 -236
  159. package/types/generators/SpeechToTextPlatform.d.ts +0 -85
  160. package/types/generators/SqLite.d.ts +0 -159
  161. package/types/generators/Step.d.ts +0 -107
  162. package/types/generators/SttAppleBuiltin.d.ts +0 -153
  163. package/types/generators/Tcp.d.ts +0 -126
  164. package/types/generators/TcpServer.d.ts +0 -147
  165. package/types/generators/TextToSpeechAppleBuiltin.d.ts +0 -127
  166. package/types/generators/TextToSpeechGgml.d.ts +0 -221
  167. package/types/generators/TextToSpeechOnnx.d.ts +0 -178
  168. package/types/generators/TextToSpeechOpenAiLike.d.ts +0 -121
  169. package/types/generators/ThermalPrinter.d.ts +0 -193
  170. package/types/generators/Tick.d.ts +0 -83
  171. package/types/generators/Udp.d.ts +0 -120
  172. package/types/generators/VadGgml.d.ts +0 -260
  173. package/types/generators/VadOnnx.d.ts +0 -231
  174. package/types/generators/VadTraditional.d.ts +0 -138
  175. package/types/generators/VectorStore.d.ts +0 -257
  176. package/types/generators/Watchdog.d.ts +0 -107
  177. package/types/generators/WebCrawler.d.ts +0 -103
  178. package/types/generators/WebRtc.d.ts +0 -181
  179. package/types/generators/WebSocket.d.ts +0 -148
  180. package/types/generators/index.d.ts +0 -57
  181. package/types/index.d.ts +0 -13
  182. package/types/subspace.d.ts +0 -60
  183. package/types/switch.d.ts +0 -51
  184. package/types/system.d.ts +0 -707
  185. package/utils/__tests__/calc.test.js +0 -25
  186. package/utils/__tests__/id.test.js +0 -154
  187. package/utils/calc.ts +0 -130
  188. package/utils/data.ts +0 -495
  189. package/utils/event-props.ts +0 -912
  190. package/utils/id.ts +0 -133
@@ -1,160 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Access and subscribe to shared Data properties from the project Data Bank
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 Data Bank fetch */
19
- export type GeneratorDataBankActionFetch = Action & {
20
- __actionName: 'GENERATOR_DATA_BANK_FETCH'
21
- }
22
-
23
- /* Run Data Bank update */
24
- export type GeneratorDataBankActionUpdateProperty = ActionWithParams & {
25
- __actionName: 'GENERATOR_DATA_BANK_UPDATE_PROPERTY'
26
- params?: Array<
27
- | {
28
- input: 'propertyId'
29
- value?: string | DataLink | EventProperty
30
- mapping?: string
31
- }
32
- | {
33
- input: 'propertyValue'
34
- value?: any | EventProperty
35
- mapping?: string
36
- }
37
- >
38
- }
39
-
40
- /* Run Data Bank remove */
41
- export type GeneratorDataBankActionRemoveProperty = ActionWithParams & {
42
- __actionName: 'GENERATOR_DATA_BANK_REMOVE_PROPERTY'
43
- params?: Array<{
44
- input: 'propertyId'
45
- value?: string | DataLink | EventProperty
46
- mapping?: string
47
- }>
48
- }
49
-
50
- /* Reset cache of Data Bank */
51
- export type GeneratorDataBankActionResetCache = Action & {
52
- __actionName: 'GENERATOR_DATA_BANK_RESET_CACHE'
53
- }
54
-
55
- /* Cancel current running subscription */
56
- export type GeneratorDataBankActionCancelSubscription = Action & {
57
- __actionName: 'GENERATOR_DATA_BANK_CANCEL_SUBSCRIPTION'
58
- }
59
-
60
- interface GeneratorDataBankDef {
61
- /*
62
- Default property:
63
- {
64
- "init": false,
65
- "fetchPolicy": "cache-first",
66
- "subscribeDataChange": false
67
- }
68
- */
69
- property?: {
70
- /* Start generator initialization execution immediately */
71
- init?: boolean | DataLink
72
- /* Data Bank Space ID */
73
- spacename?: string | DataLink
74
- /* Data Bank Space secret key */
75
- spacekey?: string | DataLink
76
- /* Data need to be fetched */
77
- properties?: Array<string | DataLink> | DataLink
78
- /* Determine the cache behavior
79
-
80
- cache-first: Cache first if existing, then fetch from network
81
- network-and-cache: Fetch from network, then save cache
82
- network-only: Fetch from network only */
83
- fetchPolicy?: 'cache-first' | 'network-and-cache' | 'network-only' | DataLink
84
- /* Subscribe Data change */
85
- subscribeDataChange?: boolean | DataLink
86
- }
87
- events?: {
88
- /* Event of Data Bank fetch response */
89
- onFetchResponse?: Array<
90
- EventAction<string & keyof TemplateEventPropsMap['DataBank']['onFetchResponse']>
91
- >
92
- /* Event of Data Bank change from subscription */
93
- onChange?: Array<EventAction>
94
- /* Event of Data Bank fetch error */
95
- onFetchError?: Array<EventAction>
96
- /* Event of error */
97
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['DataBank']['onError']>>
98
- /* Event of subscription on connection */
99
- subscribeDataOnConnect?: Array<EventAction>
100
- /* Server connections error of subscription */
101
- subscribeDataOnConnectError?: Array<
102
- EventAction<string & keyof TemplateEventPropsMap['DataBank']['subscribeDataOnConnectError']>
103
- >
104
- }
105
- outlets?: {
106
- /* Response for Data Bank fetch request, it will save to Data */
107
- response?: () => Data<
108
- Array<{
109
- __typename?: string
110
- id?: string
111
- createAt?: string
112
- updateAt?: string
113
- spaceId?: string
114
- propertyId?: string
115
- definition?: {
116
- type?: string
117
- title?: string
118
- schema?: { [key: string]: any }
119
- [key: string]: any
120
- }
121
- meta?: string
122
- value?: any
123
- lastUpdateHash?: string
124
- lastUpdateNote?: string
125
- lastUpdateKey?: {
126
- name?: string
127
- enable_expired?: boolean
128
- expired_at?: any
129
- jwt?: boolean
130
- [key: string]: any
131
- }
132
- [key: string]: any
133
- }>
134
- >
135
- /* Server response error of Data Bank fetch request, it will save to Data */
136
- error?: () => Data<string>
137
- }
138
- }
139
-
140
- /* Access and subscribe to shared Data properties from the project Data Bank */
141
- export type GeneratorDataBank = Generator &
142
- GeneratorDataBankDef & {
143
- templateKey: 'GENERATOR_DATA_BANK'
144
- switches?: Array<
145
- SwitchDef &
146
- GeneratorDataBankDef & {
147
- conds?: Array<{
148
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
149
- cond:
150
- | SwitchCondInnerStateCurrentCanvas
151
- | SwitchCondData
152
- | {
153
- __typename: 'SwitchCondInnerStateOutlet'
154
- outlet: 'response' | 'error'
155
- value: any
156
- }
157
- }>
158
- }
159
- >
160
- }
@@ -1,432 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * File system operations: read, write, copy, delete, and list files
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
- /* Read stats */
19
- export type GeneratorFileActionReadStats = Action & {
20
- __actionName: 'GENERATOR_FILE_READ_STATS'
21
- }
22
-
23
- /* Read (Currently only support text file) */
24
- export type GeneratorFileActionReadContent = ActionWithParams & {
25
- __actionName: 'GENERATOR_FILE_READ_CONTENT'
26
- params?: Array<{
27
- input: 'encoding'
28
- value?: 'utf8' | 'base64' | DataLink | EventProperty
29
- mapping?: string
30
- }>
31
- }
32
-
33
- /* Delete */
34
- export type GeneratorFileActionDelete = Action & {
35
- __actionName: 'GENERATOR_FILE_DELETE'
36
- }
37
-
38
- /* Append (Currently only support text file) */
39
- export type GeneratorFileActionAppendContent = ActionWithParams & {
40
- __actionName: 'GENERATOR_FILE_APPEND_CONTENT'
41
- params?: Array<
42
- | {
43
- input: 'content'
44
- value?: string | DataLink | EventProperty
45
- mapping?: string
46
- }
47
- | {
48
- input: 'encoding'
49
- value?: 'utf8' | 'base64' | DataLink | EventProperty
50
- mapping?: string
51
- }
52
- | {
53
- input: 'contentList'
54
- value?: Array<any> | DataLink | EventProperty
55
- mapping?: string
56
- }
57
- >
58
- }
59
-
60
- /* Write (Currently only support text file) */
61
- export type GeneratorFileActionWriteContent = ActionWithParams & {
62
- __actionName: 'GENERATOR_FILE_WRITE_CONTENT'
63
- params?: Array<
64
- | {
65
- input: 'content'
66
- value?: string | DataLink | EventProperty
67
- mapping?: string
68
- }
69
- | {
70
- input: 'encoding'
71
- value?: 'utf8' | 'base64' | DataLink | EventProperty
72
- mapping?: string
73
- }
74
- | {
75
- input: 'position'
76
- value?: number | DataLink | EventProperty
77
- mapping?: string
78
- }
79
- | {
80
- input: 'contentList'
81
- value?: Array<any> | DataLink | EventProperty
82
- mapping?: string
83
- }
84
- >
85
- }
86
-
87
- /* Start upload (All or By ID or By Index) */
88
- export type GeneratorFileActionStartUpload = ActionWithParams & {
89
- __actionName: 'GENERATOR_FILE_START_UPLOAD'
90
- params?: Array<
91
- | {
92
- input: 'withAll'
93
- value?: boolean | DataLink | EventProperty
94
- mapping?: string
95
- }
96
- | {
97
- input: 'withId'
98
- value?: string | DataLink | EventProperty
99
- mapping?: string
100
- }
101
- | {
102
- input: 'withIndex'
103
- value?: number | DataLink | EventProperty
104
- mapping?: string
105
- }
106
- >
107
- }
108
-
109
- /* Stop upload (All or By ID or By Index) */
110
- export type GeneratorFileActionStopUpload = ActionWithParams & {
111
- __actionName: 'GENERATOR_FILE_STOP_UPLOAD'
112
- params?: Array<
113
- | {
114
- input: 'withAll'
115
- value?: boolean | DataLink | EventProperty
116
- mapping?: string
117
- }
118
- | {
119
- input: 'withId'
120
- value?: string | DataLink | EventProperty
121
- mapping?: string
122
- }
123
- | {
124
- input: 'withIndex'
125
- value?: number | DataLink | EventProperty
126
- mapping?: string
127
- }
128
- >
129
- }
130
-
131
- /* Start download (All or By ID or By Index) */
132
- export type GeneratorFileActionStartDownload = ActionWithParams & {
133
- __actionName: 'GENERATOR_FILE_START_DOWNLOAD'
134
- params?: Array<
135
- | {
136
- input: 'withAll'
137
- value?: boolean | DataLink | EventProperty
138
- mapping?: string
139
- }
140
- | {
141
- input: 'withId'
142
- value?: string | DataLink | EventProperty
143
- mapping?: string
144
- }
145
- | {
146
- input: 'withIndex'
147
- value?: number | DataLink | EventProperty
148
- mapping?: string
149
- }
150
- >
151
- }
152
-
153
- /* Stop download (All or By ID or By Index) */
154
- export type GeneratorFileActionStopDownload = ActionWithParams & {
155
- __actionName: 'GENERATOR_FILE_STOP_DOWNLOAD'
156
- params?: Array<
157
- | {
158
- input: 'withAll'
159
- value?: boolean | DataLink | EventProperty
160
- mapping?: string
161
- }
162
- | {
163
- input: 'withId'
164
- value?: string | DataLink | EventProperty
165
- mapping?: string
166
- }
167
- | {
168
- input: 'withIndex'
169
- value?: number | DataLink | EventProperty
170
- mapping?: string
171
- }
172
- >
173
- }
174
-
175
- /* Clear download */
176
- export type GeneratorFileActionClearDownload = Action & {
177
- __actionName: 'GENERATOR_FILE_CLEAR_DOWNLOAD'
178
- }
179
-
180
- interface GeneratorFileDef {
181
- /*
182
- Default property:
183
- {
184
- "type": "single",
185
- "targetDirectory": "none",
186
- "hashType": "sha256",
187
- "header": {},
188
- "fields": {},
189
- "list": [],
190
- "downloadAllowLoadSizeLimitExceed": false,
191
- "downloadRetryCount": 3,
192
- "downloadMode": "sequence",
193
- "downloadProgressFrequency": 1000,
194
- "uploadRetryCount": 3,
195
- "uploadMode": "sequence",
196
- "uploadProgressFrequency": 1000
197
- }
198
- */
199
- property?: {
200
- /* Type (Single or Multiple) */
201
- type?: 'single' | 'multiple' | DataLink
202
- /* Target directory (Default: document directory in app) */
203
- targetDirectory?: 'none' | 'custom' | 'document' | 'cache' | 'tmp' | DataLink
204
- /* Target directory (Default: document directory in app) */
205
- customTargetDirectory?: string | DataLink
206
- /* File path (If type is single) */
207
- path?: string | DataLink
208
- /* File encoding (If type is single) */
209
- encoding?: 'utf8' | 'base64' | DataLink
210
- /* URL (If type is single) */
211
- url?: string | DataLink
212
- /* Hash value */
213
- hash?: string | DataLink
214
- /* Hash type */
215
- hashType?: 'md5' | 'sha256' | 'sha1' | DataLink
216
- /* Request method */
217
- method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | DataLink
218
- /* Header */
219
- header?: {} | DataLink
220
- /* Fields */
221
- fields?: {} | DataLink
222
- /* File list (If type is multiple) */
223
- list?:
224
- | Array<
225
- | DataLink
226
- | {
227
- id?: string | DataLink
228
- path?: string | DataLink
229
- encoding?: 'utf8' | 'base64' | DataLink
230
- url?: string | DataLink
231
- hash?: string | DataLink
232
- hashType?: 'sha256' | 'sha1' | 'md5' | DataLink
233
- method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | DataLink
234
- header?: {} | DataLink
235
- fields?: {} | DataLink
236
- }
237
- >
238
- | DataLink
239
- /* Enable download (URL is required) */
240
- downloadEnabled?: boolean | DataLink
241
- /* Download load size limit */
242
- downloadLoadSizeLimit?: number | DataLink
243
- /* Download allow load size limit exceed */
244
- downloadAllowLoadSizeLimitExceed?: boolean | DataLink
245
- /* Download retry count */
246
- downloadRetryCount?: number | DataLink
247
- /* Download mode (if type is multiple) */
248
- downloadMode?: 'concurrent' | 'sequence' | DataLink
249
- /* Limit of download concurrent mode */
250
- downloadConcurrentLimit?: number | DataLink
251
- /* Download progress frequency */
252
- downloadProgressFrequency?: number | DataLink
253
- /* Enable upload (Path & URL is required) */
254
- uploadEnabled?: boolean | DataLink
255
- /* Upload retry count */
256
- uploadRetryCount?: number | DataLink
257
- /* Upload mode (if type is multiple) */
258
- uploadMode?: 'concurrent' | 'sequence' | DataLink
259
- /* Limit of upload concurrent mode */
260
- uploadConcurrentLimit?: number | DataLink
261
- /* Upload progress frequency */
262
- uploadProgressFrequency?: number | DataLink
263
- }
264
- events?: {
265
- /* On file handler init error */
266
- initError?: Array<EventAction<string & keyof TemplateEventPropsMap['File']['initError']>>
267
- /* On file status change */
268
- onFileStatusChange?: Array<
269
- EventAction<string & keyof TemplateEventPropsMap['File']['onFileStatusChange']>
270
- >
271
- /* On read stats error */
272
- onReadStatsError?: Array<
273
- EventAction<string & keyof TemplateEventPropsMap['File']['onReadStatsError']>
274
- >
275
- /* On read content error */
276
- onReadContentError?: Array<
277
- EventAction<string & keyof TemplateEventPropsMap['File']['onReadContentError']>
278
- >
279
- /* On read content error */
280
- onAppendContentError?: Array<
281
- EventAction<string & keyof TemplateEventPropsMap['File']['onAppendContentError']>
282
- >
283
- /* On write content error */
284
- onWriteContentError?: Array<
285
- EventAction<string & keyof TemplateEventPropsMap['File']['onWriteContentError']>
286
- >
287
- /* On upload progress */
288
- onUploadProgress?: Array<
289
- EventAction<string & keyof TemplateEventPropsMap['File']['onUploadProgress']>
290
- >
291
- /* On upload error */
292
- onUploadError?: Array<
293
- EventAction<string & keyof TemplateEventPropsMap['File']['onUploadError']>
294
- >
295
- /* On upload complete */
296
- onUploadComplete?: Array<
297
- EventAction<string & keyof TemplateEventPropsMap['File']['onUploadComplete']>
298
- >
299
- /* On upload all done */
300
- onUploadAllComplete?: Array<
301
- EventAction<string & keyof TemplateEventPropsMap['File']['onUploadAllComplete']>
302
- >
303
- /* On download progress */
304
- onDownloadProgress?: Array<
305
- EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadProgress']>
306
- >
307
- /* On download error */
308
- onDownloadError?: Array<
309
- EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadError']>
310
- >
311
- /* On download complete */
312
- onDownloadComplete?: Array<
313
- EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadComplete']>
314
- >
315
- /* On download all done */
316
- onDownloadAllComplete?: Array<
317
- EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadAllComplete']>
318
- >
319
- }
320
- outlets?: {
321
- /* File init error result will be stored in Data */
322
- initError?: () => Data<string>
323
- /* File read stats result will be stored in Data */
324
- readStats?: () => Data<{
325
- path?: string
326
- size?: number
327
- isDirectory?: boolean
328
- mtime?: string
329
- ctime?: string
330
- mode?: number
331
- originalFilepath?: string
332
- [key: string]: any
333
- }>
334
- /* File read content result will be stored in Data */
335
- readContent?: () => Data<any>
336
- /* File read details result will be stored in Data */
337
- readDetails?: () => Data<{
338
- path?: string
339
- content?: any
340
- size?: number
341
- exists?: boolean
342
- [key: string]: any
343
- }>
344
- /* File read error result will be stored in Data */
345
- readError?: () => Data<string>
346
- /* File append content result will be stored in Data */
347
- appendDetails?: () => Data<{
348
- path?: string
349
- appended?: boolean
350
- contentLength?: number
351
- [key: string]: any
352
- }>
353
- /* File append error result will be stored in Data */
354
- appendError?: () => Data<string>
355
- /* File write details result will be stored in Data */
356
- writeDetails?: () => Data<{
357
- path?: string
358
- written?: boolean
359
- contentLength?: number
360
- [key: string]: any
361
- }>
362
- /* File write error result will be stored in Data */
363
- writeError?: () => Data<string>
364
- /* File upload progress result will be stored in Data */
365
- uploadProgress?: () => Data<{
366
- id?: string
367
- path?: string
368
- uri?: string
369
- hash?: string
370
- hashType?: string
371
- headers?: { [key: string]: any }
372
- fields?: { [key: string]: any }
373
- method?: string
374
- progress?: number
375
- isLastUpdated?: boolean
376
- [key: string]: any
377
- }>
378
- /* File upload complete result will be stored in Data */
379
- uploadResult?: () => Data<any>
380
- /* File download progress result will be stored in Data */
381
- downloadProgress?: () => Data<{
382
- id?: string
383
- path?: string
384
- uri?: string
385
- hash?: string
386
- hashType?: string
387
- headers?: { [key: string]: any }
388
- fields?: { [key: string]: any }
389
- method?: string
390
- progress?: number
391
- isLastUpdated?: boolean
392
- [key: string]: any
393
- }>
394
- /* File download complete result will be stored in Data */
395
- downloadResult?: () => Data<any>
396
- }
397
- }
398
-
399
- /* File system operations: read, write, copy, delete, and list files */
400
- export type GeneratorFile = Generator &
401
- GeneratorFileDef & {
402
- templateKey: 'GENERATOR_FILE'
403
- switches?: Array<
404
- SwitchDef &
405
- GeneratorFileDef & {
406
- conds?: Array<{
407
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
408
- cond:
409
- | SwitchCondInnerStateCurrentCanvas
410
- | SwitchCondData
411
- | {
412
- __typename: 'SwitchCondInnerStateOutlet'
413
- outlet:
414
- | 'initError'
415
- | 'readStats'
416
- | 'readContent'
417
- | 'readDetails'
418
- | 'readError'
419
- | 'appendDetails'
420
- | 'appendError'
421
- | 'writeDetails'
422
- | 'writeError'
423
- | 'uploadProgress'
424
- | 'uploadResult'
425
- | 'downloadProgress'
426
- | 'downloadResult'
427
- value: any
428
- }
429
- }>
430
- }
431
- >
432
- }