@apify/input_schema 3.16.1 → 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/esm/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import Ajv, { ErrorObject, ValidateFunction } from 'ajv';
2
+ import Ajv$1 from 'ajv/dist/2019';
2
3
 
3
4
  /**
4
5
  * Helper function to simulate intl formatMessage function
@@ -86,7 +87,7 @@ var definitions = {
86
87
  stringEnumProperty: {
87
88
  title: "Enum property",
88
89
  type: "object",
89
- additionalProperties: false,
90
+ unevaluatedProperties: false,
90
91
  properties: {
91
92
  type: {
92
93
  "enum": [
@@ -104,9 +105,6 @@ var definitions = {
104
105
  description: {
105
106
  type: "string"
106
107
  },
107
- "default": {
108
- type: "string"
109
- },
110
108
  prefill: {
111
109
  type: "string"
112
110
  },
@@ -143,7 +141,31 @@ var definitions = {
143
141
  "title",
144
142
  "description",
145
143
  "enum"
146
- ]
144
+ ],
145
+ "if": {
146
+ properties: {
147
+ nullable: {
148
+ "const": false
149
+ }
150
+ }
151
+ },
152
+ then: {
153
+ properties: {
154
+ "default": {
155
+ type: "string"
156
+ }
157
+ }
158
+ },
159
+ "else": {
160
+ properties: {
161
+ "default": {
162
+ type: [
163
+ "string",
164
+ "null"
165
+ ]
166
+ }
167
+ }
168
+ }
147
169
  },
148
170
  stringProperty: {
149
171
  title: "String property",
@@ -195,126 +217,116 @@ var definitions = {
195
217
  }
196
218
  },
197
219
  then: {
198
- "if": {
199
- properties: {
200
- editor: {
201
- "const": "datepicker"
202
- }
220
+ properties: {
221
+ type: {
222
+ "enum": [
223
+ "string"
224
+ ]
225
+ },
226
+ title: {
227
+ type: "string"
228
+ },
229
+ description: {
230
+ type: "string"
231
+ },
232
+ prefill: {
233
+ type: "string"
234
+ },
235
+ example: {
236
+ type: "string"
237
+ },
238
+ pattern: {
239
+ type: "string"
240
+ },
241
+ nullable: {
242
+ type: "boolean"
243
+ },
244
+ minLength: {
245
+ type: "integer"
246
+ },
247
+ maxLength: {
248
+ type: "integer"
249
+ },
250
+ sectionCaption: {
251
+ type: "string"
252
+ },
253
+ sectionDescription: {
254
+ type: "string"
255
+ },
256
+ isSecret: {
257
+ "enum": [
258
+ false
259
+ ]
203
260
  }
204
261
  },
205
- then: {
206
- additionalProperties: false,
207
- properties: {
208
- type: {
209
- "enum": [
210
- "string"
211
- ]
212
- },
213
- title: {
214
- type: "string"
215
- },
216
- description: {
217
- type: "string"
218
- },
219
- "default": {
220
- type: "string"
221
- },
222
- prefill: {
223
- type: "string"
224
- },
225
- example: {
226
- type: "string"
227
- },
228
- pattern: {
229
- type: "string"
230
- },
231
- nullable: {
232
- type: "boolean"
233
- },
234
- minLength: {
235
- type: "integer"
236
- },
237
- maxLength: {
238
- type: "integer"
239
- },
240
- editor: {
241
- "enum": [
242
- "datepicker"
243
- ]
244
- },
245
- sectionCaption: {
246
- type: "string"
262
+ unevaluatedProperties: false,
263
+ allOf: [
264
+ {
265
+ "if": {
266
+ properties: {
267
+ editor: {
268
+ "const": "datepicker"
269
+ }
270
+ }
247
271
  },
248
- sectionDescription: {
249
- type: "string"
272
+ then: {
273
+ properties: {
274
+ editor: {
275
+ "enum": [
276
+ "datepicker"
277
+ ]
278
+ },
279
+ dateType: {
280
+ "enum": [
281
+ "absolute",
282
+ "relative",
283
+ "absoluteOrRelative"
284
+ ]
285
+ }
286
+ }
250
287
  },
251
- dateType: {
252
- "enum": [
253
- "absolute",
254
- "relative",
255
- "absoluteOrRelative"
256
- ]
288
+ "else": {
289
+ properties: {
290
+ editor: {
291
+ "enum": [
292
+ "javascript",
293
+ "python",
294
+ "textfield",
295
+ "textarea",
296
+ "hidden",
297
+ "fileupload"
298
+ ]
299
+ }
300
+ }
257
301
  }
258
- }
259
- },
260
- "else": {
261
- additionalProperties: false,
262
- properties: {
263
- type: {
264
- "enum": [
265
- "string"
266
- ]
267
- },
268
- title: {
269
- type: "string"
270
- },
271
- description: {
272
- type: "string"
273
- },
274
- "default": {
275
- type: "string"
276
- },
277
- prefill: {
278
- type: "string"
279
- },
280
- example: {
281
- type: "string"
282
- },
283
- pattern: {
284
- type: "string"
285
- },
286
- nullable: {
287
- type: "boolean"
288
- },
289
- minLength: {
290
- type: "integer"
291
- },
292
- maxLength: {
293
- type: "integer"
294
- },
295
- editor: {
296
- "enum": [
297
- "javascript",
298
- "python",
299
- "textfield",
300
- "textarea",
301
- "hidden",
302
- "fileupload"
303
- ]
304
- },
305
- isSecret: {
306
- "enum": [
307
- false
308
- ]
302
+ },
303
+ {
304
+ "if": {
305
+ properties: {
306
+ nullable: {
307
+ "const": false
308
+ }
309
+ }
309
310
  },
310
- sectionCaption: {
311
- type: "string"
311
+ then: {
312
+ properties: {
313
+ "default": {
314
+ type: "string"
315
+ }
316
+ }
312
317
  },
313
- sectionDescription: {
314
- type: "string"
318
+ "else": {
319
+ properties: {
320
+ "default": {
321
+ type: [
322
+ "string",
323
+ "null"
324
+ ]
325
+ }
326
+ }
315
327
  }
316
328
  }
317
- }
329
+ ]
318
330
  },
319
331
  "else": {
320
332
  additionalProperties: false,
@@ -378,6 +390,7 @@ var definitions = {
378
390
  "keyValue",
379
391
  "stringList",
380
392
  "select",
393
+ "schemaBased",
381
394
  "hidden"
382
395
  ]
383
396
  },
@@ -385,7 +398,6 @@ var definitions = {
385
398
  type: "boolean"
386
399
  }
387
400
  },
388
- additionalProperties: true,
389
401
  required: [
390
402
  "type",
391
403
  "title",
@@ -402,168 +414,212 @@ var definitions = {
402
414
  }
403
415
  },
404
416
  then: {
405
- "if": {
406
- properties: {
407
- editor: {
408
- "const": "select"
409
- }
417
+ properties: {
418
+ type: {
419
+ "enum": [
420
+ "array"
421
+ ]
422
+ },
423
+ title: {
424
+ type: "string"
425
+ },
426
+ description: {
427
+ type: "string"
428
+ },
429
+ prefill: {
430
+ type: "array"
431
+ },
432
+ example: {
433
+ type: "array"
434
+ },
435
+ nullable: {
436
+ type: "boolean"
437
+ },
438
+ minItems: {
439
+ type: "integer"
440
+ },
441
+ maxItems: {
442
+ type: "integer"
443
+ },
444
+ uniqueItems: {
445
+ type: "boolean"
446
+ },
447
+ sectionCaption: {
448
+ type: "string"
449
+ },
450
+ sectionDescription: {
451
+ type: "string"
452
+ },
453
+ placeholderKey: {
454
+ type: "string"
455
+ },
456
+ placeholderValue: {
457
+ type: "string"
458
+ },
459
+ patternKey: {
460
+ type: "string"
461
+ },
462
+ patternValue: {
463
+ type: "string"
464
+ },
465
+ isSecret: {
466
+ "enum": [
467
+ false
468
+ ]
410
469
  }
411
470
  },
412
- then: {
413
- additionalProperties: false,
414
- required: [
415
- "items"
416
- ],
417
- properties: {
418
- type: {
419
- "enum": [
420
- "array"
421
- ]
422
- },
423
- editor: {
424
- "enum": [
425
- "select"
426
- ]
427
- },
428
- title: {
429
- type: "string"
430
- },
431
- description: {
432
- type: "string"
433
- },
434
- "default": {
435
- type: "array"
436
- },
437
- prefill: {
438
- type: "array"
439
- },
440
- example: {
441
- type: "array"
442
- },
443
- nullable: {
444
- type: "boolean"
445
- },
446
- minItems: {
447
- type: "integer"
448
- },
449
- maxItems: {
450
- type: "integer"
451
- },
452
- uniqueItems: {
453
- type: "boolean"
454
- },
455
- sectionCaption: {
456
- type: "string"
457
- },
458
- sectionDescription: {
459
- type: "string"
460
- },
461
- items: {
462
- type: "object",
463
- additionalProperties: false,
464
- properties: {
465
- type: {
466
- "enum": [
467
- "string"
468
- ]
469
- },
470
- "enum": {
471
- type: "array",
471
+ unevaluatedProperties: false,
472
+ allOf: [
473
+ {
474
+ oneOf: [
475
+ {
476
+ required: [
477
+ "editor"
478
+ ],
479
+ properties: {
480
+ editor: {
481
+ "enum": [
482
+ "select"
483
+ ]
484
+ },
472
485
  items: {
473
- type: "string"
486
+ $ref: "#/definitions/arrayItemsSelect"
487
+ }
488
+ }
489
+ },
490
+ {
491
+ required: [
492
+ "editor"
493
+ ],
494
+ properties: {
495
+ editor: {
496
+ "enum": [
497
+ "keyValue"
498
+ ]
474
499
  },
475
- uniqueItems: true
476
- },
477
- enumTitles: {
478
- type: "array",
479
500
  items: {
480
- type: "string"
501
+ $ref: "#/definitions/arrayItemsKeyValue"
481
502
  }
482
503
  }
483
504
  },
484
- required: [
485
- "type",
486
- "enum"
487
- ]
488
- },
489
- isSecret: {
490
- "enum": [
491
- false
492
- ]
493
- }
494
- }
495
- },
496
- "else": {
497
- additionalProperties: false,
498
- properties: {
499
- type: {
500
- "enum": [
501
- "array"
502
- ]
503
- },
504
- editor: {
505
- "enum": [
506
- "json",
507
- "requestListSources",
508
- "pseudoUrls",
509
- "globs",
510
- "keyValue",
511
- "stringList",
512
- "hidden"
513
- ]
514
- },
515
- title: {
516
- type: "string"
517
- },
518
- description: {
519
- type: "string"
520
- },
521
- "default": {
522
- type: "array"
523
- },
524
- prefill: {
525
- type: "array"
526
- },
527
- example: {
528
- type: "array"
529
- },
530
- nullable: {
531
- type: "boolean"
532
- },
533
- minItems: {
534
- type: "integer"
535
- },
536
- maxItems: {
537
- type: "integer"
538
- },
539
- uniqueItems: {
540
- type: "boolean"
541
- },
542
- sectionCaption: {
543
- type: "string"
544
- },
545
- sectionDescription: {
546
- type: "string"
547
- },
548
- placeholderKey: {
549
- type: "string"
550
- },
551
- placeholderValue: {
552
- type: "string"
553
- },
554
- patternKey: {
555
- type: "string"
505
+ {
506
+ required: [
507
+ "editor"
508
+ ],
509
+ properties: {
510
+ editor: {
511
+ "enum": [
512
+ "stringList"
513
+ ]
514
+ },
515
+ items: {
516
+ $ref: "#/definitions/arrayItemsStringList"
517
+ }
518
+ }
519
+ },
520
+ {
521
+ required: [
522
+ "editor"
523
+ ],
524
+ properties: {
525
+ editor: {
526
+ "enum": [
527
+ "globs"
528
+ ]
529
+ },
530
+ items: {
531
+ $ref: "#/definitions/arrayItemsGlobs"
532
+ }
533
+ }
534
+ },
535
+ {
536
+ required: [
537
+ "editor"
538
+ ],
539
+ properties: {
540
+ editor: {
541
+ "enum": [
542
+ "pseudoUrls"
543
+ ]
544
+ },
545
+ items: {
546
+ $ref: "#/definitions/arrayItemsPseudoUrls"
547
+ }
548
+ }
549
+ },
550
+ {
551
+ required: [
552
+ "editor"
553
+ ],
554
+ properties: {
555
+ editor: {
556
+ "enum": [
557
+ "requestListSources"
558
+ ]
559
+ },
560
+ items: {
561
+ $ref: "#/definitions/arrayItemsRequestListSources"
562
+ }
563
+ }
564
+ },
565
+ {
566
+ required: [
567
+ "editor"
568
+ ],
569
+ properties: {
570
+ editor: {
571
+ "enum": [
572
+ "json",
573
+ "schemaBased",
574
+ "hidden"
575
+ ]
576
+ },
577
+ items: {
578
+ $ref: "#/definitions/arrayItems"
579
+ }
580
+ }
581
+ },
582
+ {
583
+ not: {
584
+ required: [
585
+ "editor"
586
+ ]
587
+ },
588
+ properties: {
589
+ items: {
590
+ $ref: "#/definitions/arrayItems"
591
+ }
592
+ }
593
+ }
594
+ ]
595
+ },
596
+ {
597
+ "if": {
598
+ properties: {
599
+ nullable: {
600
+ "const": false
601
+ }
602
+ }
556
603
  },
557
- patternValue: {
558
- type: "string"
604
+ then: {
605
+ properties: {
606
+ "default": {
607
+ type: "array"
608
+ }
609
+ }
559
610
  },
560
- isSecret: {
561
- "enum": [
562
- false
563
- ]
611
+ "else": {
612
+ properties: {
613
+ "default": {
614
+ type: [
615
+ "array",
616
+ "null"
617
+ ]
618
+ }
619
+ }
564
620
  }
565
621
  }
566
- }
622
+ ]
567
623
  },
568
624
  "else": {
569
625
  additionalProperties: false,
@@ -609,6 +665,9 @@ var definitions = {
609
665
  sectionDescription: {
610
666
  type: "string"
611
667
  },
668
+ items: {
669
+ $ref: "#/definitions/arrayItems"
670
+ },
612
671
  isSecret: {
613
672
  "enum": [
614
673
  true
@@ -620,7 +679,6 @@ var definitions = {
620
679
  objectProperty: {
621
680
  title: "Object property",
622
681
  type: "object",
623
- additionalProperties: true,
624
682
  properties: {
625
683
  type: {
626
684
  "enum": [
@@ -637,6 +695,7 @@ var definitions = {
637
695
  "enum": [
638
696
  "json",
639
697
  "proxy",
698
+ "schemaBased",
640
699
  "hidden"
641
700
  ]
642
701
  },
@@ -660,7 +719,6 @@ var definitions = {
660
719
  }
661
720
  },
662
721
  then: {
663
- additionalProperties: false,
664
722
  properties: {
665
723
  type: {
666
724
  "enum": [
@@ -673,9 +731,6 @@ var definitions = {
673
731
  description: {
674
732
  type: "string"
675
733
  },
676
- "default": {
677
- type: "object"
678
- },
679
734
  prefill: {
680
735
  type: "object"
681
736
  },
@@ -701,6 +756,7 @@ var definitions = {
701
756
  "enum": [
702
757
  "json",
703
758
  "proxy",
759
+ "schemaBased",
704
760
  "hidden"
705
761
  ]
706
762
  },
@@ -714,8 +770,78 @@ var definitions = {
714
770
  "enum": [
715
771
  false
716
772
  ]
773
+ },
774
+ required: {
775
+ type: "array",
776
+ minItems: 0,
777
+ items: {
778
+ type: "string"
779
+ },
780
+ uniqueItems: true
781
+ },
782
+ additionalProperties: {
783
+ type: "boolean"
717
784
  }
718
- }
785
+ },
786
+ unevaluatedProperties: false,
787
+ allOf: [
788
+ {
789
+ oneOf: [
790
+ {
791
+ properties: {
792
+ editor: {
793
+ "enum": [
794
+ "proxy"
795
+ ]
796
+ },
797
+ properties: {
798
+ $ref: "#/definitions/subObjectPropertiesProxy"
799
+ }
800
+ }
801
+ },
802
+ {
803
+ properties: {
804
+ editor: {
805
+ "enum": [
806
+ "json",
807
+ "schemaBased",
808
+ "hidden"
809
+ ]
810
+ },
811
+ properties: {
812
+ $ref: "#/definitions/subObjectProperties"
813
+ }
814
+ }
815
+ }
816
+ ]
817
+ },
818
+ {
819
+ "if": {
820
+ properties: {
821
+ nullable: {
822
+ "const": false
823
+ }
824
+ }
825
+ },
826
+ then: {
827
+ properties: {
828
+ "default": {
829
+ type: "object"
830
+ }
831
+ }
832
+ },
833
+ "else": {
834
+ properties: {
835
+ "default": {
836
+ type: [
837
+ "object",
838
+ "null"
839
+ ]
840
+ }
841
+ }
842
+ }
843
+ }
844
+ ]
719
845
  },
720
846
  "else": {
721
847
  additionalProperties: false,
@@ -764,10 +890,24 @@ var definitions = {
764
890
  sectionDescription: {
765
891
  type: "string"
766
892
  },
893
+ properties: {
894
+ $ref: "#/definitions/subObjectProperties"
895
+ },
767
896
  isSecret: {
768
897
  "enum": [
769
898
  true
770
899
  ]
900
+ },
901
+ required: {
902
+ type: "array",
903
+ minItems: 0,
904
+ items: {
905
+ type: "string"
906
+ },
907
+ uniqueItems: true
908
+ },
909
+ additionalProperties: {
910
+ type: "boolean"
771
911
  }
772
912
  }
773
913
  }
@@ -775,7 +915,7 @@ var definitions = {
775
915
  integerProperty: {
776
916
  title: "Integer property",
777
917
  type: "object",
778
- additionalProperties: false,
918
+ unevaluatedProperties: false,
779
919
  properties: {
780
920
  type: {
781
921
  "enum": [
@@ -788,9 +928,6 @@ var definitions = {
788
928
  description: {
789
929
  type: "string"
790
930
  },
791
- "default": {
792
- type: "integer"
793
- },
794
931
  prefill: {
795
932
  type: "integer"
796
933
  },
@@ -826,12 +963,36 @@ var definitions = {
826
963
  "type",
827
964
  "title",
828
965
  "description"
829
- ]
966
+ ],
967
+ "if": {
968
+ properties: {
969
+ nullable: {
970
+ "const": false
971
+ }
972
+ }
973
+ },
974
+ then: {
975
+ properties: {
976
+ "default": {
977
+ type: "integer"
978
+ }
979
+ }
980
+ },
981
+ "else": {
982
+ properties: {
983
+ "default": {
984
+ type: [
985
+ "integer",
986
+ "null"
987
+ ]
988
+ }
989
+ }
990
+ }
830
991
  },
831
992
  booleanProperty: {
832
993
  title: "Boolean property",
833
994
  type: "object",
834
- additionalProperties: false,
995
+ unevaluatedProperties: false,
835
996
  properties: {
836
997
  type: {
837
998
  "enum": [
@@ -844,9 +1005,6 @@ var definitions = {
844
1005
  description: {
845
1006
  type: "string"
846
1007
  },
847
- "default": {
848
- type: "boolean"
849
- },
850
1008
  prefill: {
851
1009
  type: "boolean"
852
1010
  },
@@ -879,12 +1037,36 @@ var definitions = {
879
1037
  "type",
880
1038
  "title",
881
1039
  "description"
882
- ]
1040
+ ],
1041
+ "if": {
1042
+ properties: {
1043
+ nullable: {
1044
+ "const": false
1045
+ }
1046
+ }
1047
+ },
1048
+ then: {
1049
+ properties: {
1050
+ "default": {
1051
+ type: "boolean"
1052
+ }
1053
+ }
1054
+ },
1055
+ "else": {
1056
+ properties: {
1057
+ "default": {
1058
+ type: [
1059
+ "boolean",
1060
+ "null"
1061
+ ]
1062
+ }
1063
+ }
1064
+ }
883
1065
  },
884
1066
  resourceProperty: {
885
1067
  title: "Resource property",
886
1068
  type: "object",
887
- additionalProperties: false,
1069
+ unevaluatedProperties: false,
888
1070
  properties: {
889
1071
  type: {
890
1072
  "enum": [
@@ -925,9 +1107,6 @@ var definitions = {
925
1107
  "const": "READ"
926
1108
  }
927
1109
  },
928
- "default": {
929
- type: "string"
930
- },
931
1110
  prefill: {
932
1111
  type: "string"
933
1112
  },
@@ -973,13 +1152,39 @@ var definitions = {
973
1152
  ]
974
1153
  }
975
1154
  }
1155
+ },
1156
+ {
1157
+ "if": {
1158
+ properties: {
1159
+ nullable: {
1160
+ "const": false
1161
+ }
1162
+ }
1163
+ },
1164
+ then: {
1165
+ properties: {
1166
+ "default": {
1167
+ type: "string"
1168
+ }
1169
+ }
1170
+ },
1171
+ "else": {
1172
+ properties: {
1173
+ "default": {
1174
+ type: [
1175
+ "string",
1176
+ "null"
1177
+ ]
1178
+ }
1179
+ }
1180
+ }
976
1181
  }
977
1182
  ]
978
1183
  },
979
1184
  resourceArrayProperty: {
980
1185
  title: "Resource array property",
981
1186
  type: "object",
982
- additionalProperties: false,
1187
+ unevaluatedProperties: false,
983
1188
  properties: {
984
1189
  type: {
985
1190
  "enum": [
@@ -1013,9 +1218,6 @@ var definitions = {
1013
1218
  "const": "READ"
1014
1219
  }
1015
1220
  },
1016
- "default": {
1017
- type: "array"
1018
- },
1019
1221
  prefill: {
1020
1222
  type: "array"
1021
1223
  },
@@ -1077,13 +1279,39 @@ var definitions = {
1077
1279
  ]
1078
1280
  }
1079
1281
  }
1282
+ },
1283
+ {
1284
+ "if": {
1285
+ properties: {
1286
+ nullable: {
1287
+ "const": false
1288
+ }
1289
+ }
1290
+ },
1291
+ then: {
1292
+ properties: {
1293
+ "default": {
1294
+ type: "array"
1295
+ }
1296
+ }
1297
+ },
1298
+ "else": {
1299
+ properties: {
1300
+ "default": {
1301
+ type: [
1302
+ "array",
1303
+ "null"
1304
+ ]
1305
+ }
1306
+ }
1307
+ }
1080
1308
  }
1081
1309
  ]
1082
1310
  },
1083
1311
  anyProperty: {
1084
1312
  title: "Any property",
1085
1313
  type: "object",
1086
- additionalProperties: false,
1314
+ unevaluatedProperties: false,
1087
1315
  properties: {
1088
1316
  type: {
1089
1317
  type: [
@@ -1109,15 +1337,6 @@ var definitions = {
1109
1337
  description: {
1110
1338
  type: "string"
1111
1339
  },
1112
- "default": {
1113
- type: [
1114
- "object",
1115
- "array",
1116
- "string",
1117
- "integer",
1118
- "boolean"
1119
- ]
1120
- },
1121
1340
  prefill: {
1122
1341
  type: [
1123
1342
  "object",
@@ -1157,29 +1376,1591 @@ var definitions = {
1157
1376
  "title",
1158
1377
  "description",
1159
1378
  "editor"
1160
- ]
1161
- }
1162
- };
1163
- var schema = {
1164
- title: title,
1165
- type: type,
1166
- properties: properties,
1167
- additionalProperties: additionalProperties,
1168
- required: required,
1169
- definitions: definitions
1170
- };
1171
-
1172
- type CommonFieldDefinition<T> = {
1173
- title: string;
1174
- description: string;
1175
- default?: T;
1176
- prefill?: T;
1177
- example?: T;
1178
- nullable?: boolean;
1179
- sectionCaption?: string;
1180
- sectionDescription?: string;
1181
- };
1182
- type StringFieldDefinition = CommonFieldDefinition<string> & {
1379
+ ],
1380
+ "if": {
1381
+ properties: {
1382
+ nullable: {
1383
+ "const": false
1384
+ }
1385
+ }
1386
+ },
1387
+ then: {
1388
+ properties: {
1389
+ "default": {
1390
+ type: [
1391
+ "object",
1392
+ "array",
1393
+ "string",
1394
+ "integer",
1395
+ "boolean"
1396
+ ]
1397
+ }
1398
+ }
1399
+ },
1400
+ "else": {
1401
+ properties: {
1402
+ "default": {
1403
+ type: [
1404
+ "object",
1405
+ "array",
1406
+ "string",
1407
+ "integer",
1408
+ "boolean",
1409
+ "null"
1410
+ ]
1411
+ }
1412
+ }
1413
+ }
1414
+ },
1415
+ subSchemaStringEnumProperty: {
1416
+ title: "Sub-schema: Enum property",
1417
+ type: "object",
1418
+ additionalProperties: false,
1419
+ properties: {
1420
+ type: {
1421
+ "enum": [
1422
+ "string"
1423
+ ]
1424
+ },
1425
+ editor: {
1426
+ "enum": [
1427
+ "select"
1428
+ ]
1429
+ },
1430
+ title: {
1431
+ type: "string"
1432
+ },
1433
+ description: {
1434
+ type: "string"
1435
+ },
1436
+ nullable: {
1437
+ type: "boolean"
1438
+ },
1439
+ "enum": {
1440
+ type: "array",
1441
+ items: {
1442
+ type: "string"
1443
+ },
1444
+ minItems: 1,
1445
+ uniqueItems: true
1446
+ },
1447
+ enumTitles: {
1448
+ type: "array",
1449
+ items: {
1450
+ type: "string"
1451
+ },
1452
+ minItems: 1
1453
+ }
1454
+ },
1455
+ required: [
1456
+ "type",
1457
+ "title",
1458
+ "description",
1459
+ "enum"
1460
+ ]
1461
+ },
1462
+ subSchemaStringProperty: {
1463
+ title: "Sub-schema: String property",
1464
+ type: "object",
1465
+ additionalProperties: true,
1466
+ properties: {
1467
+ type: {
1468
+ "enum": [
1469
+ "string"
1470
+ ]
1471
+ },
1472
+ title: {
1473
+ type: "string"
1474
+ },
1475
+ description: {
1476
+ type: "string"
1477
+ },
1478
+ nullable: {
1479
+ type: "boolean"
1480
+ },
1481
+ editor: {
1482
+ "enum": [
1483
+ "javascript",
1484
+ "python",
1485
+ "textfield",
1486
+ "textarea",
1487
+ "datepicker",
1488
+ "hidden",
1489
+ "fileupload"
1490
+ ]
1491
+ }
1492
+ },
1493
+ required: [
1494
+ "type",
1495
+ "title",
1496
+ "description"
1497
+ ],
1498
+ "if": {
1499
+ properties: {
1500
+ editor: {
1501
+ "const": "datepicker"
1502
+ }
1503
+ }
1504
+ },
1505
+ then: {
1506
+ additionalProperties: false,
1507
+ properties: {
1508
+ type: {
1509
+ "enum": [
1510
+ "string"
1511
+ ]
1512
+ },
1513
+ title: {
1514
+ type: "string"
1515
+ },
1516
+ description: {
1517
+ type: "string"
1518
+ },
1519
+ pattern: {
1520
+ type: "string"
1521
+ },
1522
+ nullable: {
1523
+ type: "boolean"
1524
+ },
1525
+ minLength: {
1526
+ type: "integer"
1527
+ },
1528
+ maxLength: {
1529
+ type: "integer"
1530
+ },
1531
+ editor: {
1532
+ "enum": [
1533
+ "datepicker"
1534
+ ]
1535
+ },
1536
+ dateType: {
1537
+ "enum": [
1538
+ "absolute",
1539
+ "relative",
1540
+ "absoluteOrRelative"
1541
+ ]
1542
+ }
1543
+ }
1544
+ },
1545
+ "else": {
1546
+ additionalProperties: false,
1547
+ properties: {
1548
+ type: {
1549
+ "enum": [
1550
+ "string"
1551
+ ]
1552
+ },
1553
+ title: {
1554
+ type: "string"
1555
+ },
1556
+ description: {
1557
+ type: "string"
1558
+ },
1559
+ pattern: {
1560
+ type: "string"
1561
+ },
1562
+ nullable: {
1563
+ type: "boolean"
1564
+ },
1565
+ minLength: {
1566
+ type: "integer"
1567
+ },
1568
+ maxLength: {
1569
+ type: "integer"
1570
+ },
1571
+ editor: {
1572
+ "enum": [
1573
+ "javascript",
1574
+ "python",
1575
+ "textfield",
1576
+ "textarea",
1577
+ "hidden",
1578
+ "fileupload"
1579
+ ]
1580
+ }
1581
+ }
1582
+ }
1583
+ },
1584
+ subSchemaArrayProperty: {
1585
+ title: "Sub-schema: Array property",
1586
+ type: "object",
1587
+ properties: {
1588
+ type: {
1589
+ "enum": [
1590
+ "array"
1591
+ ]
1592
+ },
1593
+ editor: {
1594
+ "enum": [
1595
+ "json",
1596
+ "requestListSources",
1597
+ "pseudoUrls",
1598
+ "globs",
1599
+ "keyValue",
1600
+ "stringList",
1601
+ "select",
1602
+ "hidden"
1603
+ ]
1604
+ },
1605
+ title: {
1606
+ type: "string"
1607
+ },
1608
+ description: {
1609
+ type: "string"
1610
+ },
1611
+ nullable: {
1612
+ type: "boolean"
1613
+ },
1614
+ minItems: {
1615
+ type: "integer"
1616
+ },
1617
+ maxItems: {
1618
+ type: "integer"
1619
+ },
1620
+ uniqueItems: {
1621
+ type: "boolean"
1622
+ },
1623
+ placeholderKey: {
1624
+ type: "string"
1625
+ },
1626
+ placeholderValue: {
1627
+ type: "string"
1628
+ },
1629
+ patternKey: {
1630
+ type: "string"
1631
+ },
1632
+ patternValue: {
1633
+ type: "string"
1634
+ }
1635
+ },
1636
+ required: [
1637
+ "type",
1638
+ "title",
1639
+ "description"
1640
+ ],
1641
+ unevaluatedProperties: false,
1642
+ oneOf: [
1643
+ {
1644
+ required: [
1645
+ "editor"
1646
+ ],
1647
+ properties: {
1648
+ editor: {
1649
+ "enum": [
1650
+ "select"
1651
+ ]
1652
+ },
1653
+ items: {
1654
+ $ref: "#/definitions/arrayItemsSelect"
1655
+ }
1656
+ }
1657
+ },
1658
+ {
1659
+ required: [
1660
+ "editor"
1661
+ ],
1662
+ properties: {
1663
+ editor: {
1664
+ "enum": [
1665
+ "keyValue"
1666
+ ]
1667
+ },
1668
+ items: {
1669
+ $ref: "#/definitions/arrayItemsKeyValue"
1670
+ }
1671
+ }
1672
+ },
1673
+ {
1674
+ required: [
1675
+ "editor"
1676
+ ],
1677
+ properties: {
1678
+ editor: {
1679
+ "enum": [
1680
+ "stringList"
1681
+ ]
1682
+ },
1683
+ items: {
1684
+ $ref: "#/definitions/arrayItemsStringList"
1685
+ }
1686
+ }
1687
+ },
1688
+ {
1689
+ required: [
1690
+ "editor"
1691
+ ],
1692
+ properties: {
1693
+ editor: {
1694
+ "enum": [
1695
+ "globs"
1696
+ ]
1697
+ },
1698
+ items: {
1699
+ $ref: "#/definitions/arrayItemsGlobs"
1700
+ }
1701
+ }
1702
+ },
1703
+ {
1704
+ required: [
1705
+ "editor"
1706
+ ],
1707
+ properties: {
1708
+ editor: {
1709
+ "enum": [
1710
+ "pseudoUrls"
1711
+ ]
1712
+ },
1713
+ items: {
1714
+ $ref: "#/definitions/arrayItemsPseudoUrls"
1715
+ }
1716
+ }
1717
+ },
1718
+ {
1719
+ required: [
1720
+ "editor"
1721
+ ],
1722
+ properties: {
1723
+ editor: {
1724
+ "enum": [
1725
+ "requestListSources"
1726
+ ]
1727
+ },
1728
+ items: {
1729
+ $ref: "#/definitions/arrayItemsRequestListSources"
1730
+ }
1731
+ }
1732
+ },
1733
+ {
1734
+ required: [
1735
+ "editor"
1736
+ ],
1737
+ properties: {
1738
+ editor: {
1739
+ "enum": [
1740
+ "json",
1741
+ "schemaBased",
1742
+ "hidden"
1743
+ ]
1744
+ },
1745
+ items: {
1746
+ $ref: "#/definitions/arrayItems"
1747
+ }
1748
+ }
1749
+ },
1750
+ {
1751
+ not: {
1752
+ required: [
1753
+ "editor"
1754
+ ]
1755
+ },
1756
+ properties: {
1757
+ items: {
1758
+ $ref: "#/definitions/arrayItems"
1759
+ }
1760
+ }
1761
+ }
1762
+ ]
1763
+ },
1764
+ subSchemaIntegerProperty: {
1765
+ title: "Sub-schema: Integer property",
1766
+ type: "object",
1767
+ additionalProperties: false,
1768
+ properties: {
1769
+ type: {
1770
+ "enum": [
1771
+ "integer"
1772
+ ]
1773
+ },
1774
+ title: {
1775
+ type: "string"
1776
+ },
1777
+ description: {
1778
+ type: "string"
1779
+ },
1780
+ nullable: {
1781
+ type: "boolean"
1782
+ },
1783
+ minimum: {
1784
+ type: "integer"
1785
+ },
1786
+ maximum: {
1787
+ type: "integer"
1788
+ },
1789
+ unit: {
1790
+ type: "string"
1791
+ },
1792
+ editor: {
1793
+ "enum": [
1794
+ "number",
1795
+ "hidden"
1796
+ ]
1797
+ }
1798
+ },
1799
+ required: [
1800
+ "type",
1801
+ "title",
1802
+ "description"
1803
+ ]
1804
+ },
1805
+ subSchemaBooleanProperty: {
1806
+ title: "Sub-schema: Boolean property",
1807
+ type: "object",
1808
+ additionalProperties: false,
1809
+ properties: {
1810
+ type: {
1811
+ "enum": [
1812
+ "boolean"
1813
+ ]
1814
+ },
1815
+ title: {
1816
+ type: "string"
1817
+ },
1818
+ description: {
1819
+ type: "string"
1820
+ },
1821
+ nullable: {
1822
+ type: "boolean"
1823
+ },
1824
+ groupCaption: {
1825
+ type: "string"
1826
+ },
1827
+ groupDescription: {
1828
+ type: "string"
1829
+ },
1830
+ editor: {
1831
+ "enum": [
1832
+ "checkbox",
1833
+ "hidden"
1834
+ ]
1835
+ }
1836
+ },
1837
+ required: [
1838
+ "type",
1839
+ "title",
1840
+ "description"
1841
+ ]
1842
+ },
1843
+ subSchemaObjectProperty: {
1844
+ title: "Sub-schema: Object property",
1845
+ type: "object",
1846
+ additionalProperties: false,
1847
+ properties: {
1848
+ type: {
1849
+ "enum": [
1850
+ "object"
1851
+ ]
1852
+ },
1853
+ title: {
1854
+ type: "string"
1855
+ },
1856
+ description: {
1857
+ type: "string"
1858
+ },
1859
+ patternKey: {
1860
+ type: "string"
1861
+ },
1862
+ patternValue: {
1863
+ type: "string"
1864
+ },
1865
+ nullable: {
1866
+ type: "boolean"
1867
+ },
1868
+ minProperties: {
1869
+ type: "integer"
1870
+ },
1871
+ maxProperties: {
1872
+ type: "integer"
1873
+ },
1874
+ editor: {
1875
+ "enum": [
1876
+ "json",
1877
+ "proxy",
1878
+ "hidden"
1879
+ ]
1880
+ },
1881
+ properties: {
1882
+ $ref: "#/definitions/subObjectProperties"
1883
+ },
1884
+ required: {
1885
+ type: "array",
1886
+ minItems: 0,
1887
+ items: {
1888
+ type: "string"
1889
+ },
1890
+ uniqueItems: true
1891
+ },
1892
+ additionalProperties: {
1893
+ type: "boolean"
1894
+ }
1895
+ },
1896
+ required: [
1897
+ "type",
1898
+ "title",
1899
+ "description"
1900
+ ]
1901
+ },
1902
+ subSchemaResourceProperty: {
1903
+ title: "Sub-schema: Resource property",
1904
+ type: "object",
1905
+ additionalProperties: false,
1906
+ properties: {
1907
+ type: {
1908
+ "enum": [
1909
+ "string"
1910
+ ]
1911
+ },
1912
+ title: {
1913
+ type: "string"
1914
+ },
1915
+ description: {
1916
+ type: "string"
1917
+ },
1918
+ editor: {
1919
+ "enum": [
1920
+ "resourcePicker",
1921
+ "hidden"
1922
+ ]
1923
+ },
1924
+ resourceType: {
1925
+ "enum": [
1926
+ "dataset",
1927
+ "keyValueStore",
1928
+ "requestQueue"
1929
+ ]
1930
+ },
1931
+ resourcePermissions: {
1932
+ type: "array",
1933
+ items: {
1934
+ type: "string",
1935
+ "enum": [
1936
+ "READ",
1937
+ "WRITE"
1938
+ ]
1939
+ },
1940
+ minItems: 1,
1941
+ uniqueItems: true,
1942
+ contains: {
1943
+ "const": "READ"
1944
+ }
1945
+ },
1946
+ nullable: {
1947
+ type: "boolean"
1948
+ }
1949
+ },
1950
+ required: [
1951
+ "type",
1952
+ "title",
1953
+ "description",
1954
+ "resourceType"
1955
+ ]
1956
+ },
1957
+ subSchemaResourceArrayProperty: {
1958
+ title: "Sub-schema: Resource array property",
1959
+ type: "object",
1960
+ additionalProperties: false,
1961
+ properties: {
1962
+ type: {
1963
+ "enum": [
1964
+ "array"
1965
+ ]
1966
+ },
1967
+ title: {
1968
+ type: "string"
1969
+ },
1970
+ description: {
1971
+ type: "string"
1972
+ },
1973
+ editor: {
1974
+ "enum": [
1975
+ "resourcePicker",
1976
+ "hidden"
1977
+ ]
1978
+ },
1979
+ resourcePermissions: {
1980
+ type: "array",
1981
+ items: {
1982
+ type: "string",
1983
+ "enum": [
1984
+ "READ",
1985
+ "WRITE"
1986
+ ]
1987
+ },
1988
+ minItems: 1,
1989
+ uniqueItems: true,
1990
+ contains: {
1991
+ "const": "READ"
1992
+ }
1993
+ },
1994
+ nullable: {
1995
+ type: "boolean"
1996
+ },
1997
+ minItems: {
1998
+ type: "integer"
1999
+ },
2000
+ maxItems: {
2001
+ type: "integer"
2002
+ },
2003
+ uniqueItems: {
2004
+ type: "boolean"
2005
+ },
2006
+ resourceType: {
2007
+ "enum": [
2008
+ "dataset",
2009
+ "keyValueStore",
2010
+ "requestQueue"
2011
+ ]
2012
+ }
2013
+ },
2014
+ required: [
2015
+ "type",
2016
+ "title",
2017
+ "description",
2018
+ "resourceType"
2019
+ ]
2020
+ },
2021
+ arrayItems: {
2022
+ title: "Utils: Array items definition",
2023
+ type: "object",
2024
+ properties: {
2025
+ type: {
2026
+ "enum": [
2027
+ "string",
2028
+ "integer",
2029
+ "boolean",
2030
+ "object",
2031
+ "array"
2032
+ ]
2033
+ }
2034
+ },
2035
+ required: [
2036
+ "type"
2037
+ ],
2038
+ "if": {
2039
+ properties: {
2040
+ type: {
2041
+ "enum": [
2042
+ "object"
2043
+ ]
2044
+ }
2045
+ }
2046
+ },
2047
+ then: {
2048
+ additionalProperties: false,
2049
+ properties: {
2050
+ type: {
2051
+ "enum": [
2052
+ "object"
2053
+ ]
2054
+ },
2055
+ properties: {
2056
+ type: "object",
2057
+ patternProperties: {
2058
+ "^": {
2059
+ oneOf: [
2060
+ {
2061
+ $ref: "#/definitions/subSchemaStringProperty"
2062
+ },
2063
+ {
2064
+ $ref: "#/definitions/subSchemaStringEnumProperty"
2065
+ },
2066
+ {
2067
+ $ref: "#/definitions/subSchemaArrayProperty"
2068
+ },
2069
+ {
2070
+ $ref: "#/definitions/subSchemaObjectProperty"
2071
+ },
2072
+ {
2073
+ $ref: "#/definitions/subSchemaIntegerProperty"
2074
+ },
2075
+ {
2076
+ $ref: "#/definitions/subSchemaBooleanProperty"
2077
+ },
2078
+ {
2079
+ $ref: "#/definitions/subSchemaResourceProperty"
2080
+ },
2081
+ {
2082
+ $ref: "#/definitions/subSchemaResourceArrayProperty"
2083
+ }
2084
+ ]
2085
+ }
2086
+ },
2087
+ additionalProperties: false
2088
+ },
2089
+ required: {
2090
+ type: "array",
2091
+ minItems: 0,
2092
+ items: {
2093
+ type: "string"
2094
+ },
2095
+ uniqueItems: true
2096
+ },
2097
+ additionalProperties: {
2098
+ type: "boolean"
2099
+ }
2100
+ }
2101
+ },
2102
+ "else": {
2103
+ "if": {
2104
+ properties: {
2105
+ type: {
2106
+ "const": "array"
2107
+ }
2108
+ }
2109
+ },
2110
+ then: {
2111
+ additionalProperties: false,
2112
+ properties: {
2113
+ type: {
2114
+ "enum": [
2115
+ "array"
2116
+ ]
2117
+ },
2118
+ items: {
2119
+ $ref: "#/definitions/arrayItems"
2120
+ }
2121
+ }
2122
+ },
2123
+ "else": {
2124
+ additionalProperties: false,
2125
+ properties: {
2126
+ type: {
2127
+ "enum": [
2128
+ "string",
2129
+ "integer",
2130
+ "boolean"
2131
+ ]
2132
+ }
2133
+ }
2134
+ }
2135
+ }
2136
+ },
2137
+ arrayItemsSelect: {
2138
+ title: "Utils: Array items select definition",
2139
+ type: "object",
2140
+ additionalProperties: false,
2141
+ properties: {
2142
+ type: {
2143
+ "enum": [
2144
+ "string"
2145
+ ]
2146
+ },
2147
+ "enum": {
2148
+ type: "array",
2149
+ items: {
2150
+ type: "string"
2151
+ },
2152
+ uniqueItems: true
2153
+ },
2154
+ enumTitles: {
2155
+ type: "array",
2156
+ items: {
2157
+ type: "string"
2158
+ }
2159
+ }
2160
+ },
2161
+ required: [
2162
+ "type",
2163
+ "enum"
2164
+ ]
2165
+ },
2166
+ arrayItemsKeyValue: {
2167
+ title: "Utils: Array items keyValue definition",
2168
+ type: "object",
2169
+ additionalProperties: false,
2170
+ properties: {
2171
+ type: {
2172
+ "enum": [
2173
+ "object"
2174
+ ]
2175
+ },
2176
+ properties: {
2177
+ type: "object",
2178
+ properties: {
2179
+ key: {
2180
+ type: "object",
2181
+ additionalProperties: false,
2182
+ properties: {
2183
+ type: {
2184
+ "enum": [
2185
+ "string"
2186
+ ]
2187
+ },
2188
+ title: {
2189
+ type: "string"
2190
+ },
2191
+ description: {
2192
+ type: "string"
2193
+ },
2194
+ pattern: {
2195
+ type: "string"
2196
+ },
2197
+ minLength: {
2198
+ type: "integer"
2199
+ },
2200
+ maxLength: {
2201
+ type: "integer"
2202
+ }
2203
+ },
2204
+ required: [
2205
+ "type"
2206
+ ]
2207
+ },
2208
+ value: {
2209
+ type: "object",
2210
+ additionalProperties: false,
2211
+ properties: {
2212
+ type: {
2213
+ "enum": [
2214
+ "string"
2215
+ ]
2216
+ },
2217
+ title: {
2218
+ type: "string"
2219
+ },
2220
+ description: {
2221
+ type: "string"
2222
+ },
2223
+ pattern: {
2224
+ type: "string"
2225
+ },
2226
+ minLength: {
2227
+ type: "integer"
2228
+ },
2229
+ maxLength: {
2230
+ type: "integer"
2231
+ }
2232
+ },
2233
+ required: [
2234
+ "type"
2235
+ ]
2236
+ }
2237
+ },
2238
+ required: [
2239
+ "key",
2240
+ "value"
2241
+ ],
2242
+ additionalProperties: false
2243
+ },
2244
+ required: {
2245
+ type: "array",
2246
+ minItems: 0,
2247
+ items: {
2248
+ type: "string"
2249
+ },
2250
+ uniqueItems: true
2251
+ },
2252
+ additionalProperties: {
2253
+ type: "boolean"
2254
+ }
2255
+ },
2256
+ required: [
2257
+ "type",
2258
+ "properties"
2259
+ ]
2260
+ },
2261
+ arrayItemsStringList: {
2262
+ title: "Utils: Array items stringList definition",
2263
+ type: "object",
2264
+ additionalProperties: false,
2265
+ properties: {
2266
+ type: {
2267
+ "enum": [
2268
+ "string"
2269
+ ]
2270
+ },
2271
+ pattern: {
2272
+ type: "string"
2273
+ },
2274
+ minLength: {
2275
+ type: "integer"
2276
+ },
2277
+ maxLength: {
2278
+ type: "integer"
2279
+ }
2280
+ },
2281
+ required: [
2282
+ "type"
2283
+ ]
2284
+ },
2285
+ arrayItemsGlobs: {
2286
+ title: "Utils: Array items globs definition",
2287
+ type: "object",
2288
+ additionalProperties: false,
2289
+ properties: {
2290
+ type: {
2291
+ "enum": [
2292
+ "object"
2293
+ ]
2294
+ },
2295
+ properties: {
2296
+ type: "object",
2297
+ additionalProperties: false,
2298
+ properties: {
2299
+ glob: {
2300
+ type: "object",
2301
+ additionalProperties: false,
2302
+ properties: {
2303
+ type: {
2304
+ "enum": [
2305
+ "string"
2306
+ ]
2307
+ },
2308
+ title: {
2309
+ type: "string"
2310
+ },
2311
+ description: {
2312
+ type: "string"
2313
+ },
2314
+ pattern: {
2315
+ type: "string"
2316
+ },
2317
+ minLength: {
2318
+ type: "integer"
2319
+ },
2320
+ maxLength: {
2321
+ type: "integer"
2322
+ }
2323
+ },
2324
+ required: [
2325
+ "type"
2326
+ ]
2327
+ },
2328
+ method: {
2329
+ type: "object",
2330
+ additionalProperties: false,
2331
+ properties: {
2332
+ type: {
2333
+ "enum": [
2334
+ "string"
2335
+ ]
2336
+ },
2337
+ title: {
2338
+ type: "string"
2339
+ },
2340
+ description: {
2341
+ type: "string"
2342
+ },
2343
+ pattern: {
2344
+ type: "string"
2345
+ },
2346
+ minLength: {
2347
+ type: "integer"
2348
+ },
2349
+ maxLength: {
2350
+ type: "integer"
2351
+ }
2352
+ },
2353
+ required: [
2354
+ "type"
2355
+ ]
2356
+ },
2357
+ payload: {
2358
+ type: "object",
2359
+ additionalProperties: false,
2360
+ properties: {
2361
+ type: {
2362
+ "enum": [
2363
+ "string"
2364
+ ]
2365
+ },
2366
+ title: {
2367
+ type: "string"
2368
+ },
2369
+ description: {
2370
+ type: "string"
2371
+ },
2372
+ pattern: {
2373
+ type: "string"
2374
+ },
2375
+ minLength: {
2376
+ type: "integer"
2377
+ },
2378
+ maxLength: {
2379
+ type: "integer"
2380
+ }
2381
+ },
2382
+ required: [
2383
+ "type"
2384
+ ]
2385
+ },
2386
+ userData: {
2387
+ type: "object",
2388
+ additionalProperties: false,
2389
+ properties: {
2390
+ type: {
2391
+ "enum": [
2392
+ "object"
2393
+ ]
2394
+ },
2395
+ title: {
2396
+ type: "string"
2397
+ },
2398
+ description: {
2399
+ type: "string"
2400
+ },
2401
+ properties: {
2402
+ type: "object"
2403
+ }
2404
+ },
2405
+ required: [
2406
+ "type"
2407
+ ]
2408
+ },
2409
+ headers: {
2410
+ type: "object",
2411
+ additionalProperties: false,
2412
+ properties: {
2413
+ type: {
2414
+ "enum": [
2415
+ "object"
2416
+ ]
2417
+ },
2418
+ title: {
2419
+ type: "string"
2420
+ },
2421
+ description: {
2422
+ type: "string"
2423
+ },
2424
+ properties: {
2425
+ type: "object"
2426
+ }
2427
+ },
2428
+ required: [
2429
+ "type"
2430
+ ]
2431
+ }
2432
+ }
2433
+ },
2434
+ required: {
2435
+ type: "array",
2436
+ minItems: 0,
2437
+ items: {
2438
+ type: "string"
2439
+ },
2440
+ uniqueItems: true
2441
+ },
2442
+ additionalProperties: {
2443
+ type: "boolean"
2444
+ }
2445
+ },
2446
+ required: [
2447
+ "type"
2448
+ ]
2449
+ },
2450
+ arrayItemsPseudoUrls: {
2451
+ title: "Utils: Array items pseudoUrls definition",
2452
+ type: "object",
2453
+ additionalProperties: false,
2454
+ properties: {
2455
+ type: {
2456
+ "enum": [
2457
+ "object"
2458
+ ]
2459
+ },
2460
+ properties: {
2461
+ type: "object",
2462
+ additionalProperties: false,
2463
+ properties: {
2464
+ purl: {
2465
+ type: "object",
2466
+ additionalProperties: false,
2467
+ properties: {
2468
+ type: {
2469
+ "enum": [
2470
+ "string"
2471
+ ]
2472
+ },
2473
+ title: {
2474
+ type: "string"
2475
+ },
2476
+ description: {
2477
+ type: "string"
2478
+ },
2479
+ pattern: {
2480
+ type: "string"
2481
+ },
2482
+ minLength: {
2483
+ type: "integer"
2484
+ },
2485
+ maxLength: {
2486
+ type: "integer"
2487
+ }
2488
+ },
2489
+ required: [
2490
+ "type"
2491
+ ]
2492
+ },
2493
+ method: {
2494
+ type: "object",
2495
+ additionalProperties: false,
2496
+ properties: {
2497
+ type: {
2498
+ "enum": [
2499
+ "string"
2500
+ ]
2501
+ },
2502
+ title: {
2503
+ type: "string"
2504
+ },
2505
+ description: {
2506
+ type: "string"
2507
+ },
2508
+ pattern: {
2509
+ type: "string"
2510
+ },
2511
+ minLength: {
2512
+ type: "integer"
2513
+ },
2514
+ maxLength: {
2515
+ type: "integer"
2516
+ }
2517
+ },
2518
+ required: [
2519
+ "type"
2520
+ ]
2521
+ },
2522
+ payload: {
2523
+ type: "object",
2524
+ additionalProperties: false,
2525
+ properties: {
2526
+ type: {
2527
+ "enum": [
2528
+ "string"
2529
+ ]
2530
+ },
2531
+ title: {
2532
+ type: "string"
2533
+ },
2534
+ description: {
2535
+ type: "string"
2536
+ },
2537
+ pattern: {
2538
+ type: "string"
2539
+ },
2540
+ minLength: {
2541
+ type: "integer"
2542
+ },
2543
+ maxLength: {
2544
+ type: "integer"
2545
+ }
2546
+ },
2547
+ required: [
2548
+ "type"
2549
+ ]
2550
+ },
2551
+ userData: {
2552
+ type: "object",
2553
+ additionalProperties: false,
2554
+ properties: {
2555
+ type: {
2556
+ "enum": [
2557
+ "object"
2558
+ ]
2559
+ },
2560
+ title: {
2561
+ type: "string"
2562
+ },
2563
+ description: {
2564
+ type: "string"
2565
+ },
2566
+ properties: {
2567
+ type: "object"
2568
+ }
2569
+ },
2570
+ required: [
2571
+ "type"
2572
+ ]
2573
+ },
2574
+ headers: {
2575
+ type: "object",
2576
+ additionalProperties: false,
2577
+ properties: {
2578
+ type: {
2579
+ "enum": [
2580
+ "object"
2581
+ ]
2582
+ },
2583
+ title: {
2584
+ type: "string"
2585
+ },
2586
+ description: {
2587
+ type: "string"
2588
+ },
2589
+ properties: {
2590
+ type: "object"
2591
+ }
2592
+ },
2593
+ required: [
2594
+ "type"
2595
+ ]
2596
+ }
2597
+ }
2598
+ },
2599
+ required: {
2600
+ type: "array",
2601
+ minItems: 0,
2602
+ items: {
2603
+ type: "string"
2604
+ },
2605
+ uniqueItems: true
2606
+ },
2607
+ additionalProperties: {
2608
+ type: "boolean"
2609
+ }
2610
+ },
2611
+ required: [
2612
+ "type"
2613
+ ]
2614
+ },
2615
+ arrayItemsRequestListSources: {
2616
+ title: "Utils: Array items requestListSources definition",
2617
+ type: "object",
2618
+ additionalProperties: false,
2619
+ properties: {
2620
+ type: {
2621
+ "enum": [
2622
+ "object"
2623
+ ]
2624
+ },
2625
+ properties: {
2626
+ type: "object",
2627
+ additionalProperties: false,
2628
+ properties: {
2629
+ url: {
2630
+ type: "object",
2631
+ additionalProperties: false,
2632
+ properties: {
2633
+ type: {
2634
+ "enum": [
2635
+ "string"
2636
+ ]
2637
+ },
2638
+ title: {
2639
+ type: "string"
2640
+ },
2641
+ description: {
2642
+ type: "string"
2643
+ },
2644
+ pattern: {
2645
+ type: "string"
2646
+ },
2647
+ minLength: {
2648
+ type: "integer"
2649
+ },
2650
+ maxLength: {
2651
+ type: "integer"
2652
+ }
2653
+ },
2654
+ required: [
2655
+ "type"
2656
+ ]
2657
+ },
2658
+ method: {
2659
+ type: "object",
2660
+ additionalProperties: false,
2661
+ properties: {
2662
+ type: {
2663
+ "enum": [
2664
+ "string"
2665
+ ]
2666
+ },
2667
+ title: {
2668
+ type: "string"
2669
+ },
2670
+ description: {
2671
+ type: "string"
2672
+ },
2673
+ pattern: {
2674
+ type: "string"
2675
+ },
2676
+ minLength: {
2677
+ type: "integer"
2678
+ },
2679
+ maxLength: {
2680
+ type: "integer"
2681
+ }
2682
+ },
2683
+ required: [
2684
+ "type"
2685
+ ]
2686
+ },
2687
+ payload: {
2688
+ type: "object",
2689
+ additionalProperties: false,
2690
+ properties: {
2691
+ type: {
2692
+ "enum": [
2693
+ "string"
2694
+ ]
2695
+ },
2696
+ title: {
2697
+ type: "string"
2698
+ },
2699
+ description: {
2700
+ type: "string"
2701
+ },
2702
+ pattern: {
2703
+ type: "string"
2704
+ },
2705
+ minLength: {
2706
+ type: "integer"
2707
+ },
2708
+ maxLength: {
2709
+ type: "integer"
2710
+ }
2711
+ },
2712
+ required: [
2713
+ "type"
2714
+ ]
2715
+ },
2716
+ userData: {
2717
+ type: "object",
2718
+ additionalProperties: false,
2719
+ properties: {
2720
+ type: {
2721
+ "enum": [
2722
+ "object"
2723
+ ]
2724
+ },
2725
+ title: {
2726
+ type: "string"
2727
+ },
2728
+ description: {
2729
+ type: "string"
2730
+ },
2731
+ properties: {
2732
+ type: "object"
2733
+ }
2734
+ },
2735
+ required: [
2736
+ "type"
2737
+ ]
2738
+ },
2739
+ headers: {
2740
+ type: "object",
2741
+ additionalProperties: false,
2742
+ properties: {
2743
+ type: {
2744
+ "enum": [
2745
+ "object"
2746
+ ]
2747
+ },
2748
+ title: {
2749
+ type: "string"
2750
+ },
2751
+ description: {
2752
+ type: "string"
2753
+ },
2754
+ properties: {
2755
+ type: "object"
2756
+ }
2757
+ },
2758
+ required: [
2759
+ "type"
2760
+ ]
2761
+ }
2762
+ }
2763
+ },
2764
+ required: {
2765
+ type: "array",
2766
+ minItems: 0,
2767
+ items: {
2768
+ type: "string"
2769
+ },
2770
+ uniqueItems: true
2771
+ },
2772
+ additionalProperties: {
2773
+ type: "boolean"
2774
+ }
2775
+ },
2776
+ required: [
2777
+ "type"
2778
+ ]
2779
+ },
2780
+ subObjectProperties: {
2781
+ title: "Utils: Sub-object properties definition",
2782
+ type: "object",
2783
+ patternProperties: {
2784
+ "^": {
2785
+ oneOf: [
2786
+ {
2787
+ $ref: "#/definitions/subSchemaStringProperty"
2788
+ },
2789
+ {
2790
+ $ref: "#/definitions/subSchemaStringEnumProperty"
2791
+ },
2792
+ {
2793
+ $ref: "#/definitions/subSchemaArrayProperty"
2794
+ },
2795
+ {
2796
+ $ref: "#/definitions/subSchemaObjectProperty"
2797
+ },
2798
+ {
2799
+ $ref: "#/definitions/subSchemaIntegerProperty"
2800
+ },
2801
+ {
2802
+ $ref: "#/definitions/subSchemaBooleanProperty"
2803
+ },
2804
+ {
2805
+ $ref: "#/definitions/subSchemaResourceProperty"
2806
+ },
2807
+ {
2808
+ $ref: "#/definitions/subSchemaResourceArrayProperty"
2809
+ }
2810
+ ]
2811
+ }
2812
+ },
2813
+ additionalProperties: false
2814
+ },
2815
+ subObjectPropertiesProxy: {
2816
+ title: "Utils: Sub-object properties proxy definition",
2817
+ type: "object",
2818
+ additionalProperties: false,
2819
+ properties: {
2820
+ useApifyProxy: {
2821
+ type: "object",
2822
+ additionalProperties: false,
2823
+ properties: {
2824
+ type: {
2825
+ "enum": [
2826
+ "boolean"
2827
+ ]
2828
+ },
2829
+ title: {
2830
+ type: "string"
2831
+ },
2832
+ description: {
2833
+ type: "string"
2834
+ }
2835
+ },
2836
+ required: [
2837
+ "type"
2838
+ ]
2839
+ },
2840
+ apifyProxyGroups: {
2841
+ type: "object",
2842
+ additionalProperties: false,
2843
+ properties: {
2844
+ type: {
2845
+ "enum": [
2846
+ "array"
2847
+ ]
2848
+ },
2849
+ title: {
2850
+ type: "string"
2851
+ },
2852
+ description: {
2853
+ type: "string"
2854
+ },
2855
+ items: {
2856
+ type: [
2857
+ "object"
2858
+ ],
2859
+ properties: {
2860
+ type: {
2861
+ "enum": [
2862
+ "string"
2863
+ ]
2864
+ }
2865
+ },
2866
+ additionalProperties: false,
2867
+ required: [
2868
+ "type"
2869
+ ]
2870
+ }
2871
+ },
2872
+ required: [
2873
+ "type"
2874
+ ]
2875
+ },
2876
+ proxyUrls: {
2877
+ type: "object",
2878
+ additionalProperties: false,
2879
+ properties: {
2880
+ type: {
2881
+ "enum": [
2882
+ "array"
2883
+ ]
2884
+ },
2885
+ title: {
2886
+ type: "string"
2887
+ },
2888
+ description: {
2889
+ type: "string"
2890
+ },
2891
+ items: {
2892
+ type: [
2893
+ "object"
2894
+ ],
2895
+ properties: {
2896
+ type: {
2897
+ "enum": [
2898
+ "string"
2899
+ ]
2900
+ }
2901
+ },
2902
+ additionalProperties: false,
2903
+ required: [
2904
+ "type"
2905
+ ]
2906
+ }
2907
+ },
2908
+ required: [
2909
+ "type"
2910
+ ]
2911
+ },
2912
+ apifyProxyCountry: {
2913
+ type: "object",
2914
+ additionalProperties: false,
2915
+ properties: {
2916
+ type: {
2917
+ "enum": [
2918
+ "string"
2919
+ ]
2920
+ },
2921
+ title: {
2922
+ type: "string"
2923
+ },
2924
+ description: {
2925
+ type: "string"
2926
+ },
2927
+ pattern: {
2928
+ type: "string"
2929
+ },
2930
+ minLength: {
2931
+ type: "integer"
2932
+ },
2933
+ maxLength: {
2934
+ type: "integer"
2935
+ }
2936
+ },
2937
+ required: [
2938
+ "type"
2939
+ ]
2940
+ }
2941
+ }
2942
+ }
2943
+ };
2944
+ var schema = {
2945
+ title: title,
2946
+ type: type,
2947
+ properties: properties,
2948
+ additionalProperties: additionalProperties,
2949
+ required: required,
2950
+ definitions: definitions
2951
+ };
2952
+
2953
+ type CommonFieldDefinition<T> = {
2954
+ title: string;
2955
+ description: string;
2956
+ default?: T;
2957
+ prefill?: T;
2958
+ example?: T;
2959
+ nullable?: boolean;
2960
+ sectionCaption?: string;
2961
+ sectionDescription?: string;
2962
+ };
2963
+ type StringFieldDefinition = CommonFieldDefinition<string> & {
1183
2964
  type: 'string';
1184
2965
  editor: 'textfield' | 'textarea' | 'javascript' | 'python' | 'select' | 'datepicker' | 'hidden' | 'json' | 'fileupload';
1185
2966
  pattern?: string;
@@ -1281,6 +3062,10 @@ declare function validateExistenceOfRequiredFields(inputSchema: InputSchema): vo
1281
3062
  * then checks that all required fields are present and finally checks fully against the whole schema.
1282
3063
  *
1283
3064
  * This way we get the most accurate error message for user.
3065
+ *
3066
+ * @param validator An instance of AJV validator. Important: The JSON Schema that the passed input schema is validated against
3067
+ * is using features from JSON Schema 2019 draft, so the AJV instance must support it.
3068
+ * @param inputSchema Input schema to validate.
1284
3069
  */
