/// import { EventEmitter } from 'events'; import { SDK as RingCentralSDK } from '@ringcentral/sdk'; export declare enum Direction { inbound = "Inbound", outbound = "Outbound" } export declare enum PartyStatusCode { setup = "Setup", proceeding = "Proceeding", answered = "Answered", disconnected = "Disconnected", gone = "Gone", parked = "Parked", hold = "Hold", voicemail = "Voicemail", faxReceive = "FaxReceive", voicemailScreening = "VoiceMailScreening" } export interface PartyToFrom { phoneNumber?: string; name?: string; extensionId?: string; extensionNumber?: string; } export interface PartyStatus { code?: PartyStatusCode; } export interface Recording { id: string; active: boolean; } export interface Party { id: string; extensionId?: string; accountId?: string; direction: Direction; to: PartyToFrom; from: PartyToFrom; status: PartyStatus; missedCall: boolean; standAlone: boolean; muted: boolean; conferenceRole?: 'Host' | 'Participant'; ringOutRole?: 'Initiator' | 'Target'; ringMeRole?: 'Initiator' | 'Target'; recordings?: Recording[]; } export interface Origin { type: 'Call' | 'RingOut' | 'RingMe' | 'Conference' | 'GreetingsRecording' | 'VerificationCall' | 'TestCall'; } export interface SessionData { id: string; extensionId: string; accountId: string; parties: Party[]; sessionId: string; creationTime: string; voiceCallToken?: string; origin: Origin; } export interface ForwardParams { phoneNumber?: string; extensionNumber?: string; voicemail?: string; } export interface TransferParams extends ForwardParams { parkOrbit?: string; } export interface FlipParams { callFlipId: string; } export interface PartyParams { muted?: boolean; standAlone?: boolean; } export interface RecordParams { id: string; active: boolean; } export interface SuperviseParams { mode: 'Listen'; deviceId: string; extensionNumber: string; } export interface BringInParams { partyId: string; sessionId: string; } export interface AnswerParams { deviceId: string; } export interface BridgeParams { telephonySessionId: string; partyId: string; } export interface IgnoreParams { deviceId: string; } export declare enum ReplyWithPattern { willCallYouBack = "WillCallYouBack", callMeBack = "CallMeBack", onMyWay = "OnMyWay", onTheOtherLine = "OnTheOtherLine", willCallYouBackLater = "WillCallYouBackLater", callMeBackLater = "CallMeBackLater", inAMeeting = "InAMeeting", onTheOtherLineNoCall = "OnTheOtherLineNoCall" } export interface ReplyWithPatternParams { pattern: ReplyWithPattern; time?: number; timeUnit?: 'Minute' | 'Hour' | 'Day'; } export interface ReplyWithTextParams { replyWithText?: string; replyWithPattern?: ReplyWithPatternParams; } export interface PickUpParams { deviceId: string; } export interface RemovePartyOptions { keepConferenceAlive?: boolean; } export declare class Session extends EventEmitter { private _data; private _sdk; private _accountLevel; private _userAgent; constructor(rawData: SessionData, sdk: RingCentralSDK, accountLevel: boolean, userAgent?: string); onUpdated(data: SessionData): void; restore(data: SessionData): void; get data(): any; get id(): any; get accountId(): any; get creationTime(): any; get extensionId(): any; get origin(): any; get parties(): any; get serverId(): any; get sessionId(): any; get party(): any; get otherParties(): any; get recordings(): any; get voiceCallToken(): any; toJSON(): any; reload(): Promise; drop(): Promise; private saveNewPartyData; hold(): Promise; unhold(): Promise; toVoicemail(): Promise; ignore(params: IgnoreParams): Promise; answer(params: AnswerParams): Promise; reply(params: ReplyWithTextParams): Promise; forward(params: ForwardParams): Promise; transfer(params: TransferParams): Promise; bridge(params: BridgeParams): Promise; park(): Promise; flip(params: FlipParams): Promise; updateParty(params: PartyParams): Promise; mute(): Promise; unmute(): Promise; createRecord(): Promise; updateRecord(params: RecordParams): Promise; pauseRecord(recordingId: string): Promise; resumeRecord(recordingId: string): Promise; supervise(params: SuperviseParams): Promise; bringInParty(params: BringInParams): Promise; removeParty(partyId: string, options?: RemovePartyOptions): Promise; get requestOptions(): { userAgent: string; }; }