import { MutationObserver } from '@tanstack/query-core';
import { WeavyContextType } from '../client/weavy';
import { ConversationType, ConversationMutationContextType } from '../types/conversations.types';
import { AccessType } from '../types/app.types';

export type MutateDeliveredConversationVariables = {
    id: number;
};
export type MutateMarkConversationVariables = {
    id: number;
    markAsRead: boolean;
    messageId: number | null;
};
export type MutateStarConversationVariables = {
    id: number;
    star: boolean;
};
export type MutatePinConversationVariables = {
    id: number;
    pin: boolean;
};
export type MutateLeaveConversationVariables = {
    id: number;
    members: number[];
};
export type MutateUpdateMemberVariables = {
    id: number;
    userId: number;
    access: AccessType;
};
export type MutateAddMembersToConversationVariables = {
    id: number;
    members: number[];
};
export type MutateUpdateConversationVariables = {
    id: number;
    name?: string | null | undefined;
    blobId?: number | null | undefined;
    thumbnailUrl?: string | null | undefined;
};
export type MutateTrashConversationVariables = {
    id: number;
};
export type DeliveredConversationMutationType = MutationObserver<void, Error, MutateDeliveredConversationVariables, ConversationMutationContextType>;
export type MarkConversationMutationType = MutationObserver<void, Error, MutateMarkConversationVariables, ConversationMutationContextType>;
export type StarConversationMutationType = MutationObserver<void, Error, MutateStarConversationVariables, ConversationMutationContextType>;
export type PinConversationMutationType = MutationObserver<void, Error, MutatePinConversationVariables, ConversationMutationContextType>;
export type LeaveConversationMutationType = MutationObserver<void, Error, MutateLeaveConversationVariables, ConversationMutationContextType>;
export type UpdateMemberMutationType = MutationObserver<void, Error, MutateUpdateMemberVariables, ConversationMutationContextType>;
export type AddMembersToConversationMutationType = MutationObserver<void, Error, MutateAddMembersToConversationVariables, ConversationMutationContextType>;
export type UpdateConversationMutationType = MutationObserver<ConversationType, Error, MutateUpdateConversationVariables, ConversationMutationContextType>;
export type TrashConversationMutationType = MutationObserver<void, Error, MutateTrashConversationVariables, ConversationMutationContextType>;
export declare function getDeliveredConversationMutationOptions(weavyContext: WeavyContextType): {
    mutationFn: ({ id }: MutateDeliveredConversationVariables) => Promise<void>;
    onMutate: () => Promise<ConversationMutationContextType>;
};
export declare function getMarkConversationMutationOptions(weavyContext: WeavyContextType): {
    mutationFn: ({ id, markAsRead, messageId }: MutateMarkConversationVariables) => Promise<void>;
    onMutate: (variables: MutateMarkConversationVariables) => Promise<ConversationMutationContextType>;
    onError: (error: Error, variables: MutateMarkConversationVariables) => void;
};
export declare function getStarConversationMutationOptions(weavyContext: WeavyContextType): {
    mutationFn: ({ id, star }: MutateStarConversationVariables) => Promise<void>;
    onMutate: (variables: MutateStarConversationVariables) => Promise<ConversationMutationContextType>;
    onError: (error: Error, variables: MutateStarConversationVariables) => void;
};
export declare function getPinConversationMutationOptions(weavyContext: WeavyContextType): {
    mutationFn: ({ id, pin }: MutatePinConversationVariables) => Promise<void>;
    onMutate: (variables: MutatePinConversationVariables) => Promise<ConversationMutationContextType>;
    onSettled: () => Promise<void>;
};
export declare function getLeaveConversationMutationOptions(weavyContext: WeavyContextType): {
    mutationFn: ({ id, members }: MutateLeaveConversationVariables) => Promise<void>;
    onMutate: (variables: MutateLeaveConversationVariables) => Promise<ConversationMutationContextType>;
};
export declare function getUpdateMemberMutationOptions(weavyContext: WeavyContextType): {
    mutationFn: ({ id, userId, access }: MutateUpdateMemberVariables) => Promise<void>;
    onMutate: (variables: MutateUpdateMemberVariables) => Promise<ConversationMutationContextType>;
};
export declare function getAddMembersToConversationMutationOptions(weavyContext: WeavyContextType): {
    mutationFn: ({ id, members }: MutateAddMembersToConversationVariables) => Promise<void>;
    onMutate: () => Promise<ConversationMutationContextType>;
};
export declare function getUpdateConversationMutationOptions(weavyContext: WeavyContextType): {
    mutationFn: ({ id, name, blobId }: MutateUpdateConversationVariables) => Promise<any>;
    onMutate: (variables: MutateUpdateConversationVariables) => Promise<ConversationMutationContextType>;
};
export declare function getTrashConversationMutationOptions(weavyContext: WeavyContextType): {
    mutationFn: ({ id }: MutateTrashConversationVariables) => Promise<void>;
    onMutate: (variables: MutateTrashConversationVariables) => Promise<ConversationMutationContextType>;
};
export declare function getDeliveredConversationMutation(weavyContext: WeavyContextType): DeliveredConversationMutationType;
export declare function getMarkConversationMutation(weavyContext: WeavyContextType): MarkConversationMutationType;
export declare function getStarConversationMutation(weavyContext: WeavyContextType): StarConversationMutationType;
export declare function getPinConversationMutation(weavyContext: WeavyContextType): PinConversationMutationType;
export declare function getLeaveConversationMutation(weavyContext: WeavyContextType): LeaveConversationMutationType;
export declare function getUpdateMemberMutation(weavyContext: WeavyContextType): UpdateMemberMutationType;
export declare function getAddMembersToConversationMutation(weavyContext: WeavyContextType): AddMembersToConversationMutationType;
export declare function getUpdateConversationMutation(weavyContext: WeavyContextType): UpdateConversationMutationType;
export declare function getTrashConversationMutation(weavyContext: WeavyContextType): TrashConversationMutationType;
//# sourceMappingURL=conversation.d.ts.map