import { Observable } from 'rxjs'; import { RoomEvent, WidgetApi } from '../types'; /** * The name of the redaction room event. */ export declare const ROOM_EVENT_REDACTION = "m.room.redaction"; /** * The content of an `m.room.redaction` event. */ export type Redaction = { /** * The id of the event that is redacted. */ redacts: string; }; /** * Types a {@link RoomEvent} to include the properties of a redaction. * * @remarks The redaction event is a special snowflake. The actual data is * outside the content to make it readable without having to decrypt * it. */ export type RedactionRoomEvent = RoomEvent> & Redaction; /** * Check whether the format of a redaction event is valid. * @param event - The event to check. * @returns True if the event format is valid, otherwise false. */ export declare function isValidRedactionEvent(event: RoomEvent): event is RedactionRoomEvent; /** * Redacts an event in the current room. * @param widgetApi - An instance of the widget API. * @param eventId - The id of the event to redact. * @returns The redaction event that was send to the room. */ export declare function redactEvent(widgetApi: WidgetApi, eventId: string): Promise; /** * Observes redaction events in the current room. * @param widgetApi - An instance of the widget API. * @returns An observable of validated redaction events. */ export declare function observeRedactionEvents(widgetApi: WidgetApi): Observable;