@apify/input_schema 3.5.10 → 3.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{index.js → cjs/index.cjs} +1 -1
- package/cjs/index.cjs.map +1 -0
- package/cjs/index.d.ts +711 -0
- package/esm/index.d.mts +711 -0
- package/esm/index.mjs.map +1 -0
- package/package.json +16 -11
- package/index.d.ts +0 -3
- package/index.js.map +0 -1
- package/index.mjs.map +0 -1
- package/input_schema.d.ts +0 -29
- package/intl.d.ts +0 -4
- package/schema.json +0 -284
- package/utilities.d.ts +0 -22
- /package/{index.mjs → esm/index.mjs} +0 -0
package/schema.json
DELETED
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "JSON schema of Apify Actor INPUT_SCHEMA.json",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"$schema": {
|
|
6
|
-
"type": "string"
|
|
7
|
-
},
|
|
8
|
-
"title": {
|
|
9
|
-
"type": "string"
|
|
10
|
-
},
|
|
11
|
-
"schemaVersion": {
|
|
12
|
-
"type": "integer",
|
|
13
|
-
"minimum": 1,
|
|
14
|
-
"maximum": 1
|
|
15
|
-
},
|
|
16
|
-
"description": {
|
|
17
|
-
"type": "string"
|
|
18
|
-
},
|
|
19
|
-
"type": {
|
|
20
|
-
"enum": ["object"]
|
|
21
|
-
},
|
|
22
|
-
"required": {
|
|
23
|
-
"type": "array",
|
|
24
|
-
"minItems": 0,
|
|
25
|
-
"items": { "type": "string" },
|
|
26
|
-
"uniqueItems": true
|
|
27
|
-
},
|
|
28
|
-
"additionalProperties": {
|
|
29
|
-
"type": "boolean"
|
|
30
|
-
},
|
|
31
|
-
"properties": {
|
|
32
|
-
"type": "object",
|
|
33
|
-
"patternProperties": {
|
|
34
|
-
"^": {
|
|
35
|
-
"oneOf": [
|
|
36
|
-
{ "$ref": "#/definitions/stringProperty" },
|
|
37
|
-
{ "$ref": "#/definitions/stringEnumProperty" },
|
|
38
|
-
{ "$ref": "#/definitions/arrayProperty" },
|
|
39
|
-
{ "$ref": "#/definitions/objectProperty" },
|
|
40
|
-
{ "$ref": "#/definitions/integerProperty" },
|
|
41
|
-
{ "$ref": "#/definitions/booleanProperty" },
|
|
42
|
-
{ "$ref": "#/definitions/anyProperty" }
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"additionalProperties": false,
|
|
49
|
-
"required": ["title", "type", "properties", "schemaVersion"],
|
|
50
|
-
"definitions": {
|
|
51
|
-
"stringEnumProperty": {
|
|
52
|
-
"title": "Enum property",
|
|
53
|
-
"type": "object",
|
|
54
|
-
"additionalProperties": false,
|
|
55
|
-
"properties": {
|
|
56
|
-
"type": { "enum": ["string"] },
|
|
57
|
-
"editor": { "enum": ["select"] },
|
|
58
|
-
"title": { "type": "string" },
|
|
59
|
-
"description": { "type": "string" },
|
|
60
|
-
"default": { "type": "string" },
|
|
61
|
-
"prefill": { "type": "string" },
|
|
62
|
-
"example": { "type": "string" },
|
|
63
|
-
"nullable": { "type": "boolean" },
|
|
64
|
-
"sectionCaption": { "type": "string" },
|
|
65
|
-
"sectionDescription": { "type": "string" },
|
|
66
|
-
"enum": {
|
|
67
|
-
"type": "array",
|
|
68
|
-
"items": { "type": "string" },
|
|
69
|
-
"minItems": 1,
|
|
70
|
-
"uniqueItems": true
|
|
71
|
-
},
|
|
72
|
-
"enumTitles": {
|
|
73
|
-
"type": "array",
|
|
74
|
-
"items": { "type": "string" },
|
|
75
|
-
"minItems": 1
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"required": ["type", "title", "description", "enum"]
|
|
79
|
-
},
|
|
80
|
-
"stringProperty": {
|
|
81
|
-
"title": "String property",
|
|
82
|
-
"type": "object",
|
|
83
|
-
"additionalProperties": true,
|
|
84
|
-
"properties": {
|
|
85
|
-
"type": { "enum": ["string"] },
|
|
86
|
-
"title": { "type": "string" },
|
|
87
|
-
"description": { "type": "string" },
|
|
88
|
-
"nullable": { "type": "boolean" },
|
|
89
|
-
"editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "hidden"] },
|
|
90
|
-
"isSecret": { "type": "boolean" }
|
|
91
|
-
},
|
|
92
|
-
"required": ["type", "title", "description", "editor"],
|
|
93
|
-
"if": {
|
|
94
|
-
"properties": {
|
|
95
|
-
"isSecret": {
|
|
96
|
-
"not": {
|
|
97
|
-
"const": true
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"then": {
|
|
103
|
-
"additionalProperties": false,
|
|
104
|
-
"properties": {
|
|
105
|
-
"type": { "enum": ["string"] },
|
|
106
|
-
"title": { "type": "string" },
|
|
107
|
-
"description": { "type": "string" },
|
|
108
|
-
"default": { "type": "string" },
|
|
109
|
-
"prefill": { "type": "string" },
|
|
110
|
-
"example": { "type": "string" },
|
|
111
|
-
"pattern": { "type": "string" },
|
|
112
|
-
"nullable": { "type": "boolean" },
|
|
113
|
-
"minLength": { "type": "integer" },
|
|
114
|
-
"maxLength": { "type": "integer" },
|
|
115
|
-
"editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "hidden"] },
|
|
116
|
-
"isSecret": { "type": "boolean" },
|
|
117
|
-
"sectionCaption": { "type": "string" },
|
|
118
|
-
"sectionDescription": { "type": "string" }
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"else": {
|
|
122
|
-
"additionalProperties": false,
|
|
123
|
-
"properties": {
|
|
124
|
-
"type": { "enum": ["string"] },
|
|
125
|
-
"title": { "type": "string" },
|
|
126
|
-
"description": { "type": "string" },
|
|
127
|
-
"example": { "type": "string" },
|
|
128
|
-
"nullable": { "type": "boolean" },
|
|
129
|
-
"editor": { "enum": ["textfield", "textarea", "hidden"] },
|
|
130
|
-
"isSecret": { "type": "boolean" },
|
|
131
|
-
"sectionCaption": { "type": "string" },
|
|
132
|
-
"sectionDescription": { "type": "string" }
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
"arrayProperty": {
|
|
137
|
-
"title": "Array property",
|
|
138
|
-
"type": "object",
|
|
139
|
-
"properties": {
|
|
140
|
-
"type": { "enum": ["array"] },
|
|
141
|
-
"editor": { "enum": ["json", "requestListSources", "pseudoUrls", "globs", "keyValue", "stringList", "select", "hidden"] },
|
|
142
|
-
"title": { "type": "string" },
|
|
143
|
-
"description": { "type": "string" },
|
|
144
|
-
"default": { "type": "array" },
|
|
145
|
-
"prefill": { "type": "array" },
|
|
146
|
-
"example": { "type": "array" },
|
|
147
|
-
"nullable": { "type": "boolean" },
|
|
148
|
-
"minItems": { "type": "integer" },
|
|
149
|
-
"maxItems": { "type": "integer" },
|
|
150
|
-
"uniqueItems": { "type": "boolean" },
|
|
151
|
-
|
|
152
|
-
"sectionCaption": { "type": "string" },
|
|
153
|
-
"sectionDescription": { "type": "string" }
|
|
154
|
-
},
|
|
155
|
-
"additionalProperties": true,
|
|
156
|
-
"required": ["type", "title", "description", "editor"],
|
|
157
|
-
"if": {
|
|
158
|
-
"properties": {
|
|
159
|
-
"editor": { "const": "select" }
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
"then": {
|
|
163
|
-
"required": ["items"],
|
|
164
|
-
"properties": {
|
|
165
|
-
"items": {
|
|
166
|
-
"type": "object",
|
|
167
|
-
"additionalProperties": false,
|
|
168
|
-
"properties": {
|
|
169
|
-
"type": { "enum": ["string"] },
|
|
170
|
-
"enum": {
|
|
171
|
-
"type": "array",
|
|
172
|
-
"items": { "type": "string" },
|
|
173
|
-
"uniqueItems": true
|
|
174
|
-
},
|
|
175
|
-
"enumTitles": {
|
|
176
|
-
"type": "array",
|
|
177
|
-
"items": { "type": "string" }
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
"required": ["type", "enum"]
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
"else": {
|
|
185
|
-
"properties": {
|
|
186
|
-
"placeholderKey": { "type": "string" },
|
|
187
|
-
"placeholderValue": { "type": "string" },
|
|
188
|
-
"patternKey": { "type": "string" },
|
|
189
|
-
"patternValue": { "type": "string" }
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
"objectProperty": {
|
|
194
|
-
"title": "Object property",
|
|
195
|
-
"type": "object",
|
|
196
|
-
"additionalProperties": false,
|
|
197
|
-
"properties": {
|
|
198
|
-
"type": { "enum": ["object"] },
|
|
199
|
-
"title": { "type": "string" },
|
|
200
|
-
"description": { "type": "string" },
|
|
201
|
-
"default": { "type": "object" },
|
|
202
|
-
"prefill": { "type": "object" },
|
|
203
|
-
"example": { "type": "object" },
|
|
204
|
-
"patternKey": { "type": "string" },
|
|
205
|
-
"patternValue": { "type": "string" },
|
|
206
|
-
"nullable": { "type": "boolean" },
|
|
207
|
-
"minProperties": { "type": "integer" },
|
|
208
|
-
"maxProperties": { "type": "integer" },
|
|
209
|
-
|
|
210
|
-
"editor": { "enum": ["json", "proxy", "hidden"] },
|
|
211
|
-
"sectionCaption": { "type": "string" },
|
|
212
|
-
"sectionDescription": { "type": "string" }
|
|
213
|
-
},
|
|
214
|
-
"required": ["type", "title", "description", "editor"]
|
|
215
|
-
},
|
|
216
|
-
"integerProperty": {
|
|
217
|
-
"title": "Integer property",
|
|
218
|
-
"type": "object",
|
|
219
|
-
"additionalProperties": false,
|
|
220
|
-
"properties": {
|
|
221
|
-
"type": { "enum": ["integer"] },
|
|
222
|
-
"title": { "type": "string" },
|
|
223
|
-
"description": { "type": "string" },
|
|
224
|
-
"default": { "type": "integer" },
|
|
225
|
-
"prefill": { "type": "integer" },
|
|
226
|
-
"example": { "type": "integer" },
|
|
227
|
-
"nullable": { "type": "boolean" },
|
|
228
|
-
"minimum": { "type": "integer" },
|
|
229
|
-
"maximum": { "type": "integer" },
|
|
230
|
-
"unit": { "type": "string" },
|
|
231
|
-
"editor": { "enum": ["number", "hidden"] },
|
|
232
|
-
"sectionCaption": { "type": "string" },
|
|
233
|
-
"sectionDescription": { "type": "string" }
|
|
234
|
-
},
|
|
235
|
-
"required": ["type", "title", "description"]
|
|
236
|
-
},
|
|
237
|
-
"booleanProperty": {
|
|
238
|
-
"title": "Boolean property",
|
|
239
|
-
"type": "object",
|
|
240
|
-
"additionalProperties": false,
|
|
241
|
-
"properties": {
|
|
242
|
-
"type": { "enum": ["boolean"] },
|
|
243
|
-
"title": { "type": "string" },
|
|
244
|
-
"description": { "type": "string" },
|
|
245
|
-
"default": { "type": "boolean" },
|
|
246
|
-
"example": { "type": "boolean" },
|
|
247
|
-
"nullable": { "type": "boolean" },
|
|
248
|
-
"groupCaption": { "type": "string" },
|
|
249
|
-
"groupDescription": { "type": "string" },
|
|
250
|
-
"editor": { "enum": ["checkbox", "hidden"] },
|
|
251
|
-
"sectionCaption": { "type": "string" },
|
|
252
|
-
"sectionDescription": { "type": "string" }
|
|
253
|
-
},
|
|
254
|
-
"required": ["type", "title", "description"]
|
|
255
|
-
},
|
|
256
|
-
"anyProperty": {
|
|
257
|
-
"title": "Any property",
|
|
258
|
-
"type": "object",
|
|
259
|
-
"additionalProperties": false,
|
|
260
|
-
"properties": {
|
|
261
|
-
"type": {
|
|
262
|
-
"type": ["array"],
|
|
263
|
-
"items": {
|
|
264
|
-
"type": "string",
|
|
265
|
-
"enum": ["object", "array", "string", "integer", "boolean"]
|
|
266
|
-
},
|
|
267
|
-
"uniqueItems": true,
|
|
268
|
-
"additionalItems": false,
|
|
269
|
-
"minItems": 1
|
|
270
|
-
},
|
|
271
|
-
"title": { "type": "string" },
|
|
272
|
-
"description": { "type": "string" },
|
|
273
|
-
"default": { "type": ["object", "array", "string", "integer", "boolean"] },
|
|
274
|
-
"prefill": { "type": ["object", "array", "string", "integer", "boolean"] },
|
|
275
|
-
"example": { "type": ["object", "array", "string", "integer", "boolean"] },
|
|
276
|
-
"nullable": { "type": "boolean" },
|
|
277
|
-
"editor": { "enum": ["json", "hidden"] },
|
|
278
|
-
"sectionCaption": { "type": "string" },
|
|
279
|
-
"sectionDescription": { "type": "string" }
|
|
280
|
-
},
|
|
281
|
-
"required": ["type", "title", "description", "editor"]
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
package/utilities.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ValidateFunction } from 'ajv';
|
|
2
|
-
/**
|
|
3
|
-
* Uses AJV validator to validate input with input schema and then
|
|
4
|
-
* does custom validation for our own properties (nullable, patternKey, patternValue)
|
|
5
|
-
* @param validator Initialized AJV validator
|
|
6
|
-
* @param inputSchema Valid input schema in object
|
|
7
|
-
* @param input Input object to be validated
|
|
8
|
-
* @param options (Optional) Additional validation configuration for certain fields
|
|
9
|
-
*/
|
|
10
|
-
export declare function validateInputUsingValidator(validator: ValidateFunction, inputSchema: Record<string, any>, input: Record<string, unknown>, options?: Record<string, any>): {
|
|
11
|
-
fieldKey: string;
|
|
12
|
-
message: string;
|
|
13
|
-
}[];
|
|
14
|
-
/**
|
|
15
|
-
* This functions parses all given JSON and then takes each of the jsFields.
|
|
16
|
-
* Then if the field:
|
|
17
|
-
* - is valid JS single function it replaces its single line string with a function delacation.
|
|
18
|
-
* - is valid multiline JS code then replaces its single line string with `multiline` string
|
|
19
|
-
* Then stringifies the code with given number of jsonSpacing spaces and finally prefixes whole
|
|
20
|
-
* stringified JSON except the first line with globalSpacing spaces.
|
|
21
|
-
*/
|
|
22
|
-
export declare function makeInputJsFieldsReadable(json: string, jsFields: string[], jsonSpacing?: number, globalSpacing?: number): string;
|
|
File without changes
|