peertube-plugin-livechat/shared/lib/types.ts
2021-08-05 18:25:27 +02:00

34 lines
647 B
TypeScript

type ChatType = 'disabled' | 'builtin-prosody' | 'builtin-converse' | 'external-uri'
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,
ProsodyListRoomsResult,
ProsodyListRoomsResultRoom
}