@apify/input_schema 3.16.1 → 3.17.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.mjs CHANGED
@@ -204,86 +204,91 @@ var schema_default = {
204
204
  type: "object",
205
205
  properties: {
206
206
  type: { enum: ["array"] },
207
- editor: { enum: ["json", "requestListSources", "pseudoUrls", "globs", "keyValue", "stringList", "select", "hidden"] },
207
+ editor: { enum: ["json", "requestListSources", "pseudoUrls", "globs", "keyValue", "stringList", "select", "schemaBased", "hidden"] },
208
208
  isSecret: { type: "boolean" }
209
209
  },
210
- additionalProperties: true,
211
210
  required: ["type", "title", "description", "editor"],
212
211
  if: {
213
212
  properties: {
214
- isSecret: {
215
- not: {
216
- const: true
217
- }
218
- }
213
+ isSecret: { not: { const: true } }
219
214
  }
220
215
  },
221
216
  then: {
222
- if: {
223
- properties: {
224
- editor: { const: "select" }
225
- }
226
- },
227
- then: {
228
- additionalProperties: false,
229
- required: ["items"],
230
- properties: {
231
- type: { enum: ["array"] },
232
- editor: { enum: ["select"] },
233
- title: { type: "string" },
234
- description: { type: "string" },
235
- default: { type: "array" },
236
- prefill: { type: "array" },
237
- example: { type: "array" },
238
- nullable: { type: "boolean" },
239
- minItems: { type: "integer" },
240
- maxItems: { type: "integer" },
241
- uniqueItems: { type: "boolean" },
242
- sectionCaption: { type: "string" },
243
- sectionDescription: { type: "string" },
244
- items: {
245
- type: "object",
246
- additionalProperties: false,
247
- properties: {
248
- type: { enum: ["string"] },
249
- enum: {
250
- type: "array",
251
- items: { type: "string" },
252
- uniqueItems: true
253
- },
254
- enumTitles: {
255
- type: "array",
256
- items: { type: "string" }
257
- }
258
- },
259
- required: ["type", "enum"]
260
- },
261
- isSecret: { enum: [false] }
262
- }
217
+ properties: {
218
+ type: { enum: ["array"] },
219
+ title: { type: "string" },
220
+ description: { type: "string" },
221
+ default: { type: "array" },
222
+ prefill: { type: "array" },
223
+ example: { type: "array" },
224
+ nullable: { type: "boolean" },
225
+ minItems: { type: "integer" },
226
+ maxItems: { type: "integer" },
227
+ uniqueItems: { type: "boolean" },
228
+ sectionCaption: { type: "string" },
229
+ sectionDescription: { type: "string" },
230
+ placeholderKey: { type: "string" },
231
+ placeholderValue: { type: "string" },
232
+ patternKey: { type: "string" },
233
+ patternValue: { type: "string" },
234
+ isSecret: { enum: [false] }
263
235
  },
264
- else: {
265
- additionalProperties: false,
266
- properties: {
267
- type: { enum: ["array"] },
268
- editor: { enum: ["json", "requestListSources", "pseudoUrls", "globs", "keyValue", "stringList", "hidden"] },
269
- title: { type: "string" },
270
- description: { type: "string" },
271
- default: { type: "array" },
272
- prefill: { type: "array" },
273
- example: { type: "array" },
274
- nullable: { type: "boolean" },
275
- minItems: { type: "integer" },
276
- maxItems: { type: "integer" },
277
- uniqueItems: { type: "boolean" },
278
- sectionCaption: { type: "string" },
279
- sectionDescription: { type: "string" },
280
- placeholderKey: { type: "string" },
281
- placeholderValue: { type: "string" },
282
- patternKey: { type: "string" },
283
- patternValue: { type: "string" },
284
- isSecret: { enum: [false] }
236
+ 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
+ },
266
+ {
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
+ }
279
+ },
280
+ {
281
+ required: ["editor"],
282
+ properties: {
283
+ editor: { enum: ["json", "schemaBased", "hidden"] },
284
+ items: { $ref: "#/definitions/arrayItems" }
285
+ }
286
+ },
287
+ {
288
+ not: { required: ["editor"] },
289
+ properties: { items: { $ref: "#/definitions/arrayItems" } }
285
290
  }
286
- }
291
+ ]
287
292
  },
288
293
  else: {
289
294
  additionalProperties: false,
@@ -300,6 +305,7 @@ var schema_default = {
300
305
  uniqueItems: { type: "boolean" },
301
306
  sectionCaption: { type: "string" },
302
307
  sectionDescription: { type: "string" },
308
+ items: { $ref: "#/definitions/arrayItems" },
303
309
  isSecret: { enum: [true] }
304
310
  }
305
311
  }
@@ -307,26 +313,20 @@ var schema_default = {
307
313
  objectProperty: {
308
314
  title: "Object property",
309
315
  type: "object",
310
- additionalProperties: true,
311
316
  properties: {
312
317
  type: { enum: ["object"] },
313
318
  title: { type: "string" },
314
319
  description: { type: "string" },
315
- editor: { enum: ["json", "proxy", "hidden"] },
320
+ editor: { enum: ["json", "proxy", "schemaBased", "hidden"] },
316
321
  isSecret: { type: "boolean" }
317
322
  },
318
323
  required: ["type", "title", "description", "editor"],
319
324
  if: {
320
325
  properties: {
321
- isSecret: {
322
- not: {
323
- const: true
324
- }
325
- }
326
+ isSecret: { not: { const: true } }
326
327
  }
327
328
  },
328
329
  then: {
329
- additionalProperties: false,
330
330
  properties: {
331
331
  type: { enum: ["object"] },
332
332
  title: { type: "string" },
@@ -339,11 +339,31 @@ var schema_default = {
339
339
  nullable: { type: "boolean" },
340
340
  minProperties: { type: "integer" },
341
341
  maxProperties: { type: "integer" },
342
- editor: { enum: ["json", "proxy", "hidden"] },
342
+ editor: { enum: ["json", "proxy", "schemaBased", "hidden"] },
343
343
  sectionCaption: { type: "string" },
344
344
  sectionDescription: { type: "string" },
345
- isSecret: { enum: [false] }
346
- }
345
+ isSecret: { enum: [false] },
346
+ required: {
347
+ type: "array",
348
+ minItems: 0,
349
+ items: { type: "string" },
350
+ uniqueItems: true
351
+ },
352
+ additionalProperties: {
353
+ type: "boolean"
354
+ }
355
+ },
356
+ 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
+ } }
366
+ ]
347
367
  },
