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

    Contract implemented by Queue that describes the full API surface for queue management.

    Covers queue identity, login state, and the login/logout lifecycle. Consume this interface when referencing the Queue API shape without coupling to the concrete Queue class (e.g. in test doubles or adapters).

    Queue

    interface QueueTrait {
        queueId: string;
        queueName: string;
        queueType: QueueType;
        isLoggedIn: boolean;
        loggedInAt?: Date;
        isAutoLogin: boolean;
        canLogin(): boolean;
        login(): Promise<void>;
        canLogout(): boolean;
        logout(reasonCode: ReasonCode): Promise<void>;
        subscribe<T extends QUEUE_STATUS_CHANGED>(
            eventName: T,
            handler: QueueEventHandler<T>,
        ): string;
        unsubscribe(eventName: QUEUE_STATUS_CHANGED, handlerId: string): void;
    }

    Implemented by

    Index

    Properties

    queueId: string

    The unique identifier of the queue.

    queueName: string

    The display name of the queue as configured in the contact center platform.

    queueType: QueueType

    The category of the queue.

    GENERAL and HYBRID queues support explicit login / logout; PERSONAL queues do not — the platform manages them automatically. UNKNOWN indicates the backend did not send the type field (typically an older backend version); the SDK does not gate login/logout for UNKNOWN — any server-side restriction surfaces via the server's rejection response instead.

    isLoggedIn: boolean

    Whether the agent is currently logged into this queue and eligible to receive interactions.

    loggedInAt?: Date

    The timestamp when the agent last logged into this queue. undefined if the agent is not currently logged in.

    isAutoLogin: boolean

    Whether the platform automatically logs the agent into this queue upon logging into CX.

    Methods

    • Whether the agent can log into this queue right now.

      Returns true when the platform rules allow login (e.g. the agent is logged into CX, has access to the queue, and is not already logged in). Returns false otherwise.

      Returns boolean

    • Logs the agent into this queue so the platform can start routing interactions to them.

      Returns Promise<void>

      A promise that resolves when the agent is successfully logged into the queue.

      AvayaInfinityAgentSdkError If the login request fails.

    • Whether the agent can log out of this queue right now.

      Returns true when the platform rules allow logout (e.g. the agent is logged into CX, has access to the queue, and is currently logged in). Returns false otherwise.

      Returns boolean

    • Logs the agent out of this queue so the platform stops routing interactions to them.

      The reasonCode must be a ReasonCode with type LOGOUT from User.getAssignableReasonCodes.

      Parameters

      • reasonCode: ReasonCode

        The logout reason code. Must have type equal to ReasonType.LOGOUT.

      Returns Promise<void>

      A promise that resolves when the agent is successfully logged out of the queue.

      AvayaInfinityAgentSdkError If the logout request fails.