@apify/input_schema 3.9.3 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.d.ts CHANGED
@@ -61,6 +61,12 @@ var properties = {
61
61
  {
62
62
  $ref: "#/definitions/booleanProperty"
63
63
  },
64
+ {
65
+ $ref: "#/definitions/resourceProperty"
66
+ },
67
+ {
68
+ $ref: "#/definitions/resourceArrayProperty"
69
+ },
64
70
  {
65
71
  $ref: "#/definitions/anyProperty"
66
72
  }
@@ -165,10 +171,7 @@ var definitions = {
165
171
  "textfield",
166
172
  "textarea",
167
173
  "datepicker",
168
- "hidden",
169
- "dataset",
170
- "keyValueStore",
171
- "requestQueue"
174
+ "hidden"
172
175
  ]
173
176
  },
174
177
  isSecret: {
@@ -329,10 +332,7 @@ var definitions = {
329
332
  "textfield",
330
333
  "textarea",
331
334
  "datepicker",
332
- "hidden",
333
- "dataset",
334
- "keyValueStore",
335
- "requestQueue"
335
+ "hidden"
336
336
  ]
337
337
  },
338
338
  isSecret: {
@@ -406,39 +406,6 @@ var definitions = {
406
406
  "select",
407
407
  "hidden"
408
408
  ]
409
- },
410
- title: {
411
- type: "string"
412
- },
413
- description: {
414
- type: "string"
415
- },
416
- "default": {
417
- type: "array"
418
- },
419
- prefill: {
420
- type: "array"
421
- },
422
- example: {
423
- type: "array"
424
- },
425
- nullable: {
426
- type: "boolean"
427
- },
428
- minItems: {
429
- type: "integer"
430
- },
431
- maxItems: {
432
- type: "integer"
433
- },
434
- uniqueItems: {
435
- type: "boolean"
436
- },
437
- sectionCaption: {
438
- type: "string"
439
- },
440
- sectionDescription: {
441
- type: "string"
442
409
  }
443
410
  },
444
411
  additionalProperties: true,
@@ -456,10 +423,54 @@ var definitions = {
456
423
  }
457
424
  },
