import type { GraphStore, StoreQueryResponse } from '@astrale-os/sdk/client/store'; import type { QueryAST } from '@astrale-os/sdk/query'; export type GraphResourceState = 'idle' | 'loading' | 'ready' | 'stale' | 'refreshing' | 'optimistic' | 'failed'; export interface GraphResource { readonly state: GraphResourceState; /** Current-scope data only. Previous-scope data is never substituted here. */ readonly data: T | undefined; readonly error: unknown; readonly previous?: { readonly identity: string; readonly data: T; }; readonly transitioning: boolean; readonly live: false; readonly sequence: 0; refresh(): Promise; readonly more: { readonly has: boolean; readonly pending: boolean; load(): Promise; }; } export interface StoreResourceOptions { readonly identity?: string; readonly keepPrevious?: boolean; readonly window?: 'page' | 'append'; readonly merge?: (pages: readonly Output[]) => Output; readonly refreshInterval?: number; readonly refreshWhen?: 'always' | 'visible'; } /** Adapt exact Store pages into a tear-free React resource without a parallel entity cache. */ export declare function useStoreResource(query: Query | null, pageSize: number, project: (response: StoreQueryResponse) => Output, options?: StoreResourceOptions): GraphResource; export declare function retainRefreshScheduler(store: GraphStore, identity: string, refresh: () => Promise, interval: number, when: 'always' | 'visible'): () => void; //# sourceMappingURL=resource.d.ts.map