Hierarchy

Constructors

Properties

Methods

  • Accept a received invitation to join a room.

    Throws

    when server returns an error.

    Returns

    resolved with server response on success.

    Parameters

    • id: string

      invitation request ID.

    • from: string

      user name who send the invitation.

    Returns Promise<unknown>

  • Send an answer to server with given data.

    Throws

    if server returns an error

    Parameters

    • type: string

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

    • id: string

      request id

    • payload: Body

      response data.

    Returns Promise<Record<string, any>>

  • Cancel a previous request.

    Throws

    when server returns an error.

    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

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

    Throws

    when server returns an error.

    Returns

    resoponse with server response on success.

    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>

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

    Throws

    when server returns an error.

    Returns

    resolved with server response on success.

    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>

    • Send a request to server with given data.

      Throws

      if server returns an error

      Returns

      resolved with server response.

      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>>

    Generated using TypeDoc