Skip to content

Commit c9a4a9d

Browse files
authored
feat(input_schema): storage editor types (#476)
This PR introduce new input schema `editor` values for `string` property: `dataset`, `keyValueStore` and `requestQueue` based on issue: apify/apify-core#12871 The editor will show storage inputs enabling users to search and select storage, then the storage id is taken as field value. Input PR waiting for this: apify/apify-core#17521 Docs PR: apify/apify-docs#1211
1 parent 8a492ec commit c9a4a9d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/input_schema/src/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"title": { "type": "string" },
8787
"description": { "type": "string" },
8888
"nullable": { "type": "boolean" },
89-
"editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "hidden"] },
89+
"editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "hidden", "dataset", "keyValueStore", "requestQueue"] },
9090
"isSecret": { "type": "boolean" }
9191
},
9292
"required": ["type", "title", "description", "editor"],
@@ -112,7 +112,7 @@
112112
"nullable": { "type": "boolean" },
113113
"minLength": { "type": "integer" },
114114
"maxLength": { "type": "integer" },
115-
"editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "hidden"] },
115+
"editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "hidden", "dataset", "keyValueStore", "requestQueue"] },
116116
"isSecret": { "type": "boolean" },
117117
"sectionCaption": { "type": "string" },
118118
"sectionDescription": { "type": "string" }

packages/input_schema/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type CommonFieldDefinition<T> = {
1111

1212
export type StringFieldDefinition = CommonFieldDefinition<string> & {
1313
type: 'string'
14-
editor: 'textfield' | 'textarea' | 'javascript' | 'python' | 'select' | 'datepicker' | 'hidden' | 'json';
14+
editor: 'textfield' | 'textarea' | 'javascript' | 'python' | 'select' | 'datepicker' | 'hidden' | 'json' | 'dataset' | 'keyValueStore' | 'requestQueue';
1515
pattern?: string;
1616
minLength?: number;
1717
maxLength?: number;

test/input_schema.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ describe('input_schema.json', () => {
156156

157157
expect(() => validateInputSchema(validator, schema)).toThrow(
158158
'Input schema is not valid (Field schema.properties.myField.editor must be equal to one of the allowed values: '
159-
+ '"javascript", "python", "textfield", "textarea", "datepicker", "hidden")',
159+
+ '"javascript", "python", "textfield", "textarea", "datepicker", "hidden", "dataset", "keyValueStore", "requestQueue")',
160160
);
161161
});
162162

0 commit comments

Comments
 (0)