import { AbstractProtection, ActionResult, Capability, MembershipChange, OwnLifetime, PolicyListRevision, PolicyRuleChange, ProtectedRoomsSet, Protection, ProtectionDescription, RoomMembershipRevision, SetMembershipPolicyRevisionIssuer, SetRoomMembership, UnknownConfig, WatchedPolicyRooms } from "matrix-protection-suite";
import { Draupnir } from "../Draupnir";
import { MatrixGlob, StringRoomID, StringUserID } from "@the-draupnir-project/matrix-basic-types";
import { Result } from "@gnuxie/typescript-result";
export type RedactionSynchronisationProtectionCapabilitiesSet = {
    consequences: RedactionSynchronisationConsequences;
};
type RedactionSynchronisationProtectionDescription = ProtectionDescription<Draupnir, UnknownConfig, RedactionSynchronisationProtectionCapabilitiesSet>;
export interface RedactionSynchronisationConsequences extends Capability {
    redactMessagesIn(userIDOrGlob: StringUserID, reason: string | undefined, roomIDs: StringRoomID[]): Promise<Result<void>>;
    rejectInvite(roomID: StringRoomID, sender: StringUserID, reciever: StringUserID, reason: string | undefined): Promise<Result<void>>;
}
interface RedactionSynchronisation {
    handlePermissionRequirementsMet(roomID: StringRoomID): void;
    handlePolicyChange(policyChange: PolicyRuleChange): void;
    handleMembershipChange(change: MembershipChange): void;
}
export declare class StandardRedactionSynchronisation implements RedactionSynchronisation {
    private readonly automaticRedactionReasons;
    private readonly consequences;
    private readonly watchedPolicyRooms;
    private readonly setRoomMembership;
    private readonly setPoliciesMatchingMembership;
    constructor(automaticRedactionReasons: MatrixGlob[], consequences: RedactionSynchronisationConsequences, watchedPolicyRooms: WatchedPolicyRooms, setRoomMembership: SetRoomMembership, setPoliciesMatchingMembership: SetMembershipPolicyRevisionIssuer);
    handlePermissionRequirementsMet(roomID: StringRoomID): void;
    handlePolicyChange(change: PolicyRuleChange): void;
    handleMembershipChange(change: MembershipChange): void;
    private isPolicyRequiringRedaction;
    private checkRoomInvitations;
}
export declare class RedactionSynchronisationProtection extends AbstractProtection<RedactionSynchronisationProtectionDescription> implements Protection<RedactionSynchronisationProtectionDescription> {
    private readonly redactionSynchronisation;
    constructor(description: RedactionSynchronisationProtectionDescription, lifetime: OwnLifetime<Protection<RedactionSynchronisationProtectionDescription>>, capabilities: RedactionSynchronisationProtectionCapabilitiesSet, protectedRoomsSet: ProtectedRoomsSet, automaticallyRedactForReasons: string[]);
    handlePolicyChange(_revision: PolicyListRevision, changes: PolicyRuleChange[]): Promise<ActionResult<void>>;
    handleMembershipChange(_revision: RoomMembershipRevision, changes: MembershipChange[]): Promise<ActionResult<void>>;
}
export {};
//# sourceMappingURL=RedactionSynchronisation.d.ts.map