import { PreviewConfig, Reference, SchemaType } from '@sanity/types'; export type { SortOrdering, PrepareViewOptions } from '@sanity/types'; export declare type Id = string; export type { Reference }; export declare type Document = { _id: string; [key: string]: unknown; }; export declare type Previewable = Document | Record | Reference | Id; export declare type Path = FieldName[]; export declare type Selection = [Id, Path[]]; export declare type FieldName = string; export interface AvailabilityResponse { omitted: { id: string; reason: 'existence' | 'permission'; }[]; } export declare enum AvailabilityReason { READABLE = "READABLE", PERMISSION_DENIED = "PERMISSION_DENIED", NOT_FOUND = "NOT_FOUND" } export interface PreviewableType { fields?: { name: string; type: SchemaType; }[]; preview?: PreviewConfig; } export interface ApiConfig { projectId: string; dataset: string; } export declare type DocumentAvailability = { available: true; reason: AvailabilityReason.READABLE; } | { available: false; reason: AvailabilityReason.PERMISSION_DENIED | AvailabilityReason.NOT_FOUND; }; export interface DraftsModelDocumentAvailability { /** * document readability for the published document */ published: DocumentAvailability; /** * document readability for the draft document */ draft: DocumentAvailability; } export interface DraftsModelDocument { id: string; type: string | null; draft: { availability: DocumentAvailability; snapshot: T | undefined; }; published: { availability: DocumentAvailability; snapshot: T | undefined; }; } export interface DocumentPreview { _id: string; _type: string; _updatedAt?: string; _createdAt?: string; _rev?: string; } //# sourceMappingURL=types.d.ts.map