@fugood/bricks-project 2.22.0-beta.26 → 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 -8627
|
@@ -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
|
+
/* Start fetcn Media box file list */
|
|
13
|
+
export type GeneratorMediaFlowActionFetch = Action & {
|
|
14
|
+
__actionName: 'GENERATOR_MEDIA_FLOW_FETCH'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Reset cache */
|
|
18
|
+
export type GeneratorMediaFlowActionResetCache = Action & {
|
|
19
|
+
__actionName: 'GENERATOR_MEDIA_FLOW_RESET_CACHE'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Abort current fetch request of media list */
|
|
23
|
+
export type GeneratorMediaFlowActionAbortFetch = Action & {
|
|
24
|
+
__actionName: 'GENERATOR_MEDIA_FLOW_ABORT_FETCH'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface GeneratorMediaFlowDef {
|
|
28
|
+
/*
|
|
29
|
+
Default property:
|
|
30
|
+
{
|
|
31
|
+
"includeTypes": [
|
|
32
|
+
"IMAGE",
|
|
33
|
+
"VIDEO",
|
|
34
|
+
"AUDIO",
|
|
35
|
+
"FILE"
|
|
36
|
+
],
|
|
37
|
+
"fetchPolicy": "cache-first",
|
|
38
|
+
"subscribeBoxChange": false,
|
|
39
|
+
"saveToStorageDownloadMode": "sequence",
|
|
40
|
+
"loadSizeLimit": "",
|
|
41
|
+
"allowLoadSizeLimitExceed": true,
|
|
42
|
+
"source": "original",
|
|
43
|
+
"sourceVersionAlternatives": []
|
|
44
|
+
}
|
|
45
|
+
*/
|
|
46
|
+
property?: {
|
|
47
|
+
/* The box id of Media Flow */
|
|
48
|
+
boxId?: string | DataLink
|
|
49
|
+
/* Authorize accessToken, use `passcode` if `accessToken` is empty */
|
|
50
|
+
accessToken?: string | DataLink
|
|
51
|
+
/* Authorize passcode */
|
|
52
|
+
passcode?: string | DataLink
|
|
53
|
+
/* Include File Types */
|
|
54
|
+
includeTypes?: Array<'IMAGE' | 'VIDEO' | 'AUDIO' | 'FILE' | DataLink> | DataLink
|
|
55
|
+
/* Determine the cache behavior
|
|
56
|
+
|
|
57
|
+
cache-first: Cache first if existing, then fetch from network
|
|
58
|
+
network-and-cache: Fetch from network, then save cache
|
|
59
|
+
network-only: Fetch from network only */
|
|
60
|
+
fetchPolicy?: 'cache-first' | 'network-and-cache' | 'network-only' | DataLink
|
|
61
|
+
/* Subscribe box change to refresh file list (file deleted / new file uploaded) */
|
|
62
|
+
subscribeBoxChange?: boolean | DataLink
|
|
63
|
+
/* Save files into local file storage */
|
|
64
|
+
saveToStorage?: boolean | DataLink
|
|
65
|
+
/* Concurrent download files or sequence for saveToStorage */
|
|
66
|
+
saveToStorageDownloadMode?: 'sequence' | 'concurrent' | DataLink
|
|
67
|
+
/* Limit the load size (* GB, * MB, * KB) */
|
|
68
|
+
loadSizeLimit?: string | DataLink
|
|
69
|
+
/* Allow Load size limit exceed, just call event */
|
|
70
|
+
allowLoadSizeLimitExceed?: boolean | DataLink
|
|
71
|
+
/* Select download source */
|
|
72
|
+
source?:
|
|
73
|
+
| 'original'
|
|
74
|
+
| 'auto'
|
|
75
|
+
| 'converted'
|
|
76
|
+
| 'video-thumbnail-original'
|
|
77
|
+
| 'use-source-versions'
|
|
78
|
+
| DataLink
|
|
79
|
+
/* Select download source with image version (use width, e.g. [250, 360]) */
|
|
80
|
+
sourceVersionAlternatives?: Array<number | DataLink> | DataLink
|
|
81
|
+
/* Allowlist patterns to filter media files (supports regex or plain text) */
|
|
82
|
+
allowlist?: Array<string | DataLink> | DataLink
|
|
83
|
+
/* Blocklist patterns to filter media files (supports regex or plain text) */
|
|
84
|
+
blocklist?: Array<string | DataLink> | DataLink
|
|
85
|
+
}
|
|
86
|
+
events?: {
|
|
87
|
+
/* Event of media box fetch error */
|
|
88
|
+
fetchError?: Array<EventAction>
|
|
89
|
+
/* Event of subscribe box change connected (If set `Subscribe Box Change`) */
|
|
90
|
+
subscribeBoxConnect?: Array<EventAction>
|
|
91
|
+
/* Event of subscribe box change error (If set `Subscribe Box Change`) */
|
|
92
|
+
subscribeBoxError?: Array<EventAction>
|
|
93
|
+
/* Event of subscribe box change connection error (If set `Subscribe Box Change`) */
|
|
94
|
+
subscribeBoxConnectError?: Array<EventAction>
|
|
95
|
+
/* Event of file sync completed for used `saveToStorage` */
|
|
96
|
+
saveStorageCompleted?: Array<EventAction>
|
|
97
|
+
/* Event when file list size exceed of Load size limit */
|
|
98
|
+
fileSizeExceed?: Array<EventAction>
|
|
99
|
+
}
|
|
100
|
+
outlets?: {
|
|
101
|
+
/* File sync status */
|
|
102
|
+
downloadStatus?: () => Data
|
|
103
|
+
/* File sync progress */
|
|
104
|
+
downloadProgress?: () => Data
|
|
105
|
+
/* File sync download errors */
|
|
106
|
+
downloadErrors?: () => Data
|
|
107
|
+
/* Media box info */
|
|
108
|
+
box?: () => Data
|
|
109
|
+
/* Save Media Flow fetch result [ { "url": "https://d1kk0369g9vrck.cloudfront.net/box/5b431e29efd40c01e8b2019c/photo5b431e37efd40c01e8b201d1" "extension": "", // enum("jpg", "png", "mp4") "id": "5b431e37efd40c01e8b201d1", "md5": "6134ab412351651324" // md5 came from media resource api } ] */
|
|
110
|
+
result?: () => Data
|
|
111
|
+
/* File sync result [ { "url": "/storage/emulated/0/Download/SyncFolder/Asset/1.png", "mediaType": "photo" // enum("photo", "video"), used to distingiush "id": "", } ] */
|
|
112
|
+
downloadFileUrls?: () => Data
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Fetch box's file list from Media Flow */
|
|
117
|
+
export type GeneratorMediaFlow = Generator &
|
|
118
|
+
GeneratorMediaFlowDef & {
|
|
119
|
+
templateKey: 'GENERATOR_MEDIA_FLOW'
|
|
120
|
+
switches: Array<
|
|
121
|
+
SwitchDef &
|
|
122
|
+
GeneratorMediaFlowDef & {
|
|
123
|
+
conds?: Array<{
|
|
124
|
+
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
125
|
+
cond:
|
|
126
|
+
| SwitchCondInnerStateCurrentCanvas
|
|
127
|
+
| SwitchCondData
|
|
128
|
+
| {
|
|
129
|
+
__typename: 'SwitchCondInnerStateOutlet'
|
|
130
|
+
outlet:
|
|
131
|
+
| 'downloadStatus'
|
|
132
|
+
| 'downloadProgress'
|
|
133
|
+
| 'downloadErrors'
|
|
134
|
+
| 'box'
|
|
135
|
+
| 'result'
|
|
136
|
+
| 'downloadFileUrls'
|
|
137
|
+
value: any
|
|
138
|
+
}
|
|
139
|
+
}>
|
|
140
|
+
}
|
|
141
|
+
>
|
|
142
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
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 to MQTT broker */
|
|
13
|
+
export type GeneratorMQTTActionConnect = Action & {
|
|
14
|
+
__actionName: 'GENERATOR_MQTT_CONNECT'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Disconnect from MQTT broker */
|
|
18
|
+
export type GeneratorMQTTActionDisconnect = Action & {
|
|
19
|
+
__actionName: 'GENERATOR_MQTT_DISCONNECT'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Send message to MQTT broker */
|
|
23
|
+
export type GeneratorMQTTActionPublish = ActionWithParams & {
|
|
24
|
+
__actionName: 'GENERATOR_MQTT_PUBLISH'
|
|
25
|
+
params?: Array<
|
|
26
|
+
| {
|
|
27
|
+
input: 'topic'
|
|
28
|
+
value?: string | DataLink | EventProperty
|
|
29
|
+
mapping?: string
|
|
30
|
+
}
|
|
31
|
+
| {
|
|
32
|
+
input: 'payload'
|
|
33
|
+
value?: any | EventProperty
|
|
34
|
+
mapping?: string
|
|
35
|
+
}
|
|
36
|
+
| {
|
|
37
|
+
input: 'qos'
|
|
38
|
+
value?: '0' | '1' | '2' | DataLink | EventProperty
|
|
39
|
+
mapping?: string
|
|
40
|
+
}
|
|
41
|
+
| {
|
|
42
|
+
input: 'retain'
|
|
43
|
+
value?: boolean | DataLink | EventProperty
|
|
44
|
+
mapping?: string
|
|
45
|
+
}
|
|
46
|
+
>
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface GeneratorMQTTDef {
|
|
50
|
+
/*
|
|
51
|
+
Default property:
|
|
52
|
+
{
|
|
53
|
+
"init": false,
|
|
54
|
+
"auth": false,
|
|
55
|
+
"autoReconnect": true,
|
|
56
|
+
"autoReconnectAttemptTime": 1000,
|
|
57
|
+
"qos": "0",
|
|
58
|
+
"messageType": "text"
|
|
59
|
+
}
|
|
60
|
+
*/
|
|
61
|
+
property?: {
|
|
62
|
+
/* Auto connect when generator start */
|
|
63
|
+
init?: boolean | DataLink
|
|
64
|
+
/* Broker endpoint (mqtt://) */
|
|
65
|
+
uri?: string | DataLink
|
|
66
|
+
/* Broker need auth or not, if set false will ignore username and password setting */
|
|
67
|
+
auth?: boolean | DataLink
|
|
68
|
+
/* Username */
|
|
69
|
+
username?: string | DataLink
|
|
70
|
+
/* Password */
|
|
71
|
+
password?: string | DataLink
|
|
72
|
+
/* Client ID */
|
|
73
|
+
clientId?: string | DataLink
|
|
74
|
+
/* Second */
|
|
75
|
+
keepAlive?: number | DataLink
|
|
76
|
+
/* If true, BRICKS will auto reconnect when connection lose */
|
|
77
|
+
autoReconnect?: boolean | DataLink
|
|
78
|
+
/* How many times BRICKS will try to reconnect */
|
|
79
|
+
autoReconnectAttemptTime?: number | DataLink
|
|
80
|
+
/* Topic name to subscribe */
|
|
81
|
+
topic?: string | DataLink
|
|
82
|
+
/* Setting the mode of quality of service mode */
|
|
83
|
+
qos?: '0' | '1' | '2' | DataLink
|
|
84
|
+
/* If set to text the outlet and event property will be string, if set to json will parse to object */
|
|
85
|
+
messageType?: 'text' | 'json' | DataLink
|
|
86
|
+
}
|
|
87
|
+
events?: {
|
|
88
|
+
/* When connected to MQTT broker */
|
|
89
|
+
onConnected?: Array<EventAction>
|
|
90
|
+
/* When disconnected from MQTT broker */
|
|
91
|
+
onDisconnected?: Array<EventAction>
|
|
92
|
+
/* When error occurred */
|
|
93
|
+
onError?: Array<EventAction>
|
|
94
|
+
/* When received message from MQTT broker within subscribe topic */
|
|
95
|
+
onMessage?: Array<EventAction>
|
|
96
|
+
}
|
|
97
|
+
outlets?: {
|
|
98
|
+
/* Connected or not */
|
|
99
|
+
connected?: () => Data
|
|
100
|
+
/* Error Message */
|
|
101
|
+
error?: () => Data
|
|
102
|
+
/* The receive message */
|
|
103
|
+
message?: () => Data
|
|
104
|
+
/* The receive message (payload only) */
|
|
105
|
+
messagePayload?: () => Data
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* MQTT protocol messaging */
|
|
110
|
+
export type GeneratorMQTT = Generator &
|
|
111
|
+
GeneratorMQTTDef & {
|
|
112
|
+
templateKey: 'GENERATOR_MQTT'
|
|
113
|
+
switches: Array<
|
|
114
|
+
SwitchDef &
|
|
115
|
+
GeneratorMQTTDef & {
|
|
116
|
+
conds?: Array<{
|
|
117
|
+
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
118
|
+
cond:
|
|
119
|
+
| SwitchCondInnerStateCurrentCanvas
|
|
120
|
+
| SwitchCondData
|
|
121
|
+
| {
|
|
122
|
+
__typename: 'SwitchCondInnerStateOutlet'
|
|
123
|
+
outlet: 'connected' | 'error' | 'message' | 'messagePayload'
|
|
124
|
+
value: any
|
|
125
|
+
}
|
|
126
|
+
}>
|
|
127
|
+
}
|
|
128
|
+
>
|
|
129
|
+
}
|
|
@@ -0,0 +1,395 @@
|
|
|
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
|
+
/* Start inquire */
|
|
13
|
+
export type GeneratorQuestionActionStart = Action & {
|
|
14
|
+
__actionName: 'GENERATOR_QUESTION_START'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Stop inquire */
|
|
18
|
+
export type GeneratorQuestionActionStop = Action & {
|
|
19
|
+
__actionName: 'GENERATOR_QUESTION_STOP'
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Pause inquire */
|
|
23
|
+
export type GeneratorQuestionActionPause = Action & {
|
|
24
|
+
__actionName: 'GENERATOR_QUESTION_PAUSE'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface GeneratorQuestionDef {
|
|
28
|
+
/*
|
|
29
|
+
Default property:
|
|
30
|
+
{
|
|
31
|
+
"modalMode": "root",
|
|
32
|
+
"showClose": true,
|
|
33
|
+
"showBack": true,
|
|
34
|
+
"cameraType": "back",
|
|
35
|
+
"cameraPosition": "top",
|
|
36
|
+
"selectColumns": 3,
|
|
37
|
+
"selectAutoColumns": true,
|
|
38
|
+
"sizeFactor": 1,
|
|
39
|
+
"containerBackgroundColor": "#ffffff",
|
|
40
|
+
"titleColor": "#000000",
|
|
41
|
+
"descriptionColor": "#2e2e2e",
|
|
42
|
+
"fieldBackgroundColor": "#E2E2E2",
|
|
43
|
+
"fieldTextColor": "#1e1e1e",
|
|
44
|
+
"fieldPlaceholderColor": "#333333",
|
|
45
|
+
"fieldActiveBackgroundColor": "#FDCB8F",
|
|
46
|
+
"fieldActiveTextColor": "#7D7D7D",
|
|
47
|
+
"fieldControlColor": "#f08400",
|
|
48
|
+
"primaryControlBtnBackgroundColor": "#1e1e1e",
|
|
49
|
+
"primaryControlBtnTextColor": "#ffffff",
|
|
50
|
+
"primaryControlBtnBorderColor": "#1e1e1e",
|
|
51
|
+
"secondaryControlBtnBackgroundColor": "#ffffff",
|
|
52
|
+
"secondaryControlBtnTextColor": "#1e1e1e",
|
|
53
|
+
"secondaryControlBtnBorderColor": "#1e1e1e",
|
|
54
|
+
"warnColor": "#ff4f00",
|
|
55
|
+
"errorColor": "#ff0000"
|
|
56
|
+
}
|
|
57
|
+
*/
|
|
58
|
+
property?: {
|
|
59
|
+
/* Modal mode */
|
|
60
|
+
modalMode?: 'root' | 'in-subspace' | DataLink
|
|
61
|
+
/* Inquirer schema
|
|
62
|
+
`key`: Field key (unique, required)
|
|
63
|
+
`kind`: Field type (required)
|
|
64
|
+
`title`: Field or message title
|
|
65
|
+
`description`: Field or message description
|
|
66
|
+
`required`: Whether the field is required
|
|
67
|
+
`defaultValue`: Default value of the field
|
|
68
|
+
`[kind]Options`: Field configuration
|
|
69
|
+
`condition`: Condition to show field */
|
|
70
|
+
schema?:
|
|
71
|
+
| Array<
|
|
72
|
+
| DataLink
|
|
73
|
+
| {
|
|
74
|
+
key?: string | DataLink
|
|
75
|
+
title?: string | DataLink
|
|
76
|
+
description?: string | DataLink
|
|
77
|
+
kind?:
|
|
78
|
+
| 'language'
|
|
79
|
+
| 'number'
|
|
80
|
+
| 'numeric-string'
|
|
81
|
+
| 'text'
|
|
82
|
+
| 'phone'
|
|
83
|
+
| 'email'
|
|
84
|
+
| 'color'
|
|
85
|
+
| 'uri'
|
|
86
|
+
| 'select'
|
|
87
|
+
| 'multi-select'
|
|
88
|
+
| 'yesno'
|
|
89
|
+
| 'qty-list'
|
|
90
|
+
| 'cart'
|
|
91
|
+
| 'preference'
|
|
92
|
+
| 'voice-record'
|
|
93
|
+
| 'video-record'
|
|
94
|
+
| 'code-scan'
|
|
95
|
+
| 'message'
|
|
96
|
+
| DataLink
|
|
97
|
+
required?: boolean | DataLink
|
|
98
|
+
defaultValue?:
|
|
99
|
+
| string
|
|
100
|
+
| DataLink
|
|
101
|
+
| number
|
|
102
|
+
| DataLink
|
|
103
|
+
| boolean
|
|
104
|
+
| DataLink
|
|
105
|
+
| Array<string | DataLink>
|
|
106
|
+
| DataLink
|
|
107
|
+
| DataLink
|
|
108
|
+
languageOptions?:
|
|
109
|
+
| DataLink
|
|
110
|
+
| {
|
|
111
|
+
availableLangs?: Array<string | DataLink> | DataLink
|
|
112
|
+
}
|
|
113
|
+
numberOptions?:
|
|
114
|
+
| DataLink
|
|
115
|
+
| {
|
|
116
|
+
min?: number | DataLink
|
|
117
|
+
max?: number | DataLink
|
|
118
|
+
step?: number | DataLink
|
|
119
|
+
}
|
|
120
|
+
textOptions?:
|
|
121
|
+
| DataLink
|
|
122
|
+
| {
|
|
123
|
+
placeholder?: string | DataLink
|
|
124
|
+
}
|
|
125
|
+
phoneOptions?:
|
|
126
|
+
| DataLink
|
|
127
|
+
| {
|
|
128
|
+
placeholder?: string | DataLink
|
|
129
|
+
usePhysicalKeyboard?: boolean | DataLink
|
|
130
|
+
}
|
|
131
|
+
emailOptions?:
|
|
132
|
+
| DataLink
|
|
133
|
+
| {
|
|
134
|
+
placeholder?: string | DataLink
|
|
135
|
+
}
|
|
136
|
+
uriOptions?:
|
|
137
|
+
| DataLink
|
|
138
|
+
| {
|
|
139
|
+
placeholder?: string | DataLink
|
|
140
|
+
}
|
|
141
|
+
selectOptions?:
|
|
142
|
+
| DataLink
|
|
143
|
+
| {
|
|
144
|
+
withConfirmButton?: boolean | DataLink
|
|
145
|
+
options?:
|
|
146
|
+
| Array<
|
|
147
|
+
| DataLink
|
|
148
|
+
| {
|
|
149
|
+
value?: string | DataLink
|
|
150
|
+
image_uri?: string | DataLink
|
|
151
|
+
label?: string | DataLink
|
|
152
|
+
icon?: string | DataLink
|
|
153
|
+
}
|
|
154
|
+
>
|
|
155
|
+
| DataLink
|
|
156
|
+
}
|
|
157
|
+
multiSelectOptions?:
|
|
158
|
+
| DataLink
|
|
159
|
+
| {
|
|
160
|
+
options?:
|
|
161
|
+
| Array<
|
|
162
|
+
| DataLink
|
|
163
|
+
| {
|
|
164
|
+
value?: string | DataLink
|
|
165
|
+
image_uri?: string | DataLink
|
|
166
|
+
label?: string | DataLink
|
|
167
|
+
icon?: string | DataLink
|
|
168
|
+
}
|
|
169
|
+
>
|
|
170
|
+
| DataLink
|
|
171
|
+
minimum?: number | DataLink
|
|
172
|
+
maximum?: number | DataLink
|
|
173
|
+
}
|
|
174
|
+
yesnoOptions?:
|
|
175
|
+
| DataLink
|
|
176
|
+
| {
|
|
177
|
+
imageUri?: string | DataLink
|
|
178
|
+
withConfirmButton?: boolean | DataLink
|
|
179
|
+
yesBtnText?: string | DataLink
|
|
180
|
+
noBtnText?: string | DataLink
|
|
181
|
+
}
|
|
182
|
+
qtyListOptions?:
|
|
183
|
+
| DataLink
|
|
184
|
+
| {
|
|
185
|
+
items?:
|
|
186
|
+
| Array<
|
|
187
|
+
| DataLink
|
|
188
|
+
| {
|
|
189
|
+
id?: string | DataLink
|
|
190
|
+
title?: string | DataLink
|
|
191
|
+
description?: string | DataLink
|
|
192
|
+
imageUri?: string | DataLink
|
|
193
|
+
price?: number | DataLink
|
|
194
|
+
}
|
|
195
|
+
>
|
|
196
|
+
| DataLink
|
|
197
|
+
}
|
|
198
|
+
cartOptions?:
|
|
199
|
+
| DataLink
|
|
200
|
+
| {
|
|
201
|
+
items?:
|
|
202
|
+
| Array<
|
|
203
|
+
| DataLink
|
|
204
|
+
| {
|
|
205
|
+
id?: string | DataLink
|
|
206
|
+
title?: string | DataLink
|
|
207
|
+
description?: string | DataLink
|
|
208
|
+
imageUri?: string | DataLink
|
|
209
|
+
price?: number | DataLink
|
|
210
|
+
qty?: number | DataLink
|
|
211
|
+
}
|
|
212
|
+
>
|
|
213
|
+
| DataLink
|
|
214
|
+
}
|
|
215
|
+
preferenceOptions?:
|
|
216
|
+
| DataLink
|
|
217
|
+
| {
|
|
218
|
+
settings?:
|
|
219
|
+
| Array<
|
|
220
|
+
| DataLink
|
|
221
|
+
| {
|
|
222
|
+
key?: string | DataLink
|
|
223
|
+
title?: string | DataLink
|
|
224
|
+
options?:
|
|
225
|
+
| Array<
|
|
226
|
+
| DataLink
|
|
227
|
+
| {
|
|
228
|
+
label?: string | DataLink
|
|
229
|
+
value?: string | DataLink
|
|
230
|
+
}
|
|
231
|
+
>
|
|
232
|
+
| DataLink
|
|
233
|
+
multiple?: boolean | DataLink
|
|
234
|
+
required?: boolean | DataLink
|
|
235
|
+
maximum?: number | DataLink
|
|
236
|
+
minimum?: number | DataLink
|
|
237
|
+
}
|
|
238
|
+
>
|
|
239
|
+
| DataLink
|
|
240
|
+
}
|
|
241
|
+
voiceRecordOptions?:
|
|
242
|
+
| DataLink
|
|
243
|
+
| {
|
|
244
|
+
sampleRate?: number | DataLink
|
|
245
|
+
bitDepth?: '8bit' | '16bit' | DataLink
|
|
246
|
+
channels?: 'mono' | 'stereo' | DataLink
|
|
247
|
+
maxDuration?: number | DataLink
|
|
248
|
+
}
|
|
249
|
+
videoRecordOptions?:
|
|
250
|
+
| DataLink
|
|
251
|
+
| {
|
|
252
|
+
manuallyStart?: boolean | DataLink
|
|
253
|
+
recordDuration?: number | DataLink
|
|
254
|
+
}
|
|
255
|
+
messageOptions?:
|
|
256
|
+
| DataLink
|
|
257
|
+
| {
|
|
258
|
+
symbol?: 'success' | DataLink
|
|
259
|
+
duration?: number | DataLink
|
|
260
|
+
}
|
|
261
|
+
condition?:
|
|
262
|
+
| DataLink
|
|
263
|
+
| {
|
|
264
|
+
key?: string | DataLink
|
|
265
|
+
operator?:
|
|
266
|
+
| 'eq'
|
|
267
|
+
| 'neq'
|
|
268
|
+
| 'contains'
|
|
269
|
+
| 'notContains'
|
|
270
|
+
| 'isTrue'
|
|
271
|
+
| 'isFalse'
|
|
272
|
+
| DataLink
|
|
273
|
+
value?: string | DataLink
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
>
|
|
277
|
+
| DataLink
|
|
278
|
+
/* Display language (RFC 3066) */
|
|
279
|
+
displayLang?: string | DataLink
|
|
280
|
+
/* Banner image */
|
|
281
|
+
bannerImage?: string | DataLink
|
|
282
|
+
/* Banner image md5 */
|
|
283
|
+
bannerImageMd5?: string | DataLink
|
|
284
|
+
/* Show AI transcribe tip on the bottom of the modal */
|
|
285
|
+
aiTranscribeTip?: boolean | DataLink
|
|
286
|
+
/* Show close button */
|
|
287
|
+
showClose?: boolean | DataLink
|
|
288
|
+
/* Show back button */
|
|
289
|
+
showBack?: boolean | DataLink
|
|
290
|
+
/* Camera type */
|
|
291
|
+
cameraType?: 'front' | 'back' | DataLink
|
|
292
|
+
/* Camera position */
|
|
293
|
+
cameraPosition?: 'top' | 'left' | 'bottom' | 'right' | DataLink
|
|
294
|
+
/* "Next" button text */
|
|
295
|
+
nextButtonText?: string | DataLink
|
|
296
|
+
/* "Skip" button text */
|
|
297
|
+
skipButtonText?: string | DataLink
|
|
298
|
+
/* "Done" button text */
|
|
299
|
+
doneButtonText?: string | DataLink
|
|
300
|
+
/* Select columns */
|
|
301
|
+
selectColumns?: number | DataLink
|
|
302
|
+
/* Select auto calculate columns */
|
|
303
|
+
selectAutoColumns?: boolean | DataLink
|
|
304
|
+
/* Fixed model width, default is auto */
|
|
305
|
+
fixedModelWidth?: number | DataLink
|
|
306
|
+
/* Fixed model height, default is auto */
|
|
307
|
+
fixedModelHeight?: number | DataLink
|
|
308
|
+
/* Size factor */
|
|
309
|
+
sizeFactor?: number | DataLink
|
|
310
|
+
/* Background color */
|
|
311
|
+
backgroundColor?: string | DataLink
|
|
312
|
+
/* Container background color */
|
|
313
|
+
containerBackgroundColor?: string | DataLink
|
|
314
|
+
/* Title color */
|
|
315
|
+
titleColor?: string | DataLink
|
|
316
|
+
/* Description color */
|
|
317
|
+
descriptionColor?: string | DataLink
|
|
318
|
+
/* Input field background color */
|
|
319
|
+
fieldBackgroundColor?: string | DataLink
|
|
320
|
+
/* Input field text color */
|
|
321
|
+
fieldTextColor?: string | DataLink
|
|
322
|
+
/* Input field placeholder color */
|
|
323
|
+
fieldPlaceholderColor?: string | DataLink
|
|
324
|
+
/* Selected option background color */
|
|
325
|
+
fieldActiveBackgroundColor?: string | DataLink
|
|
326
|
+
/* Selected option text color */
|
|
327
|
+
fieldActiveTextColor?: string | DataLink
|
|
328
|
+
/* Field control button color */
|
|
329
|
+
fieldControlColor?: string | DataLink
|
|
330
|
+
/* Primary control button background color */
|
|
331
|
+
primaryControlBtnBackgroundColor?: string | DataLink
|
|
332
|
+
/* Primary control button text color */
|
|
333
|
+
primaryControlBtnTextColor?: string | DataLink
|
|
334
|
+
/* Primary control button border color */
|
|
335
|
+
primaryControlBtnBorderColor?: string | DataLink
|
|
336
|
+
/* Secondary control button background color */
|
|
337
|
+
secondaryControlBtnBackgroundColor?: string | DataLink
|
|
338
|
+
/* Secondary control button text color */
|
|
339
|
+
secondaryControlBtnTextColor?: string | DataLink
|
|
340
|
+
/* Secondary control button border color */
|
|
341
|
+
secondaryControlBtnBorderColor?: string | DataLink
|
|
342
|
+
/* Warn color */
|
|
343
|
+
warnColor?: string | DataLink
|
|
344
|
+
/* Error color */
|
|
345
|
+
errorColor?: string | DataLink
|
|
346
|
+
}
|
|
347
|
+
events?: {
|
|
348
|
+
/* Event of go next */
|
|
349
|
+
onNextQuestion?: Array<EventAction>
|
|
350
|
+
/* Event of go back */
|
|
351
|
+
onBackQuestion?: Array<EventAction>
|
|
352
|
+
/* Event of change question */
|
|
353
|
+
onQuestionChange?: Array<EventAction>
|
|
354
|
+
/* Event of user close question modal */
|
|
355
|
+
onClose?: Array<EventAction>
|
|
356
|
+
/* Event of warning showed */
|
|
357
|
+
onWarning?: Array<EventAction>
|
|
358
|
+
/* Event of completed inquire */
|
|
359
|
+
onCompleted?: Array<EventAction>
|
|
360
|
+
/* Event of error occured */
|
|
361
|
+
onError?: Array<EventAction>
|
|
362
|
+
}
|
|
363
|
+
outlets?: {
|
|
364
|
+
/* Result data */
|
|
365
|
+
data?: () => Data
|
|
366
|
+
/* Currnet question */
|
|
367
|
+
currectKey?: () => Data
|
|
368
|
+
/* Currnet input value */
|
|
369
|
+
currectValue?: () => Data
|
|
370
|
+
/* Error message */
|
|
371
|
+
errorMessage?: () => Data
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/* Question inquirer */
|
|
376
|
+
export type GeneratorQuestion = Generator &
|
|
377
|
+
GeneratorQuestionDef & {
|
|
378
|
+
templateKey: 'GENERATOR_QUESTION'
|
|
379
|
+
switches: Array<
|
|
380
|
+
SwitchDef &
|
|
381
|
+
GeneratorQuestionDef & {
|
|
382
|
+
conds?: Array<{
|
|
383
|
+
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
384
|
+
cond:
|
|
385
|
+
| SwitchCondInnerStateCurrentCanvas
|
|
386
|
+
| SwitchCondData
|
|
387
|
+
| {
|
|
388
|
+
__typename: 'SwitchCondInnerStateOutlet'
|
|
389
|
+
outlet: 'data' | 'currectKey' | 'currectValue' | 'errorMessage'
|
|
390
|
+
value: any
|
|
391
|
+
}
|
|
392
|
+
}>
|
|
393
|
+
}
|
|
394
|
+
>
|
|
395
|
+
}
|