-
Notifications
You must be signed in to change notification settings - Fork 0
/
component.json
236 lines (236 loc) · 8.94 KB
/
component.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
{
"title": "CSV v3",
"description": "A comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form",
"docsUrl": "https://github.com/elasticio/csv-component",
"version": "3.3.0",
"actions": {
"read_action": {
"main": "./lib/actions/read.js",
"title": "Read CSV attachment",
"help": {
"description": "This action will read the CSV attachment of the incoming message or from the specified URL and output a JSON object.",
"link": "/components/csv/actions.html#read-csv-attachment"
},
"fields": {
"emitAll": {
"label": "Emit Behavior",
"required": true,
"order": 80,
"viewClass": "SelectView",
"model": {
"fetchAll": "Fetch All",
"emitIndividually": "Emit Individually",
"emitBatch": "Emit Batch"
},
"prompt": "Select Emit Behavior"
},
"skipEmptyLines": {
"label": "Skip empty lines",
"order": 70,
"required": false,
"viewClass": "CheckBoxView",
"help": {
"description": "By default, empty lines are parsed if checked they will be skipped"
}
},
"comments": {
"label": "Comment char",
"order": 60,
"required": false,
"viewClass": "TextFieldView",
"help": {
"description": "If specified, skips lines starting with this string"
}
}
},
"dynamicMetadata": true
},
"write_from_stream": {
"main": "./lib/actions/writeStream.js",
"title": "Create CSV From Message Stream",
"help": {
"description": "Multiple incoming events can be combined into one CSV file with the write CSV action.",
"link": "/components/csv/actions.html#write-csv-attachment"
},
"fields": {
"uploadToAttachment": {
"label": "Upload CSV as file to attachments",
"viewClass": "CheckBoxView",
"required": false,
"order": 80,
"description": "If checked store the generated CSV data as an attachment",
"prompt": "Include headers? Default Yes."
},
"separator": {
"viewClass": "TextFieldView",
"required": false,
"order": 70,
"label": "Separator",
"note": "A single char used to delimit the CSV file. Default to ','"
},
"order": {
"viewClass": "TextFieldView",
"required": false,
"order": 60,
"label": "Column Order",
"note": "A string delimited with the separator (use same as above) indicating which columns & in what order the columns should appear in the resulting file. If omitted, the column order in the resulting file will not be deterministic."
},
"newline": {
"label": "New line delimiter",
"order": 50,
"required": false,
"viewClass": "TextFieldView",
"help": {
"description": "The character used to determine newline sequence. defaults to <b style='background-color:LightGray;'>\\r\\n</b>"
}
},
"escapeFormulae": {
"label": "Escape formulae",
"order": 40,
"required": false,
"viewClass": "CheckBoxView",
"help": {
"description": "If selected, field values that begin with <b style='background-color:LightGray;'>=</b>, <b style='background-color:LightGray;'>+</b>, <b style='background-color:LightGray;'>-</b>, <b style='background-color:LightGray;'>@</b>, <b style='background-color:LightGray;'>\\t</b>, or <b style='background-color:LightGray;'>\\r</b>, will be prepended with a <b style='background-color:LightGray;'>'</b> to defend against injection attacks, because Excel and LibreOffice will automatically parse such cells as formula"
}
}
},
"dynamicMetadata": true
},
"write_attachment_from_array": {
"main": "./lib/actions/writeArray.js",
"title": "Create CSV From JSON Array",
"help": {
"description": "Incoming array can be converted into one CSV file",
"link": "/components/csv/actions.html#write-csv-attachment"
},
"fields": {
"uploadToAttachment": {
"label": "Upload CSV as file to attachments",
"viewClass": "CheckBoxView",
"required": false,
"order": 80,
"description": "If checked store the generated CSV data as an attachment",
"prompt": "Include headers? Default Yes."
},
"separator": {
"viewClass": "TextFieldView",
"required": false,
"order": 70,
"label": "Separator",
"note": "A single char used to delimit the CSV file. Default to ','"
},
"order": {
"viewClass": "TextFieldView",
"required": false,
"order": 60,
"label": "Column Order",
"note": "A string delimited with the separator (use same as above) indicating which columns & in what order the columns should appear in the resulting file. If omitted, the column order in the resulting file will not be deterministic."
},
"newline": {
"label": "New line delimiter",
"order": 50,
"required": false,
"viewClass": "TextFieldView",
"help": {
"description": "The character used to determine newline sequence. defaults to <b style='background-color:LightGray;'>\\r\\n</b>"
}
},
"escapeFormulae": {
"label": "Escape formulae",
"order": 40,
"required": false,
"viewClass": "CheckBoxView",
"help": {
"description": "If selected, field values that begin with <b style='background-color:LightGray;'>=</b>, <b style='background-color:LightGray;'>+</b>, <b style='background-color:LightGray;'>-</b>, <b style='background-color:LightGray;'>@</b>, <b style='background-color:LightGray;'>\\t</b>, or <b style='background-color:LightGray;'>\\r</b>, will be prepended with a <b style='background-color:LightGray;'>'</b> to defend against injection attacks, because Excel and LibreOffice will automatically parse such cells as formula"
}
}
},
"dynamicMetadata": true
}
},
"triggers": {
"read_trigger": {
"type": "polling",
"main": "./lib/triggers/read.js",
"title": "Read CSV file from URL",
"help": {
"description": "This action will read the CSV attachment from the specified URL and output a JSON object.",
"link": "/components/csv/triggers.html#read-csv-file"
},
"fields": {
"url": {
"label": "URL of the CSV file",
"order": 90,
"required": true,
"viewClass": "TextFieldView"
},
"header": {
"label": "Contains headers",
"order": 80,
"required": false,
"viewClass": "CheckBoxView",
"help": {
"description": "If true, the first row of parsed data will be interpreted as field names, false by default"
}
},
"delimiter": {
"label": "Delimiter",
"order": 70,
"required": false,
"viewClass": "TextFieldView",
"help": {
"description": "The delimiting character. Leave blank to auto-detect from a list of most common delimiters or provide your own"
}
},
"dynamicTyping": {
"label": "Convert Data types",
"order": 60,
"required": false,
"viewClass": "CheckBoxView",
"help": {
"description": "Numeric data and boolean data will be converted to their type instead of remaining strings, false by default"
}
},
"emitBehavior": {
"label": "Emit Behavior",
"required": true,
"order": 50,
"viewClass": "SelectView",
"model": {
"fetchAll": "Fetch All",
"emitIndividually": "Emit Individually",
"emitBatch": "Emit Batch"
},
"prompt": "Select Emit Behavior"
},
"batchSize": {
"label": "Batch Size",
"required": false,
"order": 45,
"viewClass": "TextFieldView",
"help": {
"description": "Enter batch size if the 'Emit Behavior' field is set to 'Emit Batch'"
}
},
"skipEmptyLines": {
"label": "Skip empty lines",
"order": 40,
"required": false,
"viewClass": "CheckBoxView",
"help": {
"description": "By default, empty lines are parsed if checked they will be skipped"
}
},
"comments": {
"label": "Comment char",
"order": 30,
"required": false,
"viewClass": "TextFieldView",
"help": {
"description": "If specified, skips lines starting with this string"
}
}
}
}
}
}