You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sources/platform/actors/development/actor_definition/input_schema/specification.md
+20-11Lines changed: 20 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@ title: Specification
3
3
sidebar_position: 2
4
4
description: Learn how to define and validate a schema for your Actor's input with code examples. Provide an autogenerated input UI for your Actor's users.
@@ -148,6 +149,8 @@ Most types also support additional properties defining, for example, the UI inpu
148
149
149
150
### String
150
151
152
+
#### Code input
153
+
151
154
Example of a code input:
152
155
153
156
```json
@@ -164,6 +167,8 @@ Rendered input:
164
167
165
168

166
169
170
+
#### Country selection
171
+
167
172
Example of country selection using a select input:
168
173
169
174
```json
@@ -182,6 +187,8 @@ Rendered input:
182
187
183
188

184
189
190
+
#### `datepicker` editor
191
+
185
192
Example of date selection using absolute and relative `datepicker` editor:
186
193
187
194
```json
@@ -224,6 +231,8 @@ The `anyDate` property renders a date picker that accepts both absolute and rela
224
231
225
232

226
233
234
+
#### `fileupload` editor
235
+
227
236
The `fileupload` editor enables users to specify a file as input. The input is passed to the Actor as a string. It is the Actor author's responsibility to interpret this string, including validating its existence and format.
228
237
229
238

@@ -234,17 +243,17 @@ The user provides either a URL or uploads the file to a key-value store (existin
| `editor` | One of <ul><li>`textfield`</li><li>`textarea`</li><li>`javascript`</li><li>`python`</li><li>`select`</li><li>`datepicker`</li><li>`fileupload`</li><li>`hidden`</li></ul> | Yes | Visual editor used for <br/>the input field. |
240
-
| `pattern` | String | No | Regular expression that will be <br/>used to validate the input. <br/> If validation fails, <br/>the Actor will not run. |
241
-
| `minLength` | Integer | No | Minimum length of the string. |
242
-
| `maxLength` | Integer | No | Maximum length of the string. |
243
-
| `enum` | [String] | Required if <br/>`editor` <br/>is `select` | Using this field, you can limit values <br/>to the given array of strings. <br/>Input will be displayed as select box. |
244
-
| `enumTitles` | [String] | No | Titles for the `enum` keys described. |
245
-
| `nullable` | Boolean | No | Specifies whether `null` <br/>is an allowed value. |
246
-
| `isSecret` | Boolean | No | Specifies whether the input field<br />will be stored encrypted.<br />Only available <br />with `textfield` and `textarea` editors. |
247
-
| `dateType` | One of <ul><li>`absolute`</li><li>`relative`</li><li>`absoluteOrRelative`</li></ul> | No | This property, which is only available with `datepicker` editor, specifies what date format should visual editor accept (The JSON editor accepts any string without validation.).<br/><br/><ul><li>`absolute` value enables date input in `YYYY-MM-DD` format. To parse returned string regex like this can be used: `^(\d{4})-(0[1-9]\|1[0-2])-(0[1-9]\|[12]\d\|3[01])$`.</li><br/><li>`relative` value enables relative date input in <br/>`{number} {unit}` format. <br/>Supported units are: days, weeks, months, years.<br/><br/>The input is passed to the Actor as plain text (e.g., "3 weeks"). To parse it, regex like this can be used: `^(\d+)\s*(day\|week\|month\|year)s?$`.</li><br/><li>`absoluteOrRelative` value enables both absolute and relative formats and user can switch between them. It's up to Actor author to parse a determine actual used format - regexes above can be used to check whether the returned string match one of them.</li></ul><br/>Defaults to `absolute`. |
246
+
| Property | Value | Required | Description |
247
+
|----------|--------|-----------|-------------|
248
+
|`editor`| One of:<br/>- `textfield`<br/>- `textarea`<br/>- `javascript`<br/>- `python`<br/>- `select`<br/>- `datepicker`<br/>- `fileupload`<br/>- `hidden`| Yes | Visual editor used for the input field. |
249
+
|`pattern`| String | No | Regular expression that will be used to validate the input. If validation fails, the Actor will not run. |
250
+
|`minLength`| Integer | No | Minimum length of the string. |
251
+
|`maxLength`| Integer | No | Maximum length of the string. |
252
+
|`enum`|[String]| Required if `editor` is `select`| Using this field, you can limit values to the given array of strings. Input will be displayed as select box. |
253
+
|`enumTitles`|[String]| No | Titles for the `enum` keys described. |
254
+
|`nullable`| Boolean | No | Specifies whether `null` is an allowed value. |
255
+
|`isSecret`| Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `textfield` and `textarea` editors. |
256
+
| `dateType` | One of <ul><li>`absolute`</li><li>`relative`</li><li>`absoluteOrRelative`</li></ul> | No | This property, which is only available with `datepicker` editor, specifies what date format should visual editor accept (The JSON editor accepts any string without validation.).<br/><br/><ul><li>`absolute` value enables date input in `YYYY-MM-DD` format. To parse returned string regex like this can be used: `^(\d{4})-(0[1-9]\|1[0-2])-(0[1-9]\|[12]\d\|3[01])$`.</li><br/><li>`relative` value enables relative date input in <br/>`{number} {unit}` format. <br/>Supported units are: days, weeks, months, years.<br/><br/>The input is passed to the Actor as plain text (e.g., "3 weeks"). To parse it, regex like this can be used: `^(\d+)\s*(day\|week\|month\|year)s?$`.</li><br/><li>`absoluteOrRelative` value enables both absolute and relative formats and user can switch between them. It's up to Actor author to parse a determine actual used format - regexes above can be used to check whether the returned string match one of them.</li></ul><br/>Defaults to `absolute`. |
0 commit comments