403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/pull/client/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/pull/client/pull.client.d.ts
type SubscriptionType = {
    Server: 'server',
	Client: 'client',
	Online: 'online',
	Status: 'status',
	Revision: 'revision'
};
type PullStatus = {
    Online: 'online',
    Offline: 'offline',
    Connecting: 'connect'
};

type SubscriptionOptions = {
    type: SubscriptionType,
    moduleId?: string,
    command?: string,
    callback: Function,
};

type CloseReasons = {
    NORMAL_CLOSURE : 1000,
    SERVER_DIE : 1001,
    CONFIG_REPLACED : 3000,
    CHANNEL_EXPIRED : 3001,
    SERVER_RESTARTED : 3002,
    CONFIG_EXPIRED : 3003,
    MANUAL : 3004,
};

type PullOptions = {
    serverEnabled?: boolean,
    userId?: number,
    siteId?: string,
    restClient?: object,
    configTimestamp?: number,
    skipCheckRevision?: boolean,
};

type JsonRpcRequest = {
    jsonrpc?: string,
    method: string,
    params: string,
    id: string
}

type PullExtraData = {
	revision_im_mobile: number,
	revision_im_rest: number,
	revision_im_web: number,
	revision_mobile: number,
	revision_web: number,
	sender: object,
	server_name: string,
	server_time: string,
	server_time_ago: number,
	server_time_unix: number,
}

// user id to time in seconds, when user was connected last time
type UsersLastSeen = {
    [userId: number]: number
}


type UserStatusCallbackParameters = {
    userId: number,
    isOnline: boolean,
}

type UserStatusCallback = (event: UserStatusCallbackParameters) => void


declare class PullCommandHandler {
    getModuleId(): string;
    getSubscriptionType(): SubscriptionType;
    getMap(): object;
}

declare module 'pull.client' {
    namespace PULL {
        function subscribe(params: SubscriptionOptions|PullCommandHandler): Function;
        function extendWatch(tagId: string, force?: boolean): boolean;
        function clearWatch(tagId: string): boolean;
        function capturePullEvent(enable?: boolean): void;
        function getDebugInfo(): void;
        function start(options?: PullOptions): Promise<Function>;
        function disconnect(code?: string, reason?: string): void;
        function isJsonRpc(): boolean;
        function getUsersLastSeen(userList: number[]): Promise<UsersLastSeen>;
        function subscribeUserStatusChange(userId: number, callback: UserStatusCallback): Promise<null>;
        function unsubscribeUserStatusChange(userId: number, callback: UserStatusCallback): Promise<null>;
    }

    class PullClient {
        constructor(options?: PullOptions);
        subscribe(params: SubscriptionOptions|PullCommandHandler): Function;
        extendWatch(tagId: string, force?: boolean): boolean;
        clearWatch(tagId: string): boolean;
        capturePullEvent(enable?: boolean): void;
        getDebugInfo(): void;
        start(options?: PullOptions): Promise<Function>;
        disconnect(code?: string, reason?: string): void;
        static PullStatus: PullStatus;
        static SubscriptionType: SubscriptionType;
        static CloseReasons: CloseReasons;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit