diff --git a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md index 41a17fa4ec..6fbcc5a3d9 100644 --- a/sources/platform/actors/development/actor_definition/input_schema/secret_input.md +++ b/sources/platform/actors/development/actor_definition/input_schema/secret_input.md @@ -37,15 +37,21 @@ The editor for this input field will then turn into a secret input, and when you Secret input editor +When you run the Actor through the API, the system automatically encrypts any input fields marked as secret before saving them to the Actor run's default key-value store. + :::note Type restriction -This is only available for `string` inputs, and the editor type is limited to `textfield` or `textarea`. +This feature supports `string`, `object`, and `array` input types. Available editor types include: + +- `hidden` (for any supported input type) +- `textfield` and `textarea` (for string inputs) +- `json` (for `object` and `array` inputs) ::: ## Read secret input fields -When you read the Actor input through `Actor.getInput()`, the encrypted fields are automatically decrypted (starting with the [`apify` package](https://www.npmjs.com/package/apify) version 3.1.0). +When you read the Actor input through `Actor.getInput()`, the encrypted fields are automatically decrypted. Decryption of string fields is supported since [JavaScript SDK](http://docs.apify.loc/sdk/js/) 3.1.0; support for objects and arrays was added in [JavaScript SDK](http://docs.apify.loc/sdk/js/) 3.4.2 and [Python SDK](http://docs.apify.loc/sdk/python/) 2.7.0. ```js diff --git a/sources/platform/actors/development/actor_definition/input_schema/specification.md b/sources/platform/actors/development/actor_definition/input_schema/specification.md index f376c6d27d..2bb9b8f636 100644 --- a/sources/platform/actors/development/actor_definition/input_schema/specification.md +++ b/sources/platform/actors/development/actor_definition/input_schema/specification.md @@ -243,16 +243,16 @@ The user provides either a URL or uploads the file to a key-value store (existin Properties: -| Property | Value | Required | Description | -|----------|--------|-----------|-------------| -| `editor` | One of:
- `textfield`
- `textarea`
- `javascript`
- `python`
- `select`
- `datepicker`
- `fileupload`
- `hidden` | Yes | Visual editor used for the input field. | -| `pattern` | String | No | Regular expression that will be used to validate the input. If validation fails, the Actor will not run. | -| `minLength` | Integer | No | Minimum length of the string. | -| `maxLength` | Integer | No | Maximum length of the string. | -| `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. | -| `enumTitles` | [String] | No | Titles for the `enum` keys described. | -| `nullable` | Boolean | No | Specifies whether `null` is an allowed value. | -| `isSecret` | Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `textfield` and `textarea` editors. | +| Property | Value | Required | Description | +|----------|--------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `editor` | One of:
- `textfield`
- `textarea`
- `javascript`
- `python`
- `select`
- `datepicker`
- `fileupload`
- `hidden` | Yes | Visual editor used for the input field. | +| `pattern` | String | No | Regular expression that will be used to validate the input. If validation fails, the Actor will not run. | +| `minLength` | Integer | No | Minimum length of the string. | +| `maxLength` | Integer | No | Maximum length of the string. | +| `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. | +| `enumTitles` | [String] | No | Titles for the `enum` keys described. | +| `nullable` | Boolean | No | Specifies whether `null` is an allowed value. | +| `isSecret` | Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `textfield`, `textarea` and `hidden` editors. | | `dateType` | One of | 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.).


Defaults to `absolute`. | :::note Regex escape @@ -393,14 +393,15 @@ Rendered input: Properties: -| Property | Value | Required | Description | -| --- | --- | --- | --- | -| `editor` | One of | Yes | UI editor used for input. | -| `patternKey` | String | No | Regular expression that will be used
to validate the keys of the object. | -| `patternValue` | String | No | Regular expression that will be used
to validate the values of object. | -| `maxProperties` | Integer | No | Maximum number of properties
the object can have. | -| `minProperties` | Integer | No | Minimum number of properties
the object can have. | -| `nullable` | Boolean | No | Specifies whether null is
an allowed value. | +| Property | Value | Required | Description | +| --- | --- | --- |--------------------------------------------------------------------------------------------------------------| +| `editor` | One of | Yes | UI editor used for input. | +| `patternKey` | String | No | Regular expression that will be used
to validate the keys of the object. | +| `patternValue` | String | No | Regular expression that will be used
to validate the values of object. | +| `maxProperties` | Integer | No | Maximum number of properties
the object can have. | +| `minProperties` | Integer | No | Minimum number of properties
the object can have. | +| `nullable` | Boolean | No | Specifies whether null is
an allowed value. | +| `isSecret` | Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `json` and `hidden` editors. | ### Array @@ -450,6 +451,7 @@ Properties: | `uniqueItems` | Boolean | No | Specifies whether the array
should contain only unique values. | | `nullable` | Boolean | No | Specifies whether null is
an allowed value. | | `items` | object | No | Specifies format of the items of the array, useful mainly for multiselect (see below) | +| `isSecret` | Boolean | No | Specifies whether the input field will be stored encrypted. Only available with `json` and `hidden` editors. | Usage of this field is based on the selected editor: