Hierarchy

  • ICallQueue

Implemented by

Methods

  • Subscribe to a call-queue update event.

    Returns

    This client, for chaining.

    Example

    callQueue.on('callQueue:updated', listener);
    

    Type Parameters

    • Event extends CALL_QUEUE_UPDATED

    Parameters

    • event: Event

      The call-queue event name.

    • listener: CallQueueEventTypes[Event]

      The callback invoked with the updated status.

    Returns ICallQueue

  • Remove a previously registered call-queue update listener.

    Returns

    This client, for chaining.

    Example

    callQueue.off('callQueue:updated', listener);
    

    Type Parameters

    • Event extends CALL_QUEUE_UPDATED

    Parameters

    • event: Event

      The call-queue event name.

    • listener: CallQueueEventTypes[Event]

      The callback to remove.

    Returns ICallQueue

  • Read the agent state and queue memberships for a line.

    Returns

    The queue settings or an error response.

    Example

    const result = await callQueue.getCallQueueSettings();
    

    Parameters

    • Optional lineOwnerId: string

      Optional secondary line owner ID; omit for the primary line.

    Returns Promise<CallQueueResponse>

  • Update the agent state or queue membership for a line.

    Returns

    The updated settings or an error response.

    Example

    await callQueue.updateCallQueueSettings({agentACDState: 'AVAILABLE'});
    

    Parameters

    • request: UpdateCallQueueSettingsRequest

      The agent state and/or queue membership updates.

    • Optional lineOwnerId: string

      Optional secondary line owner ID; omit for the primary line.

    Returns Promise<CallQueueResponse>

  • Request that the calling service publish the current agent state on Mercury.

    Returns

    The sync request result or an error response.

    Example

    await callQueue.syncTelephonyCalls();
    

    Returns Promise<CallQueueResponse>

  • Refresh backend readiness and invalidate cached state and pending requests before reuse.

    Returns

    Whether this client can be reused.

    Example

    const reusable = callQueue.prepareForReuse?.();
    

    Returns boolean

  • Remove this client's Mercury listeners for the queue event names.

    Returns

    Nothing.

    Example

    callQueue.dispose();
    

    Returns void