-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add resourceType property to support storage picker #1261
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a1d2847
docs: add resourceType property to support storage picker
MFori 771cf83
address PR comments
MFori cd3e685
Update sources/platform/actors/development/actor_definition/input_sch…
MFori 91fb482
Update sources/platform/actors/development/actor_definition/input_sch…
MFori 9f18a10
fix typos
MFori 2e19ade
add screenshot for multiple resources input
MFori File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+40.2 KB
.../development/actor_definition/input_schema/images/input-schema-dataset-json.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+76.5 KB
...ctors/development/actor_definition/input_schema/images/input-schema-dataset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -409,3 +409,41 @@ Editor type `select` allows the user to pick items from a select, providing mult | |
``` | ||
|
||
To correctly define options for multiselect, you need to define the `items` property and then provide values and (optionally) labels in `enum` and `enumTitles` properties. | ||
|
||
### Resource | ||
|
||
The Resource property enables Actor users to select different types of resources. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd say that: Resource type identifies what kind of object is referred to in the input field. For example, a the Key-value store resource type can be referred to using a string ID. |
||
Currently, it supports storage resources, allowing the selection of a Dataset, Key-Value Store, or Request Queue. | ||
|
||
For Actor developers, the resource input value is a string representing the storage ID. | ||
The type of the property is either `string` or `array` (for multiple resources). | ||
In the user interface, a picker is provided for easy selection, where users can search and choose from their own storages or those they have access to. | ||
|
||
Example of a Dataset input: | ||
|
||
```json | ||
{ | ||
"title": "Dataset", | ||
"type": "string", | ||
"description": "Select a dataset", | ||
"resourceType": "dataset" | ||
} | ||
``` | ||
|
||
Rendered input: | ||
|
||
![Apify Actor input schema dataset](./images/input-schema-dataset.png) | ||
|
||
JSON value: | ||
|
||
![Apify Actor input schema dataset](./images/input-schema-dataset-json.png) | ||
|
||
Properties: | ||
|
||
| Property | Value | Required | Description | | ||
|----------------|-----------------------------------------------------------------------------------|----------|------------------------------------------------------------------------------------| | ||
| `type` | One of <ul><li>`string`</li><li>`array`</li></ul> | Yes | Specifies the type of input - string for single value or array for multiple values | | ||
| `editor` | One of <ul><li>`resourcePicker`</li><li>`hidden`</li></ul> | No | Visual editor used for <br/>the input field. Defaults to `resourcePicker`. | | ||
| `resourceType` | One of <ul><li>`dataset`</li><li>`keyValueStore`</li><li>`requestQueue`</li></ul> | Yes | Type of resource | | ||
MFori marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| `minItems` | Integer | No | Minimum number of items the array can contain. Only for `type: array` | | ||
| `maxItems` | Integer | No | Maximum number of items the array can contain. Only for `type: array` | |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not "Resource type" ?