/// <reference types="node" />
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<void>;
    drop(): Promise<void>;
    private saveNewPartyData;
    hold(): Promise<any>;
    unhold(): Promise<any>;
    toVoicemail(): Promise<void>;
    ignore(params: IgnoreParams): Promise<void>;
    answer(params: AnswerParams): Promise<void>;
    reply(params: ReplyWithTextParams): Promise<any>;
    forward(params: ForwardParams): Promise<any>;
    transfer(params: TransferParams): Promise<any>;
    bridge(params: BridgeParams): Promise<any>;
    park(): Promise<any>;
    flip(params: FlipParams): Promise<any>;
    updateParty(params: PartyParams): Promise<any>;
    mute(): Promise<any>;
    unmute(): Promise<any>;
    createRecord(): Promise<any>;
    updateRecord(params: RecordParams): Promise<any>;
    pauseRecord(recordingId: string): Promise<any>;
    resumeRecord(recordingId: string): Promise<any>;
    supervise(params: SuperviseParams): Promise<any>;
    bringInParty(params: BringInParams): Promise<any>;
    removeParty(partyId: string, options?: RemovePartyOptions): Promise<Response>;
    get requestOptions(): {
        userAgent: string;
    };
}
