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

    Contract implemented by Viewer that describes the API surface for an owner acting on another viewer of an interaction. Consume this interface when you need to reference the Viewer API shape without coupling to the concrete class (e.g. in test doubles).

    interface ViewerTrait {
        id: string;
        firstName?: string;
        lastName?: string;
        fullName?: string;
        email?: string;
        viewerType?: string;
        externalAddress?: string;
        isAudio?: boolean;
        isMuted?: boolean;
        eliteSupervisorMode?: EliteSupervisorMode;
        canMute(): boolean;
        canUnmute(): boolean;
        mute(): Promise<void>;
        unmute(): Promise<void>;
        canRemove(): boolean;
        remove(): Promise<void>;
        canAssignOwner(): boolean;
        assignOwner(): Promise<void>;
    }

    Implemented by

    Index

    Capability Guards

    • Whether the current owner can mute this viewer right now.

      Returns boolean

    • Whether the current owner can unmute this viewer right now.

      Returns boolean

    • Whether the current owner can remove this viewer right now.

      Returns boolean

    • Whether this viewer can be promoted to owner of the interaction right now.

      Returns boolean

    Identity

    id: string

    Platform-assigned unique identifier for the viewer agent.

    firstName?: string

    First name of the viewer agent, when known.

    lastName?: string

    Last name of the viewer agent, when known.

    fullName?: string

    Full display name of the viewer agent, when known.

    email?: string

    Email address of the viewer agent, when known.

    viewerType?: string

    Viewer category (e.g. "internal", "external", "eliteSupervisor").

    externalAddress?: string

    External (PSTN) address for non-internal viewers (e.g. a transferred-in external party joining as a viewer). undefined for internal agent viewers.

    Monitoring

    • Mutes this viewer. Owner action. Check canMute before calling.

      Returns Promise<void>

      Promise that resolves when the server confirms the mute.

    • Unmutes this viewer. Owner action. Check canUnmute before calling.

      Returns Promise<void>

      Promise that resolves when the server confirms the unmute.

    • Removes this viewer from the interaction. Owner action. Check canRemove before calling.

      Returns Promise<void>

      Promise that resolves when the server confirms the removal.

    • Promotes this viewer to owner of the interaction. Check canAssignOwner before calling.

      Returns Promise<void>

      Promise that resolves when the server confirms the ownership change.

    Status

    isAudio?: boolean

    Whether the viewer has joined the audio call. undefined for interactions where audio does not apply (e.g. non-voice channels) or before the viewer record exists.

    isMuted?: boolean

    Whether the viewer's microphone is muted. undefined for interactions where audio does not apply (e.g. non-voice channels) or before the viewer record exists.

    eliteSupervisorMode?: EliteSupervisorMode

    Elite supervisor monitoring mode. Only set for Elite supervisor viewers (viewerType === "eliteSupervisor") that have joined audio. undefined otherwise.