peertube-plugin-livechat/shared/lib/types.ts

75 lines
1.5 KiB
TypeScript
Raw Normal View History

2021-11-18 10:08:12 +00:00
type ConverseJSTheme = 'peertube' | 'default' | 'concord'
interface InitConverseJSParams {
isRemoteChat: boolean
localAnonymousJID: string
remoteAnonymousJID: string | null
remoteAnonymousXMPPServer: boolean
remoteAuthenticatedXMPPServer: boolean
staticBaseUrl: string
assetsPath: string
room: string
localBoshServiceUrl: string | null
localWebsocketServiceUrl: string | null
remoteBoshServiceUrl: string | null
remoteWebsocketServiceUrl: string | null
authenticationUrl: string
autoViewerMode: boolean
forceReadonly: boolean | 'noscroll'
theme: ConverseJSTheme
transparent: boolean
}
2021-06-11 23:16:57 +00:00
interface ProsodyListRoomsResultError {
ok: false
error: string
}
2021-08-05 16:25:27 +00:00
interface ProsodyListRoomsResultRoom {
jid: string
localpart: string
name: string
lang: string
description: string
lasttimestamp?: number
channel?: {
id: number
name: string
displayName: string
}
}
2021-06-11 23:16:57 +00:00
interface ProsodyListRoomsResultSuccess {
ok: true
2021-08-05 16:25:27 +00:00
rooms: ProsodyListRoomsResultRoom[]
2021-06-11 23:16:57 +00:00
}
type ProsodyListRoomsResult = ProsodyListRoomsResultError | ProsodyListRoomsResultSuccess
2023-08-09 14:16:02 +00:00
interface ChannelInfos {
id: number
name: string
displayName: string
}
2023-08-08 16:26:40 +00:00
interface ChannelModerationOptions {
2023-08-09 10:20:19 +00:00
bot: boolean
forbiddenWords: string[]
bannedJIDs: string[]
2023-08-08 16:26:40 +00:00
}
2023-08-09 14:16:02 +00:00
interface ChannelModeration {
channel: ChannelInfos
moderation: ChannelModerationOptions
}
export type {
2021-11-18 10:08:12 +00:00
ConverseJSTheme,
InitConverseJSParams,
2021-08-05 16:25:27 +00:00
ProsodyListRoomsResult,
2023-08-08 16:26:40 +00:00
ProsodyListRoomsResultRoom,
2023-08-09 14:16:02 +00:00
ChannelInfos,
ChannelModerationOptions,
ChannelModeration
}