1285
3070
  declare function validateInputSchema(validator: Ajv, inputSchema: Record<string, unknown>): asserts inputSchema is InputSchema;
1286
3071
 
@@ -1305,5 +3090,6 @@ declare function validateInputUsingValidator(validator: ValidateFunction, inputS
1305
3090
  * stringified JSON except the first line with globalSpacing spaces.
1306
3091
  */
1307
3092
  declare function makeInputJsFieldsReadable(json: string, jsFields: string[], jsonSpacing?: number, globalSpacing?: number): string;
3093
+ declare function ensureAjvSupportsDraft2019(ajvInstance: Ajv$1): void;
1308
3094
 
1309
- export { type ArrayFieldDefinition, type BooleanFieldDefinition, type FieldDefinition, type InputSchema, type IntegerFieldDefinition, type MixedFieldDefinition, type ObjectFieldDefinition, type StringFieldDefinition, schema as inputSchema, m, makeInputJsFieldsReadable, parseAjvError, validateExistenceOfRequiredFields, validateInputSchema, validateInputUsingValidator };
3095
+ export { type ArrayFieldDefinition, type BooleanFieldDefinition, type FieldDefinition, type InputSchema, type IntegerFieldDefinition, type MixedFieldDefinition, type ObjectFieldDefinition, type StringFieldDefinition, ensureAjvSupportsDraft2019, schema as inputSchema, m, makeInputJsFieldsReadable, parseAjvError, validateExistenceOfRequiredFields, validateInputSchema, validateInputUsingValidator };