import { Draupnir } from "../Draupnir";
import { RoomEvent } from "matrix-protection-suite";
import { StringRoomID } from "@the-draupnir-project/matrix-basic-types";
export declare const ABUSE_REPORT_KEY = "org.matrix.mjolnir.abuse.report";
export declare const ABUSE_ACTION_CONFIRMATION_KEY = "org.matrix.mjolnir.abuse.action.confirmation";
export interface ReportManager {
    handleTimelineEvent(roomID: StringRoomID, event: RoomEvent): void;
    handleServerAbuseReport({ roomID, reporterId, event, reason, }: {
        roomID: StringRoomID;
        reporterId: string;
        event: RoomEvent;
        reason?: string;
    }): Promise<void>;
    handleReaction({ roomID, event, }: {
        roomID: StringRoomID;
        event: RoomEvent;
    }): Promise<void>;
}
/**
 * A class designed to respond to abuse reports.
 */
export declare class StandardReportManager {
    draupnir: Draupnir;
    private displayManager;
    constructor(draupnir: Draupnir);
    handleTimelineEvent(roomID: StringRoomID, event: RoomEvent): void;
    /**
     * Display an incoming abuse report received, e.g. from the /report Matrix API.
     *
     * # Pre-requisites
     *
     * The following MUST hold true:
     * - the reporter's id is `reporterId`;
     * - the reporter is a member of `roomID`;
     * - `event` did take place in room `roomID`;
     * - the reporter could witness event `event` in room `roomID`;
     * - the event being reported is `event`;
     *
     * @param roomID The room in which the abuse took place.
     * @param reporterId The user who reported the event.
     * @param event The event being reported.
     * @param reason A reason provided by the reporter.
     */
    handleServerAbuseReport({ roomID, reporterId, event, reason, }: {
        roomID: StringRoomID;
        reporterId: string;
        event: RoomEvent;
        reason?: string;
    }): Promise<void>;
    /**
     * Handle a reaction to an abuse report.
     *
     * @param roomID The room in which the reaction took place.
     * @param event The reaction.
     */
    handleReaction({ roomID, event, }: {
        roomID: StringRoomID;
        event: RoomEvent;
    }): Promise<void>;
    /**
     * Execute a report-specific action.
     *
     * This is executed when the user clicks on an action to execute (if the action
     * does not need confirmation) or when the user clicks on "confirm" in a confirmation
     * (otherwise).
     *
     * @param label The type of action to execute, e.g. `kick-user`.
     * @param report The abuse report on which to take action.
     * @param successEventId The event to annotate with a "OK" in case of success.
     * @param failureEventId The event to annotate with a "FAIL" in case of failure.
     * @param onSuccessRemoveEventId Optionally, an event to remove in case of success (e.g. the confirmation dialog).
     */
    private executeAction;
}
/**
 * An abuse report received from a user.
 *
 * Note: These reports end up embedded in Matrix messages, behind key `ABUSE_REPORT_KEY`,
 * so we're using Matrix naming conventions rather than JS/TS naming conventions.
 */
export interface IReport {
    /**
     * The user who sent the abuse report.
     */
    readonly accused_id: string;
    /**
     * The user who sent the message reported as abuse.
     */
    readonly reporter_id: string;
    /**
     * The room in which `eventId` took place.
     */
    readonly room_id: string;
    readonly room_alias_or_id: string;
    /**
     * The event reported as abuse.
     */
    readonly event_id: string;
}
//# sourceMappingURL=ReportManager.d.ts.map