@fugood/bricks-project 2.24.0-beta.17 → 2.24.0-beta.19

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 (75) hide show
  1. package/compile/index.ts +5 -0
  2. package/package.json +3 -3
  3. package/types/bricks/Camera.ts +32 -5
  4. package/types/bricks/GenerativeMedia.ts +5 -5
  5. package/types/bricks/Icon.ts +2 -2
  6. package/types/bricks/Image.ts +2 -2
  7. package/types/bricks/Items.ts +6 -6
  8. package/types/bricks/Lottie.ts +2 -2
  9. package/types/bricks/Maps.ts +2 -2
  10. package/types/bricks/QrCode.ts +2 -2
  11. package/types/bricks/Rect.ts +2 -2
  12. package/types/bricks/RichText.ts +2 -2
  13. package/types/bricks/Svg.ts +2 -2
  14. package/types/bricks/Text.ts +2 -2
  15. package/types/bricks/TextInput.ts +9 -5
  16. package/types/bricks/Video.ts +2 -2
  17. package/types/bricks/VideoStreaming.ts +2 -2
  18. package/types/bricks/WebView.ts +2 -2
  19. package/types/generators/AlarmClock.ts +4 -4
  20. package/types/generators/Assistant.ts +52 -7
  21. package/types/generators/BleCentral.ts +11 -3
  22. package/types/generators/BlePeripheral.ts +3 -3
  23. package/types/generators/CanvasMap.ts +3 -3
  24. package/types/generators/CastlesPay.ts +2 -2
  25. package/types/generators/DataBank.ts +29 -2
  26. package/types/generators/File.ts +62 -13
  27. package/types/generators/GraphQl.ts +2 -2
  28. package/types/generators/Http.ts +25 -6
  29. package/types/generators/HttpServer.ts +4 -4
  30. package/types/generators/Information.ts +1 -1
  31. package/types/generators/Intent.ts +7 -1
  32. package/types/generators/Iterator.ts +5 -5
  33. package/types/generators/Keyboard.ts +15 -5
  34. package/types/generators/LlmAnthropicCompat.ts +9 -3
  35. package/types/generators/LlmAppleBuiltin.ts +4 -4
  36. package/types/generators/LlmGgml.ts +63 -13
  37. package/types/generators/LlmMlx.ts +5 -5
  38. package/types/generators/LlmOnnx.ts +13 -4
  39. package/types/generators/LlmOpenAiCompat.ts +19 -3
  40. package/types/generators/LlmQualcommAiEngine.ts +29 -5
  41. package/types/generators/Mcp.ts +331 -16
  42. package/types/generators/McpServer.ts +34 -7
  43. package/types/generators/MediaFlow.ts +24 -6
  44. package/types/generators/MqttBroker.ts +9 -3
  45. package/types/generators/MqttClient.ts +10 -4
  46. package/types/generators/Question.ts +4 -4
  47. package/types/generators/RealtimeTranscription.ts +69 -10
  48. package/types/generators/RerankerGgml.ts +19 -5
  49. package/types/generators/SerialPort.ts +5 -5
  50. package/types/generators/SoundPlayer.ts +1 -1
  51. package/types/generators/SoundRecorder.ts +4 -4
  52. package/types/generators/SpeechToTextGgml.ts +27 -7
  53. package/types/generators/SpeechToTextOnnx.ts +3 -3
  54. package/types/generators/SpeechToTextPlatform.ts +3 -3
  55. package/types/generators/SqLite.ts +9 -5
  56. package/types/generators/Step.ts +2 -2
  57. package/types/generators/SttAppleBuiltin.ts +4 -4
  58. package/types/generators/Tcp.ts +3 -3
  59. package/types/generators/TcpServer.ts +5 -5
  60. package/types/generators/TextToSpeechAppleBuiltin.ts +3 -3
  61. package/types/generators/TextToSpeechGgml.ts +3 -3
  62. package/types/generators/TextToSpeechOnnx.ts +3 -3
  63. package/types/generators/TextToSpeechOpenAiLike.ts +3 -3
  64. package/types/generators/ThermalPrinter.ts +4 -4
  65. package/types/generators/Tick.ts +2 -2
  66. package/types/generators/Udp.ts +8 -3
  67. package/types/generators/VadGgml.ts +34 -5
  68. package/types/generators/VadOnnx.ts +27 -4
  69. package/types/generators/VadTraditional.ts +13 -7
  70. package/types/generators/VectorStore.ts +22 -5
  71. package/types/generators/Watchdog.ts +10 -5
  72. package/types/generators/WebCrawler.ts +3 -3
  73. package/types/generators/WebRtc.ts +14 -8
  74. package/types/generators/WebSocket.ts +4 -4
  75. package/utils/event-props.ts +89 -88
