X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Ftypes%2Fregister-client-option.model.ts;h=2c09f15a7c655acf21523ef753fc1a9fc27f3fff;hb=118626c8752bee7b05c4e0b668852e1aba2416f1;hp=dff00e9dd93d924c4e6d98f32667dbc4bca5be79;hpb=8c7725dc3c01a73bf56a48c8b192d144bfdc3ffe;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/types/register-client-option.model.ts b/client/src/types/register-client-option.model.ts index dff00e9dd..2c09f15a7 100644 --- a/client/src/types/register-client-option.model.ts +++ b/client/src/types/register-client-option.model.ts @@ -1,29 +1,53 @@ -import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model' +import { + RegisterClientFormFieldOptions, + RegisterClientHookOptions, + RegisterClientRouteOptions, + RegisterClientSettingsScriptOptions, + RegisterClientVideoFieldOptions, + ServerConfig, SettingEntries +} from '@shared/models' export type RegisterClientOptions = { registerHook: (options: RegisterClientHookOptions) => void + registerVideoField: (commonOptions: RegisterClientFormFieldOptions, videoFormOptions: RegisterClientVideoFieldOptions) => void + + registerSettingsScript: (options: RegisterClientSettingsScriptOptions) => void + + registerClientRoute: (options: RegisterClientRouteOptions) => void + peertubeHelpers: RegisterClientHelpers } export type RegisterClientHelpers = { getBaseStaticRoute: () => string + getBaseRouterRoute: () => string + + // PeerTube >= 5.0 + getBaseWebSocketRoute: () => string + + getBasePluginClientPath: () => string + isLoggedIn: () => boolean - getSettings: () => Promise<{ [ name: string ]: string }> + getAuthHeader: () => { 'Authorization': string } | undefined + + getSettings: () => Promise + + getServerConfig: () => Promise notifier: { - info: (text: string, title?: string, timeout?: number) => void, - error: (text: string, title?: string, timeout?: number) => void, + 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 }, + title: string + content: string + close?: boolean + cancel?: { value: string, action?: () => void } confirm?: { value: string, action?: () => void } }) => void