@sanity/types 6.7.0-next.76 → 6.7.0-next.80
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/index.d.ts +547 -547
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
package/lib/index.d.ts
CHANGED
|
@@ -106,12 +106,6 @@ interface StrictVersionLayeringOptions {
|
|
|
106
106
|
strict?: boolean;
|
|
107
107
|
}
|
|
108
108
|
/** @public */
|
|
109
|
-
declare function isSanityDocument(document: unknown): document is SanityDocument;
|
|
110
|
-
/** @public */
|
|
111
|
-
declare function isTypedObject(obj: unknown): obj is TypedObject;
|
|
112
|
-
/** @public */
|
|
113
|
-
declare function isKeyedObject(obj: unknown): obj is KeyedObject;
|
|
114
|
-
/** @public */
|
|
115
109
|
type KeyedSegment = {
|
|
116
110
|
_key: string;
|
|
117
111
|
};
|
|
@@ -121,60 +115,6 @@ type IndexTuple = [number | '', number | ''];
|
|
|
121
115
|
type PathSegment = string | number | KeyedSegment | IndexTuple;
|
|
122
116
|
/** @public */
|
|
123
117
|
type Path = PathSegment[];
|
|
124
|
-
/** @internal */
|
|
125
|
-
declare function isIndexSegment(segment: PathSegment): segment is number;
|
|
126
|
-
/** @internal */
|
|
127
|
-
declare function isKeySegment(segment: PathSegment): segment is KeyedSegment;
|
|
128
|
-
/** @internal */
|
|
129
|
-
declare function isIndexTuple(segment: PathSegment): segment is IndexTuple;
|
|
130
|
-
/** @beta */
|
|
131
|
-
interface CrossDatasetReferenceValue {
|
|
132
|
-
_type: string;
|
|
133
|
-
_dataset: string;
|
|
134
|
-
_projectId: string;
|
|
135
|
-
_ref: string;
|
|
136
|
-
_key?: string;
|
|
137
|
-
_weak?: boolean;
|
|
138
|
-
}
|
|
139
|
-
/** @beta */
|
|
140
|
-
interface WeakCrossDatasetReferenceValue extends CrossDatasetReferenceValue {
|
|
141
|
-
_weak: true;
|
|
142
|
-
}
|
|
143
|
-
/** @beta */
|
|
144
|
-
type CrossDatasetReferenceFilterSearchOptions = {
|
|
145
|
-
filter?: string;
|
|
146
|
-
params?: Record<string, unknown>;
|
|
147
|
-
tag?: string;
|
|
148
|
-
};
|
|
149
|
-
/** @beta */
|
|
150
|
-
type CrossDatasetReferenceFilterResolver = (options: {
|
|
151
|
-
document: SanityDocument;
|
|
152
|
-
parent?: Record<string, unknown> | Record<string, unknown>[];
|
|
153
|
-
parentPath: Path;
|
|
154
|
-
}) => CrossDatasetReferenceFilterSearchOptions | Promise<CrossDatasetReferenceFilterSearchOptions>;
|
|
155
|
-
/** @beta */
|
|
156
|
-
interface CrossDatasetType {
|
|
157
|
-
type: string;
|
|
158
|
-
title?: string;
|
|
159
|
-
icon: ComponentType;
|
|
160
|
-
preview: PreviewConfig;
|
|
161
|
-
/** @deprecated Unused. Configuring search is no longer supported for cross-dataset references. */
|
|
162
|
-
__experimental_search?: ObjectSchemaType['__experimental_search'];
|
|
163
|
-
}
|
|
164
|
-
/** @beta */
|
|
165
|
-
interface CrossDatasetReferenceSchemaType extends Omit<ObjectSchemaType, 'options'> {
|
|
166
|
-
jsonType: 'object';
|
|
167
|
-
to: CrossDatasetType[];
|
|
168
|
-
dataset: string;
|
|
169
|
-
studioUrl?: (document: {
|
|
170
|
-
id: string;
|
|
171
|
-
type?: string;
|
|
172
|
-
}) => string | null;
|
|
173
|
-
weak?: boolean;
|
|
174
|
-
options?: ReferenceFilterOptions;
|
|
175
|
-
}
|
|
176
|
-
/** @beta */
|
|
177
|
-
declare function isCrossDatasetReference(reference: unknown): reference is CrossDatasetReferenceValue;
|
|
178
118
|
/** @public */
|
|
179
119
|
interface Role {
|
|
180
120
|
name: string;
|
|
@@ -250,18 +190,6 @@ interface ValidationMarker {
|
|
|
250
190
|
*/
|
|
251
191
|
__internal_metadata?: unknown;
|
|
252
192
|
}
|
|
253
|
-
/** @internal */
|
|
254
|
-
declare function isValidationErrorMarker(marker: ValidationMarker): marker is ValidationMarker & {
|
|
255
|
-
level: 'error';
|
|
256
|
-
};
|
|
257
|
-
/** @internal */
|
|
258
|
-
declare function isValidationWarningMarker(marker: ValidationMarker): marker is ValidationMarker & {
|
|
259
|
-
level: 'warning';
|
|
260
|
-
};
|
|
261
|
-
/** @internal */
|
|
262
|
-
declare function isValidationInfoMarker(marker: ValidationMarker): marker is ValidationMarker & {
|
|
263
|
-
level: 'info';
|
|
264
|
-
};
|
|
265
193
|
/**
|
|
266
194
|
* A slug object, currently holding a `current` property
|
|
267
195
|
*
|
|
@@ -291,14 +219,6 @@ interface SlugSourceContext {
|
|
|
291
219
|
type SlugSourceFn = (document: SanityDocument, context: SlugSourceContext) => string | Promise<string>;
|
|
292
220
|
/** @public */
|
|
293
221
|
type SlugifierFn = (source: string, schemaType: SlugSchemaType, context: SlugSourceContext) => string | Promise<string>;
|
|
294
|
-
/**
|
|
295
|
-
* Checks whether the given `thing` is a slug, eg an object with a `current` string property.
|
|
296
|
-
*
|
|
297
|
-
* @param thing - The thing to check
|
|
298
|
-
* @returns True if slug, false otherwise
|
|
299
|
-
* @public
|
|
300
|
-
*/
|
|
301
|
-
declare function isSlug(thing: unknown): thing is Slug;
|
|
302
222
|
/** @public */
|
|
303
223
|
type RuleTypeConstraint = 'Array' | 'Boolean' | 'Date' | 'Number' | 'Object' | 'String';
|
|
304
224
|
/** @public */
|
|
@@ -747,18 +667,27 @@ interface FormNodeValidation {
|
|
|
747
667
|
message: string;
|
|
748
668
|
path: Path;
|
|
749
669
|
}
|
|
750
|
-
/** @
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
670
|
+
/** @public */
|
|
671
|
+
interface PrepareViewOptions {
|
|
672
|
+
/** @beta */
|
|
673
|
+
ordering?: SortOrdering;
|
|
674
|
+
}
|
|
675
|
+
/** @public */
|
|
676
|
+
interface PreviewValue {
|
|
677
|
+
_id?: string;
|
|
678
|
+
_createdAt?: string;
|
|
679
|
+
_updatedAt?: string;
|
|
680
|
+
title?: string;
|
|
681
|
+
subtitle?: string;
|
|
682
|
+
description?: string;
|
|
683
|
+
media?: ReactNode | ElementType;
|
|
684
|
+
imageUrl?: string;
|
|
685
|
+
}
|
|
686
|
+
/** @public */
|
|
687
|
+
interface PreviewConfig<Select extends Record<string, string> = Record<string, string>, PrepareValue extends Record<keyof Select, any> = Record<keyof Select, any>> {
|
|
688
|
+
select?: Select;
|
|
689
|
+
prepare?: (value: PrepareValue, viewOptions?: PrepareViewOptions) => PreviewValue;
|
|
690
|
+
}
|
|
762
691
|
/** @public */
|
|
763
692
|
interface RuleDef<T, FieldValue = unknown> {
|
|
764
693
|
required: () => T;
|
|
@@ -773,138 +702,6 @@ interface RuleDef<T, FieldValue = unknown> {
|
|
|
773
702
|
type RuleBuilder<T extends RuleDef<T, FieldValue>, FieldValue = unknown> = T | T[];
|
|
774
703
|
/** @public */
|
|
775
704
|
type ValidationBuilder<T extends RuleDef<T, FieldValue>, FieldValue = unknown> = (rule: T, context?: ValidationContext) => RuleBuilder<T, FieldValue>;
|
|
776
|
-
/** @public */
|
|
777
|
-
interface ObjectOptions extends BaseSchemaTypeOptions {
|
|
778
|
-
collapsible?: boolean;
|
|
779
|
-
collapsed?: boolean;
|
|
780
|
-
columns?: number;
|
|
781
|
-
modal?: ModalOptions;
|
|
782
|
-
}
|
|
783
|
-
/** @public */
|
|
784
|
-
interface ObjectRule extends RuleDef<ObjectRule, Record<string, unknown>> {}
|
|
785
|
-
/** @public */
|
|
786
|
-
interface ObjectDefinition extends BaseSchemaDefinition {
|
|
787
|
-
type: 'object';
|
|
788
|
-
/**
|
|
789
|
-
* Object must have at least one field. This is validated at Studio startup.
|
|
790
|
-
*/
|
|
791
|
-
fields: FieldDefinition[];
|
|
792
|
-
groups?: FieldGroupDefinition[];
|
|
793
|
-
fieldsets?: FieldsetDefinition[];
|
|
794
|
-
preview?: PreviewConfig;
|
|
795
|
-
options?: ObjectOptions;
|
|
796
|
-
validation?: ValidationBuilder<ObjectRule, Record<string, unknown>>;
|
|
797
|
-
initialValue?: InitialValueProperty<any, Record<string, unknown>>;
|
|
798
|
-
}
|
|
799
|
-
/** @public */
|
|
800
|
-
interface FieldsetDefinition {
|
|
801
|
-
name: string;
|
|
802
|
-
title?: string;
|
|
803
|
-
description?: string;
|
|
804
|
-
group?: string;
|
|
805
|
-
hidden?: ConditionalProperty;
|
|
806
|
-
readOnly?: ConditionalProperty;
|
|
807
|
-
options?: ObjectOptions;
|
|
808
|
-
}
|
|
809
|
-
/** @public */
|
|
810
|
-
type FieldGroupDefinition = {
|
|
811
|
-
name: string;
|
|
812
|
-
title?: string;
|
|
813
|
-
hidden?: ConditionalProperty;
|
|
814
|
-
icon?: ComponentType;
|
|
815
|
-
default?: boolean;
|
|
816
|
-
i18n?: I18nTextRecord<'title'>;
|
|
817
|
-
};
|
|
818
|
-
/**
|
|
819
|
-
* Options for configuring how Sanity Create interfaces with the type or field.
|
|
820
|
-
*
|
|
821
|
-
* @public
|
|
822
|
-
*/
|
|
823
|
-
interface SanityCreateOptions {
|
|
824
|
-
/** Set to true to exclude a type or field from appearing in Sanity Create */
|
|
825
|
-
exclude?: boolean;
|
|
826
|
-
/**
|
|
827
|
-
* A short description of what the type or field is used for.
|
|
828
|
-
* Purpose can be used to improve how and when content mapping uses the field.
|
|
829
|
-
* */
|
|
830
|
-
purpose?: string;
|
|
831
|
-
}
|
|
832
|
-
/**
|
|
833
|
-
* Options for configuring how Canvas app interfaces with the type or field.
|
|
834
|
-
*
|
|
835
|
-
* @public
|
|
836
|
-
*/
|
|
837
|
-
interface CanvasAppOptions {
|
|
838
|
-
/** Set to true to exclude a type or field from appearing in Canvas */
|
|
839
|
-
exclude?: boolean;
|
|
840
|
-
/**
|
|
841
|
-
* A short description of what the type or field is used for.
|
|
842
|
-
* Purpose can be used to improve how and when content mapping uses the field.
|
|
843
|
-
* */
|
|
844
|
-
purpose?: string;
|
|
845
|
-
}
|
|
846
|
-
/**
|
|
847
|
-
* `BaseOptions` applies to all type options.
|
|
848
|
-
*
|
|
849
|
-
* It can be extended by interface declaration merging in plugins to provide generic options to all types and fields.
|
|
850
|
-
*
|
|
851
|
-
* @public
|
|
852
|
-
* */
|
|
853
|
-
interface BaseSchemaTypeOptions {
|
|
854
|
-
sanityCreate?: SanityCreateOptions;
|
|
855
|
-
canvasApp?: CanvasAppOptions;
|
|
856
|
-
}
|
|
857
|
-
/** @public */
|
|
858
|
-
interface BaseSchemaDefinition {
|
|
859
|
-
name: string;
|
|
860
|
-
title?: string;
|
|
861
|
-
description?: string | React.JSX.Element;
|
|
862
|
-
hidden?: ConditionalProperty;
|
|
863
|
-
readOnly?: ConditionalProperty;
|
|
864
|
-
icon?: ComponentType | ReactNode;
|
|
865
|
-
validation?: unknown;
|
|
866
|
-
initialValue?: unknown;
|
|
867
|
-
deprecated?: DeprecatedProperty;
|
|
868
|
-
}
|
|
869
|
-
/** @public */
|
|
870
|
-
interface TitledListValue<V = unknown> {
|
|
871
|
-
_key?: string;
|
|
872
|
-
title: string;
|
|
873
|
-
value?: V;
|
|
874
|
-
}
|
|
875
|
-
/** @public */
|
|
876
|
-
interface I18nTitledListValue<V = unknown> {
|
|
877
|
-
_key?: string;
|
|
878
|
-
title: string;
|
|
879
|
-
i18nTitleKey?: string;
|
|
880
|
-
value?: V;
|
|
881
|
-
}
|
|
882
|
-
/** @public */
|
|
883
|
-
interface EnumListProps<V = unknown> {
|
|
884
|
-
list?: Array<TitledListValue<V> | V>;
|
|
885
|
-
layout?: 'radio' | 'dropdown';
|
|
886
|
-
direction?: 'horizontal' | 'vertical';
|
|
887
|
-
}
|
|
888
|
-
/** @public */
|
|
889
|
-
interface SearchConfiguration {
|
|
890
|
-
search?: {
|
|
891
|
-
/**
|
|
892
|
-
* Defines a search weight for this field to prioritize its importance
|
|
893
|
-
* during search operations in the Studio. This setting allows the specified
|
|
894
|
-
* field to be ranked higher in search results compared to other fields.
|
|
895
|
-
*
|
|
896
|
-
* By default, all fields are assigned a weight of 1. However, if a field is
|
|
897
|
-
* chosen as the `title` in the preview configuration's `select` option, it
|
|
898
|
-
* will automatically receive a default weight of 10. Similarly, if selected
|
|
899
|
-
* as the `subtitle`, the default weight is 5. Fields marked as
|
|
900
|
-
* `hidden: true` (no function) are assigned a weight of 0 by default.
|
|
901
|
-
*
|
|
902
|
-
* Note: Search weight configuration is currently supported only for fields
|
|
903
|
-
* of type string or portable text arrays.
|
|
904
|
-
*/
|
|
905
|
-
weight?: number;
|
|
906
|
-
};
|
|
907
|
-
}
|
|
908
705
|
/**
|
|
909
706
|
* Options for the "insert menu" shown when adding items to an array with multiple member types.
|
|
910
707
|
*
|
|
@@ -1050,36 +847,29 @@ interface PortableTextListBlock extends PortableTextTextBlock {
|
|
|
1050
847
|
listItem: string;
|
|
1051
848
|
level: number;
|
|
1052
849
|
}
|
|
1053
|
-
/**
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
* Uses `isPortableTextTextBlock` and checks for `listItem` and `level`
|
|
1077
|
-
*
|
|
1078
|
-
* @see isPortableTextTextBlock
|
|
1079
|
-
*
|
|
1080
|
-
* @alpha
|
|
1081
|
-
*/
|
|
1082
|
-
declare function isPortableTextListBlock<T = PortableTextSpan | PortableTextObject>(value: unknown): value is PortableTextTextBlock<T>;
|
|
850
|
+
/** @public */
|
|
851
|
+
interface ObjectOptions extends BaseSchemaTypeOptions {
|
|
852
|
+
collapsible?: boolean;
|
|
853
|
+
collapsed?: boolean;
|
|
854
|
+
columns?: number;
|
|
855
|
+
modal?: ModalOptions;
|
|
856
|
+
}
|
|
857
|
+
/** @public */
|
|
858
|
+
interface ObjectRule extends RuleDef<ObjectRule, Record<string, unknown>> {}
|
|
859
|
+
/** @public */
|
|
860
|
+
interface ObjectDefinition extends BaseSchemaDefinition {
|
|
861
|
+
type: 'object';
|
|
862
|
+
/**
|
|
863
|
+
* Object must have at least one field. This is validated at Studio startup.
|
|
864
|
+
*/
|
|
865
|
+
fields: FieldDefinition[];
|
|
866
|
+
groups?: FieldGroupDefinition[];
|
|
867
|
+
fieldsets?: FieldsetDefinition[];
|
|
868
|
+
preview?: PreviewConfig;
|
|
869
|
+
options?: ObjectOptions;
|
|
870
|
+
validation?: ValidationBuilder<ObjectRule, Record<string, unknown>>;
|
|
871
|
+
initialValue?: InitialValueProperty<any, Record<string, unknown>>;
|
|
872
|
+
}
|
|
1083
873
|
/**
|
|
1084
874
|
* Schema options for a Block schema definition
|
|
1085
875
|
* @public */
|
|
@@ -1743,6 +1533,122 @@ interface UrlDefinition extends BaseSchemaDefinition {
|
|
|
1743
1533
|
validation?: ValidationBuilder<UrlRule, string>;
|
|
1744
1534
|
initialValue?: InitialValueProperty<any, string>;
|
|
1745
1535
|
}
|
|
1536
|
+
/**
|
|
1537
|
+
* `IntrinsicDefinitions` is a lookup map for "predefined" schema definitions.
|
|
1538
|
+
* Schema types in `IntrinsicDefinitions` will have good type-completion and type-safety in {@link defineType},
|
|
1539
|
+
* {@link defineField} and {@link defineArrayMember} once the `type` property is provided.
|
|
1540
|
+
*
|
|
1541
|
+
* By default, `IntrinsicDefinitions` contains all standard Sanity schema types (`array`, `string`, `number` ect),
|
|
1542
|
+
* but it is an interface and as such, open for extension.
|
|
1543
|
+
*
|
|
1544
|
+
* This type can be extended using declaration merging; this way new entries can be added.
|
|
1545
|
+
* See {@link defineType} for examples on how this can be accomplished.
|
|
1546
|
+
*
|
|
1547
|
+
* @see defineType
|
|
1548
|
+
*
|
|
1549
|
+
* @public
|
|
1550
|
+
*/
|
|
1551
|
+
interface IntrinsicDefinitions {
|
|
1552
|
+
array: ArrayDefinition;
|
|
1553
|
+
block: BlockDefinition;
|
|
1554
|
+
boolean: BooleanDefinition;
|
|
1555
|
+
date: DateDefinition;
|
|
1556
|
+
datetime: DatetimeDefinition;
|
|
1557
|
+
document: DocumentDefinition;
|
|
1558
|
+
file: FileDefinition;
|
|
1559
|
+
geopoint: GeopointDefinition;
|
|
1560
|
+
image: ImageDefinition;
|
|
1561
|
+
number: NumberDefinition;
|
|
1562
|
+
object: ObjectDefinition;
|
|
1563
|
+
reference: ReferenceDefinition;
|
|
1564
|
+
crossDatasetReference: CrossDatasetReferenceDefinition;
|
|
1565
|
+
globalDocumentReference: GlobalDocumentReferenceDefinition;
|
|
1566
|
+
slug: SlugDefinition;
|
|
1567
|
+
string: StringDefinition;
|
|
1568
|
+
text: TextDefinition;
|
|
1569
|
+
url: UrlDefinition;
|
|
1570
|
+
email: EmailDefinition;
|
|
1571
|
+
}
|
|
1572
|
+
/**
|
|
1573
|
+
* A union of all intrinsic types allowed natively in the schema.
|
|
1574
|
+
*
|
|
1575
|
+
* @see IntrinsicDefinitions
|
|
1576
|
+
*
|
|
1577
|
+
* @public
|
|
1578
|
+
*/
|
|
1579
|
+
type IntrinsicTypeName = IntrinsicDefinitions[keyof IntrinsicDefinitions]['type'];
|
|
1580
|
+
/**
|
|
1581
|
+
* Represents a Sanity schema type definition with an optional type parameter.
|
|
1582
|
+
*
|
|
1583
|
+
* It's recommend to use the `defineType` helper instead of this type by
|
|
1584
|
+
* itself.
|
|
1585
|
+
*
|
|
1586
|
+
* @see defineType
|
|
1587
|
+
*
|
|
1588
|
+
* @public
|
|
1589
|
+
*/
|
|
1590
|
+
type SchemaTypeDefinition<TType extends IntrinsicTypeName = IntrinsicTypeName> = IntrinsicDefinitions[IntrinsicTypeName] | TypeAliasDefinition<AutocompleteString, TType>;
|
|
1591
|
+
/**
|
|
1592
|
+
* Represents a reference to another type registered top-level in your schema.
|
|
1593
|
+
*
|
|
1594
|
+
* @public
|
|
1595
|
+
*/
|
|
1596
|
+
interface TypeReference {
|
|
1597
|
+
type: string;
|
|
1598
|
+
name?: string;
|
|
1599
|
+
icon?: ComponentType | ReactNode;
|
|
1600
|
+
options?: {
|
|
1601
|
+
[key: string]: unknown;
|
|
1602
|
+
};
|
|
1603
|
+
}
|
|
1604
|
+
/**
|
|
1605
|
+
* Represents a type definition that is an alias/extension of an existing type
|
|
1606
|
+
* in your schema. Creating a type alias will re-register that existing type
|
|
1607
|
+
* under a different name. You can also override the default type options with
|
|
1608
|
+
* a type alias definition.
|
|
1609
|
+
*
|
|
1610
|
+
* @public
|
|
1611
|
+
*/
|
|
1612
|
+
interface TypeAliasDefinition<TType extends string, TAlias extends IntrinsicTypeName | undefined> extends BaseSchemaDefinition {
|
|
1613
|
+
type: TType;
|
|
1614
|
+
options?: TAlias extends IntrinsicTypeName ? IntrinsicDefinitions[TAlias]['options'] : unknown;
|
|
1615
|
+
validation?: SchemaValidationValue;
|
|
1616
|
+
initialValue?: InitialValueProperty<any, any>;
|
|
1617
|
+
preview?: PreviewConfig;
|
|
1618
|
+
components?: {
|
|
1619
|
+
annotation?: ComponentType<any>;
|
|
1620
|
+
block?: ComponentType<any>;
|
|
1621
|
+
inlineBlock?: ComponentType<any>;
|
|
1622
|
+
diff?: ComponentType<any>;
|
|
1623
|
+
field?: ComponentType<any>;
|
|
1624
|
+
input?: ComponentType<any>;
|
|
1625
|
+
item?: ComponentType<any>;
|
|
1626
|
+
preview?: ComponentType<any>;
|
|
1627
|
+
};
|
|
1628
|
+
}
|
|
1629
|
+
/** @public */
|
|
1630
|
+
interface FieldDefinitionBase {
|
|
1631
|
+
fieldset?: string;
|
|
1632
|
+
group?: string | string[];
|
|
1633
|
+
}
|
|
1634
|
+
/** @public */
|
|
1635
|
+
type InlineFieldDefinition = { [K in keyof IntrinsicDefinitions]: Omit<IntrinsicDefinitions[K], 'initialValue' | 'validation'> & {
|
|
1636
|
+
validation?: SchemaValidationValue;
|
|
1637
|
+
initialValue?: InitialValueProperty<any, any>;
|
|
1638
|
+
}; };
|
|
1639
|
+
/**
|
|
1640
|
+
* The shape of a field definition. Note, it's recommended to use the
|
|
1641
|
+
* `defineField` function instead of using this type directly.
|
|
1642
|
+
*
|
|
1643
|
+
* Where `defineField` infers the exact field type,
|
|
1644
|
+
* FieldDefinition is a compromise union of all types a field can have.
|
|
1645
|
+
*
|
|
1646
|
+
* A field definition can be a reference to another registered top-level type
|
|
1647
|
+
* or a inline type definition.
|
|
1648
|
+
*
|
|
1649
|
+
* @public
|
|
1650
|
+
*/
|
|
1651
|
+
type FieldDefinition<TType extends IntrinsicTypeName = IntrinsicTypeName, TAlias extends IntrinsicTypeName | undefined = undefined> = (InlineFieldDefinition[TType] | TypeAliasDefinition<AutocompleteString, TAlias>) & FieldDefinitionBase;
|
|
1746
1652
|
/** @beta */
|
|
1747
1653
|
interface DefineSchemaOptions<TStrict extends StrictDefinition, TAlias extends IntrinsicTypeName | undefined> {
|
|
1748
1654
|
/**
|
|
@@ -2473,198 +2379,114 @@ interface ModalOptions {
|
|
|
2473
2379
|
width?: 1 | 2 | 3 | 4 | 5 | 'auto' | (1 | 2 | 3 | 4 | 5 | 'auto')[];
|
|
2474
2380
|
}
|
|
2475
2381
|
/** @public */
|
|
2476
|
-
interface
|
|
2477
|
-
|
|
2478
|
-
ordering?: SortOrdering;
|
|
2479
|
-
}
|
|
2480
|
-
/** @public */
|
|
2481
|
-
interface PreviewValue {
|
|
2482
|
-
_id?: string;
|
|
2483
|
-
_createdAt?: string;
|
|
2484
|
-
_updatedAt?: string;
|
|
2382
|
+
interface FieldsetDefinition {
|
|
2383
|
+
name: string;
|
|
2485
2384
|
title?: string;
|
|
2486
|
-
subtitle?: string;
|
|
2487
2385
|
description?: string;
|
|
2488
|
-
|
|
2489
|
-
|
|
2386
|
+
group?: string;
|
|
2387
|
+
hidden?: ConditionalProperty;
|
|
2388
|
+
readOnly?: ConditionalProperty;
|
|
2389
|
+
options?: ObjectOptions;
|
|
2490
2390
|
}
|
|
2491
2391
|
/** @public */
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2392
|
+
type FieldGroupDefinition = {
|
|
2393
|
+
name: string;
|
|
2394
|
+
title?: string;
|
|
2395
|
+
hidden?: ConditionalProperty;
|
|
2396
|
+
icon?: ComponentType;
|
|
2397
|
+
default?: boolean;
|
|
2398
|
+
i18n?: I18nTextRecord<'title'>;
|
|
2399
|
+
};
|
|
2496
2400
|
/**
|
|
2497
|
-
*
|
|
2498
|
-
* Schema types in `IntrinsicDefinitions` will have good type-completion and type-safety in {@link defineType},
|
|
2499
|
-
* {@link defineField} and {@link defineArrayMember} once the `type` property is provided.
|
|
2500
|
-
*
|
|
2501
|
-
* By default, `IntrinsicDefinitions` contains all standard Sanity schema types (`array`, `string`, `number` ect),
|
|
2502
|
-
* but it is an interface and as such, open for extension.
|
|
2503
|
-
*
|
|
2504
|
-
* This type can be extended using declaration merging; this way new entries can be added.
|
|
2505
|
-
* See {@link defineType} for examples on how this can be accomplished.
|
|
2506
|
-
*
|
|
2507
|
-
* @see defineType
|
|
2401
|
+
* Options for configuring how Sanity Create interfaces with the type or field.
|
|
2508
2402
|
*
|
|
2509
2403
|
* @public
|
|
2510
2404
|
*/
|
|
2511
|
-
interface
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
geopoint: GeopointDefinition;
|
|
2520
|
-
image: ImageDefinition;
|
|
2521
|
-
number: NumberDefinition;
|
|
2522
|
-
object: ObjectDefinition;
|
|
2523
|
-
reference: ReferenceDefinition;
|
|
2524
|
-
crossDatasetReference: CrossDatasetReferenceDefinition;
|
|
2525
|
-
globalDocumentReference: GlobalDocumentReferenceDefinition;
|
|
2526
|
-
slug: SlugDefinition;
|
|
2527
|
-
string: StringDefinition;
|
|
2528
|
-
text: TextDefinition;
|
|
2529
|
-
url: UrlDefinition;
|
|
2530
|
-
email: EmailDefinition;
|
|
2405
|
+
interface SanityCreateOptions {
|
|
2406
|
+
/** Set to true to exclude a type or field from appearing in Sanity Create */
|
|
2407
|
+
exclude?: boolean;
|
|
2408
|
+
/**
|
|
2409
|
+
* A short description of what the type or field is used for.
|
|
2410
|
+
* Purpose can be used to improve how and when content mapping uses the field.
|
|
2411
|
+
* */
|
|
2412
|
+
purpose?: string;
|
|
2531
2413
|
}
|
|
2532
2414
|
/**
|
|
2533
|
-
*
|
|
2534
|
-
*
|
|
2535
|
-
* @see IntrinsicDefinitions
|
|
2415
|
+
* Options for configuring how Canvas app interfaces with the type or field.
|
|
2536
2416
|
*
|
|
2537
2417
|
* @public
|
|
2538
2418
|
*/
|
|
2539
|
-
|
|
2419
|
+
interface CanvasAppOptions {
|
|
2420
|
+
/** Set to true to exclude a type or field from appearing in Canvas */
|
|
2421
|
+
exclude?: boolean;
|
|
2422
|
+
/**
|
|
2423
|
+
* A short description of what the type or field is used for.
|
|
2424
|
+
* Purpose can be used to improve how and when content mapping uses the field.
|
|
2425
|
+
* */
|
|
2426
|
+
purpose?: string;
|
|
2427
|
+
}
|
|
2540
2428
|
/**
|
|
2541
|
-
*
|
|
2542
|
-
*
|
|
2543
|
-
* It's recommend to use the `defineType` helper instead of this type by
|
|
2544
|
-
* itself.
|
|
2545
|
-
*
|
|
2546
|
-
* @see defineType
|
|
2429
|
+
* `BaseOptions` applies to all type options.
|
|
2547
2430
|
*
|
|
2548
|
-
*
|
|
2549
|
-
*/
|
|
2550
|
-
type SchemaTypeDefinition<TType extends IntrinsicTypeName = IntrinsicTypeName> = IntrinsicDefinitions[IntrinsicTypeName] | TypeAliasDefinition<AutocompleteString, TType>;
|
|
2551
|
-
/**
|
|
2552
|
-
* Represents a reference to another type registered top-level in your schema.
|
|
2431
|
+
* It can be extended by interface declaration merging in plugins to provide generic options to all types and fields.
|
|
2553
2432
|
*
|
|
2554
|
-
*
|
|
2555
|
-
*/
|
|
2556
|
-
interface
|
|
2557
|
-
|
|
2558
|
-
|
|
2433
|
+
* @public
|
|
2434
|
+
* */
|
|
2435
|
+
interface BaseSchemaTypeOptions {
|
|
2436
|
+
sanityCreate?: SanityCreateOptions;
|
|
2437
|
+
canvasApp?: CanvasAppOptions;
|
|
2438
|
+
}
|
|
2439
|
+
/** @public */
|
|
2440
|
+
interface BaseSchemaDefinition {
|
|
2441
|
+
name: string;
|
|
2442
|
+
title?: string;
|
|
2443
|
+
description?: string | React.JSX.Element;
|
|
2444
|
+
hidden?: ConditionalProperty;
|
|
2445
|
+
readOnly?: ConditionalProperty;
|
|
2559
2446
|
icon?: ComponentType | ReactNode;
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2447
|
+
validation?: unknown;
|
|
2448
|
+
initialValue?: unknown;
|
|
2449
|
+
deprecated?: DeprecatedProperty;
|
|
2563
2450
|
}
|
|
2564
|
-
/**
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
*
|
|
2570
|
-
* @public
|
|
2571
|
-
*/
|
|
2572
|
-
interface TypeAliasDefinition<TType extends string, TAlias extends IntrinsicTypeName | undefined> extends BaseSchemaDefinition {
|
|
2573
|
-
type: TType;
|
|
2574
|
-
options?: TAlias extends IntrinsicTypeName ? IntrinsicDefinitions[TAlias]['options'] : unknown;
|
|
2575
|
-
validation?: SchemaValidationValue;
|
|
2576
|
-
initialValue?: InitialValueProperty<any, any>;
|
|
2577
|
-
preview?: PreviewConfig;
|
|
2578
|
-
components?: {
|
|
2579
|
-
annotation?: ComponentType<any>;
|
|
2580
|
-
block?: ComponentType<any>;
|
|
2581
|
-
inlineBlock?: ComponentType<any>;
|
|
2582
|
-
diff?: ComponentType<any>;
|
|
2583
|
-
field?: ComponentType<any>;
|
|
2584
|
-
input?: ComponentType<any>;
|
|
2585
|
-
item?: ComponentType<any>;
|
|
2586
|
-
preview?: ComponentType<any>;
|
|
2587
|
-
};
|
|
2451
|
+
/** @public */
|
|
2452
|
+
interface TitledListValue<V = unknown> {
|
|
2453
|
+
_key?: string;
|
|
2454
|
+
title: string;
|
|
2455
|
+
value?: V;
|
|
2588
2456
|
}
|
|
2589
2457
|
/** @public */
|
|
2590
|
-
interface
|
|
2591
|
-
|
|
2592
|
-
|
|
2458
|
+
interface I18nTitledListValue<V = unknown> {
|
|
2459
|
+
_key?: string;
|
|
2460
|
+
title: string;
|
|
2461
|
+
i18nTitleKey?: string;
|
|
2462
|
+
value?: V;
|
|
2593
2463
|
}
|
|
2594
2464
|
/** @public */
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
*/
|
|
2621
|
-
declare function isDocumentSchemaType(type: unknown): type is ObjectSchemaType;
|
|
2622
|
-
/** @internal */
|
|
2623
|
-
declare function isObjectSchemaType(type: unknown): type is ObjectSchemaType;
|
|
2624
|
-
/** @internal */
|
|
2625
|
-
declare function isArraySchemaType(type: unknown): type is ArraySchemaType;
|
|
2626
|
-
/** @internal */
|
|
2627
|
-
declare function isArrayOfBlocksSchemaType(type: unknown): type is ArraySchemaType<ObjectSchemaType>;
|
|
2628
|
-
/** @internal */
|
|
2629
|
-
declare function isArrayOfObjectsSchemaType(type: unknown): type is ArraySchemaType<ObjectSchemaType>;
|
|
2630
|
-
/** @internal */
|
|
2631
|
-
declare function isArrayOfPrimitivesSchemaType(type: unknown): type is ArraySchemaType;
|
|
2632
|
-
/** @internal */
|
|
2633
|
-
declare function isArrayOfStringsSchemaType(type: unknown): type is ArraySchemaType<string>;
|
|
2634
|
-
/** @internal */
|
|
2635
|
-
declare function isBooleanSchemaType(type: unknown): type is BooleanSchemaType;
|
|
2636
|
-
/** @internal */
|
|
2637
|
-
declare function isStringSchemaType(type: unknown): type is StringSchemaType;
|
|
2638
|
-
/** @internal */
|
|
2639
|
-
declare function isDateTimeSchemaType(type: unknown): type is StringSchemaType;
|
|
2640
|
-
/** @internal */
|
|
2641
|
-
declare function isNumberSchemaType(type: unknown): type is NumberSchemaType;
|
|
2642
|
-
/** @internal */
|
|
2643
|
-
declare function isPrimitiveSchemaType(type: unknown): type is BooleanSchemaType | StringSchemaType | NumberSchemaType;
|
|
2644
|
-
/** @internal */
|
|
2645
|
-
declare function isReferenceSchemaType(type: unknown): type is ReferenceSchemaType;
|
|
2646
|
-
/** @internal */
|
|
2647
|
-
declare function isImageSchemaType(type: unknown): type is ImageSchemaType;
|
|
2648
|
-
/** @internal */
|
|
2649
|
-
declare function isFileSchemaType(type: unknown): type is FileSchemaType;
|
|
2650
|
-
/** @internal */
|
|
2651
|
-
declare function isDeprecatedSchemaType<TSchemaType extends BaseSchemaType>(type: TSchemaType): type is DeprecatedSchemaType<TSchemaType>;
|
|
2652
|
-
/** @internal */
|
|
2653
|
-
declare function isDeprecationConfiguration(type: unknown): type is DeprecationConfiguration;
|
|
2654
|
-
/** @internal */
|
|
2655
|
-
declare function isCrossDatasetReferenceSchemaType(type: unknown): type is CrossDatasetReferenceSchemaType;
|
|
2656
|
-
/** @internal */
|
|
2657
|
-
declare function isTitledListValue(item: unknown): item is TitledListValue;
|
|
2658
|
-
/** @internal */
|
|
2659
|
-
declare function isSpanSchemaType(type: unknown): type is SpanSchemaType;
|
|
2660
|
-
/** @internal */
|
|
2661
|
-
declare function isBlockSchemaType(type: unknown): type is BlockSchemaType;
|
|
2662
|
-
/** @internal */
|
|
2663
|
-
declare function isBlockStyleObjectField(field: unknown): field is BlockStyleObjectField;
|
|
2664
|
-
/** @internal */
|
|
2665
|
-
declare function isBlockListObjectField(field: unknown): field is BlockListObjectField;
|
|
2666
|
-
/** @internal */
|
|
2667
|
-
declare function isBlockChildrenObjectField(field: unknown): field is BlockChildrenObjectField;
|
|
2465
|
+
interface EnumListProps<V = unknown> {
|
|
2466
|
+
list?: Array<TitledListValue<V> | V>;
|
|
2467
|
+
layout?: 'radio' | 'dropdown';
|
|
2468
|
+
direction?: 'horizontal' | 'vertical';
|
|
2469
|
+
}
|
|
2470
|
+
/** @public */
|
|
2471
|
+
interface SearchConfiguration {
|
|
2472
|
+
search?: {
|
|
2473
|
+
/**
|
|
2474
|
+
* Defines a search weight for this field to prioritize its importance
|
|
2475
|
+
* during search operations in the Studio. This setting allows the specified
|
|
2476
|
+
* field to be ranked higher in search results compared to other fields.
|
|
2477
|
+
*
|
|
2478
|
+
* By default, all fields are assigned a weight of 1. However, if a field is
|
|
2479
|
+
* chosen as the `title` in the preview configuration's `select` option, it
|
|
2480
|
+
* will automatically receive a default weight of 10. Similarly, if selected
|
|
2481
|
+
* as the `subtitle`, the default weight is 5. Fields marked as
|
|
2482
|
+
* `hidden: true` (no function) are assigned a weight of 0 by default.
|
|
2483
|
+
*
|
|
2484
|
+
* Note: Search weight configuration is currently supported only for fields
|
|
2485
|
+
* of type string or portable text arrays.
|
|
2486
|
+
*/
|
|
2487
|
+
weight?: number;
|
|
2488
|
+
};
|
|
2489
|
+
}
|
|
2668
2490
|
/**
|
|
2669
2491
|
* @public
|
|
2670
2492
|
*/
|
|
@@ -2786,8 +2608,6 @@ interface ReferenceBaseOptions extends BaseSchemaTypeOptions {
|
|
|
2786
2608
|
}
|
|
2787
2609
|
/** @public */
|
|
2788
2610
|
type ReferenceFilterOptions = ReferenceFilterResolverOptions | ReferenceFilterQueryOptions;
|
|
2789
|
-
/** @internal */
|
|
2790
|
-
declare function isReference(reference: unknown): reference is Reference;
|
|
2791
2611
|
/** @public */
|
|
2792
2612
|
interface EmptyProps {}
|
|
2793
2613
|
/** @public */
|
|
@@ -3090,6 +2910,60 @@ type AssetSourceUploadSubscriber = (event: AssetSourceUploadEvent) => void;
|
|
|
3090
2910
|
/** @public */
|
|
3091
2911
|
declare function isImage(value: unknown): value is Image;
|
|
3092
2912
|
/** @beta */
|
|
2913
|
+
interface CrossDatasetReferenceValue {
|
|
2914
|
+
_type: string;
|
|
2915
|
+
_dataset: string;
|
|
2916
|
+
_projectId: string;
|
|
2917
|
+
_ref: string;
|
|
2918
|
+
_key?: string;
|
|
2919
|
+
_weak?: boolean;
|
|
2920
|
+
}
|
|
2921
|
+
/** @beta */
|
|
2922
|
+
interface WeakCrossDatasetReferenceValue extends CrossDatasetReferenceValue {
|
|
2923
|
+
_weak: true;
|
|
2924
|
+
}
|
|
2925
|
+
/** @beta */
|
|
2926
|
+
type CrossDatasetReferenceFilterSearchOptions = {
|
|
2927
|
+
filter?: string;
|
|
2928
|
+
params?: Record<string, unknown>;
|
|
2929
|
+
tag?: string;
|
|
2930
|
+
};
|
|
2931
|
+
/** @beta */
|
|
2932
|
+
type CrossDatasetReferenceFilterResolver = (options: {
|
|
2933
|
+
document: SanityDocument;
|
|
2934
|
+
parent?: Record<string, unknown> | Record<string, unknown>[];
|
|
2935
|
+
parentPath: Path;
|
|
2936
|
+
}) => CrossDatasetReferenceFilterSearchOptions | Promise<CrossDatasetReferenceFilterSearchOptions>;
|
|
2937
|
+
/** @beta */
|
|
2938
|
+
interface CrossDatasetType {
|
|
2939
|
+
type: string;
|
|
2940
|
+
title?: string;
|
|
2941
|
+
icon: ComponentType;
|
|
2942
|
+
preview: PreviewConfig;
|
|
2943
|
+
/** @deprecated Unused. Configuring search is no longer supported for cross-dataset references. */
|
|
2944
|
+
__experimental_search?: ObjectSchemaType['__experimental_search'];
|
|
2945
|
+
}
|
|
2946
|
+
/** @beta */
|
|
2947
|
+
interface CrossDatasetReferenceSchemaType extends Omit<ObjectSchemaType, 'options'> {
|
|
2948
|
+
jsonType: 'object';
|
|
2949
|
+
to: CrossDatasetType[];
|
|
2950
|
+
dataset: string;
|
|
2951
|
+
studioUrl?: (document: {
|
|
2952
|
+
id: string;
|
|
2953
|
+
type?: string;
|
|
2954
|
+
}) => string | null;
|
|
2955
|
+
weak?: boolean;
|
|
2956
|
+
options?: ReferenceFilterOptions;
|
|
2957
|
+
}
|
|
2958
|
+
/** @beta */
|
|
2959
|
+
declare function isCrossDatasetReference(reference: unknown): reference is CrossDatasetReferenceValue;
|
|
2960
|
+
/** @public */
|
|
2961
|
+
declare function isSanityDocument(document: unknown): document is SanityDocument;
|
|
2962
|
+
/** @public */
|
|
2963
|
+
declare function isTypedObject(obj: unknown): obj is TypedObject;
|
|
2964
|
+
/** @public */
|
|
2965
|
+
declare function isKeyedObject(obj: unknown): obj is KeyedObject;
|
|
2966
|
+
/** @beta */
|
|
3093
2967
|
interface GlobalDocumentReferenceValue {
|
|
3094
2968
|
_type: string;
|
|
3095
2969
|
/** The reference to the document. This is a string of the form `a:b:c`,
|
|
@@ -3189,6 +3063,18 @@ type ImageUrlCropMode = 'top' | 'bottom' | 'left' | 'right' | 'center' | 'focalp
|
|
|
3189
3063
|
type ImageUrlAutoMode = 'format';
|
|
3190
3064
|
/** @internal */
|
|
3191
3065
|
type ImageUrlOrientation = '0' | '90' | '180' | '270';
|
|
3066
|
+
/** @internal */
|
|
3067
|
+
declare function isValidationErrorMarker(marker: ValidationMarker): marker is ValidationMarker & {
|
|
3068
|
+
level: 'error';
|
|
3069
|
+
};
|
|
3070
|
+
/** @internal */
|
|
3071
|
+
declare function isValidationWarningMarker(marker: ValidationMarker): marker is ValidationMarker & {
|
|
3072
|
+
level: 'warning';
|
|
3073
|
+
};
|
|
3074
|
+
/** @internal */
|
|
3075
|
+
declare function isValidationInfoMarker(marker: ValidationMarker): marker is ValidationMarker & {
|
|
3076
|
+
level: 'info';
|
|
3077
|
+
};
|
|
3192
3078
|
/**
|
|
3193
3079
|
* @public
|
|
3194
3080
|
*/
|
|
@@ -3249,28 +3135,128 @@ declare function isAssetAspect(maybeAssetAspect: unknown): maybeAssetAspect is M
|
|
|
3249
3135
|
* @beta
|
|
3250
3136
|
*/
|
|
3251
3137
|
declare function defineAssetAspect(definition: MediaLibraryAssetAspectDefinition): MediaLibraryAssetAspectDocument;
|
|
3138
|
+
/** @internal */
|
|
3139
|
+
type InsertPatch = {
|
|
3140
|
+
before: string;
|
|
3141
|
+
items: unknown[];
|
|
3142
|
+
} | {
|
|
3143
|
+
after: string;
|
|
3144
|
+
items: unknown[];
|
|
3145
|
+
} | {
|
|
3146
|
+
replace: string;
|
|
3147
|
+
items: unknown[];
|
|
3148
|
+
};
|
|
3252
3149
|
/**
|
|
3253
|
-
*
|
|
3150
|
+
* NOTE: this is actually incorrect/invalid, but implemented as-is for backwards compatibility
|
|
3254
3151
|
*
|
|
3255
3152
|
* @internal
|
|
3256
3153
|
*/
|
|
3257
|
-
interface
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3154
|
+
interface PatchOperations {
|
|
3155
|
+
set?: {
|
|
3156
|
+
[key: string]: unknown;
|
|
3157
|
+
};
|
|
3158
|
+
setIfMissing?: {
|
|
3159
|
+
[key: string]: unknown;
|
|
3160
|
+
};
|
|
3161
|
+
merge?: {
|
|
3162
|
+
[key: string]: unknown;
|
|
3163
|
+
};
|
|
3164
|
+
diffMatchPatch?: {
|
|
3165
|
+
[key: string]: string;
|
|
3166
|
+
};
|
|
3167
|
+
unset?: string[];
|
|
3168
|
+
inc?: {
|
|
3169
|
+
[key: string]: number;
|
|
3170
|
+
};
|
|
3171
|
+
dec?: {
|
|
3172
|
+
[key: string]: number;
|
|
3173
|
+
};
|
|
3174
|
+
insert?: InsertPatch;
|
|
3175
|
+
ifRevisionID?: string;
|
|
3176
|
+
}
|
|
3177
|
+
/** @internal */
|
|
3178
|
+
type MutationSelection = {
|
|
3179
|
+
query: string;
|
|
3180
|
+
params?: Record<string, unknown>;
|
|
3181
|
+
} | {
|
|
3182
|
+
id: string;
|
|
3183
|
+
};
|
|
3184
|
+
/** @internal */
|
|
3185
|
+
type PatchMutationOperation = PatchOperations & MutationSelection;
|
|
3186
|
+
/** @internal */
|
|
3187
|
+
interface CreateMutation {
|
|
3188
|
+
create: {
|
|
3189
|
+
_id?: string;
|
|
3190
|
+
_type: string;
|
|
3191
|
+
[key: string]: unknown;
|
|
3192
|
+
};
|
|
3193
|
+
}
|
|
3194
|
+
/** @internal */
|
|
3195
|
+
interface CreateOrReplaceMutation {
|
|
3196
|
+
createOrReplace: {
|
|
3197
|
+
_id: string;
|
|
3198
|
+
_type: string;
|
|
3199
|
+
[key: string]: unknown;
|
|
3200
|
+
};
|
|
3201
|
+
}
|
|
3202
|
+
/** @internal */
|
|
3203
|
+
interface CreateIfNotExistsMutation {
|
|
3204
|
+
createIfNotExists: {
|
|
3205
|
+
_id: string;
|
|
3206
|
+
_type: string;
|
|
3207
|
+
[key: string]: unknown;
|
|
3208
|
+
};
|
|
3209
|
+
}
|
|
3210
|
+
/** @internal */
|
|
3211
|
+
interface DeleteMutation {
|
|
3212
|
+
delete: MutationSelection;
|
|
3213
|
+
}
|
|
3214
|
+
/** @internal */
|
|
3215
|
+
interface PatchMutation {
|
|
3216
|
+
patch: PatchMutationOperation;
|
|
3217
|
+
}
|
|
3218
|
+
/** @internal */
|
|
3219
|
+
type Mutation = CreateMutation | CreateOrReplaceMutation | CreateIfNotExistsMutation | DeleteMutation | PatchMutation;
|
|
3220
|
+
/** @internal */
|
|
3221
|
+
type MutationOperationName = 'create' | 'createOrReplace' | 'createIfNotExists' | 'delete' | 'patch';
|
|
3222
|
+
/** @internal */
|
|
3223
|
+
interface SingleMutationResult {
|
|
3224
|
+
transactionId: string;
|
|
3225
|
+
documentId: string;
|
|
3226
|
+
results: {
|
|
3227
|
+
id: string;
|
|
3228
|
+
}[];
|
|
3229
|
+
}
|
|
3230
|
+
/** @internal */
|
|
3231
|
+
interface MultipleMutationResult {
|
|
3232
|
+
transactionId: string;
|
|
3233
|
+
documentIds: string[];
|
|
3234
|
+
results: {
|
|
3235
|
+
id: string;
|
|
3236
|
+
}[];
|
|
3237
|
+
}
|
|
3238
|
+
/**
|
|
3239
|
+
* An entry in the transaction log
|
|
3240
|
+
*
|
|
3241
|
+
* @internal
|
|
3242
|
+
*/
|
|
3243
|
+
interface TransactionLogEvent {
|
|
3244
|
+
/**
|
|
3245
|
+
* ID of transaction
|
|
3246
|
+
*/
|
|
3247
|
+
id: string;
|
|
3248
|
+
/**
|
|
3249
|
+
* ISO-formatted timestamp (zulu-time) of when the transaction happened
|
|
3250
|
+
*/
|
|
3251
|
+
timestamp: string;
|
|
3252
|
+
/**
|
|
3253
|
+
* User ID of the user who performed the transaction
|
|
3254
|
+
*/
|
|
3255
|
+
author: string;
|
|
3256
|
+
/**
|
|
3257
|
+
* Document IDs involved in this transaction
|
|
3258
|
+
*/
|
|
3259
|
+
documentIDs: string[];
|
|
3274
3260
|
}
|
|
3275
3261
|
/**
|
|
3276
3262
|
* An entry in the transaction log that includes the effects of the transaction.
|
|
@@ -3359,108 +3345,6 @@ interface MendozaEffectPair {
|
|
|
3359
3345
|
revert: MendozaPatch;
|
|
3360
3346
|
}
|
|
3361
3347
|
/** @internal */
|
|
3362
|
-
declare function isCreateSquashedMutation(mutation: Mutation | TransactionLogMutation): mutation is CreateSquashedMutation;
|
|
3363
|
-
/** @internal */
|
|
3364
|
-
type InsertPatch = {
|
|
3365
|
-
before: string;
|
|
3366
|
-
items: unknown[];
|
|
3367
|
-
} | {
|
|
3368
|
-
after: string;
|
|
3369
|
-
items: unknown[];
|
|
3370
|
-
} | {
|
|
3371
|
-
replace: string;
|
|
3372
|
-
items: unknown[];
|
|
3373
|
-
};
|
|
3374
|
-
/**
|
|
3375
|
-
* NOTE: this is actually incorrect/invalid, but implemented as-is for backwards compatibility
|
|
3376
|
-
*
|
|
3377
|
-
* @internal
|
|
3378
|
-
*/
|
|
3379
|
-
interface PatchOperations {
|
|
3380
|
-
set?: {
|
|
3381
|
-
[key: string]: unknown;
|
|
3382
|
-
};
|
|
3383
|
-
setIfMissing?: {
|
|
3384
|
-
[key: string]: unknown;
|
|
3385
|
-
};
|
|
3386
|
-
merge?: {
|
|
3387
|
-
[key: string]: unknown;
|
|
3388
|
-
};
|
|
3389
|
-
diffMatchPatch?: {
|
|
3390
|
-
[key: string]: string;
|
|
3391
|
-
};
|
|
3392
|
-
unset?: string[];
|
|
3393
|
-
inc?: {
|
|
3394
|
-
[key: string]: number;
|
|
3395
|
-
};
|
|
3396
|
-
dec?: {
|
|
3397
|
-
[key: string]: number;
|
|
3398
|
-
};
|
|
3399
|
-
insert?: InsertPatch;
|
|
3400
|
-
ifRevisionID?: string;
|
|
3401
|
-
}
|
|
3402
|
-
/** @internal */
|
|
3403
|
-
type MutationSelection = {
|
|
3404
|
-
query: string;
|
|
3405
|
-
params?: Record<string, unknown>;
|
|
3406
|
-
} | {
|
|
3407
|
-
id: string;
|
|
3408
|
-
};
|
|
3409
|
-
/** @internal */
|
|
3410
|
-
type PatchMutationOperation = PatchOperations & MutationSelection;
|
|
3411
|
-
/** @internal */
|
|
3412
|
-
interface CreateMutation {
|
|
3413
|
-
create: {
|
|
3414
|
-
_id?: string;
|
|
3415
|
-
_type: string;
|
|
3416
|
-
[key: string]: unknown;
|
|
3417
|
-
};
|
|
3418
|
-
}
|
|
3419
|
-
/** @internal */
|
|
3420
|
-
interface CreateOrReplaceMutation {
|
|
3421
|
-
createOrReplace: {
|
|
3422
|
-
_id: string;
|
|
3423
|
-
_type: string;
|
|
3424
|
-
[key: string]: unknown;
|
|
3425
|
-
};
|
|
3426
|
-
}
|
|
3427
|
-
/** @internal */
|
|
3428
|
-
interface CreateIfNotExistsMutation {
|
|
3429
|
-
createIfNotExists: {
|
|
3430
|
-
_id: string;
|
|
3431
|
-
_type: string;
|
|
3432
|
-
[key: string]: unknown;
|
|
3433
|
-
};
|
|
3434
|
-
}
|
|
3435
|
-
/** @internal */
|
|
3436
|
-
interface DeleteMutation {
|
|
3437
|
-
delete: MutationSelection;
|
|
3438
|
-
}
|
|
3439
|
-
/** @internal */
|
|
3440
|
-
interface PatchMutation {
|
|
3441
|
-
patch: PatchMutationOperation;
|
|
3442
|
-
}
|
|
3443
|
-
/** @internal */
|
|
3444
|
-
type Mutation = CreateMutation | CreateOrReplaceMutation | CreateIfNotExistsMutation | DeleteMutation | PatchMutation;
|
|
3445
|
-
/** @internal */
|
|
3446
|
-
type MutationOperationName = 'create' | 'createOrReplace' | 'createIfNotExists' | 'delete' | 'patch';
|
|
3447
|
-
/** @internal */
|
|
3448
|
-
interface SingleMutationResult {
|
|
3449
|
-
transactionId: string;
|
|
3450
|
-
documentId: string;
|
|
3451
|
-
results: {
|
|
3452
|
-
id: string;
|
|
3453
|
-
}[];
|
|
3454
|
-
}
|
|
3455
|
-
/** @internal */
|
|
3456
|
-
interface MultipleMutationResult {
|
|
3457
|
-
transactionId: string;
|
|
3458
|
-
documentIds: string[];
|
|
3459
|
-
results: {
|
|
3460
|
-
id: string;
|
|
3461
|
-
}[];
|
|
3462
|
-
}
|
|
3463
|
-
/** @internal */
|
|
3464
3348
|
declare function isCreateMutation(mutation: Mutation | TransactionLogMutation): mutation is CreateMutation;
|
|
3465
3349
|
/** @internal */
|
|
3466
3350
|
declare function isCreateIfNotExistsMutation(mutation: Mutation | TransactionLogMutation): mutation is CreateIfNotExistsMutation;
|
|
@@ -3519,10 +3403,114 @@ interface DashboardNotificationPayload {
|
|
|
3519
3403
|
path: string;
|
|
3520
3404
|
};
|
|
3521
3405
|
}
|
|
3406
|
+
/** @internal */
|
|
3407
|
+
declare function isIndexSegment(segment: PathSegment): segment is number;
|
|
3408
|
+
/** @internal */
|
|
3409
|
+
declare function isKeySegment(segment: PathSegment): segment is KeyedSegment;
|
|
3410
|
+
/** @internal */
|
|
3411
|
+
declare function isIndexTuple(segment: PathSegment): segment is IndexTuple;
|
|
3412
|
+
/**
|
|
3413
|
+
* Assert that a given object is a portable-text text-block type object
|
|
3414
|
+
*
|
|
3415
|
+
* @remarks
|
|
3416
|
+
* * The `markDefs` and `style` property of a block is optional.
|
|
3417
|
+
* * Block types can be named, so expect anything of the _type property.
|
|
3418
|
+
*
|
|
3419
|
+
* @alpha
|
|
3420
|
+
*/
|
|
3421
|
+
declare function isPortableTextTextBlock<T = PortableTextSpan | PortableTextObject>(value: unknown): value is PortableTextTextBlock<T>;
|
|
3422
|
+
/**
|
|
3423
|
+
* Assert that a given object is a portable-text span-type object
|
|
3424
|
+
*
|
|
3425
|
+
* @remarks
|
|
3426
|
+
* The `marks` property of a block is optional.
|
|
3427
|
+
*
|
|
3428
|
+
* @alpha
|
|
3429
|
+
*/
|
|
3430
|
+
declare function isPortableTextSpan(value: unknown): value is PortableTextSpan;
|
|
3431
|
+
/**
|
|
3432
|
+
* Assert that a given object is a portable-text list-text-block-type object
|
|
3433
|
+
*
|
|
3434
|
+
* @remarks
|
|
3435
|
+
* Uses `isPortableTextTextBlock` and checks for `listItem` and `level`
|
|
3436
|
+
*
|
|
3437
|
+
* @see isPortableTextTextBlock
|
|
3438
|
+
*
|
|
3439
|
+
* @alpha
|
|
3440
|
+
*/
|
|
3441
|
+
declare function isPortableTextListBlock<T = PortableTextSpan | PortableTextObject>(value: unknown): value is PortableTextTextBlock<T>;
|
|
3442
|
+
/** @internal */
|
|
3443
|
+
declare function isReference(reference: unknown): reference is Reference;
|
|
3444
|
+
/**
|
|
3445
|
+
* Returns wether or not the given type is a document type
|
|
3446
|
+
* (eg that it was defined as `type: 'document'`)
|
|
3447
|
+
*
|
|
3448
|
+
* @param type - Schema type to test
|
|
3449
|
+
* @returns True if type is a document type, false otherwise
|
|
3450
|
+
*
|
|
3451
|
+
* @public
|
|
3452
|
+
*/
|
|
3453
|
+
declare function isDocumentSchemaType(type: unknown): type is ObjectSchemaType;
|
|
3454
|
+
/** @internal */
|
|
3455
|
+
declare function isObjectSchemaType(type: unknown): type is ObjectSchemaType;
|
|
3456
|
+
/** @internal */
|
|
3457
|
+
declare function isArraySchemaType(type: unknown): type is ArraySchemaType;
|
|
3458
|
+
/** @internal */
|
|
3459
|
+
declare function isArrayOfBlocksSchemaType(type: unknown): type is ArraySchemaType<ObjectSchemaType>;
|
|
3460
|
+
/** @internal */
|
|
3461
|
+
declare function isArrayOfObjectsSchemaType(type: unknown): type is ArraySchemaType<ObjectSchemaType>;
|
|
3462
|
+
/** @internal */
|
|
3463
|
+
declare function isArrayOfPrimitivesSchemaType(type: unknown): type is ArraySchemaType;
|
|
3464
|
+
/** @internal */
|
|
3465
|
+
declare function isArrayOfStringsSchemaType(type: unknown): type is ArraySchemaType<string>;
|
|
3466
|
+
/** @internal */
|
|
3467
|
+
declare function isBooleanSchemaType(type: unknown): type is BooleanSchemaType;
|
|
3468
|
+
/** @internal */
|
|
3469
|
+
declare function isStringSchemaType(type: unknown): type is StringSchemaType;
|
|
3470
|
+
/** @internal */
|
|
3471
|
+
declare function isDateTimeSchemaType(type: unknown): type is StringSchemaType;
|
|
3472
|
+
/** @internal */
|
|
3473
|
+
declare function isNumberSchemaType(type: unknown): type is NumberSchemaType;
|
|
3474
|
+
/** @internal */
|
|
3475
|
+
declare function isPrimitiveSchemaType(type: unknown): type is BooleanSchemaType | StringSchemaType | NumberSchemaType;
|
|
3476
|
+
/** @internal */
|
|
3477
|
+
declare function isReferenceSchemaType(type: unknown): type is ReferenceSchemaType;
|
|
3478
|
+
/** @internal */
|
|
3479
|
+
declare function isImageSchemaType(type: unknown): type is ImageSchemaType;
|
|
3480
|
+
/** @internal */
|
|
3481
|
+
declare function isFileSchemaType(type: unknown): type is FileSchemaType;
|
|
3482
|
+
/** @internal */
|
|
3483
|
+
declare function isDeprecatedSchemaType<TSchemaType extends BaseSchemaType>(type: TSchemaType): type is DeprecatedSchemaType<TSchemaType>;
|
|
3484
|
+
/** @internal */
|
|
3485
|
+
declare function isDeprecationConfiguration(type: unknown): type is DeprecationConfiguration;
|
|
3486
|
+
/** @internal */
|
|
3487
|
+
declare function isCrossDatasetReferenceSchemaType(type: unknown): type is CrossDatasetReferenceSchemaType;
|
|
3488
|
+
/** @internal */
|
|
3489
|
+
declare function isTitledListValue(item: unknown): item is TitledListValue;
|
|
3490
|
+
/** @internal */
|
|
3491
|
+
declare function isSpanSchemaType(type: unknown): type is SpanSchemaType;
|
|
3492
|
+
/** @internal */
|
|
3493
|
+
declare function isBlockSchemaType(type: unknown): type is BlockSchemaType;
|
|
3494
|
+
/** @internal */
|
|
3495
|
+
declare function isBlockStyleObjectField(field: unknown): field is BlockStyleObjectField;
|
|
3496
|
+
/** @internal */
|
|
3497
|
+
declare function isBlockListObjectField(field: unknown): field is BlockListObjectField;
|
|
3498
|
+
/** @internal */
|
|
3499
|
+
declare function isBlockChildrenObjectField(field: unknown): field is BlockChildrenObjectField;
|
|
3522
3500
|
/**
|
|
3523
3501
|
* @internal
|
|
3524
3502
|
*/
|
|
3525
3503
|
declare function isSearchStrategy(maybeSearchStrategy: unknown): maybeSearchStrategy is SearchStrategy;
|
|
3504
|
+
/**
|
|
3505
|
+
* Checks whether the given `thing` is a slug, eg an object with a `current` string property.
|
|
3506
|
+
*
|
|
3507
|
+
* @param thing - The thing to check
|
|
3508
|
+
* @returns True if slug, false otherwise
|
|
3509
|
+
* @public
|
|
3510
|
+
*/
|
|
3511
|
+
declare function isSlug(thing: unknown): thing is Slug;
|
|
3512
|
+
/** @internal */
|
|
3513
|
+
declare function isCreateSquashedMutation(mutation: Mutation | TransactionLogMutation): mutation is CreateSquashedMutation;
|
|
3526
3514
|
/** @internal */
|
|
3527
3515
|
interface UploadState {
|
|
3528
3516
|
progress: number;
|
|
@@ -3538,5 +3526,17 @@ interface UploadState {
|
|
|
3538
3526
|
};
|
|
3539
3527
|
previewImage?: string;
|
|
3540
3528
|
}
|
|
3541
|
-
|
|
3529
|
+
/** @internal */
|
|
3530
|
+
declare function isValidationError(node: FormNodeValidation): node is FormNodeValidation & {
|
|
3531
|
+
level: 'error';
|
|
3532
|
+
};
|
|
3533
|
+
/** @internal */
|
|
3534
|
+
declare function isValidationWarning(node: FormNodeValidation): node is FormNodeValidation & {
|
|
3535
|
+
level: 'warning';
|
|
3536
|
+
};
|
|
3537
|
+
/** @internal */
|
|
3538
|
+
declare function isValidationInfo(node: FormNodeValidation): node is FormNodeValidation & {
|
|
3539
|
+
level: 'info';
|
|
3540
|
+
};
|
|
3541
|
+
export { type ArrayActionName, type ArrayDefinition, type ArrayOfEntry, type ArrayOfType, type ArrayOptions, type ArrayRule, type ArraySchemaType, type ArraySchemaTypeOf, type Asset, type AssetFromSource, type AssetMetadataType, type AssetSchemaTypeOptions, type AssetSource, type AssetSourceComponentAction, type AssetSourceComponentProps, type AssetSourceOpenInSourceResult, type AssetSourceSpec, type AssetSourceUploadEvent, type AssetSourceUploadEventAbort, type AssetSourceUploadEventAllComplete, type AssetSourceUploadEventError, type AssetSourceUploadEventProgress, type AssetSourceUploadEventStatus, type AssetSourceUploadFile, type AssetSourceUploadSubscriber, type AssetSourceUploader, type AssetSourceUploaderClass, type AutocompleteString, type BaseSchemaDefinition, type BaseSchemaType, type BaseSchemaTypeOptions, type BlockAnnotationDefinition, type BlockChildrenObjectField, type BlockDecoratorDefinition, type BlockDefinition, type BlockListDefinition, type BlockListObjectField, type BlockMarksDefinition, type BlockOptions, type BlockRule, type BlockSchemaType, type BlockStyleDefinition, type BlockStyleObjectField, type BooleanDefinition, type BooleanOptions, type BooleanRule, type BooleanSchemaType, type CanvasAppOptions, type CanvasNotificationPayload, type CollapseOptions, type ConditionalIndexAccess, type ConditionalProperty, type ConditionalPropertyCallback, type ConditionalPropertyCallbackContext, type CreateIfNotExistsMutation, type CreateMutation, type CreateOrReplaceMutation, type CreateSquashedMutation, type CrossDatasetReferenceDefinition, type CrossDatasetReferenceFilterResolver, type CrossDatasetReferenceFilterSearchOptions, type CrossDatasetReferenceSchemaType, type CrossDatasetReferenceValue, type CrossDatasetType, type CurrentUser, type CurrentUserAttribute, type CustomValidator, type CustomValidatorResult, type DashboardNotificationPayload, type DateDefinition, type DateOptions, type DateRule, type DatetimeDefinition, type DatetimeOptions, type DatetimeRule, type DefineArrayMemberBase, type DefineSchemaBase, type DefineSchemaOptions, type DefineSchemaType, type DeleteMutation, type DeprecatedProperty, type DeprecatedSchemaType, type DeprecationConfiguration, type DocumentDefinition, type DocumentOptions, type DocumentRule, type DocumentSystem, type DocumentSystemRef, type EmailDefinition, type EmailOptions, type EmailRule, type EmptyProps, type EnumListProps, type FieldDefinition, type FieldDefinitionBase, type FieldGroup, type FieldGroupDefinition, type FieldReference, type FieldRules, type Fieldset, type FieldsetDefinition, type File, type FileAsset, type FileDefinition, type FileOptions, type FileRule, type FileSchemaType, type FileValue, type FormNodeValidation, type GeopointDefinition, type GeopointOptions, type GeopointRule, type GeopointValue, type GlobalDocumentReferenceDefinition, type GlobalDocumentReferenceFilterResolver, type GlobalDocumentReferenceFilterSearchOptions, type GlobalDocumentReferenceSchemaType, type GlobalDocumentReferenceType, type GlobalDocumentReferenceValue, type HotspotOptions, type HotspotPreview, type I18nTextRecord, type I18nTitledListValue, type Image, type ImageAsset, type ImageCrop, type ImageDefinition, type ImageDimensions, type ImageHotspot, type ImageMetadata, type ImageMetadataType, type ImageOptions, type ImagePalette, type ImageRule, type ImageSchemaType, type ImageSwatch, type ImageUrlAutoMode, type ImageUrlCropMode, type ImageUrlFitMode, type ImageUrlFormat, type ImageUrlOrientation, type ImageUrlParams, type ImageValue, type IndexTuple, type InitialValueProperty, type InitialValueResolver, type InitialValueResolverContext, type InlineFieldDefinition, type InsertMenuOptions, type InsertPatch, type IntrinsicArrayOfBase, type IntrinsicArrayOfDefinition, type IntrinsicBase, type IntrinsicDefinitions, type IntrinsicTypeName, type KeyedObject, type KeyedSegment, type LocalizedValidationMessages, MEDIA_LIBRARY_ASSET_ASPECT_TYPE_NAME, type MaybeAllowUnknownProps, type MaybePreview, type MediaAssetTypes, type MediaLibraryAssetAspectDefinition, type MediaLibraryAssetAspectDocument, type MediaLibraryAssetAspectSupportedFieldDefinitions, type MediaLibraryAssetAspectTypeName, type MediaLibraryAssetType, type MediaLibraryFilter, type MediaLibraryOptions, type MediaValidationValue, type MediaValidator, type MendozaEffectPair, type MendozaPatch, type ModalOptions, type MultiFieldSet, type MultipleMutationResult, type Mutation, type MutationOperationName, type MutationSelection, type NarrowPreview, type NumberDefinition, type NumberOptions, type NumberRule, type NumberSchemaType, type ObjectDefinition, type ObjectField, type ObjectFieldType, type ObjectOptions, type ObjectRule, type ObjectSchemaType, type ObjectSchemaTypeWithOptions, type PatchMutation, type PatchMutationOperation, type PatchOperations, type Path, type PathSegment, type PortableTextBlock, type PortableTextChild, type PortableTextListBlock, type PortableTextObject, type PortableTextSpan, type PortableTextTextBlock, type PrepareViewOptions, type PreviewConfig, type PreviewValue, type Reference, type ReferenceBaseOptions, type ReferenceDefinition, type ReferenceFilterOptions, type ReferenceFilterQueryOptions, type ReferenceFilterResolver, type ReferenceFilterResolverContext, type ReferenceFilterResolverOptions, type ReferenceFilterSearchOptions, type ReferenceOptions, type ReferenceRule, type ReferenceSchemaType, type ReferenceTo, type ReferenceTypeFilter, type ReferenceTypeFilterContext, type ReferenceTypeOption, type ReferenceValue, type Role, type Rule, type RuleBuilder, type RuleClass, type RuleDef, type RuleSpec, type RuleSpecConstraint, type RuleTypeConstraint, type SanityCreateOptions, type SanityDocument, type SanityDocumentLike, type Schema, type SchemaType, type SchemaTypeDefinition, type SchemaValidationError, type SchemaValidationProblem, type SchemaValidationProblemGroup, type SchemaValidationProblemPath, type SchemaValidationValue, type SchemaValidationWarning, type SearchConfiguration, type SearchStrategy, type SingleFieldSet, type SingleMutationResult, type Slug, type SlugDefinition, type SlugIsUniqueValidator, type SlugOptions, type SlugParent, type SlugRule, type SlugSchemaType, type SlugSourceContext, type SlugSourceFn, type SlugValidationContext, type SlugValue, type SlugifierFn, type SortOrdering, type SortOrderingItem, type SpanMarksObjectField, type SpanSchemaType, type SpanTextObjectField, type StrictDefinition, type StrictVersionLayeringOptions, type StringDefinition, type StringOptions, type StringRule, type StringSchemaType, type StudioNotificationPayload, type SwatchName, type TextDefinition, type TextOptions, type TextRule, type TextSchemaType, type TitledListValue, type TransactionLogEvent, type TransactionLogEventWithEffects, type TransactionLogEventWithMutations, type TransactionLogMutation, type TypeAliasDefinition, type TypeReference, type TypedObject, type UploadState, type UriValidationOptions, type UrlDefinition, type UrlOptions, type UrlRule, type User, type UserAttributeType, type UserAttributeValue, type ValidationBuilder, type ValidationContext, type ValidationError, type ValidationErrorClass, type ValidationErrorOptions, type ValidationMarker, type Validator, type Validators, type WeakCrossDatasetReferenceValue, type WeakGlobalDocumentReferenceValue, type WeakReference, type WidenInitialValue, type WidenValidation, defineArrayMember, defineAssetAspect, defineField, defineType, isArrayOfBlocksSchemaType, isArrayOfObjectsSchemaType, isArrayOfPrimitivesSchemaType, isArrayOfStringsSchemaType, isArraySchemaType, isAssetAspect, isBlockChildrenObjectField, isBlockListObjectField, isBlockSchemaType, isBlockStyleObjectField, isBooleanSchemaType, isCreateIfNotExistsMutation, isCreateMutation, isCreateOrReplaceMutation, isCreateSquashedMutation, isCrossDatasetReference, isCrossDatasetReferenceSchemaType, isDateTimeSchemaType, isDeleteMutation, isDeprecatedSchemaType, isDeprecationConfiguration, isDocumentSchemaType, isFileSchemaType, isGlobalDocumentReference, isImage, isImageSchemaType, isIndexSegment, isIndexTuple, isKeySegment, isKeyedObject, isNumberSchemaType, isObjectSchemaType, isPatchMutation, isPortableTextListBlock, isPortableTextSpan, isPortableTextTextBlock, isPrimitiveSchemaType, isReference, isReferenceSchemaType, isSanityDocument, isSearchStrategy, isSlug, isSpanSchemaType, isStringSchemaType, isTitledListValue, isTypedObject, isValidationError, isValidationErrorMarker, isValidationInfo, isValidationInfoMarker, isValidationWarning, isValidationWarningMarker, searchStrategies, typed };
|
|
3542
3542
|
//# sourceMappingURL=index.d.ts.map
|