matrix-react-sdk
Version:
SDK for matrix.org using React
22 lines (21 loc) • 973 B
TypeScript
import { EventType } from "matrix-js-sdk/src/matrix";
import { ListRule } from "./ListRule";
export declare const RULE_USER = EventType.PolicyRuleUser;
export declare const RULE_ROOM = EventType.PolicyRuleRoom;
export declare const RULE_SERVER = EventType.PolicyRuleServer;
export declare const USER_RULE_TYPES: string[];
export declare const ROOM_RULE_TYPES: string[];
export declare const SERVER_RULE_TYPES: string[];
export declare const ALL_RULE_TYPES: string[];
export declare function ruleTypeToStable(rule: string): EventType.PolicyRuleUser | EventType.PolicyRuleRoom | EventType.PolicyRuleServer | null;
export declare class BanList {
private _rules;
private _roomId;
constructor(roomId: string);
get roomId(): string;
get serverRules(): ListRule[];
get userRules(): ListRule[];
banEntity(kind: string, entity: string, reason: string): Promise<any>;
unbanEntity(kind: string, entity: string): Promise<any>;
updateList(): void;
}