package/compile/index.ts CHANGED
@@ -1217,3 +1217,8 @@ export const compile = async (app: Application) => {
1217
1217
  }
1218
1218
  return config
1219
1219
  }
1220
+
1221
+ export const checkConfig = async (configPath: string) => {
1222
+ const { $ } = await import('bun')
1223
+ await $`bricks app check-config ${configPath}`
1224
+ }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.24.0-beta.17",
3
+ "version": "2.24.0-beta.19",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "typecheck": "tsc --noEmit",
7
7
  "build": "bun scripts/build.js"
8
8
  },
9
9
  "dependencies": {
10
- "@fugood/bricks-cli": "^2.24.0-beta.17",
10
+ "@fugood/bricks-cli": "^2.24.0-beta.19",
11
11
  "@huggingface/gguf": "^0.3.2",
12
12
  "@iarna/toml": "^3.0.0",
13
13
  "@modelcontextprotocol/sdk": "^1.15.0",
@@ -24,5 +24,5 @@
24
24
  "peerDependencies": {
25
25
  "oxfmt": "^0.36.0"
26
26
  },
27
- "gitHead": "d99917a2e6eacce97d527fee3c2d6c5bbdcfeef5"
27
+ "gitHead": "17d967ae3718529b5b47e76b800874bcb2b22277"
28
28
  }
@@ -167,15 +167,42 @@ Default property:
167
167
  }
168
168
  outlets?: {
169
169
  /* Camera device and format information */
170
- info?: () => Data
170
+ info?: () => Data<{ [key: string]: any }>
171
171
  /* Picture taken result */
172
- pictureTaken?: () => Data
172
+ pictureTaken?: () => Data<{
173
+ width?: number
174
+ height?: number
175
+ uri?: string
176
+ base64?: string
177
+ [key: string]: any
178
+ }>
173
179
  /* Record video result */
174
- recordVideo?: () => Data
180
+ recordVideo?: () => Data<{
181
+ uri?: string
182
+ [key: string]: any
183
+ }>
175
184
  /* Barcode read result */
176
- barcodeRead?: () => Data
185
+ barcodeRead?: () => Data<{
186
+ type?: string
187
+ data?: string
188
+ rawData?: string
189
+ bounds?: {
190
+ origin?: {
191
+ x?: number
192
+ y?: number
193
+ [key: string]: any
194
+ }
195
+ size?: {
196
+ width?: number
197
+ height?: number
198
+ [key: string]: any
199
+ }
200
+ [key: string]: any
201
+ }
202
+ [key: string]: any
203
+ }>
177
204
  /* Faces detected result */
178
- faceDetected?: () => Data
205
+ faceDetected?: () => Data<Array<{ [key: string]: any }>>
179
206
  }
180
207
  animation?: AnimationBasicEvents & {
181
208
  stateChange?: Animation
@@ -209,15 +209,15 @@ Default property:
209
209
  }
