@cloudhal/core-contracts 0.7.2 → 0.8.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/dist/src/generated/content-entry.d.ts +1 -1
- package/dist/src/generated/content-entry.js +1 -1
- package/dist/src/generated/index.d.ts +1 -1
- package/dist/src/generated/index.js +1 -1
- package/dist/src/generated/schemas.d.ts +699 -25
- package/dist/src/generated/schemas.js +425 -2
- package/dist/src/generated/site.d.ts +410 -174
- package/dist/src/generated/site.js +609 -328
- package/dist/src/generated/validators.js +4120 -1753
- package/package.json +1 -1
- package/schemas/content-entry.schema.json +1 -1
- package/schemas/site.schema.json +352 -1
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"body": { "$ref": "#/$defs/Body" },
|
|
36
36
|
"fields": {
|
|
37
37
|
"type": "object",
|
|
38
|
-
"description": "Collection-specific values, keyed by field. A collection with typed fields (RFC-0041, Site.collections.<key>.fields) checks each value against its definition on write; otherwise any JSON. An absent key means no value.",
|
|
38
|
+
"description": "Collection-specific values, keyed by field. A collection with typed fields (RFC-0041, Site.collections.<key>.fields) checks each value against its definition on write; otherwise any JSON. An absent key means no value. A reference value is a translation group id or a list of them, a repeater value a list of flat objects (RFC-0045).",
|
|
39
39
|
"additionalProperties": true
|
|
40
40
|
},
|
|
41
41
|
"tags": {
|
package/schemas/site.schema.json
CHANGED
|
@@ -579,6 +579,351 @@
|
|
|
579
579
|
"description": "The value is a list of option values. Absent: false."
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"title": "ReferenceField",
|
|
585
|
+
"type": "object",
|
|
586
|
+
"description": "RFC-0045: entries of other (or this) collections of the same site, by translation group id (entry_…): the id of the group's original, which every language version and edition carries in translation.group.",
|
|
587
|
+
"additionalProperties": false,
|
|
588
|
+
"required": ["key", "type", "labels", "localized", "collections"],
|
|
589
|
+
"properties": {
|
|
590
|
+
"key": {
|
|
591
|
+
"$ref": "#/$defs/FieldKey"
|
|
592
|
+
},
|
|
593
|
+
"type": {
|
|
594
|
+
"type": "string",
|
|
595
|
+
"enum": ["reference"]
|
|
596
|
+
},
|
|
597
|
+
"labels": {
|
|
598
|
+
"$ref": "#/$defs/FieldLabels"
|
|
599
|
+
},
|
|
600
|
+
"localized": {
|
|
601
|
+
"type": "boolean",
|
|
602
|
+
"description": "true: each language version picks its own targets; false: only the translation group's original holds them, and every version resolves them in its own language."
|
|
603
|
+
},
|
|
604
|
+
"requiredToPublish": {
|
|
605
|
+
"type": "boolean",
|
|
606
|
+
"description": "An entry in review or published needs at least one target. Absent: false."
|
|
607
|
+
},
|
|
608
|
+
"migration": {
|
|
609
|
+
"$ref": "#/$defs/FieldMigration"
|
|
610
|
+
},
|
|
611
|
+
"collections": {
|
|
612
|
+
"type": "array",
|
|
613
|
+
"description": "The collections a target may belong to: declared collections of this site (checked in code).",
|
|
614
|
+
"minItems": 1,
|
|
615
|
+
"maxItems": 5,
|
|
616
|
+
"uniqueItems": true,
|
|
617
|
+
"items": {
|
|
618
|
+
"$ref": "common.schema.json#/$defs/Slug"
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
"multiple": {
|
|
622
|
+
"type": "boolean",
|
|
623
|
+
"description": "The value is an ordered list of targets. Absent: false."
|
|
624
|
+
},
|
|
625
|
+
"maxItems": {
|
|
626
|
+
"type": "integer",
|
|
627
|
+
"description": "With multiple: at most this many targets. Absent: 20.",
|
|
628
|
+
"minimum": 1,
|
|
629
|
+
"maximum": 50
|
|
630
|
+
},
|
|
631
|
+
"where": {
|
|
632
|
+
"type": "array",
|
|
633
|
+
"description": "Only with one target collection: conditions on its list fields that a newly chosen target must meet (no `now`; checked in code). Narrows the picker; not re-checked when the target changes later.",
|
|
634
|
+
"minItems": 1,
|
|
635
|
+
"maxItems": 4,
|
|
636
|
+
"items": {
|
|
637
|
+
"$ref": "common.schema.json#/$defs/FieldCondition"
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"title": "RepeaterField",
|
|
644
|
+
"type": "object",
|
|
645
|
+
"description": "RFC-0045: an ordered list of items, each a flat object of sub-fields. A repeater cannot contain a repeater.",
|
|
646
|
+
"additionalProperties": false,
|
|
647
|
+
"required": ["key", "type", "labels", "localized", "fields"],
|
|
648
|
+
"properties": {
|
|
649
|
+
"key": {
|
|
650
|
+
"$ref": "#/$defs/FieldKey"
|
|
651
|
+
},
|
|
652
|
+
"type": {
|
|
653
|
+
"type": "string",
|
|
654
|
+
"enum": ["repeater"]
|
|
655
|
+
},
|
|
656
|
+
"labels": {
|
|
657
|
+
"$ref": "#/$defs/FieldLabels"
|
|
658
|
+
},
|
|
659
|
+
"localized": {
|
|
660
|
+
"type": "boolean",
|
|
661
|
+
"description": "true: each language version has its own list (missing reads the original's); false: only the original holds the list."
|
|
662
|
+
},
|
|
663
|
+
"requiredToPublish": {
|
|
664
|
+
"type": "boolean",
|
|
665
|
+
"description": "An entry in review or published needs at least one item. Absent: false."
|
|
666
|
+
},
|
|
667
|
+
"migration": {
|
|
668
|
+
"$ref": "#/$defs/FieldMigration"
|
|
669
|
+
},
|
|
670
|
+
"fields": {
|
|
671
|
+
"type": "array",
|
|
672
|
+
"description": "The sub-fields of every item, in form order. Unique keys (checked in code).",
|
|
673
|
+
"minItems": 1,
|
|
674
|
+
"maxItems": 10,
|
|
675
|
+
"items": {
|
|
676
|
+
"$ref": "#/$defs/SubFieldDefinition"
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
"maxItems": {
|
|
680
|
+
"type": "integer",
|
|
681
|
+
"description": "At most this many items. Absent: 20.",
|
|
682
|
+
"minimum": 1,
|
|
683
|
+
"maximum": 50
|
|
684
|
+
},
|
|
685
|
+
"itemLabel": {
|
|
686
|
+
"$ref": "#/$defs/FieldKey",
|
|
687
|
+
"description": "The text, select or reference sub-field that names an item in Studio and approval prompts. Absent: the first such sub-field."
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
]
|
|
692
|
+
},
|
|
693
|
+
"SubFieldDefinition": {
|
|
694
|
+
"description": "RFC-0045: one sub-field of a repeater item, discriminated by `type`. Only types whose value is a scalar: no datetime, no multiple select or reference, no repeater. No localized and no migration: the repeater's apply.",
|
|
695
|
+
"oneOf": [
|
|
696
|
+
{
|
|
697
|
+
"title": "TextSubField",
|
|
698
|
+
"type": "object",
|
|
699
|
+
"additionalProperties": false,
|
|
700
|
+
"required": ["key", "type", "labels"],
|
|
701
|
+
"properties": {
|
|
702
|
+
"key": {
|
|
703
|
+
"$ref": "#/$defs/FieldKey"
|
|
704
|
+
},
|
|
705
|
+
"type": {
|
|
706
|
+
"type": "string",
|
|
707
|
+
"enum": ["text"]
|
|
708
|
+
},
|
|
709
|
+
"labels": {
|
|
710
|
+
"$ref": "#/$defs/FieldLabels"
|
|
711
|
+
},
|
|
712
|
+
"requiredToPublish": {
|
|
713
|
+
"type": "boolean",
|
|
714
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
715
|
+
},
|
|
716
|
+
"maxLength": {
|
|
717
|
+
"type": "integer",
|
|
718
|
+
"description": "Absent: 5000.",
|
|
719
|
+
"minimum": 1,
|
|
720
|
+
"maximum": 5000
|
|
721
|
+
},
|
|
722
|
+
"multiline": {
|
|
723
|
+
"type": "boolean",
|
|
724
|
+
"description": "Line breaks allowed. Absent: false."
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
"title": "RichTextSubField",
|
|
730
|
+
"type": "object",
|
|
731
|
+
"additionalProperties": false,
|
|
732
|
+
"required": ["key", "type", "labels"],
|
|
733
|
+
"properties": {
|
|
734
|
+
"key": {
|
|
735
|
+
"$ref": "#/$defs/FieldKey"
|
|
736
|
+
},
|
|
737
|
+
"type": {
|
|
738
|
+
"type": "string",
|
|
739
|
+
"enum": ["richText"]
|
|
740
|
+
},
|
|
741
|
+
"labels": {
|
|
742
|
+
"$ref": "#/$defs/FieldLabels"
|
|
743
|
+
},
|
|
744
|
+
"requiredToPublish": {
|
|
745
|
+
"type": "boolean",
|
|
746
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"title": "NumberSubField",
|
|
752
|
+
"type": "object",
|
|
753
|
+
"additionalProperties": false,
|
|
754
|
+
"required": ["key", "type", "labels"],
|
|
755
|
+
"properties": {
|
|
756
|
+
"key": {
|
|
757
|
+
"$ref": "#/$defs/FieldKey"
|
|
758
|
+
},
|
|
759
|
+
"type": {
|
|
760
|
+
"type": "string",
|
|
761
|
+
"enum": ["number"]
|
|
762
|
+
},
|
|
763
|
+
"labels": {
|
|
764
|
+
"$ref": "#/$defs/FieldLabels"
|
|
765
|
+
},
|
|
766
|
+
"requiredToPublish": {
|
|
767
|
+
"type": "boolean",
|
|
768
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
769
|
+
},
|
|
770
|
+
"integer": {
|
|
771
|
+
"type": "boolean",
|
|
772
|
+
"description": "Whole numbers only. Absent: false."
|
|
773
|
+
},
|
|
774
|
+
"minimum": {
|
|
775
|
+
"type": "number"
|
|
776
|
+
},
|
|
777
|
+
"maximum": {
|
|
778
|
+
"type": "number"
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"title": "BooleanSubField",
|
|
784
|
+
"type": "object",
|
|
785
|
+
"additionalProperties": false,
|
|
786
|
+
"required": ["key", "type", "labels"],
|
|
787
|
+
"properties": {
|
|
788
|
+
"key": {
|
|
789
|
+
"$ref": "#/$defs/FieldKey"
|
|
790
|
+
},
|
|
791
|
+
"type": {
|
|
792
|
+
"type": "string",
|
|
793
|
+
"enum": ["boolean"]
|
|
794
|
+
},
|
|
795
|
+
"labels": {
|
|
796
|
+
"$ref": "#/$defs/FieldLabels"
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"title": "DateSubField",
|
|
802
|
+
"type": "object",
|
|
803
|
+
"additionalProperties": false,
|
|
804
|
+
"required": ["key", "type", "labels"],
|
|
805
|
+
"properties": {
|
|
806
|
+
"key": {
|
|
807
|
+
"$ref": "#/$defs/FieldKey"
|
|
808
|
+
},
|
|
809
|
+
"type": {
|
|
810
|
+
"type": "string",
|
|
811
|
+
"enum": ["date"]
|
|
812
|
+
},
|
|
813
|
+
"labels": {
|
|
814
|
+
"$ref": "#/$defs/FieldLabels"
|
|
815
|
+
},
|
|
816
|
+
"requiredToPublish": {
|
|
817
|
+
"type": "boolean",
|
|
818
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"title": "UrlSubField",
|
|
824
|
+
"type": "object",
|
|
825
|
+
"additionalProperties": false,
|
|
826
|
+
"required": ["key", "type", "labels"],
|
|
827
|
+
"properties": {
|
|
828
|
+
"key": {
|
|
829
|
+
"$ref": "#/$defs/FieldKey"
|
|
830
|
+
},
|
|
831
|
+
"type": {
|
|
832
|
+
"type": "string",
|
|
833
|
+
"enum": ["url"]
|
|
834
|
+
},
|
|
835
|
+
"labels": {
|
|
836
|
+
"$ref": "#/$defs/FieldLabels"
|
|
837
|
+
},
|
|
838
|
+
"requiredToPublish": {
|
|
839
|
+
"type": "boolean",
|
|
840
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"title": "ImageSubField",
|
|
846
|
+
"type": "object",
|
|
847
|
+
"additionalProperties": false,
|
|
848
|
+
"required": ["key", "type", "labels"],
|
|
849
|
+
"properties": {
|
|
850
|
+
"key": {
|
|
851
|
+
"$ref": "#/$defs/FieldKey"
|
|
852
|
+
},
|
|
853
|
+
"type": {
|
|
854
|
+
"type": "string",
|
|
855
|
+
"enum": ["image"]
|
|
856
|
+
},
|
|
857
|
+
"labels": {
|
|
858
|
+
"$ref": "#/$defs/FieldLabels"
|
|
859
|
+
},
|
|
860
|
+
"requiredToPublish": {
|
|
861
|
+
"type": "boolean",
|
|
862
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"title": "SelectSubField",
|
|
868
|
+
"type": "object",
|
|
869
|
+
"additionalProperties": false,
|
|
870
|
+
"required": ["key", "type", "labels", "options"],
|
|
871
|
+
"properties": {
|
|
872
|
+
"key": {
|
|
873
|
+
"$ref": "#/$defs/FieldKey"
|
|
874
|
+
},
|
|
875
|
+
"type": {
|
|
876
|
+
"type": "string",
|
|
877
|
+
"enum": ["select"]
|
|
878
|
+
},
|
|
879
|
+
"labels": {
|
|
880
|
+
"$ref": "#/$defs/FieldLabels"
|
|
881
|
+
},
|
|
882
|
+
"requiredToPublish": {
|
|
883
|
+
"type": "boolean",
|
|
884
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
885
|
+
},
|
|
886
|
+
"options": {
|
|
887
|
+
"type": "array",
|
|
888
|
+
"minItems": 1,
|
|
889
|
+
"maxItems": 50,
|
|
890
|
+
"items": {
|
|
891
|
+
"$ref": "#/$defs/FieldOption"
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"title": "ReferenceSubField",
|
|
898
|
+
"type": "object",
|
|
899
|
+
"additionalProperties": false,
|
|
900
|
+
"required": ["key", "type", "labels", "collections"],
|
|
901
|
+
"properties": {
|
|
902
|
+
"key": {
|
|
903
|
+
"$ref": "#/$defs/FieldKey"
|
|
904
|
+
},
|
|
905
|
+
"type": {
|
|
906
|
+
"type": "string",
|
|
907
|
+
"enum": ["reference"]
|
|
908
|
+
},
|
|
909
|
+
"labels": {
|
|
910
|
+
"$ref": "#/$defs/FieldLabels"
|
|
911
|
+
},
|
|
912
|
+
"requiredToPublish": {
|
|
913
|
+
"type": "boolean",
|
|
914
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
915
|
+
},
|
|
916
|
+
"collections": {
|
|
917
|
+
"type": "array",
|
|
918
|
+
"description": "The collections a target may belong to (checked in code).",
|
|
919
|
+
"minItems": 1,
|
|
920
|
+
"maxItems": 5,
|
|
921
|
+
"uniqueItems": true,
|
|
922
|
+
"items": {
|
|
923
|
+
"$ref": "common.schema.json#/$defs/Slug"
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
}
|
|
582
927
|
}
|
|
583
928
|
]
|
|
584
929
|
},
|
|
@@ -662,11 +1007,17 @@
|
|
|
662
1007
|
"datetime",
|
|
663
1008
|
"url",
|
|
664
1009
|
"image",
|
|
665
|
-
"select"
|
|
1010
|
+
"select",
|
|
1011
|
+
"reference",
|
|
1012
|
+
"repeater"
|
|
666
1013
|
]
|
|
667
1014
|
},
|
|
668
1015
|
"fromLocalized": {
|
|
669
1016
|
"type": "boolean"
|
|
1017
|
+
},
|
|
1018
|
+
"sub": {
|
|
1019
|
+
"$ref": "#/$defs/FieldKey",
|
|
1020
|
+
"description": "RFC-0045: the repeater's sub-field the operation rewrites (its key once the operation is done); fromKey and fromType then describe the sub-field."
|
|
670
1021
|
}
|
|
671
1022
|
}
|
|
672
1023
|
},
|