UNPKG

matrix-js-sdk

Version:
39 lines 1.5 kB
import { UnstableValue } from "../NamespacedValue"; import { IContent } from "../models/event"; import { TEXT_NODE_TYPE } from "./extensible_events"; export declare const POLL_START_EVENT_TYPE: UnstableValue<"m.poll.start", "org.matrix.msc3381.poll.start">; export declare const POLL_RESPONSE_EVENT_TYPE: UnstableValue<"m.poll.response", "org.matrix.msc3381.poll.response">; export declare const POLL_END_EVENT_TYPE: UnstableValue<"m.poll.end", "org.matrix.msc3381.poll.end">; export declare const POLL_KIND_DISCLOSED: UnstableValue<"m.poll.disclosed", "org.matrix.msc3381.poll.disclosed">; export declare const POLL_KIND_UNDISCLOSED: UnstableValue<"m.poll.undisclosed", "org.matrix.msc3381.poll.undisclosed">; export interface IPollAnswer extends IContent { id: string; [TEXT_NODE_TYPE.name]: string; } export interface IPollContent extends IContent { [POLL_START_EVENT_TYPE.name]: { kind: string; question: { [TEXT_NODE_TYPE.name]: string; }; answers: IPollAnswer[]; }; [TEXT_NODE_TYPE.name]: string; } export interface IPollResponseContent extends IContent { [POLL_RESPONSE_EVENT_TYPE.name]: { answers: string[]; }; "m.relates_to": { "event_id": string; "rel_type": string; }; } export interface IPollEndContent extends IContent { [POLL_END_EVENT_TYPE.name]: {}; "m.relates_to": { "event_id": string; "rel_type": string; }; } //# sourceMappingURL=polls.d.ts.map