2023-09-14 00:32:27 +00:00
|
|
|
export type Models = {
|
|
|
|
channel_room: {
|
|
|
|
channel_id: string
|
|
|
|
room_id: string
|
|
|
|
name: string
|
|
|
|
nick: string | null
|
|
|
|
thread_parent: string | null
|
|
|
|
custom_avatar: string | null
|
2024-01-17 11:30:55 +00:00
|
|
|
last_bridged_pin_timestamp: number | null
|
2024-01-19 12:01:34 +00:00
|
|
|
speedbump_id: string | null
|
|
|
|
speedbump_checked: number | null
|
2023-09-14 00:32:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
event_message: {
|
|
|
|
event_id: string
|
|
|
|
message_id: string
|
|
|
|
event_type: string | null
|
|
|
|
event_subtype: string | null
|
|
|
|
part: number
|
2023-10-14 09:08:10 +00:00
|
|
|
reaction_part: number
|
2023-09-14 00:32:27 +00:00
|
|
|
source: number
|
|
|
|
}
|
|
|
|
|
|
|
|
file: {
|
|
|
|
discord_url: string
|
|
|
|
mxc_url: string
|
|
|
|
}
|
|
|
|
|
|
|
|
guild_space: {
|
|
|
|
guild_id: string
|
|
|
|
space_id: string
|
2023-10-12 07:30:41 +00:00
|
|
|
privacy_level: number
|
2023-09-14 00:32:27 +00:00
|
|
|
}
|
|
|
|
|
2023-09-18 10:51:59 +00:00
|
|
|
lottie: {
|
2023-10-04 23:32:05 +00:00
|
|
|
sticker_id: string
|
|
|
|
mxc_url: string
|
2023-09-18 10:51:59 +00:00
|
|
|
}
|
|
|
|
|
2023-09-14 00:32:27 +00:00
|
|
|
member_cache: {
|
|
|
|
room_id: string
|
|
|
|
mxid: string
|
|
|
|
displayname: string | null
|
|
|
|
avatar_url: string | null
|
|
|
|
}
|
|
|
|
|
|
|
|
message_channel: {
|
|
|
|
message_id: string
|
|
|
|
channel_id: string
|
|
|
|
}
|
|
|
|
|
|
|
|
sim: {
|
2023-10-04 23:32:05 +00:00
|
|
|
user_id: string
|
2023-09-14 00:32:27 +00:00
|
|
|
sim_name: string
|
|
|
|
localpart: string
|
|
|
|
mxid: string
|
|
|
|
}
|
|
|
|
|
|
|
|
sim_member: {
|
|
|
|
mxid: string
|
|
|
|
room_id: string
|
2023-09-30 12:24:05 +00:00
|
|
|
hashed_profile_content: number
|
2023-09-14 00:32:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
webhook: {
|
|
|
|
channel_id: string
|
|
|
|
webhook_id: string
|
|
|
|
webhook_token: string
|
|
|
|
}
|
2023-09-19 05:43:57 +00:00
|
|
|
|
|
|
|
emoji: {
|
2023-10-05 23:31:10 +00:00
|
|
|
emoji_id: string
|
2023-09-19 12:37:15 +00:00
|
|
|
name: string
|
2023-09-19 05:43:57 +00:00
|
|
|
animated: number
|
|
|
|
mxc_url: string
|
|
|
|
}
|
2023-09-25 03:26:48 +00:00
|
|
|
|
|
|
|
reaction: {
|
|
|
|
hashed_event_id: number
|
|
|
|
message_id: string
|
|
|
|
encoded_emoji: string
|
|
|
|
}
|
2023-10-07 10:39:49 +00:00
|
|
|
|
|
|
|
auto_emoji: {
|
|
|
|
name: string
|
|
|
|
emoji_id: string
|
|
|
|
guild_id: string
|
|
|
|
}
|
2023-09-14 00:32:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export type Prepared<Row> = {
|
|
|
|
pluck: () => Prepared<Row[keyof Row]>
|
2023-09-30 12:24:05 +00:00
|
|
|
safeIntegers: () => Prepared<{[K in keyof Row]: Row[K] extends number ? BigInt : Row[K]}>
|
2023-10-07 11:00:34 +00:00
|
|
|
raw: () => Prepared<Row[keyof Row][]>
|
2023-09-14 00:32:27 +00:00
|
|
|
all: (..._: any[]) => Row[]
|
2023-09-30 12:24:05 +00:00
|
|
|
get: (..._: any[]) => Row | null
|
2023-09-14 00:32:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export type AllKeys<U> = U extends any ? keyof U : never
|
|
|
|
export type PickTypeOf<T, K extends AllKeys<T>> = T extends { [k in K]?: any } ? T[K] : never
|
|
|
|
export type Merge<U> = {[x in AllKeys<U>]: PickTypeOf<U, x>}
|