UNPKG

@twilio/plugin-microvisor

Version:

Interact with your Twilio Microvisor devices

21 lines (20 loc) 874 B
/// <reference types="node" /> import Tunnel from '../tunnel/tunnel'; import { RPCImpl } from 'protobufjs'; import { EventEmitter } from 'node:events'; import { HaltReasonResponse } from '../../../../proto_gen/proto'; declare type RPCImplParams = Parameters<RPCImpl>; export declare type RPCImplMethod = RPCImplParams[0]; export declare type RPCImplData = RPCImplParams[1]; export declare type RPCImplCb = RPCImplParams[2]; export declare class ProtobufToTunnel extends EventEmitter { tunnel: Tunnel; messageEmitter: EventEmitter; static methodToPurpose: Map<string, [number, number]>; static purposeToMethod: Map<number, string>; constructor(tunnel: Tunnel); rpcImpl(method: RPCImplMethod, requestData: RPCImplData, callback: RPCImplCb): void; waitHaltReason(): Promise<HaltReasonResponse>; sendPing(callback: () => any): void; } export {};