1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
# Copyright (c) 2022 Tulir Asokan
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from typing import Any, ClassVar, Optional
from mautrix.types import JSON, ExtensibleEnum, Serializable, SerializableEnum
class RoomType(ExtensibleEnum):
SPACE: "RoomType"
class EventType(Serializable):
class Class(SerializableEnum):
UNKNOWN = "unknown"
STATE = "state"
MESSAGE = "message"
ACCOUNT_DATA = "account_data"
EPHEMERAL = "ephemeral"
TO_DEVICE = "to_device"
_by_event_type: ClassVar[dict[str, EventType]]
ROOM_CANONICAL_ALIAS: "EventType"
ROOM_CREATE: "EventType"
ROOM_JOIN_RULES: "EventType"
ROOM_MEMBER: "EventType"
ROOM_POWER_LEVELS: "EventType"
ROOM_HISTORY_VISIBILITY: "EventType"
ROOM_NAME: "EventType"
ROOM_TOPIC: "EventType"
ROOM_AVATAR: "EventType"
ROOM_PINNED_EVENTS: "EventType"
ROOM_TOMBSTONE: "EventType"
ROOM_ENCRYPTION: "EventType"
SPACE_CHILD: "EventType"
SPACE_PARENT: "EventType"
ROOM_REDACTION: "EventType"
ROOM_MESSAGE: "EventType"
ROOM_ENCRYPTED: "EventType"
STICKER: "EventType"
REACTION: "EventType"
CALL_INVITE: "EventType"
CALL_CANDIDATES: "EventType"
CALL_SELECT_ANSWER: "EventType"
CALL_ANSWER: "EventType"
CALL_HANGUP: "EventType"
CALL_REJECT: "EventType"
CALL_NEGOTIATE: "EventType"
BEEPER_MESSAGE_STATUS: "EventType"
RECEIPT: "EventType"
TYPING: "EventType"
PRESENCE: "EventType"
DIRECT: "EventType"
PUSH_RULES: "EventType"
TAG: "EventType"
IGNORED_USER_LIST: "EventType"
TO_DEVICE_ENCRYPTED: "EventType"
TO_DEVICE_DUMMY: "EventType"
ROOM_KEY: "EventType"
ROOM_KEY_WITHHELD: "EventType"
ORG_MATRIX_ROOM_KEY_WITHHELD: "EventType"
ROOM_KEY_REQUEST: "EventType"
FORWARDED_ROOM_KEY: "EventType"
BEEPER_ROOM_KEY_ACK: "EventType"
ALL: "EventType"
is_message: bool
is_state: bool
is_ephemeral: bool
is_account_data: bool
is_to_device: bool
t: str
t_class: Class
def __init__(self, t: str, t_class: Class) -> None: ...
@classmethod
def find(cls, t: str, t_class: Optional[Class] = None) -> "EventType": ...
def serialize(self) -> JSON: ...
@classmethod
def deserialize(cls, raw: JSON) -> Any: ...
def with_class(self, t_class: Class) -> "EventType": ...
|