2023-05-04 20:25:00 +00:00
|
|
|
export type AppServiceRegistrationConfig = {
|
|
|
|
id: string
|
|
|
|
as_token: string
|
|
|
|
hs_token: string
|
|
|
|
url: string
|
|
|
|
sender_localpart: string
|
2023-07-03 05:20:24 +00:00
|
|
|
namespaces: {
|
|
|
|
users: {
|
|
|
|
exclusive: boolean
|
|
|
|
regex: string
|
|
|
|
}[]
|
|
|
|
aliases: {
|
|
|
|
exclusive: boolean
|
|
|
|
regex: string
|
|
|
|
}[]
|
|
|
|
}
|
2023-05-04 20:25:00 +00:00
|
|
|
protocols: [string]
|
|
|
|
rate_limited: boolean
|
2023-07-13 05:11:24 +00:00
|
|
|
ooye: {
|
|
|
|
namespace_prefix: string
|
2023-07-13 05:36:20 +00:00
|
|
|
max_file_size: number
|
2023-07-13 05:11:24 +00:00
|
|
|
}
|
2023-05-04 20:25:00 +00:00
|
|
|
}
|
|
|
|
|
2023-06-30 03:15:34 +00:00
|
|
|
export type WebhookCreds = {
|
|
|
|
id: string
|
|
|
|
token: string
|
|
|
|
}
|
|
|
|
|
2023-05-05 13:25:15 +00:00
|
|
|
namespace Event {
|
2023-07-02 13:06:05 +00:00
|
|
|
export type Outer<T> = {
|
|
|
|
type: string
|
|
|
|
room_id: string
|
|
|
|
sender: string
|
|
|
|
content: T
|
|
|
|
origin_server_ts: number
|
|
|
|
unsigned: any
|
|
|
|
event_id: string
|
|
|
|
}
|
|
|
|
|
2023-08-16 05:03:05 +00:00
|
|
|
export type ReplacementContent<T> = T & {
|
|
|
|
"m.new_content": T
|
|
|
|
"m.relates_to": {
|
|
|
|
rel_type: string // "m.replace"
|
|
|
|
event_id: string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-05 13:25:15 +00:00
|
|
|
export type BaseStateEvent = {
|
|
|
|
type: string
|
|
|
|
room_id: string
|
|
|
|
sender: string
|
|
|
|
content: any
|
|
|
|
state_key: string
|
|
|
|
origin_server_ts: number
|
|
|
|
unsigned: any
|
|
|
|
event_id: string
|
|
|
|
user_id: string
|
|
|
|
age: number
|
|
|
|
replaces_state: string
|
|
|
|
prev_content?: any
|
|
|
|
}
|
|
|
|
|
|
|
|
export type M_Room_Message = {
|
|
|
|
msgtype: "m.text"
|
|
|
|
body: string
|
|
|
|
formatted_body?: "org.matrix.custom.html"
|
|
|
|
format?: string
|
|
|
|
}
|
2023-05-04 20:25:00 +00:00
|
|
|
|
2023-05-05 13:25:15 +00:00
|
|
|
export type M_Room_Member = {
|
|
|
|
membership: string
|
|
|
|
display_name?: string
|
|
|
|
avatar_url?: string
|
|
|
|
}
|
2023-07-04 05:19:17 +00:00
|
|
|
|
|
|
|
export type M_Reaction = {
|
|
|
|
"m.relates_to": {
|
|
|
|
rel_type: "m.annotation"
|
|
|
|
event_id: string // the event that was reacted to
|
|
|
|
key: string // the unicode emoji, mxc uri, or reaction text
|
|
|
|
}
|
|
|
|
}
|
2023-05-04 20:25:00 +00:00
|
|
|
}
|
|
|
|
|
2023-05-05 13:25:15 +00:00
|
|
|
namespace R {
|
|
|
|
export type RoomCreated = {
|
|
|
|
room_id: string
|
|
|
|
}
|
|
|
|
|
2023-05-08 12:58:46 +00:00
|
|
|
export type RoomJoined = {
|
|
|
|
room_id: string
|
|
|
|
}
|
|
|
|
|
2023-07-11 04:51:30 +00:00
|
|
|
export type RoomMember = {
|
|
|
|
avatar_url: string
|
|
|
|
display_name: string
|
|
|
|
}
|
|
|
|
|
2023-05-05 13:25:15 +00:00
|
|
|
export type FileUploaded = {
|
|
|
|
content_uri: string
|
|
|
|
}
|
2023-05-07 20:27:42 +00:00
|
|
|
|
|
|
|
export type Registered = {
|
|
|
|
/** "@localpart:domain.tld" */
|
|
|
|
user_id: string
|
|
|
|
home_server: string
|
|
|
|
access_token: string
|
|
|
|
device_id: string
|
|
|
|
}
|
2023-05-08 11:37:51 +00:00
|
|
|
|
|
|
|
export type EventSent = {
|
|
|
|
event_id: string
|
|
|
|
}
|
2023-05-04 20:25:00 +00:00
|
|
|
}
|