210
210
  outlets?: {
211
211
  /* Brick is pressing */
212
- brickPressing?: () => Data
212
+ brickPressing?: () => Data<boolean>
213
213
  /* Brick is focusing (Use TV Device with controller) */
214
- brickFocusing?: () => Data
214
+ brickFocusing?: () => Data<boolean>
215
215
  /* Generated media URL */
216
- url?: () => Data
216
+ url?: () => Data<string>
217
217
  /* Generated media error */
218
- error?: () => Data
218
+ error?: () => Data<string>
219
219
  /* Loading state */
220
- loading?: () => Data
220
+ loading?: () => Data<boolean>
221
221
  }
222
222
  animation?: AnimationBasicEvents & {
223
223
  generativeMediaOnPress?: Animation
@@ -57,9 +57,9 @@ Default property:
57
57
  }
58
58
  outlets?: {
59
59
  /* Brick is pressing */
60
- brickPressing?: () => Data
60
+ brickPressing?: () => Data<boolean>
61
61
  /* Brick is focusing (Use TV Device with controller) */
62
- brickFocusing?: () => Data
62
+ brickFocusing?: () => Data<boolean>
63
63
  }
64
64
  animation?: AnimationBasicEvents & {
65
65
  onPress?: Animation
@@ -71,9 +71,9 @@ Default property:
71
71
  }
72
72
  outlets?: {
73
73
  /* Brick is pressing */
74
- brickPressing?: () => Data
74
+ brickPressing?: () => Data<boolean>
75
75
  /* Brick is focusing (Use TV Device with controller) */
76
- brickFocusing?: () => Data
76
+ brickFocusing?: () => Data<boolean>
77
77
  }
78
78
  animation?: AnimationBasicEvents & {
79
79
  onPress?: Animation
@@ -411,17 +411,17 @@ Default property:
411
411
  }
412
412
  outlets?: {
413
413
  /* Catched error message */
414
- error?: () => Data
414
+ error?: () => Data<string>
415
415
  /* Current render mode */
416
- mode?: () => Data
416
+ mode?: () => Data<string>
417
417
  /* Current page index */
418
- pageIndex?: () => Data
418
+ pageIndex?: () => Data<number>
419
419
  /* Current page size */
420
- pageSize?: () => Data
420
+ pageSize?: () => Data<number>
421
421
  /* Selected item index of detail mode */
422
- selectedItemIndex?: () => Data
422
+ selectedItemIndex?: () => Data<number>
423
423
  /* Page is out of bound */
424
- pageIsOutOfBound?: () => Data
424
+ pageIsOutOfBound?: () => Data<boolean>
425
425
  }
426
426
  animation?: AnimationBasicEvents & {
427
427
  onPageRender?: Animation
@@ -120,9 +120,9 @@ Default property:
120
120
  }
121
121
  outlets?: {
122
122
  /* Brick is pressing */
123
- brickPressing?: () => Data
123
+ brickPressing?: () => Data<boolean>
124
124
  /* Brick is focusing (Use TV Device with controller) */
125
- brickFocusing?: () => Data
125
+ brickFocusing?: () => Data<boolean>
126
126
  }
127
127
  animation?: AnimationBasicEvents & {
128
128
  onPress?: Animation
@@ -213,9 +213,9 @@ Default property:
213
213
  }
214
214
  outlets?: {
215
215
  /* Brick is pressing */
216
- brickPressing?: () => Data
216
+ brickPressing?: () => Data<boolean>
217
217
  /* Brick is focusing (Use TV Device with controller) */
218
- brickFocusing?: () => Data
218
+ brickFocusing?: () => Data<boolean>
219
219
  }
220
220
  animation?: AnimationBasicEvents & {
221
221
  onPress?: Animation
@@ -76,9 +76,9 @@ Default property:
76
76
  }
77
77
  outlets?: {
78
78
  /* Brick is pressing */
79
- brickPressing?: () => Data
79
+ brickPressing?: () => Data<boolean>
80
80
  /* Brick is focusing (Use TV Device with controller) */
81
- brickFocusing?: () => Data
81
+ brickFocusing?: () => Data<boolean>
82
82
  }
83
83
  animation?: AnimationBasicEvents & {
84
84
  onPress?: Animation
@@ -74,9 +74,9 @@ Default property:
74
74
  }
