@sanity/types 6.1.1-next.1 → 6.2.0-next.11
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 +33 -1
- package/package.json +4 -7
package/lib/index.d.ts
CHANGED
|
@@ -38,6 +38,38 @@ interface KeyedObject {
|
|
|
38
38
|
[key: string]: unknown;
|
|
39
39
|
_key: string;
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
interface DocumentSystemRef {
|
|
45
|
+
_ref: string;
|
|
46
|
+
_weak: true;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
interface DocumentSystem {
|
|
52
|
+
/**
|
|
53
|
+
* It will be empty for the group document (aka published document)
|
|
54
|
+
*/
|
|
55
|
+
bundleId?: 'drafts' | (string & {});
|
|
56
|
+
/**
|
|
57
|
+
* A weak reference to the release document that the version belongs to.
|
|
58
|
+
*/
|
|
59
|
+
release?: DocumentSystemRef;
|
|
60
|
+
/**
|
|
61
|
+
* A weak reference to the variant document that the version belongs to.
|
|
62
|
+
*/
|
|
63
|
+
variant?: DocumentSystemRef;
|
|
64
|
+
/**
|
|
65
|
+
* A weak reference to the group document (aka published document).
|
|
66
|
+
*/
|
|
67
|
+
group: DocumentSystemRef;
|
|
68
|
+
/**
|
|
69
|
+
* Available only for version documents.
|
|
70
|
+
*/
|
|
71
|
+
scopeId?: string;
|
|
72
|
+
}
|
|
41
73
|
/**
|
|
42
74
|
* @internal
|
|
43
75
|
*/
|
|
@@ -3457,4 +3489,4 @@ interface UploadState {
|
|
|
3457
3489
|
};
|
|
3458
3490
|
previewImage?: string;
|
|
3459
3491
|
}
|
|
3460
|
-
export { ArrayActionName, ArrayDefinition, ArrayOfEntry, ArrayOfType, ArrayOptions, ArrayRule, ArraySchemaType, ArraySchemaTypeOf, Asset, AssetFromSource, AssetMetadataType, AssetSchemaTypeOptions, AssetSource, AssetSourceComponentAction, AssetSourceComponentProps, AssetSourceOpenInSourceResult, AssetSourceSpec, AssetSourceUploadEvent, AssetSourceUploadEventAbort, AssetSourceUploadEventAllComplete, AssetSourceUploadEventError, AssetSourceUploadEventProgress, AssetSourceUploadEventStatus, AssetSourceUploadFile, AssetSourceUploadSubscriber, AssetSourceUploader, AssetSourceUploaderClass, AutocompleteString, BaseSchemaDefinition, BaseSchemaType, BaseSchemaTypeOptions, BlockAnnotationDefinition, BlockChildrenObjectField, BlockDecoratorDefinition, BlockDefinition, BlockListDefinition, BlockListObjectField, BlockMarksDefinition, BlockOptions, BlockRule, BlockSchemaType, BlockStyleDefinition, BlockStyleObjectField, BooleanDefinition, BooleanOptions, BooleanRule, BooleanSchemaType, CanvasAppOptions, CanvasNotificationPayload, CollapseOptions, ConditionalIndexAccess, ConditionalProperty, ConditionalPropertyCallback, ConditionalPropertyCallbackContext, CreateIfNotExistsMutation, CreateMutation, CreateOrReplaceMutation, CreateSquashedMutation, CrossDatasetReferenceDefinition, CrossDatasetReferenceFilterResolver, CrossDatasetReferenceFilterSearchOptions, CrossDatasetReferenceSchemaType, CrossDatasetReferenceValue, CrossDatasetType, CurrentUser, CustomValidator, CustomValidatorResult, DashboardNotificationPayload, DateDefinition, DateOptions, DateRule, DatetimeDefinition, DatetimeOptions, DatetimeRule, DefineArrayMemberBase, DefineSchemaBase, DefineSchemaOptions, DefineSchemaType, DeleteMutation, DeprecatedProperty, DeprecatedSchemaType, DeprecationConfiguration, DocumentDefinition, DocumentOptions, DocumentRule, EmailDefinition, EmailOptions, EmailRule, EmptyProps, EnumListProps, FieldDefinition, FieldDefinitionBase, FieldGroup, FieldGroupDefinition, FieldReference, FieldRules, Fieldset, FieldsetDefinition, File, FileAsset, FileDefinition, FileOptions, FileRule, FileSchemaType, FileValue, FormNodeValidation, GeopointDefinition, GeopointOptions, GeopointRule, GeopointValue, GlobalDocumentReferenceDefinition, GlobalDocumentReferenceFilterResolver, GlobalDocumentReferenceFilterSearchOptions, GlobalDocumentReferenceSchemaType, GlobalDocumentReferenceType, GlobalDocumentReferenceValue, HotspotOptions, HotspotPreview, I18nTextRecord, I18nTitledListValue, Image, ImageAsset, ImageCrop, ImageDefinition, ImageDimensions, ImageHotspot, ImageMetadata, ImageMetadataType, ImageOptions, ImagePalette, ImageRule, ImageSchemaType, ImageSwatch, ImageUrlAutoMode, ImageUrlCropMode, ImageUrlFitMode, ImageUrlFormat, ImageUrlOrientation, ImageUrlParams, ImageValue, IndexTuple, InitialValueProperty, InitialValueResolver, InitialValueResolverContext, InlineFieldDefinition, type InsertMenuOptions, InsertPatch, IntrinsicArrayOfBase, IntrinsicArrayOfDefinition, IntrinsicBase, IntrinsicDefinitions, IntrinsicTypeName, KeyedObject, KeyedSegment, LocalizedValidationMessages, MEDIA_LIBRARY_ASSET_ASPECT_TYPE_NAME, MaybeAllowUnknownProps, MaybePreview, MediaAssetTypes, MediaLibraryAssetAspectDefinition, MediaLibraryAssetAspectDocument, MediaLibraryAssetAspectSupportedFieldDefinitions, MediaLibraryAssetAspectTypeName, MediaLibraryAssetType, MediaLibraryFilter, MediaLibraryOptions, MediaValidationValue, MediaValidator, MendozaEffectPair, MendozaPatch, ModalOptions, MultiFieldSet, MultipleMutationResult, Mutation, MutationOperationName, MutationSelection, NarrowPreview, NumberDefinition, NumberOptions, NumberRule, NumberSchemaType, ObjectDefinition, ObjectField, ObjectFieldType, ObjectOptions, ObjectRule, ObjectSchemaType, ObjectSchemaTypeWithOptions, PatchMutation, PatchMutationOperation, PatchOperations, Path, PathSegment, PortableTextBlock, PortableTextChild, PortableTextListBlock, PortableTextObject, PortableTextSpan, PortableTextTextBlock, PrepareViewOptions, PreviewConfig, PreviewValue, Reference, ReferenceBaseOptions, ReferenceDefinition, ReferenceFilterOptions, ReferenceFilterQueryOptions, ReferenceFilterResolver, ReferenceFilterResolverContext, ReferenceFilterResolverOptions, ReferenceFilterSearchOptions, ReferenceOptions, ReferenceRule, ReferenceSchemaType, ReferenceTo, ReferenceTypeFilter, ReferenceTypeFilterContext, ReferenceTypeOption, ReferenceValue, Role, Rule, RuleBuilder, RuleClass, RuleDef, RuleSpec, RuleSpecConstraint, RuleTypeConstraint, SanityCreateOptions, SanityDocument, SanityDocumentLike, Schema, SchemaType, SchemaTypeDefinition, SchemaValidationError, SchemaValidationProblem, SchemaValidationProblemGroup, SchemaValidationProblemPath, SchemaValidationValue, SchemaValidationWarning, SearchConfiguration, SearchStrategy, SingleFieldSet, SingleMutationResult, Slug, SlugDefinition, SlugIsUniqueValidator, SlugOptions, SlugParent, SlugRule, SlugSchemaType, SlugSourceContext, SlugSourceFn, SlugValidationContext, SlugValue, SlugifierFn, SortOrdering, SortOrderingItem, SpanMarksObjectField, SpanSchemaType, SpanTextObjectField, StrictDefinition, StrictVersionLayeringOptions, StringDefinition, StringOptions, StringRule, StringSchemaType, StudioNotificationPayload, SwatchName, TextDefinition, TextOptions, TextRule, TextSchemaType, TitledListValue, TransactionLogEvent, TransactionLogEventWithEffects, TransactionLogEventWithMutations, TransactionLogMutation, TypeAliasDefinition, TypeReference, TypedObject, UploadState, UriValidationOptions, UrlDefinition, UrlOptions, UrlRule, User, ValidationBuilder, ValidationContext, ValidationError, ValidationErrorClass, ValidationErrorOptions, ValidationMarker, Validator, Validators, WeakCrossDatasetReferenceValue, WeakGlobalDocumentReferenceValue, WeakReference, WidenInitialValue, 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 };
|
|
3492
|
+
export { ArrayActionName, ArrayDefinition, ArrayOfEntry, ArrayOfType, ArrayOptions, ArrayRule, ArraySchemaType, ArraySchemaTypeOf, Asset, AssetFromSource, AssetMetadataType, AssetSchemaTypeOptions, AssetSource, AssetSourceComponentAction, AssetSourceComponentProps, AssetSourceOpenInSourceResult, AssetSourceSpec, AssetSourceUploadEvent, AssetSourceUploadEventAbort, AssetSourceUploadEventAllComplete, AssetSourceUploadEventError, AssetSourceUploadEventProgress, AssetSourceUploadEventStatus, AssetSourceUploadFile, AssetSourceUploadSubscriber, AssetSourceUploader, AssetSourceUploaderClass, AutocompleteString, BaseSchemaDefinition, BaseSchemaType, BaseSchemaTypeOptions, BlockAnnotationDefinition, BlockChildrenObjectField, BlockDecoratorDefinition, BlockDefinition, BlockListDefinition, BlockListObjectField, BlockMarksDefinition, BlockOptions, BlockRule, BlockSchemaType, BlockStyleDefinition, BlockStyleObjectField, BooleanDefinition, BooleanOptions, BooleanRule, BooleanSchemaType, CanvasAppOptions, CanvasNotificationPayload, CollapseOptions, ConditionalIndexAccess, ConditionalProperty, ConditionalPropertyCallback, ConditionalPropertyCallbackContext, CreateIfNotExistsMutation, CreateMutation, CreateOrReplaceMutation, CreateSquashedMutation, CrossDatasetReferenceDefinition, CrossDatasetReferenceFilterResolver, CrossDatasetReferenceFilterSearchOptions, CrossDatasetReferenceSchemaType, CrossDatasetReferenceValue, CrossDatasetType, CurrentUser, CustomValidator, CustomValidatorResult, DashboardNotificationPayload, DateDefinition, DateOptions, DateRule, DatetimeDefinition, DatetimeOptions, DatetimeRule, DefineArrayMemberBase, DefineSchemaBase, DefineSchemaOptions, DefineSchemaType, DeleteMutation, DeprecatedProperty, DeprecatedSchemaType, DeprecationConfiguration, DocumentDefinition, DocumentOptions, DocumentRule, DocumentSystem, DocumentSystemRef, EmailDefinition, EmailOptions, EmailRule, EmptyProps, EnumListProps, FieldDefinition, FieldDefinitionBase, FieldGroup, FieldGroupDefinition, FieldReference, FieldRules, Fieldset, FieldsetDefinition, File, FileAsset, FileDefinition, FileOptions, FileRule, FileSchemaType, FileValue, FormNodeValidation, GeopointDefinition, GeopointOptions, GeopointRule, GeopointValue, GlobalDocumentReferenceDefinition, GlobalDocumentReferenceFilterResolver, GlobalDocumentReferenceFilterSearchOptions, GlobalDocumentReferenceSchemaType, GlobalDocumentReferenceType, GlobalDocumentReferenceValue, HotspotOptions, HotspotPreview, I18nTextRecord, I18nTitledListValue, Image, ImageAsset, ImageCrop, ImageDefinition, ImageDimensions, ImageHotspot, ImageMetadata, ImageMetadataType, ImageOptions, ImagePalette, ImageRule, ImageSchemaType, ImageSwatch, ImageUrlAutoMode, ImageUrlCropMode, ImageUrlFitMode, ImageUrlFormat, ImageUrlOrientation, ImageUrlParams, ImageValue, IndexTuple, InitialValueProperty, InitialValueResolver, InitialValueResolverContext, InlineFieldDefinition, type InsertMenuOptions, InsertPatch, IntrinsicArrayOfBase, IntrinsicArrayOfDefinition, IntrinsicBase, IntrinsicDefinitions, IntrinsicTypeName, KeyedObject, KeyedSegment, LocalizedValidationMessages, MEDIA_LIBRARY_ASSET_ASPECT_TYPE_NAME, MaybeAllowUnknownProps, MaybePreview, MediaAssetTypes, MediaLibraryAssetAspectDefinition, MediaLibraryAssetAspectDocument, MediaLibraryAssetAspectSupportedFieldDefinitions, MediaLibraryAssetAspectTypeName, MediaLibraryAssetType, MediaLibraryFilter, MediaLibraryOptions, MediaValidationValue, MediaValidator, MendozaEffectPair, MendozaPatch, ModalOptions, MultiFieldSet, MultipleMutationResult, Mutation, MutationOperationName, MutationSelection, NarrowPreview, NumberDefinition, NumberOptions, NumberRule, NumberSchemaType, ObjectDefinition, ObjectField, ObjectFieldType, ObjectOptions, ObjectRule, ObjectSchemaType, ObjectSchemaTypeWithOptions, PatchMutation, PatchMutationOperation, PatchOperations, Path, PathSegment, PortableTextBlock, PortableTextChild, PortableTextListBlock, PortableTextObject, PortableTextSpan, PortableTextTextBlock, PrepareViewOptions, PreviewConfig, PreviewValue, Reference, ReferenceBaseOptions, ReferenceDefinition, ReferenceFilterOptions, ReferenceFilterQueryOptions, ReferenceFilterResolver, ReferenceFilterResolverContext, ReferenceFilterResolverOptions, ReferenceFilterSearchOptions, ReferenceOptions, ReferenceRule, ReferenceSchemaType, ReferenceTo, ReferenceTypeFilter, ReferenceTypeFilterContext, ReferenceTypeOption, ReferenceValue, Role, Rule, RuleBuilder, RuleClass, RuleDef, RuleSpec, RuleSpecConstraint, RuleTypeConstraint, SanityCreateOptions, SanityDocument, SanityDocumentLike, Schema, SchemaType, SchemaTypeDefinition, SchemaValidationError, SchemaValidationProblem, SchemaValidationProblemGroup, SchemaValidationProblemPath, SchemaValidationValue, SchemaValidationWarning, SearchConfiguration, SearchStrategy, SingleFieldSet, SingleMutationResult, Slug, SlugDefinition, SlugIsUniqueValidator, SlugOptions, SlugParent, SlugRule, SlugSchemaType, SlugSourceContext, SlugSourceFn, SlugValidationContext, SlugValue, SlugifierFn, SortOrdering, SortOrderingItem, SpanMarksObjectField, SpanSchemaType, SpanTextObjectField, StrictDefinition, StrictVersionLayeringOptions, StringDefinition, StringOptions, StringRule, StringSchemaType, StudioNotificationPayload, SwatchName, TextDefinition, TextOptions, TextRule, TextSchemaType, TitledListValue, TransactionLogEvent, TransactionLogEventWithEffects, TransactionLogEventWithMutations, TransactionLogMutation, TypeAliasDefinition, TypeReference, TypedObject, UploadState, UriValidationOptions, UrlDefinition, UrlOptions, UrlRule, User, ValidationBuilder, ValidationContext, ValidationError, ValidationErrorClass, ValidationErrorOptions, ValidationMarker, Validator, Validators, WeakCrossDatasetReferenceValue, WeakGlobalDocumentReferenceValue, WeakReference, WidenInitialValue, 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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/types",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0-next.11",
|
|
4
4
|
"description": "Type definitions for common Sanity data structures",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cms",
|
|
@@ -43,15 +43,13 @@
|
|
|
43
43
|
"@types/react": "^19.2.17",
|
|
44
44
|
"@typescript/native-preview": "beta",
|
|
45
45
|
"@vitejs/plugin-react": "^6.0.2",
|
|
46
|
-
"eslint": "^9.39.4",
|
|
47
46
|
"react": "^19.2.7",
|
|
48
47
|
"rimraf": "^6.1.3",
|
|
49
48
|
"vite": "^8.0.16",
|
|
50
49
|
"vitest": "^4.1.8",
|
|
51
|
-
"@repo/
|
|
52
|
-
"@repo/tsconfig": "6.
|
|
53
|
-
"@repo/
|
|
54
|
-
"@repo/package.config": "6.1.1-next.1+8575f65e1c"
|
|
50
|
+
"@repo/package.config": "6.2.0-next.11+4a56294cdc",
|
|
51
|
+
"@repo/tsconfig": "6.2.0-next.11+4a56294cdc",
|
|
52
|
+
"@repo/test-config": "6.2.0-next.11+4a56294cdc"
|
|
55
53
|
},
|
|
56
54
|
"peerDependencies": {
|
|
57
55
|
"@types/react": "^19.2"
|
|
@@ -64,7 +62,6 @@
|
|
|
64
62
|
"build": "pkg-utils build --strict --check --clean",
|
|
65
63
|
"check:types": "(cd ../../.. && tsgo --project packages/@sanity/types/tsconfig.lib.json --erasableSyntaxOnly)",
|
|
66
64
|
"clean": "rimraf lib",
|
|
67
|
-
"lint": "eslint .",
|
|
68
65
|
"test": "vitest run",
|
|
69
66
|
"test:watch": "vitest watch",
|
|
70
67
|
"watch": "pkg-utils watch"
|