import { OpenYoloCredential , OpenYoloProxyLoginResponse } from '../protocol/data' ; import { proxyLoginMessage , RpcMessageType } from '../protocol/rpc_messages' ; import { BaseRequest } from './base_request' ; /**
 * Handles the proxy login.
 */ export class ProxyLogin extends BaseRequest < OpenYoloProxyLoginResponse , OpenYoloCredential > { /**
     * Starts the Proxy Login flow.
     */ dispatchInternal ( credential ) { this . registerHandler ( RpcMessageType . proxyResult , ( response ) => { this . resolve ( response ) ; this . dispose ( ) ; } ) ; this . channel . send ( proxyLoginMessage ( this . id , credential ) ) ; } }