import { AxiosInstance } from 'axios'; import { ITwirpArgs, IReqArgs } from '../types/twirp.types'; import { RPCPackages } from './const/RPCPackages'; import { CreateChannelResponse } from "../proto/channel"; import { AddParticipantToChannelRes, GetParticipantAccessTokenRes } from "../proto/participant"; type ServicesResponses = CreateChannelResponse | AddParticipantToChannelRes | GetParticipantAccessTokenRes; export interface Rpc { request(data: IReqArgs): Promise; } /** * JSON based Twirp V7 RPC */ export declare class TwirpRpc { host: string; pkg: RPCPackages; prefix: string; instance: AxiosInstance; constructor({ host, pkg, prefix }: ITwirpArgs); request({ service, method, data, headers, }: IReqArgs): Promise; } export {};