peertube-plugin-livechat/client/@types/peertube.d.ts

43 lines
1.2 KiB
TypeScript
Raw Normal View History

2021-04-09 11:07:42 +00:00
// TODO: import @types/peertube when available
interface RegisterClientHookOptions {
target: string // FIXME
handler: Function
priority?: number
}
interface RegisterClientHelpers {
getBaseStaticRoute: () => string
isLoggedIn: () => boolean
getSettings: () => Promise<{ [ name: string ]: string }>
notifier: {
info: (text: string, title?: string, timeout?: number) => void
error: (text: string, title?: string, timeout?: number) => void
success: (text: string, title?: string, timeout?: number) => void
}
showModal: (input: {
title: string
content: string
close?: boolean
cancel?: { value: string, action?: () => void }
confirm?: { value: string, action?: () => void }
}) => void
markdownRenderer: {
textMarkdownToHTML: (textMarkdown: string) => Promise<string>
enhancedMarkdownToHTML: (enhancedMarkdown: string) => Promise<string>
}
translate: (toTranslate: string) => Promise<string>
}
2021-04-07 16:14:58 +00:00
interface RegisterOptions {
2021-04-09 11:07:42 +00:00
registerHook: (options: RegisterClientHookOptions) => void
peertubeHelpers: RegisterClientHelpers
2021-04-07 16:14:58 +00:00
}
interface Video {
isLive: boolean
isLocal: boolean
originInstanceUrl: string
uuid: string
}