peertube-plugin-livechat/shared/lib/types.ts
2021-11-18 11:08:12 +01:00

36 lines
724 B
TypeScript

type ChatType = 'disabled' | 'builtin-prosody' | 'builtin-converse' | 'external-uri'
type ConverseJSTheme = 'peertube' | 'default' | 'concord'
interface ProsodyListRoomsResultError {
ok: false
error: string
}
interface ProsodyListRoomsResultRoom {
jid: string
localpart: string
name: string
lang: string
description: string
lasttimestamp?: number
channel?: {
id: number
name: string
displayName: string
}
}
interface ProsodyListRoomsResultSuccess {
ok: true
rooms: ProsodyListRoomsResultRoom[]
}
type ProsodyListRoomsResult = ProsodyListRoomsResultError | ProsodyListRoomsResultSuccess
export {
ChatType,
ConverseJSTheme,
ProsodyListRoomsResult,
ProsodyListRoomsResultRoom
}