mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Refactor ConnectionState to a shared enum
This commit is contained in:
parent
f3dda2e783
commit
7e9bf96668
6 changed files with 39 additions and 25 deletions
9
src/apiclient.d.ts
vendored
9
src/apiclient.d.ts
vendored
|
@ -68,6 +68,7 @@ declare module 'jellyfin-apiclient' {
|
|||
UtcTimeResponse,
|
||||
VirtualFolderInfo
|
||||
} from '@jellyfin/sdk/lib/generated-client';
|
||||
import { ConnectionState } from './utils/jellyfin-apiclient/ConnectionState';
|
||||
|
||||
class ApiClient {
|
||||
constructor(serverAddress: string, appName: string, appVersion: string, deviceName: string, deviceId: string);
|
||||
|
@ -310,12 +311,18 @@ declare module 'jellyfin-apiclient' {
|
|||
setItem(name: string, value: string): void;
|
||||
}
|
||||
|
||||
interface ConnectResponse {
|
||||
ApiClient: ApiClient
|
||||
Servers: any[]
|
||||
State: ConnectionState
|
||||
}
|
||||
|
||||
class ConnectionManager {
|
||||
constructor(credentialProvider: Credentials, appName: string, appVersion: string, deviceName: string, deviceId: string, capabilities: ClientCapabilities);
|
||||
|
||||
addApiClient(apiClient: ApiClient): void;
|
||||
clearData(): void;
|
||||
connect(options?: any): Promise<any>;
|
||||
connect(options?: any): Promise<ConnectResponse>;
|
||||
connectToAddress(address: string, options?: any): Promise<any>;
|
||||
connectToServer(server: any, options?: any): Promise<any>;
|
||||
connectToServers(servers: any[], options?: any): Promise<any>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue