@avaya/infinity-agent-sdk - v1.0.0
    Preparing search index...

    The interface implemented by User.

    Defines the full contract for agent operations — identity, status management, CX login, queue access, interaction handling, event subscriptions, and media device control.

    User

    interface UserTrait {
        userId: string;
        userEmail: string;
        userFullName: string;
        userFirstName: string;
        userLastName: string;
        accountId: string;
        currentStatus: ReasonCode;
        isLoggedInToCx: boolean;
        canCreateOutboundVoiceInteraction: boolean;
        isEliteVoiceEnabled: boolean;
        isInteractionAutoAcceptEnabled: boolean;
        canClaimInteractionOwnership: boolean;
        canViewInteractionPublicly: boolean;
        canViewInteractionPrivately: boolean;
        refreshStatus(): Promise<ReasonCode>;
        getAssignedInteractions(): Interaction[];
        createOutboundVoiceInteraction(
            params: CreateOutboundVoiceInteractionParams,
        ): Promise<Interaction>;
        getAssignedQueues(): Queue[];
        defaultOutboundQueue: Queue | undefined;
        canLoginToCx(): boolean;
        loginToCx(reasonCode?: ReasonCode): Promise<void>;
        canLogoutFromCx(): boolean;
        logoutFromCx(reasonCode: ReasonCode): Promise<void>;
        getAssignableReasonCodes(): Promise<ReasonCode[]>;
        canChangeStatus(): boolean;
        changeStatus(reasonCode: ReasonCode): Promise<void>;
        subscribe<T extends UserEventType>(
            eventName: T,
            handler: UserEventHandler<T>,
        ): string;
        unsubscribe(eventName: UserEventType, handlerId: string): void;
        getAvailableAudioDevices(): Promise<AvailableAudioDevices>;
        getSelectedAudioDevices(): SelectedAudioDevices;
        canSetAudioInputDevice(): boolean;
        setAudioInputDevice(deviceId: string): void;
        canSetAudioOutputDevice(): boolean;
        setAudioOutputDevice(deviceId: string): void;
        getAudioDevicePermissionState(): MediaDevicePermissionState;
        getWebRtcRegistrationState(): WebRtcRegistrationState;
        viewInteraction(
            interactionId: string,
            params: ViewInteractionParams,
        ): Promise<Interaction>;
        getInteractionViews(): Promise<InteractionView[]>;
        refreshAssignedQueues(): Promise<Queue[]>;
    }

    Implemented by

    Index

    CX Login

    isLoggedInToCx: boolean

    Indicates whether the agent is currently logged into the CX platform

    • Whether the agent can currently log into CX

      Returns boolean

      true if login is possible, false otherwise

    • Logs the agent into the CX platform

      Parameters

      • OptionalreasonCode: ReasonCode

        Optional initial ReasonCode from getAssignableReasonCodes. When provided for a non-Elite agent, login and status change are applied in a single server request. Elite Voice agents must log in without a reason, wait for confirmation, and then call changeStatus().

      Returns Promise<void>

      A promise that resolves when CX login is complete

    • Whether the agent can currently log out from CX

      Returns boolean

      true if logout is possible, false otherwise

    • Logs the agent out from the CX platform

      Parameters

      Returns Promise<void>

      A promise that resolves when CX logout is complete

    Capabilities

    isEliteVoiceEnabled: boolean

    Indicates whether the agent is licensed for Avaya Elite Voice (hybrid agent).

    Hybrid agents handle voice via Elite Voice .

    isInteractionAutoAcceptEnabled: boolean

    Whether auto-accept is enabled for the agent's incoming interactions.

    When true, the SDK accepts incoming interactions on the agent's behalf across all channels. Auto-accept is suppressed for an audio interaction when another audio interaction is already in progress.

    Events

    • Unsubscribes a previously registered event handler

      Parameters

      Returns void

    Identity

    userId: string

    The unique identifier for this agent

    userEmail: string

    The agent's email address

    userFullName: string

    The agent's full display name

    userFirstName: string

    The agent's first name

    userLastName: string

    The agent's last name

    accountId: string

    The tenant identifier for the logged-in agent.

    Stable for the lifetime of the session - the same value across every interaction the agent handles.

    Interactions

    canCreateOutboundVoiceInteraction: boolean

    Indicates whether the agent has permission to initiate outbound calls

    Media

    • Returns the available audio input and output devices A resolved empty device kind confirms that enumeration succeeded but no device of that kind exists.

      Returns Promise<AvailableAudioDevices>

      A promise that resolves to the AvailableAudioDevices

      If microphone permission is denied (ASE-4002) or device enumeration is unavailable (ASE-4001)

    • Whether an audio input device can currently be set

      Returns boolean

      true if the audio device service is available, false otherwise

    • Sets the active audio input device

      Parameters

      • deviceId: string

        The ID of the input device to use

      Returns void

    • Whether an audio output device can currently be set

      Returns boolean

      true if the audio device service is available, false otherwise

    • Sets the active audio output device

      Parameters

      • deviceId: string

        The ID of the output device to use

      Returns void

    Queues

    • Returns the list of queues currently assigned to this agent

      Returns Queue[]

      An array of Queue objects assigned to this agent

    defaultOutboundQueue: Queue | undefined

    The configured default outbound queue when this SDK session was initialized or most recently logged into CX.

    Returns undefined for Elite Voice users or when the outbound queue is not configured.

    The default outbound queue, or undefined when not configured

    • Refreshes the agent's queue assignments from the server

      Returns Promise<Queue[]>

      A promise that resolves to the updated list of Queue objects

    Status Management

    currentStatus: ReasonCode

    The agent's current status

    • Fetches the agent's current status from the server

      Returns Promise<ReasonCode>

      A promise that resolves to the current ReasonCode status

    • Fetches the available reason codes for status changes

      Returns Promise<ReasonCode[]>

      A promise that resolves to an array of available ReasonCode objects

    • Whether the agent can currently change their status

      Returns boolean

      true if a status change is possible, false otherwise

    • Changes the agent's status to the specified reason

      Parameters

      Returns Promise<void>

      A promise that resolves when the status change has been applied

    Viewing Interactions

    canClaimInteractionOwnership: boolean

    Whether the agent may claim ownership of an interaction they are viewing.

    canViewInteractionPublicly: boolean

    Whether the agent may view an interaction publicly (visible to the parties).

    canViewInteractionPrivately: boolean

    Whether the agent may view an interaction privately (silent monitoring).

    • Fetches the list of interaction views available to the current user. Views define server-side filters for the interaction list (e.g., "All Active Interactions"). Call InteractionView.getInteractions on a returned view to fetch its interactions.

      Returns Promise<InteractionView[]>

      A promise that resolves to an array of InteractionView