75
75
  outlets?: {
76
76
  /* Brick is pressing */
77
- brickPressing?: () => Data
77
+ brickPressing?: () => Data<boolean>
78
78
  /* Brick is focusing (Use TV Device with controller) */
79
- brickFocusing?: () => Data
79
+ brickFocusing?: () => Data<boolean>
80
80
  }
81
81
  animation?: AnimationBasicEvents & {
82
82
  onPress?: Animation
@@ -87,9 +87,9 @@ Default property:
87
87
  }
88
88
  outlets?: {
89
89
  /* Brick is pressing */
90
- brickPressing?: () => Data
90
+ brickPressing?: () => Data<boolean>
91
91
  /* Brick is focusing (Use TV Device with controller) */
92
- brickFocusing?: () => Data
92
+ brickFocusing?: () => Data<boolean>
93
93
  }
94
94
  animation?: AnimationBasicEvents & {
95
95
  onPress?: Animation
@@ -58,9 +58,9 @@ Default property:
58
58
  }
59
59
  outlets?: {
60
60
  /* Brick is pressing */
61
- brickPressing?: () => Data
61
+ brickPressing?: () => Data<boolean>
62
62
  /* Brick is focusing (Use TV Device with controller) */
63
- brickFocusing?: () => Data
63
+ brickFocusing?: () => Data<boolean>
64
64
  }
65
65
  animation?: AnimationBasicEvents & {
66
66
  onPress?: Animation
@@ -105,9 +105,9 @@ Default property:
105
105
  }
106
106
  outlets?: {
107
107
  /* Brick is pressing */
108
- brickPressing?: () => Data
108
+ brickPressing?: () => Data<boolean>
109
109
  /* Brick is focusing (Use TV Device with controller) */
110
- brickFocusing?: () => Data
110
+ brickFocusing?: () => Data<boolean>
111
111
  }
112
112
  animation?: AnimationBasicEvents & {
113
113
  onPress?: Animation
@@ -186,15 +186,19 @@ Default property:
186
186
  }
187
187
  outlets?: {
188
188
  /* The raw input */
189
- rawInput?: () => Data
189
+ rawInput?: () => Data<any>
190
190
  /* The regex result */
191
- resultVariable?: () => Data
191
+ resultVariable?: () => Data<{ [key: string]: any }>
192
192
  /* Last key in */
193
- lastKey?: () => Data
193
+ lastKey?: () => Data<any>
194
194
  /* Selection of the TextInput (start, end, text) */
195
- selection?: () => Data
195
+ selection?: () => Data<{
196
+ start?: number
197
+ end?: number
198
+ text?: string
199
+ }>
196
200
  /* Selection text of the TextInput */
197
- selectionText?: () => Data
201
+ selectionText?: () => Data<string>
198
202
  }
199
203
  animation?: AnimationBasicEvents & {
200
204
  onFocus?: Animation
@@ -129,9 +129,9 @@ Default property:
129
129
  }
130
130
  outlets?: {
131
131
  /* Brick is pressing */
132
- brickPressing?: () => Data
132
+ brickPressing?: () => Data<boolean>
133
133
  /* Brick is focusing (Use TV Device with controller) */
134
- brickFocusing?: () => Data
134
+ brickFocusing?: () => Data<boolean>
135
135
  }
136
136
  animation?: AnimationBasicEvents & {
137
137
  onPress?: Animation
@@ -68,9 +68,9 @@ Default property:
68
68
  }
69
69
  outlets?: {
70
70
  /* Brick is pressing */
71
- brickPressing?: () => Data
71
+ brickPressing?: () => Data<boolean>
72
72
  /* Brick is focusing (Use TV Device with controller) */
73
- brickFocusing?: () => Data
73
+ brickFocusing?: () => Data<boolean>
74
74
  }
75
75
  animation?: AnimationBasicEvents & {
76
76
  onPress?: Animation
@@ -130,9 +130,9 @@ Default property:
130
130
  }
