import { FieldDefinition } from "@sanity/types"; declare const internalGroqTypeReferenceTo: unique symbol; type SanitySystem = { _type: 'sanity.system'; createdBy?: string; }; type SanityAssetReference = { _ref: string; _type: 'reference'; _weak?: boolean; [internalGroqTypeReferenceTo]?: 'sanity.asset'; }; type SanityAssetUploadSession = { _id: string; _type: 'sanity.asset.upload-session'; _createdAt: string; _updatedAt: string; _rev: string; title: string; assets?: Array<{ _key: string; } & SanityAssetReference>; _system?: SanitySystem; }; type SanityDirectoryReference = { _ref: string; _type: 'reference'; _weak?: boolean; [internalGroqTypeReferenceTo]?: 'sanity.directory'; }; type SanityTreeReference = { _ref: string; _type: 'reference'; _weak?: boolean; [internalGroqTypeReferenceTo]?: 'sanity.tree'; }; type SanityAssetCollection = { _id: string; _type: 'sanity.asset.collection'; _createdAt: string; _updatedAt: string; _rev: string; title: string; description?: string; parent?: SanityDirectoryReference | SanityTreeReference; rootDirectory?: SanityDirectoryReference; assets?: Array<{ _key: string; } & SanityAssetReference>; _system?: SanitySystem; }; type SanityVideoMetadataRendition = { _type: 'sanity.videoMetadata.rendition'; name: string; resolution: string; }; type SanityVideoMetadataPlayback = { _type: 'sanity.videoMetadata.playback'; _id: string; name?: string; policy: string; }; type SanityAssetSubtitleReference = { _ref: string; _type: 'reference'; _weak?: boolean; [internalGroqTypeReferenceTo]?: 'sanity.asset.subtitle'; }; type SanityVideoMetadata = { _type: 'sanity.videoMetadata'; aspectRatio?: string; duration?: number; framerate?: number; playbacks?: Array<{ _key: string; } & SanityVideoMetadataPlayback>; renditions?: Array<{ _key: string; } & SanityVideoMetadataRendition>; subtitles?: Array<{ _key: string; } & SanityAssetSubtitleReference>; }; type SanityImageExifTags = { _type: 'sanity.imageExifTags'; Make?: string; Model?: string; Orientation?: number; XResolution?: number; YResolution?: number; ResolutionUnit?: number; Software?: string; ModifyDate?: string; ExifOffset?: number; GPSInfo?: number; }; type SanityImageExifMetadata = { _type: 'sanity.imageExifMetadata'; ApertureValue?: number; BrightnessValue?: number; DateTimeDigitized?: string; DateTimeOriginal?: string; ExposureBiasValue?: number; ExposureMode?: number; ExposureProgram?: number; ExposureTime?: number; FNumber?: number; Flash?: number; FocalLength?: number; FocalLengthIn35mmFormat?: number; ISO?: number; LensModel?: string; WhiteBalance?: number; GPSLatitude?: number; GPSLongitude?: number; GPSAltitude?: number; Copyright?: string; Artist?: string; }; type SanityImagePaletteSwatch = { _type: 'sanity.imagePaletteSwatch'; background?: string; foreground?: string; population?: number; title?: string; }; type SanityImagePalette = { _type: 'sanity.imagePalette'; darkMuted?: SanityImagePaletteSwatch; lightVibrant?: SanityImagePaletteSwatch; darkVibrant?: SanityImagePaletteSwatch; vibrant?: SanityImagePaletteSwatch; dominant?: SanityImagePaletteSwatch; lightMuted?: SanityImagePaletteSwatch; muted?: SanityImagePaletteSwatch; }; type SanityImageDimensions = { _type: 'sanity.imageDimensions'; height: number; width: number; aspectRatio: number; }; type SanityImageMetadata = { _type: 'sanity.imageMetadata'; location?: Geopoint; dimensions: SanityImageDimensions; exif?: SanityImageExifMetadata; image?: SanityImageExifTags; palette: SanityImagePalette; lqip: string; blurHash: string; hasAlpha: boolean; isOpaque: boolean; }; type SanityAssetVersionReference = { _ref: string; _type: 'reference'; _weak?: boolean; [internalGroqTypeReferenceTo]?: 'sanity.asset.version'; }; type SanityAsset = { _id: string; _type: 'sanity.asset'; _createdAt: string; _updatedAt: string; _rev: string; title?: string; aspects?: Record; currentVersion: SanityAssetVersionReference; versions: Array<{ _key: string; } & SanityAssetVersion>; assetType: 'sanity.imageAsset' | 'sanity.videoAsset' | 'sanity.fileAsset'; cdnAccessPolicy: 'public' | 'private'; parent?: SanityDirectoryReference | SanityTreeReference; rootDirectory?: SanityDirectoryReference; url?: string; _system?: SanitySystem; }; type SanityImageAssetReference = { _ref: string; _type: 'reference'; _weak?: boolean; [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'; }; type SanityFileAssetReference = { _ref: string; _type: 'reference'; _weak?: boolean; [internalGroqTypeReferenceTo]?: 'sanity.fileAsset'; }; type SanityVideoAssetReference = { _ref: string; _type: 'reference'; _weak?: boolean; [internalGroqTypeReferenceTo]?: 'sanity.videoAsset'; }; type SanityAssetVersion = { _type: 'sanity.asset.version'; title?: string; instance: SanityImageAssetReference | SanityFileAssetReference | SanityVideoAssetReference; }; type SanityVideoAsset = { _id: string; _type: 'sanity.videoAsset'; _createdAt: string; _updatedAt: string; _rev: string; title?: string; description?: Array<{ children?: Array<{ marks?: Array; text?: string; _type: 'span'; _key: string; }>; style?: 'normal' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'blockquote'; listItem?: 'bullet' | 'number'; markDefs?: Array<{ href?: string; _type: 'link'; _key: string; }>; level?: number; _type: 'block'; _key: string; }>; state: SanityAssetInstanceState; error?: string; sha1hash?: string; mimeType?: string; originalFilename?: string; size?: number; uploadId?: string; path?: string; url?: string; extension?: string; source?: { id?: string; name?: string; url?: string; }; metadata: SanityVideoMetadata; rootDirectory?: SanityDirectoryReference; _system?: SanitySystem; }; type SanityAssetInstanceState = string; type SanityFileAsset = { _id: string; _type: 'sanity.fileAsset'; _createdAt: string; _updatedAt: string; _rev: string; title?: string; description?: Array<{ children?: Array<{ marks?: Array; text?: string; _type: 'span'; _key: string; }>; style?: 'normal' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'blockquote'; listItem?: 'bullet' | 'number'; markDefs?: Array<{ href?: string; _type: 'link'; _key: string; }>; level?: number; _type: 'block'; _key: string; }>; state: SanityAssetInstanceState; sha1hash?: string; mimeType?: string; originalFilename?: string; size?: number; uploadId?: string; path: string; extension?: string; url: string; previewUrl?: string; rootDirectory?: SanityDirectoryReference; _system?: SanitySystem; }; type SanityImageAsset = { _id: string; _type: 'sanity.imageAsset'; _createdAt: string; _updatedAt: string; _rev: string; altText?: string; state: SanityAssetInstanceState; sha1hash?: string; mimeType?: string; originalFilename?: string; size?: number; uploadId?: string; path?: string; extension?: string; url: string; metadata: SanityImageMetadata; rootDirectory?: SanityDirectoryReference; _system?: SanitySystem; }; type Geopoint = { _type: 'geopoint'; lat?: number; lng?: number; alt?: number; }; interface AssetVersion { _key: string; _type: SanityAssetVersion['_type']; title?: string; instance: AssetInstance; } type AssetInstanceDocument = SanityImageAsset | SanityVideoAsset | SanityFileAsset; interface Asset { _id: string; _originalId?: string; _type: SanityAsset['_type']; title: string; assetType: AssetInstance['_type']; cdnAccessPolicy: SanityAsset['cdnAccessPolicy']; currentVersion: { _ref: string; }; aspects?: unknown; versions: AssetVersion[]; collections: SanityAssetCollection[]; _createdAt: string; _updatedAt: string; _rev: string; url?: string; } type BaseDocument = { _id: string; _type: string; _rev: string; _createdAt: string; _updatedAt: string; [key: string]: any; }; interface AssetAspectDocument extends BaseDocument { _type: 'sanity.asset.aspect'; /** * The asset type this aspect definition applies to * Undefined means that it applies to all asset types */ assetType?: Asset['assetType']; definition: FieldDefinition; public?: boolean; } type FileStatus = 'pending' | 'uploading' | 'complete' | 'error' | 'alreadyExists'; /** * Wrapper object for the file upload with progress and status */ interface FileUpload { id: string; file: File; status: FileStatus; progress: number; error?: Error; } /** * Media Library capabilities that the consumer can declare it supports */ type PluginCapabilities = { privateAssets?: boolean; }; /** * Filter that the plugin consumer can use to limit the assets shown */ type PluginFilter = { type: 'groq'; name: string; query: string; }; /** * Asset types that can be selected by the plugin */ type PluginSelectAssetType = 'file' | 'image' | 'video'; /** * Payload used to configure the plugin behavior */ type PluginPayload = { auth: 'token' | 'cookie'; capabilities?: PluginCapabilities; disableNavigation?: boolean; pluginFilters?: PluginFilter[]; scheme: 'light' | 'dark'; selectAssetTypes: PluginSelectAssetType[]; selectionType: 'single' | 'multiple'; /** * Opaque string the host generates to **partition persisted picker UI state** (e.g. folder path, * search query, filters) in the Media Library iframe. Huey derives `localStorage` key suffixes * from this value; embedders often derive it from project + dataset + workspace (or any stable * context). */ pickerPersistenceKey?: string; }; /** * Message sent from the plugin when files are uploading */ type PluginPostMessageUploadFilesProgress = { type: 'uploadProgress'; files: FileUpload[]; }; /** * Message sent from the app that the pending uploads are uploaded */ type PluginPostMessageUploadFilesResponse = { type: 'uploadResponse'; assets: AssetSelectionItemWithLegacySupport[]; }; interface AssetSelectionItem { asset: Asset; assetInstanceId?: string | null; } interface AssetSelectionItemWithLegacySupport extends AssetSelectionItem { assetId: string; assetType: string; assetInstanceId: string; } type PluginPostMessageAssetSelection = { type: 'assetSelection'; selection: AssetSelectionItemWithLegacySupport[]; }; /** * Message sent from the plugin that a document has been updated */ type PluginPostMessageDocumentUpdate = { type: 'documentUpdate'; document: { _id: string; _type: string; _rev: string; }; }; /** * Message sent from the plugin that the user wants to upload files */ type PluginPostMessageUploadFilesRequest = { type: 'uploadRequest'; files: { id: string; file: File; }[]; }; type PluginPostMessageAbortUploadRequest = { type: 'abortUploadRequest'; files?: { id: string; }[]; }; type PluginPostMessageTokenRequest = { type: 'tokenRequest'; }; type PluginPostMessageTokenResponse = { type: 'tokenResponse'; token: string | null; }; /** * Message sent from a plugin page to notify the host that the page is loaded and ready to be interacted with */ type PluginPostMessagePageLoaded = { type: 'pageLoaded'; page: string; }; /** * Message sent from a plugin page that a page is unloaded by the user (for closing the dialog and similar) */ type PluginPostMessagePageUnloaded = { type: 'pageUnloaded'; page: string; }; type PluginPostMessage = PluginPostMessageAbortUploadRequest | PluginPostMessageAssetSelection | PluginPostMessageDocumentUpdate | PluginPostMessagePageLoaded | PluginPostMessagePageUnloaded | PluginPostMessageTokenRequest | PluginPostMessageTokenResponse | PluginPostMessageUploadFilesProgress | PluginPostMessageUploadFilesRequest | PluginPostMessageUploadFilesResponse; export { Asset, AssetAspectDocument, AssetInstanceDocument, AssetSelectionItem, AssetVersion, BaseDocument, FileStatus, FileUpload, PluginCapabilities, PluginFilter, PluginPayload, PluginPostMessage, PluginPostMessageAbortUploadRequest, PluginPostMessageAssetSelection, PluginPostMessageDocumentUpdate, PluginPostMessagePageLoaded, PluginPostMessagePageUnloaded, PluginPostMessageTokenRequest, PluginPostMessageTokenResponse, PluginPostMessageUploadFilesProgress, PluginPostMessageUploadFilesRequest, PluginPostMessageUploadFilesResponse, PluginSelectAssetType, type SanityVideoAsset, type SanityVideoMetadataRendition, type SanityAssetUploadSession as UploadSession }; //# sourceMappingURL=index.d.ts.map