348
368
  else: {
349
369
  additionalProperties: false,
@@ -361,7 +381,17 @@ var schema_default = {
361
381
  editor: { enum: ["json", "hidden"] },
362
382
  sectionCaption: { type: "string" },
363
383
  sectionDescription: { type: "string" },
364
- isSecret: { enum: [true] }
384
+ properties: { $ref: "#/definitions/subObjectProperties" },
385
+ isSecret: { enum: [true] },
386
+ required: {
387
+ type: "array",
388
+ minItems: 0,
389
+ items: { type: "string" },
390
+ uniqueItems: true
391
+ },
392
+ additionalProperties: {
393
+ type: "boolean"
394
+ }
365
395
  }
366
396
  }
367
397
  },
@@ -499,133 +529,774 @@ var schema_default = {
499
529
  }
500
530
  }
501
531
  }
502
- ]
532
+ ]
533
+ },
534
+ anyProperty: {
535
+ title: "Any property",
536
+ type: "object",
537
+ additionalProperties: false,
538
+ properties: {
539
+ type: {
540
+ type: ["array"],
541
+ items: {
542
+ type: "string",
543
+ enum: ["object", "array", "string", "integer", "boolean"]
544
+ },
545
+ uniqueItems: true,
546
+ additionalItems: false,
547
+ minItems: 1
548
+ },
549
+ title: { type: "string" },
550
+ description: { type: "string" },
551
+ default: { type: ["object", "array", "string", "integer", "boolean"] },
552
+ prefill: { type: ["object", "array", "string", "integer", "boolean"] },
553
+ example: { type: ["object", "array", "string", "integer", "boolean"] },
554
+ nullable: { type: "boolean" },
555
+ editor: { enum: ["json", "hidden"] },
556
+ sectionCaption: { type: "string" },
557
+ sectionDescription: { type: "string" }
558
+ },
559
+ required: ["type", "title", "description", "editor"]
560
+ },
561
+ subSchemaStringEnumProperty: {
562
+ title: "Sub-schema: Enum property",
563
+ type: "object",
564
+ additionalProperties: false,
565
+ properties: {
566
+ type: { enum: ["string"] },
567
+ editor: { enum: ["select"] },
568
+ title: { type: "string" },
569
+ description: { type: "string" },
570
+ nullable: { type: "boolean" },
571
+ enum: {
572
+ type: "array",
573
+ items: { type: "string" },
574
+ minItems: 1,
575
+ uniqueItems: true
576
+ },
577
+ enumTitles: {
578
+ type: "array",
579
+ items: { type: "string" },
580
+ minItems: 1
581
+ }
582
+ },
583
+ required: ["type", "title", "description", "enum"]
584
+ },
585
+ subSchemaStringProperty: {
586
+ title: "Sub-schema: String property",
587
+ type: "object",
588
+ additionalProperties: true,
589
+ properties: {
590
+ type: { enum: ["string"] },
591
+ title: { type: "string" },
592
+ description: { type: "string" },
593
+ nullable: { type: "boolean" },
594
+ editor: { enum: ["javascript", "python", "textfield", "textarea", "datepicker", "hidden", "fileupload"] }
595
+ },
596
+ required: ["type", "title", "description"],
597
+ if: {
598
+ properties: {
599
+ editor: { const: "datepicker" }
600
+ }
601
+ },
602
+ then: {
603
+ additionalProperties: false,
604
+ properties: {
605
+ type: { enum: ["string"] },
606
+ title: { type: "string" },
607
+ description: { type: "string" },
608
+ pattern: { type: "string" },
609
+ nullable: { type: "boolean" },
610
+ minLength: { type: "integer" },
611
+ maxLength: { type: "integer" },
612
+ editor: { enum: ["datepicker"] },
613
+ dateType: { enum: ["absolute", "relative", "absoluteOrRelative"] }
614
+ }
615
+ },
616
+ else: {
617
+ additionalProperties: false,
618
+ properties: {
619
+ type: { enum: ["string"] },
620
+ title: { type: "string" },
621
+ description: { type: "string" },
622
+ pattern: { type: "string" },
623
+ nullable: { type: "boolean" },
624
+ minLength: { type: "integer" },
625
+ maxLength: { type: "integer" },
626
+ editor: { enum: ["javascript", "python", "textfield", "textarea", "hidden", "fileupload"] }
627
+ }
628
+ }
629
+ },
630
+ subSchemaArrayProperty: {
631
+ title: "Sub-schema: Array property",
632
+ type: "object",
633
+ properties: {
634
+ type: { enum: ["array"] },
635
+ editor: { enum: ["json", "requestListSources", "pseudoUrls", "globs", "keyValue", "stringList", "select", "hidden"] },
636
+ title: { type: "string" },
637
+ description: { type: "string" },
638
+ nullable: { type: "boolean" },
639
+ minItems: { type: "integer" },
640
+ maxItems: { type: "integer" },
641
+ uniqueItems: { type: "boolean" },
642
+ placeholderKey: { type: "string" },
643
+ placeholderValue: { type: "string" },
644
+ patternKey: { type: "string" },
645
+ patternValue: { type: "string" }
646
+ },
647
+ required: ["type", "title", "description"],
648
+ unevaluatedProperties: false,
649
+ oneOf: [
650
+ {
651
+ required: ["editor"],
652
+ properties: {
653
+ editor: { enum: ["select"] },
654
+ items: { $ref: "#/definitions/arrayItemsSelect" }
655
+ }
656
+ },
657
+ {
658
+ required: ["editor"],
659
+ properties: {
660
+ editor: { enum: ["keyValue"] },
661
+ items: { $ref: "#/definitions/arrayItemsKeyValue" }
662
+ }
663
+ },
664
+ {
665
+ required: ["editor"],
666
+ properties: {
667
+ editor: { enum: ["stringList"] },
668
+ items: { $ref: "#/definitions/arrayItemsStringList" }
669
+ }
670
+ },
671
+ {
672
+ required: ["editor"],
673
+ properties: {
674
+ editor: { enum: ["globs"] },
675
+ items: { $ref: "#/definitions/arrayItemsGlobs" }
676
+ }
677
+ },
678
+ {
679
+ required: ["editor"],
680
+ properties: {
681
+ editor: { enum: ["pseudoUrls"] },
682
+ items: { $ref: "#/definitions/arrayItemsPseudoUrls" }
683
+ }
684
+ },
685
+ {
686
+ required: ["editor"],
687
+ properties: {
688
+ editor: { enum: ["requestListSources"] },
689
+ items: { $ref: "#/definitions/arrayItemsRequestListSources" }
690
+ }
691
+ },
692
+ {
693
+ required: ["editor"],
694
+ properties: {
695
+ editor: { enum: ["json", "schemaBased", "hidden"] },
696
+ items: { $ref: "#/definitions/arrayItems" }
697
+ }
698
+ },
699
+ {
700
+ not: { required: ["editor"] },
701
+ properties: { items: { $ref: "#/definitions/arrayItems" } }
702
+ }
703
+ ]
704
+ },
705
+ subSchemaIntegerProperty: {
706
+ title: "Sub-schema: Integer property",
707
+ type: "object",
708
+ additionalProperties: false,
709
+ properties: {
710
+ type: { enum: ["integer"] },
711
+ title: { type: "string" },
712
+ description: { type: "string" },
713
+ nullable: { type: "boolean" },
714
+ minimum: { type: "integer" },
715
+ maximum: { type: "integer" },
716
+ unit: { type: "string" },
717
+ editor: { enum: ["number", "hidden"] }
718
+ },
719
+ required: ["type", "title", "description"]
720
+ },
721
+ subSchemaBooleanProperty: {
722
+ title: "Sub-schema: Boolean property",
723
+ type: "object",
724
+ additionalProperties: false,
725
+ properties: {
726
+ type: { enum: ["boolean"] },
727
+ title: { type: "string" },
728
+ description: { type: "string" },
729
+ nullable: { type: "boolean" },
730
+ groupCaption: { type: "string" },
731
+ groupDescription: { type: "string" },
732
+ editor: { enum: ["checkbox", "hidden"] }
733
+ },
734
+ required: ["type", "title", "description"]
735
+ },
736
+ subSchemaObjectProperty: {
737
+ title: "Sub-schema: Object property",
738
+ type: "object",
739
+ additionalProperties: false,
740
+ properties: {
741
+ type: { enum: ["object"] },
742
+ title: { type: "string" },
743
+ description: { type: "string" },
744
+ patternKey: { type: "string" },
745
+ patternValue: { type: "string" },
746
+ nullable: { type: "boolean" },
747
+ minProperties: { type: "integer" },
748
+ maxProperties: { type: "integer" },
749
+ editor: { enum: ["json", "proxy", "hidden"] },
750
+ properties: { $ref: "#/definitions/subObjectProperties" },
751
+ required: {
752
+ type: "array",
753
+ minItems: 0,
754
+ items: { type: "string" },
755
+ uniqueItems: true
756
+ },
757
+ additionalProperties: {
758
+ type: "boolean"
759
+ }
760
+ },
761
+ required: ["type", "title", "description"]
762
+ },
763
+ subSchemaResourceProperty: {
764
+ title: "Sub-schema: Resource property",
765
+ type: "object",
766
+ additionalProperties: false,
767
+ properties: {
768
+ type: { enum: ["string"] },
769
+ title: { type: "string" },
770
+ description: { type: "string" },
771
+ editor: { enum: ["resourcePicker", "hidden"] },
772
+ resourceType: { enum: ["dataset", "keyValueStore", "requestQueue"] },
773
+ resourcePermissions: {
774
+ type: "array",
775
+ items: {
776
+ type: "string",
777
+ enum: ["READ", "WRITE"]
778
+ },
779
+ minItems: 1,
780
+ uniqueItems: true,
781
+ contains: {
782
+ const: "READ"
783
+ }
784
+ },
785
+ nullable: { type: "boolean" }
786
+ },
787
+ required: ["type", "title", "description", "resourceType"]
788
+ },
789
+ subSchemaResourceArrayProperty: {
790
+ title: "Sub-schema: Resource array property",
791
+ type: "object",
792
+ additionalProperties: false,
793
+ properties: {
794
+ type: { enum: ["array"] },
795
+ title: { type: "string" },
796
+ description: { type: "string" },
797
+ editor: { enum: ["resourcePicker", "hidden"] },
798
+ resourcePermissions: {
799
+ type: "array",
800
+ items: {
801
+ type: "string",
802
+ enum: ["READ", "WRITE"]
803
+ },
804
+ minItems: 1,
805
+ uniqueItems: true,
806
+ contains: {
807
+ const: "READ"
808
+ }
809
+ },
810
+ nullable: { type: "boolean" },
811
+ minItems: { type: "integer" },
812
+ maxItems: { type: "integer" },
813
+ uniqueItems: { type: "boolean" },
814
+ resourceType: { enum: ["dataset", "keyValueStore", "requestQueue"] }
815
+ },
816
+ required: ["type", "title", "description", "resourceType"]
817
+ },
818
+ arrayItems: {
819
+ title: "Utils: Array items definition",
820
+ type: "object",
821
+ properties: {
822
+ type: { enum: ["string", "integer", "boolean", "object", "array"] }
823
+ },
824
+ required: ["type"],
825
+ if: {
826
+ properties: {
827
+ type: { enum: ["object"] }
828
+ }
829
+ },
830
+ then: {
831
+ additionalProperties: false,
832
+ properties: {
833
+ type: { enum: ["object"] },
834
+ properties: {
835
+ type: "object",
836
+ patternProperties: {
837
+ "^": {
838
+ oneOf: [
839
+ { $ref: "#/definitions/subSchemaStringProperty" },
840
+ { $ref: "#/definitions/subSchemaStringEnumProperty" },
841
+ { $ref: "#/definitions/subSchemaArrayProperty" },
842
+ { $ref: "#/definitions/subSchemaObjectProperty" },
843
+ { $ref: "#/definitions/subSchemaIntegerProperty" },
844
+ { $ref: "#/definitions/subSchemaBooleanProperty" },
845
+ { $ref: "#/definitions/subSchemaResourceProperty" },
846
+ { $ref: "#/definitions/subSchemaResourceArrayProperty" }
847
+ ]
848
+ }
849
+ },
850
+ additionalProperties: false
851
+ },
852
+ required: {
853
+ type: "array",
854
+ minItems: 0,
855
+ items: { type: "string" },
856
+ uniqueItems: true
857
+ },
858
+ additionalProperties: {
859
+ type: "boolean"
860
+ }
861
+ }
862
+ },
863
+ else: {
864
+ if: {
865
+ properties: { type: { const: "array" } }
866
+ },
867
+ then: {
868
+ additionalProperties: false,
869
+ properties: {
870
+ type: { enum: ["array"] },
871
+ items: {
872
+ $ref: "#/definitions/arrayItems"
873
+ }
874
+ }
875
+ },
876
+ else: {
877
+ additionalProperties: false,
878
+ properties: {
879
+ type: { enum: ["string", "integer", "boolean"] }
880
+ }
881
+ }
882
+ }
883
+ },
884
+ arrayItemsSelect: {
885
+ title: "Utils: Array items select definition",
886
+ type: "object",
887
+ additionalProperties: false,
888
+ properties: {
889
+ type: { enum: ["string"] },
890
+ enum: {
891
+ type: "array",
892
+ items: { type: "string" },
893
+ uniqueItems: true
894
+ },
895
+ enumTitles: {
896
+ type: "array",
897
+ items: { type: "string" }
898
+ }
899
+ },
900
+ required: ["type", "enum"]
901
+ },
902
+ arrayItemsKeyValue: {
903
+ title: "Utils: Array items keyValue definition",
904
+ type: "object",
905
+ additionalProperties: false,
906
+ properties: {
907
+ type: { enum: ["object"] },
908
+ properties: {
909
+ type: "object",
910
+ properties: {
911
+ key: {
912
+ type: "object",
913
+ additionalProperties: false,
914
+ properties: {
915
+ type: { enum: ["string"] },
916
+ title: { type: "string" },
917
+ description: { type: "string" },
918
+ pattern: { type: "string" },
919
+ minLength: { type: "integer" },
920
+ maxLength: { type: "integer" }
921
+ },
922
+ required: ["type"]
923
+ },
924
+ value: {
925
+ type: "object",
926
+ additionalProperties: false,
927
+ properties: {
928
+ type: { enum: ["string"] },
929
+ title: { type: "string" },
930
+ description: { type: "string" },
931
+ pattern: { type: "string" },
932
+ minLength: { type: "integer" },
933
+ maxLength: { type: "integer" }
934
+ },
935
+ required: ["type"]
936
+ }
937
+ },
938
+ required: ["key", "value"],
939
+ additionalProperties: false
940
+ },
941
+ required: {
942
+ type: "array",
943
+ minItems: 0,
944
+ items: { type: "string" },
945
+ uniqueItems: true
946
+ },
947
+ additionalProperties: { type: "boolean" }
948
+ },
949
+ required: ["type", "properties"]
950
+ },
951
+ arrayItemsStringList: {
952
+ title: "Utils: Array items stringList definition",
953
+ type: "object",
954
+ additionalProperties: false,
955
+ properties: {
956
+ type: { enum: ["string"] },
957
+ pattern: { type: "string" },
958
+ minLength: { type: "integer" },
959
+ maxLength: { type: "integer" }
960
+ },
961
+ required: ["type"]
962
+ },
963
+ arrayItemsGlobs: {
964
+ title: "Utils: Array items globs definition",
965
+ type: "object",
966
+ additionalProperties: false,
967
+ properties: {
968
+ type: { enum: ["object"] },
969
+ properties: {
970
+ type: "object",
971
+ additionalProperties: false,
972
+ properties: {
973
+ glob: {
974
+ type: "object",
975
+ additionalProperties: false,
976
+ properties: {
977
+ type: { enum: ["string"] },
978
+ title: { type: "string" },
979
+ description: { type: "string" },
980
+ pattern: { type: "string" },
981
+ minLength: { type: "integer" },
982
+ maxLength: { type: "integer" }
983
+ },
984
+ required: ["type"]
985
+ },
986
+ method: {
987
+ type: "object",
988
+ additionalProperties: false,
989
+ properties: {
990
+ type: { enum: ["string"] },
991
+ title: { type: "string" },
992
+ description: { type: "string" },
993
+ pattern: { type: "string" },
994
+ minLength: { type: "integer" },
995
+ maxLength: { type: "integer" }
996
+ },
997
+ required: ["type"]
998
+ },
999
+ payload: {
1000
+ type: "object",
1001
+ additionalProperties: false,
1002
+ properties: {
1003
+ type: { enum: ["string"] },
1004
+ title: { type: "string" },
1005
+ description: { type: "string" },
1006
+ pattern: { type: "string" },
1007
+ minLength: { type: "integer" },
1008
+ maxLength: { type: "integer" }
1009
+ },
1010
+ required: ["type"]
1011
+ },
1012
+ userData: {
1013
+ type: "object",
1014
+ additionalProperties: false,
1015
+ properties: {
1016
+ type: { enum: ["object"] },
1017
+ title: { type: "string" },
1018
+ description: { type: "string" },
1019
+ properties: { type: "object" }
1020
+ },
1021
+ required: ["type"]
1022
+ },
1023
+ headers: {
1024
+ type: "object",
1025
+ additionalProperties: false,
1026
+ properties: {
1027
+ type: { enum: ["object"] },
1028
+ title: { type: "string" },
1029
+ description: { type: "string" },
1030
+ properties: { type: "object" }
1031
+ },
1032
+ required: ["type"]
1033
+ }
1034
+ }
1035
+ },
1036
+ required: {
1037
+ type: "array",
1038
+ minItems: 0,
1039
+ items: { type: "string" },
1040
+ uniqueItems: true
1041
+ },
1042
+ additionalProperties: { type: "boolean" }
1043
+ },
1044
+ required: ["type"]
1045
+ },
1046
+ arrayItemsPseudoUrls: {
1047
+ title: "Utils: Array items pseudoUrls definition",
1048
+ type: "object",
1049
+ additionalProperties: false,
1050
+ properties: {
1051
+ type: { enum: ["object"] },
1052
+ properties: {
1053
+ type: "object",
1054
+ additionalProperties: false,
1055
+ properties: {
1056
+ purl: {
1057
+ type: "object",
1058
+ additionalProperties: false,
1059
+ properties: {
1060
+ type: { enum: ["string"] },
1061
+ title: { type: "string" },
1062
+ description: { type: "string" },
1063
+ pattern: { type: "string" },
1064
+ minLength: { type: "integer" },
1065
+ maxLength: { type: "integer" }
1066
+ },
1067
+ required: ["type"]
1068
+ },
1069
+ method: {
1070
+ type: "object",
1071
+ additionalProperties: false,
1072
+ properties: {
1073
+ type: { enum: ["string"] },
1074
+ title: { type: "string" },
1075
+ description: { type: "string" },
1076
+ pattern: { type: "string" },
1077
+ minLength: { type: "integer" },
1078
+ maxLength: { type: "integer" }
1079
+ },
1080
+ required: ["type"]
1081
+ },
1082
+ payload: {
1083
+ type: "object",
1084
+ additionalProperties: false,
1085
+ properties: {
1086
+ type: { enum: ["string"] },
1087
+ title: { type: "string" },
1088
+ description: { type: "string" },
1089
+ pattern: { type: "string" },
1090
+ minLength: { type: "integer" },
1091
+ maxLength: { type: "integer" }
1092
+ },
1093
+ required: ["type"]
1094
+ },
1095
+ userData: {
1096
+ type: "object",
1097
+ additionalProperties: false,
1098
+ properties: {
1099
+ type: { enum: ["object"] },
1100
+ title: { type: "string" },
1101
+ description: { type: "string" },
1102
+ properties: { type: "object" }
1103
+ },
1104
+ required: ["type"]
1105
+ },
1106
+ headers: {
1107
+ type: "object",
1108
+ additionalProperties: false,
1109
+ properties: {
1110
+ type: { enum: ["object"] },
1111
+ title: { type: "string" },
1112
+ description: { type: "string" },
1113
+ properties: { type: "object" }
1114
+ },
1115
+ required: ["type"]
1116
+ }
1117
+ }
1118
+ },
1119
+ required: {
1120
+ type: "array",
1121
+ minItems: 0,
1122
+ items: { type: "string" },
1123
+ uniqueItems: true
1124
+ },
1125
+ additionalProperties: { type: "boolean" }
1126
+ },
1127
+ required: ["type"]
1128
+ },
1129
+ arrayItemsRequestListSources: {
1130
+ title: "Utils: Array items requestListSources definition",
1131
+ type: "object",
1132
+ additionalProperties: false,
1133
+ properties: {
1134
+ type: { enum: ["object"] },
1135
+ properties: {
1136
+ type: "object",
1137
+ additionalProperties: false,
1138
+ properties: {
1139
+ url: {
1140
+ type: "object",
1141
+ additionalProperties: false,
1142
+ properties: {
1143
+ type: { enum: ["string"] },
1144
+ title: { type: "string" },
1145
+ description: { type: "string" },
1146
+ pattern: { type: "string" },
1147
+ minLength: { type: "integer" },
1148
+ maxLength: { type: "integer" }
1149
+ },
1150
+ required: ["type"]
1151
+ },
1152
+ method: {
1153
+ type: "object",
1154
+ additionalProperties: false,
1155
+ properties: {
1156
+ type: { enum: ["string"] },
1157
+ title: { type: "string" },
1158
+ description: { type: "string" },
1159
+ pattern: { type: "string" },
1160
+ minLength: { type: "integer" },
1161
+ maxLength: { type: "integer" }
1162
+ },
1163
+ required: ["type"]
1164
+ },
1165
+ payload: {
1166
+ type: "object",
1167
+ additionalProperties: false,
1168
+ properties: {
1169
+ type: { enum: ["string"] },
1170
+ title: { type: "string" },
1171
+ description: { type: "string" },
1172
+ pattern: { type: "string" },
1173
+ minLength: { type: "integer" },
1174
+ maxLength: { type: "integer" }
1175
+ },
1176
+ required: ["type"]
1177
+ },
1178
+ userData: {
1179
+ type: "object",
1180
+ additionalProperties: false,
1181
+ properties: {
1182
+ type: { enum: ["object"] },
1183
+ title: { type: "string" },
1184
+ description: { type: "string" },
1185
+ properties: { type: "object" }
1186
+ },
1187
+ required: ["type"]
1188
+ },
1189
+ headers: {
1190
+ type: "object",
1191
+ additionalProperties: false,
1192
+ properties: {
1193
+ type: { enum: ["object"] },
1194
+ title: { type: "string" },
1195
+ description: { type: "string" },
1196
+ properties: { type: "object" }
1197
+ },
1198
+ required: ["type"]
1199
+ }
1200
+ }
1201
+ },
1202
+ required: {
1203
+ type: "array",
1204
+ minItems: 0,
1205
+ items: { type: "string" },
1206
+ uniqueItems: true
1207
+ },
1208
+ additionalProperties: { type: "boolean" }
1209
+ },
1210
+ required: ["type"]
1211
+ },
1212
+ subObjectProperties: {
1213
+ title: "Utils: Sub-object properties definition",
1214
+ type: "object",
1215
+ patternProperties: {
1216
+ "^": {
1217
+ oneOf: [
1218
+ { $ref: "#/definitions/subSchemaStringProperty" },
1219
+ { $ref: "#/definitions/subSchemaStringEnumProperty" },
1220
+ { $ref: "#/definitions/subSchemaArrayProperty" },
1221
+ { $ref: "#/definitions/subSchemaObjectProperty" },
1222
+ { $ref: "#/definitions/subSchemaIntegerProperty" },
1223
+ { $ref: "#/definitions/subSchemaBooleanProperty" },
1224
+ { $ref: "#/definitions/subSchemaResourceProperty" },
1225
+ { $ref: "#/definitions/subSchemaResourceArrayProperty" }
1226
+ ]
1227
+ }
1228
+ },
1229
+ additionalProperties: false
503
1230
  },
