export type ClientPerspective = 'raw' | 'published' | 'drafts' | 'previewDrafts'; export type QueryParams = Record; export interface QueryOptions { perspective?: ClientPerspective; filterResponse?: boolean; [key: string]: unknown; } export type UnfilteredResponseQueryOptions = QueryOptions & { filterResponse: false; }; export type ContentSourceMap = unknown; export interface StegaConfig { enabled?: boolean; studioUrl?: string; } export interface ClientConfig { useCdn?: boolean; projectId: string; dataset?: string; apiVersion: string; withCredentials?: boolean; token?: string; perspective?: ClientPerspective; } export interface InitializedClientConfig extends ClientConfig { stega?: StegaConfig; } /** @deprecated Prefer `ClientConfig` instead - this will be removed in a future version. */ export interface SanityConfiguration extends ClientConfig { } export declare function getQuery(query: string, params?: Record): string; export declare const getByteSize: (query: string) => number; export declare function createClient(config: ClientConfig): { config: () => { useCdn: boolean | undefined; projectId: string; dataset: string | undefined; apiVersion: string; withCredentials: boolean | undefined; token: string | undefined; perspective: ClientPerspective; }; clone: () => { config: () => { useCdn: boolean | undefined; projectId: string; dataset: string | undefined; apiVersion: string; withCredentials: boolean | undefined; token: string | undefined; perspective: ClientPerspective; }; clone: /*elided*/ any; fetch: { (query: string, params: Record | undefined, options: QueryOptions & { filterResponse: false; }): Promise<{ result: T; }>; (query: string, params?: Record, options?: QueryOptions): Promise; }; }; fetch: { (query: string, params: Record | undefined, options: QueryOptions & { filterResponse: false; }): Promise<{ result: T; }>; (query: string, params?: Record, options?: QueryOptions): Promise; }; };