@sanity/schema 5.13.0-next.21 → 5.13.0-next.23
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/lib/_internal.d.ts +30 -6
- package/lib/_internal.js +28 -14
- package/lib/_internal.js.map +1 -1
- package/package.json +6 -6
package/lib/_internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as SchemaValidationResult, i as ProblemPathTypeSegment, l as Schema$1, n as ProblemPathPropertySegment, o as TypeWithProblems, r as ProblemPathSegment, s as _FIXME_, t as ProblemPath } from "./_chunks-dts/typedefs.js";
|
|
2
2
|
import { SetSynchronization, SynchronizationRequest, SynchronizationResult } from "@sanity/descriptors";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _sanity_types0 from "@sanity/types";
|
|
4
4
|
import { Schema, SchemaType, SchemaTypeDefinition, SchemaValidationProblem, SchemaValidationProblemGroup } from "@sanity/types";
|
|
5
5
|
import { SchemaType as SchemaType$1 } from "groq-js";
|
|
6
6
|
/** The scheduler is capable of executing work in different ways. */
|
|
@@ -58,14 +58,16 @@ declare const builtinTypes: ({
|
|
|
58
58
|
type: string;
|
|
59
59
|
title: string;
|
|
60
60
|
readOnly: boolean;
|
|
61
|
+
validation?: undefined;
|
|
61
62
|
hidden?: undefined;
|
|
62
63
|
fieldset?: undefined;
|
|
63
64
|
} | {
|
|
64
65
|
name: string;
|
|
65
66
|
type: string;
|
|
66
67
|
title: string;
|
|
67
|
-
|
|
68
|
+
validation?: undefined;
|
|
68
69
|
hidden?: undefined;
|
|
70
|
+
readOnly?: undefined;
|
|
69
71
|
fieldset?: undefined;
|
|
70
72
|
} | {
|
|
71
73
|
name: string;
|
|
@@ -73,6 +75,7 @@ declare const builtinTypes: ({
|
|
|
73
75
|
title: string;
|
|
74
76
|
readOnly: boolean;
|
|
75
77
|
fieldset: string;
|
|
78
|
+
validation: (Rule: _sanity_types0.Rule) => _sanity_types0.Rule;
|
|
76
79
|
hidden?: undefined;
|
|
77
80
|
} | {
|
|
78
81
|
name: string;
|
|
@@ -80,7 +83,16 @@ declare const builtinTypes: ({
|
|
|
80
83
|
readOnly: boolean;
|
|
81
84
|
hidden: boolean;
|
|
82
85
|
fieldset: string;
|
|
86
|
+
validation?: undefined;
|
|
83
87
|
title?: undefined;
|
|
88
|
+
} | {
|
|
89
|
+
name: string;
|
|
90
|
+
type: string;
|
|
91
|
+
title: string;
|
|
92
|
+
readOnly: boolean;
|
|
93
|
+
fieldset: string;
|
|
94
|
+
validation?: undefined;
|
|
95
|
+
hidden?: undefined;
|
|
84
96
|
})[];
|
|
85
97
|
preview: {
|
|
86
98
|
select: {
|
|
@@ -125,14 +137,16 @@ declare const builtinTypes: ({
|
|
|
125
137
|
type: string;
|
|
126
138
|
title: string;
|
|
127
139
|
readOnly: boolean;
|
|
140
|
+
validation?: undefined;
|
|
128
141
|
hidden?: undefined;
|
|
129
142
|
fieldset?: undefined;
|
|
130
143
|
} | {
|
|
131
144
|
name: string;
|
|
132
145
|
type: string;
|
|
133
146
|
title: string;
|
|
134
|
-
|
|
147
|
+
validation?: undefined;
|
|
135
148
|
hidden?: undefined;
|
|
149
|
+
readOnly?: undefined;
|
|
136
150
|
fieldset?: undefined;
|
|
137
151
|
} | {
|
|
138
152
|
name: string;
|
|
@@ -140,14 +154,24 @@ declare const builtinTypes: ({
|
|
|
140
154
|
title: string;
|
|
141
155
|
readOnly: boolean;
|
|
142
156
|
fieldset: string;
|
|
157
|
+
validation: (Rule: _sanity_types0.Rule) => _sanity_types0.Rule;
|
|
143
158
|
hidden?: undefined;
|
|
144
159
|
} | {
|
|
145
|
-
|
|
160
|
+
validation?: undefined;
|
|
146
161
|
name: string;
|
|
147
162
|
type: string;
|
|
148
163
|
readOnly: boolean;
|
|
149
164
|
hidden: boolean;
|
|
150
165
|
fieldset: string;
|
|
166
|
+
title?: undefined;
|
|
167
|
+
} | {
|
|
168
|
+
validation?: undefined;
|
|
169
|
+
hidden?: undefined;
|
|
170
|
+
name: string;
|
|
171
|
+
type: string;
|
|
172
|
+
title: string;
|
|
173
|
+
readOnly: boolean;
|
|
174
|
+
fieldset: string;
|
|
151
175
|
})[];
|
|
152
176
|
preview: {
|
|
153
177
|
select: {
|
|
@@ -157,7 +181,7 @@ declare const builtinTypes: ({
|
|
|
157
181
|
size: string;
|
|
158
182
|
media: string;
|
|
159
183
|
};
|
|
160
|
-
prepare(doc: Partial<
|
|
184
|
+
prepare(doc: Partial<_sanity_types0.SanityDocument>): {
|
|
161
185
|
title: {};
|
|
162
186
|
media: {
|
|
163
187
|
asset: {
|
|
@@ -183,7 +207,7 @@ declare const builtinTypes: ({
|
|
|
183
207
|
fields: {
|
|
184
208
|
name: string;
|
|
185
209
|
type: string;
|
|
186
|
-
validation: (Rule:
|
|
210
|
+
validation: (Rule: _sanity_types0.Rule) => _sanity_types0.Rule;
|
|
187
211
|
}[];
|
|
188
212
|
} | {
|
|
189
213
|
name: string;
|
package/lib/_internal.js
CHANGED
|
@@ -584,35 +584,40 @@ var assetSourceData = {
|
|
|
584
584
|
type: "string",
|
|
585
585
|
title: "SHA1 hash",
|
|
586
586
|
readOnly: !0,
|
|
587
|
-
fieldset: "system"
|
|
587
|
+
fieldset: "system",
|
|
588
|
+
validation: (Rule2) => Rule2.required()
|
|
588
589
|
},
|
|
589
590
|
{
|
|
590
591
|
name: "extension",
|
|
591
592
|
type: "string",
|
|
592
593
|
title: "File extension",
|
|
593
594
|
readOnly: !0,
|
|
594
|
-
fieldset: "system"
|
|
595
|
+
fieldset: "system",
|
|
596
|
+
validation: (Rule2) => Rule2.required()
|
|
595
597
|
},
|
|
596
598
|
{
|
|
597
599
|
name: "mimeType",
|
|
598
600
|
type: "string",
|
|
599
601
|
title: "Mime type",
|
|
600
602
|
readOnly: !0,
|
|
601
|
-
fieldset: "system"
|
|
603
|
+
fieldset: "system",
|
|
604
|
+
validation: (Rule2) => Rule2.required()
|
|
602
605
|
},
|
|
603
606
|
{
|
|
604
607
|
name: "size",
|
|
605
608
|
type: "number",
|
|
606
609
|
title: "File size in bytes",
|
|
607
610
|
readOnly: !0,
|
|
608
|
-
fieldset: "system"
|
|
611
|
+
fieldset: "system",
|
|
612
|
+
validation: (Rule2) => Rule2.required()
|
|
609
613
|
},
|
|
610
614
|
{
|
|
611
615
|
name: "assetId",
|
|
612
616
|
type: "string",
|
|
613
617
|
title: "Asset ID",
|
|
614
618
|
readOnly: !0,
|
|
615
|
-
fieldset: "system"
|
|
619
|
+
fieldset: "system",
|
|
620
|
+
validation: (Rule2) => Rule2.required()
|
|
616
621
|
},
|
|
617
622
|
{
|
|
618
623
|
name: "uploadId",
|
|
@@ -626,14 +631,16 @@ var assetSourceData = {
|
|
|
626
631
|
type: "string",
|
|
627
632
|
title: "Path",
|
|
628
633
|
readOnly: !0,
|
|
629
|
-
fieldset: "system"
|
|
634
|
+
fieldset: "system",
|
|
635
|
+
validation: (Rule2) => Rule2.required()
|
|
630
636
|
},
|
|
631
637
|
{
|
|
632
638
|
name: "url",
|
|
633
639
|
type: "string",
|
|
634
640
|
title: "Url",
|
|
635
641
|
readOnly: !0,
|
|
636
|
-
fieldset: "system"
|
|
642
|
+
fieldset: "system",
|
|
643
|
+
validation: (Rule2) => Rule2.required()
|
|
637
644
|
},
|
|
638
645
|
{
|
|
639
646
|
name: "source",
|
|
@@ -728,35 +735,40 @@ var assetSourceData = {
|
|
|
728
735
|
type: "string",
|
|
729
736
|
title: "SHA1 hash",
|
|
730
737
|
readOnly: !0,
|
|
731
|
-
fieldset: "system"
|
|
738
|
+
fieldset: "system",
|
|
739
|
+
validation: (Rule2) => Rule2.required()
|
|
732
740
|
},
|
|
733
741
|
{
|
|
734
742
|
name: "extension",
|
|
735
743
|
type: "string",
|
|
736
744
|
readOnly: !0,
|
|
737
745
|
title: "File extension",
|
|
738
|
-
fieldset: "system"
|
|
746
|
+
fieldset: "system",
|
|
747
|
+
validation: (Rule2) => Rule2.required()
|
|
739
748
|
},
|
|
740
749
|
{
|
|
741
750
|
name: "mimeType",
|
|
742
751
|
type: "string",
|
|
743
752
|
readOnly: !0,
|
|
744
753
|
title: "Mime type",
|
|
745
|
-
fieldset: "system"
|
|
754
|
+
fieldset: "system",
|
|
755
|
+
validation: (Rule2) => Rule2.required()
|
|
746
756
|
},
|
|
747
757
|
{
|
|
748
758
|
name: "size",
|
|
749
759
|
type: "number",
|
|
750
760
|
title: "File size in bytes",
|
|
751
761
|
readOnly: !0,
|
|
752
|
-
fieldset: "system"
|
|
762
|
+
fieldset: "system",
|
|
763
|
+
validation: (Rule2) => Rule2.required()
|
|
753
764
|
},
|
|
754
765
|
{
|
|
755
766
|
name: "assetId",
|
|
756
767
|
type: "string",
|
|
757
768
|
title: "Asset ID",
|
|
758
769
|
readOnly: !0,
|
|
759
|
-
fieldset: "system"
|
|
770
|
+
fieldset: "system",
|
|
771
|
+
validation: (Rule2) => Rule2.required()
|
|
760
772
|
},
|
|
761
773
|
{
|
|
762
774
|
name: "uploadId",
|
|
@@ -770,14 +782,16 @@ var assetSourceData = {
|
|
|
770
782
|
type: "string",
|
|
771
783
|
title: "Path",
|
|
772
784
|
readOnly: !0,
|
|
773
|
-
fieldset: "system"
|
|
785
|
+
fieldset: "system",
|
|
786
|
+
validation: (Rule2) => Rule2.required()
|
|
774
787
|
},
|
|
775
788
|
{
|
|
776
789
|
name: "url",
|
|
777
790
|
type: "string",
|
|
778
791
|
title: "Url",
|
|
779
792
|
readOnly: !0,
|
|
780
|
-
fieldset: "system"
|
|
793
|
+
fieldset: "system",
|
|
794
|
+
validation: (Rule2) => Rule2.required()
|
|
781
795
|
},
|
|
782
796
|
{
|
|
783
797
|
name: "metadata",
|