5427 lines
212 KiB
TypeScript
5427 lines
212 KiB
TypeScript
|
|
/* File: D:\TeaSpeak\web\shared\js\audio\audio.ts */
|
|
declare namespace audio {
|
|
export namespace player {
|
|
export interface Device {
|
|
device_id: string;
|
|
driver: string;
|
|
name: string;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\bookmarks.ts */
|
|
declare namespace bookmarks {
|
|
export const boorkmak_connect;
|
|
export interface ServerProperties {
|
|
server_address: string;
|
|
server_port: number;
|
|
server_password_hash?: string;
|
|
server_password?: string;
|
|
}
|
|
export enum BookmarkType {
|
|
ENTRY,
|
|
DIRECTORY
|
|
}
|
|
export interface Bookmark {
|
|
type: BookmarkType;
|
|
/* readonly */ parent: DirectoryBookmark;
|
|
server_properties: ServerProperties;
|
|
display_name: string;
|
|
unique_id: string;
|
|
nickname: string;
|
|
default_channel?: number | string;
|
|
default_channel_password_hash?: string;
|
|
default_channel_password?: string;
|
|
connect_profile: string;
|
|
last_icon_id?: number;
|
|
}
|
|
export interface DirectoryBookmark {
|
|
type: BookmarkType;
|
|
/* readonly */ parent: DirectoryBookmark;
|
|
readonly content: (Bookmark | DirectoryBookmark)[];
|
|
unique_id: string;
|
|
display_name: string;
|
|
}
|
|
export function bookmarks(): DirectoryBookmark;
|
|
export function bookmarks_flat(): Bookmark[];
|
|
export function find_bookmark(uuid: string): Bookmark | DirectoryBookmark | undefined;
|
|
export function parent_bookmark(bookmark: Bookmark): DirectoryBookmark;
|
|
export function create_bookmark(display_name: string, directory: DirectoryBookmark, server_properties: ServerProperties, nickname: string): Bookmark;
|
|
export function create_bookmark_directory(parent: DirectoryBookmark, name: string): DirectoryBookmark;
|
|
//TODO test if the new parent is within the old bookmark
|
|
export function change_directory(parent: DirectoryBookmark, bookmark: Bookmark | DirectoryBookmark);
|
|
export function save_bookmark(bookmark?: Bookmark | DirectoryBookmark);
|
|
export function delete_bookmark(bookmark: Bookmark | DirectoryBookmark);
|
|
export function add_current_server();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\BrowserIPC.ts */
|
|
declare interface Window {
|
|
BroadcastChannel: BroadcastChannel;
|
|
}
|
|
declare namespace bipc {
|
|
export interface BroadcastMessage {
|
|
timestamp: number;
|
|
receiver: string;
|
|
sender: string;
|
|
type: string;
|
|
data: any;
|
|
}
|
|
export interface ChannelMessage {
|
|
channel_id: string;
|
|
type: string;
|
|
data: any;
|
|
}
|
|
export interface ProcessQueryResponse {
|
|
request_timestamp: number;
|
|
request_query_id: string;
|
|
device_id: string;
|
|
protocol: number;
|
|
}
|
|
export interface CertificateAcceptCallback {
|
|
request_id: string;
|
|
}
|
|
export interface CertificateAcceptSucceeded {
|
|
}
|
|
export abstract class BasicIPCHandler {
|
|
protected static readonly BROADCAST_UNIQUE_ID;
|
|
protected static readonly PROTOCOL_VERSION;
|
|
protected _channels: Channel[];
|
|
protected unique_id;
|
|
protected constructor();
|
|
setup();
|
|
get_local_address();
|
|
abstract send_message(type: string, data: any, target?: string);
|
|
protected handle_message(message: BroadcastMessage);
|
|
create_channel(target_id?: string, channel_id?: string);
|
|
channels(): Channel[];
|
|
delete_channel(channel: Channel);
|
|
private _query_results: {
|
|
[key: string]: ProcessQueryResponse[];
|
|
};
|
|
query_processes(timeout?: number): Promise<ProcessQueryResponse[]>;
|
|
private _cert_accept_callbacks: {
|
|
[key: string]: (() => any);
|
|
};
|
|
register_certificate_accept_callback(callback: () => any): string;
|
|
private _cert_accept_succeeded: {
|
|
[sender: string]: (() => any);
|
|
};
|
|
post_certificate_accpected(id: string, timeout?: number): Promise<void>;
|
|
}
|
|
export interface Channel {
|
|
readonly channel_id: string;
|
|
target_id?: string;
|
|
message_handler: (remote_id: string, broadcast: boolean, message: ChannelMessage) => any;
|
|
send_message(type: string, message: any, target?: string);
|
|
}
|
|
export class BroadcastChannelIPC extends BasicIPCHandler {
|
|
private static readonly CHANNEL_NAME;
|
|
private channel: BroadcastChannel;
|
|
constructor();
|
|
setup();
|
|
private on_message(event: MessageEvent);
|
|
private on_error(event: MessageEvent);
|
|
send_message(type: string, data: any, target?: string);
|
|
}
|
|
export namespace connect {
|
|
export type ConnectRequestData = {
|
|
address: string;
|
|
profile?: string;
|
|
username?: string;
|
|
password?: {
|
|
value: string;
|
|
hashed: boolean;
|
|
};
|
|
};
|
|
export interface ConnectOffer {
|
|
request_id: string;
|
|
data: ConnectRequestData;
|
|
}
|
|
export interface ConnectOfferAnswer {
|
|
request_id: string;
|
|
accepted: boolean;
|
|
}
|
|
export interface ConnectExecute {
|
|
request_id: string;
|
|
}
|
|
export interface ConnectExecuted {
|
|
request_id: string;
|
|
succeeded: boolean;
|
|
message?: string;
|
|
}
|
|
/* The connect process:
|
|
* 1. Broadcast an offer
|
|
* 2. Wait 50ms for all offer responses or until the first one respond with "ok"
|
|
* 3. Select (if possible) on accepted offer and execute the connect
|
|
*/
|
|
export class ConnectHandler {
|
|
private static readonly CHANNEL_NAME;
|
|
readonly ipc_handler: BasicIPCHandler;
|
|
private ipc_channel: Channel;
|
|
public callback_available: (data: ConnectRequestData) => boolean;
|
|
public callback_execute: (data: ConnectRequestData) => boolean | string;
|
|
private _pending_connect_offers: {
|
|
id: string;
|
|
data: ConnectRequestData;
|
|
timeout: number;
|
|
remote_handler: string;
|
|
}[];
|
|
private _pending_connects_requests: {
|
|
id: string;
|
|
data: ConnectRequestData;
|
|
timeout: number;
|
|
callback_success: () => any;
|
|
callback_failed: (message: string) => any;
|
|
callback_avail: () => Promise<boolean>;
|
|
remote_handler?: string;
|
|
}[];
|
|
constructor(ipc_handler: BasicIPCHandler);
|
|
public setup();
|
|
private on_message(sender: string, broadcast: boolean, message: ChannelMessage);
|
|
post_connect_request(data: ConnectRequestData, callback_avail: () => Promise<boolean>): Promise<void>;
|
|
}
|
|
}
|
|
export namespace mproxy {
|
|
export interface MethodProxyInvokeData {
|
|
method_name: string;
|
|
arguments: any[];
|
|
promise_id: string;
|
|
}
|
|
export interface MethodProxyResultData {
|
|
promise_id: string;
|
|
result: any;
|
|
success: boolean;
|
|
}
|
|
export interface MethodProxyCallback {
|
|
promise: Promise<any>;
|
|
promise_id: string;
|
|
resolve: (object: any) => any;
|
|
reject: (object: any) => any;
|
|
}
|
|
export type MethodProxyConnectParameters = {
|
|
channel_id: string;
|
|
client_id: string;
|
|
};
|
|
export abstract class MethodProxy {
|
|
readonly ipc_handler: BasicIPCHandler;
|
|
private _ipc_channel: Channel;
|
|
private _ipc_parameters: MethodProxyConnectParameters;
|
|
private readonly _local: boolean;
|
|
private readonly _slave: boolean;
|
|
private _connected: boolean;
|
|
private _proxied_methods: {
|
|
[key: string]: () => Promise<any>;
|
|
};
|
|
private _proxied_callbacks: {
|
|
[key: string]: MethodProxyCallback;
|
|
};
|
|
protected constructor(ipc_handler: BasicIPCHandler, connect_params?: MethodProxyConnectParameters);
|
|
protected setup();
|
|
protected finalize();
|
|
protected register_method<R>(method: (...args: any[]) => Promise<R> | string);
|
|
private _handle_message(remote_id: string, boradcast: boolean, message: ChannelMessage);
|
|
private _handle_finalize();
|
|
private _handle_remote_callback(remote_id: string);
|
|
private _send_result(promise_id: string, success: boolean, message: any);
|
|
private _handle_invoke(data: MethodProxyInvokeData);
|
|
private _handle_result(data: MethodProxyResultData);
|
|
generate_connect_parameters(): MethodProxyConnectParameters;
|
|
is_slave();
|
|
is_master();
|
|
protected abstract on_connected();
|
|
protected abstract on_disconnected();
|
|
}
|
|
}
|
|
export function setup();
|
|
export function get_handler();
|
|
export function get_connect_handler();
|
|
export function supported();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\connection\CommandHandler.ts */
|
|
declare namespace connection {
|
|
export class ServerConnectionCommandBoss extends AbstractCommandHandlerBoss {
|
|
constructor(connection: AbstractServerConnection);
|
|
}
|
|
export class ConnectionCommandHandler extends AbstractCommandHandler {
|
|
readonly connection: AbstractServerConnection;
|
|
readonly connection_handler: ConnectionHandler;
|
|
constructor(connection: AbstractServerConnection);
|
|
private loggable_invoker(unique_id, client_id, name): log.server.base.Client | undefined;
|
|
proxy_command_promise(promise: Promise<CommandResult>, options: connection.CommandOptions);
|
|
handle_command(command: ServerCommand): boolean;
|
|
set_handler(command: string, handler: any);
|
|
unset_handler(command: string, handler?: any);
|
|
handleCommandResult(json);
|
|
handleCommandServerInit(json);
|
|
handleNotifyServerConnectionInfo(json);
|
|
handleNotifyConnectionInfo(json);
|
|
private createChannelFromJson(json, ignoreOrder?: boolean);
|
|
handleCommandChannelList(json);
|
|
handleCommandChannelListFinished(json);
|
|
handleCommandChannelCreate(json);
|
|
handleCommandChannelShow(json);
|
|
handleCommandChannelDelete(json);
|
|
handleCommandChannelHide(json);
|
|
handleCommandClientEnterView(json);
|
|
handleCommandClientLeftView(json);
|
|
handleNotifyClientMoved(json);
|
|
handleNotifyChannelMoved(json);
|
|
handleNotifyChannelEdited(json);
|
|
handleNotifyTextMessage(json);
|
|
notifyClientChatComposing(json);
|
|
handleNotifyClientChatClosed(json);
|
|
handleNotifyClientUpdated(json);
|
|
handleNotifyServerEdited(json);
|
|
handleNotifyServerUpdated(json);
|
|
handleNotifyMusicPlayerInfo(json);
|
|
handleNotifyClientPoke(json);
|
|
//TODO server chat message
|
|
handleNotifyServerGroupClientAdd(json);
|
|
//TODO server chat message
|
|
handleNotifyServerGroupClientRemove(json);
|
|
//TODO server chat message
|
|
handleNotifyClientChannelGroupChanged(json);
|
|
handleNotifyChannelSubscribed(json);
|
|
handleNotifyChannelUnsubscribed(json);
|
|
handleNotifyConversationHistory(json: any[]);
|
|
handleNotifyConversationMessageDelete(json: any[]);
|
|
handleNotifyMusicStatusUpdate(json: any[]);
|
|
handleMusicPlayerSongChange(json: any[]);
|
|
handleNotifyPlaylistSongAdd(json: any[]);
|
|
handleNotifyPlaylistSongRemove(json: any[]);
|
|
handleNotifyPlaylistSongReorder(json: any[]);
|
|
handleNotifyPlaylistSongLoaded(json: any[]);
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\connection\CommandHelper.ts */
|
|
declare namespace connection {
|
|
export class CommandHelper extends AbstractCommandHandler {
|
|
private _who_am_i: any;
|
|
private _awaiters_unique_ids: {
|
|
[unique_id: string]: ((resolved: ClientNameInfo) => any)[];
|
|
};
|
|
private _awaiters_unique_dbid: {
|
|
[database_id: number]: ((resolved: ClientNameInfo) => any)[];
|
|
};
|
|
constructor(connection);
|
|
initialize();
|
|
destroy();
|
|
handle_command(command: connection.ServerCommand): boolean;
|
|
joinChannel(channel: ChannelEntry, password?: string): Promise<CommandResult>;
|
|
sendMessage(message: string, type: ChatType, target?: ChannelEntry | ClientEntry): Promise<CommandResult>;
|
|
updateClient(key: string, value: string): Promise<CommandResult>;
|
|
info_from_uid(..._unique_ids: string[]): Promise<ClientNameInfo[]>;
|
|
private handle_notifyclientgetnamefromdbid(json: any[]);
|
|
info_from_cldbid(..._cldbid: number[]): Promise<ClientNameInfo[]>;
|
|
private handle_notifyclientnamefromuid(json: any[]);
|
|
request_query_list(server_id?: number): Promise<QueryList>;
|
|
request_playlist_list(): Promise<Playlist[]>;
|
|
request_playlist_songs(playlist_id: number): Promise<PlaylistSong[]>;
|
|
request_playlist_client_list(playlist_id: number): Promise<number[]>;
|
|
request_clients_by_server_group(group_id: number): Promise<ServerGroupClient[]>;
|
|
request_playlist_info(playlist_id: number): Promise<PlaylistInfo>;
|
|
/**
|
|
* @deprecated
|
|
* Its just a workaround for the query management.
|
|
* There is no garante that the whoami trick will work forever
|
|
*/
|
|
current_virtual_server_id(): Promise<number>;
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\connection\ConnectionBase.ts */
|
|
declare namespace connection {
|
|
export interface CommandOptions {
|
|
flagset?: string[];
|
|
process_result?: boolean;
|
|
timeout?: number /* default: 1000 */;
|
|
}
|
|
export const CommandOptionDefaults: CommandOptions;
|
|
export type ConnectionStateListener = (old_state: ConnectionState, new_state: ConnectionState) => any;
|
|
export abstract class AbstractServerConnection {
|
|
readonly client: ConnectionHandler;
|
|
readonly command_helper: CommandHelper;
|
|
protected constructor(client: ConnectionHandler);
|
|
/* resolved as soon a connection has been established. This does not means that the authentication had yet been done! */
|
|
abstract connect(address: ServerAddress, handshake: HandshakeHandler, timeout?: number): Promise<void>;
|
|
abstract connected(): boolean;
|
|
abstract disconnect(reason?: string): Promise<void>;
|
|
abstract support_voice(): boolean;
|
|
abstract voice_connection(): voice.AbstractVoiceConnection | undefined;
|
|
abstract command_handler_boss(): AbstractCommandHandlerBoss;
|
|
abstract send_command(command: string, data?: any | any[], options?: CommandOptions): Promise<CommandResult>;
|
|
// @ts-ignore
|
|
abstract get onconnectionstatechanged(): ConnectionStateListener;
|
|
// @ts-ignore
|
|
abstract set onconnectionstatechanged(listener: ConnectionStateListener);
|
|
abstract remote_address(): ServerAddress;
|
|
abstract handshake_handler(): HandshakeHandler;
|
|
abstract ping(): {
|
|
native: number;
|
|
javascript?: number;
|
|
};
|
|
}
|
|
export namespace voice {
|
|
export enum PlayerState {
|
|
PREBUFFERING,
|
|
PLAYING,
|
|
BUFFERING,
|
|
STOPPING,
|
|
STOPPED
|
|
}
|
|
export type LatencySettings = {
|
|
min_buffer: number; /* milliseconds */
|
|
max_buffer: number; /* milliseconds */
|
|
};
|
|
export interface VoiceClient {
|
|
client_id: number;
|
|
callback_playback: () => any;
|
|
callback_stopped: () => any;
|
|
callback_state_changed: (new_state: PlayerState) => any;
|
|
get_state(): PlayerState;
|
|
get_volume(): number;
|
|
set_volume(volume: number): void;
|
|
abort_replay();
|
|
support_latency_settings(): boolean;
|
|
reset_latency_settings();
|
|
latency_settings(settings?: LatencySettings): LatencySettings;
|
|
support_flush(): boolean;
|
|
flush();
|
|
}
|
|
export abstract class AbstractVoiceConnection {
|
|
readonly connection: AbstractServerConnection;
|
|
protected constructor(connection: AbstractServerConnection);
|
|
abstract connected(): boolean;
|
|
abstract encoding_supported(codec: number): boolean;
|
|
abstract decoding_supported(codec: number): boolean;
|
|
abstract register_client(client_id: number): VoiceClient;
|
|
abstract available_clients(): VoiceClient[];
|
|
abstract unregister_client(client: VoiceClient): Promise<void>;
|
|
abstract voice_recorder(): RecorderProfile;
|
|
abstract acquire_voice_recorder(recorder: RecorderProfile | undefined): Promise<void>;
|
|
abstract get_encoder_codec(): number;
|
|
abstract set_encoder_codec(codec: number);
|
|
}
|
|
}
|
|
export class ServerCommand {
|
|
command: string;
|
|
arguments: any[];
|
|
}
|
|
export abstract class AbstractCommandHandler {
|
|
readonly connection: AbstractServerConnection;
|
|
handler_boss: AbstractCommandHandlerBoss | undefined;
|
|
volatile_handler_boss: boolean;
|
|
ignore_consumed: boolean;
|
|
protected constructor(connection: AbstractServerConnection);
|
|
/**
|
|
* @return If the command should be consumed
|
|
*/
|
|
abstract handle_command(command: ServerCommand): boolean;
|
|
}
|
|
export interface SingleCommandHandler {
|
|
name?: string;
|
|
command?: string;
|
|
timeout?: number;
|
|
/* if the return is true then the command handler will be removed */
|
|
function: (command: ServerCommand) => boolean;
|
|
}
|
|
export abstract class AbstractCommandHandlerBoss {
|
|
readonly connection: AbstractServerConnection;
|
|
protected command_handlers: AbstractCommandHandler[];
|
|
/* TODO: Timeout */
|
|
protected single_command_handler: SingleCommandHandler[];
|
|
protected constructor(connection: AbstractServerConnection);
|
|
destroy();
|
|
register_handler(handler: AbstractCommandHandler);
|
|
unregister_handler(handler: AbstractCommandHandler);
|
|
register_single_handler(handler: SingleCommandHandler);
|
|
remove_single_handler(handler: SingleCommandHandler);
|
|
handlers(): AbstractCommandHandler[];
|
|
invoke_handle(command: ServerCommand): boolean;
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\connection\HandshakeHandler.ts */
|
|
declare namespace connection {
|
|
export interface HandshakeIdentityHandler {
|
|
connection: AbstractServerConnection;
|
|
start_handshake();
|
|
register_callback(callback: (success: boolean, message?: string) => any);
|
|
}
|
|
export class HandshakeHandler {
|
|
private connection: AbstractServerConnection;
|
|
private handshake_handler: HandshakeIdentityHandler;
|
|
private failed;
|
|
readonly profile: profiles.ConnectionProfile;
|
|
readonly parameters: ConnectParameters;
|
|
constructor(profile: profiles.ConnectionProfile, parameters: ConnectParameters);
|
|
setConnection(con: AbstractServerConnection);
|
|
initialize();
|
|
get_identity_handler(): HandshakeIdentityHandler;
|
|
startHandshake();
|
|
on_teamspeak();
|
|
private handshake_failed(message: string);
|
|
private handshake_finished(version?: string);
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\connection\ServerConnectionDeclaration.ts */
|
|
declare enum ErrorID {
|
|
NOT_IMPLEMENTED = 0x2,
|
|
COMMAND_NOT_FOUND = 0x100,
|
|
PERMISSION_ERROR = 2568,
|
|
EMPTY_RESULT = 0x0501,
|
|
PLAYLIST_IS_IN_USE = 0x2103,
|
|
FILE_ALREADY_EXISTS = 2050,
|
|
CLIENT_INVALID_ID = 0x0200,
|
|
CONVERSATION_INVALID_ID = 0x2200,
|
|
CONVERSATION_MORE_DATA = 0x2201,
|
|
CONVERSATION_IS_PRIVATE = 0x2202
|
|
}
|
|
declare class CommandResult {
|
|
success: boolean;
|
|
id: number;
|
|
message: string;
|
|
extra_message: string;
|
|
json: any;
|
|
constructor(json);
|
|
}
|
|
declare interface ClientNameInfo {
|
|
//cluid=tYzKUryn\/\/Y8VBMf8PHUT6B1eiE= name=Exp clname=Exp cldbid=9
|
|
client_unique_id: string;
|
|
client_nickname: string;
|
|
client_database_id: number;
|
|
}
|
|
declare interface ClientNameFromUid {
|
|
promise: LaterPromise<ClientNameInfo[]>;
|
|
keys: string[];
|
|
response: ClientNameInfo[];
|
|
}
|
|
declare interface ServerGroupClient {
|
|
client_nickname: string;
|
|
client_unique_identifier: string;
|
|
client_database_id: number;
|
|
}
|
|
declare interface QueryListEntry {
|
|
username: string;
|
|
unique_id: string;
|
|
bounded_server: number;
|
|
}
|
|
declare interface QueryList {
|
|
flag_own: boolean;
|
|
flag_all: boolean;
|
|
queries: QueryListEntry[];
|
|
}
|
|
declare interface Playlist {
|
|
playlist_id: number;
|
|
playlist_bot_id: number;
|
|
playlist_title: string;
|
|
playlist_type: number;
|
|
playlist_owner_dbid: number;
|
|
playlist_owner_name: string;
|
|
needed_power_modify: number;
|
|
needed_power_permission_modify: number;
|
|
needed_power_delete: number;
|
|
needed_power_song_add: number;
|
|
needed_power_song_move: number;
|
|
needed_power_song_remove: number;
|
|
}
|
|
declare interface PlaylistInfo {
|
|
playlist_id: number;
|
|
playlist_title: string;
|
|
playlist_description: string;
|
|
playlist_type: number;
|
|
playlist_owner_dbid: number;
|
|
playlist_owner_name: string;
|
|
playlist_flag_delete_played: boolean;
|
|
playlist_flag_finished: boolean;
|
|
playlist_replay_mode: number;
|
|
playlist_current_song_id: number;
|
|
playlist_max_songs: number;
|
|
}
|
|
declare interface PlaylistSong {
|
|
song_id: number;
|
|
song_previous_song_id: number;
|
|
song_invoker: string;
|
|
song_url: string;
|
|
song_url_loader: string;
|
|
song_loaded: boolean;
|
|
song_metadata: string;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ConnectionHandler.ts */
|
|
declare enum DisconnectReason {
|
|
HANDLER_DESTROYED,
|
|
REQUESTED,
|
|
DNS_FAILED,
|
|
CONNECT_FAILURE,
|
|
CONNECTION_CLOSED,
|
|
CONNECTION_FATAL_ERROR,
|
|
CONNECTION_PING_TIMEOUT,
|
|
CLIENT_KICKED,
|
|
CLIENT_BANNED,
|
|
HANDSHAKE_FAILED,
|
|
HANDSHAKE_TEAMSPEAK_REQUIRED,
|
|
HANDSHAKE_BANNED,
|
|
SERVER_CLOSED,
|
|
SERVER_REQUIRES_PASSWORD,
|
|
SERVER_HOSTMESSAGE,
|
|
IDENTITY_TOO_LOW,
|
|
UNKNOWN
|
|
}
|
|
declare enum ConnectionState {
|
|
UNCONNECTED,
|
|
CONNECTING,
|
|
INITIALISING,
|
|
CONNECTED,
|
|
DISCONNECTING
|
|
}
|
|
declare enum ViewReasonId {
|
|
VREASON_USER_ACTION = 0,
|
|
VREASON_MOVED = 1,
|
|
VREASON_SYSTEM = 2,
|
|
VREASON_TIMEOUT = 3,
|
|
VREASON_CHANNEL_KICK = 4,
|
|
VREASON_SERVER_KICK = 5,
|
|
VREASON_BAN = 6,
|
|
VREASON_SERVER_STOPPED = 7,
|
|
VREASON_SERVER_LEFT = 8,
|
|
VREASON_CHANNEL_UPDATED = 9,
|
|
VREASON_EDITED = 10,
|
|
VREASON_SERVER_SHUTDOWN = 11
|
|
}
|
|
declare interface VoiceStatus {
|
|
input_hardware: boolean;
|
|
input_muted: boolean;
|
|
output_muted: boolean;
|
|
channel_codec_encoding_supported: boolean;
|
|
channel_codec_decoding_supported: boolean;
|
|
sound_playback_supported: boolean;
|
|
sound_record_supported;
|
|
away: boolean | string;
|
|
channel_subscribe_all: boolean;
|
|
queries_visible: boolean;
|
|
}
|
|
declare interface ConnectParameters {
|
|
nickname?: string;
|
|
channel?: {
|
|
target: string | number;
|
|
password?: string;
|
|
};
|
|
token?: string;
|
|
password?: {
|
|
password: string;
|
|
hashed: boolean;
|
|
};
|
|
auto_reconnect_attempt?: boolean;
|
|
}
|
|
declare class ConnectionHandler {
|
|
channelTree: ChannelTree;
|
|
serverConnection: connection.AbstractServerConnection;
|
|
fileManager: FileManager;
|
|
permissions: PermissionManager;
|
|
groups: GroupManager;
|
|
side_bar: chat.Frame;
|
|
settings: ServerSettings;
|
|
sound: sound.SoundManager;
|
|
hostbanner: Hostbanner;
|
|
tag_connection_handler: JQuery;
|
|
private _clientId: number;
|
|
private _local_client: LocalClientEntry;
|
|
private _reconnect_timer: NodeJS.Timer;
|
|
private _reconnect_attempt: boolean;
|
|
private _connect_initialize_id: number;
|
|
client_status: VoiceStatus;
|
|
invoke_resized_on_activate: boolean;
|
|
log: log.ServerLog;
|
|
constructor();
|
|
tab_set_name(name: string);
|
|
setup();
|
|
startConnection(addr: string, profile: profiles.ConnectionProfile, user_action: boolean, parameters: ConnectParameters);
|
|
getClient(): LocalClientEntry;
|
|
getClientId();
|
|
// @ts-ignore
|
|
set clientId(id: number);
|
|
// @ts-ignore
|
|
get clientId();
|
|
getServerConnection(): connection.AbstractServerConnection;
|
|
/**
|
|
* LISTENER
|
|
*/
|
|
onConnected();
|
|
private initialize_server_settings();
|
|
// @ts-ignore
|
|
get connected(): boolean;
|
|
private generate_ssl_certificate_accept(): JQuery;
|
|
private _certificate_modal: Modal;
|
|
handleDisconnect(type: DisconnectReason, data?: any);
|
|
cancel_reconnect(log_event: boolean);
|
|
private on_connection_state_changed();
|
|
private _last_record_error_popup: number;
|
|
update_voice_status(targetChannel?: ChannelEntry);
|
|
sync_status_with_server();
|
|
set_away_status(state: boolean | string);
|
|
resize_elements();
|
|
acquire_recorder(voice_recoder: RecorderProfile, update_control_bar: boolean);
|
|
reconnect_properties(profile?: profiles.ConnectionProfile): ConnectParameters;
|
|
update_avatar();
|
|
destroy();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\crypto\asn1.ts */
|
|
declare namespace asn1 {
|
|
export class Int10 {
|
|
constructor(value?: any);
|
|
sub(sub: number);
|
|
mulAdd(mul: number, add: number);
|
|
simplify();
|
|
}
|
|
export class Stream {
|
|
private static HEX_DIGITS;
|
|
private static reTimeS;
|
|
private static reTimeL;
|
|
position: number;
|
|
data: string | ArrayBuffer;
|
|
constructor(data: string | Stream | ArrayBuffer, position: number);
|
|
length(): number;
|
|
get(position?: number);
|
|
hexByte(byte: number);
|
|
parseStringISO(start, end);
|
|
parseStringUTF(start, end);
|
|
parseStringBMP(start, end);
|
|
parseTime(start, end, shortYear);
|
|
parseInteger(start, end);
|
|
isASCII(start: number, end: number);
|
|
parseBitString(start, end, maxLength);
|
|
parseOctetString(start, end, maxLength);
|
|
parseOID(start, end, maxLength);
|
|
}
|
|
export enum TagClass {
|
|
UNIVERSAL = 0x00,
|
|
APPLICATION = 0x01,
|
|
CONTEXT = 0x02,
|
|
PRIVATE = 0x03
|
|
}
|
|
export enum TagType {
|
|
EOC = 0x00,
|
|
BOOLEAN = 0x01,
|
|
INTEGER = 0x02,
|
|
BIT_STRING = 0x03,
|
|
OCTET_STRING = 0x04,
|
|
NULL = 0x05,
|
|
OBJECT_IDENTIFIER = 0x06,
|
|
ObjectDescriptor = 0x07,
|
|
EXTERNAL = 0x08,
|
|
REAL = 0x09,
|
|
ENUMERATED = 0x0A,
|
|
EMBEDDED_PDV = 0x0B,
|
|
UTF8String = 0x0C,
|
|
SEQUENCE = 0x10,
|
|
SET = 0x11,
|
|
NumericString = 0x12,
|
|
PrintableString = 0x13,
|
|
TeletextString = 0x14,
|
|
VideotexString = 0x15,
|
|
IA5String = 0x16,
|
|
UTCTime = 0x17,
|
|
GeneralizedTime = 0x18,
|
|
GraphicString = 0x19,
|
|
VisibleString = 0x1A,
|
|
GeneralString = 0x1B,
|
|
UniversalString = 0x1C,
|
|
BMPString = 0x1E
|
|
}
|
|
export class ASN1Tag {
|
|
tagClass: TagClass;
|
|
type: TagType;
|
|
tagConstructed: boolean;
|
|
tagNumber: number;
|
|
constructor(stream: Stream);
|
|
isUniversal();
|
|
isEOC();
|
|
}
|
|
export class ASN1 {
|
|
stream: Stream;
|
|
header: number;
|
|
length: number;
|
|
tag: ASN1Tag;
|
|
children: ASN1[];
|
|
constructor(stream: Stream, header: number, length: number, tag: ASN1Tag, children: ASN1[]);
|
|
content(max_length?: number, type?: TagType);
|
|
typeName(): string;
|
|
toString();
|
|
toPrettyString(indent);
|
|
posStart();
|
|
posContent();
|
|
posEnd();
|
|
static decodeLength(stream: Stream);
|
|
static encodeLength(buffer: Uint8Array, offset: number, length: number);
|
|
}
|
|
export function decode(stream: string | ArrayBuffer);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\crypto\crc32.ts */
|
|
declare class Crc32 {
|
|
private static readonly lookup;
|
|
private crc: number;
|
|
constructor();
|
|
update(data: ArrayBufferLike);
|
|
digest(radix: number);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\crypto\hex.ts */
|
|
declare namespace hex {
|
|
export function encode(buffer);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\crypto\sha.ts */
|
|
declare function define($);
|
|
declare function unescape(string: string): string;
|
|
declare class _sha1 {
|
|
static arrayBuffer($: ArrayBuffer): ArrayBuffer;
|
|
}
|
|
declare namespace sha {
|
|
export function encode_text(buffer: string): ArrayBuffer;
|
|
export function sha1(message: string | ArrayBuffer): PromiseLike<ArrayBuffer>;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\dns.ts */
|
|
declare namespace dns {
|
|
export interface AddressTarget {
|
|
target_ip: string;
|
|
target_port?: number;
|
|
}
|
|
export interface ResolveOptions {
|
|
timeout?: number;
|
|
allow_cache?: boolean;
|
|
max_depth?: number;
|
|
allow_srv?: boolean;
|
|
allow_cname?: boolean;
|
|
allow_any?: boolean;
|
|
allow_a?: boolean;
|
|
allow_aaaa?: boolean;
|
|
}
|
|
export const default_options: ResolveOptions;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\events.ts */
|
|
declare namespace events {
|
|
export interface EventConvert<All> {
|
|
as<T extends keyof All>(): All[T];
|
|
}
|
|
export interface Event<T> {
|
|
readonly type: T;
|
|
}
|
|
export class SingletonEvent implements Event<"singletone-instance"> {
|
|
static readonly instance;
|
|
readonly type;
|
|
private constructor();
|
|
}
|
|
export class Registry<Events> {
|
|
private handler: {
|
|
[key: string]: ((event) => void)[];
|
|
};
|
|
private connections: {
|
|
[key: string]: Registry<string>[];
|
|
};
|
|
private debug_prefix;
|
|
enable_debug(prefix: string);
|
|
disable_debug();
|
|
on<T extends keyof Events>(event: T, handler: (event?: Events[T] & Event<T> & EventConvert<Events>) => void);
|
|
on(events: (keyof Events)[], handler: (event?: Event<keyof Events> & EventConvert<Events>) => void);
|
|
on(events, handler);
|
|
off<T extends keyof Events>(handler: (event?: Event<T>) => void);
|
|
off<T extends keyof Events>(event: T, handler: (event?: Event<T> & EventConvert<Events>) => void);
|
|
off(event: (keyof Events)[], handler: (event?: Event<keyof Events> & EventConvert<Events>) => void);
|
|
off(handler_or_events, handler?);
|
|
connect<EOther, T extends keyof Events & keyof EOther>(event: T, target: Registry<EOther>);
|
|
disconnect<EOther, T extends keyof Events & keyof EOther>(event: T, target: Registry<EOther>);
|
|
disconnect_all<EOther>(target: Registry<EOther>);
|
|
fire<T extends keyof Events>(event_type: T, data?: Events[T]);
|
|
destory();
|
|
}
|
|
namespace global { }
|
|
export namespace channel_tree {
|
|
export interface client {
|
|
"enter_view": {};
|
|
"left_view": {};
|
|
"property_update": {
|
|
properties: string[];
|
|
};
|
|
"music_status_update": {
|
|
player_buffered_index: number;
|
|
player_replay_index: number;
|
|
};
|
|
"music_song_change": {
|
|
"song": SongInfo;
|
|
};
|
|
/* TODO: Move this out of the music bots interface? */
|
|
"playlist_song_add": {
|
|
song: PlaylistSong;
|
|
};
|
|
"playlist_song_remove": {
|
|
song_id: number;
|
|
};
|
|
"playlist_song_reorder": {
|
|
song_id: number;
|
|
previous_song_id: number;
|
|
};
|
|
"playlist_song_loaded": {
|
|
song_id: number;
|
|
success: boolean;
|
|
error_msg?: string;
|
|
metadata?: string;
|
|
};
|
|
}
|
|
}
|
|
export namespace sidebar {
|
|
export interface music {
|
|
"open": {};
|
|
"close": {};
|
|
"bot_change": {
|
|
old: MusicClientEntry | undefined;
|
|
new: MusicClientEntry | undefined;
|
|
};
|
|
"bot_property_update": {
|
|
properties: string[];
|
|
};
|
|
"action_play": {};
|
|
"action_pause": {};
|
|
"action_song_set": {
|
|
song_id: number;
|
|
};
|
|
"action_forward": {};
|
|
"action_rewind": {};
|
|
"action_forward_ms": {
|
|
units: number;
|
|
};
|
|
"action_rewind_ms": {
|
|
units: number;
|
|
};
|
|
"action_song_add": {};
|
|
"action_song_delete": {
|
|
song_id: number;
|
|
};
|
|
"action_playlist_reload": {};
|
|
"playtime_move_begin": {};
|
|
"playtime_move_end": {
|
|
canceled: boolean;
|
|
target_time?: number;
|
|
};
|
|
"reorder_begin": {
|
|
song_id: number;
|
|
entry: JQuery;
|
|
};
|
|
"reorder_end": {
|
|
song_id: number;
|
|
canceled: boolean;
|
|
entry: JQuery;
|
|
previous_entry?: number;
|
|
};
|
|
"player_time_update": channel_tree.client["music_status_update"];
|
|
"player_song_change": channel_tree.client["music_song_change"];
|
|
"playlist_song_add": channel_tree.client["playlist_song_add"] & {
|
|
insert_effect?: boolean;
|
|
};
|
|
"playlist_song_remove": channel_tree.client["playlist_song_remove"];
|
|
"playlist_song_reorder": channel_tree.client["playlist_song_reorder"];
|
|
"playlist_song_loaded": channel_tree.client["playlist_song_loaded"] & {
|
|
html_entry?: JQuery;
|
|
};
|
|
}
|
|
}
|
|
export namespace modal {
|
|
export type BotStatusType = "name" | "description" | "volume" | "country_code" | "channel_commander" | "priority_speaker";
|
|
export type PlaylistStatusType = "replay_mode" | "finished" | "delete_played" | "max_size" | "notify_song_change";
|
|
export interface music_manage {
|
|
show_container: {
|
|
container: "settings" | "permissions";
|
|
};
|
|
/* setting relevant */
|
|
query_bot_status: {};
|
|
bot_status: {
|
|
status: "success" | "error";
|
|
error_msg?: string;
|
|
data?: {
|
|
name: string;
|
|
description: string;
|
|
volume: number;
|
|
country_code: string;
|
|
default_country_code: string;
|
|
channel_commander: boolean;
|
|
priority_speaker: boolean;
|
|
client_version: string;
|
|
client_platform: string;
|
|
uptime_mode: number;
|
|
bot_type: number;
|
|
};
|
|
};
|
|
set_bot_status: {
|
|
key: BotStatusType;
|
|
value: any;
|
|
};
|
|
set_bot_status_result: {
|
|
key: BotStatusType;
|
|
status: "success" | "error" | "timeout";
|
|
error_msg?: string;
|
|
value?: any;
|
|
};
|
|
query_playlist_status: {};
|
|
playlist_status: {
|
|
status: "success" | "error";
|
|
error_msg?: string;
|
|
data?: {
|
|
replay_mode: number;
|
|
finished: boolean;
|
|
delete_played: boolean;
|
|
max_size: number;
|
|
notify_song_change: boolean;
|
|
};
|
|
};
|
|
set_playlist_status: {
|
|
key: PlaylistStatusType;
|
|
value: any;
|
|
};
|
|
set_playlist_status_result: {
|
|
key: PlaylistStatusType;
|
|
status: "success" | "error" | "timeout";
|
|
error_msg?: string;
|
|
value?: any;
|
|
};
|
|
/* permission relevant */
|
|
show_client_list: {};
|
|
hide_client_list: {};
|
|
filter_client_list: {
|
|
filter: string | undefined;
|
|
};
|
|
"refresh_permissions": {};
|
|
query_special_clients: {};
|
|
special_client_list: {
|
|
status: "success" | "error" | "error-permission";
|
|
error_msg?: string;
|
|
clients?: {
|
|
name: string;
|
|
unique_id: string;
|
|
database_id: number;
|
|
}[];
|
|
};
|
|
search_client: {
|
|
text: string;
|
|
};
|
|
search_client_result: {
|
|
status: "error" | "timeout" | "empty" | "success";
|
|
error_msg?: string;
|
|
client?: {
|
|
name: string;
|
|
unique_id: string;
|
|
database_id: number;
|
|
};
|
|
};
|
|
/* sets a client to set the permission for */
|
|
special_client_set: {
|
|
client?: {
|
|
name: string;
|
|
unique_id: string;
|
|
database_id: number;
|
|
};
|
|
};
|
|
"query_general_permissions": {};
|
|
"general_permissions": {
|
|
status: "error" | "timeout" | "success";
|
|
error_msg?: string;
|
|
permissions?: {
|
|
[key: string]: number;
|
|
};
|
|
};
|
|
"set_general_permission_result": {
|
|
status: "error" | "success";
|
|
key: string;
|
|
value?: number;
|
|
error_msg?: string;
|
|
};
|
|
"set_general_permission": {
|
|
key: string;
|
|
value: number;
|
|
};
|
|
"query_client_permissions": {
|
|
client_database_id: number;
|
|
};
|
|
"client_permissions": {
|
|
status: "error" | "timeout" | "success";
|
|
client_database_id: number;
|
|
error_msg?: string;
|
|
permissions?: {
|
|
[key: string]: number;
|
|
};
|
|
};
|
|
"set_client_permission_result": {
|
|
status: "error" | "success";
|
|
client_database_id: number;
|
|
key: string;
|
|
value?: number;
|
|
error_msg?: string;
|
|
};
|
|
"set_client_permission": {
|
|
client_database_id: number;
|
|
key: string;
|
|
value: number;
|
|
};
|
|
"query_group_permissions": {
|
|
permission_name: string;
|
|
};
|
|
"group_permissions": {
|
|
permission_name: string;
|
|
status: "error" | "timeout" | "success";
|
|
groups?: {
|
|
name: string;
|
|
value: number;
|
|
id: number;
|
|
}[];
|
|
error_msg?: string;
|
|
};
|
|
}
|
|
}
|
|
}
|
|
declare const eclient;
|
|
declare const emusic;
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\FileManager.ts */
|
|
declare class FileEntry {
|
|
name: string;
|
|
datetime: number;
|
|
type: number;
|
|
size: number;
|
|
}
|
|
declare class FileListRequest {
|
|
path: string;
|
|
entries: FileEntry[];
|
|
callback: (entries: FileEntry[]) => void;
|
|
}
|
|
declare namespace transfer {
|
|
export interface TransferKey {
|
|
client_transfer_id: number;
|
|
server_transfer_id: number;
|
|
key: string;
|
|
file_path: string;
|
|
file_name: string;
|
|
peer: {
|
|
hosts: string[];
|
|
port: number;
|
|
};
|
|
total_size: number;
|
|
}
|
|
export interface UploadOptions {
|
|
name: string;
|
|
path: string;
|
|
channel?: ChannelEntry;
|
|
channel_password?: string;
|
|
size: number;
|
|
overwrite: boolean;
|
|
}
|
|
export interface DownloadTransfer {
|
|
get_key(): DownloadKey;
|
|
request_file(): Promise<Response>;
|
|
}
|
|
export interface UploadTransfer {
|
|
get_key(): UploadKey;
|
|
put_data(data: BlobPart | File): Promise<void>;
|
|
}
|
|
export type DownloadKey = TransferKey;
|
|
export type UploadKey = TransferKey;
|
|
export function spawn_download_transfer(key: DownloadKey): DownloadTransfer;
|
|
export function spawn_upload_transfer(key: UploadKey): UploadTransfer;
|
|
}
|
|
declare class RequestFileDownload implements transfer.DownloadTransfer {
|
|
readonly transfer_key: transfer.DownloadKey;
|
|
constructor(key: transfer.DownloadKey);
|
|
request_file(): Promise<Response>;
|
|
private try_fetch(url: string): Promise<Response>;
|
|
get_key(): transfer.DownloadKey;
|
|
}
|
|
declare class RequestFileUpload implements transfer.UploadTransfer {
|
|
readonly transfer_key: transfer.UploadKey;
|
|
constructor(key: transfer.DownloadKey);
|
|
get_key(): transfer.UploadKey;
|
|
put_data(data: BlobPart | File): Promise<void>;
|
|
private try_put(data: FormData, url: string): Promise<void>;
|
|
}
|
|
declare class FileManager extends connection.AbstractCommandHandler {
|
|
handle: ConnectionHandler;
|
|
icons: IconManager;
|
|
avatars: AvatarManager;
|
|
private listRequests: FileListRequest[];
|
|
private pending_download_requests: transfer.DownloadKey[];
|
|
private pending_upload_requests: transfer.UploadKey[];
|
|
private transfer_counter: number;
|
|
constructor(client: ConnectionHandler);
|
|
destroy();
|
|
handle_command(command: connection.ServerCommand): boolean;
|
|
/******************************** File list ********************************/
|
|
//TODO multiple requests (same path)
|
|
requestFileList(path: string, channel?: ChannelEntry, password?: string): Promise<FileEntry[]>;
|
|
private notifyFileList(json);
|
|
private notifyFileListFinished(json);
|
|
/******************************** File download/upload ********************************/
|
|
download_file(path: string, file: string, channel?: ChannelEntry, password?: string): Promise<transfer.DownloadKey>;
|
|
upload_file(options: transfer.UploadOptions): Promise<transfer.UploadKey>;
|
|
private notifyStartDownload(json);
|
|
private notifyStartUpload(json);
|
|
delete_file(props: {
|
|
name: string;
|
|
path?: string;
|
|
cid?: number;
|
|
cpw?: string;
|
|
}): Promise<void>;
|
|
}
|
|
declare class Icon {
|
|
id: number;
|
|
url: string;
|
|
}
|
|
declare enum ImageType {
|
|
UNKNOWN,
|
|
BITMAP,
|
|
PNG,
|
|
GIF,
|
|
SVG,
|
|
JPEG
|
|
}
|
|
declare function media_image_type(type: ImageType, file?: boolean);
|
|
declare function image_type(encoded_data: string | ArrayBuffer, base64_encoded?: boolean);
|
|
declare class CacheManager {
|
|
readonly cache_name: string;
|
|
private _cache_category: Cache;
|
|
constructor(name: string);
|
|
setupped(): boolean;
|
|
reset();
|
|
setup();
|
|
cleanup(max_age: number);
|
|
resolve_cached(key: string, max_age?: number): Promise<Response | undefined>;
|
|
put_cache(key: string, value: Response, type?: string, headers?: {
|
|
[key: string]: string;
|
|
});
|
|
delete(key: string);
|
|
}
|
|
declare class IconManager {
|
|
private static cache: CacheManager;
|
|
handle: FileManager;
|
|
private _id_urls: {
|
|
[id: number]: string;
|
|
};
|
|
private _loading_promises: {
|
|
[id: number]: Promise<Icon>;
|
|
};
|
|
constructor(handle: FileManager);
|
|
destroy();
|
|
clear_cache();
|
|
delete_icon(id: number): Promise<void>;
|
|
iconList(): Promise<FileEntry[]>;
|
|
create_icon_download(id: number): Promise<transfer.DownloadKey>;
|
|
private static _response_url(response: Response);
|
|
resolved_cached?(id: number): Promise<Icon>;
|
|
private static _static_id_url: {
|
|
[icon: number]: string;
|
|
};
|
|
private static _static_cached_promise: {
|
|
[icon: number]: Promise<Icon>;
|
|
};
|
|
static load_cached_icon(id: number, ignore_age?: boolean): Promise<Icon> | Icon;
|
|
private _load_icon(id: number): Promise<Icon>;
|
|
download_icon(id: number): Promise<Icon>;
|
|
resolve_icon(id: number): Promise<Icon>;
|
|
static generate_tag(icon: Promise<Icon> | Icon | undefined, options?: {
|
|
animate?: boolean;
|
|
}): JQuery<HTMLDivElement>;
|
|
generateTag(id: number, options?: {
|
|
animate?: boolean;
|
|
}): JQuery<HTMLDivElement>;
|
|
}
|
|
declare class Avatar {
|
|
client_avatar_id: string;
|
|
avatar_id: string;
|
|
url: string;
|
|
type: ImageType;
|
|
}
|
|
declare class AvatarManager {
|
|
handle: FileManager;
|
|
private static cache: CacheManager;
|
|
private _cached_avatars: {
|
|
[response_avatar_id: number]: Avatar;
|
|
};
|
|
private _loading_promises: {
|
|
[response_avatar_id: number]: Promise<Icon>;
|
|
};
|
|
constructor(handle: FileManager);
|
|
destroy();
|
|
private _response_url(response: Response, type: ImageType): Promise<string>;
|
|
resolved_cached?(client_avatar_id: string, avatar_version?: string): Promise<Avatar>;
|
|
create_avatar_download(client_avatar_id: string): Promise<transfer.DownloadKey>;
|
|
private _load_avatar(client_avatar_id: string, avatar_version: string);
|
|
/* loads an avatar by the avatar id and optional with the avatar version */
|
|
load_avatar(client_avatar_id: string, avatar_version: string): Promise<Avatar>;
|
|
generate_client_tag(client: ClientEntry): JQuery;
|
|
update_cache(client_avatar_id: string, avatar_id: string);
|
|
generate_tag(client_avatar_id: string, avatar_id?: string, options?: {
|
|
callback_image?: (tag: JQuery<HTMLImageElement>) => any;
|
|
callback_avatar?: (avatar: Avatar) => any;
|
|
}): JQuery;
|
|
unique_id_2_avatar_id(unique_id: string);
|
|
private generate_default_image(): JQuery;
|
|
generate_chat_tag(client: {
|
|
id?: number;
|
|
database_id?: number;
|
|
}, client_unique_id: string, callback_loaded?: (successfully: boolean, error?: any) => any): JQuery;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\i18n\country.ts */
|
|
declare namespace i18n {
|
|
export function country_name(alpha_code: string, fallback?: string);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\i18n\localize.ts */
|
|
declare function guid();
|
|
declare namespace i18n {
|
|
export interface TranslationKey {
|
|
message: string;
|
|
line?: number;
|
|
character?: number;
|
|
filename?: string;
|
|
}
|
|
export interface Translation {
|
|
key: TranslationKey;
|
|
translated: string;
|
|
flags?: string[];
|
|
}
|
|
export interface Contributor {
|
|
name: string;
|
|
email: string;
|
|
}
|
|
export interface TranslationFile {
|
|
path: string;
|
|
full_url: string;
|
|
translations: Translation[];
|
|
}
|
|
export interface RepositoryTranslation {
|
|
key: string;
|
|
path: string;
|
|
country_code: string;
|
|
name: string;
|
|
contributors: Contributor[];
|
|
}
|
|
export interface TranslationRepository {
|
|
unique_id: string;
|
|
url: string;
|
|
name?: string;
|
|
contact?: string;
|
|
translations?: RepositoryTranslation[];
|
|
load_timestamp?: number;
|
|
}
|
|
export function tr(message: string, key?: string);
|
|
export function tra(message: string, ...args: any[]);
|
|
export function load_file(url: string, path: string): Promise<void>;
|
|
export function load_repository(url: string): Promise<TranslationRepository>;
|
|
export namespace config {
|
|
export interface TranslationConfig {
|
|
current_repository_url?: string;
|
|
current_language?: string;
|
|
current_translation_url?: string;
|
|
current_translation_path?: string;
|
|
}
|
|
export interface RepositoryConfig {
|
|
repositories?: {
|
|
url?: string;
|
|
repository?: TranslationRepository;
|
|
}[];
|
|
}
|
|
export function repository_config();
|
|
export function save_repository_config();
|
|
export function translation_config(): TranslationConfig;
|
|
export function save_translation_config();
|
|
}
|
|
export function register_repository(repository: TranslationRepository);
|
|
export function registered_repositories(): TranslationRepository[];
|
|
export function delete_repository(repository: TranslationRepository);
|
|
export function iterate_repositories(callback_entry: (repository: TranslationRepository) => any): Promise<any>;
|
|
export function select_translation(repository: TranslationRepository, entry: RepositoryTranslation);
|
|
/* ATTENTION: This method is called before most other library inizialisations! */
|
|
export function initialize(): Promise<any>;
|
|
}
|
|
declare const tr: typeof i18n.tr;
|
|
declare const tra: typeof i18n.tra;
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\log.ts */
|
|
declare enum LogCategory {
|
|
CHANNEL,
|
|
CHANNEL_PROPERTIES,
|
|
CLIENT,
|
|
BOOKMARKS,
|
|
SERVER,
|
|
PERMISSIONS,
|
|
GENERAL,
|
|
NETWORKING,
|
|
VOICE,
|
|
CHAT,
|
|
AUDIO,
|
|
I18N,
|
|
IPC,
|
|
IDENTITIES,
|
|
STATISTICS,
|
|
DNS
|
|
}
|
|
declare namespace log {
|
|
export enum LogType {
|
|
TRACE,
|
|
DEBUG,
|
|
INFO,
|
|
WARNING,
|
|
ERROR
|
|
}
|
|
export let enabled_mapping;
|
|
//Values will be overridden by initialize()
|
|
export let level_mapping;
|
|
export enum GroupMode {
|
|
NATIVE,
|
|
PREFIX
|
|
}
|
|
//Category Example: <url>?log.i18n.enabled=0
|
|
//Level Example A: <url>?log.level.trace.enabled=0
|
|
//Level Example B: <url>?log.level=0
|
|
export function initialize(default_level: LogType);
|
|
export function log(type: LogType, category: LogCategory, message: string, ...optionalParams: any[]);
|
|
export function trace(category: LogCategory, message: string, ...optionalParams: any[]);
|
|
export function debug(category: LogCategory, message: string, ...optionalParams: any[]);
|
|
export function info(category: LogCategory, message: string, ...optionalParams: any[]);
|
|
export function warn(category: LogCategory, message: string, ...optionalParams: any[]);
|
|
export function error(category: LogCategory, message: string, ...optionalParams: any[]);
|
|
export function group(level: LogType, category: LogCategory, name: string, ...optionalParams: any[]): Group;
|
|
export function table(level: LogType, category: LogCategory, title: string, arguments: any);
|
|
export class Group {
|
|
readonly mode: GroupMode;
|
|
readonly level: LogType;
|
|
readonly category: LogCategory;
|
|
readonly enabled: boolean;
|
|
owner: Group;
|
|
private readonly name: string;
|
|
private readonly optionalParams: any[][];
|
|
private _collapsed: boolean;
|
|
private initialized;
|
|
private _log_prefix: string;
|
|
constructor(mode: GroupMode, level: LogType, category: LogCategory, name: string, optionalParams: any[][], owner?: Group);
|
|
group(level: LogType, name: string, ...optionalParams: any[]): Group;
|
|
collapsed(flag?: boolean): this;
|
|
log(message: string, ...optionalParams: any[]): this;
|
|
end();
|
|
// @ts-ignore
|
|
get prefix(): string;
|
|
// @ts-ignore
|
|
set prefix(prefix: string);
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\main.ts */
|
|
declare const js_render;
|
|
declare const native_client;
|
|
declare function getUserMediaFunctionPromise(): (constraints: MediaStreamConstraints) => Promise<MediaStream>;
|
|
declare interface Window {
|
|
open_connected_question: () => Promise<boolean>;
|
|
}
|
|
declare function setup_close();
|
|
declare function moment(...arguments): any;
|
|
declare function setup_jsrender(): boolean;
|
|
declare function initialize(): Promise<any>;
|
|
declare function initialize_app(): Promise<any>;
|
|
declare function str2ab8(str);
|
|
declare function arrayBufferBase64(base64: string);
|
|
declare function base64_encode_ab(source: ArrayBufferLike);
|
|
declare function handle_connect_request(properties: bipc.connect.ConnectRequestData, connection: ConnectionHandler);
|
|
declare function main();
|
|
declare const task_teaweb_starter: loader.Task;
|
|
declare const task_connect_handler: loader.Task;
|
|
declare const task_certificate_callback: loader.Task;
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\permission\GroupManager.ts */
|
|
declare enum GroupType {
|
|
QUERY,
|
|
TEMPLATE,
|
|
NORMAL
|
|
}
|
|
declare enum GroupTarget {
|
|
SERVER,
|
|
CHANNEL
|
|
}
|
|
declare class GroupProperties {
|
|
iconid: number;
|
|
sortid: number;
|
|
savedb: boolean;
|
|
namemode: number;
|
|
}
|
|
declare class GroupPermissionRequest {
|
|
group_id: number;
|
|
promise: LaterPromise<PermissionValue[]>;
|
|
}
|
|
declare class Group {
|
|
properties: GroupProperties;
|
|
readonly handle: GroupManager;
|
|
readonly id: number;
|
|
readonly target: GroupTarget;
|
|
readonly type: GroupType;
|
|
name: string;
|
|
requiredModifyPower: number;
|
|
requiredMemberAddPower: number;
|
|
requiredMemberRemovePower: number;
|
|
constructor(handle: GroupManager, id: number, target: GroupTarget, type: GroupType, name: string);
|
|
updateProperty(key, value);
|
|
}
|
|
declare class GroupManager extends connection.AbstractCommandHandler {
|
|
readonly handle: ConnectionHandler;
|
|
serverGroups: Group[];
|
|
channelGroups: Group[];
|
|
private requests_group_permissions: GroupPermissionRequest[];
|
|
constructor(client: ConnectionHandler);
|
|
destroy();
|
|
handle_command(command: connection.ServerCommand): boolean;
|
|
requestGroups();
|
|
static sorter(): (a: Group, b: Group) => number;
|
|
serverGroup?(id: number): Group;
|
|
channelGroup?(id: number): Group;
|
|
private handle_grouplist(json);
|
|
request_permissions(group: Group): Promise<PermissionValue[]>;
|
|
private handle_group_permission_list(json: any[]);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\permission\PermissionManager.ts */
|
|
declare enum PermissionType {
|
|
B_SERVERINSTANCE_HELP_VIEW = "b_serverinstance_help_view",
|
|
B_SERVERINSTANCE_VERSION_VIEW = "b_serverinstance_version_view",
|
|
B_SERVERINSTANCE_INFO_VIEW = "b_serverinstance_info_view",
|
|
B_SERVERINSTANCE_VIRTUALSERVER_LIST = "b_serverinstance_virtualserver_list",
|
|
B_SERVERINSTANCE_BINDING_LIST = "b_serverinstance_binding_list",
|
|
B_SERVERINSTANCE_PERMISSION_LIST = "b_serverinstance_permission_list",
|
|
B_SERVERINSTANCE_PERMISSION_FIND = "b_serverinstance_permission_find",
|
|
B_VIRTUALSERVER_CREATE = "b_virtualserver_create",
|
|
B_VIRTUALSERVER_DELETE = "b_virtualserver_delete",
|
|
B_VIRTUALSERVER_START_ANY = "b_virtualserver_start_any",
|
|
B_VIRTUALSERVER_STOP_ANY = "b_virtualserver_stop_any",
|
|
B_VIRTUALSERVER_CHANGE_MACHINE_ID = "b_virtualserver_change_machine_id",
|
|
B_VIRTUALSERVER_CHANGE_TEMPLATE = "b_virtualserver_change_template",
|
|
B_SERVERQUERY_LOGIN = "b_serverquery_login",
|
|
B_SERVERINSTANCE_TEXTMESSAGE_SEND = "b_serverinstance_textmessage_send",
|
|
B_SERVERINSTANCE_LOG_VIEW = "b_serverinstance_log_view",
|
|
B_SERVERINSTANCE_LOG_ADD = "b_serverinstance_log_add",
|
|
B_SERVERINSTANCE_STOP = "b_serverinstance_stop",
|
|
B_SERVERINSTANCE_MODIFY_SETTINGS = "b_serverinstance_modify_settings",
|
|
B_SERVERINSTANCE_MODIFY_QUERYGROUP = "b_serverinstance_modify_querygroup",
|
|
B_SERVERINSTANCE_MODIFY_TEMPLATES = "b_serverinstance_modify_templates",
|
|
B_VIRTUALSERVER_SELECT = "b_virtualserver_select",
|
|
B_VIRTUALSERVER_SELECT_GODMODE = "b_virtualserver_select_godmode",
|
|
B_VIRTUALSERVER_INFO_VIEW = "b_virtualserver_info_view",
|
|
B_VIRTUALSERVER_CONNECTIONINFO_VIEW = "b_virtualserver_connectioninfo_view",
|
|
B_VIRTUALSERVER_CHANNEL_LIST = "b_virtualserver_channel_list",
|
|
B_VIRTUALSERVER_CHANNEL_SEARCH = "b_virtualserver_channel_search",
|
|
B_VIRTUALSERVER_CLIENT_LIST = "b_virtualserver_client_list",
|
|
B_VIRTUALSERVER_CLIENT_SEARCH = "b_virtualserver_client_search",
|
|
B_VIRTUALSERVER_CLIENT_DBLIST = "b_virtualserver_client_dblist",
|
|
B_VIRTUALSERVER_CLIENT_DBSEARCH = "b_virtualserver_client_dbsearch",
|
|
B_VIRTUALSERVER_CLIENT_DBINFO = "b_virtualserver_client_dbinfo",
|
|
B_VIRTUALSERVER_PERMISSION_FIND = "b_virtualserver_permission_find",
|
|
B_VIRTUALSERVER_CUSTOM_SEARCH = "b_virtualserver_custom_search",
|
|
B_VIRTUALSERVER_START = "b_virtualserver_start",
|
|
B_VIRTUALSERVER_STOP = "b_virtualserver_stop",
|
|
B_VIRTUALSERVER_TOKEN_LIST = "b_virtualserver_token_list",
|
|
B_VIRTUALSERVER_TOKEN_ADD = "b_virtualserver_token_add",
|
|
B_VIRTUALSERVER_TOKEN_USE = "b_virtualserver_token_use",
|
|
B_VIRTUALSERVER_TOKEN_DELETE = "b_virtualserver_token_delete",
|
|
B_VIRTUALSERVER_LOG_VIEW = "b_virtualserver_log_view",
|
|
B_VIRTUALSERVER_LOG_ADD = "b_virtualserver_log_add",
|
|
B_VIRTUALSERVER_JOIN_IGNORE_PASSWORD = "b_virtualserver_join_ignore_password",
|
|
B_VIRTUALSERVER_NOTIFY_REGISTER = "b_virtualserver_notify_register",
|
|
B_VIRTUALSERVER_NOTIFY_UNREGISTER = "b_virtualserver_notify_unregister",
|
|
B_VIRTUALSERVER_SNAPSHOT_CREATE = "b_virtualserver_snapshot_create",
|
|
B_VIRTUALSERVER_SNAPSHOT_DEPLOY = "b_virtualserver_snapshot_deploy",
|
|
B_VIRTUALSERVER_PERMISSION_RESET = "b_virtualserver_permission_reset",
|
|
B_VIRTUALSERVER_MODIFY_NAME = "b_virtualserver_modify_name",
|
|
B_VIRTUALSERVER_MODIFY_WELCOMEMESSAGE = "b_virtualserver_modify_welcomemessage",
|
|
B_VIRTUALSERVER_MODIFY_MAXCLIENTS = "b_virtualserver_modify_maxclients",
|
|
B_VIRTUALSERVER_MODIFY_RESERVED_SLOTS = "b_virtualserver_modify_reserved_slots",
|
|
B_VIRTUALSERVER_MODIFY_PASSWORD = "b_virtualserver_modify_password",
|
|
B_VIRTUALSERVER_MODIFY_DEFAULT_SERVERGROUP = "b_virtualserver_modify_default_servergroup",
|
|
B_VIRTUALSERVER_MODIFY_DEFAULT_MUSICGROUP = "b_virtualserver_modify_default_musicgroup",
|
|
B_VIRTUALSERVER_MODIFY_DEFAULT_CHANNELGROUP = "b_virtualserver_modify_default_channelgroup",
|
|
B_VIRTUALSERVER_MODIFY_DEFAULT_CHANNELADMINGROUP = "b_virtualserver_modify_default_channeladmingroup",
|
|
B_VIRTUALSERVER_MODIFY_CHANNEL_FORCED_SILENCE = "b_virtualserver_modify_channel_forced_silence",
|
|
B_VIRTUALSERVER_MODIFY_COMPLAIN = "b_virtualserver_modify_complain",
|
|
B_VIRTUALSERVER_MODIFY_ANTIFLOOD = "b_virtualserver_modify_antiflood",
|
|
B_VIRTUALSERVER_MODIFY_FT_SETTINGS = "b_virtualserver_modify_ft_settings",
|
|
B_VIRTUALSERVER_MODIFY_FT_QUOTAS = "b_virtualserver_modify_ft_quotas",
|
|
B_VIRTUALSERVER_MODIFY_HOSTMESSAGE = "b_virtualserver_modify_hostmessage",
|
|
B_VIRTUALSERVER_MODIFY_HOSTBANNER = "b_virtualserver_modify_hostbanner",
|
|
B_VIRTUALSERVER_MODIFY_HOSTBUTTON = "b_virtualserver_modify_hostbutton",
|
|
B_VIRTUALSERVER_MODIFY_PORT = "b_virtualserver_modify_port",
|
|
B_VIRTUALSERVER_MODIFY_HOST = "b_virtualserver_modify_host",
|
|
B_VIRTUALSERVER_MODIFY_DEFAULT_MESSAGES = "b_virtualserver_modify_default_messages",
|
|
B_VIRTUALSERVER_MODIFY_AUTOSTART = "b_virtualserver_modify_autostart",
|
|
B_VIRTUALSERVER_MODIFY_NEEDED_IDENTITY_SECURITY_LEVEL = "b_virtualserver_modify_needed_identity_security_level",
|
|
B_VIRTUALSERVER_MODIFY_PRIORITY_SPEAKER_DIMM_MODIFICATOR = "b_virtualserver_modify_priority_speaker_dimm_modificator",
|
|
B_VIRTUALSERVER_MODIFY_LOG_SETTINGS = "b_virtualserver_modify_log_settings",
|
|
B_VIRTUALSERVER_MODIFY_MIN_CLIENT_VERSION = "b_virtualserver_modify_min_client_version",
|
|
B_VIRTUALSERVER_MODIFY_ICON_ID = "b_virtualserver_modify_icon_id",
|
|
B_VIRTUALSERVER_MODIFY_WEBLIST = "b_virtualserver_modify_weblist",
|
|
B_VIRTUALSERVER_MODIFY_CODEC_ENCRYPTION_MODE = "b_virtualserver_modify_codec_encryption_mode",
|
|
B_VIRTUALSERVER_MODIFY_TEMPORARY_PASSWORDS = "b_virtualserver_modify_temporary_passwords",
|
|
B_VIRTUALSERVER_MODIFY_TEMPORARY_PASSWORDS_OWN = "b_virtualserver_modify_temporary_passwords_own",
|
|
B_VIRTUALSERVER_MODIFY_CHANNEL_TEMP_DELETE_DELAY_DEFAULT = "b_virtualserver_modify_channel_temp_delete_delay_default",
|
|
B_VIRTUALSERVER_MODIFY_MUSIC_BOT_LIMIT = "b_virtualserver_modify_music_bot_limit",
|
|
B_VIRTUALSERVER_MODIFY_COUNTRY_CODE = "b_virtualserver_modify_country_code",
|
|
I_CHANNEL_MIN_DEPTH = "i_channel_min_depth",
|
|
I_CHANNEL_MAX_DEPTH = "i_channel_max_depth",
|
|
B_CHANNEL_GROUP_INHERITANCE_END = "b_channel_group_inheritance_end",
|
|
I_CHANNEL_PERMISSION_MODIFY_POWER = "i_channel_permission_modify_power",
|
|
I_CHANNEL_NEEDED_PERMISSION_MODIFY_POWER = "i_channel_needed_permission_modify_power",
|
|
B_CHANNEL_INFO_VIEW = "b_channel_info_view",
|
|
B_CHANNEL_CREATE_CHILD = "b_channel_create_child",
|
|
B_CHANNEL_CREATE_PERMANENT = "b_channel_create_permanent",
|
|
B_CHANNEL_CREATE_SEMI_PERMANENT = "b_channel_create_semi_permanent",
|
|
B_CHANNEL_CREATE_TEMPORARY = "b_channel_create_temporary",
|
|
B_CHANNEL_CREATE_PRIVATE = "b_channel_create_private",
|
|
B_CHANNEL_CREATE_WITH_TOPIC = "b_channel_create_with_topic",
|
|
B_CHANNEL_CREATE_WITH_DESCRIPTION = "b_channel_create_with_description",
|
|
B_CHANNEL_CREATE_WITH_PASSWORD = "b_channel_create_with_password",
|
|
B_CHANNEL_CREATE_MODIFY_WITH_CODEC_SPEEX8 = "b_channel_create_modify_with_codec_speex8",
|
|
B_CHANNEL_CREATE_MODIFY_WITH_CODEC_SPEEX16 = "b_channel_create_modify_with_codec_speex16",
|
|
B_CHANNEL_CREATE_MODIFY_WITH_CODEC_SPEEX32 = "b_channel_create_modify_with_codec_speex32",
|
|
B_CHANNEL_CREATE_MODIFY_WITH_CODEC_CELTMONO48 = "b_channel_create_modify_with_codec_celtmono48",
|
|
B_CHANNEL_CREATE_MODIFY_WITH_CODEC_OPUSVOICE = "b_channel_create_modify_with_codec_opusvoice",
|
|
B_CHANNEL_CREATE_MODIFY_WITH_CODEC_OPUSMUSIC = "b_channel_create_modify_with_codec_opusmusic",
|
|
I_CHANNEL_CREATE_MODIFY_WITH_CODEC_MAXQUALITY = "i_channel_create_modify_with_codec_maxquality",
|
|
I_CHANNEL_CREATE_MODIFY_WITH_CODEC_LATENCY_FACTOR_MIN = "i_channel_create_modify_with_codec_latency_factor_min",
|
|
I_CHANNEL_CREATE_MODIFY_CONVERSATION_HISTORY_LENGTH = "i_channel_create_modify_conversation_history_length",
|
|
B_CHANNEL_CREATE_MODIFY_CONVERSATION_HISTORY_UNLIMITED = "b_channel_create_modify_conversation_history_unlimited",
|
|
B_CHANNEL_CREATE_MODIFY_CONVERSATION_PRIVATE = "b_channel_create_modify_conversation_private",
|
|
B_CHANNEL_CREATE_WITH_MAXCLIENTS = "b_channel_create_with_maxclients",
|
|
B_CHANNEL_CREATE_WITH_MAXFAMILYCLIENTS = "b_channel_create_with_maxfamilyclients",
|
|
B_CHANNEL_CREATE_WITH_SORTORDER = "b_channel_create_with_sortorder",
|
|
B_CHANNEL_CREATE_WITH_DEFAULT = "b_channel_create_with_default",
|
|
B_CHANNEL_CREATE_WITH_NEEDED_TALK_POWER = "b_channel_create_with_needed_talk_power",
|
|
B_CHANNEL_CREATE_MODIFY_WITH_FORCE_PASSWORD = "b_channel_create_modify_with_force_password",
|
|
I_CHANNEL_CREATE_MODIFY_WITH_TEMP_DELETE_DELAY = "i_channel_create_modify_with_temp_delete_delay",
|
|
B_CHANNEL_MODIFY_PARENT = "b_channel_modify_parent",
|
|
B_CHANNEL_MODIFY_MAKE_DEFAULT = "b_channel_modify_make_default",
|
|
B_CHANNEL_MODIFY_MAKE_PERMANENT = "b_channel_modify_make_permanent",
|
|
B_CHANNEL_MODIFY_MAKE_SEMI_PERMANENT = "b_channel_modify_make_semi_permanent",
|
|
B_CHANNEL_MODIFY_MAKE_TEMPORARY = "b_channel_modify_make_temporary",
|
|
B_CHANNEL_MODIFY_NAME = "b_channel_modify_name",
|
|
B_CHANNEL_MODIFY_TOPIC = "b_channel_modify_topic",
|
|
B_CHANNEL_MODIFY_DESCRIPTION = "b_channel_modify_description",
|
|
B_CHANNEL_MODIFY_PASSWORD = "b_channel_modify_password",
|
|
B_CHANNEL_MODIFY_CODEC = "b_channel_modify_codec",
|
|
B_CHANNEL_MODIFY_CODEC_QUALITY = "b_channel_modify_codec_quality",
|
|
B_CHANNEL_MODIFY_CODEC_LATENCY_FACTOR = "b_channel_modify_codec_latency_factor",
|
|
B_CHANNEL_MODIFY_MAXCLIENTS = "b_channel_modify_maxclients",
|
|
B_CHANNEL_MODIFY_MAXFAMILYCLIENTS = "b_channel_modify_maxfamilyclients",
|
|
B_CHANNEL_MODIFY_SORTORDER = "b_channel_modify_sortorder",
|
|
B_CHANNEL_MODIFY_NEEDED_TALK_POWER = "b_channel_modify_needed_talk_power",
|
|
I_CHANNEL_MODIFY_POWER = "i_channel_modify_power",
|
|
I_CHANNEL_NEEDED_MODIFY_POWER = "i_channel_needed_modify_power",
|
|
B_CHANNEL_MODIFY_MAKE_CODEC_ENCRYPTED = "b_channel_modify_make_codec_encrypted",
|
|
B_CHANNEL_MODIFY_TEMP_DELETE_DELAY = "b_channel_modify_temp_delete_delay",
|
|
B_CHANNEL_DELETE_PERMANENT = "b_channel_delete_permanent",
|
|
B_CHANNEL_DELETE_SEMI_PERMANENT = "b_channel_delete_semi_permanent",
|
|
B_CHANNEL_DELETE_TEMPORARY = "b_channel_delete_temporary",
|
|
B_CHANNEL_DELETE_FLAG_FORCE = "b_channel_delete_flag_force",
|
|
I_CHANNEL_DELETE_POWER = "i_channel_delete_power",
|
|
B_CHANNEL_CONVERSATION_MESSAGE_DELETE = "b_channel_conversation_message_delete",
|
|
I_CHANNEL_NEEDED_DELETE_POWER = "i_channel_needed_delete_power",
|
|
B_CHANNEL_JOIN_PERMANENT = "b_channel_join_permanent",
|
|
B_CHANNEL_JOIN_SEMI_PERMANENT = "b_channel_join_semi_permanent",
|
|
B_CHANNEL_JOIN_TEMPORARY = "b_channel_join_temporary",
|
|
B_CHANNEL_JOIN_IGNORE_PASSWORD = "b_channel_join_ignore_password",
|
|
B_CHANNEL_JOIN_IGNORE_MAXCLIENTS = "b_channel_join_ignore_maxclients",
|
|
B_CHANNEL_IGNORE_VIEW_POWER = "b_channel_ignore_view_power",
|
|
I_CHANNEL_JOIN_POWER = "i_channel_join_power",
|
|
I_CHANNEL_NEEDED_JOIN_POWER = "i_channel_needed_join_power",
|
|
B_CHANNEL_IGNORE_JOIN_POWER = "b_channel_ignore_join_power",
|
|
B_CHANNEL_IGNORE_DESCRIPTION_VIEW_POWER = "b_channel_ignore_description_view_power",
|
|
I_CHANNEL_VIEW_POWER = "i_channel_view_power",
|
|
I_CHANNEL_NEEDED_VIEW_POWER = "i_channel_needed_view_power",
|
|
I_CHANNEL_SUBSCRIBE_POWER = "i_channel_subscribe_power",
|
|
I_CHANNEL_NEEDED_SUBSCRIBE_POWER = "i_channel_needed_subscribe_power",
|
|
I_CHANNEL_DESCRIPTION_VIEW_POWER = "i_channel_description_view_power",
|
|
I_CHANNEL_NEEDED_DESCRIPTION_VIEW_POWER = "i_channel_needed_description_view_power",
|
|
I_ICON_ID = "i_icon_id",
|
|
I_MAX_ICON_FILESIZE = "i_max_icon_filesize",
|
|
I_MAX_PLAYLIST_SIZE = "i_max_playlist_size",
|
|
I_MAX_PLAYLISTS = "i_max_playlists",
|
|
B_ICON_MANAGE = "b_icon_manage",
|
|
B_GROUP_IS_PERMANENT = "b_group_is_permanent",
|
|
I_GROUP_AUTO_UPDATE_TYPE = "i_group_auto_update_type",
|
|
I_GROUP_AUTO_UPDATE_MAX_VALUE = "i_group_auto_update_max_value",
|
|
I_GROUP_SORT_ID = "i_group_sort_id",
|
|
I_GROUP_SHOW_NAME_IN_TREE = "i_group_show_name_in_tree",
|
|
B_VIRTUALSERVER_SERVERGROUP_CREATE = "b_virtualserver_servergroup_create",
|
|
B_VIRTUALSERVER_SERVERGROUP_LIST = "b_virtualserver_servergroup_list",
|
|
B_VIRTUALSERVER_SERVERGROUP_PERMISSION_LIST = "b_virtualserver_servergroup_permission_list",
|
|
B_VIRTUALSERVER_SERVERGROUP_CLIENT_LIST = "b_virtualserver_servergroup_client_list",
|
|
B_VIRTUALSERVER_CHANNELGROUP_CREATE = "b_virtualserver_channelgroup_create",
|
|
B_VIRTUALSERVER_CHANNELGROUP_LIST = "b_virtualserver_channelgroup_list",
|
|
B_VIRTUALSERVER_CHANNELGROUP_PERMISSION_LIST = "b_virtualserver_channelgroup_permission_list",
|
|
B_VIRTUALSERVER_CHANNELGROUP_CLIENT_LIST = "b_virtualserver_channelgroup_client_list",
|
|
B_VIRTUALSERVER_CLIENT_PERMISSION_LIST = "b_virtualserver_client_permission_list",
|
|
B_VIRTUALSERVER_CHANNEL_PERMISSION_LIST = "b_virtualserver_channel_permission_list",
|
|
B_VIRTUALSERVER_CHANNELCLIENT_PERMISSION_LIST = "b_virtualserver_channelclient_permission_list",
|
|
B_VIRTUALSERVER_PLAYLIST_PERMISSION_LIST = "b_virtualserver_playlist_permission_list",
|
|
I_SERVER_GROUP_MODIFY_POWER = "i_server_group_modify_power",
|
|
I_SERVER_GROUP_NEEDED_MODIFY_POWER = "i_server_group_needed_modify_power",
|
|
I_SERVER_GROUP_MEMBER_ADD_POWER = "i_server_group_member_add_power",
|
|
I_SERVER_GROUP_SELF_ADD_POWER = "i_server_group_self_add_power",
|
|
I_SERVER_GROUP_NEEDED_MEMBER_ADD_POWER = "i_server_group_needed_member_add_power",
|
|
I_SERVER_GROUP_MEMBER_REMOVE_POWER = "i_server_group_member_remove_power",
|
|
I_SERVER_GROUP_SELF_REMOVE_POWER = "i_server_group_self_remove_power",
|
|
I_SERVER_GROUP_NEEDED_MEMBER_REMOVE_POWER = "i_server_group_needed_member_remove_power",
|
|
I_CHANNEL_GROUP_MODIFY_POWER = "i_channel_group_modify_power",
|
|
I_CHANNEL_GROUP_NEEDED_MODIFY_POWER = "i_channel_group_needed_modify_power",
|
|
I_CHANNEL_GROUP_MEMBER_ADD_POWER = "i_channel_group_member_add_power",
|
|
I_CHANNEL_GROUP_SELF_ADD_POWER = "i_channel_group_self_add_power",
|
|
I_CHANNEL_GROUP_NEEDED_MEMBER_ADD_POWER = "i_channel_group_needed_member_add_power",
|
|
I_CHANNEL_GROUP_MEMBER_REMOVE_POWER = "i_channel_group_member_remove_power",
|
|
I_CHANNEL_GROUP_SELF_REMOVE_POWER = "i_channel_group_self_remove_power",
|
|
I_CHANNEL_GROUP_NEEDED_MEMBER_REMOVE_POWER = "i_channel_group_needed_member_remove_power",
|
|
I_GROUP_MEMBER_ADD_POWER = "i_group_member_add_power",
|
|
I_GROUP_NEEDED_MEMBER_ADD_POWER = "i_group_needed_member_add_power",
|
|
I_GROUP_MEMBER_REMOVE_POWER = "i_group_member_remove_power",
|
|
I_GROUP_NEEDED_MEMBER_REMOVE_POWER = "i_group_needed_member_remove_power",
|
|
I_GROUP_MODIFY_POWER = "i_group_modify_power",
|
|
I_GROUP_NEEDED_MODIFY_POWER = "i_group_needed_modify_power",
|
|
I_PERMISSION_MODIFY_POWER = "i_permission_modify_power",
|
|
B_PERMISSION_MODIFY_POWER_IGNORE = "b_permission_modify_power_ignore",
|
|
B_VIRTUALSERVER_SERVERGROUP_DELETE = "b_virtualserver_servergroup_delete",
|
|
B_VIRTUALSERVER_CHANNELGROUP_DELETE = "b_virtualserver_channelgroup_delete",
|
|
I_CLIENT_PERMISSION_MODIFY_POWER = "i_client_permission_modify_power",
|
|
I_CLIENT_NEEDED_PERMISSION_MODIFY_POWER = "i_client_needed_permission_modify_power",
|
|
I_CLIENT_MAX_CLONES_UID = "i_client_max_clones_uid",
|
|
I_CLIENT_MAX_CLONES_IP = "i_client_max_clones_ip",
|
|
I_CLIENT_MAX_CLONES_HWID = "i_client_max_clones_hwid",
|
|
I_CLIENT_MAX_IDLETIME = "i_client_max_idletime",
|
|
I_CLIENT_MAX_AVATAR_FILESIZE = "i_client_max_avatar_filesize",
|
|
I_CLIENT_MAX_CHANNEL_SUBSCRIPTIONS = "i_client_max_channel_subscriptions",
|
|
I_CLIENT_MAX_CHANNELS = "i_client_max_channels",
|
|
I_CLIENT_MAX_TEMPORARY_CHANNELS = "i_client_max_temporary_channels",
|
|
I_CLIENT_MAX_SEMI_CHANNELS = "i_client_max_semi_channels",
|
|
I_CLIENT_MAX_PERMANENT_CHANNELS = "i_client_max_permanent_channels",
|
|
B_CLIENT_USE_PRIORITY_SPEAKER = "b_client_use_priority_speaker",
|
|
B_CLIENT_SKIP_CHANNELGROUP_PERMISSIONS = "b_client_skip_channelgroup_permissions",
|
|
B_CLIENT_FORCE_PUSH_TO_TALK = "b_client_force_push_to_talk",
|
|
B_CLIENT_IGNORE_BANS = "b_client_ignore_bans",
|
|
B_CLIENT_IGNORE_VPN = "b_client_ignore_vpn",
|
|
B_CLIENT_IGNORE_ANTIFLOOD = "b_client_ignore_antiflood",
|
|
B_CLIENT_ENFORCE_VALID_HWID = "b_client_enforce_valid_hwid",
|
|
B_CLIENT_ALLOW_INVALID_PACKET = "b_client_allow_invalid_packet",
|
|
B_CLIENT_ALLOW_INVALID_BADGES = "b_client_allow_invalid_badges",
|
|
B_CLIENT_ISSUE_CLIENT_QUERY_COMMAND = "b_client_issue_client_query_command",
|
|
B_CLIENT_USE_RESERVED_SLOT = "b_client_use_reserved_slot",
|
|
B_CLIENT_USE_CHANNEL_COMMANDER = "b_client_use_channel_commander",
|
|
B_CLIENT_REQUEST_TALKER = "b_client_request_talker",
|
|
B_CLIENT_AVATAR_DELETE_OTHER = "b_client_avatar_delete_other",
|
|
B_CLIENT_IS_STICKY = "b_client_is_sticky",
|
|
B_CLIENT_IGNORE_STICKY = "b_client_ignore_sticky",
|
|
B_CLIENT_MUSIC_CREATE_PERMANENT = "b_client_music_create_permanent",
|
|
B_CLIENT_MUSIC_CREATE_SEMI_PERMANENT = "b_client_music_create_semi_permanent",
|
|
B_CLIENT_MUSIC_CREATE_TEMPORARY = "b_client_music_create_temporary",
|
|
B_CLIENT_MUSIC_MODIFY_PERMANENT = "b_client_music_modify_permanent",
|
|
B_CLIENT_MUSIC_MODIFY_SEMI_PERMANENT = "b_client_music_modify_semi_permanent",
|
|
B_CLIENT_MUSIC_MODIFY_TEMPORARY = "b_client_music_modify_temporary",
|
|
I_CLIENT_MUSIC_CREATE_MODIFY_MAX_VOLUME = "i_client_music_create_modify_max_volume",
|
|
I_CLIENT_MUSIC_LIMIT = "i_client_music_limit",
|
|
I_CLIENT_MUSIC_NEEDED_DELETE_POWER = "i_client_music_needed_delete_power",
|
|
I_CLIENT_MUSIC_DELETE_POWER = "i_client_music_delete_power",
|
|
I_CLIENT_MUSIC_PLAY_POWER = "i_client_music_play_power",
|
|
I_CLIENT_MUSIC_NEEDED_PLAY_POWER = "i_client_music_needed_play_power",
|
|
I_CLIENT_MUSIC_MODIFY_POWER = "i_client_music_modify_power",
|
|
I_CLIENT_MUSIC_NEEDED_MODIFY_POWER = "i_client_music_needed_modify_power",
|
|
I_CLIENT_MUSIC_RENAME_POWER = "i_client_music_rename_power",
|
|
I_CLIENT_MUSIC_NEEDED_RENAME_POWER = "i_client_music_needed_rename_power",
|
|
B_PLAYLIST_CREATE = "b_playlist_create",
|
|
I_PLAYLIST_VIEW_POWER = "i_playlist_view_power",
|
|
I_PLAYLIST_NEEDED_VIEW_POWER = "i_playlist_needed_view_power",
|
|
I_PLAYLIST_MODIFY_POWER = "i_playlist_modify_power",
|
|
I_PLAYLIST_NEEDED_MODIFY_POWER = "i_playlist_needed_modify_power",
|
|
I_PLAYLIST_PERMISSION_MODIFY_POWER = "i_playlist_permission_modify_power",
|
|
I_PLAYLIST_NEEDED_PERMISSION_MODIFY_POWER = "i_playlist_needed_permission_modify_power",
|
|
I_PLAYLIST_DELETE_POWER = "i_playlist_delete_power",
|
|
I_PLAYLIST_NEEDED_DELETE_POWER = "i_playlist_needed_delete_power",
|
|
I_PLAYLIST_SONG_ADD_POWER = "i_playlist_song_add_power",
|
|
I_PLAYLIST_SONG_NEEDED_ADD_POWER = "i_playlist_song_needed_add_power",
|
|
I_PLAYLIST_SONG_REMOVE_POWER = "i_playlist_song_remove_power",
|
|
I_PLAYLIST_SONG_NEEDED_REMOVE_POWER = "i_playlist_song_needed_remove_power",
|
|
B_CLIENT_INFO_VIEW = "b_client_info_view",
|
|
B_CLIENT_PERMISSIONOVERVIEW_VIEW = "b_client_permissionoverview_view",
|
|
B_CLIENT_PERMISSIONOVERVIEW_OWN = "b_client_permissionoverview_own",
|
|
B_CLIENT_REMOTEADDRESS_VIEW = "b_client_remoteaddress_view",
|
|
I_CLIENT_SERVERQUERY_VIEW_POWER = "i_client_serverquery_view_power",
|
|
I_CLIENT_NEEDED_SERVERQUERY_VIEW_POWER = "i_client_needed_serverquery_view_power",
|
|
B_CLIENT_CUSTOM_INFO_VIEW = "b_client_custom_info_view",
|
|
B_CLIENT_MUSIC_CHANNEL_LIST = "b_client_music_channel_list",
|
|
B_CLIENT_MUSIC_SERVER_LIST = "b_client_music_server_list",
|
|
I_CLIENT_MUSIC_INFO = "i_client_music_info",
|
|
I_CLIENT_MUSIC_NEEDED_INFO = "i_client_music_needed_info",
|
|
I_CLIENT_KICK_FROM_SERVER_POWER = "i_client_kick_from_server_power",
|
|
I_CLIENT_NEEDED_KICK_FROM_SERVER_POWER = "i_client_needed_kick_from_server_power",
|
|
I_CLIENT_KICK_FROM_CHANNEL_POWER = "i_client_kick_from_channel_power",
|
|
I_CLIENT_NEEDED_KICK_FROM_CHANNEL_POWER = "i_client_needed_kick_from_channel_power",
|
|
I_CLIENT_BAN_POWER = "i_client_ban_power",
|
|
I_CLIENT_NEEDED_BAN_POWER = "i_client_needed_ban_power",
|
|
I_CLIENT_MOVE_POWER = "i_client_move_power",
|
|
I_CLIENT_NEEDED_MOVE_POWER = "i_client_needed_move_power",
|
|
I_CLIENT_COMPLAIN_POWER = "i_client_complain_power",
|
|
I_CLIENT_NEEDED_COMPLAIN_POWER = "i_client_needed_complain_power",
|
|
B_CLIENT_COMPLAIN_LIST = "b_client_complain_list",
|
|
B_CLIENT_COMPLAIN_DELETE_OWN = "b_client_complain_delete_own",
|
|
B_CLIENT_COMPLAIN_DELETE = "b_client_complain_delete",
|
|
B_CLIENT_BAN_LIST = "b_client_ban_list",
|
|
B_CLIENT_BAN_LIST_GLOBAL = "b_client_ban_list_global",
|
|
B_CLIENT_BAN_TRIGGER_LIST = "b_client_ban_trigger_list",
|
|
B_CLIENT_BAN_CREATE = "b_client_ban_create",
|
|
B_CLIENT_BAN_CREATE_GLOBAL = "b_client_ban_create_global",
|
|
B_CLIENT_BAN_NAME = "b_client_ban_name",
|
|
B_CLIENT_BAN_IP = "b_client_ban_ip",
|
|
B_CLIENT_BAN_HWID = "b_client_ban_hwid",
|
|
B_CLIENT_BAN_EDIT = "b_client_ban_edit",
|
|
B_CLIENT_BAN_EDIT_GLOBAL = "b_client_ban_edit_global",
|
|
B_CLIENT_BAN_DELETE_OWN = "b_client_ban_delete_own",
|
|
B_CLIENT_BAN_DELETE = "b_client_ban_delete",
|
|
B_CLIENT_BAN_DELETE_OWN_GLOBAL = "b_client_ban_delete_own_global",
|
|
B_CLIENT_BAN_DELETE_GLOBAL = "b_client_ban_delete_global",
|
|
I_CLIENT_BAN_MAX_BANTIME = "i_client_ban_max_bantime",
|
|
I_CLIENT_PRIVATE_TEXTMESSAGE_POWER = "i_client_private_textmessage_power",
|
|
I_CLIENT_NEEDED_PRIVATE_TEXTMESSAGE_POWER = "i_client_needed_private_textmessage_power",
|
|
B_CLIENT_EVEN_TEXTMESSAGE_SEND = "b_client_even_textmessage_send",
|
|
B_CLIENT_SERVER_TEXTMESSAGE_SEND = "b_client_server_textmessage_send",
|
|
B_CLIENT_CHANNEL_TEXTMESSAGE_SEND = "b_client_channel_textmessage_send",
|
|
B_CLIENT_OFFLINE_TEXTMESSAGE_SEND = "b_client_offline_textmessage_send",
|
|
I_CLIENT_TALK_POWER = "i_client_talk_power",
|
|
I_CLIENT_NEEDED_TALK_POWER = "i_client_needed_talk_power",
|
|
I_CLIENT_POKE_POWER = "i_client_poke_power",
|
|
I_CLIENT_NEEDED_POKE_POWER = "i_client_needed_poke_power",
|
|
B_CLIENT_SET_FLAG_TALKER = "b_client_set_flag_talker",
|
|
I_CLIENT_WHISPER_POWER = "i_client_whisper_power",
|
|
I_CLIENT_NEEDED_WHISPER_POWER = "i_client_needed_whisper_power",
|
|
B_CLIENT_MODIFY_DESCRIPTION = "b_client_modify_description",
|
|
B_CLIENT_MODIFY_OWN_DESCRIPTION = "b_client_modify_own_description",
|
|
B_CLIENT_USE_BBCODE_ANY = "b_client_use_bbcode_any",
|
|
B_CLIENT_USE_BBCODE_URL = "b_client_use_bbcode_url",
|
|
B_CLIENT_USE_BBCODE_IMAGE = "b_client_use_bbcode_image",
|
|
B_CLIENT_MODIFY_DBPROPERTIES = "b_client_modify_dbproperties",
|
|
B_CLIENT_DELETE_DBPROPERTIES = "b_client_delete_dbproperties",
|
|
B_CLIENT_CREATE_MODIFY_SERVERQUERY_LOGIN = "b_client_create_modify_serverquery_login",
|
|
B_CLIENT_QUERY_CREATE = "b_client_query_create",
|
|
B_CLIENT_QUERY_LIST = "b_client_query_list",
|
|
B_CLIENT_QUERY_LIST_OWN = "b_client_query_list_own",
|
|
B_CLIENT_QUERY_RENAME = "b_client_query_rename",
|
|
B_CLIENT_QUERY_RENAME_OWN = "b_client_query_rename_own",
|
|
B_CLIENT_QUERY_CHANGE_PASSWORD = "b_client_query_change_password",
|
|
B_CLIENT_QUERY_CHANGE_OWN_PASSWORD = "b_client_query_change_own_password",
|
|
B_CLIENT_QUERY_CHANGE_PASSWORD_GLOBAL = "b_client_query_change_password_global",
|
|
B_CLIENT_QUERY_DELETE = "b_client_query_delete",
|
|
B_CLIENT_QUERY_DELETE_OWN = "b_client_query_delete_own",
|
|
B_FT_IGNORE_PASSWORD = "b_ft_ignore_password",
|
|
B_FT_TRANSFER_LIST = "b_ft_transfer_list",
|
|
I_FT_FILE_UPLOAD_POWER = "i_ft_file_upload_power",
|
|
I_FT_NEEDED_FILE_UPLOAD_POWER = "i_ft_needed_file_upload_power",
|
|
I_FT_FILE_DOWNLOAD_POWER = "i_ft_file_download_power",
|
|
I_FT_NEEDED_FILE_DOWNLOAD_POWER = "i_ft_needed_file_download_power",
|
|
I_FT_FILE_DELETE_POWER = "i_ft_file_delete_power",
|
|
I_FT_NEEDED_FILE_DELETE_POWER = "i_ft_needed_file_delete_power",
|
|
I_FT_FILE_RENAME_POWER = "i_ft_file_rename_power",
|
|
I_FT_NEEDED_FILE_RENAME_POWER = "i_ft_needed_file_rename_power",
|
|
I_FT_FILE_BROWSE_POWER = "i_ft_file_browse_power",
|
|
I_FT_NEEDED_FILE_BROWSE_POWER = "i_ft_needed_file_browse_power",
|
|
I_FT_DIRECTORY_CREATE_POWER = "i_ft_directory_create_power",
|
|
I_FT_NEEDED_DIRECTORY_CREATE_POWER = "i_ft_needed_directory_create_power",
|
|
I_FT_QUOTA_MB_DOWNLOAD_PER_CLIENT = "i_ft_quota_mb_download_per_client",
|
|
I_FT_QUOTA_MB_UPLOAD_PER_CLIENT = "i_ft_quota_mb_upload_per_client"
|
|
}
|
|
declare class PermissionInfo {
|
|
name: string;
|
|
id: number;
|
|
description: string;
|
|
is_boolean();
|
|
id_grant(): number;
|
|
}
|
|
declare class PermissionGroup {
|
|
begin: number;
|
|
end: number;
|
|
deep: number;
|
|
name: string;
|
|
}
|
|
declare class GroupedPermissions {
|
|
group: PermissionGroup;
|
|
permissions: PermissionInfo[];
|
|
children: GroupedPermissions[];
|
|
parent: GroupedPermissions;
|
|
}
|
|
declare class PermissionValue {
|
|
readonly type: PermissionInfo;
|
|
value: number;
|
|
flag_skip: boolean;
|
|
flag_negate: boolean;
|
|
granted_value: number;
|
|
constructor(type, value?);
|
|
granted(requiredValue: number, required?: boolean): boolean;
|
|
hasValue(): boolean;
|
|
hasGrant(): boolean;
|
|
}
|
|
declare class NeededPermissionValue extends PermissionValue {
|
|
constructor(type, value);
|
|
}
|
|
declare namespace permissions {
|
|
export type PermissionRequestKeys = {
|
|
client_id?: number;
|
|
channel_id?: number;
|
|
playlist_id?: number;
|
|
};
|
|
export type PermissionRequest = PermissionRequestKeys & {
|
|
timeout_id: any;
|
|
promise: LaterPromise<PermissionValue[]>;
|
|
};
|
|
export namespace find {
|
|
export type Entry = {
|
|
type: "server" | "channel" | "client" | "client_channel" | "channel_group" | "server_group";
|
|
value: number;
|
|
id: number;
|
|
};
|
|
export type Client = Entry & {
|
|
type: "client";
|
|
client_id: number;
|
|
};
|
|
export type Channel = Entry & {
|
|
type: "channel";
|
|
channel_id: number;
|
|
};
|
|
export type Server = Entry & {
|
|
type: "server";
|
|
};
|
|
export type ClientChannel = Entry & {
|
|
type: "client_channel";
|
|
client_id: number;
|
|
channel_id: number;
|
|
};
|
|
export type ChannelGroup = Entry & {
|
|
type: "channel_group";
|
|
group_id: number;
|
|
};
|
|
export type ServerGroup = Entry & {
|
|
type: "server_group";
|
|
group_id: number;
|
|
};
|
|
}
|
|
}
|
|
declare type RequestLists = "requests_channel_permissions" | "requests_client_permissions" | "requests_client_channel_permissions" | "requests_playlist_permissions" | "requests_playlist_client_permissions";
|
|
declare class PermissionManager extends connection.AbstractCommandHandler {
|
|
readonly handle: ConnectionHandler;
|
|
permissionList: PermissionInfo[];
|
|
permissionGroups: PermissionGroup[];
|
|
neededPermissions: NeededPermissionValue[];
|
|
needed_permission_change_listener: {
|
|
[permission: string]: (() => any)[];
|
|
};
|
|
requests_channel_permissions: permissions.PermissionRequest[];
|
|
requests_client_permissions: permissions.PermissionRequest[];
|
|
requests_client_channel_permissions: permissions.PermissionRequest[];
|
|
requests_playlist_permissions: permissions.PermissionRequest[];
|
|
requests_playlist_client_permissions: permissions.PermissionRequest[];
|
|
requests_permfind: {
|
|
timeout_id: number;
|
|
permission: string;
|
|
callback: (status: "success" | "error", data: any) => void;
|
|
}[];
|
|
initializedListener: ((initialized: boolean) => void)[];
|
|
private _cacheNeededPermissions: any;
|
|
/* Static info mapping until TeaSpeak implements a detailed info */
|
|
static readonly group_mapping: {
|
|
name: string;
|
|
deep: number;
|
|
}[];
|
|
private _group_mapping;
|
|
public static parse_permission_bulk(json: any[], manager: PermissionManager): PermissionValue[];
|
|
constructor(client: ConnectionHandler);
|
|
destroy();
|
|
handle_command(command: connection.ServerCommand): boolean;
|
|
initialized(): boolean;
|
|
public requestPermissionList();
|
|
private onPermissionList(json);
|
|
private onNeededPermissions(json);
|
|
register_needed_permission(key: PermissionType, listener: () => any);
|
|
unregister_needed_permission(key: PermissionType, listener: () => any);
|
|
resolveInfo?(key: number | string | PermissionType): PermissionInfo;
|
|
/* channel permission request */
|
|
private onChannelPermList(json);
|
|
private execute_channel_permission_request(request: permissions.PermissionRequestKeys);
|
|
requestChannelPermissions(channelId: number): Promise<PermissionValue[]>;
|
|
/* client permission request */
|
|
private onClientPermList(json: any[]);
|
|
private execute_client_permission_request(request: permissions.PermissionRequestKeys);
|
|
requestClientPermissions(client_id: number): Promise<PermissionValue[]>;
|
|
/* client channel permission request */
|
|
private onChannelClientPermList(json: any[]);
|
|
private execute_client_channel_permission_request(request: permissions.PermissionRequestKeys);
|
|
requestClientChannelPermissions(client_id: number, channel_id: number): Promise<PermissionValue[]>;
|
|
/* playlist permissions */
|
|
private onPlaylistPermList(json: any[]);
|
|
private execute_playlist_permission_request(request: permissions.PermissionRequestKeys);
|
|
requestPlaylistPermissions(playlist_id: number): Promise<PermissionValue[]>;
|
|
/* playlist client permissions */
|
|
private onPlaylistClientPermList(json: any[]);
|
|
private execute_playlist_client_permission_request(request: permissions.PermissionRequestKeys);
|
|
requestPlaylistClientPermissions(playlist_id: number, client_database_id: number): Promise<PermissionValue[]>;
|
|
private readonly criteria_equal;
|
|
private execute_permission_request(list: RequestLists, criteria: permissions.PermissionRequestKeys, execute: (criteria: permissions.PermissionRequestKeys) => any): Promise<PermissionValue[]>;
|
|
private fullfill_permission_request(list: RequestLists, criteria: permissions.PermissionRequestKeys, status: "success" | "error", result: any);
|
|
find_permission(...permissions: string[]): Promise<permissions.find.Entry[]>;
|
|
neededPermission(key: number | string | PermissionType | PermissionInfo): NeededPermissionValue;
|
|
groupedPermissions(): GroupedPermissions[];
|
|
/**
|
|
* Generates an enum with all know permission types, used for the enum above
|
|
*/
|
|
export_permission_types();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\PPTListener.ts */
|
|
declare enum KeyCode {
|
|
KEY_CANCEL = 3,
|
|
KEY_HELP = 6,
|
|
KEY_BACK_SPACE = 8,
|
|
KEY_TAB = 9,
|
|
KEY_CLEAR = 12,
|
|
KEY_RETURN = 13,
|
|
KEY_ENTER = 14,
|
|
KEY_SHIFT = 16,
|
|
KEY_CONTROL = 17,
|
|
KEY_ALT = 18,
|
|
KEY_PAUSE = 19,
|
|
KEY_CAPS_LOCK = 20,
|
|
KEY_ESCAPE = 27,
|
|
KEY_SPACE = 32,
|
|
KEY_PAGE_UP = 33,
|
|
KEY_PAGE_DOWN = 34,
|
|
KEY_END = 35,
|
|
KEY_HOME = 36,
|
|
KEY_LEFT = 37,
|
|
KEY_UP = 38,
|
|
KEY_RIGHT = 39,
|
|
KEY_DOWN = 40,
|
|
KEY_PRINTSCREEN = 44,
|
|
KEY_INSERT = 45,
|
|
KEY_DELETE = 46,
|
|
KEY_0 = 48,
|
|
KEY_1 = 49,
|
|
KEY_2 = 50,
|
|
KEY_3 = 51,
|
|
KEY_4 = 52,
|
|
KEY_5 = 53,
|
|
KEY_6 = 54,
|
|
KEY_7 = 55,
|
|
KEY_8 = 56,
|
|
KEY_9 = 57,
|
|
KEY_SEMICOLON = 59,
|
|
KEY_EQUALS = 61,
|
|
KEY_A = 65,
|
|
KEY_B = 66,
|
|
KEY_C = 67,
|
|
KEY_D = 68,
|
|
KEY_E = 69,
|
|
KEY_F = 70,
|
|
KEY_G = 71,
|
|
KEY_H = 72,
|
|
KEY_I = 73,
|
|
KEY_J = 74,
|
|
KEY_K = 75,
|
|
KEY_L = 76,
|
|
KEY_M = 77,
|
|
KEY_N = 78,
|
|
KEY_O = 79,
|
|
KEY_P = 80,
|
|
KEY_Q = 81,
|
|
KEY_R = 82,
|
|
KEY_S = 83,
|
|
KEY_T = 84,
|
|
KEY_U = 85,
|
|
KEY_V = 86,
|
|
KEY_W = 87,
|
|
KEY_X = 88,
|
|
KEY_Y = 89,
|
|
KEY_Z = 90,
|
|
KEY_LEFT_CMD = 91,
|
|
KEY_RIGHT_CMD = 93,
|
|
KEY_CONTEXT_MENU = 93,
|
|
KEY_NUMPAD0 = 96,
|
|
KEY_NUMPAD1 = 97,
|
|
KEY_NUMPAD2 = 98,
|
|
KEY_NUMPAD3 = 99,
|
|
KEY_NUMPAD4 = 100,
|
|
KEY_NUMPAD5 = 101,
|
|
KEY_NUMPAD6 = 102,
|
|
KEY_NUMPAD7 = 103,
|
|
KEY_NUMPAD8 = 104,
|
|
KEY_NUMPAD9 = 105,
|
|
KEY_MULTIPLY = 106,
|
|
KEY_ADD = 107,
|
|
KEY_SEPARATOR = 108,
|
|
KEY_SUBTRACT = 109,
|
|
KEY_DECIMAL = 110,
|
|
KEY_DIVIDE = 111,
|
|
KEY_F1 = 112,
|
|
KEY_F2 = 113,
|
|
KEY_F3 = 114,
|
|
KEY_F4 = 115,
|
|
KEY_F5 = 116,
|
|
KEY_F6 = 117,
|
|
KEY_F7 = 118,
|
|
KEY_F8 = 119,
|
|
KEY_F9 = 120,
|
|
KEY_F10 = 121,
|
|
KEY_F11 = 122,
|
|
KEY_F12 = 123,
|
|
KEY_F13 = 124,
|
|
KEY_F14 = 125,
|
|
KEY_F15 = 126,
|
|
KEY_F16 = 127,
|
|
KEY_F17 = 128,
|
|
KEY_F18 = 129,
|
|
KEY_F19 = 130,
|
|
KEY_F20 = 131,
|
|
KEY_F21 = 132,
|
|
KEY_F22 = 133,
|
|
KEY_F23 = 134,
|
|
KEY_F24 = 135,
|
|
KEY_NUM_LOCK = 144,
|
|
KEY_SCROLL_LOCK = 145,
|
|
KEY_COMMA = 188,
|
|
KEY_PERIOD = 190,
|
|
KEY_SLASH = 191,
|
|
KEY_BACK_QUOTE = 192,
|
|
KEY_OPEN_BRACKET = 219,
|
|
KEY_BACK_SLASH = 220,
|
|
KEY_CLOSE_BRACKET = 221,
|
|
KEY_QUOTE = 222,
|
|
KEY_META = 224
|
|
}
|
|
declare namespace ppt {
|
|
export enum EventType {
|
|
KEY_PRESS,
|
|
KEY_RELEASE,
|
|
KEY_TYPED
|
|
}
|
|
export enum SpecialKey {
|
|
CTRL,
|
|
WINDOWS,
|
|
SHIFT,
|
|
ALT
|
|
}
|
|
export interface KeyDescriptor {
|
|
key_code: string;
|
|
key_ctrl: boolean;
|
|
key_windows: boolean;
|
|
key_shift: boolean;
|
|
key_alt: boolean;
|
|
}
|
|
export interface KeyEvent extends KeyDescriptor {
|
|
readonly type: EventType;
|
|
readonly key: string;
|
|
}
|
|
export interface KeyHook extends KeyDescriptor {
|
|
cancel: boolean;
|
|
callback_press: () => any;
|
|
callback_release: () => any;
|
|
}
|
|
export function key_description(key: KeyDescriptor);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\profiles\ConnectionProfile.ts */
|
|
declare namespace profiles {
|
|
export class ConnectionProfile {
|
|
id: string;
|
|
profile_name: string;
|
|
default_username: string;
|
|
default_password: string;
|
|
selected_identity_type: string;
|
|
identities: {
|
|
[key: string]: identities.Identity;
|
|
};
|
|
constructor(id: string);
|
|
connect_username(): string;
|
|
selected_identity(current_type?: identities.IdentitifyType): identities.Identity;
|
|
selected_type?(): identities.IdentitifyType;
|
|
set_identity(type: identities.IdentitifyType, identity: identities.Identity);
|
|
spawn_identity_handshake_handler?(connection: connection.AbstractServerConnection): connection.HandshakeIdentityHandler;
|
|
encode?(): string;
|
|
valid(): boolean;
|
|
}
|
|
export function load(): Promise<any>;
|
|
export function create_new_profile(name: string, id?: string): ConnectionProfile;
|
|
export function save();
|
|
export function mark_need_save();
|
|
export function requires_save(): boolean;
|
|
export function profiles(): ConnectionProfile[];
|
|
export function find_profile(id: string): ConnectionProfile | undefined;
|
|
export function find_profile_by_name(name: string): ConnectionProfile | undefined;
|
|
export function default_profile(): ConnectionProfile;
|
|
export function set_default_profile(profile: ConnectionProfile);
|
|
export function delete_profile(profile: ConnectionProfile);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\profiles\identities\NameIdentity.ts */
|
|
declare namespace profiles.identities {
|
|
export class NameHandshakeHandler extends AbstractHandshakeIdentityHandler {
|
|
readonly identity: NameIdentity;
|
|
handler: HandshakeCommandHandler<NameHandshakeHandler>;
|
|
constructor(connection: connection.AbstractServerConnection, identity: profiles.identities.NameIdentity);
|
|
start_handshake();
|
|
protected trigger_fail(message: string);
|
|
protected trigger_success();
|
|
}
|
|
export class NameIdentity implements Identity {
|
|
private _name: string;
|
|
constructor(name?: string);
|
|
set_name(name: string);
|
|
name(): string;
|
|
fallback_name(): string | undefined;
|
|
uid(): string;
|
|
type(): IdentitifyType;
|
|
valid(): boolean;
|
|
decode(data): Promise<void>;
|
|
encode?(): string;
|
|
spawn_identity_handshake_handler(connection: connection.AbstractServerConnection): connection.HandshakeIdentityHandler;
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\profiles\identities\TeaForumIdentity.ts */
|
|
declare namespace profiles.identities {
|
|
export class TeaForumHandshakeHandler extends AbstractHandshakeIdentityHandler {
|
|
readonly identity: TeaForumIdentity;
|
|
handler: HandshakeCommandHandler<TeaForumHandshakeHandler>;
|
|
constructor(connection: connection.AbstractServerConnection, identity: profiles.identities.TeaForumIdentity);
|
|
start_handshake();
|
|
private handle_proof(json);
|
|
protected trigger_fail(message: string);
|
|
protected trigger_success();
|
|
}
|
|
export class TeaForumIdentity implements Identity {
|
|
private readonly identity_data: forum.Data;
|
|
valid(): boolean;
|
|
constructor(data: forum.Data);
|
|
data(): forum.Data;
|
|
decode(data): Promise<void>;
|
|
encode(): string;
|
|
spawn_identity_handshake_handler(connection: connection.AbstractServerConnection): connection.HandshakeIdentityHandler;
|
|
fallback_name(): string | undefined;
|
|
type(): profiles.identities.IdentitifyType;
|
|
uid(): string;
|
|
}
|
|
export function set_static_identity(identity: TeaForumIdentity);
|
|
export function update_forum();
|
|
export function valid_static_forum_identity(): boolean;
|
|
export function static_forum_identity(): TeaForumIdentity | undefined;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\profiles\identities\TeamSpeakIdentity.ts */
|
|
declare namespace profiles.identities {
|
|
export namespace CryptoHelper {
|
|
export function base64_url_encode(str);
|
|
export function base64_url_decode(str: string, pad?: boolean);
|
|
export function arraybuffer_to_string(buf);
|
|
export function export_ecc_key(crypto_key: CryptoKey, public_key: boolean): Promise<any>;
|
|
export function decrypt_ts_identity(buffer: Uint8Array): Promise<string>;
|
|
export function encrypt_ts_identity(buffer: Uint8Array): Promise<string>;
|
|
/**
|
|
* @param buffer base64 encoded ASN.1 string
|
|
*/
|
|
export function decode_tomcrypt_key(buffer: string);
|
|
}
|
|
export class TeaSpeakHandshakeHandler extends AbstractHandshakeIdentityHandler {
|
|
identity: TeaSpeakIdentity;
|
|
handler: HandshakeCommandHandler<TeaSpeakHandshakeHandler>;
|
|
constructor(connection: connection.AbstractServerConnection, identity: TeaSpeakIdentity);
|
|
start_handshake();
|
|
private handle_proof(json);
|
|
protected trigger_fail(message: string);
|
|
protected trigger_success();
|
|
}
|
|
export class IdentityPOWWorker {
|
|
private _worker: Worker;
|
|
private _current_hash: string;
|
|
private _best_level: number;
|
|
initialize(key: string);
|
|
mine(hash: string, iterations: number, target: number, timeout?: number): Promise<Boolean>;
|
|
current_hash(): string;
|
|
current_level(): number;
|
|
finalize(timeout?: number);
|
|
private handle_message(message: any);
|
|
}
|
|
export class TeaSpeakIdentity implements Identity {
|
|
static generate_new(): Promise<TeaSpeakIdentity>;
|
|
static import_ts(ts_string: string, ini?: boolean): Promise<TeaSpeakIdentity>;
|
|
hash_number: string;
|
|
private_key: string;
|
|
_name: string;
|
|
public_key: string;
|
|
private _initialized: boolean;
|
|
private _crypto_key: CryptoKey;
|
|
private _crypto_key_sign: CryptoKey;
|
|
private _unique_id: string;
|
|
constructor(private_key?: string, hash?: string, name?: string, initialize?: boolean);
|
|
fallback_name(): string | undefined;
|
|
uid(): string;
|
|
type(): IdentitifyType;
|
|
valid(): boolean;
|
|
decode(data: string): Promise<void>;
|
|
encode?(): string;
|
|
level(): Promise<number>;
|
|
/**
|
|
* @param {string} a
|
|
* @param {string} b
|
|
* @description b must be smaller (in bytes) then a
|
|
*/
|
|
private string_add(a: string, b: string);
|
|
improve_level_for(time: number, threads: number): Promise<Boolean>;
|
|
improve_level(target: number, threads: number, active_callback: () => boolean, callback_level?: (current: number) => any, callback_status?: (hash_rate: number) => any): Promise<Boolean>;
|
|
private initialize();
|
|
export_ts(ini?: boolean): Promise<string>;
|
|
sign_message(message: string, hash?: string): Promise<string>;
|
|
spawn_identity_handshake_handler(connection: connection.AbstractServerConnection): connection.HandshakeIdentityHandler;
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\profiles\identities\teaspeak-forum.ts */
|
|
declare interface Window {
|
|
grecaptcha: GReCaptcha;
|
|
}
|
|
declare interface GReCaptcha {
|
|
render(container: string | HTMLElement, parameters: {
|
|
sitekey: string;
|
|
theme?: "dark" | "light";
|
|
size?: "compact" | "normal";
|
|
tabindex?: number;
|
|
callback?: (token: string) => any;
|
|
"expired-callback"?: () => any;
|
|
"error-callback"?: (error: any) => any;
|
|
}): string; /* widget_id */
|
|
reset(widget_id?: string);
|
|
}
|
|
declare namespace forum {
|
|
export namespace gcaptcha {
|
|
export function initialize(): Promise<any>;
|
|
export function spawn(container: JQuery, key: string, callback_data: (token: string) => any): Promise<any>;
|
|
}
|
|
export class Data {
|
|
readonly auth_key: string;
|
|
readonly raw: string;
|
|
readonly sign: string;
|
|
parsed: {
|
|
user_id: number;
|
|
user_name: string;
|
|
data_age: number;
|
|
user_group_id: number;
|
|
is_staff: boolean;
|
|
user_groups: number[];
|
|
};
|
|
constructor(auth: string, raw: string, sign: string);
|
|
data_json(): string;
|
|
data_sign(): string;
|
|
name(): string;
|
|
user_id();
|
|
user_group();
|
|
is_stuff(): boolean;
|
|
is_premium(): boolean;
|
|
data_age(): Date;
|
|
is_expired(): boolean;
|
|
should_renew(): boolean;
|
|
}
|
|
export function logged_in(): boolean;
|
|
export function data(): Data;
|
|
export interface LoginResult {
|
|
status: "success" | "captcha" | "error";
|
|
error_message?: string;
|
|
captcha?: {
|
|
type: "gre-captcha" | "unknown";
|
|
data: any; /* in case of gre-captcha it would be the side key */
|
|
};
|
|
}
|
|
export function login(username: string, password: string, captcha?: any): Promise<LoginResult>;
|
|
export function renew_data(): Promise<"success" | "login-required">;
|
|
export function logout(): Promise<void>;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\profiles\Identity.ts */
|
|
declare namespace profiles.identities {
|
|
export enum IdentitifyType {
|
|
TEAFORO,
|
|
TEAMSPEAK,
|
|
NICKNAME
|
|
}
|
|
export interface Identity {
|
|
fallback_name(): string | undefined;
|
|
uid(): string;
|
|
type(): IdentitifyType;
|
|
valid(): boolean;
|
|
encode?(): string;
|
|
decode(data: string): Promise<void>;
|
|
spawn_identity_handshake_handler(connection: connection.AbstractServerConnection): connection.HandshakeIdentityHandler;
|
|
}
|
|
export function decode_identity(type: IdentitifyType, data: string): Promise<Identity>;
|
|
export function create_identity(type: IdentitifyType);
|
|
export class HandshakeCommandHandler<T extends AbstractHandshakeIdentityHandler> extends connection.AbstractCommandHandler {
|
|
readonly handle: T;
|
|
constructor(connection: connection.AbstractServerConnection, handle: T);
|
|
handle_command(command: connection.ServerCommand): boolean;
|
|
}
|
|
export abstract class AbstractHandshakeIdentityHandler implements connection.HandshakeIdentityHandler {
|
|
connection: connection.AbstractServerConnection;
|
|
protected callbacks: ((success: boolean, message?: string) => any)[];
|
|
protected constructor(connection: connection.AbstractServerConnection);
|
|
register_callback(callback: (success: boolean, message?: string) => any);
|
|
abstract start_handshake();
|
|
protected trigger_success();
|
|
protected trigger_fail(message: string);
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\proto.ts */
|
|
declare interface Array<T> {
|
|
remove(elem?: T): boolean;
|
|
last?(): T;
|
|
pop_front(): T | undefined;
|
|
}
|
|
declare interface JSON {
|
|
map_to<T>(object: T, json: any, variables?: string | string[], validator?: (map_field: string, map_value: string) => boolean, variable_direction?: number): number;
|
|
map_field_to<T>(object: T, value: any, field: string): boolean;
|
|
}
|
|
declare type JQueryScrollType = "height" | "width";
|
|
declare interface JQuery<TElement = HTMLElement> {
|
|
render(values?: any): string;
|
|
renderTag(values?: any): JQuery<TElement>;
|
|
hasScrollBar(direction?: JQueryScrollType): boolean;
|
|
visible_height(): number;
|
|
visible_width(): number;
|
|
/* bootstrap */
|
|
alert(): JQuery<TElement>;
|
|
modal(properties: any): this;
|
|
bootstrapMaterialDesign(): this;
|
|
/* first element which matches the selector, could be the element itself or a parent */
|
|
firstParent(selector: string): JQuery;
|
|
}
|
|
declare interface JQueryStatic<TElement extends Node = HTMLElement> {
|
|
spawn<K extends keyof HTMLElementTagNameMap>(tagName: K): JQuery<HTMLElementTagNameMap[K]>;
|
|
views: any;
|
|
}
|
|
declare interface String {
|
|
format(...fmt): string;
|
|
format(arguments: string[]): string;
|
|
}
|
|
declare function concatenate(resultConstructor, ...arrays);
|
|
declare function formatDate(secs: number): string;
|
|
declare function calculate_width(text: string): number;
|
|
declare interface Twemoji {
|
|
parse(message: string): string;
|
|
}
|
|
declare let twemoji: Twemoji;
|
|
declare interface HighlightJS {
|
|
listLanguages(): string[];
|
|
getLanguage(name: string): any | undefined;
|
|
highlight(language: string, text: string, ignore_illegals?: boolean): HighlightJSResult;
|
|
highlightAuto(text: string): HighlightJSResult;
|
|
}
|
|
declare interface HighlightJSResult {
|
|
language: string;
|
|
relevance: number;
|
|
value: string;
|
|
second_best?: any;
|
|
}
|
|
declare interface DOMPurify {
|
|
sanitize(html: string, config?: {
|
|
ADD_ATTR?: string[];
|
|
ADD_TAGS?: string[];
|
|
}): string;
|
|
}
|
|
declare let DOMPurify: DOMPurify;
|
|
declare let remarkable: typeof window.remarkable;
|
|
declare class webkitAudioContext extends AudioContext {
|
|
}
|
|
declare class webkitOfflineAudioContext extends OfflineAudioContext {
|
|
}
|
|
declare interface Window {
|
|
readonly webkitAudioContext: typeof webkitAudioContext;
|
|
readonly AudioContext: typeof webkitAudioContext;
|
|
readonly OfflineAudioContext: typeof OfflineAudioContext;
|
|
readonly webkitOfflineAudioContext: typeof webkitOfflineAudioContext;
|
|
readonly RTCPeerConnection: typeof RTCPeerConnection;
|
|
readonly Pointer_stringify: any;
|
|
readonly jsrender: any;
|
|
twemoji: Twemoji;
|
|
hljs: HighlightJS;
|
|
remarkable: any;
|
|
require(id: string): any;
|
|
}
|
|
declare interface Navigator {
|
|
browserSpecs: {
|
|
name: string;
|
|
version: string;
|
|
};
|
|
mozGetUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
|
|
webkitGetUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\settings.ts */
|
|
declare interface SettingsKey<T> {
|
|
key: string;
|
|
fallback_keys?: string | string[];
|
|
fallback_imports?: {
|
|
[key: string]: (value: string) => T;
|
|
};
|
|
description?: string;
|
|
default_value?: T;
|
|
require_restart?: boolean;
|
|
}
|
|
declare class SettingsBase {
|
|
protected static readonly UPDATE_DIRECT: boolean;
|
|
protected static transformStO?<T>(input?: string, _default?: T, default_type?: string): T;
|
|
protected static transformOtS?<T>(input: T): string;
|
|
protected static resolveKey<T>(key: SettingsKey<T>, _default: T, resolver: (key: string) => string | boolean, default_type?: string): T;
|
|
protected static keyify<T>(key: string | SettingsKey<T>): SettingsKey<T>;
|
|
}
|
|
declare class StaticSettings extends SettingsBase {
|
|
private static _instance: StaticSettings;
|
|
// @ts-ignore
|
|
static get instance(): StaticSettings;
|
|
protected _handle: StaticSettings;
|
|
protected _staticPropsTag: JQuery;
|
|
protected constructor(_reserved?);
|
|
private initializeStatic();
|
|
static?<T>(key: string | SettingsKey<T>, _default?: T, default_type?: string): T;
|
|
deleteStatic<T>(key: string | SettingsKey<T>);
|
|
}
|
|
declare class Settings extends StaticSettings {
|
|
static readonly KEY_DISABLE_COSMETIC_SLOWDOWN: SettingsKey<boolean>;
|
|
static readonly KEY_DISABLE_CONTEXT_MENU: SettingsKey<boolean>;
|
|
static readonly KEY_DISABLE_GLOBAL_CONTEXT_MENU: SettingsKey<boolean>;
|
|
static readonly KEY_DISABLE_UNLOAD_DIALOG: SettingsKey<boolean>;
|
|
static readonly KEY_DISABLE_VOICE: SettingsKey<boolean>;
|
|
static readonly KEY_DISABLE_MULTI_SESSION: SettingsKey<boolean>;
|
|
static readonly KEY_LOAD_DUMMY_ERROR: SettingsKey<boolean>;
|
|
/* Control bar */
|
|
static readonly KEY_CONTROL_MUTE_INPUT: SettingsKey<boolean>;
|
|
static readonly KEY_CONTROL_MUTE_OUTPUT: SettingsKey<boolean>;
|
|
static readonly KEY_CONTROL_SHOW_QUERIES: SettingsKey<boolean>;
|
|
static readonly KEY_CONTROL_CHANNEL_SUBSCRIBE_ALL: SettingsKey<boolean>;
|
|
/* Connect parameters */
|
|
static readonly KEY_FLAG_CONNECT_DEFAULT: SettingsKey<boolean>;
|
|
static readonly KEY_CONNECT_ADDRESS: SettingsKey<string>;
|
|
static readonly KEY_CONNECT_PROFILE: SettingsKey<string>;
|
|
static readonly KEY_CONNECT_USERNAME: SettingsKey<string>;
|
|
static readonly KEY_CONNECT_PASSWORD: SettingsKey<string>;
|
|
static readonly KEY_FLAG_CONNECT_PASSWORD: SettingsKey<boolean>;
|
|
static readonly KEY_CONNECT_HISTORY: SettingsKey<string>;
|
|
static readonly KEY_CONNECT_NO_DNSPROXY: SettingsKey<boolean>;
|
|
static readonly KEY_CERTIFICATE_CALLBACK: SettingsKey<string>;
|
|
/* sounds */
|
|
static readonly KEY_SOUND_MASTER: SettingsKey<number>;
|
|
static readonly KEY_SOUND_MASTER_SOUNDS: SettingsKey<number>;
|
|
static readonly KEY_CHAT_FIXED_TIMESTAMPS: SettingsKey<boolean>;
|
|
static readonly KEY_CHAT_COLLOQUIAL_TIMESTAMPS: SettingsKey<boolean>;
|
|
static readonly KEY_CHAT_COLORED_EMOJIES: SettingsKey<boolean>;
|
|
static readonly KEY_CHAT_TAG_URLS: SettingsKey<boolean>;
|
|
static readonly KEY_CHAT_ENABLE_MARKDOWN: SettingsKey<boolean>;
|
|
static readonly KEY_CHAT_ENABLE_BBCODE: SettingsKey<boolean>;
|
|
static readonly KEY_SWITCH_INSTANT_CHAT: SettingsKey<boolean>;
|
|
static readonly KEY_SWITCH_INSTANT_CLIENT: SettingsKey<boolean>;
|
|
static readonly KEY_HOSTBANNER_BACKGROUND: SettingsKey<boolean>;
|
|
static readonly KEY_CHANNEL_EDIT_ADVANCED: SettingsKey<boolean>;
|
|
static readonly KEY_PERMISSIONS_SHOW_ALL: SettingsKey<boolean>;
|
|
static readonly KEY_TEAFORO_URL: SettingsKey<string>;
|
|
static readonly KEY_FONT_SIZE: SettingsKey<number>;
|
|
static readonly KEY_ICON_SIZE: SettingsKey<number>;
|
|
static readonly KEY_LAST_INVITE_LINK_TYPE: SettingsKey<string>;
|
|
static readonly FN_INVITE_LINK_SETTING: (name: string) => SettingsKey<string>;
|
|
static readonly FN_SERVER_CHANNEL_SUBSCRIBE_MODE: (channel_id: number) => SettingsKey<number>;
|
|
static readonly FN_PROFILE_RECORD: (name: string) => SettingsKey<any>;
|
|
static readonly KEYS;
|
|
static initialize();
|
|
private cacheGlobal;
|
|
private saveWorker: NodeJS.Timer;
|
|
private updated: boolean;
|
|
constructor();
|
|
static_global?<T>(key: string | SettingsKey<T>, _default?: T): T;
|
|
global?<T>(key: string | SettingsKey<T>, _default?: T): T;
|
|
changeGlobal<T>(key: string | SettingsKey<T>, value?: T);
|
|
save();
|
|
}
|
|
declare class ServerSettings extends SettingsBase {
|
|
private cacheServer;
|
|
private _server_unique_id: string;
|
|
private _server_save_worker: NodeJS.Timer;
|
|
private _server_settings_updated: boolean;
|
|
private _destroyed;
|
|
constructor();
|
|
destroy();
|
|
server?<T>(key: string | SettingsKey<T>, _default?: T): T;
|
|
changeServer<T>(key: string | SettingsKey<T>, value?: T);
|
|
setServer(server_unique_id: string);
|
|
save();
|
|
}
|
|
declare let settings: Settings;
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\sound\Sounds.ts */
|
|
declare enum Sound {
|
|
SOUND_TEST = "sound.test",
|
|
SOUND_EGG = "sound.egg",
|
|
AWAY_ACTIVATED = "away_activated",
|
|
AWAY_DEACTIVATED = "away_deactivated",
|
|
MICROPHONE_MUTED = "microphone.muted",
|
|
MICROPHONE_ACTIVATED = "microphone.activated",
|
|
SOUND_MUTED = "sound.muted",
|
|
SOUND_ACTIVATED = "sound.activated",
|
|
CONNECTION_CONNECTED = "connection.connected",
|
|
CONNECTION_DISCONNECTED = "connection.disconnected",
|
|
CONNECTION_BANNED = "connection.banned",
|
|
CONNECTION_DISCONNECTED_TIMEOUT = "connection.disconnected.timeout",
|
|
CONNECTION_REFUSED = "connection.refused",
|
|
SERVER_EDITED = "server.edited",
|
|
SERVER_EDITED_SELF = "server.edited.self",
|
|
SERVER_KICKED = "server.kicked",
|
|
CHANNEL_CREATED = "channel.created",
|
|
CHANNEL_MOVED = "channel.moved",
|
|
CHANNEL_EDITED = "channel.edited",
|
|
CHANNEL_EDITED_SELF = "channel.edited.self",
|
|
CHANNEL_DELETED = "channel.deleted",
|
|
CHANNEL_JOINED = "channel.joined",
|
|
CHANNEL_KICKED = "channel.kicked",
|
|
USER_MOVED = "user.moved",
|
|
USER_MOVED_SELF = "user.moved.self",
|
|
USER_POKED_SELF = "user.poked.self",
|
|
USER_BANNED = "user.banned",
|
|
USER_ENTERED = "user.joined",
|
|
USER_ENTERED_MOVED = "user.joined.moved",
|
|
USER_ENTERED_KICKED = "user.joined.kicked",
|
|
USER_ENTERED_CONNECT = "user.joined.connect",
|
|
USER_LEFT = "user.left",
|
|
USER_LEFT_MOVED = "user.left.moved",
|
|
USER_LEFT_KICKED_CHANNEL = "user.left.kicked.server",
|
|
USER_LEFT_KICKED_SERVER = "user.left.kicked.channel",
|
|
USER_LEFT_DISCONNECT = "user.left.disconnect",
|
|
USER_LEFT_BANNED = "user.left.banned",
|
|
USER_LEFT_TIMEOUT = "user.left.timeout",
|
|
ERROR_INSUFFICIENT_PERMISSIONS = "error.insufficient_permissions",
|
|
MESSAGE_SEND = "message.send",
|
|
MESSAGE_RECEIVED = "message.received",
|
|
GROUP_SERVER_ASSIGNED = "group.server.assigned",
|
|
GROUP_SERVER_REVOKED = "group.server.revoked",
|
|
GROUP_CHANNEL_CHANGED = "group.channel.changed",
|
|
GROUP_SERVER_ASSIGNED_SELF = "group.server.assigned.self",
|
|
GROUP_SERVER_REVOKED_SELF = "group.server.revoked.self",
|
|
GROUP_CHANNEL_CHANGED_SELF = "group.channel.changed.self"
|
|
}
|
|
declare namespace sound {
|
|
export interface SoundHandle {
|
|
key: string;
|
|
filename: string;
|
|
}
|
|
export interface SoundFile {
|
|
path: string;
|
|
volume?: number;
|
|
}
|
|
export function get_sound_volume(sound: Sound, default_volume?: number): number;
|
|
export function set_sound_volume(sound: Sound, volume: number);
|
|
export function get_master_volume(): number;
|
|
export function set_master_volume(volume: number);
|
|
export function overlap_activated(): boolean;
|
|
export function set_overlap_activated(flag: boolean);
|
|
export function ignore_output_muted(): boolean;
|
|
export function set_ignore_output_muted(flag: boolean);
|
|
export function reinitialisize_audio();
|
|
export function save();
|
|
export function initialize(): Promise<void>;
|
|
export interface PlaybackOptions {
|
|
ignore_muted?: boolean;
|
|
ignore_overlap?: boolean;
|
|
default_volume?: number;
|
|
callback?: (flag: boolean) => any;
|
|
}
|
|
export function resolve_sound(sound: Sound): Promise<SoundHandle>;
|
|
export let manager: SoundManager;
|
|
export class SoundManager {
|
|
private readonly _handle: ConnectionHandler;
|
|
private _playing_sounds: {
|
|
[key: string]: number;
|
|
};
|
|
constructor(handle: ConnectionHandler);
|
|
play(_sound: Sound, options?: PlaybackOptions);
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\stats.ts */
|
|
declare namespace stats {
|
|
export enum CloseCodes {
|
|
UNSET = 3000,
|
|
RECONNECT = 3001,
|
|
INTERNAL_ERROR = 3002,
|
|
BANNED = 3100
|
|
}
|
|
export enum ConnectionState {
|
|
CONNECTING,
|
|
INITIALIZING,
|
|
CONNECTED,
|
|
UNSET
|
|
}
|
|
export class SessionConfig {
|
|
/*
|
|
* All collected statistics will only be cached by the stats server.
|
|
* No data will be saved.
|
|
*/
|
|
volatile_collection_only?: boolean;
|
|
/*
|
|
* Anonymize all IP addresses which will be provided while the stats collection.
|
|
* This option is quite useless when volatile_collection_only is active.
|
|
*/
|
|
anonymize_ip_addresses?: boolean;
|
|
}
|
|
export class Config extends SessionConfig {
|
|
verbose?: boolean;
|
|
reconnect_interval?: number;
|
|
}
|
|
export interface UserCountData {
|
|
online_users: number;
|
|
unique_online_users: number;
|
|
}
|
|
export type UserCountListener = (data: UserCountData) => any;
|
|
export function initialize(config: Config);
|
|
export function register_user_count_listener(listener: UserCountListener);
|
|
export function all_user_count_listener(): UserCountListener[];
|
|
export function deregister_user_count_listener(listener: UserCountListener);
|
|
namespace connection {
|
|
export let connection_state: ConnectionState;
|
|
export function start_connection();
|
|
export function close_connection();
|
|
export function cancel_reconnect();
|
|
namespace handler { }
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\channel.ts */
|
|
declare enum ChannelType {
|
|
PERMANENT,
|
|
SEMI_PERMANENT,
|
|
TEMPORARY
|
|
}
|
|
declare namespace ChannelType {
|
|
export function normalize(mode: ChannelType);
|
|
}
|
|
declare enum ChannelSubscribeMode {
|
|
SUBSCRIBED,
|
|
UNSUBSCRIBED,
|
|
INHERITED
|
|
}
|
|
declare class ChannelProperties {
|
|
channel_order: number;
|
|
channel_name: string;
|
|
channel_name_phonetic: string;
|
|
channel_topic: string;
|
|
channel_password: string;
|
|
channel_codec: number;
|
|
channel_codec_quality: number;
|
|
channel_codec_is_unencrypted: boolean;
|
|
channel_maxclients: number;
|
|
channel_maxfamilyclients: number;
|
|
channel_needed_talk_power: number;
|
|
channel_flag_permanent: boolean;
|
|
channel_flag_semi_permanent: boolean;
|
|
channel_flag_default: boolean;
|
|
channel_flag_password: boolean;
|
|
channel_flag_maxclients_unlimited: boolean;
|
|
channel_flag_maxfamilyclients_inherited: boolean;
|
|
channel_flag_maxfamilyclients_unlimited: boolean;
|
|
channel_icon_id: number;
|
|
channel_delete_delay: number;
|
|
//Only after request
|
|
channel_description: string;
|
|
channel_flag_conversation_private: boolean;
|
|
channel_conversation_history_length: number;
|
|
}
|
|
declare class ChannelEntry {
|
|
channelTree: ChannelTree;
|
|
channelId: number;
|
|
parent?: ChannelEntry;
|
|
properties: ChannelProperties;
|
|
channel_previous?: ChannelEntry;
|
|
channel_next?: ChannelEntry;
|
|
private _channel_name_alignment: string;
|
|
private _channel_name_formatted: string;
|
|
private _family_index: number;
|
|
//HTML DOM elements
|
|
private _tag_root: JQuery<HTMLElement>;
|
|
private _tag_siblings: JQuery<HTMLElement>;
|
|
private _tag_clients: JQuery<HTMLElement>;
|
|
private _tag_channel: JQuery<HTMLElement>;
|
|
private _destroyed;
|
|
private _cachedPassword: string;
|
|
private _cached_channel_description: string;
|
|
private _cached_channel_description_promise: Promise<string>;
|
|
private _cached_channel_description_promise_resolve: any;
|
|
private _cached_channel_description_promise_reject: any;
|
|
private _flag_subscribed: boolean;
|
|
private _subscribe_mode: ChannelSubscribeMode;
|
|
constructor(channelId, channelName, parent?);
|
|
destroy();
|
|
channelName();
|
|
formattedChannelName();
|
|
getChannelDescription(): Promise<string>;
|
|
parent_channel();
|
|
hasParent();
|
|
getChannelId();
|
|
children(deep?): ChannelEntry[];
|
|
clients(deep?): ClientEntry[];
|
|
clients_ordered(): ClientEntry[];
|
|
update_family_index(enforce?: boolean);
|
|
calculate_family_index(enforce_recalculate?: boolean): number;
|
|
private initializeTag();
|
|
rootTag(): JQuery<HTMLElement>;
|
|
channelTag(): JQuery<HTMLElement>;
|
|
siblingTag(): JQuery<HTMLElement>;
|
|
clientTag(): JQuery<HTMLElement>;
|
|
private _reorder_timer: number;
|
|
reorderClients(sync?: boolean);
|
|
initializeListener();
|
|
showContextMenu(x: number, y: number, on_close?: () => void);
|
|
handle_frame_resized();
|
|
private static NAME_ALIGNMENTS: string[];
|
|
private __updateChannelName();
|
|
recalculate_repetitive_name();
|
|
updateVariables(...variables: {
|
|
key: string;
|
|
value: string;
|
|
}[]);
|
|
updateChannelTypeIcon();
|
|
generate_bbcode();
|
|
generate_tag(braces?: boolean): JQuery;
|
|
channelType(): ChannelType;
|
|
joinChannel();
|
|
cached_password();
|
|
subscribe(): Promise<void>;
|
|
unsubscribe(inherited_subscription_mode?: boolean): Promise<void>;
|
|
// @ts-ignore
|
|
get flag_subscribed(): boolean;
|
|
// @ts-ignore
|
|
set flag_subscribed(flag: boolean);
|
|
// @ts-ignore
|
|
get subscribe_mode(): ChannelSubscribeMode;
|
|
// @ts-ignore
|
|
set subscribe_mode(mode: ChannelSubscribeMode);
|
|
// @ts-ignore
|
|
set flag_text_unread(flag: boolean);
|
|
log_data(): log.server.base.Channel;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\client_move.ts */
|
|
declare class ClientMover {
|
|
static readonly listener_root;
|
|
static readonly move_element;
|
|
readonly channel_tree: ChannelTree;
|
|
selected_client: ClientEntry | ClientEntry[];
|
|
hovered_channel: HTMLDivElement;
|
|
callback: (channel?: ChannelEntry) => any;
|
|
enabled: boolean;
|
|
private _bound_finish;
|
|
private _bound_move;
|
|
private _active: boolean;
|
|
private origin_point: {
|
|
x: number;
|
|
y: number;
|
|
};
|
|
constructor(tree: ChannelTree);
|
|
is_active();
|
|
private hover_text();
|
|
private bbcode_text();
|
|
activate(client: ClientEntry | ClientEntry[], callback: (channel?: ChannelEntry) => any, event: any);
|
|
private move_listener(event);
|
|
private finish_listener(event);
|
|
deactivate();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\client.ts */
|
|
declare enum ClientType {
|
|
CLIENT_VOICE,
|
|
CLIENT_QUERY,
|
|
CLIENT_INTERNAL,
|
|
CLIENT_WEB,
|
|
CLIENT_MUSIC,
|
|
CLIENT_UNDEFINED
|
|
}
|
|
declare class ClientProperties {
|
|
client_type: ClientType;
|
|
client_type_exact: ClientType;
|
|
client_database_id: number;
|
|
client_version: string;
|
|
client_platform: string;
|
|
client_nickname: string;
|
|
client_unique_identifier: string;
|
|
client_description: string;
|
|
client_servergroups: string;
|
|
client_channel_group_id: number;
|
|
client_lastconnected: number;
|
|
client_created: number;
|
|
client_totalconnections: number;
|
|
client_flag_avatar: string;
|
|
client_icon_id: number;
|
|
client_away_message: string;
|
|
client_away: boolean;
|
|
client_country: string;
|
|
client_input_hardware: boolean;
|
|
client_output_hardware: boolean;
|
|
client_input_muted: boolean;
|
|
client_output_muted: boolean;
|
|
client_is_channel_commander: boolean;
|
|
client_teaforo_id: number;
|
|
client_teaforo_name: string;
|
|
client_teaforo_flags: number;
|
|
/* not updated in view! */
|
|
client_month_bytes_uploaded: number;
|
|
client_month_bytes_downloaded: number;
|
|
client_total_bytes_uploaded: number;
|
|
client_total_bytes_downloaded: number;
|
|
client_talk_power: number;
|
|
client_is_priority_speaker: boolean;
|
|
}
|
|
declare class ClientConnectionInfo {
|
|
connection_bandwidth_received_last_minute_control: number;
|
|
connection_bandwidth_received_last_minute_keepalive: number;
|
|
connection_bandwidth_received_last_minute_speech: number;
|
|
connection_bandwidth_received_last_second_control: number;
|
|
connection_bandwidth_received_last_second_keepalive: number;
|
|
connection_bandwidth_received_last_second_speech: number;
|
|
connection_bandwidth_sent_last_minute_control: number;
|
|
connection_bandwidth_sent_last_minute_keepalive: number;
|
|
connection_bandwidth_sent_last_minute_speech: number;
|
|
connection_bandwidth_sent_last_second_control: number;
|
|
connection_bandwidth_sent_last_second_keepalive: number;
|
|
connection_bandwidth_sent_last_second_speech: number;
|
|
connection_bytes_received_control: number;
|
|
connection_bytes_received_keepalive: number;
|
|
connection_bytes_received_speech: number;
|
|
connection_bytes_sent_control: number;
|
|
connection_bytes_sent_keepalive: number;
|
|
connection_bytes_sent_speech: number;
|
|
connection_packets_received_control: number;
|
|
connection_packets_received_keepalive: number;
|
|
connection_packets_received_speech: number;
|
|
connection_packets_sent_control: number;
|
|
connection_packets_sent_keepalive: number;
|
|
connection_packets_sent_speech: number;
|
|
connection_ping: number;
|
|
connection_ping_deviation: number;
|
|
connection_server2client_packetloss_control: number;
|
|
connection_server2client_packetloss_keepalive: number;
|
|
connection_server2client_packetloss_speech: number;
|
|
connection_server2client_packetloss_total: number;
|
|
connection_client2server_packetloss_speech: number;
|
|
connection_client2server_packetloss_keepalive: number;
|
|
connection_client2server_packetloss_control: number;
|
|
connection_client2server_packetloss_total: number;
|
|
connection_filetransfer_bandwidth_sent: number;
|
|
connection_filetransfer_bandwidth_received: number;
|
|
connection_connected_time: number;
|
|
connection_idle_time: number;
|
|
connection_client_ip: string | undefined;
|
|
connection_client_port: number;
|
|
}
|
|
declare class ClientEntry {
|
|
readonly events: events.Registry<events.channel_tree.client>;
|
|
protected _clientId: number;
|
|
protected _channel: ChannelEntry;
|
|
protected _tag: JQuery<HTMLElement>;
|
|
protected _properties: ClientProperties;
|
|
protected lastVariableUpdate: number;
|
|
protected _speaking: boolean;
|
|
protected _listener_initialized: boolean;
|
|
protected _audio_handle: connection.voice.VoiceClient;
|
|
protected _audio_volume: number;
|
|
protected _audio_muted: boolean;
|
|
private _info_variables_promise: Promise<void>;
|
|
private _info_variables_promise_timestamp: number;
|
|
private _info_connection_promise: Promise<ClientConnectionInfo>;
|
|
private _info_connection_promise_timestamp: number;
|
|
private _info_connection_promise_resolve: any;
|
|
private _info_connection_promise_reject: any;
|
|
channelTree: ChannelTree;
|
|
constructor(clientId: number, clientName, properties?: ClientProperties);
|
|
destroy();
|
|
tree_unregistered();
|
|
set_audio_handle(handle: connection.voice.VoiceClient);
|
|
get_audio_handle(): connection.voice.VoiceClient;
|
|
// @ts-ignore
|
|
get properties(): ClientProperties;
|
|
currentChannel(): ChannelEntry;
|
|
clientNickName();
|
|
clientUid();
|
|
clientId();
|
|
is_muted();
|
|
set_muted(flag: boolean, update_icon: boolean, force?: boolean);
|
|
protected initializeListener();
|
|
protected contextmenu_info(): contextmenu.MenuEntry[];
|
|
protected assignment_context(): contextmenu.MenuEntry[];
|
|
open_assignment_modal();
|
|
open_text_chat();
|
|
showContextMenu(x: number, y: number, on_close?: () => void);
|
|
// @ts-ignore
|
|
get tag(): JQuery<HTMLElement>;
|
|
static bbcodeTag(id: number, name: string, uid: string): string;
|
|
static chatTag(id: number, name: string, uid: string, braces?: boolean): JQuery;
|
|
create_bbcode(): string;
|
|
createChatTag(braces?: boolean): JQuery;
|
|
// @ts-ignore
|
|
set speaking(flag);
|
|
updateClientStatusIcons();
|
|
updateClientSpeakIcon();
|
|
updateAwayMessage();
|
|
updateVariables(...variables: {
|
|
key: string;
|
|
value: string;
|
|
}[]);
|
|
update_displayed_client_groups();
|
|
updateClientVariables(force_update?: boolean): Promise<void>;
|
|
updateClientIcon();
|
|
updateGroupIcon(group: Group);
|
|
update_group_icon_order();
|
|
assignedServerGroupIds(): number[];
|
|
assignedChannelGroup(): number;
|
|
groupAssigned(group: Group): boolean;
|
|
onDelete();
|
|
calculateOnlineTime(): number;
|
|
avatarId?(): string;
|
|
update_family_index();
|
|
log_data(): log.server.base.Client;
|
|
/* max 1s ago, so we could update every second */
|
|
request_connection_info(): Promise<ClientConnectionInfo>;
|
|
set_connection_info(info: ClientConnectionInfo);
|
|
// @ts-ignore
|
|
set flag_text_unread(flag: boolean);
|
|
}
|
|
declare class LocalClientEntry extends ClientEntry {
|
|
handle: ConnectionHandler;
|
|
private renaming: boolean;
|
|
constructor(handle: ConnectionHandler);
|
|
showContextMenu(x: number, y: number, on_close?: () => void): void;
|
|
initializeListener(): void;
|
|
openRename(): void;
|
|
}
|
|
declare class MusicClientProperties extends ClientProperties {
|
|
player_state: number;
|
|
player_volume: number;
|
|
client_playlist_id: number;
|
|
client_disabled: boolean;
|
|
client_flag_notify_song_change: boolean;
|
|
client_bot_type: number;
|
|
client_uptime_mode: number;
|
|
}
|
|
declare class SongInfo {
|
|
song_id: number;
|
|
song_url: string;
|
|
song_invoker: number;
|
|
song_loaded: boolean;
|
|
/* only if song_loaded = true */
|
|
song_title: string;
|
|
song_description: string;
|
|
song_thumbnail: string;
|
|
song_length: number;
|
|
}
|
|
declare class MusicClientPlayerInfo extends SongInfo {
|
|
bot_id: number;
|
|
player_state: number;
|
|
player_buffered_index: number;
|
|
player_replay_index: number;
|
|
player_max_index: number;
|
|
player_seekable: boolean;
|
|
player_title: string;
|
|
player_description: string;
|
|
}
|
|
declare class MusicClientEntry extends ClientEntry {
|
|
private _info_promise: Promise<MusicClientPlayerInfo>;
|
|
private _info_promise_age: number;
|
|
private _info_promise_resolve: any;
|
|
private _info_promise_reject: any;
|
|
constructor(clientId, clientName);
|
|
destroy();
|
|
// @ts-ignore
|
|
get properties(): MusicClientProperties;
|
|
showContextMenu(x: number, y: number, on_close?: () => void): void;
|
|
initializeListener(): void;
|
|
handlePlayerInfo(json);
|
|
requestPlayerInfo(max_age?: number): Promise<MusicClientPlayerInfo>;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\elements\context_divider.ts */
|
|
declare interface JQuery<TElement = HTMLElement> {
|
|
dividerfy(): this;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\elements\context_menu.ts */
|
|
declare namespace contextmenu {
|
|
export interface MenuEntry {
|
|
callback?: () => void;
|
|
type: MenuEntryType;
|
|
name: (() => string) | string;
|
|
icon_class?: string;
|
|
icon_path?: string;
|
|
disabled?: boolean;
|
|
visible?: boolean;
|
|
checkbox_checked?: boolean;
|
|
invalidPermission?: boolean;
|
|
sub_menu?: MenuEntry[];
|
|
}
|
|
export enum MenuEntryType {
|
|
CLOSE,
|
|
ENTRY,
|
|
CHECKBOX,
|
|
HR,
|
|
SUB_MENU
|
|
}
|
|
export class Entry {
|
|
static HR();
|
|
static CLOSE(callback: () => void);
|
|
}
|
|
export interface ContextMenuProvider {
|
|
despawn_context_menu();
|
|
spawn_context_menu(x: number, y: number, ...entries: MenuEntry[]);
|
|
initialize();
|
|
finalize();
|
|
html_format_enabled(): boolean;
|
|
}
|
|
export function spawn_context_menu(x: number, y: number, ...entries: MenuEntry[]);
|
|
export function despawn_context_menu();
|
|
export function get_provider(): ContextMenuProvider;
|
|
export function set_provider(_provider: ContextMenuProvider);
|
|
}
|
|
declare class HTMLContextMenuProvider implements contextmenu.ContextMenuProvider {
|
|
private _global_click_listener: (event) => any;
|
|
private _context_menu: JQuery;
|
|
private _close_callbacks: (() => any)[];
|
|
private _visible;
|
|
despawn_context_menu();
|
|
finalize();
|
|
initialize();
|
|
private on_global_click(event);
|
|
private generate_tag(entry: contextmenu.MenuEntry): JQuery;
|
|
spawn_context_menu(x: number, y: number, ...entries: contextmenu.MenuEntry[]);
|
|
html_format_enabled(): boolean;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\elements\modal.ts */
|
|
declare enum ElementType {
|
|
HEADER,
|
|
BODY,
|
|
FOOTER
|
|
}
|
|
declare type BodyCreator = (() => JQuery | JQuery[] | string) | string | JQuery | JQuery[];
|
|
declare const ModalFunctions;
|
|
declare class ModalProperties {
|
|
template?: string;
|
|
header: BodyCreator;
|
|
body: BodyCreator;
|
|
footer: BodyCreator;
|
|
closeListener: (() => void) | (() => void)[];
|
|
registerCloseListener(listener: () => void): this;
|
|
width: number | string;
|
|
min_width?: number | string;
|
|
height: number | string;
|
|
closeable: boolean;
|
|
triggerClose();
|
|
template_properties?: any;
|
|
trigger_tab: boolean;
|
|
full_size?: boolean;
|
|
}
|
|
declare namespace modal {
|
|
export function initialize_modals();
|
|
}
|
|
declare let _global_modal_count;
|
|
declare let _global_modal_last: HTMLElement;
|
|
declare let _global_modal_last_time: number;
|
|
declare class Modal {
|
|
private _htmlTag: JQuery;
|
|
properties: ModalProperties;
|
|
shown: boolean;
|
|
open_listener: (() => any)[];
|
|
close_listener: (() => any)[];
|
|
close_elements: JQuery;
|
|
constructor(props: ModalProperties);
|
|
// @ts-ignore
|
|
get htmlTag(): JQuery;
|
|
private _create();
|
|
open();
|
|
close();
|
|
set_closeable(flag: boolean);
|
|
}
|
|
declare function createModal(data: ModalProperties | any): Modal;
|
|
declare class InputModalProperties extends ModalProperties {
|
|
maxLength?: number;
|
|
field_title?: string;
|
|
field_label?: string;
|
|
field_placeholder?: string;
|
|
error_message?: string;
|
|
}
|
|
declare function createInputModal(headMessage: BodyCreator, question: BodyCreator, validator: (input: string) => boolean, callback: (flag: boolean | string) => void, props?: InputModalProperties | any): Modal;
|
|
declare function createErrorModal(header: BodyCreator, message: BodyCreator, props?: ModalProperties | any);
|
|
declare function createInfoModal(header: BodyCreator, message: BodyCreator, props?: ModalProperties | any);
|
|
declare interface ModalElements {
|
|
header?: BodyCreator;
|
|
body?: BodyCreator;
|
|
footer?: BodyCreator;
|
|
}
|
|
declare interface JQuery<TElement = HTMLElement> {
|
|
modalize(entry_callback?: (header: JQuery, body: JQuery, footer: JQuery) => ModalElements | void, properties?: ModalProperties | any): Modal;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\elements\net_graph.ts */
|
|
declare namespace net.graph {
|
|
export type Entry = {
|
|
timestamp: number;
|
|
upload?: number;
|
|
download?: number;
|
|
highlight?: boolean;
|
|
};
|
|
export type Style = {
|
|
background_color: string;
|
|
separator_color: string;
|
|
separator_count: number;
|
|
separator_width: number;
|
|
upload: {
|
|
fill: string;
|
|
stroke: string;
|
|
strike_width: number;
|
|
};
|
|
download: {
|
|
fill: string;
|
|
stroke: string;
|
|
strike_width: number;
|
|
};
|
|
};
|
|
export type TimeSpan = {
|
|
origin: {
|
|
begin: number;
|
|
end: number;
|
|
time: number;
|
|
};
|
|
target: {
|
|
begin: number;
|
|
end: number;
|
|
time: number;
|
|
};
|
|
};
|
|
/* Great explanation of Bezier curves: http://en.wikipedia.org/wiki/Bezier_curve#Quadratic_curves
|
|
*
|
|
* Assuming A was the last point in the line plotted and B is the new point,
|
|
* we draw a curve with control points P and Q as below.
|
|
*
|
|
* A---P
|
|
* |
|
|
* |
|
|
* |
|
|
* Q---B
|
|
*
|
|
* Importantly, A and P are at the same y coordinate, as are B and Q. This is
|
|
* so adjacent curves appear to flow as one.
|
|
*/
|
|
export class Graph {
|
|
private static _loops: (() => any)[];
|
|
readonly canvas: HTMLCanvasElement;
|
|
public style: Style;
|
|
private _canvas_context: CanvasRenderingContext2D;
|
|
private _entries: Entry[];
|
|
private _entry_max;
|
|
private _max_space;
|
|
private _max_gap;
|
|
private _listener_mouse_move;
|
|
private _listener_mouse_out;
|
|
private _animate_loop;
|
|
_time_span: TimeSpan;
|
|
private _detailed_shown;
|
|
callback_detailed_info: (upload: number, download: number, timestamp: number, event: MouseEvent) => any;
|
|
callback_detailed_hide: () => any;
|
|
constructor(canvas: HTMLCanvasElement);
|
|
initialize();
|
|
terminate();
|
|
max_gap_size(value?: number): number;
|
|
private recalculate_cache(time_span?: boolean);
|
|
insert_entry(entry: Entry);
|
|
insert_entries(entries: Entry[]);
|
|
resize();
|
|
cleanup();
|
|
calculate_time_span(): {
|
|
begin: number;
|
|
end: number;
|
|
};
|
|
draw();
|
|
private on_mouse_move(event: MouseEvent);
|
|
private on_mouse_leave(event: MouseEvent);
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\elements\slider.ts */
|
|
declare interface SliderOptions {
|
|
min_value?: number;
|
|
max_value?: number;
|
|
initial_value?: number;
|
|
step?: number;
|
|
unit?: string;
|
|
value_field?: JQuery | JQuery[];
|
|
}
|
|
declare interface Slider {
|
|
value(value?: number): number;
|
|
}
|
|
declare function sliderfy(slider: JQuery, options?: SliderOptions): Slider;
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\elements\tab.ts */
|
|
declare interface JQuery<TElement = HTMLElement> {
|
|
asTabWidget(copy?: boolean): JQuery<TElement>;
|
|
tabify(copy?: boolean): this;
|
|
changeElementType(type: string): JQuery<TElement>;
|
|
}
|
|
declare var TabFunctions;
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\elements\tooltip.ts */
|
|
declare function tooltip(entry: JQuery);
|
|
declare namespace tooltip {
|
|
export type Handle = {
|
|
show();
|
|
is_shown();
|
|
hide();
|
|
update();
|
|
};
|
|
export function initialize(entry: JQuery, callbacks?: {
|
|
on_show?(tag: JQuery);
|
|
on_hide?(tag: JQuery);
|
|
}): Handle;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\chat_frame.ts */
|
|
declare namespace chat {
|
|
export enum InfoFrameMode {
|
|
NONE = "none",
|
|
CHANNEL_CHAT = "channel_chat",
|
|
PRIVATE_CHAT = "private_chat",
|
|
CLIENT_INFO = "client_info",
|
|
MUSIC_BOT = "music_bot"
|
|
}
|
|
export class InfoFrame {
|
|
private readonly handle: Frame;
|
|
private _html_tag: JQuery;
|
|
private _mode: InfoFrameMode;
|
|
private _value_ping: JQuery;
|
|
private _ping_updater: number;
|
|
private _channel_text: ChannelEntry;
|
|
private _channel_voice: ChannelEntry;
|
|
private _button_conversation: HTMLElement;
|
|
private _button_bot_manage: JQuery;
|
|
private _button_song_add: JQuery;
|
|
constructor(handle: Frame);
|
|
html_tag(): JQuery;
|
|
destroy();
|
|
private _build_html_tag();
|
|
update_ping();
|
|
update_channel_talk();
|
|
update_channel_text();
|
|
update_channel_client_count(channel: ChannelEntry);
|
|
private update_channel_limit(channel: ChannelEntry, tag: JQuery);
|
|
private update_server_limit(server: ServerEntry, tag: JQuery);
|
|
update_chat_counter();
|
|
current_mode(): InfoFrameMode;
|
|
set_mode(mode: InfoFrameMode);
|
|
}
|
|
export enum FrameContent {
|
|
NONE,
|
|
PRIVATE_CHAT,
|
|
CHANNEL_CHAT,
|
|
CLIENT_INFO,
|
|
MUSIC_BOT
|
|
}
|
|
export class Frame {
|
|
readonly handle: ConnectionHandler;
|
|
private _info_frame: InfoFrame;
|
|
private _html_tag: JQuery;
|
|
private _container_info: JQuery;
|
|
private _container_chat: JQuery;
|
|
private _content_type: FrameContent;
|
|
private _conversations: PrivateConverations;
|
|
private _client_info: ClientInfo;
|
|
private _music_info: MusicInfo;
|
|
private _channel_conversations: channel.ConversationManager;
|
|
constructor(handle: ConnectionHandler);
|
|
html_tag(): JQuery;
|
|
info_frame(): InfoFrame;
|
|
content_type(): FrameContent;
|
|
destroy();
|
|
private _build_html_tag();
|
|
private_conversations(): PrivateConverations;
|
|
channel_conversations(): channel.ConversationManager;
|
|
client_info(): ClientInfo;
|
|
music_info(): MusicInfo;
|
|
private _clear();
|
|
show_private_conversations();
|
|
show_channel_conversations();
|
|
show_client_info(client: ClientEntry);
|
|
show_music_player(client: MusicClientEntry);
|
|
set_content(type: FrameContent);
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\chat.ts */
|
|
declare enum ChatType {
|
|
GENERAL,
|
|
SERVER,
|
|
CHANNEL,
|
|
CLIENT
|
|
}
|
|
declare const xbbcode: any;
|
|
declare namespace MessageHelper {
|
|
export function htmlEscape(message: string): string[];
|
|
export function formatElement(object: any, escape_html?: boolean): JQuery[];
|
|
export function formatMessage(pattern: string, ...objects: any[]): JQuery[];
|
|
export function bbcode_chat(message: string): JQuery[];
|
|
export namespace network {
|
|
export const KB;
|
|
export const MB;
|
|
export const GB;
|
|
export const TB;
|
|
export function format_bytes(value: number, options?: {
|
|
time?: string;
|
|
unit?: string;
|
|
exact?: boolean;
|
|
}): string;
|
|
}
|
|
export const K;
|
|
export const M;
|
|
export const G;
|
|
export const T;
|
|
export function format_number(value: number, options?: {
|
|
time?: string;
|
|
unit?: string;
|
|
});
|
|
export const TIME_SECOND;
|
|
export const TIME_MINUTE;
|
|
export const TIME_HOUR;
|
|
export const TIME_DAY;
|
|
export const TIME_WEEK;
|
|
export function format_time(time: number, default_value: string);
|
|
export function set_icon_size(size: string);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\connection_handlers.ts */
|
|
declare let server_connections: ServerConnectionManager;
|
|
declare class ServerConnectionManager {
|
|
private connection_handlers: ConnectionHandler[];
|
|
private active_handler: ConnectionHandler | undefined;
|
|
private _container_log_server: JQuery;
|
|
private _container_channel_tree: JQuery;
|
|
private _container_hostbanner: JQuery;
|
|
private _container_chat: JQuery;
|
|
private _tag: JQuery;
|
|
private _tag_connection_entries: JQuery;
|
|
private _tag_buttons_scoll: JQuery;
|
|
private _tag_button_scoll_right: JQuery;
|
|
private _tag_button_scoll_left: JQuery;
|
|
constructor(tag: JQuery);
|
|
spawn_server_connection_handler(): ConnectionHandler;
|
|
destroy_server_connection_handler(handler: ConnectionHandler);
|
|
set_active_connection_handler(handler: ConnectionHandler);
|
|
active_connection_handler(): ConnectionHandler | undefined;
|
|
server_connection_handlers(): ConnectionHandler[];
|
|
update_ui();
|
|
private _update_scroll();
|
|
private _button_scroll_right_clicked();
|
|
private _button_scroll_left_clicked();
|
|
private _update_scroll_buttons();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\ControlBar.ts */
|
|
declare let control_bar: ControlBar;
|
|
declare type MicrophoneState = "disabled" | "muted" | "enabled";
|
|
declare type HeadphoneState = "muted" | "enabled";
|
|
declare type AwayState = "away-global" | "away" | "online";
|
|
declare class ControlBar {
|
|
private _button_away_active: AwayState;
|
|
private _button_microphone: MicrophoneState;
|
|
private _button_speakers: HeadphoneState;
|
|
private _button_subscribe_all: boolean;
|
|
private _button_query_visible: boolean;
|
|
private connection_handler: ConnectionHandler | undefined;
|
|
private _button_hostbanner: JQuery;
|
|
htmlTag: JQuery;
|
|
constructor(htmlTag: JQuery);
|
|
initialize_connection_handler_state(handler?: ConnectionHandler);
|
|
set_connection_handler(handler?: ConnectionHandler);
|
|
apply_server_state();
|
|
apply_server_hostbutton();
|
|
apply_server_voice_state();
|
|
current_connection_handler();
|
|
initialise();
|
|
// @ts-ignore
|
|
set button_away_active(flag: AwayState);
|
|
update_button_away();
|
|
// @ts-ignore
|
|
set button_microphone(state: MicrophoneState);
|
|
// @ts-ignore
|
|
set button_speaker(state: HeadphoneState);
|
|
// @ts-ignore
|
|
set button_subscribe_all(state: boolean);
|
|
// @ts-ignore
|
|
set button_query_visible(state: boolean);
|
|
/* UI listener */
|
|
private on_away_toggle();
|
|
private on_away_enable();
|
|
private on_away_disable();
|
|
private on_away_set_message();
|
|
private on_away_enable_global();
|
|
private on_away_disable_global();
|
|
private on_away_set_message_global();
|
|
private on_toggle_microphone();
|
|
private on_toggle_sound();
|
|
private on_toggle_channel_subscribe();
|
|
private on_toggle_query_view();
|
|
private on_open_settings();
|
|
private on_open_connect();
|
|
private on_open_connect_new_tab();
|
|
update_connection_state();
|
|
private on_execute_disconnect();
|
|
private on_token_use();
|
|
private on_token_list();
|
|
private on_open_permissions();
|
|
private on_open_banslist();
|
|
private on_bookmark_server_add();
|
|
update_bookmark_status();
|
|
update_bookmarks();
|
|
private on_bookmark_manage();
|
|
private on_open_query_create();
|
|
private on_open_query_manage();
|
|
private on_open_playlist_manage();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\hostbanner.ts */
|
|
declare class Hostbanner {
|
|
readonly html_tag: JQuery<HTMLElement>;
|
|
readonly client: ConnectionHandler;
|
|
private _destryed;
|
|
private updater: NodeJS.Timer;
|
|
constructor(client: ConnectionHandler);
|
|
destroy();
|
|
update();
|
|
public static generate_tag(banner_url: string | undefined, gfx_interval: number, mode: number): Promise<JQuery | undefined>;
|
|
private generate_tag?(): Promise<JQuery | undefined>;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\MenuBar.ts */
|
|
declare namespace top_menu {
|
|
export interface HRItem {
|
|
}
|
|
export interface MenuItem {
|
|
append_item(label: string): MenuItem;
|
|
append_hr(): HRItem;
|
|
delete_item(item: MenuItem | HRItem);
|
|
items(): (MenuItem | HRItem)[];
|
|
icon(klass?: string | Promise<Icon> | Icon): string;
|
|
label(value?: string): string;
|
|
visible(value?: boolean): boolean;
|
|
disabled(value?: boolean): boolean;
|
|
click(callback: () => any): this;
|
|
}
|
|
export interface MenuBarDriver {
|
|
initialize();
|
|
append_item(label: string): MenuItem;
|
|
delete_item(item: MenuItem);
|
|
items(): MenuItem[];
|
|
flush_changes();
|
|
}
|
|
export function driver(): MenuBarDriver;
|
|
export function set_driver(driver: MenuBarDriver);
|
|
export interface NativeActions {
|
|
open_dev_tools();
|
|
reload_page();
|
|
check_native_update();
|
|
open_change_log();
|
|
quit();
|
|
show_dev_tools(): boolean;
|
|
}
|
|
export let native_actions: NativeActions;
|
|
namespace html {
|
|
export class HTMLHrItem implements top_menu.HRItem {
|
|
readonly html_tag: JQuery;
|
|
constructor();
|
|
}
|
|
export class HTMLMenuItem implements top_menu.MenuItem {
|
|
readonly html_tag: JQuery;
|
|
readonly _label_tag: JQuery;
|
|
readonly _label_icon_tag: JQuery;
|
|
readonly _label_text_tag: JQuery;
|
|
readonly _submenu_tag: JQuery;
|
|
private _items: (MenuItem | HRItem)[];
|
|
private _label: string;
|
|
private _callback_click: () => any;
|
|
constructor(label: string, mode: "side" | "down");
|
|
append_item(label: string): top_menu.MenuItem;
|
|
append_hr(): HRItem;
|
|
delete_item(item: top_menu.MenuItem | top_menu.HRItem);
|
|
disabled(value?: boolean): boolean;
|
|
items(): (top_menu.MenuItem | top_menu.HRItem)[];
|
|
label(value?: string): string;
|
|
visible(value?: boolean): boolean;
|
|
click(callback: () => any): this;
|
|
icon(klass?: string | Promise<Icon> | Icon): string;
|
|
}
|
|
export class HTMLMenuBarDriver implements MenuBarDriver {
|
|
private static _instance: HTMLMenuBarDriver;
|
|
public static instance(): HTMLMenuBarDriver;
|
|
readonly html_tag: JQuery;
|
|
private _items: MenuItem[];
|
|
constructor();
|
|
append_item(label: string): top_menu.MenuItem;
|
|
close();
|
|
delete_item(item: MenuItem);
|
|
items(): top_menu.MenuItem[];
|
|
flush_changes();
|
|
initialize();
|
|
}
|
|
}
|
|
export function rebuild_bookmarks();
|
|
export function update_state();
|
|
namespace native {
|
|
export function initialize();
|
|
}
|
|
export function initialize();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\server_log.ts */
|
|
declare namespace log {
|
|
export namespace server {
|
|
export enum Type {
|
|
CONNECTION_BEGIN = "connection_begin",
|
|
CONNECTION_HOSTNAME_RESOLVE = "connection_hostname_resolve",
|
|
CONNECTION_HOSTNAME_RESOLVE_ERROR = "connection_hostname_resolve_error",
|
|
CONNECTION_HOSTNAME_RESOLVED = "connection_hostname_resolved",
|
|
CONNECTION_LOGIN = "connection_login",
|
|
CONNECTION_CONNECTED = "connection_connected",
|
|
CONNECTION_FAILED = "connection_failed",
|
|
DISCONNECTED = "disconnected",
|
|
CONNECTION_VOICE_SETUP_FAILED = "connection_voice_setup_failed",
|
|
CONNECTION_COMMAND_ERROR = "connection_command_error",
|
|
GLOBAL_MESSAGE = "global_message",
|
|
SERVER_WELCOME_MESSAGE = "server_welcome_message",
|
|
SERVER_HOST_MESSAGE = "server_host_message",
|
|
SERVER_HOST_MESSAGE_DISCONNECT = "server_host_message_disconnect",
|
|
SERVER_CLOSED = "server_closed",
|
|
SERVER_BANNED = "server_banned",
|
|
SERVER_REQUIRES_PASSWORD = "server_requires_password",
|
|
CLIENT_VIEW_ENTER = "client_view_enter",
|
|
CLIENT_VIEW_LEAVE = "client_view_leave",
|
|
CLIENT_VIEW_MOVE = "client_view_move",
|
|
CLIENT_NICKNAME_CHANGED = "client_nickname_changed",
|
|
CLIENT_NICKNAME_CHANGE_FAILED = "client_nickname_change_failed",
|
|
CLIENT_SERVER_GROUP_ADD = "client_server_group_add",
|
|
CLIENT_SERVER_GROUP_REMOVE = "client_server_group_remove",
|
|
CLIENT_CHANNEL_GROUP_CHANGE = "client_channel_group_change",
|
|
CHANNEL_CREATE = "channel_create",
|
|
CHANNEL_DELETE = "channel_delete",
|
|
ERROR_CUSTOM = "error_custom",
|
|
ERROR_PERMISSION = "error_permission",
|
|
RECONNECT_SCHEDULED = "reconnect_scheduled",
|
|
RECONNECT_EXECUTE = "reconnect_execute",
|
|
RECONNECT_CANCELED = "reconnect_canceled"
|
|
}
|
|
export namespace base {
|
|
export type Client = {
|
|
client_unique_id: string;
|
|
client_name: string;
|
|
client_id: number;
|
|
};
|
|
export type Channel = {
|
|
channel_id: number;
|
|
channel_name: string;
|
|
};
|
|
export type Server = {
|
|
server_name: string;
|
|
server_unique_id: string;
|
|
};
|
|
export type ServerAddress = {
|
|
server_hostname: string;
|
|
server_port: number;
|
|
};
|
|
}
|
|
export namespace event {
|
|
export type GlobalMessage = {
|
|
sender: base.Client;
|
|
message: string;
|
|
};
|
|
export type ConnectBegin = {
|
|
address: base.ServerAddress;
|
|
client_nickname: string;
|
|
};
|
|
export type ErrorCustom = {
|
|
message: string;
|
|
};
|
|
export type ReconnectScheduled = {
|
|
timeout: number;
|
|
};
|
|
export type ReconnectCanceled = {};
|
|
export type ReconnectExecute = {};
|
|
export type ErrorPermission = {
|
|
permission: PermissionInfo;
|
|
};
|
|
export type WelcomeMessage = {
|
|
message: string;
|
|
};
|
|
export type HostMessageDisconnect = {
|
|
message: string;
|
|
};
|
|
export type ClientMove = {
|
|
channel_from?: base.Channel;
|
|
channel_from_own: boolean;
|
|
channel_to?: base.Channel;
|
|
channel_to_own: boolean;
|
|
client: base.Client;
|
|
client_own: boolean;
|
|
invoker?: base.Client;
|
|
message?: string;
|
|
reason: ViewReasonId;
|
|
};
|
|
export type ClientEnter = {
|
|
channel_from?: base.Channel;
|
|
channel_to?: base.Channel;
|
|
client: base.Client;
|
|
invoker?: base.Client;
|
|
message?: string;
|
|
own_channel: boolean;
|
|
reason: ViewReasonId;
|
|
ban_time?: number;
|
|
};
|
|
export type ClientLeave = {
|
|
channel_from?: base.Channel;
|
|
channel_to?: base.Channel;
|
|
client: base.Client;
|
|
invoker?: base.Client;
|
|
message?: string;
|
|
own_channel: boolean;
|
|
reason: ViewReasonId;
|
|
ban_time?: number;
|
|
};
|
|
export type ChannelCreate = {
|
|
creator: base.Client;
|
|
channel: base.Channel;
|
|
own_action: boolean;
|
|
};
|
|
export type ChannelDelete = {
|
|
deleter: base.Client;
|
|
channel: base.Channel;
|
|
own_action: boolean;
|
|
};
|
|
export type ConnectionConnected = {
|
|
own_client: base.Client;
|
|
};
|
|
export type ConnectionFailed = {};
|
|
export type ConnectionLogin = {};
|
|
export type ConnectionHostnameResolve = {};
|
|
export type ConnectionHostnameResolved = {
|
|
address: base.ServerAddress;
|
|
};
|
|
export type ConnectionHostnameResolveError = {
|
|
message: string;
|
|
};
|
|
export type ConnectionVoiceSetupFailed = {
|
|
reason: string;
|
|
reconnect_delay: number; /* if less or equal to 0 reconnect is prohibited */
|
|
};
|
|
export type ConnectionCommandError = {
|
|
error: any;
|
|
};
|
|
export type ClientNicknameChanged = {
|
|
own_client: boolean;
|
|
client: base.Client;
|
|
old_name: string;
|
|
new_name: string;
|
|
};
|
|
export type ClientNicknameChangeFailed = {
|
|
reason: string;
|
|
};
|
|
export type ServerClosed = {
|
|
message: string;
|
|
};
|
|
export type ServerRequiresPassword = {};
|
|
export type ServerBanned = {
|
|
message: string;
|
|
time: number;
|
|
invoker: base.Client;
|
|
};
|
|
}
|
|
export type LogMessage = {
|
|
type: Type;
|
|
timestamp: number;
|
|
data: any;
|
|
};
|
|
export interface TypeInfo {
|
|
"connection_begin": event.ConnectBegin;
|
|
"global_message": event.GlobalMessage;
|
|
"error_custom": event.ErrorCustom;
|
|
"error_permission": event.ErrorPermission;
|
|
"connection_hostname_resolved": event.ConnectionHostnameResolved;
|
|
"connection_hostname_resolve": event.ConnectionHostnameResolve;
|
|
"connection_hostname_resolve_error": event.ConnectionHostnameResolveError;
|
|
"connection_failed": event.ConnectionFailed;
|
|
"connection_login": event.ConnectionLogin;
|
|
"connection_connected": event.ConnectionConnected;
|
|
"connection_voice_setup_failed": event.ConnectionVoiceSetupFailed;
|
|
"connection_command_error": event.ConnectionCommandError;
|
|
"reconnect_scheduled": event.ReconnectScheduled;
|
|
"reconnect_canceled": event.ReconnectCanceled;
|
|
"reconnect_execute": event.ReconnectExecute;
|
|
"server_welcome_message": event.WelcomeMessage;
|
|
"server_host_message": event.WelcomeMessage;
|
|
"server_host_message_disconnect": event.HostMessageDisconnect;
|
|
"server_closed": event.ServerClosed;
|
|
"server_requires_password": event.ServerRequiresPassword;
|
|
"server_banned": event.ServerBanned;
|
|
"client_view_enter": event.ClientEnter;
|
|
"client_view_move": event.ClientMove;
|
|
"client_view_leave": event.ClientLeave;
|
|
"client_nickname_change_failed": event.ClientNicknameChangeFailed;
|
|
"client_nickname_changed": event.ClientNicknameChanged;
|
|
"channel_create": event.ChannelCreate;
|
|
"channel_delete": event.ChannelDelete;
|
|
"disconnected": any;
|
|
}
|
|
export type MessageBuilderOptions = {};
|
|
export type MessageBuilder<T extends keyof server.TypeInfo> = (data: TypeInfo[T], options: MessageBuilderOptions) => JQuery[] | undefined;
|
|
export const MessageBuilders: {
|
|
[key: string]: MessageBuilder<any>;
|
|
};
|
|
}
|
|
export class ServerLog {
|
|
private readonly handle: ConnectionHandler;
|
|
private history_length: number;
|
|
private _log: server.LogMessage[];
|
|
private _html_tag: JQuery;
|
|
private _log_container: JQuery;
|
|
private auto_follow: boolean;
|
|
private _ignore_event: number;
|
|
constructor(handle: ConnectionHandler);
|
|
log<T extends keyof server.TypeInfo>(type: T, data: server.TypeInfo[T]);
|
|
html_tag(): JQuery;
|
|
destroy();
|
|
private _scroll_task: number;
|
|
private append_log(message: server.LogMessage);
|
|
}
|
|
}
|
|
declare namespace log {
|
|
export namespace server {
|
|
namespace impl { }
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\side\chat_box.ts */
|
|
declare namespace chat {
|
|
export class ChatBox {
|
|
private _html_tag: JQuery;
|
|
private _html_input: JQuery<HTMLDivElement>;
|
|
private _enabled: boolean;
|
|
private __callback_text_changed;
|
|
private __callback_key_down;
|
|
private __callback_key_up;
|
|
private __callback_paste;
|
|
private _typing_timeout: number;
|
|
private _typing_last_event: number;
|
|
private _message_history: string[];
|
|
private _message_history_length;
|
|
private _message_history_index;
|
|
typing_interval: number;
|
|
callback_typing: () => any;
|
|
callback_text: (text: string) => any;
|
|
constructor();
|
|
html_tag(): JQuery;
|
|
destroy();
|
|
private _initialize_listener();
|
|
private _build_html_tag();
|
|
private _callback_text_changed(event: Event);
|
|
private _text(element: HTMLElement);
|
|
private htmlEscape(message: string): string;
|
|
private _callback_paste(event: ClipboardEvent);
|
|
private test_message(message: string): boolean;
|
|
private _callback_key_down(event: KeyboardEvent);
|
|
private _callback_key_up(event: KeyboardEvent);
|
|
private _context_task: number;
|
|
set_enabled(flag: boolean);
|
|
is_enabled();
|
|
focus_input();
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\side\chat_helper.ts */
|
|
declare namespace chat {
|
|
export namespace helpers {
|
|
namespace md2bbc {
|
|
export type RemarkToken = {
|
|
type: string;
|
|
tight: boolean;
|
|
lines: number[];
|
|
level: number;
|
|
/* img */
|
|
alt?: string;
|
|
src?: string;
|
|
/* link */
|
|
href?: string;
|
|
/* table */
|
|
align?: string;
|
|
/* code */
|
|
params?: string;
|
|
content?: string;
|
|
hLevel?: number;
|
|
children?: RemarkToken[];
|
|
};
|
|
export class Renderer {
|
|
private static renderers;
|
|
private _options;
|
|
last_paragraph: RemarkToken;
|
|
render(tokens: RemarkToken[], options: any, env: any);
|
|
private render_token(token: RemarkToken, index: number);
|
|
private render_inline(tokens: RemarkToken[], index: number);
|
|
options(): any;
|
|
maybe_escape_bb(text: string);
|
|
}
|
|
}
|
|
export function preprocess_chat_message(message: string): string;
|
|
export namespace history {
|
|
export function load_history(key: string): Promise<any | undefined>;
|
|
export function save_history(key: string, value: any): Promise<any>;
|
|
}
|
|
export namespace date {
|
|
export function same_day(a: number | Date, b: number | Date);
|
|
}
|
|
}
|
|
export namespace format {
|
|
export namespace date {
|
|
export enum ColloquialFormat {
|
|
YESTERDAY,
|
|
TODAY,
|
|
GENERAL
|
|
}
|
|
export function date_format(date: Date, now: Date, ignore_settings?: boolean): ColloquialFormat;
|
|
export function format_date_general(date: Date, hours?: boolean): string;
|
|
export function format_date_colloquial(date: Date, current_timestamp: Date): {
|
|
result: string;
|
|
format: ColloquialFormat;
|
|
};
|
|
export function format_chat_time(date: Date): {
|
|
result: string;
|
|
next_update: number; /* in MS */
|
|
};
|
|
}
|
|
export namespace time {
|
|
export function format_online_time(secs: number): string;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\side\client_info.ts */
|
|
declare namespace chat {
|
|
export class ClientInfo {
|
|
readonly handle: Frame;
|
|
private _html_tag: JQuery;
|
|
private _current_client: ClientEntry | undefined;
|
|
private _online_time_updater: number;
|
|
previous_frame_content: FrameContent;
|
|
constructor(handle: Frame);
|
|
html_tag(): JQuery;
|
|
destroy();
|
|
private _build_html_tag();
|
|
current_client(): ClientEntry;
|
|
set_current_client(client: ClientEntry | undefined, enforce?: boolean);
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\side\conversations.ts */
|
|
declare namespace chat {
|
|
export namespace channel {
|
|
export type ViewEntry = {
|
|
html_element: JQuery;
|
|
update_timer?: number;
|
|
};
|
|
export type MessageData = {
|
|
timestamp: number;
|
|
message: string;
|
|
sender_name: string;
|
|
sender_unique_id: string;
|
|
sender_database_id: number;
|
|
};
|
|
export type Message = MessageData & ViewEntry;
|
|
export class Conversation {
|
|
readonly handle: ConversationManager;
|
|
readonly channel_id: number;
|
|
private _flag_private: boolean;
|
|
private _html_tag: JQuery;
|
|
private _container_messages: JQuery;
|
|
private _container_new_message: JQuery;
|
|
private _container_no_permissions: JQuery;
|
|
private _container_no_permissions_shown: boolean;
|
|
private _container_is_private: JQuery;
|
|
private _container_is_private_shown: boolean;
|
|
private _container_no_support: JQuery;
|
|
private _container_no_support_shown: boolean;
|
|
private _view_max_messages;
|
|
private _view_older_messages: ViewEntry;
|
|
private _has_older_messages: boolean;
|
|
private _view_entries: ViewEntry[];
|
|
private _last_messages: MessageData[];
|
|
private _last_messages_timestamp: number;
|
|
private _first_unread_message: Message;
|
|
private _first_unread_message_pointer: ViewEntry;
|
|
private _scroll_position: number | undefined;
|
|
constructor(handle: ConversationManager, channel_id: number);
|
|
html_tag(): JQuery;
|
|
destroy();
|
|
private _build_html_tag();
|
|
is_unread();
|
|
mark_read();
|
|
private _mark_read();
|
|
private _generate_view_message(data: MessageData): Message;
|
|
private _generate_view_spacer(message: string, type: "date" | "new" | "old" | "error"): ViewEntry;
|
|
last_messages_timestamp(): number;
|
|
fetch_last_messages();
|
|
fetch_older_messages();
|
|
register_new_message(message: MessageData, update_view?: boolean);
|
|
/* using a timeout here to not cause a force style recalculation */
|
|
private _scroll_fix_timer: number;
|
|
private _scroll_animate: boolean;
|
|
fix_scroll(animate: boolean);
|
|
fix_view_size();
|
|
chat_available(): boolean;
|
|
text_send_failed(error: CommandResult | any);
|
|
set_flag_private(flag: boolean);
|
|
update_private_state();
|
|
delete_message(message: MessageData);
|
|
delete_messages(begin: number, end: number, sender: number, limit: number);
|
|
private _delete_message(message: Message);
|
|
}
|
|
export class ConversationManager {
|
|
readonly handle: Frame;
|
|
private _html_tag: JQuery;
|
|
private _chat_box: ChatBox;
|
|
private _container_conversation: JQuery;
|
|
private _conversations: Conversation[];
|
|
private _current_conversation: Conversation | undefined;
|
|
private _needed_listener;
|
|
constructor(handle: Frame);
|
|
initialize_needed_listener();
|
|
html_tag(): JQuery;
|
|
destroy();
|
|
update_chat_box();
|
|
private _build_html_tag();
|
|
set_current_channel(channel_id: number, update_info_frame?: boolean);
|
|
current_channel(): number;
|
|
/* Used by notifychanneldeleted */
|
|
delete_conversation(channel_id: number);
|
|
reset();
|
|
conversation(channel_id: number, create?: boolean): Conversation;
|
|
on_show();
|
|
update_input_format_helper();
|
|
}
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\side\music_info.ts */
|
|
declare namespace chat {
|
|
export class MusicInfo {
|
|
readonly events: events.Registry<events.sidebar.music>;
|
|
readonly handle: Frame;
|
|
private _html_tag: JQuery;
|
|
private _container_playlist: JQuery;
|
|
private _current_bot: MusicClientEntry | undefined;
|
|
private update_song_info: number;
|
|
private time_select: {
|
|
active: boolean;
|
|
max_time: number;
|
|
current_select_time: number;
|
|
current_player_time: number;
|
|
};
|
|
private song_reorder: {
|
|
active: boolean;
|
|
song_id: number;
|
|
previous_entry: number;
|
|
html: JQuery;
|
|
mouse?: {
|
|
x: number;
|
|
y: number;
|
|
};
|
|
indicator: JQuery;
|
|
};
|
|
previous_frame_content: FrameContent;
|
|
constructor(handle: Frame);
|
|
html_tag(): JQuery;
|
|
destroy();
|
|
private format_time(value: number);
|
|
private _build_html_tag();
|
|
private display_song_info(song: SongInfo);
|
|
private initialize_listener();
|
|
set_current_bot(client: MusicClientEntry | undefined, enforce?: boolean);
|
|
current_bot(): MusicClientEntry | undefined;
|
|
private sort_songs(data: PlaylistSong[]);
|
|
/* playlist stuff */
|
|
update_playlist();
|
|
private _playlist_subscribed;
|
|
private playlist_subscribe(unsubscribe: boolean);
|
|
private build_playlist_entry(data: PlaylistSong, insert_effect: boolean): JQuery;
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\frames\side\private_conversations.ts */
|
|
declare namespace chat {
|
|
export type PrivateConversationViewEntry = {
|
|
html_tag: JQuery;
|
|
};
|
|
export type PrivateConversationMessageData = {
|
|
message_id: string;
|
|
message: string;
|
|
sender: "self" | "partner";
|
|
sender_name: string;
|
|
sender_unique_id: string;
|
|
sender_client_id: number;
|
|
timestamp: number;
|
|
};
|
|
export type PrivateConversationViewMessage = PrivateConversationMessageData & PrivateConversationViewEntry & {
|
|
time_update_id: number;
|
|
};
|
|
export type PrivateConversationViewSpacer = PrivateConversationViewEntry;
|
|
export enum PrivateConversationState {
|
|
OPEN,
|
|
CLOSED,
|
|
DISCONNECTED,
|
|
DISCONNECTED_SELF
|
|
}
|
|
export type DisplayedMessage = {
|
|
timestamp: number;
|
|
message: PrivateConversationViewMessage | PrivateConversationViewEntry;
|
|
message_type: "spacer" | "message";
|
|
/* structure as following
|
|
1. time pointer
|
|
2. unread
|
|
3. message
|
|
*/
|
|
tag_message: JQuery;
|
|
tag_unread: PrivateConversationViewSpacer | undefined;
|
|
tag_timepointer: PrivateConversationViewSpacer | undefined;
|
|
};
|
|
export class PrivateConveration {
|
|
readonly handle: PrivateConverations;
|
|
private _html_entry_tag: JQuery;
|
|
private _message_history: PrivateConversationMessageData[];
|
|
private _callback_message: (text: string) => any;
|
|
private _state: PrivateConversationState;
|
|
private _last_message_updater_id: number;
|
|
private _last_typing: number;
|
|
private _typing_timeout: number;
|
|
private _typing_timeout_task: number;
|
|
_scroll_position: number | undefined;
|
|
_html_message_container: JQuery;
|
|
client_unique_id: string;
|
|
client_id: number;
|
|
client_name: string;
|
|
private _displayed_messages: DisplayedMessage[];
|
|
private _displayed_messages_length: number;
|
|
private _spacer_unread_message: DisplayedMessage;
|
|
constructor(handle: PrivateConverations, client_unique_id: string, client_name: string, client_id: number);
|
|
private history_key();
|
|
private load_history();
|
|
private save_history();
|
|
entry_tag(): JQuery;
|
|
destroy();
|
|
private _2d_flat<T>(array: T[][]): T[];
|
|
messages_tags(): JQuery[];
|
|
append_message(message: string, sender: {
|
|
type: "self" | "partner";
|
|
name: string;
|
|
unique_id: string;
|
|
client_id: number;
|
|
}, timestamp?: Date, save_history?: boolean);
|
|
private _displayed_message_first_tag(message: DisplayedMessage);
|
|
private _destroy_displayed_message(message: DisplayedMessage, update_pointers: boolean);
|
|
clear_messages(save?: boolean);
|
|
fix_scroll(animate: boolean);
|
|
private _update_message_timestamp();
|
|
private _destroy_message(message: PrivateConversationViewMessage);
|
|
private _build_message(message: PrivateConversationMessageData): PrivateConversationViewMessage;
|
|
private _build_spacer(message: string, type: "date" | "new" | "disconnect" | "disconnect_self" | "reconnect" | "closed" | "error"): PrivateConversationViewSpacer;
|
|
private _register_displayed_message(message: DisplayedMessage, update_new: boolean);
|
|
private _destroy_view_entry(entry: PrivateConversationViewEntry);
|
|
private _build_entry_tag();
|
|
update_avatar();
|
|
close_conversation();
|
|
set_client_name(name: string);
|
|
set_unread_flag(flag: boolean, update_chat_counter?: boolean);
|
|
is_unread(): boolean;
|
|
private _append_state_change(state: "disconnect" | "disconnect_self" | "reconnect" | "closed");
|
|
state(): PrivateConversationState;
|
|
set_state(state: PrivateConversationState);
|
|
set_text_callback(callback: (text: string) => any, update_enabled_state?: boolean);
|
|
chat_enabled();
|
|
append_error(message: string, date?: number);
|
|
call_message(message: string);
|
|
private typing_expired();
|
|
trigger_typing();
|
|
typing_active();
|
|
}
|
|
export class PrivateConverations {
|
|
readonly handle: Frame;
|
|
private _chat_box: ChatBox;
|
|
private _html_tag: JQuery;
|
|
private _container_conversation: JQuery;
|
|
private _container_conversation_messages: JQuery;
|
|
private _container_conversation_list: JQuery;
|
|
private _container_typing: JQuery;
|
|
private _html_no_chats: JQuery;
|
|
private _conversations: PrivateConveration[];
|
|
private _current_conversation: PrivateConveration;
|
|
private _select_read_timer: number;
|
|
constructor(handle: Frame);
|
|
clear_client_ids();
|
|
html_tag(): JQuery;
|
|
destroy();
|
|
current_conversation(): PrivateConveration | undefined;
|
|
conversations(): PrivateConveration[];
|
|
create_conversation(client_uid: string, client_name: string, client_id: number): PrivateConveration;
|
|
delete_conversation(conv: PrivateConveration, update_chat_couner?: boolean);
|
|
find_conversation(partner: {
|
|
name: string;
|
|
unique_id: string;
|
|
client_id: number;
|
|
}, mode: {
|
|
create: boolean;
|
|
attach: boolean;
|
|
}): PrivateConveration | undefined;
|
|
clear_conversations();
|
|
set_selected_conversation(conv: PrivateConveration | undefined);
|
|
update_chatbox_state();
|
|
update_typing_state();
|
|
private _build_html_tag();
|
|
try_input_focus();
|
|
on_show();
|
|
update_input_format_helper();
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\htmltags.ts */
|
|
declare namespace htmltags {
|
|
export interface ClientProperties {
|
|
client_id: number;
|
|
client_unique_id: string;
|
|
client_name: string;
|
|
add_braces?: boolean;
|
|
client_database_id?: number;
|
|
}
|
|
export interface ChannelProperties {
|
|
channel_id: number;
|
|
channel_name: string;
|
|
channel_display_name?: string;
|
|
add_braces?: boolean;
|
|
}
|
|
export function generate_client(properties: ClientProperties): string;
|
|
export function generate_client_object(properties: ClientProperties): JQuery;
|
|
export function generate_channel(properties: ChannelProperties): string;
|
|
export function generate_channel_object(properties: ChannelProperties): JQuery;
|
|
export namespace callbacks {
|
|
export function callback_context_client(element: JQuery);
|
|
export function callback_context_channel(element: JQuery);
|
|
}
|
|
namespace bbcodes { }
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalAbout.ts */
|
|
declare namespace Modals {
|
|
export function spawnAbout();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalAvatar.ts */
|
|
declare namespace Modals {
|
|
//TODO: Test if we could render this image and not only the browser by knowing the type.
|
|
export function spawnAvatarUpload(callback_data: (data: ArrayBuffer | undefined | null) => any);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalAvatarList.ts */
|
|
declare namespace Modals {
|
|
export const human_file_size;
|
|
export function spawnAvatarList(client: ConnectionHandler);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalBanClient.ts */
|
|
declare namespace Modals {
|
|
export type BanEntry = {
|
|
name?: string;
|
|
unique_id: string;
|
|
};
|
|
export function spawnBanClient(client: ConnectionHandler, entries: BanEntry | BanEntry[], callback: (data: {
|
|
length: number;
|
|
reason: string;
|
|
no_name: boolean;
|
|
no_ip: boolean;
|
|
no_hwid: boolean;
|
|
}) => void);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalBanList.ts */
|
|
declare namespace Modals {
|
|
export function openBanList(client: ConnectionHandler);
|
|
//Note: This object must be sorted (from shortest to longest)!
|
|
export const duration_data;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalBookmarks.ts */
|
|
declare namespace Modals {
|
|
export function spawnBookmarkModal();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalBotMenue.ts */
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalChangeLatency.ts */
|
|
declare namespace Modals {
|
|
export function spawnChangeLatency(client: ClientEntry, current: connection.voice.LatencySettings, reset: () => connection.voice.LatencySettings, apply: (settings: connection.voice.LatencySettings) => any, callback_flush?: () => any);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalChangeVolume.ts */
|
|
declare namespace Modals {
|
|
export function spawnChangeVolume(client: ClientEntry, local: boolean, current: number, max: number | undefined, callback: (number) => void);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalChannelInfo.ts */
|
|
declare namespace Modals {
|
|
export function openChannelInfo(channel: ChannelEntry);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalClientInfo.ts */
|
|
declare namespace Modals {
|
|
export function openClientInfo(client: ClientEntry);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalConnect.ts */
|
|
declare namespace connection_log {
|
|
//TODO: Save password data
|
|
export type ConnectionData = {
|
|
name: string;
|
|
icon_id: number;
|
|
country: string;
|
|
clients_online: number;
|
|
clients_total: number;
|
|
flag_password: boolean;
|
|
password_hash: string;
|
|
};
|
|
export type ConnectionEntry = ConnectionData & {
|
|
address: {
|
|
hostname: string;
|
|
port: number;
|
|
};
|
|
total_connection: number;
|
|
first_timestamp: number;
|
|
last_timestamp: number;
|
|
};
|
|
export function log_connect(address: {
|
|
hostname: string;
|
|
port: number;
|
|
});
|
|
export function update_address_info(address: {
|
|
hostname: string;
|
|
port: number;
|
|
}, data: ConnectionData);
|
|
export function update_address_password(address: {
|
|
hostname: string;
|
|
port: number;
|
|
}, password_hash: string);
|
|
export function history(): ConnectionEntry[];
|
|
export function delete_entry(address: {
|
|
hostname: string;
|
|
port: number;
|
|
});
|
|
}
|
|
declare namespace Modals {
|
|
export function spawnConnectModal(options: {
|
|
default_connect_new_tab?: boolean; /* default false */
|
|
}, defaultHost?: {
|
|
url: string;
|
|
enforce: boolean;
|
|
}, connect_profile?: {
|
|
profile: profiles.ConnectionProfile;
|
|
enforce: boolean;
|
|
});
|
|
export const Regex;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalCreateChannel.ts */
|
|
declare namespace Modals {
|
|
export function createChannelModal(connection: ConnectionHandler, channel: ChannelEntry | undefined, parent: ChannelEntry | undefined, permissions: PermissionManager, callback: (properties?: ChannelProperties, permissions?: PermissionValue[]) => any);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalGroupAssignment.ts */
|
|
declare namespace Modals {
|
|
export function createServerGroupAssignmentModal(client: ClientEntry, callback: (groups: number[], flag: boolean) => Promise<boolean>);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalIconSelect.ts */
|
|
declare namespace Modals {
|
|
export function spawnIconSelect(client: ConnectionHandler, callback_icon?: (id: number) => any, selected_icon?: number);
|
|
export function spawnIconUpload(client: ConnectionHandler);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalIdentity.ts */
|
|
declare namespace Modals {
|
|
export function spawnTeamSpeakIdentityImprove(identity: profiles.identities.TeaSpeakIdentity, name: string): Modal;
|
|
export function spawnTeamSpeakIdentityImport(callback: (identity: profiles.identities.TeaSpeakIdentity) => any): Modal;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalInvite.ts */
|
|
declare namespace Modals {
|
|
export function spawnInviteEditor(connection: ConnectionHandler);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalKeySelect.ts */
|
|
declare namespace Modals {
|
|
export function spawnKeySelect(callback: (key?: ppt.KeyEvent) => void);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalMusicManage.ts */
|
|
declare namespace Modals {
|
|
export function openMusicManage(client: ConnectionHandler, bot: MusicClientEntry);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalNewcomer.ts */
|
|
declare namespace Modals {
|
|
export function openModalNewcomer();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalPlaylistEdit.ts */
|
|
declare namespace Modals {
|
|
export function spawnPlaylistSongInfo(song: PlaylistSong);
|
|
export function spawnSongAdd(playlist: Playlist, callback_add: (url: string, loader: string) => any);
|
|
export function spawnPlaylistEdit(client: ConnectionHandler, playlist: Playlist);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalPlaylistList.ts */
|
|
declare namespace Modals {
|
|
export function spawnPlaylistManage(client: ConnectionHandler);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalPoke.ts */
|
|
declare namespace Modals {
|
|
export class PokeModal {
|
|
private _handle: Modal;
|
|
private source_map: ServerEntry[];
|
|
constructor();
|
|
modal();
|
|
add_poke(source: ConnectionHandler, invoker: PokeInvoker, message: string);
|
|
private _handle_close();
|
|
}
|
|
export type PokeInvoker = {
|
|
name: string;
|
|
id: number;
|
|
unique_id: string;
|
|
};
|
|
export function spawnPoke(source: ConnectionHandler, invoker: PokeInvoker, message: string);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalQuery.ts */
|
|
declare namespace Modals {
|
|
export function spawnQueryCreate(connection: ConnectionHandler, callback_created?: (user, pass) => any);
|
|
export function spawnQueryCreated(credentials: {
|
|
username: string;
|
|
password: string;
|
|
}, just_created: boolean);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalQueryManage.ts */
|
|
declare namespace Modals {
|
|
/*
|
|
export function spawnQueryManage(client: ConnectionHandler) {
|
|
let modal: Modal;
|
|
let selected_query: QueryListEntry;
|
|
|
|
const update_selected = () => {
|
|
const buttons = modal.htmlTag.find(".header .buttons");
|
|
|
|
//TODO gray out if no permissions (Server needs to send that... :D)
|
|
buttons.find(".button-query-delete").prop("disabled", selected_query === undefined);
|
|
buttons.find(".button-query-rename").prop("disabled", selected_query === undefined);
|
|
buttons.find(".button-query-change-password").prop("disabled", selected_query === undefined);
|
|
};
|
|
|
|
const update_list = () => {
|
|
const info_tag = modal.htmlTag.find(".footer .info a");
|
|
info_tag.text("loading...");
|
|
client.serverConnection.command_helper.current_virtual_server_id().then(server_id => {
|
|
client.serverConnection.command_helper.request_query_list(server_id).then(result => {
|
|
selected_query = undefined;
|
|
|
|
const entries_tag = modal.htmlTag.find(".query-list-entries");
|
|
const entry_template = $("#tmpl_query_manager-list_entry");
|
|
entries_tag.empty();
|
|
|
|
for(const query of result.queries || []) {
|
|
entries_tag.append(entry_template.renderTag(query).on('click', event => {
|
|
entries_tag.find(".entry.selected").removeClass("selected");
|
|
$(event.target).parent(".entry").addClass("selected");
|
|
selected_query = query;
|
|
update_selected();
|
|
}));
|
|
}
|
|
|
|
const entry_container = modal.htmlTag.find(".query-list-entries-container");
|
|
if(entry_container.hasScrollBar())
|
|
entry_container.addClass("scrollbar");
|
|
|
|
if(!result || result.flag_all) {
|
|
info_tag.text("Showing all server queries");
|
|
} else {
|
|
info_tag.text("Showing your server queries")
|
|
}
|
|
update_selected();
|
|
});
|
|
});
|
|
//TODO error handling
|
|
};
|
|
|
|
modal = createModal({
|
|
header: tr("Manage query accounts"),
|
|
body: () => {
|
|
let template = $("#tmpl_query_manager").renderTag();
|
|
template = $.spawn("div").append(template);
|
|
|
|
/* first open the modal
|
|
setTimeout(() => {
|
|
const entry_container = template.find(".query-list-entries-container");
|
|
if(entry_container.hasScrollBar())
|
|
entry_container.addClass("scrollbar");
|
|
}, 100);
|
|
|
|
template.find(".footer .buttons .button-refresh").on('click', update_list);
|
|
template.find(".button-query-create").on('click', () => {
|
|
Modals.spawnQueryCreate(client, (user, pass) => update_list());
|
|
});
|
|
template.find(".button-query-rename").on('click', () => {
|
|
if(!selected_query) return;
|
|
|
|
createInputModal(tr("Change account name"), tr("Enter the new name for the login:<br>"), text => text.length >= 3, result => {
|
|
if(result) {
|
|
client.serverConnection.send_command("queryrename", {
|
|
client_login_name: selected_query.username,
|
|
client_new_login_name: result
|
|
}).catch(error => {
|
|
if(error instanceof CommandResult)
|
|
error = error.extra_message || error.message;
|
|
createErrorModal(tr("Unable to rename account"), tr("Failed to rename account<br>Message: ") + error).open();
|
|
}).then(() => {
|
|
createInfoModal(tr("Account successfully renamed"), tr("The query account has been renamed!")).open();
|
|
update_list();
|
|
});
|
|
}
|
|
}).open();
|
|
});
|
|
template.find(".button-query-change-password").on('click', () => {
|
|
if(!selected_query) return;
|
|
|
|
createInputModal(tr("Change account's password"), tr("Enter a new password (leave blank for auto generation):<br>"), text => true, result => {
|
|
if(result !== false) {
|
|
const single_handler: connection.SingleCommandHandler = {
|
|
command: "notifyquerypasswordchanges",
|
|
function: command => {
|
|
Modals.spawnQueryCreated({
|
|
username: command.arguments[0]["client_login_name"],
|
|
password: command.arguments[0]["client_login_password"]
|
|
}, false);
|
|
|
|
return true;
|
|
}
|
|
};
|
|
client.serverConnection.command_handler_boss().register_single_handler(single_handler);
|
|
|
|
client.serverConnection.send_command("querychangepassword", {
|
|
client_login_name: selected_query.username,
|
|
client_login_password: result
|
|
}).catch(error => {
|
|
client.serverConnection.command_handler_boss().remove_single_handler(single_handler);
|
|
if(error instanceof CommandResult)
|
|
error = error.extra_message || error.message;
|
|
createErrorModal(tr("Unable to change password"), tr("Failed to change password<br>Message: ") + error).open();
|
|
});
|
|
}
|
|
}).open();
|
|
});
|
|
template.find(".button-query-delete").on('click', () => {
|
|
if(!selected_query) return;
|
|
|
|
Modals.spawnYesNo(tr("Are you sure?"), tr("Do you really want to delete this account?"), result => {
|
|
if(result) {
|
|
client.serverConnection.send_command("querydelete", {
|
|
client_login_name: selected_query.username
|
|
}).catch(error => {
|
|
if(error instanceof CommandResult)
|
|
error = error.extra_message || error.message;
|
|
createErrorModal(tr("Unable to delete account"), tr("Failed to delete account<br>Message: ") + error).open();
|
|
}).then(() => {
|
|
createInfoModal(tr("Account successfully deleted"), tr("The query account has been successfully deleted!")).open();
|
|
update_list();
|
|
});
|
|
}
|
|
});
|
|
});
|
|
template.find(".input-search").on('change keyup', () => {
|
|
const text = (template.find(".input-search").val() as string || "").toLowerCase();
|
|
if(text.length == 0) {
|
|
template.find(".query-list-entries .entry").show();
|
|
} else {
|
|
template.find(".query-list-entries .entry").each((_, e) => {
|
|
const element = $(e);
|
|
if(element.text().toLowerCase().indexOf(text) == -1)
|
|
element.hide();
|
|
else
|
|
element.show();
|
|
})
|
|
}
|
|
});
|
|
return template;
|
|
},
|
|
footer: undefined,
|
|
width: 750
|
|
});
|
|
|
|
update_list();
|
|
modal.open();
|
|
}
|
|
*/
|
|
//tmpl_query_manager
|
|
export function spawnQueryManage(client: ConnectionHandler);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalServerEdit.ts */
|
|
declare namespace Modals {
|
|
export function createServerModal(server: ServerEntry, callback: (properties?: ServerProperties) => Promise<void>);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalServerInfo.ts */
|
|
declare namespace Modals {
|
|
export function openServerInfo(server: ServerEntry);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalServerInfoBandwidth.ts */
|
|
declare namespace Modals {
|
|
export enum RequestInfoStatus {
|
|
SUCCESS,
|
|
UNKNOWN,
|
|
NO_PERMISSION
|
|
}
|
|
export type ServerBandwidthInfoUpdateCallback = (status: RequestInfoStatus, info?: ServerConnectionInfo) => any;
|
|
export function openServerInfoBandwidth(server: ServerEntry, update_callbacks?: ServerBandwidthInfoUpdateCallback[]): Modal;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalSettings.ts */
|
|
declare namespace Modals {
|
|
export function spawnSettingsModal(default_page?: string): Modal;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\ModalYesNo.ts */
|
|
declare namespace Modals {
|
|
export function spawnYesNo(header: BodyCreator, body: BodyCreator, callback: (_: boolean) => any, properties?: {
|
|
text_yes?: string;
|
|
text_no?: string;
|
|
closeable?: boolean;
|
|
});
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\permission\CanvasPermissionEditor.ts */
|
|
declare namespace pe {
|
|
namespace ui {
|
|
export namespace scheme {
|
|
export interface CheckBox {
|
|
border: string;
|
|
checkmark: string;
|
|
checkmark_font: string;
|
|
background_checked: string;
|
|
background_checked_hovered: string;
|
|
background: string;
|
|
background_hovered: string;
|
|
}
|
|
export interface TextField {
|
|
color: string;
|
|
font: string;
|
|
background: string;
|
|
background_hovered: string;
|
|
}
|
|
export interface ColorScheme {
|
|
permission: {
|
|
background: string;
|
|
background_selected: string;
|
|
name: string;
|
|
name_unset: string;
|
|
name_font: string;
|
|
value: TextField;
|
|
value_b: CheckBox;
|
|
granted: TextField;
|
|
negate: CheckBox;
|
|
skip: CheckBox;
|
|
};
|
|
group: {
|
|
name: string;
|
|
name_font: string;
|
|
};
|
|
}
|
|
}
|
|
export enum RepaintMode {
|
|
NONE,
|
|
REPAINT,
|
|
REPAINT_OBJECT_FULL,
|
|
REPAINT_FULL
|
|
}
|
|
export interface AxisAlignedBoundingBox {
|
|
x: number;
|
|
y: number;
|
|
width: number;
|
|
height: number;
|
|
}
|
|
export enum ClickEventType {
|
|
SIGNLE,
|
|
DOUBLE,
|
|
CONTEXT_MENU
|
|
}
|
|
export interface InteractionClickEvent {
|
|
type: ClickEventType;
|
|
consumed: boolean;
|
|
offset_x: number;
|
|
offset_y: number;
|
|
}
|
|
export interface InteractionListener {
|
|
region: AxisAlignedBoundingBox;
|
|
region_weight: number;
|
|
/**
|
|
* @return true if a redraw is required
|
|
*/
|
|
on_mouse_enter?: () => RepaintMode;
|
|
/**
|
|
* @return true if a redraw is required
|
|
*/
|
|
on_mouse_leave?: () => RepaintMode;
|
|
/**
|
|
* @return true if a redraw is required
|
|
*/
|
|
on_click?: (event: InteractionClickEvent) => RepaintMode;
|
|
mouse_cursor?: string;
|
|
set_full_draw?: () => any;
|
|
disabled?: boolean;
|
|
}
|
|
export abstract class DrawableObject {
|
|
abstract draw(context: CanvasRenderingContext2D, full: boolean);
|
|
private _object_full_draw;
|
|
private _width: number;
|
|
set_width(value: number);
|
|
request_full_draw();
|
|
pop_full_draw();
|
|
width();
|
|
abstract height();
|
|
private _transforms: DOMMatrix[];
|
|
protected push_transform(context: CanvasRenderingContext2D);
|
|
protected pop_transform(context: CanvasRenderingContext2D);
|
|
protected original_x(context: CanvasRenderingContext2D, x: number);
|
|
protected original_y(context: CanvasRenderingContext2D, y: number);
|
|
protected colors: scheme.ColorScheme;
|
|
set_color_scheme(scheme: scheme.ColorScheme);
|
|
protected manager: PermissionEditor;
|
|
set_manager(manager: PermissionEditor);
|
|
abstract initialize();
|
|
abstract finalize();
|
|
}
|
|
export class PermissionGroup extends DrawableObject {
|
|
public static readonly HEIGHT;
|
|
public static readonly ARROW_SIZE;
|
|
group: GroupedPermissions;
|
|
_sub_elements: PermissionGroup[];
|
|
_element_permissions: PermissionList;
|
|
collapsed;
|
|
private _listener_colaps: InteractionListener;
|
|
constructor(group: GroupedPermissions);
|
|
draw(context: CanvasRenderingContext2D, full: boolean);
|
|
set_width(value: number);
|
|
set_color_scheme(scheme: scheme.ColorScheme);
|
|
set_manager(manager: PermissionEditor);
|
|
height();
|
|
initialize();
|
|
finalize();
|
|
collapse_group();
|
|
expend_group();
|
|
}
|
|
export class PermissionList extends DrawableObject {
|
|
permissions: PermissionEntry[];
|
|
constructor(permissions: PermissionInfo[]);
|
|
set_width(value: number);
|
|
draw(context: CanvasRenderingContext2D, full: boolean);
|
|
height();
|
|
set_color_scheme(scheme: scheme.ColorScheme);
|
|
set_manager(manager: PermissionEditor);
|
|
initialize();
|
|
finalize();
|
|
handle_hide();
|
|
}
|
|
export class PermissionEntry extends DrawableObject {
|
|
public static readonly HEIGHT;
|
|
public static readonly HALF_HEIGHT;
|
|
public static readonly CHECKBOX_HEIGHT;
|
|
public static readonly COLUMN_PADDING;
|
|
public static readonly COLUMN_VALUE;
|
|
public static readonly COLUMN_GRANTED;
|
|
//public static readonly COLUMN_NEGATE = 25;
|
|
//public static readonly COLUMN_SKIP = 25;
|
|
public static readonly COLUMN_NEGATE;
|
|
public static readonly COLUMN_SKIP;
|
|
private _permission: PermissionInfo;
|
|
hidden: boolean;
|
|
granted: number;
|
|
value: number;
|
|
flag_skip: boolean;
|
|
flag_negate: boolean;
|
|
private _prev_selected;
|
|
selected: boolean;
|
|
flag_skip_hovered;
|
|
flag_negate_hovered;
|
|
flag_value_hovered;
|
|
flag_grant_hovered;
|
|
private _listener_checkbox_skip: InteractionListener;
|
|
private _listener_checkbox_negate: InteractionListener;
|
|
private _listener_value: InteractionListener;
|
|
private _listener_grant: InteractionListener;
|
|
private _listener_general: InteractionListener;
|
|
private _icon_image: HTMLImageElement | undefined;
|
|
on_icon_select?: (current_id: number) => Promise<number>;
|
|
on_context_menu?: (x: number, y: number) => any;
|
|
on_grant_change?: () => any;
|
|
on_change?: () => any;
|
|
constructor(permission: PermissionInfo);
|
|
set_icon_id_image(image: HTMLImageElement | undefined);
|
|
permission();
|
|
draw(ctx: CanvasRenderingContext2D, full: boolean);
|
|
handle_hide();
|
|
private _draw_icon_field(ctx: CanvasRenderingContext2D, scheme: scheme.CheckBox, x: number, y: number, width: number, hovered: boolean, image: HTMLImageElement);
|
|
private _draw_number_field(ctx: CanvasRenderingContext2D, scheme: scheme.TextField, x: number, y: number, width: number, value: number, hovered: boolean);
|
|
private _draw_checkbox_field(ctx: CanvasRenderingContext2D, scheme: scheme.CheckBox, x: number, y: number, height: number, checked: boolean, hovered: boolean);
|
|
height();
|
|
set_width(value: number);
|
|
initialize();
|
|
finalize();
|
|
private _spawn_number_edit(x: number, y: number, width: number, height: number, color: scheme.TextField, value: number, callback: (new_value?: number) => any);
|
|
trigger_value_assign();
|
|
trigger_grant_assign();
|
|
}
|
|
export class InteractionManager {
|
|
private _listeners: InteractionListener[];
|
|
private _entered_listeners: InteractionListener[];
|
|
register_listener(listener: InteractionListener);
|
|
remove_listener(listener: InteractionListener);
|
|
process_mouse_move(new_x: number, new_y: number): {
|
|
repaint: RepaintMode;
|
|
cursor: string;
|
|
};
|
|
private process_click_event(x: number, y: number, event: InteractionClickEvent): RepaintMode;
|
|
process_click(x: number, y: number): RepaintMode;
|
|
process_dblclick(x: number, y: number): RepaintMode;
|
|
process_context_menu(js_event: MouseEvent, x: number, y: number): RepaintMode;
|
|
}
|
|
export class PermissionEditor {
|
|
private static readonly PERMISSION_HEIGHT;
|
|
private static readonly PERMISSION_GROUP_HEIGHT;
|
|
readonly grouped_permissions: GroupedPermissions[];
|
|
readonly canvas: HTMLCanvasElement;
|
|
readonly canvas_container: HTMLDivElement;
|
|
private _max_height: number;
|
|
private _permission_count: number;
|
|
private _permission_group_count: number;
|
|
private _canvas_context: CanvasRenderingContext2D;
|
|
private _selected_entry: PermissionEntry;
|
|
private _draw_requested: boolean;
|
|
private _draw_requested_full: boolean;
|
|
private _elements: PermissionGroup[];
|
|
private _intersect_manager: InteractionManager;
|
|
private _permission_entry_map: {
|
|
[key: number]: PermissionEntry;
|
|
};
|
|
mouse: {
|
|
x: number;
|
|
y: number;
|
|
};
|
|
constructor(permissions: GroupedPermissions[]);
|
|
private _handle_repaint(mode: RepaintMode);
|
|
request_draw(full?: boolean);
|
|
draw(full?: boolean);
|
|
private initialize();
|
|
intercept_manager();
|
|
set_selected_entry(entry?: PermissionEntry);
|
|
permission_entries(): PermissionEntry[];
|
|
collapse_all();
|
|
expend_all();
|
|
}
|
|
}
|
|
export class CanvasPermissionEditor extends Modals.AbstractPermissionEditor {
|
|
private container: JQuery;
|
|
private mode_container_permissions: JQuery;
|
|
private mode_container_error_permission: JQuery;
|
|
private mode_container_unset: JQuery;
|
|
/* references within the container tag */
|
|
private permission_value_map: {
|
|
[key: number]: PermissionValue;
|
|
};
|
|
private entry_editor: ui.PermissionEditor;
|
|
icon_resolver: (id: number) => Promise<HTMLImageElement>;
|
|
icon_selector: (current_id: number) => Promise<number>;
|
|
constructor();
|
|
initialize(permissions: GroupedPermissions[]);
|
|
html_tag();
|
|
private build_tag();
|
|
set_permissions(permissions?: PermissionValue[]);
|
|
set_mode(mode: Modals.PermissionEditorMode);
|
|
update_ui();
|
|
set_toggle_button(callback: () => string, initial: string);
|
|
set_hidden_permissions(permissions: PermissionType[]);
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\permission\HTMLPermissionEditor.ts */
|
|
declare namespace pe {
|
|
export class HTMLPermission {
|
|
readonly handle: HTMLPermissionEditor;
|
|
readonly group: HTMLPermissionGroup;
|
|
readonly permission: PermissionInfo;
|
|
readonly index: number;
|
|
tag: JQuery;
|
|
tag_name: JQuery;
|
|
tag_container_value: JQuery;
|
|
tag_container_granted: JQuery;
|
|
tag_container_skip: JQuery;
|
|
tag_container_negate: JQuery;
|
|
hidden: boolean;
|
|
/* the "actual" values */
|
|
private _mask;
|
|
private _tag_value: JQuery;
|
|
private _tag_value_input: JQuery;
|
|
private _tag_granted: JQuery;
|
|
private _tag_granted_input: JQuery;
|
|
private _tag_skip: JQuery;
|
|
private _tag_skip_input: JQuery;
|
|
private _tag_negate: JQuery;
|
|
private _tag_negate_input: JQuery;
|
|
private _value: number | undefined;
|
|
private _grant: number | undefined;
|
|
private flags: number;
|
|
constructor(handle: HTMLPermissionEditor, group: HTMLPermissionGroup, permission: PermissionInfo, index: number);
|
|
private static build_checkbox(): {
|
|
tag: JQuery;
|
|
input: JQuery;
|
|
};
|
|
private static number_filter_re;
|
|
private static number_filter;
|
|
private build_tag();
|
|
private _trigger_value_assign();
|
|
private _trigger_grant_assign();
|
|
hide();
|
|
show();
|
|
is_filtered(): boolean;
|
|
set_filtered(flag: boolean);
|
|
is_set(): boolean;
|
|
get_value();
|
|
value(value: number | undefined, skip?: boolean, negate?: boolean);
|
|
granted(value: number | undefined);
|
|
reset();
|
|
private _reset_value();
|
|
private _reset_grant();
|
|
private _update_active_class();
|
|
}
|
|
export class HTMLPermissionGroup {
|
|
readonly handle: HTMLPermissionEditor;
|
|
readonly group: PermissionGroup;
|
|
readonly index: number;
|
|
private _tag_arrow: JQuery;
|
|
permissions: HTMLPermission[];
|
|
children: HTMLPermissionGroup[];
|
|
tag: JQuery;
|
|
visible: boolean;
|
|
collapsed: boolean;
|
|
parent_collapsed: boolean;
|
|
constructor(handle: HTMLPermissionEditor, group: PermissionGroup, index: number);
|
|
private _build_tag();
|
|
update_visibility();
|
|
collapse();
|
|
expend();
|
|
}
|
|
export class HTMLPermissionEditor extends Modals.AbstractPermissionEditor {
|
|
container: JQuery;
|
|
private mode_container_permissions: JQuery;
|
|
private mode_container_error_permission: JQuery;
|
|
private mode_container_unset: JQuery;
|
|
private icon_shown: boolean;
|
|
private filter_input: JQuery;
|
|
private filter_grant: JQuery;
|
|
private hidden_permissions: PermissionType[];
|
|
private button_toggle: JQuery;
|
|
private even_list: ({
|
|
visible(): boolean;
|
|
set_even(flag: boolean);
|
|
})[];
|
|
private permission_map: Array<HTMLPermission>;
|
|
private permission_groups: HTMLPermissionGroup[];
|
|
constructor();
|
|
initialize(permissions: GroupedPermissions[]);
|
|
set_hidden_permissions(permissions: PermissionType[]);
|
|
private update_filter();
|
|
private update_icon();
|
|
private build_tag();
|
|
html_tag(): JQuery<HTMLElement>;
|
|
set_permissions(u_permissions?: PermissionValue[]);
|
|
set_mode(mode: Modals.PermissionEditorMode);
|
|
trigger_change(permission: PermissionInfo, value?: Modals.PermissionEditor.PermissionValue, update_icon?: boolean): Promise<void>;
|
|
collapse_all();
|
|
expend_all();
|
|
update_view();
|
|
set_toggle_button(callback: () => string, initial: string);
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\permission\ModalPermissionEdit.ts */
|
|
declare interface JQuery<TElement = HTMLElement> {
|
|
dropdown: any;
|
|
}
|
|
declare namespace Modals {
|
|
export namespace PermissionEditor {
|
|
export interface PermissionEntry {
|
|
tag: JQuery;
|
|
tag_value: JQuery;
|
|
tag_grant: JQuery;
|
|
tag_flag_negate: JQuery;
|
|
tag_flag_skip: JQuery;
|
|
id: number;
|
|
filter: string;
|
|
is_bool: boolean;
|
|
}
|
|
export interface PermissionValue {
|
|
remove: boolean;
|
|
granted?: number;
|
|
value?: number;
|
|
flag_skip?: boolean;
|
|
flag_negate?: boolean;
|
|
}
|
|
export type change_listener_t = (permission: PermissionInfo, value?: PermissionEditor.PermissionValue) => Promise<void>;
|
|
}
|
|
export enum PermissionEditorMode {
|
|
VISIBLE,
|
|
NO_PERMISSION,
|
|
UNSET
|
|
}
|
|
export abstract class AbstractPermissionEditor {
|
|
protected _permissions: GroupedPermissions[];
|
|
protected _listener_update: () => any;
|
|
protected _listener_change: PermissionEditor.change_listener_t;
|
|
protected _toggle_callback: () => string;
|
|
icon_resolver: (id: number) => Promise<HTMLImageElement>;
|
|
icon_selector: (current_id: number) => Promise<number>;
|
|
protected constructor();
|
|
abstract set_mode(mode: PermissionEditorMode);
|
|
abstract initialize(permissions: GroupedPermissions[]);
|
|
abstract html_tag(): JQuery;
|
|
abstract set_permissions(permissions?: PermissionValue[]);
|
|
abstract set_hidden_permissions(permissions: PermissionType[]);
|
|
set_listener(listener?: PermissionEditor.change_listener_t);
|
|
set_listener_update(listener?: () => any);
|
|
trigger_update();
|
|
abstract set_toggle_button(callback: () => string, initial: string);
|
|
}
|
|
export type OptionsServerGroup = {};
|
|
export type OptionsChannelGroup = {};
|
|
export type OptionsClientPermissions = {
|
|
unique_id?: string;
|
|
};
|
|
export type OptionsChannelPermissions = {
|
|
channel_id?: number;
|
|
};
|
|
export type OptionsClientChannelPermissions = OptionsClientPermissions & OptionsChannelPermissions;
|
|
export interface OptionMap {
|
|
"sg": OptionsServerGroup;
|
|
"cg": OptionsChannelGroup;
|
|
"clp": OptionsClientPermissions;
|
|
"chp": OptionsChannelPermissions;
|
|
"clchp": OptionsClientChannelPermissions;
|
|
}
|
|
export function _space();
|
|
export function spawnPermissionEdit<T extends keyof OptionMap>(connection: ConnectionHandler, selected_tab?: T, options?: OptionMap[T]): Modal;
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\modal\permission\SenselessPermissions.ts */
|
|
declare namespace permissions {
|
|
export const senseless_server_group_permissions: PermissionType[];
|
|
export const senseless_channel_group_permissions: PermissionType[];
|
|
export const senseless_channel_permissions: PermissionType[];
|
|
export const senseless_client_permissions: PermissionType[];
|
|
export const senseless_client_channel_permissions: PermissionType[];
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\server.ts */
|
|
declare class ServerProperties {
|
|
virtualserver_host: string;
|
|
virtualserver_port: number;
|
|
virtualserver_name: string;
|
|
virtualserver_name_phonetic: string;
|
|
virtualserver_icon_id: number;
|
|
virtualserver_version: string;
|
|
virtualserver_platform: string;
|
|
virtualserver_unique_identifier: string;
|
|
virtualserver_clientsonline: number;
|
|
virtualserver_queryclientsonline: number;
|
|
virtualserver_channelsonline: number;
|
|
virtualserver_uptime: number;
|
|
virtualserver_created: number;
|
|
virtualserver_maxclients: number;
|
|
virtualserver_reserved_slots: number;
|
|
virtualserver_password: string;
|
|
virtualserver_flag_password: boolean;
|
|
virtualserver_ask_for_privilegekey: boolean;
|
|
virtualserver_welcomemessage: string;
|
|
virtualserver_hostmessage: string;
|
|
virtualserver_hostmessage_mode: number;
|
|
virtualserver_hostbanner_url: string;
|
|
virtualserver_hostbanner_gfx_url: string;
|
|
virtualserver_hostbanner_gfx_interval: number;
|
|
virtualserver_hostbanner_mode: number;
|
|
virtualserver_hostbutton_tooltip: string;
|
|
virtualserver_hostbutton_url: string;
|
|
virtualserver_hostbutton_gfx_url: string;
|
|
virtualserver_codec_encryption_mode: number;
|
|
virtualserver_default_music_group: number;
|
|
virtualserver_default_server_group: number;
|
|
virtualserver_default_channel_group: number;
|
|
virtualserver_default_channel_admin_group: number;
|
|
//Special requested properties
|
|
virtualserver_default_client_description: string;
|
|
virtualserver_default_channel_description: string;
|
|
virtualserver_default_channel_topic: string;
|
|
virtualserver_antiflood_points_tick_reduce: number;
|
|
virtualserver_antiflood_points_needed_command_block: number;
|
|
virtualserver_antiflood_points_needed_ip_block: number;
|
|
virtualserver_country_code: string;
|
|
virtualserver_complain_autoban_count: number;
|
|
virtualserver_complain_autoban_time: number;
|
|
virtualserver_complain_remove_time: number;
|
|
virtualserver_needed_identity_security_level: number;
|
|
virtualserver_weblist_enabled: boolean;
|
|
virtualserver_min_clients_in_channel_before_forced_silence: number;
|
|
virtualserver_channel_temp_delete_delay_default: number;
|
|
virtualserver_priority_speaker_dimm_modificator: number;
|
|
virtualserver_max_upload_total_bandwidth: number;
|
|
virtualserver_upload_quota: number;
|
|
virtualserver_max_download_total_bandwidth: number;
|
|
virtualserver_download_quota: number;
|
|
virtualserver_month_bytes_downloaded: number;
|
|
virtualserver_month_bytes_uploaded: number;
|
|
virtualserver_total_bytes_downloaded: number;
|
|
virtualserver_total_bytes_uploaded: number;
|
|
}
|
|
declare interface ServerConnectionInfo {
|
|
connection_filetransfer_bandwidth_sent: number;
|
|
connection_filetransfer_bandwidth_received: number;
|
|
connection_filetransfer_bytes_sent_total: number;
|
|
connection_filetransfer_bytes_received_total: number;
|
|
connection_filetransfer_bytes_sent_month: number;
|
|
connection_filetransfer_bytes_received_month: number;
|
|
connection_packets_sent_total: number;
|
|
connection_bytes_sent_total: number;
|
|
connection_packets_received_total: number;
|
|
connection_bytes_received_total: number;
|
|
connection_bandwidth_sent_last_second_total: number;
|
|
connection_bandwidth_sent_last_minute_total: number;
|
|
connection_bandwidth_received_last_second_total: number;
|
|
connection_bandwidth_received_last_minute_total: number;
|
|
connection_connected_time: number;
|
|
connection_packetloss_total: number;
|
|
connection_ping: number;
|
|
}
|
|
declare interface ServerAddress {
|
|
host: string;
|
|
port: number;
|
|
}
|
|
declare class ServerEntry {
|
|
remote_address: ServerAddress;
|
|
channelTree: ChannelTree;
|
|
properties: ServerProperties;
|
|
private info_request_promise: Promise<void>;
|
|
private info_request_promise_resolve: any;
|
|
private info_request_promise_reject: any;
|
|
private _info_connection_promise: Promise<ServerConnectionInfo>;
|
|
private _info_connection_promise_timestamp: number;
|
|
private _info_connection_promise_resolve: any;
|
|
private _info_connection_promise_reject: any;
|
|
lastInfoRequest: number;
|
|
nextInfoRequest: number;
|
|
private _htmlTag: JQuery<HTMLElement>;
|
|
private _destroyed;
|
|
constructor(tree, name, address: ServerAddress);
|
|
// @ts-ignore
|
|
get htmlTag();
|
|
destroy();
|
|
initializeListener();
|
|
spawnContextMenu(x: number, y: number, on_close?: () => void);
|
|
updateVariables(is_self_notify: boolean, ...variables: {
|
|
key: string;
|
|
value: string;
|
|
}[]);
|
|
/* this result !must! be cached for at least a second */
|
|
updateProperties(): Promise<void>;
|
|
/* max 1s ago, so we could update every second */
|
|
request_connection_info(): Promise<ServerConnectionInfo>;
|
|
set_connection_info(info: ServerConnectionInfo);
|
|
shouldUpdateProperties(): boolean;
|
|
calculateUptime(): number;
|
|
// @ts-ignore
|
|
set flag_text_unread(flag: boolean);
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\ui\view.ts */
|
|
declare class ChannelTree {
|
|
client: ConnectionHandler;
|
|
server: ServerEntry;
|
|
channels: ChannelEntry[];
|
|
clients: ClientEntry[];
|
|
currently_selected: ClientEntry | ServerEntry | ChannelEntry | (ClientEntry | ServerEntry)[];
|
|
currently_selected_context_callback: (event) => any;
|
|
readonly client_mover: ClientMover;
|
|
private _tag_container: JQuery;
|
|
private _tag_entries: JQuery;
|
|
private _tree_detached: boolean;
|
|
private _show_queries: boolean;
|
|
private channel_last?: ChannelEntry;
|
|
private channel_first?: ChannelEntry;
|
|
private _focused;
|
|
private _listener_document_click;
|
|
private _listener_document_key;
|
|
constructor(client);
|
|
tag_tree(): JQuery;
|
|
destroy();
|
|
hide_channel_tree();
|
|
show_channel_tree();
|
|
showContextMenu(x: number, y: number, on_close?: () => void);
|
|
initialiseHead(serverName: string, address: ServerAddress);
|
|
private __deleteAnimation(element: ChannelEntry | ClientEntry);
|
|
rootChannel(): ChannelEntry[];
|
|
deleteChannel(channel: ChannelEntry);
|
|
insertChannel(channel: ChannelEntry);
|
|
findChannel(channelId: number): ChannelEntry | undefined;
|
|
find_channel_by_name(name: string, parent?: ChannelEntry, force_parent?: boolean): ChannelEntry | undefined;
|
|
moveChannel(channel: ChannelEntry, channel_previous: ChannelEntry, parent: ChannelEntry);
|
|
deleteClient(client: ClientEntry, animate_tag?: boolean);
|
|
registerClient(client: ClientEntry);
|
|
unregisterClient(client: ClientEntry);
|
|
private _update_timer: number;
|
|
private _reorder_channels;
|
|
insertClient(client: ClientEntry, channel: ChannelEntry): ClientEntry;
|
|
moveClient(client: ClientEntry, channel: ChannelEntry);
|
|
findClient?(clientId: number): ClientEntry;
|
|
find_client_by_dbid?(client_dbid: number): ClientEntry;
|
|
find_client_by_unique_id?(unique_id: string): ClientEntry;
|
|
private static same_selected_type(a, b);
|
|
onSelect(entry?: ChannelEntry | ClientEntry | ServerEntry, enforce_single?: boolean, flag_shift?: boolean);
|
|
private callback_multiselect_channel(event);
|
|
private callback_multiselect_client(event);
|
|
clientsByGroup(group: Group): ClientEntry[];
|
|
clientsByChannel(channel: ChannelEntry): ClientEntry[];
|
|
reset();
|
|
spawnCreateChannel(parent?: ChannelEntry);
|
|
handle_resized();
|
|
private select_next_channel(channel: ChannelEntry, select_client: boolean);
|
|
handle_key_press(event: KeyboardEvent);
|
|
toggle_server_queries(flag: boolean);
|
|
get_first_channel?(): ChannelEntry;
|
|
unsubscribe_all_channels(subscribe_specified?: boolean);
|
|
subscribe_all_channels();
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\utils\helpers.ts */
|
|
declare namespace helpers {
|
|
export function hashPassword(password: string): Promise<string>;
|
|
}
|
|
declare class LaterPromise<T> extends Promise<T> {
|
|
private _handle: Promise<T>;
|
|
private _resolve: ($: T) => any;
|
|
private _reject: ($: any) => any;
|
|
private _time: number;
|
|
constructor();
|
|
resolved(object: T);
|
|
rejected(reason);
|
|
function_rejected();
|
|
time();
|
|
/**
|
|
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
|
* @param onfulfilled The callback to execute when the Promise is resolved.
|
|
* @param onrejected The callback to execute when the Promise is rejected.
|
|
* @returns A Promise for the completion of which ever callback is executed.
|
|
*/
|
|
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
|
/**
|
|
* Attaches a callback for only the rejection of the Promise.
|
|
* @param onrejected The callback to execute when the Promise is rejected.
|
|
* @returns A Promise for the completion of the callback.
|
|
*/
|
|
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
|
}
|
|
declare const copy_to_clipboard;
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\voice\RecorderBase.ts */
|
|
declare namespace audio {
|
|
export namespace recorder {
|
|
export interface InputDevice {
|
|
unique_id: string;
|
|
driver: string;
|
|
name: string;
|
|
default_input: boolean;
|
|
supported: boolean;
|
|
sample_rate: number;
|
|
channels: number;
|
|
}
|
|
export enum InputConsumerType {
|
|
CALLBACK,
|
|
NODE,
|
|
NATIVE
|
|
}
|
|
export interface InputConsumer {
|
|
type: InputConsumerType;
|
|
}
|
|
export interface CallbackInputConsumer extends InputConsumer {
|
|
callback_audio?: (buffer: AudioBuffer) => any;
|
|
callback_buffer?: (buffer: Float32Array, samples: number, channels: number) => any;
|
|
}
|
|
export interface NodeInputConsumer extends InputConsumer {
|
|
callback_node: (source_node: AudioNode) => any;
|
|
callback_disconnect: (source_node: AudioNode) => any;
|
|
}
|
|
export namespace filter {
|
|
export enum Type {
|
|
THRESHOLD,
|
|
VOICE_LEVEL,
|
|
STATE
|
|
}
|
|
export interface Filter {
|
|
type: Type;
|
|
is_enabled(): boolean;
|
|
}
|
|
export interface MarginedFilter {
|
|
get_margin_frames(): number;
|
|
set_margin_frames(value: number);
|
|
}
|
|
export interface ThresholdFilter extends Filter, MarginedFilter {
|
|
get_threshold(): number;
|
|
set_threshold(value: number): Promise<void>;
|
|
get_attack_smooth(): number;
|
|
get_release_smooth(): number;
|
|
set_attack_smooth(value: number);
|
|
set_release_smooth(value: number);
|
|
callback_level?: (value: number) => any;
|
|
}
|
|
export interface VoiceLevelFilter extends Filter, MarginedFilter {
|
|
get_level(): number;
|
|
}
|
|
export interface StateFilter extends Filter {
|
|
set_state(state: boolean): Promise<void>;
|
|
is_active(): boolean; /* if true the the filter allows data to pass */
|
|
}
|
|
}
|
|
export enum InputState {
|
|
PAUSED,
|
|
INITIALIZING,
|
|
RECORDING,
|
|
DRY
|
|
}
|
|
export enum InputStartResult {
|
|
EOK = "eok",
|
|
EUNKNOWN = "eunknown",
|
|
EBUSY = "ebusy",
|
|
ENOTALLOWED = "enotallowed",
|
|
ENOTSUPPORTED = "enotsupported"
|
|
}
|
|
export interface AbstractInput {
|
|
callback_begin: () => any;
|
|
callback_end: () => any;
|
|
current_state(): InputState;
|
|
start(): Promise<InputStartResult>;
|
|
stop(): Promise<void>;
|
|
current_device(): InputDevice | undefined;
|
|
set_device(device: InputDevice | undefined): Promise<void>;
|
|
current_consumer(): InputConsumer | undefined;
|
|
set_consumer(consumer: InputConsumer): Promise<void>;
|
|
get_filter(type: filter.Type): filter.Filter | undefined;
|
|
supports_filter(type: audio.recorder.filter.Type): boolean;
|
|
clear_filter();
|
|
disable_filter(type: filter.Type);
|
|
enable_filter(type: filter.Type);
|
|
get_volume(): number;
|
|
set_volume(volume: number);
|
|
}
|
|
export interface LevelMeter {
|
|
device(): InputDevice;
|
|
set_observer(callback: (value: number) => any);
|
|
destory();
|
|
}
|
|
}
|
|
}
|
|
|
|
/* File: D:\TeaSpeak\web\shared\js\voice\RecorderProfile.ts */
|
|
declare type VadType = "threshold" | "push_to_talk" | "active";
|
|
declare interface RecorderProfileConfig {
|
|
version: number;
|
|
/* devices unique id */
|
|
device_id: string | undefined;
|
|
volume: number;
|
|
vad_type: VadType;
|
|
vad_threshold: {
|
|
threshold: number;
|
|
};
|
|
vad_push_to_talk: {
|
|
delay: number;
|
|
key_code: string;
|
|
key_ctrl: boolean;
|
|
key_windows: boolean;
|
|
key_shift: boolean;
|
|
key_alt: boolean;
|
|
};
|
|
}
|
|
declare let default_recorder: RecorderProfile;
|
|
declare class RecorderProfile {
|
|
readonly name;
|
|
readonly volatile;
|
|
config: RecorderProfileConfig;
|
|
input: audio.recorder.AbstractInput;
|
|
current_handler: ConnectionHandler;
|
|
callback_support_change: () => any;
|
|
callback_start: () => any;
|
|
callback_stop: () => any;
|
|
callback_unmount: () => any;
|
|
record_supported: boolean;
|
|
private _ppt_hook: ppt.KeyHook;
|
|
private _ppt_timeout: NodeJS.Timer;
|
|
private _ppt_hook_registered: boolean;
|
|
constructor(name: string, volatile?: boolean);
|
|
initialize(): Promise<void>;
|
|
private initialize_input();
|
|
private load();
|
|
private save(enforce?: boolean);
|
|
private reinitialize_filter();
|
|
unmount(): Promise<void>;
|
|
get_vad_type();
|
|
set_vad_type(type: VadType);
|
|
get_vad_threshold();
|
|
set_vad_threshold(value: number);
|
|
get_vad_ppt_key(): ppt.KeyDescriptor;
|
|
set_vad_ppt_key(key: ppt.KeyDescriptor);
|
|
get_vad_ppt_delay();
|
|
set_vad_ppt_delay(value: number);
|
|
current_device(): audio.recorder.InputDevice | undefined;
|
|
set_device(device: audio.recorder.InputDevice | undefined): Promise<void>;
|
|
get_volume(): number;
|
|
set_volume(volume: number);
|
|
}
|