import { InfiniteData, InfiniteQueryObserverOptions, MutationObserver, QueryObserverOptions } from '@tanstack/query-core';
import { WeavyType } from '../client/weavy';
import { AppUpProperties, AppsResultType, AppTypeGuid, AppTypeString, ComponentType, AppType } from '../types/app.types';
export declare function getAppOptions<T extends AppType = AppType>(weavy: WeavyType, uid: string | number, type?: AppTypeString | ComponentType, appData?: AppUpProperties): QueryObserverOptions<T, Error, T, T, readonly unknown[], never>;
export declare function getApp<T extends AppType = AppType>(weavy: WeavyType, uid: string | number, type?: AppTypeString | ComponentType, appData?: AppUpProperties): Promise<T>;
export declare function getOrCreateAppOptions<T extends AppType = AppType>(weavy: WeavyType, uid: string | number, type?: AppTypeGuid | ComponentType, members?: (number | string)[], appData?: AppUpProperties): QueryObserverOptions<T>;
export declare function getOrCreateApp<T extends AppType = AppType>(weavy: WeavyType, uid: string | number, type?: AppTypeGuid | ComponentType, members?: (number | string)[], appData?: AppUpProperties): Promise<T>;
export type MutateAddAppVariables = {
    name?: string;
    members: (number | string)[];
    type: AppTypeString;
    uid?: string;
};
export type CreateAppMutationType = MutationObserver<AppType, Error, MutateAddAppVariables, void>;
export declare function getCreateAppMutationOptions(weavy: WeavyType): {
    mutationFn: ({ name, members, type, uid }: MutateAddAppVariables) => Promise<AppType>;
    onSettled: () => Promise<void>;
};
export declare function getCreateAppMutation(weavy: WeavyType): CreateAppMutationType;
export declare function mutateApp<T extends AppType = AppType>(weavy: WeavyType, app: T, appData?: AppUpProperties): Promise<T>;
export type MutateAppSubscribeProps = {
    subscribe: boolean;
};
export type MutateAppSubscribeContextType = {
    previousSubscribe: boolean | undefined;
    subscribe: boolean;
} | undefined;
export declare function getAppSubscribeMutationOptions(weavy: WeavyType, app: AppType): {
    mutationFn: ({ subscribe }: MutateAppSubscribeProps) => Promise<void>;
    onMutate: (variables: MutateAppSubscribeProps) => {
        previousSubscribe: boolean | undefined;
        subscribe: boolean;
    };
    onError(error: Error, variables: MutateAppSubscribeProps, context: MutateAppSubscribeContextType): void;
};
export declare function getBadgeOptions(weavy: WeavyType, types?: AppTypeGuid[] | null, member?: string, options?: object): QueryObserverOptions<AppsResultType, Error, AppsResultType, AppsResultType, readonly unknown[], never>;
export declare function getAppListOptions(weavy: WeavyType, options?: object, types?: AppTypeGuid[] | null, member?: string, searchText?: () => string | undefined, orderBy?: string | null, includeUid?: boolean | null): InfiniteQueryObserverOptions<AppsResultType, Error, InfiniteData<AppsResultType>>;
//# sourceMappingURL=app.d.ts.map