504
- anyProperty: {
505
- title: "Any property",
1231
+ subObjectPropertiesProxy: {
1232
+ title: "Utils: Sub-object properties proxy definition",
506
1233
  type: "object",
507
1234
  additionalProperties: false,
508
1235
  properties: {
509
- type: {
510
- type: ["array"],
511
- items: {
512
- type: "string",
513
- enum: ["object", "array", "string", "integer", "boolean"]
1236
+ useApifyProxy: {
1237
+ type: "object",
1238
+ additionalProperties: false,
1239
+ properties: {
1240
+ type: { enum: ["boolean"] },
1241
+ title: { type: "string" },
1242
+ description: { type: "string" }
514
1243
  },
515
- uniqueItems: true,
516
- additionalItems: false,
517
- minItems: 1
1244
+ required: ["type"]
518
1245
  },
519
- title: { type: "string" },
520
- description: { type: "string" },
521
- default: { type: ["object", "array", "string", "integer", "boolean"] },
522
- prefill: { type: ["object", "array", "string", "integer", "boolean"] },
523
- example: { type: ["object", "array", "string", "integer", "boolean"] },
524
- nullable: { type: "boolean" },
525
- editor: { enum: ["json", "hidden"] },
526
- sectionCaption: { type: "string" },
527
- sectionDescription: { type: "string" }
528
- },
529
- required: ["type", "title", "description", "editor"]
1246
+ apifyProxyGroups: {
1247
+ type: "object",
1248
+ additionalProperties: false,
1249
+ properties: {
1250
+ type: { enum: ["array"] },
1251
+ title: { type: "string" },
1252
+ description: { type: "string" },
1253
+ items: {
1254
+ type: ["object"],
1255
+ properties: {
1256
+ type: { enum: ["string"] }
1257
+ },
1258
+ additionalProperties: false,
1259
+ required: ["type"]
1260
+ }
1261
+ },
1262
+ required: ["type"]
1263
+ },
1264
+ proxyUrls: {
1265
+ type: "object",
1266
+ additionalProperties: false,
1267
+ properties: {
1268
+ type: { enum: ["array"] },
1269
+ title: { type: "string" },
1270
+ description: { type: "string" },
1271
+ items: {
1272
+ type: ["object"],
1273
+ properties: {
1274
+ type: { enum: ["string"] }
1275
+ },
1276
+ additionalProperties: false,
1277
+ required: ["type"]
1278
+ }
1279
+ },
1280
+ required: ["type"]
1281
+ },
1282
+ apifyProxyCountry: {
1283
+ type: "object",
1284
+ additionalProperties: false,
1285
+ properties: {
1286
+ type: { enum: ["string"] },
1287
+ title: { type: "string" },
1288
+ description: { type: "string" },
1289
+ pattern: { type: "string" },
1290
+ minLength: { type: "integer" },
1291
+ maxLength: { type: "integer" }
1292
+ },
1293
+ required: ["type"]
1294
+ }
1295
+ }
530
1296
  }
531
1297
  }
532
1298
  };
