export type ValidateCanChatRPC = {
    method: 'user.validate_can_chat';
    params: {
        receiver_user_ids: string[];
    };
};
export type ChatBlastRPC = {
    method: 'chat.blast';
    params: {
        blast_id: string;
        audience: ChatBlastAudience;
        audience_content_type?: 'track' | 'album';
        audience_content_id?: string;
        message: string;
    };
};
export type ChatCreateRPC = {
    method: 'chat.create';
    params: {
        chat_id: string;
        invites: Array<{
            user_id: string;
            invite_code: string;
        }>;
    };
};
export type ChatDeleteRPC = {
    method: 'chat.delete';
    params: {
        chat_id: string;
    };
};
export type ChatInviteRPC = {
    method: 'chat.invite';
    params: {
        chat_id: string;
        invites: Array<{
            user_id: string;
            invite_code: string;
        }>;
    };
};
export type ChatMessageRPC = {
    method: 'chat.message';
    params: {
        chat_id: string;
        message_id: string;
        message: string;
        parent_message_id?: string;
        is_plaintext?: boolean;
    };
};
export type ChatReactRPC = {
    method: 'chat.react';
    params: {
        chat_id: string;
        message_id: string;
        reaction: string | null;
    };
};
export type ChatReadRPC = {
    method: 'chat.read';
    params: {
        chat_id: string;
    };
};
export type ChatBlockRPC = {
    method: 'chat.block';
    params: {
        user_id: string;
    };
};
export type ChatUnblockRPC = {
    method: 'chat.unblock';
    params: {
        user_id: string;
    };
};
export type ChatPermitRPC = {
    method: 'chat.permit';
    params: {
        permit: ChatPermission;
        permit_list: ChatPermission[];
        allow?: boolean;
    };
};
export type RPCPayloadRequest = ChatBlastRPC | ChatCreateRPC | ChatDeleteRPC | ChatInviteRPC | ChatMessageRPC | ChatReactRPC | ChatReadRPC | ChatBlockRPC | ChatUnblockRPC | ChatPermitRPC | ValidateCanChatRPC;
export type RPCPayload = RPCPayloadRequest & {
    current_user_id: string;
    timestamp: number;
};
export type RPCMethod = RPCPayload['method'];
export type UserChat = {
    chat_id: string;
    last_message: string;
    last_message_at: string;
    last_message_is_plaintext: boolean;
    chat_members: Array<{
        user_id: string;
    }>;
    recheck_permissions: boolean;
    invite_code: string;
    unread_message_count: number;
    last_read_at: string;
    cleared_history_at: string;
    is_blast: false;
    audience: ChatBlastAudience;
    audience_content_id?: string;
    audience_content_type?: string;
};
export type ChatMessageReaction = {
    user_id: string;
    created_at: string;
    reaction: string;
};
export type ChatMessageNullableReaction = ChatMessageReaction | {
    user_id: string;
    created_at: string;
    reaction: null;
};
export type ChatMessage = {
    message_id: string;
    sender_user_id: string;
    created_at: string;
    message: string;
    is_plaintext: boolean;
    reactions: ChatMessageReaction[];
};
export type ChatInvite = {
    user_id: string;
    invite_code: string;
};
type ChatBlastBase = {
    chat_id: string;
    audience: ChatBlastAudience;
    audience_content_id?: string;
    audience_content_type?: 'track' | 'album';
};
export type UpgradableChatBlast = ChatBlastBase & {
    pending_chat_id: string;
    from_user_id: number;
    plaintext: string;
    created_at: string;
    blast_id: string;
};
export type ChatBlast = ChatBlastBase & {
    is_blast: true;
    last_message_at: string;
};
export type ValidatedChatPermissions = {
    user_id: string;
    permits: ChatPermission;
    permit_list: ChatPermission[];
    current_user_has_permission: boolean;
};
/**
 * Defines who the user allows to message them
 */
export declare enum ChatPermission {
    ALL = "all",
    TIPPEES = "tippees",
    TIPPERS = "tippers",
    FOLLOWEES = "followees",
    FOLLOWERS = "followers",
    VERIFIED = "verified",
    NONE = "none"
}
export declare enum ChatBlastAudience {
    FOLLOWERS = "follower_audience",
    TIPPERS = "tipper_audience",
    REMIXERS = "remixer_audience",
    CUSTOMERS = "customer_audience"
}
export type CommsResponse = {
    health: {
        is_healthy: boolean;
    };
    summary?: {
        prev_cursor: string;
        prev_count: number;
        next_cursor: string;
        next_count: number;
        total_count: number;
    };
    data: any;
};
export type ChatWebsocketEventData = {
    rpc: RPCPayload;
    metadata: {
        userId: string;
        senderUserId: string;
        receiverUserId: string;
        timestamp: string;
    };
};
export {};
