@fugood/bricks-project 2.25.0-beta.22 → 2.25.0-beta.24

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.
@@ -0,0 +1,129 @@
1
+ /* Auto generated by build script */
2
+ import type { DataCalculationData, DataCommand, DataCalcInput, DataCalcOutput } from './base'
3
+
4
+ /* append file — Append file */
5
+ export type DataCommandFileAppend = DataCommand & {
6
+ __commandName: 'FILE_APPEND'
7
+ inputs?: Array<
8
+ | DataCalcInput<'path', string>
9
+ | DataCalcInput<'contents', any>
10
+ | DataCalcInput<'encoding', string> /* default: "utf8" */
11
+ >
12
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
13
+ }
14
+
15
+ /* cache path — Get cache path */
16
+ export type DataCommandFileCachePath = DataCommand & {
17
+ __commandName: 'FILE_CACHE_PATH'
18
+ outputs?: Array<DataCalcOutput<'result'> /* target: string */>
19
+ }
20
+
21
+ /* copy file — Copy file */
22
+ export type DataCommandFileCopyFile = DataCommand & {
23
+ __commandName: 'FILE_COPY_FILE'
24
+ inputs?: Array<DataCalcInput<'from', string> | DataCalcInput<'to', string>>
25
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
26
+ }
27
+
28
+ /* document path — Get document path */
29
+ export type DataCommandFileDocumentPath = DataCommand & {
30
+ __commandName: 'FILE_DOCUMENT_PATH'
31
+ outputs?: Array<DataCalcOutput<'result'> /* target: string */>
32
+ }
33
+
34
+ /* exists — Check if file exists */
35
+ export type DataCommandFileExists = DataCommand & {
36
+ __commandName: 'FILE_EXISTS'
37
+ inputs?: Array<DataCalcInput<'path', string>>
38
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
39
+ }
40
+
41
+ /* Get Error — Get error of result from File command */
42
+ export type DataCommandFileGetError = DataCommand & {
43
+ __commandName: 'FILE_GET_ERROR'
44
+ inputs?: Array<DataCalcInput<'result', object> /* default: {} */>
45
+ outputs?: Array<DataCalcOutput<'result'> /* target: string */>
46
+ }
47
+
48
+ /* Get Return Value — Get returnValue of result from File command */
49
+ export type DataCommandFileGetReturnValue = DataCommand & {
50
+ __commandName: 'FILE_GET_RETURN_VALUE'
51
+ inputs?: Array<DataCalcInput<'result', object> /* default: {} */>
52
+ outputs?: Array<DataCalcOutput<'result'> /* target: any */>
53
+ }
54
+
55
+ /* hash — Get file hash */
56
+ export type DataCommandFileHash = DataCommand & {
57
+ __commandName: 'FILE_HASH'
58
+ inputs?: Array<
59
+ DataCalcInput<'path', string> | DataCalcInput<'algorithm', string> /* default: "md5" */
60
+ >
61
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
62
+ }
63
+
64
+ /* mkdir — Create directory */
65
+ export type DataCommandFileMkdir = DataCommand & {
66
+ __commandName: 'FILE_MKDIR'
67
+ inputs?: Array<
68
+ DataCalcInput<'path', string> | DataCalcInput<'parent', boolean> /* default: false */
69
+ >
70
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
71
+ }
72
+
73
+ /* move file — Move file */
74
+ export type DataCommandFileMoveFile = DataCommand & {
75
+ __commandName: 'FILE_MOVE_FILE'
76
+ inputs?: Array<DataCalcInput<'from', string> | DataCalcInput<'to', string>>
77
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
78
+ }
79
+
80
+ /* read — Read file (length < 0: read all) */
81
+ export type DataCommandFileRead = DataCommand & {
82
+ __commandName: 'FILE_READ'
83
+ inputs?: Array<
84
+ | DataCalcInput<'path', string>
85
+ | DataCalcInput<'length', number> /* default: -1 */
86
+ | DataCalcInput<'position', number> /* default: 0 */
87
+ | DataCalcInput<'encoding', string> /* default: "utf8" */
88
+ >
89
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
90
+ }
91
+
92
+ /* read dir — Read directory */
93
+ export type DataCommandFileReadDir = DataCommand & {
94
+ __commandName: 'FILE_READ_DIR'
95
+ inputs?: Array<DataCalcInput<'path', string>>
96
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
97
+ }
98
+
99
+ /* stat — Get file status */
100
+ export type DataCommandFileStat = DataCommand & {
101
+ __commandName: 'FILE_STAT'
102
+ inputs?: Array<DataCalcInput<'path', string>>
103
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
104
+ }
105
+
106
+ /* temporary path — Get temporary path */
107
+ export type DataCommandFileTmpPath = DataCommand & {
108
+ __commandName: 'FILE_TMP_PATH'
109
+ outputs?: Array<DataCalcOutput<'result'> /* target: string */>
110
+ }
111
+
112
+ /* unlink — Delete file */
113
+ export type DataCommandFileUnlink = DataCommand & {
114
+ __commandName: 'FILE_UNLINK'
115
+ inputs?: Array<DataCalcInput<'path', string>>
116
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
117
+ }
118
+
119
+ /* write — Write file (length < 0: write all) */
120
+ export type DataCommandFileWrite = DataCommand & {
121
+ __commandName: 'FILE_WRITE'
122
+ inputs?: Array<
123
+ | DataCalcInput<'path', string>
124
+ | DataCalcInput<'contents', any>
125
+ | DataCalcInput<'position', number> /* default: -1 */
126
+ | DataCalcInput<'encoding', string> /* default: "utf8" */
127
+ >
128
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
129
+ }
@@ -0,0 +1,13 @@
1
+ /* Auto generated by build script */
2
+ export * from './base'
3
+ export * from './constant'
4
+ export * from './logictype'
5
+ export * from './object'
6
+ export * from './collection'
7
+ export * from './datetime'
8
+ export * from './string'
9
+ export * from './math'
10
+ export * from './iteratee'
11
+ export * from './sandbox'
12
+ export * from './color'
13
+ export * from './file'
@@ -0,0 +1,23 @@
1
+ /* Auto generated by build script */
2
+ import type { DataCalculationData, DataCommand, DataCalcInput, DataCalcOutput } from './base'
3
+
4
+ /* Get key — Get key from iteratee_input */
5
+ export type DataCommandIterateeGetKey = DataCommand & {
6
+ __commandName: 'ITERATEE_GET_KEY'
7
+ inputs?: Array<DataCalcInput<'iteratee_input', object> /* default: {} */>
8
+ outputs?: Array<DataCalcOutput<'result'> /* target: any */>
9
+ }
10
+
11
+ /* Get result — Get result from iteratee_input */
12
+ export type DataCommandIterateeGetResult = DataCommand & {
13
+ __commandName: 'ITERATEE_GET_RESULT'
14
+ inputs?: Array<DataCalcInput<'iteratee_input', object> /* default: {} */>
15
+ outputs?: Array<DataCalcOutput<'result'> /* target: any */>
16
+ }
17
+
18
+ /* Get value — Get value from iteratee_input */
19
+ export type DataCommandIterateeGetValue = DataCommand & {
20
+ __commandName: 'ITERATEE_GET_VALUE'
21
+ inputs?: Array<DataCalcInput<'iteratee_input', object> /* default: {} */>
22
+ outputs?: Array<DataCalcOutput<'result'> /* target: any */>
23
+ }
@@ -0,0 +1,190 @@
1
+ /* Auto generated by build script */
2
+ import type { DataCalculationData, DataCommand, DataCalcInput, DataCalcOutput } from './base'
3
+
4
+ /* And — And */
5
+ export type DataCommandLogictypeAnd = DataCommand & {
6
+ __commandName: 'LOGICTYPE_AND'
7
+ inputs?: Array<
8
+ | DataCalcInput<'value', any> /* default: undefined */
9
+ | DataCalcInput<'other', any> /* default: undefined */
10
+ >
11
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
12
+ }
13
+
14
+ /* Clone — Clone value */
15
+ export type DataCommandLogictypeClone = DataCommand & {
16
+ __commandName: 'LOGICTYPE_CLONE'
17
+ inputs?: Array<DataCalcInput<'value', any> /* default: undefined */>
18
+ outputs?: Array<DataCalcOutput<'result'> /* target: any */>
19
+ }
20
+
21
+ /* Equal value — Compare by value (deep) */
22
+ export type DataCommandLogictypeEqualValue = DataCommand & {
23
+ __commandName: 'LOGICTYPE_EQUAL_VALUE'
24
+ inputs?: Array<
25
+ | DataCalcInput<'value', any> /* default: undefined */
26
+ | DataCalcInput<'other', any> /* default: undefined */
27
+ >
28
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
29
+ }
30
+
31
+ /* If — Condition for return truthy or falsy */
32
+ export type DataCommandLogictypeIf = DataCommand & {
33
+ __commandName: 'LOGICTYPE_IF'
34
+ inputs?: Array<
35
+ | DataCalcInput<'condition', any> /* default: undefined */
36
+ | DataCalcInput<'truthy', any> /* default: undefined */
37
+ | DataCalcInput<'falsy', any> /* default: undefined */
38
+ >
39
+ outputs?: Array<DataCalcOutput<'result'> /* target: any */>
40
+ }
41
+
42
+ /* Is array — Is it an array? */
43
+ export type DataCommandLogictypeIsArray = DataCommand & {
44
+ __commandName: 'LOGICTYPE_IS_ARRAY'
45
+ inputs?: Array<DataCalcInput<'value', any> /* default: undefined */>
46
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
47
+ }
48
+
49
+ /* Is boolean — Is it boolean? */
50
+ export type DataCommandLogictypeIsBoolean = DataCommand & {
51
+ __commandName: 'LOGICTYPE_IS_BOOLEAN'
52
+ inputs?: Array<DataCalcInput<'value', any> /* default: undefined */>
53
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
54
+ }
55
+
56
+ /* Is datetime — Is it a datetime? */
57
+ export type DataCommandLogictypeIsDatetime = DataCommand & {
58
+ __commandName: 'LOGICTYPE_IS_DATETIME'
59
+ inputs?: Array<DataCalcInput<'value', any> /* default: undefined */>
60
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
61
+ }
62
+
63
+ /* Is empty — Is it empty? */
64
+ export type DataCommandLogictypeIsEmpty = DataCommand & {
65
+ __commandName: 'LOGICTYPE_IS_EMPTY'
66
+ inputs?: Array<DataCalcInput<'value', any> /* default: undefined */>
67
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
68
+ }
69
+
70
+ /* Is integer — Is it integer? */
71
+ export type DataCommandLogictypeIsInteger = DataCommand & {
72
+ __commandName: 'LOGICTYPE_IS_INTEGER'
73
+ inputs?: Array<DataCalcInput<'value', any> /* default: undefined */>
74
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
75
+ }
76
+
77
+ /* Is number — Is it a number? */
78
+ export type DataCommandLogictypeIsNumber = DataCommand & {
79
+ __commandName: 'LOGICTYPE_IS_NUMBER'
80
+ inputs?: Array<DataCalcInput<'value', any> /* default: undefined */>
81
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
82
+ }
83
+
84
+ /* Is object — Is it a object? */
85
+ export type DataCommandLogictypeIsObject = DataCommand & {
86
+ __commandName: 'LOGICTYPE_IS_OBJECT'
87
+ inputs?: Array<DataCalcInput<'value', any> /* default: undefined */>
88
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
89
+ }
90
+
91
+ /* Is string — Is it string? */
92
+ export type DataCommandLogictypeIsString = DataCommand & {
93
+ __commandName: 'LOGICTYPE_IS_STRING'
94
+ inputs?: Array<DataCalcInput<'value', any> /* default: undefined */>
95
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
96
+ }
97
+
98
+ /* Not — Not */
99
+ export type DataCommandLogictypeNot = DataCommand & {
100
+ __commandName: 'LOGICTYPE_NOT'
101
+ inputs?: Array<DataCalcInput<'value', any> /* default: undefined */>
102
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
103
+ }
104
+
105
+ /* Not equal value — Compare not equal by value (deep) */
106
+ export type DataCommandLogictypeNotEqualValue = DataCommand & {
107
+ __commandName: 'LOGICTYPE_NOT_EQUAL_VALUE'
108
+ inputs?: Array<
109
+ | DataCalcInput<'value', any> /* default: undefined */
110
+ | DataCalcInput<'other', any> /* default: undefined */
111
+ >
112
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
113
+ }
114
+
115
+ /* 或 */
116
+ export type DataCommandLogictypeOr = DataCommand & {
117
+ __commandName: 'LOGICTYPE_OR'
118
+ inputs?: Array<
119
+ | DataCalcInput<'value', any> /* default: undefined */
120
+ | DataCalcInput<'other', any> /* default: undefined */
121
+ >
122
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
123
+ }
124
+
125
+ /* Convert to array — Convert to array if possible, return fail_value if failed (Supported JSON) */
126
+ export type DataCommandLogictypeToArray = DataCommand & {
127
+ __commandName: 'LOGICTYPE_TO_ARRAY'
128
+ inputs?: Array<
129
+ DataCalcInput<'value', any> | DataCalcInput<'fail_value', Array<any>> /* default: [] */
130
+ >
131
+ outputs?: Array<DataCalcOutput<'result'> /* target: any */>
132
+ }
133
+
134
+ /* Convert to boolean — Convert to boolean */
135
+ export type DataCommandLogictypeToBoolean = DataCommand & {
136
+ __commandName: 'LOGICTYPE_TO_BOOLEAN'
137
+ inputs?: Array<DataCalcInput<'value', any>>
138
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
139
+ }
140
+
141
+ /* Convert to datetime — Convert to datetime if possible, return fail_value if failed */
142
+ export type DataCommandLogictypeToDatetime = DataCommand & {
143
+ __commandName: 'LOGICTYPE_TO_DATETIME'
144
+ inputs?: Array<
145
+ DataCalcInput<'value', any> | DataCalcInput<'fail_value', string> /* default: DATETIME_NOW */
146
+ >
147
+ outputs?: Array<DataCalcOutput<'result'> /* target: string */>
148
+ }
149
+
150
+ /* Convert to integer — Convert to integer if possible, return fail_value if failed */
151
+ export type DataCommandLogictypeToInteger = DataCommand & {
152
+ __commandName: 'LOGICTYPE_TO_INTEGER'
153
+ inputs?: Array<DataCalcInput<'value', any> | DataCalcInput<'fail_value', any> /* default: 0 */>
154
+ outputs?: Array<DataCalcOutput<'result'> /* target: any */>
155
+ }
156
+
157
+ /* Convert to number — Convert to number if possible, return fail_value if failed */
158
+ export type DataCommandLogictypeToNumber = DataCommand & {
159
+ __commandName: 'LOGICTYPE_TO_NUMBER'
160
+ inputs?: Array<DataCalcInput<'value', any> | DataCalcInput<'fail_value', number> /* default: 0 */>
161
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
162
+ }
163
+
164
+ /* Convert to object — Convert to object if possible, return fail_value if failed (Supported JSON) */
165
+ export type DataCommandLogictypeToObject = DataCommand & {
166
+ __commandName: 'LOGICTYPE_TO_OBJECT'
167
+ inputs?: Array<
168
+ DataCalcInput<'value', any> | DataCalcInput<'fail_value', object> /* default: {} */
169
+ >
170
+ outputs?: Array<DataCalcOutput<'result'> /* target: object */>
171
+ }
172
+
173
+ /* Convert to string — Convert to string if possible, return fail_value if failed (Supported JSON and Datetime format) */
174
+ export type DataCommandLogictypeToString = DataCommand & {
175
+ __commandName: 'LOGICTYPE_TO_STRING'
176
+ inputs?: Array<
177
+ DataCalcInput<'value', any> | DataCalcInput<'fail_value', string> /* default: "" */
178
+ >
179
+ outputs?: Array<DataCalcOutput<'result'> /* target: string */>
180
+ }
181
+
182
+ /* XOR — XOR */
183
+ export type DataCommandLogictypeXor = DataCommand & {
184
+ __commandName: 'LOGICTYPE_XOR'
185
+ inputs?: Array<
186
+ | DataCalcInput<'value', any> /* default: undefined */
187
+ | DataCalcInput<'other', any> /* default: undefined */
188
+ >
189
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
190
+ }
@@ -0,0 +1,275 @@
1
+ /* Auto generated by build script */
2
+ import type { DataCalculationData, DataCommand, DataCalcInput, DataCalcOutput } from './base'
3
+
4
+ /* Abs — Abs */
5
+ export type DataCommandMathAbs = DataCommand & {
6
+ __commandName: 'MATH_ABS'
7
+ inputs?: Array<DataCalcInput<'value', number> /* default: 0 */>
8
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
9
+ }
10
+
11
+ /* Add — Add */
12
+ export type DataCommandMathAdd = DataCommand & {
13
+ __commandName: 'MATH_ADD'
14
+ inputs?: Array<
15
+ | DataCalcInput<'augend', number> /* default: 0 */
16
+ | DataCalcInput<'addend', number> /* default: 0 */
17
+ >
18
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
19
+ }
20
+
21
+ /* Ceil — Ceil */
22
+ export type DataCommandMathCeil = DataCommand & {
23
+ __commandName: 'MATH_CEIL'
24
+ inputs?: Array<DataCalcInput<'value', number> /* default: 0 */>
25
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
26
+ }
27
+
28
+ /* Divide — Divide (Return integer if precision is 0) */
29
+ export type DataCommandMathDivide = DataCommand & {
30
+ __commandName: 'MATH_DIVIDE'
31
+ inputs?: Array<
32
+ | DataCalcInput<'dividend', number> /* default: 0 */
33
+ | DataCalcInput<'divisor', number> /* default: 1 */
34
+ | DataCalcInput<'precision', any> /* default: 0 */
35
+ >
36
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
37
+ }
38
+
39
+ /* Equal — Alias of LOGICTYPE_EQUAL_VALUE */
40
+ export type DataCommandMathEqual = DataCommand & {
41
+ __commandName: 'MATH_EQUAL'
42
+ inputs?: Array<
43
+ | DataCalcInput<'value', any> /* default: undefined */
44
+ | DataCalcInput<'other', any> /* default: undefined */
45
+ >
46
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
47
+ }
48
+
49
+ /* Run equation — Use string to write math functions, and use object as variables. (You can use OBJECT_DEFAULTS to make object) */
50
+ export type DataCommandMathEquation = DataCommand & {
51
+ __commandName: 'MATH_EQUATION'
52
+ inputs?: Array<
53
+ DataCalcInput<'arguments', object> /* default: {} */ | DataCalcInput<'equation', string>
54
+ >
55
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
56
+ }
57
+
58
+ /* Floor — Floor number */
59
+ export type DataCommandMathFloor = DataCommand & {
60
+ __commandName: 'MATH_FLOOR'
61
+ inputs?: Array<
62
+ | DataCalcInput<'value', number> /* default: 0 */
63
+ | DataCalcInput<'precision', any> /* default: 0 */
64
+ >
65
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
66
+ }
67
+
68
+ /* GCD — GCD */
69
+ export type DataCommandMathGcd = DataCommand & {
70
+ __commandName: 'MATH_GCD'
71
+ inputs?: Array<DataCalcInput<'number_list', Array<number>> /* default: [] */>
72
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
73
+ }
74
+
75
+ /* Is Negative — Is negative */
76
+ export type DataCommandMathIsNegative = DataCommand & {
77
+ __commandName: 'MATH_IS_NEGATIVE'
78
+ inputs?: Array<DataCalcInput<'value', any>>
79
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
80
+ }
81
+
82
+ /* Is Positive — Is positive */
83
+ export type DataCommandMathIsPositive = DataCommand & {
84
+ __commandName: 'MATH_IS_POSITIVE'
85
+ inputs?: Array<DataCalcInput<'value', any>>
86
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
87
+ }
88
+
89
+ /* Is Prime — Is prime */
90
+ export type DataCommandMathIsPrime = DataCommand & {
91
+ __commandName: 'MATH_IS_PRIME'
92
+ inputs?: Array<DataCalcInput<'value', any>>
93
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
94
+ }
95
+
96
+ /* Is zero — Is zero */
97
+ export type DataCommandMathIsZero = DataCommand & {
98
+ __commandName: 'MATH_IS_ZERO'
99
+ inputs?: Array<DataCalcInput<'value', any>>
100
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
101
+ }
102
+
103
+ /* Larger — Larger */
104
+ export type DataCommandMathLarger = DataCommand & {
105
+ __commandName: 'MATH_LARGER'
106
+ inputs?: Array<
107
+ DataCalcInput<'x', number> /* default: 0 */ | DataCalcInput<'y', number> /* default: 0 */
108
+ >
109
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
110
+ }
111
+
112
+ /* Larger and Equal — Larger and Equal */
113
+ export type DataCommandMathLargerAndEqual = DataCommand & {
114
+ __commandName: 'MATH_LARGER_AND_EQUAL'
115
+ inputs?: Array<
116
+ DataCalcInput<'x', number> /* default: 0 */ | DataCalcInput<'y', number> /* default: 0 */
117
+ >
118
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
119
+ }
120
+
121
+ /* LCM — LCM */
122
+ export type DataCommandMathLcm = DataCommand & {
123
+ __commandName: 'MATH_LCM'
124
+ inputs?: Array<
125
+ DataCalcInput<'x', number> /* default: 0 */ | DataCalcInput<'y', number> /* default: 0 */
126
+ >
127
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
128
+ }
129
+
130
+ /* Max — Get max value in array of number (ignore non-numeric value) */
131
+ export type DataCommandMathMax = DataCommand & {
132
+ __commandName: 'MATH_MAX'
133
+ inputs?: Array<DataCalcInput<'number_list', Array<number>> /* default: [] */>
134
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
135
+ }
136
+
137
+ /* Mean — Get average value in array of number (ignore non-numeric value) */
138
+ export type DataCommandMathMean = DataCommand & {
139
+ __commandName: 'MATH_MEAN'
140
+ inputs?: Array<DataCalcInput<'number_list', Array<number>> /* default: [] */>
141
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
142
+ }
143
+
144
+ /* Min — Get min in array of number (ignore non-numeric value) */
145
+ export type DataCommandMathMin = DataCommand & {
146
+ __commandName: 'MATH_MIN'
147
+ inputs?: Array<DataCalcInput<'number_list', Array<number>> /* default: [] */>
148
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
149
+ }
150
+
151
+ /* Mod — Mod */
152
+ export type DataCommandMathMod = DataCommand & {
153
+ __commandName: 'MATH_MOD'
154
+ inputs?: Array<
155
+ | DataCalcInput<'dividend', number> /* default: 0 */
156
+ | DataCalcInput<'divisor', number> /* default: 1 */
157
+ >
158
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
159
+ }
160
+
161
+ /* Multiply — Multiply */
162
+ export type DataCommandMathMultiply = DataCommand & {
163
+ __commandName: 'MATH_MULTIPLY'
164
+ inputs?: Array<
165
+ | DataCalcInput<'multiplier', number> /* default: 1 */
166
+ | DataCalcInput<'multiplicand', number> /* default: 1 */
167
+ >
168
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
169
+ }
170
+
171
+ /* Not Equal — Not equal */
172
+ export type DataCommandMathNotEqual = DataCommand & {
173
+ __commandName: 'MATH_NOT_EQUAL'
174
+ inputs?: Array<
175
+ | DataCalcInput<'value', any> /* default: undefined */
176
+ | DataCalcInput<'other', any> /* default: undefined */
177
+ >
178
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
179
+ }
180
+
181
+ /* Root — Root */
182
+ export type DataCommandMathNthRoot = DataCommand & {
183
+ __commandName: 'MATH_NTH_ROOT'
184
+ inputs?: Array<
185
+ DataCalcInput<'value', number> /* default: 0 */ | DataCalcInput<'root', any> /* default: 2 */
186
+ >
187
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
188
+ }
189
+
190
+ /* Pow — Pow */
191
+ export type DataCommandMathPow = DataCommand & {
192
+ __commandName: 'MATH_POW'
193
+ inputs?: Array<
194
+ DataCalcInput<'base', number> /* default: 0 */ | DataCalcInput<'exponent', any> /* default: 2 */
195
+ >
196
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
197
+ }
198
+
199
+ /* Random — Get a random number */
200
+ export type DataCommandMathRandom = DataCommand & {
201
+ __commandName: 'MATH_RANDOM'
202
+ inputs?: Array<
203
+ | DataCalcInput<'trigger', any> /* default: undefined */
204
+ | DataCalcInput<'lower', number> /* default: 0 */
205
+ | DataCalcInput<'upper', number> /* default: 1 */
206
+ | DataCalcInput<'floating', boolean> /* default: true */
207
+ >
208
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
209
+ }
210
+
211
+ /* Round — Round number */
212
+ export type DataCommandMathRound = DataCommand & {
213
+ __commandName: 'MATH_ROUND'
214
+ inputs?: Array<
215
+ | DataCalcInput<'value', number> /* default: 0 */
216
+ | DataCalcInput<'precision', any> /* default: 0 */
217
+ >
218
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
219
+ }
220
+
221
+ /* Sign — Sign number */
222
+ export type DataCommandMathSign = DataCommand & {
223
+ __commandName: 'MATH_SIGN'
224
+ inputs?: Array<DataCalcInput<'value', number> /* default: 0 */>
225
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
226
+ }
227
+
228
+ /* Smaller — Result = x < y */
229
+ export type DataCommandMathSmaller = DataCommand & {
230
+ __commandName: 'MATH_SMALLER'
231
+ inputs?: Array<
232
+ DataCalcInput<'x', number> /* default: 0 */ | DataCalcInput<'y', number> /* default: 0 */
233
+ >
234
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
235
+ }
236
+
237
+ /* Smaller And Equal — Result = x <= y */
238
+ export type DataCommandMathSmallerAndEqual = DataCommand & {
239
+ __commandName: 'MATH_SMALLER_AND_EQUAL'
240
+ inputs?: Array<
241
+ DataCalcInput<'x', number> /* default: 0 */ | DataCalcInput<'y', number> /* default: 0 */
242
+ >
243
+ outputs?: Array<DataCalcOutput<'result'> /* target: boolean */>
244
+ }
245
+
246
+ /* Substract — Substract */
247
+ export type DataCommandMathSubtract = DataCommand & {
248
+ __commandName: 'MATH_SUBTRACT'
249
+ inputs?: Array<
250
+ | DataCalcInput<'minuend', number> /* default: 0 */
251
+ | DataCalcInput<'subtrahend', number> /* default: 0 */
252
+ >
253
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
254
+ }
255
+
256
+ /* Sum — Get sum in array of number (ignore non-numeric value) */
257
+ export type DataCommandMathSum = DataCommand & {
258
+ __commandName: 'MATH_SUM'
259
+ inputs?: Array<DataCalcInput<'number_list', Array<number>> /* default: [] */>
260
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
261
+ }
262
+
263
+ /* Unary minus — Unary minus (Result = value * -1) */
264
+ export type DataCommandMathUnaryMinus = DataCommand & {
265
+ __commandName: 'MATH_UNARY_MINUS'
266
+ inputs?: Array<DataCalcInput<'value', number> /* default: 0 */>
267
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
268
+ }
269
+
270
+ /* Unary plus — Unary plus */
271
+ export type DataCommandMathUnaryPlus = DataCommand & {
272
+ __commandName: 'MATH_UNARY_PLUS'
273
+ inputs?: Array<DataCalcInput<'value', any> /* default: 0 */>
274
+ outputs?: Array<DataCalcOutput<'result'> /* target: number */>
275
+ }