workano-js-sdk
Version:
Workano Communications SDK - A modern JavaScript SDK for WebRTC and VoIP integration.
54 lines • 2.83 kB
TypeScript
import { CallSession } from "../../lib/index";
import { TCall, TConnect, TMakeCall } from "./models";
export default class {
private static listeners;
static toggleCameraTimeout: any;
static answeredCalls: {
[key: string]: {
timeout: any;
callSession: CallSession;
};
};
static connect(props: TConnect): Promise<void>;
static call({ number, withCamera, monitoringInterval, }: TCall): Promise<CallSession | null | undefined>;
/**
* Make a call between specified line and number
* @param {string} number - number to be called;
* @param {boolean} isMobile - call from your mobile to specified number;
* @param {boolean} callbackAllLines - try all of your lines to make a call to the number;
* @param {Object} line - target line for cdr;
*/
static makeCall(props: TMakeCall): Promise<any | null | undefined>;
static accept(callSession: CallSession, withCamera?: boolean): Promise<string | null>;
static hangup(callSession: CallSession): Promise<boolean>;
static mute(callSession: CallSession): void;
static unmute(callSession: CallSession): void;
static turnCameraOn(callSession: CallSession): Promise<void>;
static turnCameraOff(callSession: CallSession): Promise<void>;
static getLocalVideoStream(callSession: CallSession): MediaStream | null;
static getRemoteVideoStream(callSession: CallSession): MediaStream | null;
static disconnect(): Promise<void>;
static reject(callSession: CallSession): Promise<void>;
static sendFax(extension: string, fax: string, callerId?: string): Promise<void>;
static toggleRecording(callId: string, enable: boolean): Promise<boolean>;
static sendDTMF(tone: string, callSession: CallSession): void;
static toggleHold(callSession: CallSession, enabled: boolean): Promise<void>;
static directTransfer(callSession: CallSession, number: string): void;
static indirectTransfer(callSession: CallSession, number: string): Promise<{
complete: () => void;
cancel: () => void;
}>;
static startConference(host: CallSession, otherCallSessions: CallSession[]): Promise<import("./models").AdHocAPIConference>;
static changeRingVolume(volume: number): void;
static changeAudioVolume(volume: number): void;
static changeAudioDevice(id: string, force?: boolean): Promise<void>;
static changeAudioInputDevice(id: string, force?: boolean): Promise<void>;
static changeRingDevice(id: string): void;
static changeVideoInputDevice(id: string): Promise<void | MediaStream | null | undefined>;
static relocate({ callId, lineId, destination }: {
callId: string;
lineId?: number;
destination: string;
}): Promise<import("./models").Relocation>;
}
//# sourceMappingURL=index.d.ts.map