Hierarchy (view full)

Constructors

Properties

Methods

  • Accept a received invitation to join a room.

    Parameters

    • id: string

      invitation request ID.

    • from: string

      user name who send the invitation.

    Returns Promise<unknown>

    resolved with server response on success.

    Throws

    when server returns an error.

  • Send an answer to server with given data.

    Parameters

    • type: string

      response type, i.e: 'invitation',...

    • id: string

      request id

    • payload: Body

      response data.

    Returns Promise<Record<string, any>>

    Throws

    if server returns an error

  • Cancel a previous request.

    Parameters

    • id: string

      received invitation request Id.

    • from: string

      user name that requested the invitation

    • Optional error: number = 487

      rejection code to send

    Returns void

    Throws

    when server returns an error.

  • Decline a received/sent invitation to join a room.

    Parameters

    • id: string

      invitation request ID.

    • from: string

      user name who send the invitation.

    • Optional error: number = 603

      rejection code to send

    Returns Promise<unknown>

    resoponse with server response on success.

    Throws

    when server returns an error.

  • Send an invitation to one room to the user with given username.

    Parameters

    • id: string

      invitation request ID.

    • from: string

      the user name that requested the invitation.

    • username: string

      user name to request invitation.

    • roomId: string

      room identifier where invited user should join.

    • mediatypes: MediaTypes

      default mediatypes that invited peer should use.

    • Optional requestId: string

      the ID of the request that generated this invitation.

    • context: {} = {}

      context information for agent assignment purposes

      Returns Promise<InviteResponse>

      resolved with server response on success.

      Throws

      when server returns an error.

    • Send a request to server with given data.

      Parameters

      • type: string

        request type, i.e: 'createRoom', 'invitation',...

      • id: string

        request id

      • body: Body

        requested body.

      • Optional retry: number

        if specified and an id is provided, when an answer is not received for this requested id, message will be send again periodically.

      Returns Promise<Record<string, any>>

      resolved with server response.

      Throws

      if server returns an error