@apify/input_schema 3.17.0 → 3.18.0

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/cjs/index.cjs CHANGED
@@ -121,13 +121,12 @@ var schema_default = {
121
121
  stringEnumProperty: {
122
122
  title: "Enum property",
123
123
  type: "object",
124
- additionalProperties: false,
124
+ unevaluatedProperties: false,
125
125
  properties: {
126
126
  type: { enum: ["string"] },
127
127
  editor: { enum: ["select"] },
128
128
  title: { type: "string" },
129
129
  description: { type: "string" },
130
- default: { type: "string" },
131
130
  prefill: { type: "string" },
132
131
  example: { type: "string" },
133
132
  nullable: { type: "boolean" },
@@ -145,7 +144,16 @@ var schema_default = {
145
144
  minItems: 1
146
145
  }
147
146
  },
148
- required: ["type", "title", "description", "enum"]
147
+ required: ["type", "title", "description", "enum"],
148
+ if: {
149
+ properties: { nullable: { const: false } }
150
+ },
151
+ then: {
152
+ properties: { default: { type: "string" } }
153
+ },
154
+ else: {
155
+ properties: { default: { type: ["string", "null"] } }
156
+ }
149
157
  },
150
158
  stringProperty: {
151
159
  title: "String property",
@@ -170,49 +178,52 @@ var schema_default = {
170
178
  }
171
179
  },
172
180
  then: {
173
- if: {
174
- properties: {
175
- editor: { const: "datepicker" }
176
- }
177
- },
178
- then: {
179
- additionalProperties: false,
180
- properties: {
181
- type: { enum: ["string"] },
182
- title: { type: "string" },
183
- description: { type: "string" },
184
- default: { type: "string" },
185
- prefill: { type: "string" },
186
- example: { type: "string" },
187
- pattern: { type: "string" },
188
- nullable: { type: "boolean" },
189
- minLength: { type: "integer" },
190
- maxLength: { type: "integer" },
191
- editor: { enum: ["datepicker"] },
192
- sectionCaption: { type: "string" },
193
- sectionDescription: { type: "string" },
194
- dateType: { enum: ["absolute", "relative", "absoluteOrRelative"] }
195
- }
181
+ properties: {
182
+ type: { enum: ["string"] },
183
+ title: { type: "string" },
184
+ description: { type: "string" },
185
+ prefill: { type: "string" },
186
+ example: { type: "string" },
187
+ pattern: { type: "string" },
188
+ nullable: { type: "boolean" },
189
+ minLength: { type: "integer" },
190
+ maxLength: { type: "integer" },
191
+ sectionCaption: { type: "string" },
192
+ sectionDescription: { type: "string" },
193
+ isSecret: { enum: [false] }
196
194
  },
197
- else: {
198
- additionalProperties: false,
199
- properties: {
200
- type: { enum: ["string"] },
201
- title: { type: "string" },
202
- description: { type: "string" },
203
- default: { type: "string" },
204
- prefill: { type: "string" },
205
- example: { type: "string" },
206
- pattern: { type: "string" },
207
- nullable: { type: "boolean" },
208
- minLength: { type: "integer" },
209
- maxLength: { type: "integer" },
210
- editor: { enum: ["javascript", "python", "textfield", "textarea", "hidden", "fileupload"] },
211
- isSecret: { enum: [false] },
212
- sectionCaption: { type: "string" },
213
- sectionDescription: { type: "string" }
195
+ unevaluatedProperties: false,
196
+ allOf: [
197
+ {
198
+ if: {
199
+ properties: {
200
+ editor: { const: "datepicker" }
201
+ }
202
+ },
203
+ then: {
204
+ properties: {
205
+ editor: { enum: ["datepicker"] },
206
+ dateType: { enum: ["absolute", "relative", "absoluteOrRelative"] }
207
+ }
208
+ },
209
+ else: {
210
+ properties: {
211
+ editor: { enum: ["javascript", "python", "textfield", "textarea", "hidden", "fileupload"] }
212
+ }
213
+ }
214
+ },
215
+ {
216
+ if: {
217
+ properties: { nullable: { const: false } }
218
+ },
219
+ then: {
220
+ properties: { default: { type: "string" } }
221
+ },
222
+ else: {
223
+ properties: { default: { type: ["string", "null"] } }
224
+ }
214
225
  }
215
- }
226
+ ]
216
227
  },
217
228
  else: {
218
229
  additionalProperties: false,
@@ -249,7 +260,6 @@ var schema_default = {
249
260
  type: { enum: ["array"] },
250
261
  title: { type: "string" },
251
262
  description: { type: "string" },
252
- default: { type: "array" },
253
263
  prefill: { type: "array" },
254
264
  example: { type: "array" },
255
265
  nullable: { type: "boolean" },
@@ -265,59 +275,74 @@ var schema_default = {
265
275
  isSecret: { enum: [false] }
266
276
  },
267
277
  unevaluatedProperties: false,
268
- oneOf: [
269
- {
270
- required: ["editor"],
271
- properties: {
272
- editor: { enum: ["select"] },
273
- items: { $ref: "#/definitions/arrayItemsSelect" }
274
- }
275
- },
276
- {
277
- required: ["editor"],
278
- properties: {
279
- editor: { enum: ["keyValue"] },
280
- items: { $ref: "#/definitions/arrayItemsKeyValue" }
281
- }
282
- },
283
- {
284
- required: ["editor"],
285
- properties: {
286
- editor: { enum: ["stringList"] },
287
- items: { $ref: "#/definitions/arrayItemsStringList" }
288
- }
289
- },
290
- {
291
- required: ["editor"],
292
- properties: {
293
- editor: { enum: ["globs"] },
294
- items: { $ref: "#/definitions/arrayItemsGlobs" }
295
- }
296
- },
278
+ allOf: [
297
279
  {
298
- required: ["editor"],
299
- properties: {
300
- editor: { enum: ["pseudoUrls"] },
301
- items: { $ref: "#/definitions/arrayItemsPseudoUrls" }
302
- }
303
- },
304
- {
305
- required: ["editor"],
306
- properties: {
307
- editor: { enum: ["requestListSources"] },
308
- items: { $ref: "#/definitions/arrayItemsRequestListSources" }
309
- }
280
+ oneOf: [
281
+ {
282
+ required: ["editor"],
283
+ properties: {
284
+ editor: { enum: ["select"] },
285
+ items: { $ref: "#/definitions/arrayItemsSelect" }
286
+ }
287
+ },
288
+ {
289
+ required: ["editor"],
290
+ properties: {
291
+ editor: { enum: ["keyValue"] },
292
+ items: { $ref: "#/definitions/arrayItemsKeyValue" }
293
+ }
294
+ },
295
+ {
296
+ required: ["editor"],
297
+ properties: {
298
+ editor: { enum: ["stringList"] },
299
+ items: { $ref: "#/definitions/arrayItemsStringList" }
300
+ }
301
+ },
302
+ {
303
+ required: ["editor"],
304
+ properties: {
305
+ editor: { enum: ["globs"] },
306
+ items: { $ref: "#/definitions/arrayItemsGlobs" }
307
+ }
308
+ },
309
+ {
310
+ required: ["editor"],
311
+ properties: {
312
+ editor: { enum: ["pseudoUrls"] },
313
+ items: { $ref: "#/definitions/arrayItemsPseudoUrls" }
314
+ }
315
+ },
316
+ {
317
+ required: ["editor"],
318
+ properties: {
319
+ editor: { enum: ["requestListSources"] },
320
+ items: { $ref: "#/definitions/arrayItemsRequestListSources" }
321
+ }
322
+ },
323
+ {
324
+ required: ["editor"],
325
+ properties: {
326
+ editor: { enum: ["json", "schemaBased", "hidden"] },
327
+ items: { $ref: "#/definitions/arrayItems" }
328
+ }
329
+ },
330
+ {
331
+ not: { required: ["editor"] },
332
+ properties: { items: { $ref: "#/definitions/arrayItems" } }
333
+ }
334
+ ]
310
335
  },
311
336
  {
312
- required: ["editor"],
313
- properties: {
314
- editor: { enum: ["json", "schemaBased", "hidden"] },
315
- items: { $ref: "#/definitions/arrayItems" }
337
+ if: {
338
+ properties: { nullable: { const: false } }
339
+ },
340
+ then: {
341
+ properties: { default: { type: "array" } }
342
+ },
343
+ else: {
344
+ properties: { default: { type: ["array", "null"] } }
316
345
  }
317
- },
318
- {
319
- not: { required: ["editor"] },
320
- properties: { items: { $ref: "#/definitions/arrayItems" } }
321
346
  }
322
347
  ]
323
348
  },
@@ -362,7 +387,6 @@ var schema_default = {
362
387
  type: { enum: ["object"] },
363
388
  title: { type: "string" },
364
389
  description: { type: "string" },
365
- default: { type: "object" },
366
390
  prefill: { type: "object" },
367
391
  example: { type: "object" },
368
392
  patternKey: { type: "string" },
@@ -385,15 +409,30 @@ var schema_default = {
385
409
  }
386
410
  },
387
411
  unevaluatedProperties: false,
388
- oneOf: [
389
- { properties: {
390
- editor: { enum: ["proxy"] },
391
- properties: { $ref: "#/definitions/subObjectPropertiesProxy" }
392
- } },
393
- { properties: {
394
- editor: { enum: ["json", "schemaBased", "hidden"] },
395
- properties: { $ref: "#/definitions/subObjectProperties" }
396
- } }
412
+ allOf: [
413
+ {
414
+ oneOf: [
415
+ { properties: {
416
+ editor: { enum: ["proxy"] },
417
+ properties: { $ref: "#/definitions/subObjectPropertiesProxy" }
418
+ } },
419
+ { properties: {
420
+ editor: { enum: ["json", "schemaBased", "hidden"] },
421
+ properties: { $ref: "#/definitions/subObjectProperties" }
422
+ } }
423
+ ]
424
+ },
425
+ {
426
+ if: {
427
+ properties: { nullable: { const: false } }
428
+ },
429
+ then: {
430
+ properties: { default: { type: "object" } }
431
+ },
432
+ else: {
433
+ properties: { default: { type: ["object", "null"] } }
434
+ }
435
+ }
397
436
  ]
398
437
  },
399
438
  else: {
@@ -429,12 +468,11 @@ var schema_default = {
429
468
  integerProperty: {
430
469
  title: "Integer property",
431
470
  type: "object",
432
- additionalProperties: false,
471
+ unevaluatedProperties: false,
433
472
  properties: {
434
473
  type: { enum: ["integer"] },
435
474
  title: { type: "string" },
436
475
  description: { type: "string" },
437
- default: { type: "integer" },
438
476
  prefill: { type: "integer" },
439
477
  example: { type: "integer" },
440
478
  nullable: { type: "boolean" },
@@ -445,17 +483,25 @@ var schema_default = {
445
483
  sectionCaption: { type: "string" },
446
484
  sectionDescription: { type: "string" }
447
485
  },
448
- required: ["type", "title", "description"]
486
+ required: ["type", "title", "description"],
487
+ if: {
488
+ properties: { nullable: { const: false } }
489
+ },
490
+ then: {
491
+ properties: { default: { type: "integer" } }
492
+ },
493
+ else: {
494
+ properties: { default: { type: ["integer", "null"] } }
495
+ }
449
496
  },
450
497
  booleanProperty: {
451
498
  title: "Boolean property",
452
499
  type: "object",
453
- additionalProperties: false,
500
+ unevaluatedProperties: false,
454
501
  properties: {
455
502
  type: { enum: ["boolean"] },
456
503
  title: { type: "string" },
457
504
  description: { type: "string" },
458
- default: { type: "boolean" },
459
505
  prefill: { type: "boolean" },
460
506
  example: { type: "boolean" },
461
507
  nullable: { type: "boolean" },
@@ -465,12 +511,21 @@ var schema_default = {
465
511
  sectionCaption: { type: "string" },
466
512
  sectionDescription: { type: "string" }
467
513
  },
468
- required: ["type", "title", "description"]
514
+ required: ["type", "title", "description"],
515
+ if: {
516
+ properties: { nullable: { const: false } }
517
+ },
518
+ then: {
519
+ properties: { default: { type: "boolean" } }
520
+ },
521
+ else: {
522
+ properties: { default: { type: ["boolean", "null"] } }
523
+ }
469
524
  },
470
525
  resourceProperty: {
471
526
  title: "Resource property",
472
527
  type: "object",
473
- additionalProperties: false,
528
+ unevaluatedProperties: false,
474
529
  properties: {
475
530
  type: { enum: ["string"] },
476
531
  title: { type: "string" },
@@ -489,7 +544,6 @@ var schema_default = {
489
544
  const: "READ"
490
545
  }
491
546
  },
492
- default: { type: "string" },
493
547
  prefill: { type: "string" },
494
548
  example: { type: "string" },
495
549
  nullable: { type: "boolean" },
@@ -510,13 +564,24 @@ var schema_default = {
510
564
  ]
511
565
  }
512
566
  }
567
+ },
568
+ {
569
+ if: {
570
+ properties: { nullable: { const: false } }
571
+ },
572
+ then: {
573
+ properties: { default: { type: "string" } }
574
+ },
575
+ else: {
576
+ properties: { default: { type: ["string", "null"] } }
577
+ }
513
578
  }
514
579
  ]
515
580
  },
516
581
  resourceArrayProperty: {
517
582
  title: "Resource array property",
518
583
  type: "object",
519
- additionalProperties: false,
584
+ unevaluatedProperties: false,
520
585
  properties: {
521
586
  type: { enum: ["array"] },
522
587
  title: { type: "string" },
@@ -534,7 +599,6 @@ var schema_default = {
534
599
  const: "READ"
535
600
  }
536
601
  },
537
- default: { type: "array" },
538
602
  prefill: { type: "array" },
539
603
  example: { type: "array" },
540
604
  nullable: { type: "boolean" },
@@ -559,13 +623,24 @@ var schema_default = {
559
623
  ]
560
624
  }
561
625
  }
626
+ },
627
+ {
628
+ if: {
629
+ properties: { nullable: { const: false } }
630
+ },
631
+ then: {
632
+ properties: { default: { type: "array" } }
633
+ },
634
+ else: {
635
+ properties: { default: { type: ["array", "null"] } }
636
+ }
562
637
  }
563
638
  ]
564
639
  },
565
640
  anyProperty: {
566
641
  title: "Any property",
567
642
  type: "object",
568
- additionalProperties: false,
643
+ unevaluatedProperties: false,
569
644
  properties: {
570
645
  type: {
571
646
  type: ["array"],
@@ -579,7 +654,6 @@ var schema_default = {
579
654
  },
580
655
  title: { type: "string" },
581
656
  description: { type: "string" },
582
- default: { type: ["object", "array", "string", "integer", "boolean"] },
583
657
  prefill: { type: ["object", "array", "string", "integer", "boolean"] },
584
658
  example: { type: ["object", "array", "string", "integer", "boolean"] },
585
659
  nullable: { type: "boolean" },
@@ -587,7 +661,16 @@ var schema_default = {
587
661
  sectionCaption: { type: "string" },
588
662
  sectionDescription: { type: "string" }
589
663
  },
590
- required: ["type", "title", "description", "editor"]
664
+ required: ["type", "title", "description", "editor"],
665
+ if: {
666
+ properties: { nullable: { const: false } }
667
+ },
668
+ then: {
669
+ properties: { default: { type: ["object", "array", "string", "integer", "boolean"] } }
670
+ },
671
+ else: {
672
+ properties: { default: { type: ["object", "array", "string", "integer", "boolean", "null"] } }
673
+ }
591
674
  },
592
675
  subSchemaStringEnumProperty: {
593
676
  title: "Sub-schema: Enum property",