export interface QueryMeta {
    limit?: number;
    skip?: number;
    sort?: any;
}
export interface DependencyContextSnapshot {
    dependencies: Map<string, Set<string>>;
    filters: Map<string, any[]>;
    watchAllCollections: Set<string>;
    queryMetadata: Map<string, QueryMeta[]>;
}
export interface SerializedDependencySnapshot {
    dependencies: Array<[string, string[]]>;
    filters: Array<[string, any[]]>;
    watchAllCollections: string[];
    queryMetadata: Array<[string, QueryMeta[]]>;
}
export interface PublicationContext {
    publication?: string;
    subscriptionData?: any[];
    userId?: string;
}
export declare function withDependencyTracking<T>(fn: () => Promise<T>, metadata?: PublicationContext): Promise<{
    result: T;
    snapshot: DependencyContextSnapshot;
}>;
export declare function serializeDependencySnapshot(snapshot: DependencyContextSnapshot): SerializedDependencySnapshot;
export declare function deserializeDependencySnapshot(snapshot: SerializedDependencySnapshot): DependencyContextSnapshot;
export declare function getPublicationContext(): PublicationContext;
export declare function recordDependencyResult(collection: string, result: unknown, options?: {
    filter?: any;
    meta?: QueryMeta;
}): void;
export declare function recordAggregateDependencies(collection: string, pipeline: any[], result: unknown): void;