131
131
  outlets?: {
132
132
  /* The result of the query selector action */
133
- queryResult?: () => Data
133
+ queryResult?: () => Data<any>
134
134
  /* The error of the query selector action */
135
- queryError?: () => Data
135
+ queryError?: () => Data<string>
136
136
  }
137
137
  animation?: AnimationBasicEvents & {
138
138
  onLoad?: Animation
@@ -71,13 +71,13 @@ Default property:
71
71
  }
72
72
  outlets?: {
73
73
  /* Current time of each alarm clock trig */
74
- trigTime?: () => Data
74
+ trigTime?: () => Data<string>
75
75
  /* Current timestamp (unix time) of each alarm clock trig */
76
- trigTimestamp?: () => Data
76
+ trigTimestamp?: () => Data<string | number>
77
77
  /* Count of alarm clock trigs */
78
- trigCount?: () => Data
78
+ trigCount?: () => Data<string | number>
79
79
  /* Is alarm clock running? */
80
- running?: () => Data
80
+ running?: () => Data<boolean | string | number>
81
81
  }
82
82
  }
83
83
 
@@ -524,19 +524,64 @@ Default property:
524
524
  }
525
525
  outlets?: {
526
526
  /* Whether the assistant is heating up */
527
- isHeatingUp?: () => Data
527
+ isHeatingUp?: () => Data<boolean>
528
528
  /* Whether the assistant is file processing */
529
- isFileProcessing?: () => Data
529
+ isFileProcessing?: () => Data<boolean>
530
530
  /* Whether the assistant is responding */
531
- isResponding?: () => Data
531
+ isResponding?: () => Data<boolean>
532
532
  /* Whether the assistant is busy */
533
- isBusy?: () => Data
533
+ isBusy?: () => Data<boolean>
534
534
  /* Embedding files of the assistant */
535
- files?: () => Data
535
+ files?: () => Data<Array<any>>
536
536
  /* Messages of the assistant */
537
- messages?: () => Data
537
+ messages?: () => Data<
538
+ Array<{
539
+ role?: string
540
+ name?: string
541
+ content?: any
542
+ tool_call_id?: string
543
+ tool_calls?: Array<{
544
+ id?: string
545
+ type?: string
546
+ function?: {
547
+ name?: string
548
+ arguments?: string
549
+ [key: string]: any
550
+ }
551
+ [key: string]: any
552
+ }>
553
+ reasoning_content?: string
554
+ audio?: {
555
+ generating?: boolean
556
+ [key: string]: any
557
+ }
558
+ last_generated_at?: number
559
+ responding?: boolean
560
+ is_summary?: boolean
561
+ summary_created_at?: number
562
+ [key: string]: any
563
+ }>
564
+ >
538
565
  /* MCP servers status and available tools */
539
- mcpServers?: () => Data
566
+ mcpServers?: () => Data<
567
+ Array<{
568
+ generatorId?: string
569
+ generatorKey?: string
570
+ name?: string
571
+ version?: string
572
+ connected?: boolean
573
+ error?: string
574
+ resources?: Array<{
575
+ name?: string
576
+ [key: string]: any
577
+ }>
578
+ tools?: Array<{
579
+ name?: string
580
+ [key: string]: any
581
+ }>
582
+ [key: string]: any
583
+ }>
584
+ >
540
585
  }
541
586
  }
542
587
 
@@ -196,11 +196,19 @@ Default property:
196
196
  }
197
197
  outlets?: {
198
198
  /* Is scaning */
199
- isScaning?: () => Data
199
+ isScaning?: () => Data<boolean>
200
200
  /* Discovered device list */
201
- discoveredDeviceList?: () => Data
201
+ discoveredDeviceList?: () => Data<
202
+ Array<{
203
+ id?: string
204
+ name?: string
205
+ rssi?: number
206
+ advertising?: { [key: string]: any }
207
+ [key: string]: any
208
+ }>
209
+ >
202
210
  /* Error message */
203
- errorMessage?: () => Data
211
+ errorMessage?: () => Data<string>
204
212
  }
