@apify/input_schema 3.17.0 → 3.18.1

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/esm/index.mjs CHANGED
@@ -90,13 +90,12 @@ var schema_default = {
90
90
  stringEnumProperty: {
91
91
  title: "Enum property",
92
92
  type: "object",
93
- additionalProperties: false,
93
+ unevaluatedProperties: false,
94
94
  properties: {
95
95
  type: { enum: ["string"] },
96
96
  editor: { enum: ["select"] },
97
97
  title: { type: "string" },
98
98
  description: { type: "string" },
99
- default: { type: "string" },
100
99
  prefill: { type: "string" },
101
100
  example: { type: "string" },
102
101
  nullable: { type: "boolean" },
@@ -114,7 +113,16 @@ var schema_default = {
114
113
  minItems: 1
115
114
  }
116
115
  },
117
- required: ["type", "title", "description", "enum"]
116
+ required: ["type", "title", "description", "enum"],
117
+ if: {
118
+ properties: { nullable: { const: false } }
119
+ },
120
+ then: {
121
+ properties: { default: { type: "string" } }
122
+ },
123
+ else: {
124
+ properties: { default: { type: ["string", "null"] } }
125
+ }
118
126
  },
119
127
  stringProperty: {
120
128
  title: "String property",
@@ -139,49 +147,52 @@ var schema_default = {
139
147
  }
140
148
  },
141
149
  then: {
142
- if: {
143
- properties: {
144
- editor: { const: "datepicker" }
145
- }
146
- },
147
- then: {
148
- additionalProperties: false,
149
- properties: {
150
- type: { enum: ["string"] },
151
- title: { type: "string" },
152
- description: { type: "string" },
153
- default: { type: "string" },
154
- prefill: { type: "string" },
155
- example: { type: "string" },
156
- pattern: { type: "string" },
157
- nullable: { type: "boolean" },
158
- minLength: { type: "integer" },
159
- maxLength: { type: "integer" },
160
- editor: { enum: ["datepicker"] },
161
- sectionCaption: { type: "string" },
162
- sectionDescription: { type: "string" },
163
- dateType: { enum: ["absolute", "relative", "absoluteOrRelative"] }
164
- }
150
+ properties: {
151
+ type: { enum: ["string"] },
152
+ title: { type: "string" },
153
+ description: { type: "string" },
154
+ prefill: { type: "string" },
155
+ example: { type: "string" },
156
+ pattern: { type: "string" },
157
+ nullable: { type: "boolean" },
158
+ minLength: { type: "integer" },
159
+ maxLength: { type: "integer" },
160
+ sectionCaption: { type: "string" },
161
+ sectionDescription: { type: "string" },
162
+ isSecret: { enum: [false] }
165
163
  },
166
- else: {
167
- additionalProperties: false,
168
- properties: {
169
- type: { enum: ["string"] },
170
- title: { type: "string" },
171
- description: { type: "string" },
172
- default: { type: "string" },
173
- prefill: { type: "string" },
174
- example: { type: "string" },
175
- pattern: { type: "string" },
176
- nullable: { type: "boolean" },
177
- minLength: { type: "integer" },
178
- maxLength: { type: "integer" },
179
- editor: { enum: ["javascript", "python", "textfield", "textarea", "hidden", "fileupload"] },
180
- isSecret: { enum: [false] },
181
- sectionCaption: { type: "string" },
182
- sectionDescription: { type: "string" }
164
+ unevaluatedProperties: false,
165
+ allOf: [
166
+ {
167
+ if: {
168
+ properties: {
169
+ editor: { const: "datepicker" }
170
+ }
171
+ },
172
+ then: {
173
+ properties: {
174
+ editor: { enum: ["datepicker"] },
175
+ dateType: { enum: ["absolute", "relative", "absoluteOrRelative"] }
176
+ }
177
+ },
178
+ else: {
179
+ properties: {
180
+ editor: { enum: ["javascript", "python", "textfield", "textarea", "hidden", "fileupload"] }
181
+ }
182
+ }
183
+ },
184
+ {
185
+ if: {
186
+ properties: { nullable: { const: false } }
187
+ },
188
+ then: {
189
+ properties: { default: { type: "string" } }
190
+ },
191
+ else: {
192
+ properties: { default: { type: ["string", "null"] } }
193
+ }
183
194
  }
184
- }
195
+ ]
185
196
  },
186
197
  else: {
187
198
  additionalProperties: false,
@@ -218,7 +229,6 @@ var schema_default = {
218
229
  type: { enum: ["array"] },
219
230
  title: { type: "string" },
220
231
  description: { type: "string" },
221
- default: { type: "array" },
222
232
  prefill: { type: "array" },
223
233
  example: { type: "array" },
224
234
  nullable: { type: "boolean" },
@@ -234,59 +244,74 @@ var schema_default = {
234
244
  isSecret: { enum: [false] }
235
245
  },
236
246
  unevaluatedProperties: false,
237
- oneOf: [
238
- {
239
- required: ["editor"],
240
- properties: {
241
- editor: { enum: ["select"] },
242
- items: { $ref: "#/definitions/arrayItemsSelect" }
243
- }
244
- },
245
- {
246
- required: ["editor"],
247
- properties: {
248
- editor: { enum: ["keyValue"] },
249
- items: { $ref: "#/definitions/arrayItemsKeyValue" }
250
- }
251
- },
252
- {
253
- required: ["editor"],
254
- properties: {
255
- editor: { enum: ["stringList"] },
256
- items: { $ref: "#/definitions/arrayItemsStringList" }
257
- }
258
- },
259
- {
260
- required: ["editor"],
261
- properties: {
262
- editor: { enum: ["globs"] },
263
- items: { $ref: "#/definitions/arrayItemsGlobs" }
264
- }
265
- },
247
+ allOf: [
266
248
  {
267
- required: ["editor"],
268
- properties: {
269
- editor: { enum: ["pseudoUrls"] },
270
- items: { $ref: "#/definitions/arrayItemsPseudoUrls" }
271
- }
272
- },
273
- {
274
- required: ["editor"],
275
- properties: {
276
- editor: { enum: ["requestListSources"] },
277
- items: { $ref: "#/definitions/arrayItemsRequestListSources" }
278
- }
249
+ oneOf: [
250
+ {
251
+ required: ["editor"],
252
+ properties: {
253
+ editor: { enum: ["select"] },
254
+ items: { $ref: "#/definitions/arrayItemsSelect" }
255
+ }
256
+ },
257
+ {
258
+ required: ["editor"],
259
+ properties: {
260
+ editor: { enum: ["keyValue"] },
261
+ items: { $ref: "#/definitions/arrayItemsKeyValue" }
262
+ }
263
+ },
264
+ {
265
+ required: ["editor"],
266
+ properties: {
267
+ editor: { enum: ["stringList"] },
268
+ items: { $ref: "#/definitions/arrayItemsStringList" }
269
+ }
270
+ },
271
+ {
272
+ required: ["editor"],
273
+ properties: {
274
+ editor: { enum: ["globs"] },
275
+ items: { $ref: "#/definitions/arrayItemsGlobs" }
276
+ }
277
+ },
278
+ {
279
+ required: ["editor"],
280
+ properties: {
281
+ editor: { enum: ["pseudoUrls"] },
282
+ items: { $ref: "#/definitions/arrayItemsPseudoUrls" }
283
+ }
284
+ },
285
+ {
286
+ required: ["editor"],
287
+ properties: {
288
+ editor: { enum: ["requestListSources"] },
289
+ items: { $ref: "#/definitions/arrayItemsRequestListSources" }
290
+ }
291
+ },
292
+ {
293
+ required: ["editor"],
294
+ properties: {
295
+ editor: { enum: ["json", "schemaBased", "hidden"] },
296
+ items: { $ref: "#/definitions/arrayItems" }
297
+ }
298
+ },
299
+ {
300
+ not: { required: ["editor"] },
301
+ properties: { items: { $ref: "#/definitions/arrayItems" } }
302
+ }
303
+ ]
279
304
  },
280
305
  {
281
- required: ["editor"],
282
- properties: {
283
- editor: { enum: ["json", "schemaBased", "hidden"] },
284
- items: { $ref: "#/definitions/arrayItems" }
306
+ if: {
307
+ properties: { nullable: { const: false } }
308
+ },
309
+ then: {
310
+ properties: { default: { type: "array" } }
311
+ },
312
+ else: {
313
+ properties: { default: { type: ["array", "null"] } }
285
314
  }
286
- },
287
- {
288
- not: { required: ["editor"] },
289
- properties: { items: { $ref: "#/definitions/arrayItems" } }
290
315
  }
291
316
  ]
292
317
  },
@@ -331,7 +356,6 @@ var schema_default = {
331
356
  type: { enum: ["object"] },
332
357
  title: { type: "string" },
333
358
  description: { type: "string" },
334
- default: { type: "object" },
335
359
  prefill: { type: "object" },
336
360
  example: { type: "object" },
337
361
  patternKey: { type: "string" },
@@ -354,15 +378,30 @@ var schema_default = {
354
378
  }
355
379
  },
356
380
  unevaluatedProperties: false,
357
- oneOf: [
358
- { properties: {
359
- editor: { enum: ["proxy"] },
360
- properties: { $ref: "#/definitions/subObjectPropertiesProxy" }
361
- } },
362
- { properties: {
363
- editor: { enum: ["json", "schemaBased", "hidden"] },
364
- properties: { $ref: "#/definitions/subObjectProperties" }
365
- } }
381
+ allOf: [
382
+ {
383
+ oneOf: [
384
+ { properties: {
385
+ editor: { enum: ["proxy"] },
386
+ properties: { $ref: "#/definitions/subObjectPropertiesProxy" }
387
+ } },
388
+ { properties: {
389
+ editor: { enum: ["json", "schemaBased", "hidden"] },
390
+ properties: { $ref: "#/definitions/subObjectProperties" }
391
+ } }
392
+ ]
393
+ },
394
+ {
395
+ if: {
396
+ properties: { nullable: { const: false } }
397
+ },
398
+ then: {
399
+ properties: { default: { type: "object" } }
400
+ },
401
+ else: {
402
+ properties: { default: { type: ["object", "null"] } }
403
+ }
404
+ }
366
405
  ]
367
406
  },
368
407
  else: {
@@ -398,12 +437,11 @@ var schema_default = {
398
437
  integerProperty: {
399
438
  title: "Integer property",
400
439
  type: "object",
401
- additionalProperties: false,
440
+ unevaluatedProperties: false,
402
441
  properties: {
403
442
  type: { enum: ["integer"] },
404
443
  title: { type: "string" },
405
444
  description: { type: "string" },
406
- default: { type: "integer" },
407
445
  prefill: { type: "integer" },
408
446
  example: { type: "integer" },
409
447
  nullable: { type: "boolean" },
@@ -414,17 +452,25 @@ var schema_default = {
414
452
  sectionCaption: { type: "string" },
415
453
  sectionDescription: { type: "string" }
416
454
  },
417
- required: ["type", "title", "description"]
455
+ required: ["type", "title", "description"],
456
+ if: {
457
+ properties: { nullable: { const: false } }
458
+ },
459
+ then: {
460
+ properties: { default: { type: "integer" } }
461
+ },
462
+ else: {
463
+ properties: { default: { type: ["integer", "null"] } }
464
+ }
418
465
  },
419
466
  booleanProperty: {
420
467
  title: "Boolean property",
421
468
  type: "object",
422
- additionalProperties: false,
469
+ unevaluatedProperties: false,
423
470
  properties: {
424
471
  type: { enum: ["boolean"] },
425
472
  title: { type: "string" },
426
473
  description: { type: "string" },
427
- default: { type: "boolean" },
428
474
  prefill: { type: "boolean" },
429
475
  example: { type: "boolean" },
430
476
  nullable: { type: "boolean" },
@@ -434,12 +480,21 @@ var schema_default = {
434
480
  sectionCaption: { type: "string" },
435
481
  sectionDescription: { type: "string" }
436
482
  },
437
- required: ["type", "title", "description"]
483
+ required: ["type", "title", "description"],
484
+ if: {
485
+ properties: { nullable: { const: false } }
486
+ },
487
+ then: {
488
+ properties: { default: { type: "boolean" } }
489
+ },
490
+ else: {
491
+ properties: { default: { type: ["boolean", "null"] } }
492
+ }
438
493
  },
439
494
  resourceProperty: {
440
495
  title: "Resource property",
441
496
  type: "object",
442
- additionalProperties: false,
497
+ unevaluatedProperties: false,
443
498
  properties: {
444
499
  type: { enum: ["string"] },
445
500
  title: { type: "string" },
@@ -458,7 +513,6 @@ var schema_default = {
458
513
  const: "READ"
459
514
  }
460
515
  },
461
- default: { type: "string" },
462
516
  prefill: { type: "string" },
463
517
  example: { type: "string" },
464
518
  nullable: { type: "boolean" },
@@ -479,13 +533,24 @@ var schema_default = {
479
533
  ]
480
534
  }
481
535
  }
536
+ },
537
+ {
538
+ if: {
539
+ properties: { nullable: { const: false } }
540
+ },
541
+ then: {
542
+ properties: { default: { type: "string" } }
543
+ },
544
+ else: {
545
+ properties: { default: { type: ["string", "null"] } }
546
+ }
482
547
  }
483
548
  ]
484
549
  },
485
550
  resourceArrayProperty: {
486
551
  title: "Resource array property",
487
552
  type: "object",
488
- additionalProperties: false,
553
+ unevaluatedProperties: false,
489
554
  properties: {
490
555
  type: { enum: ["array"] },
491
556
  title: { type: "string" },
@@ -503,7 +568,6 @@ var schema_default = {
503
568
  const: "READ"
504
569
  }
505
570
  },
506
- default: { type: "array" },
507
571
  prefill: { type: "array" },
508
572
  example: { type: "array" },
509
573
  nullable: { type: "boolean" },
@@ -528,13 +592,24 @@ var schema_default = {
528
592
  ]
529
593
  }
530
594
  }
595
+ },
596
+ {
597
+ if: {
598
+ properties: { nullable: { const: false } }
599
+ },
600
+ then: {
601
+ properties: { default: { type: "array" } }
602
+ },
603
+ else: {
604
+ properties: { default: { type: ["array", "null"] } }
605
+ }
531
606
  }
532
607
  ]
533
608
  },
534
609
  anyProperty: {
535
610
  title: "Any property",
536
611
  type: "object",
537
- additionalProperties: false,
612
+ unevaluatedProperties: false,
538
613
  properties: {
539
614
  type: {
540
615
  type: ["array"],
@@ -548,7 +623,6 @@ var schema_default = {
548
623
  },
549
624
  title: { type: "string" },
550
625
  description: { type: "string" },
551
- default: { type: ["object", "array", "string", "integer", "boolean"] },
552
626
  prefill: { type: ["object", "array", "string", "integer", "boolean"] },
553
627
  example: { type: ["object", "array", "string", "integer", "boolean"] },
554
628
  nullable: { type: "boolean" },
@@ -556,7 +630,16 @@ var schema_default = {
556
630
  sectionCaption: { type: "string" },
557
631
  sectionDescription: { type: "string" }
558
632
  },
559
- required: ["type", "title", "description", "editor"]
633
+ required: ["type", "title", "description", "editor"],
634
+ if: {
635
+ properties: { nullable: { const: false } }
636
+ },
637
+ then: {
638
+ properties: { default: { type: ["object", "array", "string", "integer", "boolean"] } }
639
+ },
640
+ else: {
641
+ properties: { default: { type: ["object", "array", "string", "integer", "boolean", "null"] } }
642
+ }
560
643
  },
561
644
  subSchemaStringEnumProperty: {
562
645
  title: "Sub-schema: Enum property",