458
425
  then: {
426
+ additionalProperties: false,
459
427
  required: [
460
428
  "items"
461
429
  ],
462
430
  properties: {
431
+ type: {
432
+ "enum": [
433
+ "array"
434
+ ]
435
+ },
436
+ editor: {
437
+ "enum": [
438
+ "select"
439
+ ]
440
+ },
441
+ title: {
442
+ type: "string"
443
+ },
444
+ description: {
445
+ type: "string"
446
+ },
447
+ "default": {
448
+ type: "array"
449
+ },
450
+ prefill: {
451
+ type: "array"
452
+ },
453
+ example: {
454
+ type: "array"
455
+ },
456
+ nullable: {
457
+ type: "boolean"
458
+ },
459
+ minItems: {
460
+ type: "integer"
461
+ },
462
+ maxItems: {
463
+ type: "integer"
464
+ },
465
+ uniqueItems: {
466
+ type: "boolean"
467
+ },
468
+ sectionCaption: {
469
+ type: "string"
470
+ },
471
+ sectionDescription: {
472
+ type: "string"
473
+ },
463
474
  items: {
464
475
  type: "object",
465
476
  additionalProperties: false,
@@ -491,7 +502,57 @@ var definitions = {
491
502
  }
492
503
  },
493
504
  "else": {
505
+ additionalProperties: false,
494
506
  properties: {
507
+ type: {
508
+ "enum": [
509
+ "array"
510
+ ]
511
+ },
512
+ editor: {
513
+ "enum": [
514
+ "json",
515
+ "requestListSources",
516
+ "pseudoUrls",
517
+ "globs",
518
+ "keyValue",
519
+ "stringList",
520
+ "hidden"
521
+ ]
522
+ },
523
+ title: {
524
+ type: "string"
525
+ },
526
+ description: {
527
+ type: "string"
528
+ },
529
+ "default": {
530
+ type: "array"
531
+ },
532
+ prefill: {
533
+ type: "array"
534
+ },
535
+ example: {
536
+ type: "array"
537
+ },
538
+ nullable: {
539
+ type: "boolean"
540
+ },
541
+ minItems: {
542
+ type: "integer"
543
+ },
544
+ maxItems: {
545
+ type: "integer"
546
+ },
547
+ uniqueItems: {
548
+ type: "boolean"
549
+ },
550
+ sectionCaption: {
551
+ type: "string"
552
+ },
553
+ sectionDescription: {
554
+ type: "string"
555
+ },
495
556
  placeholderKey: {
496
557
  type: "string"
497
558
  },
@@ -677,6 +738,125 @@ var definitions = {
677
738
  "description"
678
739
  ]
679
740
  },
741
+ resourceProperty: {
742
+ title: "Resource property",
743
+ type: "object",
744
+ additionalProperties: false,
745
+ properties: {
746
+ type: {
747
+ "enum": [
748
+ "string"
749
+ ]
750
+ },
751
+ title: {
752
+ type: "string"
753
+ },
754
+ description: {
755
+ type: "string"
756
+ },
757
+ editor: {
758
+ "enum": [
759
+ "resourcePicker",
760
+ "hidden"
761
+ ]
762
+ },
763
+ resourceType: {
764
+ "enum": [
765
+ "dataset",
766
+ "keyValueStore",
767
+ "requestQueue"
768
+ ]
769
+ },
770
+ "default": {
771
+ type: "string"
772
+ },
773
+ prefill: {
774
+ type: "string"
775
+ },
776
+ example: {
777
+ type: "string"
778
+ },
779
+ nullable: {
780
+ type: "boolean"
781
+ },
782
+ sectionCaption: {
783
+ type: "string"
784
+ },
785
+ sectionDescription: {
786
+ type: "string"
787
+ }
788
+ },
789
+ required: [
790
+ "type",
791
+ "title",
792
+ "description",
793
+ "resourceType"
794
+ ]
795
+ },
796
+ resourceArrayProperty: {
797
+ title: "Resource array property",
798
+ type: "object",
799
+ additionalProperties: false,
800
+ properties: {
801
+ type: {
802
+ "enum": [
803
+ "array"
804
+ ]
805
+ },
806
+ title: {
807
+ type: "string"
808
+ },
809
+ description: {
810
+ type: "string"
811
+ },
812
+ editor: {
813
+ "enum": [
814
+ "resourcePicker",
815
+ "hidden"
816
+ ]
817
+ },
818
+ "default": {
819
+ type: "array"
820
+ },
821
+ prefill: {
822
+ type: "array"
823
+ },
824
+ example: {
825
+ type: "array"
826
+ },
827
+ nullable: {
828
+ type: "boolean"
829
+ },
830
+ minItems: {
831
+ type: "integer"
832
+ },
833
+ maxItems: {
834
+ type: "integer"
835
+ },
836
+ uniqueItems: {
837
+ type: "boolean"
838
+ },
839
+ resourceType: {
840
+ "enum": [
841
+ "dataset",
842
+ "keyValueStore",
843
+ "requestQueue"
844
+ ]
845
+ },
846
+ sectionCaption: {
847
+ type: "string"
848
+ },
849
+ sectionDescription: {
850
+ type: "string"
851
+ }
852
+ },
853
+ required: [
854
+ "type",
855
+ "title",
856
+ "description",
857
+ "resourceType"
858
+ ]
859
+ },
680
860
  anyProperty: {
681
861
  title: "Any property",
682
862
  type: "object",
@@ -778,7 +958,7 @@ type CommonFieldDefinition<T> = {
778
958
  };
779
959
  type StringFieldDefinition = CommonFieldDefinition<string> & {
780
960
  type: 'string';
781
- editor: 'textfield' | 'textarea' | 'javascript' | 'python' | 'select' | 'datepicker' | 'hidden' | 'json' | 'dataset' | 'keyValueStore' | 'requestQueue';
961
+ editor: 'textfield' | 'textarea' | 'javascript' | 'python' | 'select' | 'datepicker' | 'hidden' | 'json';
782
962
  pattern?: string;
783
963
  minLength?: number;
784
964
  maxLength?: number;
@@ -821,12 +1001,22 @@ type ArrayFieldDefinition = CommonFieldDefinition<Array<unknown>> & {
821
1001
  uniqueItems?: boolean;
822
1002
  items?: unknown;
823
1003
  };
1004
+ type CommonResourceFieldDefinition<T> = CommonFieldDefinition<T> & {
1005
+ editor?: 'resourcePicker' | 'hidden';
1006
+ resourceType: 'dataset' | 'keyValueStore' | 'requestQueue';
1007
+ };
1008
+ type ResourceFieldDefinition = CommonResourceFieldDefinition<string> & {
1009
+ type: 'string';
1010
+ };
1011
+ type ResourceArrayFieldDefinition = CommonResourceFieldDefinition<string[]> & {
1012
+ type: 'array';
1013
+ };
824
1014
  type AllTypes = StringFieldDefinition['type'] | BooleanFieldDefinition['type'] | IntegerFieldDefinition['type'] | ObjectFieldDefinition['type'] | ArrayFieldDefinition['type'];
825
1015
  type MixedFieldDefinition = CommonFieldDefinition<never> & {
826
1016
  type: readonly AllTypes[];
827
1017
  editor: 'json';
828
1018
  };
829
- type FieldDefinition = StringFieldDefinition | BooleanFieldDefinition | IntegerFieldDefinition | ObjectFieldDefinition | ArrayFieldDefinition | MixedFieldDefinition;
1019
+ type FieldDefinition = StringFieldDefinition | BooleanFieldDefinition | IntegerFieldDefinition | ObjectFieldDefinition | ArrayFieldDefinition | MixedFieldDefinition | ResourceFieldDefinition | ResourceArrayFieldDefinition;
830
1020
  /**
831
1021
  * Type with checked base & properties
832
1022
  */
package/esm/index.d.mts CHANGED
@@ -61,6 +61,12 @@ var properties = {
61
61
  {
62
62
  $ref: "#/definitions/booleanProperty"
63
63
  },
64
+ {
65
+ $ref: "#/definitions/resourceProperty"
66
+ },
67
+ {
68
+ $ref: "#/definitions/resourceArrayProperty"
69
+ },
64
70
  {
65
71
  $ref: "#/definitions/anyProperty"
66
72
  }
@@ -165,10 +171,7 @@ var definitions = {
165
171
  "textfield",
166
172
  "textarea",
167
173
  "datepicker",
168
- "hidden",
169
- "dataset",
170
- "keyValueStore",
171
- "requestQueue"
174
+ "hidden"
172
175
  ]
173
176
  },
174
177
  isSecret: {
@@ -329,10 +332,7 @@ var definitions = {
329
332
  "textfield",
330
333
  "textarea",
331
334
  "datepicker",
332
- "hidden",
333
- "dataset",
334
- "keyValueStore",
335
- "requestQueue"
335
+ "hidden"
336
336
  ]
337
337
  },
338
338
  isSecret: {
@@ -406,39 +406,6 @@ var definitions = {
406
406
  "select",
407
407
  "hidden"
408
408
  ]
409
- },
410
- title: {
411
- type: "string"
412
- },
413
- description: {
414
- type: "string"
415
- },
416
- "default": {
417
- type: "array"
418
- },
419
- prefill: {
420
- type: "array"
421
- },
422
- example: {
423
- type: "array"
424
- },
425
- nullable: {
426
- type: "boolean"
427
- },
428
- minItems: {
429
- type: "integer"
430
- },
431
- maxItems: {
432
- type: "integer"
433
- },
434
- uniqueItems: {
435
- type: "boolean"
436
- },
437
- sectionCaption: {
438
- type: "string"
439
- },
440
- sectionDescription: {
441
- type: "string"
442
409
  }
443
410
  },
444
411
  additionalProperties: true,
@@ -456,10 +423,54 @@ var definitions = {
456
423
  }
457
424
  },
458
425
  then: {
426
+ additionalProperties: false,
459
427
  required: [
460
428
  "items"
461
429
  ],
462
430
  properties: {
431
+ type: {
432
+ "enum": [
433
+ "array"
434
+ ]
435
+ },
436
+ editor: {
437
+ "enum": [
438
+ "select"
439
+ ]
440
+ },
441
+ title: {
442
+ type: "string"
443
+ },
444
+ description: {
445
+ type: "string"
446
+ },
447
+ "default": {
448
+ type: "array"
449
+ },
450
+ prefill: {
451
+ type: "array"
452
+ },
453
+ example: {
454
+ type: "array"
455
+ },
456
+ nullable: {
457
+ type: "boolean"
458
+ },
459
+ minItems: {
460
+ type: "integer"
461
+ },
462
+ maxItems: {
463
+ type: "integer"
464
+ },
465
+ uniqueItems: {
466
+ type: "boolean"
467
+ },
468
+ sectionCaption: {
469
+ type: "string"
470
+ },
471
+ sectionDescription: {
472
+ type: "string"
473
+ },
463
474
  items: {
464
475
  type: "object",
465
476
  additionalProperties: false,
@@ -491,7 +502,57 @@ var definitions = {
491
502
  }
492
503
  },
493
504
  "else": {
505
+ additionalProperties: false,
494
506
  properties: {
507
+ type: {
508
+ "enum": [
509
+ "array"
510
+ ]
511
+ },
512
+ editor: {
513
+ "enum": [
514
+ "json",
515
+ "requestListSources",
516
+ "pseudoUrls",
517
+ "globs",
518
+ "keyValue",
519
+ "stringList",
520
+ "hidden"
521
+ ]
522
+ },
523
+ title: {
524
+ type: "string"
525
+ },
526
+ description: {
527
+ type: "string"
528
+ },
529
+ "default": {
530
+ type: "array"
531
+ },
532
+ prefill: {
533
+ type: "array"
534
+ },
535
+ example: {
536
+ type: "array"
537
+ },
538
+ nullable: {
539
+ type: "boolean"
540
+ },
541
+ minItems: {
542
+ type: "integer"
543
+ },
544
+ maxItems: {
545
+ type: "integer"
546
+ },
547
+ uniqueItems: {
548
+ type: "boolean"
549
+ },
550
+ sectionCaption: {
551
+ type: "string"
552
+ },
553
+ sectionDescription: {
554
+ type: "string"
555
+ },
495
556
  placeholderKey: {
496
557
  type: "string"
497
558
  },
@@ -677,6 +738,125 @@ var definitions = {
677
738
  "description"
678
739
  ]
679
740
  },
741
+ resourceProperty: {
742
+ title: "Resource property",
743
+ type: "object",
744
+ additionalProperties: false,
745
+ properties: {
746
+ type: {
747
+ "enum": [
748
+ "string"
749
+ ]
750
+ },
751
+ title: {
752
+ type: "string"
753
+ },
754
+ description: {
755
+ type: "string"
756
+ },
757
+ editor: {
758
+ "enum": [
759
+ "resourcePicker",
760
+ "hidden"
761
+ ]
762
+ },
763
+ resourceType: {
764
+ "enum": [
765
+ "dataset",
766
+ "keyValueStore",
767
+ "requestQueue"
768
+ ]
769
+ },
770
+ "default": {
771
+ type: "string"
772
+ },
773
+ prefill: {
774
+ type: "string"
775
+ },
776
+ example: {
777
+ type: "string"
778
+ },
779
+ nullable: {
780
+ type: "boolean"
781
+ },
782
+ sectionCaption: {
783
+ type: "string"
784
+ },
785
+ sectionDescription: {
786
+ type: "string"
787
+ }
788
+ },
789
+ required: [
790
+ "type",
791
+ "title",
792
+ "description",
793
+ "resourceType"
794
+ ]
795
+ },
796
+ resourceArrayProperty: {
797
+ title: "Resource array property",
798
+ type: "object",
799
+ additionalProperties: false,
800
+ properties: {
801
+ type: {
802
+ "enum": [
803
+ "array"
804
+ ]
805
+ },
806
+ title: {
807
+ type: "string"
808
+ },
809
+ description: {
810
+ type: "string"
811
+ },
812
+ editor: {
813
+ "enum": [
814
+ "resourcePicker",
815
+ "hidden"
816
+ ]
817
+ },
818
+ "default": {
819
+ type: "array"
820
+ },
821
+ prefill: {
822
+ type: "array"
823
+ },
824
+ example: {
825
+ type: "array"
826
+ },
827
+ nullable: {
828
+ type: "boolean"
829
+ },
830
+ minItems: {
831
+ type: "integer"
832
+ },
833
+ maxItems: {
834
+ type: "integer"
835
+ },
836
+ uniqueItems: {
837
+ type: "boolean"
838
+ },
839
+ resourceType: {
840
+ "enum": [
841
+ "dataset",
842
+ "keyValueStore",
843
+ "requestQueue"
844
+ ]
845
+ },
846
+ sectionCaption: {
847
+ type: "string"
848
+ },
849
+ sectionDescription: {
850
+ type: "string"
851
+ }
852
+ },
853
+ required: [
854
+ "type",
855
+ "title",
856
+ "description",
857
+ "resourceType"
858
+ ]
859
+ },
680
860
  anyProperty: {
681
861
  title: "Any property",
682
862
  type: "object",
@@ -778,7 +958,7 @@ type CommonFieldDefinition<T> = {
778
958
  };
779
959
  type StringFieldDefinition = CommonFieldDefinition<string> & {
780
960
  type: 'string';
781
- editor: 'textfield' | 'textarea' | 'javascript' | 'python' | 'select' | 'datepicker' | 'hidden' | 'json' | 'dataset' | 'keyValueStore' | 'requestQueue';
961
+ editor: 'textfield' | 'textarea' | 'javascript' | 'python' | 'select' | 'datepicker' | 'hidden' | 'json';
782
962
  pattern?: string;
783
963
  minLength?: number;
784
964
  maxLength?: number;
@@ -821,12 +1001,22 @@ type ArrayFieldDefinition = CommonFieldDefinition<Array<unknown>> & {
821
1001
  uniqueItems?: boolean;
822
1002
  items?: unknown;
823
1003
  };
1004
+ type CommonResourceFieldDefinition<T> = CommonFieldDefinition<T> & {
1005
+ editor?: 'resourcePicker' | 'hidden';
1006
+ resourceType: 'dataset' | 'keyValueStore' | 'requestQueue';
1007
+ };
1008
+ type ResourceFieldDefinition = CommonResourceFieldDefinition<string> & {
1009
+ type: 'string';
1010
+ };
1011
+ type ResourceArrayFieldDefinition = CommonResourceFieldDefinition<string[]> & {
1012
+ type: 'array';
1013
+ };
824
1014
  type AllTypes = StringFieldDefinition['type'] | BooleanFieldDefinition['type'] | IntegerFieldDefinition['type'] | ObjectFieldDefinition['type'] | ArrayFieldDefinition['type'];
825
1015
  type MixedFieldDefinition = CommonFieldDefinition<never> & {
826
1016
  type: readonly AllTypes[];
827
1017
  editor: 'json';
828
1018
  };
829
- type FieldDefinition = StringFieldDefinition | BooleanFieldDefinition | IntegerFieldDefinition | ObjectFieldDefinition | ArrayFieldDefinition | MixedFieldDefinition;
1019
+ type FieldDefinition = StringFieldDefinition | BooleanFieldDefinition | IntegerFieldDefinition | ObjectFieldDefinition | ArrayFieldDefinition | MixedFieldDefinition | ResourceFieldDefinition | ResourceArrayFieldDefinition;
830
1020
  /**
831
1021
  * Type with checked base & properties
832
1022
  */