533
1299
 
534
- // src/input_schema.ts
535
- var { definitions } = schema_default;
536
- function parseAjvError(error, rootName, properties = {}, input = {}) {
537
- let fieldKey;
538
- let message;
539
- if (error.keyword === "type") {
540
- fieldKey = error.instancePath.split("/").pop();
541
- if (properties[fieldKey] && properties[fieldKey].nullable && input[fieldKey] === null) {
542
- return null;
543
- }
544
- message = m("inputSchema.validation.generic", { rootName, fieldKey, message: error.message });
545
- } else if (error.keyword === "required") {
546
- fieldKey = error.params.missingProperty;
547
- message = m("inputSchema.validation.required", { rootName, fieldKey });
548
- } else if (error.keyword === "additionalProperties") {
549
- fieldKey = error.params.additionalProperty;
550
- message = m("inputSchema.validation.additionalProperty", { rootName, fieldKey });
551
- } else if (error.keyword === "enum") {
552
- fieldKey = error.instancePath.split("/").pop();
553
- const errorMessage = `${error.message}: "${error.params.allowedValues.join('", "')}"`;
554
- message = m("inputSchema.validation.generic", { rootName, fieldKey, message: errorMessage });
555
- } else if (error.keyword === "const") {
556
- fieldKey = error.instancePath.split("/").pop();
557
- message = m("inputSchema.validation.generic", { rootName, fieldKey, message: error.message });
558
- } else {
559
- fieldKey = error.instancePath.split("/").pop();
560
- message = m("inputSchema.validation.generic", { rootName, fieldKey, message: error.message });
561
- }
562
- return { fieldKey, message };
563
- }
564
- __name(parseAjvError, "parseAjvError");
565
- var validateAgainstSchemaOrThrow = /* @__PURE__ */ __name((validator, obj, inputSchema, rootName) => {
566
- if (validator.validate(inputSchema, obj)) return;
567
- const errorMessage = parseAjvError(validator.errors[0], rootName)?.message;
568
- throw new Error(`Input schema is not valid (${errorMessage})`);
569
- }, "validateAgainstSchemaOrThrow");
570
- function validateBasicStructure(validator, obj) {
571
- const schemaWithoutProperties = {
572
- ...schema_default,
573
- properties: { ...schema_default.properties, properties: { type: "object" } }
574
- };
575
- validateAgainstSchemaOrThrow(validator, obj, schemaWithoutProperties, "schema");
576
- }
577
- __name(validateBasicStructure, "validateBasicStructure");
578
- function validateField(validator, fieldSchema, fieldKey) {
579
- const matchingDefinitions = Object.values(definitions).filter((definition2) => {
580
- return definition2.properties.type.enum ? definition2.properties.type.enum[0] === fieldSchema.type : Array.isArray(fieldSchema.type);
581
- });
582
- if (matchingDefinitions.length === 0) {
583
- const errorMessage = m("inputSchema.validation.noMatchingDefinition", { fieldKey });
584
- throw new Error(`Input schema is not valid (${errorMessage})`);
585
- }
586
- if (matchingDefinitions.length === 1) {
587
- validateAgainstSchemaOrThrow(validator, fieldSchema, matchingDefinitions[0], `schema.properties.${fieldKey}`);
588
- return;
589
- }
590
- if (fieldSchema.enum) {
591
- const definition2 = matchingDefinitions.filter((item) => !!item.properties.enum).pop();
592
- if (!definition2) throw new Error('Input schema validation failed to find "enum property" definition');
593
- validateAgainstSchemaOrThrow(validator, fieldSchema, definition2, `schema.properties.${fieldKey}.enum`);
594
- return;
595
- }
596
- if (fieldSchema.resourceType) {
597
- const definition2 = matchingDefinitions.filter((item) => !!item.properties.resourceType).pop();
598
- if (!definition2) throw new Error('Input schema validation failed to find "resource property" definition');
599
- validateAgainstSchemaOrThrow(validator, fieldSchema, definition2, `schema.properties.${fieldKey}`);
600
- return;
601
- }
602
- const definition = matchingDefinitions.filter((item) => !item.properties.enum && !item.properties.resourceType).pop();
603
- if (!definition) throw new Error('Input schema validation failed to find other than "enum property" definition');
604
- validateAgainstSchemaOrThrow(validator, fieldSchema, definition, `schema.properties.${fieldKey}`);
605
- }
606
- __name(validateField, "validateField");
607
- function validateProperties(inputSchema, validator) {
608
- Object.entries(inputSchema.properties).forEach(
609
- ([fieldKey, fieldSchema]) => validateField(validator, fieldSchema, fieldKey)
610
- );
611
- }
612
- __name(validateProperties, "validateProperties");
613
- function validateExistenceOfRequiredFields(inputSchema) {
614
- if (!inputSchema?.required?.length) return;
615
- Object.values(inputSchema?.required).forEach((fieldKey) => {
616
- if (inputSchema?.properties[fieldKey]) return;
617
- throw new Error(m("inputSchema.validation.missingRequiredField", { fieldKey }));
618
- });
619
- }
620
- __name(validateExistenceOfRequiredFields, "validateExistenceOfRequiredFields");
621
- function validateInputSchema(validator, inputSchema) {
622
- validateBasicStructure(validator, inputSchema);
623
- validateProperties(inputSchema, validator);
624
- validateExistenceOfRequiredFields(inputSchema);
625
- validateAgainstSchemaOrThrow(validator, inputSchema, schema_default, "schema");
626
- }
627
- __name(validateInputSchema, "validateInputSchema");
628
-
629
1300
  // src/utilities.ts