205
213
  }
206
214
 
@@ -173,11 +173,11 @@ Default property:
173
173
  events?: {}
174
174
  outlets?: {
175
175
  /* Is advertising */
176
- isAdvertising?: () => Data
176
+ isAdvertising?: () => Data<boolean>
177
177
  /* Last receive written */
178
- lastWrite?: () => Data
178
+ lastWrite?: () => Data<{ [key: string]: any }>
179
179
  /* Error message */
180
- errorMessage?: () => Data
180
+ errorMessage?: () => Data<string>
181
181
  }
182
182
  }
183
183
 
@@ -39,11 +39,11 @@ Default property:
39
39
  }
40
40
  outlets?: {
41
41
  /* Last matched trigger rule that caused canvas navigation */
42
- lastMatchedRule?: () => Data
42
+ lastMatchedRule?: () => Data<{ [key: string]: any }>
43
43
  /* Index of the last matched rule in triggerList */
44
- lastMatchedIndex?: () => Data
44
+ lastMatchedIndex?: () => Data<number>
45
45
  /* Total count of canvas navigations triggered by this generator */
46
- navigationCount?: () => Data
46
+ navigationCount?: () => Data<number>
47
47
  }
48
48
  }
49
49
 
@@ -50,9 +50,9 @@ Default property:
50
50
  }
51
51
  outlets?: {
52
52
  /* Last Transaction Result */
53
- lastTransactionResult?: () => Data
53
+ lastTransactionResult?: () => Data<{ [key: string]: any }>
54
54
  /* Last Error */
55
- lastError?: () => Data
55
+ lastError?: () => Data<string>
56
56
  }
57
57
  }
58
58
 
@@ -96,9 +96,36 @@ Default property:
96
96
  }
97
97
  outlets?: {
98
98
  /* Response for Data Bank fetch request, it will save to Data */
99
- response?: () => Data
99
+ response?: () => Data<
100
+ Array<{
101
+ __typename?: string
102
+ id?: string
103
+ createAt?: string
104
+ updateAt?: string
105
+ spaceId?: string
106
+ propertyId?: string
107
+ definition?: {
108
+ type?: string
109
+ title?: string
110
+ schema?: { [key: string]: any }
111
+ [key: string]: any
112
+ }
113
+ meta?: string
114
+ value?: any
115
+ lastUpdateHash?: string
116
+ lastUpdateNote?: string
117
+ lastUpdateKey?: {
118
+ name?: string
119
+ enable_expired?: boolean
120
+ expired_at?: any
121
+ jwt?: boolean
122
+ [key: string]: any
123
+ }
124
+ [key: string]: any
125
+ }>
126
+ >
100
127
  /* Server response error of Data Bank fetch request, it will save to Data */
101
- error?: () => Data
128
+ error?: () => Data<string>
102
129
  }
103
130
  }
104
131
 
@@ -289,31 +289,80 @@ Default property:
289
289
  }
