From 5b41794947dd007f68d73f39967c366f8e743590 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Tue, 27 Dec 2022 20:13:49 +0530 Subject: [PATCH] Add new types --- src/types/matrix/accountData.ts | 6 ++++++ src/types/matrix/room.ts | 34 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/types/matrix/accountData.ts create mode 100644 src/types/matrix/room.ts diff --git a/src/types/matrix/accountData.ts b/src/types/matrix/accountData.ts new file mode 100644 index 00000000..59983806 --- /dev/null +++ b/src/types/matrix/accountData.ts @@ -0,0 +1,6 @@ +export enum AccountDataEvent { + PushRules = 'm.push_rules', + Direct = 'm.direct', + IgnoredUserList = 'm.ignored_user_list', + CinnySpaces = 'in.cinny.spaces', +} diff --git a/src/types/matrix/room.ts b/src/types/matrix/room.ts new file mode 100644 index 00000000..0d8a8714 --- /dev/null +++ b/src/types/matrix/room.ts @@ -0,0 +1,34 @@ +export enum Membership { + Invite = 'invite', + Knock = 'knock', + Join = 'join', + Leave = 'leave', + Ban = 'ban', +} + +export enum StateEvent { + RoomCanonicalAlias = 'm.room.canonical_alias', + RoomCreate = 'm.room.create', + RoomJoinRules = 'm.room.join_rules', + RoomMember = 'm.room.member', + RoomThirdPartyInvite = 'm.room.third_party_invite', + RoomPowerLevels = 'm.room.power_levels', + RoomName = 'm.room.name', + RoomTopic = 'm.room.topic', + RoomAvatar = 'm.room.avatar', + RoomPinnedEvents = 'm.room.pinned_events', + RoomEncryption = 'm.room.encryption', + RoomHistoryVisibility = 'm.room.history_visibility', + RoomGuestAccess = 'm.room.guest_access', + RoomServerAcl = 'm.room.server_acl', + RoomTombstone = 'm.room.tombstone', + + SpaceChild = 'm.space.child', + SpaceParent = 'm.space.parent', +} + +export enum RoomType { + Space = 'm.space', +} + +export type RoomToParents = Map>;