import { InfiniteQueryObserverOptions, MutationKey, MutationObserverOptions, InfiniteData, QueryObserverOptions, Query } from '@tanstack/query-core';
import { WeavyType } from '../client/weavy';
import { MutatePostProps, PostQueryFilterType, PostType, PostsResultType, MutatePostTempData } from '../types/posts.types';
import { RealtimeOptionsType } from '../types/realtime.types';
import { ComponentFeaturePolicy, UserType } from '../contexts';
import { AppType } from '../types/app.types';
export declare function getPostsOptions(weavy: WeavyType, appId: number | "feed", postFilter?: PostQueryFilterType, countOnly?: boolean): InfiniteQueryObserverOptions<PostsResultType, Error, InfiniteData<PostsResultType>>;
export declare function getUpdatePostMutationOptions(weavy: WeavyType, mutationKey: MutationKey): {
    mutationFn: (variables: MutatePostProps) => Promise<PostType>;
    mutationKey: readonly unknown[];
    onMutate: (variables: MutatePostProps) => void;
    onSuccess: (data: PostType, variables: MutatePostProps) => void;
    onError: () => void;
};
export declare function getAddPostMutationOptions(weavy: WeavyType, mutationKey: MutationKey): MutationObserverOptions<PostType, Error, MutatePostProps, MutatePostTempData>;
/**
 * Return true if we can insert a
 */
export declare function permitsOptimisticPost(query: Query): boolean;
export declare function getPostsCountOptions(weavy: WeavyType, app: AppType | "feed", afterId?: number, postFilter?: PostQueryFilterType, options?: Partial<QueryObserverOptions<PostsResultType>>): QueryObserverOptions<PostsResultType, Error, PostsResultType, PostsResultType, readonly unknown[], never>;
export declare function getRealtimePostOptions(weavy: WeavyType, componentFeatures: ComponentFeaturePolicy, app: AppType, user: UserType, post?: PostType): (RealtimeOptionsType | undefined)[];
//# sourceMappingURL=posts.d.ts.map