Skip to content

Commit 944a82f

Browse files
committed
docs: Secret object/array inputs
1 parent cb36c65 commit 944a82f

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

sources/platform/actors/development/actor_definition/input_schema/secret_input.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ The editor for this input field will then turn into a secret input, and when you
3737

3838
<img src={require("./images/secret-input-editor.png").default} alt="Secret input editor" style={{ width: '100%', maxWidth: '822px' }}/>
3939

40+
When running the Actor through the API, input fields marked as secret are also encrypted automatically before being saved in the Actor run's default key-value store.
41+
4042
:::note Type restriction
4143

42-
This is only available for `string` inputs, and the editor type is limited to `textfield` or `textarea`.
44+
This feature supports `string`, `object`, and `array` inputs. The available editor types are `hidden` (for any of these), `textfield` and `textarea` (for `string` input), and `json` (for `object` and `array` inputs).
4345

4446
:::
4547

sources/platform/actors/development/actor_definition/input_schema/specification.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -243,16 +243,16 @@ The user provides either a URL or uploads the file to a key-value store (existin
243243

244244
Properties:
245245

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. |
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`, `textarea` and `hidden` editors. |
256256
| `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`. |
257257

258258
:::note Regex escape
@@ -393,14 +393,15 @@ Rendered input:
393393

394394
Properties:
395395

396-
| Property | Value | Required | Description |
397-
| --- | --- | --- | --- |
398-
| `editor` | One of <ul><li>`json`</li><li>`proxy`</li><li>`hidden`</li></ul> | Yes | UI editor used for input. |
399-
| `patternKey` | String | No | Regular expression that will be used <br/>to validate the keys of the object. |
400-
| `patternValue` | String | No | Regular expression that will be used <br/>to validate the values of object. |
401-
| `maxProperties` | Integer | No | Maximum number of properties <br/>the object can have. |
402-
| `minProperties` | Integer | No | Minimum number of properties <br/>the object can have. |
403-
| `nullable` | Boolean | No | Specifies whether null is <br/>an allowed value. |
396+
| Property | Value | Required | Description |
397+
| --- | --- | --- |--------------------------------------------------------------------------------------------------------------|
398+
| `editor` | One of <ul><li>`json`</li><li>`proxy`</li><li>`hidden`</li></ul> | Yes | UI editor used for input. |
399+
| `patternKey` | String | No | Regular expression that will be used <br/>to validate the keys of the object. |
400+
| `patternValue` | String | No | Regular expression that will be used <br/>to validate the values of object. |
401+
| `maxProperties` | Integer | No | Maximum number of properties <br/>the object can have. |
402+
| `minProperties` | Integer | No | Minimum number of properties <br/>the object can have. |
403+
| `nullable` | Boolean | No | Specifies whether null is <br/>an allowed value. |
404+
| `isSecret` | Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `json` and `hidden` editors. |
404405

405406
### Array
406407

@@ -450,6 +451,7 @@ Properties:
450451
| `uniqueItems` | Boolean | No | Specifies whether the array <br/>should contain only unique values. |
451452
| `nullable` | Boolean | No | Specifies whether null is <br/>an allowed value. |
452453
| `items` | object | No | Specifies format of the items of the array, useful mainly for multiselect (see below) |
454+
| `isSecret` | Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `json` and `hidden` editors. |
453455

454456

455457
Usage of this field is based on the selected editor:

0 commit comments

Comments
 (0)