290
290
  outlets?: {
291
291
  /* File init error result will be stored in Data */
292
- initError?: () => Data
292
+ initError?: () => Data<string>
293
293
  /* File read stats result will be stored in Data */
294
- readStats?: () => Data
294
+ readStats?: () => Data<{
295
+ path?: string
296
+ size?: number
297
+ isDirectory?: boolean
298
+ mtime?: string
299
+ ctime?: string
300
+ mode?: number
301
+ originalFilepath?: string
302
+ [key: string]: any
303
+ }>
295
304
  /* File read content result will be stored in Data */
296
- readContent?: () => Data
305
+ readContent?: () => Data<any>
297
306
  /* File read details result will be stored in Data */
298
- readDetails?: () => Data
307
+ readDetails?: () => Data<{
308
+ path?: string
309
+ content?: any
310
+ size?: number
311
+ exists?: boolean
312
+ [key: string]: any
313
+ }>
299
314
  /* File read error result will be stored in Data */
300
- readError?: () => Data
315
+ readError?: () => Data<string>
301
316
  /* File append content result will be stored in Data */
302
- appendDetails?: () => Data
317
+ appendDetails?: () => Data<{
318
+ path?: string
319
+ appended?: boolean
320
+ contentLength?: number
321
+ [key: string]: any
322
+ }>
303
323
  /* File append error result will be stored in Data */
304
- appendError?: () => Data
324
+ appendError?: () => Data<string>
305
325
  /* File write details result will be stored in Data */
306
- writeDetails?: () => Data
326
+ writeDetails?: () => Data<{
327
+ path?: string
328
+ written?: boolean
329
+ contentLength?: number
330
+ [key: string]: any
331
+ }>
307
332
  /* File write error result will be stored in Data */
308
- writeError?: () => Data
333
+ writeError?: () => Data<string>
309
334
  /* File upload progress result will be stored in Data */
310
- uploadProgress?: () => Data
335
+ uploadProgress?: () => Data<{
336
+ id?: string
337
+ path?: string
338
+ uri?: string
339
+ hash?: string
340
+ hashType?: string
341
+ headers?: { [key: string]: any }
342
+ fields?: { [key: string]: any }
343
+ method?: string
344
+ progress?: number
345
+ isLastUpdated?: boolean
346
+ [key: string]: any
347
+ }>
311
348
  /* File upload complete result will be stored in Data */
312
- uploadResult?: () => Data
349
+ uploadResult?: () => Data<any>
313
350
  /* File download progress result will be stored in Data */
314
- downloadProgress?: () => Data
351
+ downloadProgress?: () => Data<{
352
+ id?: string
353
+ path?: string
354
+ uri?: string
355
+ hash?: string
356
+ hashType?: string
357
+ headers?: { [key: string]: any }
358
+ fields?: { [key: string]: any }
359
+ method?: string
360
+ progress?: number
361
+ isLastUpdated?: boolean
362
+ [key: string]: any
363
+ }>
315
364
  /* File download complete result will be stored in Data */
316
- downloadResult?: () => Data
365
+ downloadResult?: () => Data<any>
317
366
  }
318
367
  }
319
368
 
@@ -97,9 +97,9 @@ Default property:
97
97
  }
98
98
  outlets?: {
99
99
  /* Response for GraphQL request, it will save to Data */
100
- response?: () => Data
100
+ response?: () => Data<{ [key: string]: any }>
101
101
  /* Server response error of GraphQL request, it will save to Data */
102
- error?: () => Data
102
+ error?: () => Data<string>
103
103
  }
104
104
  }
105
105
 
@@ -156,17 +156,36 @@ Default property:
156
156
  events?: {}
157
157
  outlets?: {
158
158
  /* Response for HTTP request */
159
- response?: () => Data
159
+ response?: () => Data<string | { [key: string]: any }>
160
160
  /* Response details for HTTP request */
161
- responseDetails?: () => Data
161
+ responseDetails?: () => Data<{
162
+ ok?: boolean
163
+ redirected?: boolean
164
+ type?: string
165
+ status?: number
166
+ statusText?: string
167
+ headers?: { [key: string]: any }
168
+ body?: any
169
+ event?: string
170
+ id?: string
171
+ data?: any
172
+ [key: string]: any
173
+ }>
162
174
  /* All received data from event stream */
163
- eventLog?: () => Data
175
+ eventLog?: () => Data<Array<any>>
164
176
  /* All received event details from event stream */
165
- eventLogDetails?: () => Data
177
+ eventLogDetails?: () => Data<
178
+ Array<{
179
+ event?: string
180
+ id?: string
181
+ data?: any
182
+ [key: string]: any
183
+ }>
184
+ >
166
185
  /* EventSource state */
167
- sseState?: () => Data
186
+ sseState?: () => Data<string>
168
187
  /* Server response error of HTTP request */
169
- error?: () => Data
188
+ error?: () => Data<string>
170
189
  }
171
190
  }
172
191