import { Writable } from "svelte/store"; import Client from "./client"; import Cache from "./cache"; import { FullSubscriptionEntry, FullSubscriptionItem, GraphQLResponse } from "./queryTypes"; export declare type QueryOptions = { client: Client; cache?: Cache; initialSearch?: TArgs; activate?: (store: Writable>) => void; deactivate?: (store: Writable>) => void; postProcess?: (resp: unknown) => unknown; onMutation?: FullSubscriptionItem | FullSubscriptionItem[]; }; export declare type QueryState = { loading: boolean; loaded: boolean; data: TData | null; error: unknown; reload: () => void; clearCache: () => void; clearCacheAndReload: () => void; currentQuery: string; }; export declare type QueryLoadOptions = Partial<{ force: boolean; active: boolean; }>; declare type QueryManagerOptions = { query: string; client: Client; setState: (newState: Partial>) => void; cache?: Cache; }; export default class QueryManager { query: string; client: Client; active: boolean; setState: (newState: Partial>) => void; options: any; cache: Cache; postProcess?: (resp: unknown) => unknown; currentUri: string; unregisterQuery?: () => void; currentPromise?: Promise; mutationSubscription?: () => void; static initialState: { loading: boolean; loaded: boolean; data: null; error: null; currentQuery: string; reload: () => void; clearCache: () => void; clearCacheAndReload: () => void; }; currentState: QueryState; onMutation: FullSubscriptionEntry[]; constructor({ query, client, setState, cache }: QueryManagerOptions, options: Partial>); isActive: () => boolean; updateState: (newState: Partial>) => void; refresh: () => void; softReset: (newResults?: TData | undefined) => void; hardReset: () => void; clearCacheAndReload: () => void; reload: () => void; load(packet?: [string, unknown], options?: QueryLoadOptions): void; execute(): void; handleExecution: (promise: Promise>, cacheKey: string) => void; activate(): void; dispose(): void; } export {};