630
1301
  import { parse } from "acorn-loose";
631
1302
  import { countries } from "countries-list";
@@ -863,7 +1534,167 @@ ${globalSpaces}`);
863
1534
  return niceJson;
864
1535
  }
865
1536
  __name(makeInputJsFieldsReadable, "makeInputJsFieldsReadable");
1537
+ var DRAFT_2019_09_META_SCHEMA = "https://json-schema.org/draft/2019-09/schema";
1538
+ function ensureAjvSupportsDraft2019(ajvInstance) {
1539
+ const metaSchema = ajvInstance.getSchema(DRAFT_2019_09_META_SCHEMA);
1540
+ if (!metaSchema) {
1541
+ throw new Error(
1542
+ `The provided Ajv instance does not support draft-2019-09 (missing meta-schema ${DRAFT_2019_09_META_SCHEMA}).`
1543
+ );
1544
+ }
1545
+ }
1546
+ __name(ensureAjvSupportsDraft2019, "ensureAjvSupportsDraft2019");
1547
+
1548
+ // src/input_schema.ts
1549
+ var { definitions } = schema_default;
1550
+ var [fieldDefinitions, subFieldDefinitions] = Object.values(definitions).reduce((acc, definition) => {
1551
+ if (definition.title.startsWith("Utils:")) {
1552
+ return acc;
1553
+ }
1554
+ if (definition.title.startsWith("Sub-schema:")) {
1555
+ acc[1].push(definition);
1556
+ } else {
1557
+ acc[0].push(definition);
1558
+ }
1559
+ return acc;
1560
+ }, [[], []]);
1561
+ function parseAjvError(error, rootName, properties = {}, input = {}) {
1562
+ let fieldKey;
1563
+ let message;
1564
+ const cleanPropertyName = /* @__PURE__ */ __name((name) => {
1565
+ return name.replace(/^\/|\/$/g, "").replace(/\//g, ".");
1566
+ }, "cleanPropertyName");
1567
+ if (error.keyword === "type") {
1568
+ fieldKey = error.instancePath.split("/").pop();
1569
+ if (properties[fieldKey] && properties[fieldKey].nullable && input[fieldKey] === null) {
1570
+ return null;
1571
+ }
1572
+ message = m("inputSchema.validation.generic", { rootName, fieldKey, message: error.message });
1573
+ } else if (error.keyword === "required") {
1574
+ fieldKey = cleanPropertyName(`${error.instancePath}/${error.params.missingProperty}`);
1575
+ message = m("inputSchema.validation.required", { rootName, fieldKey });
1576
+ } else if (error.keyword === "additionalProperties") {
1577
+ fieldKey = cleanPropertyName(`${error.instancePath}/${error.params.additionalProperty}`);
1578
+ message = m("inputSchema.validation.additionalProperty", { rootName, fieldKey });
1579
+ } else if (error.keyword === "unevaluatedProperties") {
1580
+ fieldKey = cleanPropertyName(`${error.instancePath}/${error.params.unevaluatedProperty}`);
1581
+ message = m("inputSchema.validation.additionalProperty", { rootName, fieldKey });
1582
+ } else if (error.keyword === "enum") {
1583
+ fieldKey = cleanPropertyName(error.instancePath);
1584
+ const errorMessage = `${error.message}: "${error.params.allowedValues.join('", "')}"`;
1585
+ message = m("inputSchema.validation.generic", { rootName, fieldKey, message: errorMessage });
1586
+ } else if (error.keyword === "const") {
1587
+ fieldKey = cleanPropertyName(error.instancePath);
1588
+ message = m("inputSchema.validation.generic", { rootName, fieldKey, message: error.message });
1589
+ } else {
1590
+ fieldKey = cleanPropertyName(error.instancePath);
1591
+ message = m("inputSchema.validation.generic", { rootName, fieldKey, message: error.message });
1592
+ }
1593
+ return { fieldKey, message };
1594
+ }
1595
+ __name(parseAjvError, "parseAjvError");
1596
+ var validateAgainstSchemaOrThrow = /* @__PURE__ */ __name((validator, obj, inputSchema, rootName) => {
1597
+ if (validator.validate(inputSchema, obj)) return;
1598
+ const errorMessage = parseAjvError(validator.errors[0], rootName)?.message;
1599
+ throw new Error(`Input schema is not valid (${errorMessage})`);
1600
+ }, "validateAgainstSchemaOrThrow");
1601
+ function validateBasicStructure(validator, obj) {
1602
+ const schemaWithoutProperties = {
1603
+ ...schema_default,
1604
+ properties: { ...schema_default.properties, properties: { type: "object" } }
1605
+ };
1606
+ validateAgainstSchemaOrThrow(validator, obj, schemaWithoutProperties, "schema");
1607
+ }
1608
+ __name(validateBasicStructure, "validateBasicStructure");
1609
+ function validateField(validator, fieldSchema, fieldKey, isSubField = false) {
1610
+ const relevantDefinitions = isSubField ? subFieldDefinitions : fieldDefinitions;
1611
+ const matchingDefinitions = Object.values(relevantDefinitions).filter((definition2) => {
1612
+ return definition2.properties.type.enum ? definition2.properties.type.enum[0] === fieldSchema.type : Array.isArray(fieldSchema.type);
1613
+ });
1614
+ if (matchingDefinitions.length === 0) {
1615
+ const errorMessage = m("inputSchema.validation.noMatchingDefinition", { fieldKey });
1616
+ throw new Error(`Input schema is not valid (${errorMessage})`);
1617
+ }
1618
+ const enhanceDefinition = /* @__PURE__ */ __name((definition2) => {
1619
+ return {
1620
+ ...definition2,
1621
+ definitions
1622
+ };
1623
+ }, "enhanceDefinition");
1624
+ if (matchingDefinitions.length === 1) {
1625
+ validateAgainstSchemaOrThrow(validator, fieldSchema, enhanceDefinition(matchingDefinitions[0]), `schema.properties.${fieldKey}`);
1626
+ return;
1627
+ }
1628
+ if (fieldSchema.enum) {
1629
+ const definition2 = matchingDefinitions.filter((item) => !!item.properties.enum).pop();
1630
+ if (!definition2) throw new Error('Input schema validation failed to find "enum property" definition');
1631
+ validateAgainstSchemaOrThrow(validator, fieldSchema, enhanceDefinition(definition2), `schema.properties.${fieldKey}.enum`);
1632
+ return;
1633
+ }
1634
+ if (fieldSchema.resourceType) {
1635
+ const definition2 = matchingDefinitions.filter((item) => !!item.properties.resourceType).pop();
1636
+ if (!definition2) throw new Error('Input schema validation failed to find "resource property" definition');
1637
+ validateAgainstSchemaOrThrow(validator, fieldSchema, enhanceDefinition(definition2), `schema.properties.${fieldKey}`);
1638
+ return;
1639
+ }
1640
+ const definition = matchingDefinitions.filter((item) => !item.properties.enum && !item.properties.resourceType).pop();
1641
+ if (!definition) throw new Error('Input schema validation failed to find other than "enum property" definition');
1642
+ validateAgainstSchemaOrThrow(validator, fieldSchema, enhanceDefinition(definition), `schema.properties.${fieldKey}`);
1643
+ }
1644
+ __name(validateField, "validateField");
1645
+ function validateSubFields(validator, fieldSchema, fieldKey) {
1646
+ Object.entries(fieldSchema.properties).forEach(([subFieldKey, subFieldSchema]) => {
1647
+ if (subFieldSchema.type === "object" && subFieldSchema.properties) {
1648
+ validateSubFields(validator, subFieldSchema, `${fieldKey}.${subFieldKey}`);
1649
+ }
1650
+ if (subFieldSchema.type === "array" && subFieldSchema.items) {
1651
+ validateArrayField(validator, subFieldSchema, `${fieldKey}.${subFieldKey}`);
1652
+ }
1653
+ validateField(validator, subFieldSchema, `${fieldKey}.${subFieldKey}`, true);
1654
+ });
1655
+ }
1656
+ __name(validateSubFields, "validateSubFields");
1657
+ function validateArrayField(validator, fieldSchema, fieldKey) {
1658
+ const arraySchema = fieldSchema.items;
1659
+ if (!arraySchema) return;
1660
+ if (arraySchema.type === "object" && arraySchema.properties) {
1661
+ validateSubFields(validator, arraySchema, `${fieldKey}.items`);
1662
+ }
1663
+ if (arraySchema.type === "array" && arraySchema.items) {
1664
+ validateArrayField(validator, arraySchema, `${fieldKey}.items`);
1665
+ }
1666
+ }
1667
+ __name(validateArrayField, "validateArrayField");
1668
+ function validateProperties(inputSchema, validator) {
1669
+ Object.entries(inputSchema.properties).forEach(([fieldKey, fieldSchema]) => {
1670
+ if (fieldSchema.type === "object" && fieldSchema.properties) {
1671
+ validateSubFields(validator, fieldSchema, fieldKey);
1672
+ }
1673
+ if (fieldSchema.type === "array" && fieldSchema.items) {
1674
+ validateArrayField(validator, fieldSchema, fieldKey);
1675
+ }
1676
+ validateField(validator, fieldSchema, fieldKey);
1677
+ });
1678
+ }
1679
+ __name(validateProperties, "validateProperties");
1680
+ function validateExistenceOfRequiredFields(inputSchema) {
1681
+ if (!inputSchema?.required?.length) return;
1682
+ Object.values(inputSchema?.required).forEach((fieldKey) => {
1683
+ if (inputSchema?.properties[fieldKey]) return;
1684
+ throw new Error(m("inputSchema.validation.missingRequiredField", { fieldKey }));
1685
+ });
1686
+ }
1687
+ __name(validateExistenceOfRequiredFields, "validateExistenceOfRequiredFields");
1688
+ function validateInputSchema(validator, inputSchema) {
1689
+ ensureAjvSupportsDraft2019(validator);
1690
+ validateBasicStructure(validator, inputSchema);
1691
+ validateProperties(inputSchema, validator);
1692
+ validateExistenceOfRequiredFields(inputSchema);
1693
+ validateAgainstSchemaOrThrow(validator, inputSchema, schema_default, "schema");
1694
+ }
1695
+ __name(validateInputSchema, "validateInputSchema");
866
1696
  export {
1697
+ ensureAjvSupportsDraft2019,
867
1698
  schema_default as inputSchema,
868
1699
  m,
869
1700
  makeInputJsFieldsReadable,