2021-11-18 11:08:12 +01:00
|
|
|
type ConverseJSTheme = 'peertube' | 'default' | 'concord'
|
2021-06-02 19:54:04 +02:00
|
|
|
|
2023-08-01 17:01:09 +02:00
|
|
|
interface InitConverseJSParams {
|
|
|
|
isRemoteChat: boolean
|
|
|
|
localAnonymousJID: string
|
|
|
|
remoteAnonymousJID: string | null
|
|
|
|
remoteAnonymousXMPPServer: boolean
|
|
|
|
remoteAuthenticatedXMPPServer: boolean
|
2023-08-01 18:42:24 +02:00
|
|
|
staticBaseUrl: string
|
2023-08-01 17:01:09 +02:00
|
|
|
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-12 01:16:57 +02:00
|
|
|
interface ProsodyListRoomsResultError {
|
|
|
|
ok: false
|
|
|
|
error: string
|
|
|
|
}
|
|
|
|
|
2021-08-05 18:25:27 +02:00
|
|
|
interface ProsodyListRoomsResultRoom {
|
|
|
|
jid: string
|
|
|
|
localpart: string
|
|
|
|
name: string
|
|
|
|
lang: string
|
|
|
|
description: string
|
|
|
|
lasttimestamp?: number
|
|
|
|
channel?: {
|
|
|
|
id: number
|
|
|
|
name: string
|
|
|
|
displayName: string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-12 01:16:57 +02:00
|
|
|
interface ProsodyListRoomsResultSuccess {
|
|
|
|
ok: true
|
2021-08-05 18:25:27 +02:00
|
|
|
rooms: ProsodyListRoomsResultRoom[]
|
2021-06-12 01:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type ProsodyListRoomsResult = ProsodyListRoomsResultError | ProsodyListRoomsResultSuccess
|
|
|
|
|
2023-08-09 16:16:02 +02:00
|
|
|
interface ChannelInfos {
|
|
|
|
id: number
|
|
|
|
name: string
|
|
|
|
displayName: string
|
|
|
|
}
|
|
|
|
|
2023-09-06 15:23:39 +02:00
|
|
|
interface ChannelConfigurationOptions {
|
2023-09-21 19:32:47 +02:00
|
|
|
bot: {
|
|
|
|
enabled: boolean
|
|
|
|
nickname?: string
|
|
|
|
forbiddenWords: Array<{
|
|
|
|
entries: string[]
|
|
|
|
regexp?: boolean
|
|
|
|
applyToModerators?: boolean
|
|
|
|
reason?: string
|
|
|
|
}>
|
|
|
|
quotes: Array<{
|
|
|
|
messages: string[]
|
|
|
|
delay: number
|
|
|
|
}>
|
|
|
|
commands: Array<{
|
|
|
|
command: string
|
|
|
|
message: string
|
|
|
|
}>
|
|
|
|
// TODO: bannedJIDs: string[]
|
|
|
|
}
|
2023-08-08 18:26:40 +02:00
|
|
|
}
|
|
|
|
|
2023-09-06 15:23:39 +02:00
|
|
|
interface ChannelConfiguration {
|
2023-08-09 16:16:02 +02:00
|
|
|
channel: ChannelInfos
|
2023-09-06 15:23:39 +02:00
|
|
|
configuration: ChannelConfigurationOptions
|
2023-08-09 16:16:02 +02:00
|
|
|
}
|
|
|
|
|
2022-12-07 18:36:16 +01:00
|
|
|
export type {
|
2021-11-18 11:08:12 +01:00
|
|
|
ConverseJSTheme,
|
2023-08-01 17:01:09 +02:00
|
|
|
InitConverseJSParams,
|
2021-08-05 18:25:27 +02:00
|
|
|
ProsodyListRoomsResult,
|
2023-08-08 18:26:40 +02:00
|
|
|
ProsodyListRoomsResultRoom,
|
2023-08-09 16:16:02 +02:00
|
|
|
ChannelInfos,
|
2023-09-06 15:23:39 +02:00
|
|
|
ChannelConfigurationOptions,
|
|
|
|
ChannelConfiguration
|
2021-06-02 19:54:04 +02:00
|
|
|
}
|