Constructors

Properties

Methods

#checkAuthenticated #createConnection #emmitAction #emmitBinaryAction #getConnectionConfigForAnonymousUser #getConnectionConfigForExamples acceptFriendInvite addCalendarEvent addChannelSendPermissionListMember addChatToFavourites addFriend addMemberToChat addMembersToThread addReactionOnMessage addRoleToMember addSpaceRole addUserEncryptionInfo changeUserEmail changeUserHostKey changeUserNickname changeUserPassword changeUserPhoneNumber changeUserTimezone closePcAndFireEvent connect createChannelMeeting createChat createDirectMeeting createRoom createRoomFromEvent createSpace createSpaceCategory createSpaceChannel createSpaceThread deleteChat deleteMessage deleteSpace deleteSpaceCategory deleteSpaceChannel deleteSpaceRole deleteSpaceThread disconnect downloadAttachment editMessage ensureUsernameAvailable generateNewSpaceInvite getAttachmentsSize getContacts getExamplesFreeUser getFirstAndLastMessage getMessageAttachment getMessagesCount getPublicChannels getRolePermissions getRoom getSendingAttachmentsHandler getSystemConfig getUnreadMessagesCount getUserCalendar getUserChats getUserEncryptionInfo getUserInfo getUserPmiSettings getUserSpaces joinSpaceByInviteCode leaveSpace listAttachments loadActiveRooms loadChat loadMeetingsHistory loadMessages loadMessagesWithMentions logout markMessageRead markMessageUnread moveSpaceChannel muteChannel muteChat muteSpace muteThread off on rejectFriendInvite removeCalendarEvent removeChannelSendPermissionListMember removeChatFromFavourites removeFriend removeMeetingFromHistory removeMeetingRecord removeMemberFromChat removeMemberFromThread removeReactionOnMessage removeRoleFromMember removeUser renameChat resetPassword revokeFriendInvite revokeSpaceInvite roomAvailable roomExists searchChatMessages searchMessageAttachments sendMessage server signUp state unmuteChannel unmuteChat unmuteSpace unmuteThread updateActivityStatus updateCalendarEvent updateChannelNotificationSettings updateChannelSendPolicy updateChatConfiguration updateChatHiding updateChatIcon updateChatIconRequest updateChatNotificationSettings updateChatReceivePolicy updateContactVolume updatePresenceStatus updateSpaceCategory updateSpaceChannel updateSpaceIcon updateSpaceIconRequest updateSpaceNickname updateSpaceNotificationSettings updateSpaceOverview updateSpaceRole updateSpaceThread updateThreadNotificationSettings updateUserIcon updateUserIconRequest updateUserPmiSettings user fromUTF8ArrayToStr generateAttachmentId strToUTF8Array

Constructors

Properties

#_server: string
#_state: State = State.NEW
#_url: string
#_user: {
    authToken: string;
    email: string;
    nickname: string;
    pmi: string;
    username: string;
    webRTCMetricsServerDescription?: RTCMetricsServerDescription;
}

Type declaration

  • authToken: string
  • email: string
  • nickname: string
  • pmi: string
  • username: string
  • Optional webRTCMetricsServerDescription?: RTCMetricsServerDescription
#attachmentsTransferManager: AttachmentsTransferManager = ...
#binaryChunkSize: number
#connection: Connection
#logger: default = ...
#loggerPrefix: PrefixFunction
#notifier: Notifier<EventUnion, NotifyUnion> = ...
#resetPasswordId: string = ''
#rooms: {
    [key: string]: RoomExtended;
} = {}

Type declaration

#signUpId: string = ''
#uploadingAttachmentState: MessageWithUploadingAttachmentState = {}

Methods

  • Returns void

  • Returns void

  • Parameters

    • action: InternalApi
    • data: object
    • resolve: Function
    • reject: Function

    Returns void

  • Parameters

    • data: any

    Returns void

  • Parameters

    • url: string
    • Optional timeout: number

    Returns {
        appName: InternalApi;
        custom: {
            nickname: string;
            password: string;
            username: string;
        };
        timeout: number;
        url: string;
    }

    • appName: InternalApi
    • custom: {
          nickname: string;
          password: string;
          username: string;
      }
      • nickname: string
      • password: string
      • username: string
    • timeout: number
    • url: string
  • Parameters

    • url: string
    • Optional timeout: number

    Returns {
        appName: InternalApi;
        custom: {
            nickname: string;
            password: string;
            username: string;
        };
        timeout: number;
        url: string;
    }

    • appName: InternalApi
    • custom: {
          nickname: string;
          password: string;
          username: string;
      }
      • nickname: string
      • password: string
      • username: string
    • timeout: number
    • url: string
  • Add calendar event

    Parameters

    • event: {
          accessCode?: string;
          allowJoinAtAnyTime: boolean;
          description: string;
          end: number;
          ownerVideo: boolean;
          participantVideo: boolean;
          recurring: boolean;
          start: number;
          title: string;
          useLocalAutoRecord: boolean;
          useMuteAudioOnJoin: boolean;
          usePMI: boolean;
          waitingRoom: boolean;
      }
      • Optional accessCode?: string
      • allowJoinAtAnyTime: boolean
      • description: string
      • end: number
      • ownerVideo: boolean
      • participantVideo: boolean
      • recurring: boolean
      • start: number
      • title: string
      • useLocalAutoRecord: boolean
      • useMuteAudioOnJoin: boolean
      • usePMI: boolean

        if true then user PMI settings will be updated and user will receive SfuEvent.UPDATE_USER_PMI_SETTINGS with UserPmiSettings

      • waitingRoom: boolean

    Returns Promise<CalendarEvent>

  • Parameters

    • channel: {
          id: string;
          member: string;
      }
      • id: string
      • member: string

    Returns Promise<UserSpecificChatInfo>

    Deprecated

  • Add space role

    For space owner/user that has permission to manage roles

    Space members will receive SpaceEvent.NEW_SPACE_ROLE with NewSpaceRoleAdded

    On the client side, a new role must be added to the participants listed in the NewSpaceRoleAdded.members

    Parameters

    • role: {
          color: string;
          members: string[];
          name: string;
          permissions: string[];
          spaceId: string;
      }
      • color: string
      • members: string[]
      • name: string
      • permissions: string[]
      • spaceId: string

    Returns Promise<SfuSpaceRole>

  • After adding:

    User's contacts will see Contact.encryptionEnabled and Contact.publicKey. The remaining information is not used on the server and is only stored; it can be requested using getUserEncryptionInfo.

    verificationHash, salt, and iv are optional; the client chooses the private key encryption method.

    salt - Cryptographic Salt

    iv - Initialization Vector for Encryption

    Parameters

    • info: {
          iv?: string;
          privateKey: string;
          publicKey: string;
          salt?: string;
          verificationHash?: string;
      }
      • Optional iv?: string
      • privateKey: string
      • publicKey: string
      • Optional salt?: string
      • Optional verificationHash?: string

    Returns Promise<UserEncryptionInfo>

  • Change user email

    Parameters

    • email: string

    Returns Promise<void>

  • Parameters

    • hostKey: string

    Returns Promise<void>

  • Change user email

    Users will receive SfuEvent.CONTACT_UPDATED with changed nickname

    Parameters

    • nickname: string

    Returns Promise<void>

  • Parameters

    • currentPassword: string
    • newPassword: string

    Returns Promise<void>

  • Parameters

    • phoneNumber: string

    Returns Promise<void>

  • Parameters

    • timezone: string

    Returns Promise<void>

  • Parameters

    Returns void

  • Connects the user to the server.

    The user can connect using either a username and password or an authToken.

    Once the connection is successful, the state will change to State.AUTHENTICATED. After that, the sfu-sdk will emit the event SfuEvent.CONNECTED.

    Parameters

    • options: {
          authToken?: string;
          binaryChunkSize?: number;
          details?: ConnectionDetails;
          device?: string;
          failedProbesThreshold?: number;
          nickname?: string;
          password?: string;
          pingInterval?: number;
          timeout?: number;
          url: string;
          username?: string;
      }
      • Optional authToken?: string

        The authentication token for direct login (optional if username and password are provided).

        After successfully connection user contacts will receive an SfuEvent.USER_PRESENCE_STATUS_UPDATED with UserPresenceStatusUpdated

      • Optional binaryChunkSize?: number
      • Optional details?: ConnectionDetails
      • Optional device?: string
      • Optional failedProbesThreshold?: number
      • Optional nickname?: string
      • Optional password?: string

        The user's password (optional if authToken is provided).

      • Optional pingInterval?: number
      • Optional timeout?: number
      • url: string
      • Optional username?: string

        The user's username (optional if authToken is provided).

    Returns Promise<{
        authToken: string;
        email: string;
        nickname: string;
        pmi: string;
        username: string;
    }>

  • Create channel meeting

    Room.id() will be equal channelId

    Parameters

    • options: {
          channelId: string;
          spaceId: string;
      }
      • channelId: string
      • spaceId: string

    Returns Promise<RoomExtended>

    RoomExtended with () that equal ConferenceType.CHANNEL

  • Create chat

    Parameters

    • chat: {
          allowedToAddExternalUser?: boolean;
          channel?: boolean;
          channelSendPolicy?: ChannelSendPolicy;
          encryptedAttachmentsSecretKey?: string;
          encryptedChatPasswords?: UserChatEncryptedPassword[];
          encryptedPrivateKey?: string;
          favourite?: boolean;
          id?: string;
          isEncryptionEnabled?: boolean;
          members?: string[];
          name?: string;
          publicKey?: string;
          sendPermissionList?: string[];
          type?: ChatType;
      }
      • Optional allowedToAddExternalUser?: boolean
      • Optional channel?: boolean
      • Optional channelSendPolicy?: ChannelSendPolicy
      • Optional encryptedAttachmentsSecretKey?: string

        encrypted key for encrypting attachments.

      • Optional encryptedChatPasswords?: UserChatEncryptedPassword[]

        an array of chat passwords for each member encrypted with the member's public keys, which must be decrypted using the user's private key.

      • Optional encryptedPrivateKey?: string

        the private key of the chat, encrypted with a chat password, used to decrypt messages

      • Optional favourite?: boolean
      • Optional id?: string
      • Optional isEncryptionEnabled?: boolean

        must be true for a Secure Chat

      • Optional members?: string[]

        these members will receive SfuEvent.NEW_CHAT with UserSpecificChatInfo

      • Optional name?: string
      • Optional publicKey?: string

        the public key of the chat used to encrypt messages

      • Optional sendPermissionList?: string[]
      • Optional type?: ChatType

    Returns Promise<UserSpecificChatInfo>

    Deprecated

    Deprecated

    Deprecated

    Deprecated

    Creating a Secure Chat with Encryption:

  • Create channel meeting

    Room.id() will be equal directChatId

    Parameters

    • options: {
          directChatId: string;
      }
      • directChatId: string

    Returns Promise<RoomExtended>

    RoomExtended with () that equal ConferenceType.DIRECT

  • Create room

    To create with PMI settings, PMI must be specified as the ID.

    To join, you need to use room.join.

    Parameters

    • options: {
          id?: string;
          name?: string;
          pin?: string;
      }
      • Optional id?: string
      • Optional name?: string
      • Optional pin?: string

    Returns Promise<RoomExtended>

    RoomExtended with () that equal ConferenceType.GLOBAL

  • Creating a room based on a calendar event created using addCalendarEvent.

    To join, you need to use room.join()

    Parameters

    • event: {
          accessCode?: string;
          allowJoinAtAnyTime: boolean;
          description: string;
          end: number;
          id: string;
          ownerVideo: boolean;
          participantVideo: boolean;
          recurring: boolean;
          start: number;
          title: string;
          useLocalAutoRecord: boolean;
          useMuteAudioOnJoin: boolean;
          usePMI: boolean;
          waitingRoom: boolean;
      }
      • Optional accessCode?: string
      • allowJoinAtAnyTime: boolean
      • description: string
      • end: number
      • id: string
      • ownerVideo: boolean
      • participantVideo: boolean
      • recurring: boolean
      • start: number
      • title: string
      • useLocalAutoRecord: boolean
      • useMuteAudioOnJoin: boolean
      • usePMI: boolean
      • waitingRoom: boolean

    Returns Promise<RoomExtended>

  • The space is created with the default category Category1, default channel Channel1 and default role "@everyone".

    Parameters

    • space: {
          name: string;
      }
      • name: string

    Returns Promise<SfuSpace>

  • Create space channel

    For space owner/user that has permission to manage channels

    Channel members will receive SpaceEvent.NEW_SPACE_CHANNEL with NewSpaceChannelEvent

    Parameters

    • channel: {
          categoryId?: string;
          isPrivate: boolean;
          members?: string[];
          name: string;
          roles?: string[];
          spaceId: string;
      }
      • Optional categoryId?: string
      • isPrivate: boolean
      • Optional members?: string[]

        used to create a private channel. Array of member ids or empty array.

      • name: string
      • Optional roles?: string[]

        used to create a private channel. Array of role ids or empty array.

      • spaceId: string

    Returns Promise<SfuSpaceChannel>

  • Create space thread

    Thread members will receive SpaceEvent.NEW_SPACE_THREAD with NewSpaceThreadEvent

    Parameters

    • thread: {
          channelId: string;
          isPrivate: boolean;
          name: string;
          spaceId: string;
      }
      • channelId: string
      • isPrivate: boolean
      • name: string
      • spaceId: string

    Returns Promise<SfuSpaceThread>

  • Delete space role

    For space owner/user that has permission to manage roles

    Space members will receive SpaceEvent.SPACE_ROLE_DELETED with SpaceRoleDeleted

    On the client side, should remove this role from channel's access rights and update channel members list

    Parameters

    • options: {
          roleId: string;
          spaceId: string;
      }
      • roleId: string
      • spaceId: string

    Returns Promise<SpaceRoleDeleted>

  • Delete space thread

    For space owner/thread creator

    Thread members will receive SpaceEvent.SPACE_THREAD_DELETED with SpaceThreadDeleted

    Parameters

    • options: {
          channelId: string;
          spaceId: string;
          threadId: string;
      }
      • channelId: string
      • spaceId: string
      • threadId: string

    Returns Promise<void>

  • Ensure username available

    If the username is not taken, the promise will resolve with void.

    If the username is taken, the promise will reject with UserManagementError.USERNAME_ALREADY_IN_USE.

    Parameters

    • options: {
          timeout?: number;
          url: string;
          username: string;
      }
      • Optional timeout?: number
      • url: string
      • username: string

    Returns Promise<void>

  • Generate space invite

    If user has permission to create a space invite - generating invite code with 8 symbols. To create invite link - use 'ws:{serverUrl}:{port}/join-space/inviteCode'

    Parameters

    • options: {
          lifespan: number;
          spaceId: string;
      }
      • lifespan: number
      • spaceId: string

    Returns Promise<SfuSpaceInvite>

  • Get user contacts.

    Returns users who are friends or with whom there are mutual space channels or direct chats, incoming and outgoing friend invites, banned users.

    Returns Promise<UserContacts>

  • Parameters

    • options: {
          timeout?: number;
          url: string;
      }
      • Optional timeout?: number
      • url: string

    Returns Promise<ExamplesUser>

  • Returns Promise<ChatMap>

    Deprecated

  • Parameters

    • options: {
          id: string;
      }
      • id: string

    Returns RoomExtended

  • Get all user calendar events

    Returns Promise<Calendar>

  • Get user info

    Usually used to display profile info

    Returns Promise<UserInfo>

  • Get user pmi settings

    Used for create meetings

    Returns Promise<UserPmiSettings>

  • Leave space

    Space members will receive SpaceEvent.USER_LEFT_SPACE with UserLeftSpace

    After receiving the event, it is necessary to remove the user from the list of members in the space and channels/threads.

    If channel meetings were started, user will receive MeetingSyncEvent.MEETING_ENDED_SYNC with MeetingEndedSync. If the user was a participant in the meeting, users will receive RoomEvent.EVICTED with EvictedFromRoom.

    Parameters

    • space: {
          id: string;
      }
      • id: string

    Returns Promise<void>

  • List user attachments

    Parameters

    • filter: {
          offset: number;
          pageSize: number;
      }
      • offset: number

        starting point for retrieving a subset of attachments

      • pageSize: number

        number of items retrieved and displayed per page

    Returns Promise<AttachmentListResult>

  • Get running rooms

    Returns Promise<RoomInfo[]>

  • Parameters

    • chat: {
          id: string;
      }
      • id: string

    Returns Promise<Chat>

  • Load meetings history

    Used to load the history of global meetings.

    The response returns a MeetingsHistoryEvent with the requested items and the total size.

    Parameters

    • params: {
          boundaries?: {
              dateMark: number;
              lowerLimit: number;
              upperLimit: number;
          };
          pageRequest?: {
              page: number;
              pageSize: number;
          };
          timeFrame?: {
              end: number;
              limit?: number;
              start: number;
          };
      }
      • Optional boundaries?: {
            dateMark: number;
            lowerLimit: number;
            upperLimit: number;
        }
        • dateMark: number
        • lowerLimit: number
        • upperLimit: number
      • Optional pageRequest?: {
            page: number;
            pageSize: number;
        }
        • page: number
        • pageSize: number
      • Optional timeFrame?: {
            end: number;
            limit?: number;
            start: number;
        }
        • end: number
        • Optional limit?: number
        • start: number

    Returns Promise<MeetingsHistoryEvent>

  • Load messages for Direct chat | Channel | Thread

    Parameters

    • params: {
          boundaries?: {
              dateMark: number;
              lowerLimit: number;
              upperLimit: number;
          };
          targetEntityId: MessageTargetEntityId;
          targetEntityType: MessageTargetEntityType;
          timeFrame?: {
              end: number;
              limit?: number;
              start: number;
          };
      }
      • Optional boundaries?: {
            dateMark: number;
            lowerLimit: number;
            upperLimit: number;
        }

        to load messages by specifying a particular message using its date, along with the number of messages above and below it. Upper limit includes message with date dateMark.

        • dateMark: number
        • lowerLimit: number
        • upperLimit: number
      • targetEntityId: MessageTargetEntityId
      • targetEntityType: MessageTargetEntityType
      • Optional timeFrame?: {
            end: number;
            limit?: number;
            start: number;
        }

        to load by start date to end date. For load all messages used with start = 0, end = -1.

        • end: number
        • Optional limit?: number
        • start: number

    Returns Promise<Message[]>

  • Parameters

    • params: {
          boundaries?: {
              dateMark: number;
              lowerLimit: number;
              upperLimit: number;
          };
          chatId?: string;
          sortOrder: SortOrder;
          timeFrame?: {
              end: number;
              limit?: number;
              start: number;
          };
          userTag: string;
      }
      • Optional boundaries?: {
            dateMark: number;
            lowerLimit: number;
            upperLimit: number;
        }
        • dateMark: number
        • lowerLimit: number
        • upperLimit: number
      • Optional chatId?: string
      • sortOrder: SortOrder
      • Optional timeFrame?: {
            end: number;
            limit?: number;
            start: number;
        }
        • end: number
        • Optional limit?: number
        • start: number
      • userTag: string

    Returns Promise<LoadMessagesWithMentionsResult>

    Deprecated

  • Logout from app

    Returns Promise<void>

  • Move space channel

    Channel members will receive SpaceEvent.SPACE_CHANNEL_MOVED with SpaceChannelMoved

    Parameters

    • channel: {
          categoryId: string;
          channelId: string;
          spaceId: string;
      }
      • categoryId: string

        Specify the identifier of the category to which you want to move the channel, or an empty string to leave the channel uncategorized.

      • channelId: string
      • spaceId: string

    Returns Promise<SpaceChannelMoved>

  • Mute channel

    Parameters

    • options: {
          channelId: string;
          muteTime?: number;
          mutedIndefinitely?: boolean;
          spaceId: string;
      }
      • channelId: string
      • Optional muteTime?: number

        – the duration for which the sound is muted. The final event will contain MuteSettings.mutedUntil, which is the current time plus the specified duration.

      • Optional mutedIndefinitely?: boolean

        – indicates whether the sound is muted indefinitely.

        Returns ChannelMuted, and other connected devices will also receive this event for synchronization.

      • spaceId: string

    Returns Promise<ChannelMuted>

  • Mute chat

    Parameters

    • options: {
          id: string;
          muteTime?: number;
          mutedIndefinitely?: boolean;
      }
      • id: string
      • Optional muteTime?: number

        – the duration for which the sound is muted. The final event will contain MuteSettings.mutedUntil, which is the current time plus the specified duration.

      • Optional mutedIndefinitely?: boolean

        – indicates whether the sound is muted indefinitely.

        Returns ChatMuted, and other connected devices will also receive this event for synchronization.

    Returns Promise<ChatMuted>

  • Mute space

    Parameters

    • options: {
          muteTime?: number;
          mutedIndefinitely?: boolean;
          spaceId: string;
      }
      • Optional muteTime?: number

        – the duration for which the sound is muted. The final event will contain MuteSettings.mutedUntil, which is the current time plus the specified duration.

      • Optional mutedIndefinitely?: boolean

        – indicates whether the sound is muted indefinitely.

        Returns SpaceMuted, and other connected devices will also receive this event for synchronization.

      • spaceId: string

    Returns Promise<SpaceMuted>

  • Mute thread

    Parameters

    • options: {
          channelId: string;
          muteTime?: number;
          mutedIndefinitely?: boolean;
          spaceId: string;
          threadId: string;
      }
      • channelId: string
      • Optional muteTime?: number

        – the duration for which the sound is muted. The final event will contain MuteSettings.mutedUntil, which is the current time plus the specified duration.

      • Optional mutedIndefinitely?: boolean

        – indicates whether the sound is muted indefinitely.

        Returns ThreadMuted, and other connected devices will also receive this event for synchronization.

      • spaceId: string
      • threadId: string

    Returns Promise<ThreadMuted>

  • Parameters

    • event: {
          id: string;
      }
      • id: string

    Returns Promise<CalendarEvent>

  • Parameters

    • channel: {
          id: string;
          member: string;
      }
      • id: string
      • member: string

    Returns Promise<UserSpecificChatInfo>

    Deprecated

  • Remove meeting from history

    Used to remove meeting from history. Any user can remove it. This does not affect other users' history in any way.

    Parameters

    • id: string

    Returns Promise<void>

  • Removes the meeting recording (video).

    The right to remove is granted to the following roles: In global meetings – the meeting owner In channel meetings – the space owner In group direct chats – the chat creator In personal direct chats – no one

    Users will receive MeetingRecordDeleted for global meetings and MessageEdited for others, because it's system message

    Parameters

    • options: {
          meetingHistoryItemId: string;
          meetingId?: string;
          meetingType: ConferenceType;
          recordId: string;
          spaceId?: string;
      }
      • meetingHistoryItemId: string
      • Optional meetingId?: string
      • meetingType: ConferenceType
      • recordId: string
      • Optional spaceId?: string

    Returns Promise<void>

  • Remove user (internal using)

    Parameters

    • options: {
          id: string;
          timeout?: number;
          url: string;
      }
      • id: string
      • Optional timeout?: number
      • url: string

    Returns Promise<void>

  • Update chat

    Chat members will receive SfuEvent.CHAT_UPDATED with UserSpecificChatInfo

    Parameters

    • chat: {
          id: string;
          name: string;
      }
      • id: string
      • name: string

    Returns Promise<void>

  • Removing the space invite

    Parameters

    • options: {
          inviteCode: string;
          spaceId: string;
      }
      • inviteCode: string
      • spaceId: string

    Returns Promise<SfuSpaceInvite>

  • Check and get an available room.

    To join, you need to use room.join()

    Parameters

    • options: {
          id: string;
          nickname?: string;
          pin?: string;
      }
      • id: string
      • Optional nickname?: string
      • Optional pin?: string

    Returns Promise<RoomExtended>

  • Checks for the existence of a running room.

    Parameters

    • options: {
          id: string;
          pin?: string;
      }
      • id: string
      • Optional pin?: string

    Returns Promise<void>

  • Parameters

    • params: {
          chatId: string;
          limit?: number;
          searchId?: string;
          searchString: string;
      }
      • chatId: string
      • Optional limit?: number
      • Optional searchId?: string
      • searchString: string

    Returns Promise<Message[]>

    Deprecated

  • Parameters

    • params: {
          attachmentsType?: MessageAttachmentMediaType;
          boundaries?: {
              dateMark: number;
              lowerLimit: number;
              upperLimit: number;
          };
          chatId?: string;
          from?: string;
          searchString?: string;
          sortOrder: SortOrder;
          timeFrame?: {
              end: number;
              limit?: number;
              start: number;
          };
      }
      • Optional attachmentsType?: MessageAttachmentMediaType
      • Optional boundaries?: {
            dateMark: number;
            lowerLimit: number;
            upperLimit: number;
        }
        • dateMark: number
        • lowerLimit: number
        • upperLimit: number
      • Optional chatId?: string
      • Optional from?: string
      • Optional searchString?: string
      • sortOrder: SortOrder
      • Optional timeFrame?: {
            end: number;
            limit?: number;
            start: number;
        }
        • end: number
        • Optional limit?: number
        • start: number

    Returns Promise<MessageAttachmentsSearchResult>

    Deprecated

  • Returns string

  • Sign up for new users

    Works in a separate connection

    Parameters

    • options: {
          email: string;
          password: string;
          timeout?: number;
          url: string;
          username: string;
      }
      • email: string
      • password: string
      • Optional timeout?: number
      • url: string
      • username: string

    Returns Promise<SignUpStatus>

  • Returns State

  • Unmute channel

    SfuSpaceChannel.muteSettings wil be null - that means the channel is not muted.

    Returns ChannelUnmuted, and other connected devices will also receive this event for synchronization.

    Parameters

    • options: {
          channelId: string;
          spaceId: string;
      }
      • channelId: string
      • spaceId: string

    Returns Promise<ChannelUnmuted>

  • Unmute chat

    UserSpecificChatInfo.muteSettings wil be null - that means the chat is not muted.

    Returns ChatUnmuted, and other connected devices will also receive this event for synchronization.

    Parameters

    • options: {
          id: string;
      }
      • id: string

    Returns Promise<ChatUnmuted>

  • Unmute space

    SfuSpace.muteSettings wil be null - that means the space is not muted.

    Returns SpaceUnmuted, and other connected devices will also receive this event for synchronization.

    Parameters

    • options: {
          spaceId: string;
      }
      • spaceId: string

    Returns Promise<SpaceUnmuted>

  • Unmute thread

    SfuSpaceThread.muteSettings wil be null - that means the thread is not muted.

    Returns ThreadUnmuted, and other connected devices will also receive this event for synchronization.

    Parameters

    • options: {
          channelId: string;
          spaceId: string;
          threadId: string;
      }
      • channelId: string
      • spaceId: string
      • threadId: string

    Returns Promise<ThreadUnmuted>

  • Update calendar event

    Parameters

    • event: {
          accessCode?: string;
          allowJoinAtAnyTime: boolean;
          description: string;
          end: number;
          id: string;
          ownerVideo: boolean;
          participantVideo: boolean;
          recurring: boolean;
          start: number;
          title: string;
          useLocalAutoRecord: boolean;
          useMuteAudioOnJoin: boolean;
          usePMI: boolean;
          waitingRoom: boolean;
      }
      • Optional accessCode?: string
      • allowJoinAtAnyTime: boolean
      • description: string
      • end: number
      • id: string
      • ownerVideo: boolean
      • participantVideo: boolean
      • recurring: boolean
      • start: number
      • title: string
      • useLocalAutoRecord: boolean
      • useMuteAudioOnJoin: boolean
      • usePMI: boolean

        if true then user PMI settings will be updated and user will receive SfuEvent.UPDATE_USER_PMI_SETTINGS with UserPmiSettings

      • waitingRoom: boolean

    Returns Promise<CalendarEvent>

  • Parameters

    • chat: {
          allowedToAddExternalUser?: boolean;
          channelSendPolicy?: ChannelSendPolicy;
          id: string;
          sendPermissionList?: string[];
          type?: ChatType;
      }
      • Optional allowedToAddExternalUser?: boolean
      • Optional channelSendPolicy?: ChannelSendPolicy
      • id: string
      • Optional sendPermissionList?: string[]
      • Optional type?: ChatType

    Returns Promise<UserSpecificChatInfo>

    Deprecated

  • Update chat icon

    Used to update direct chat icon.

    Chat members will receive ChatIconUpdated with ChatIconUpdated.icon as download url.

    Returns download url or null if removed.

    Parameters

    • options: {
          icon?: File;
          id: string;
          remove?: boolean;
      }
      • Optional icon?: File
      • id: string
      • Optional remove?: boolean

    Returns Promise<string>

  • Parameters

    • options: {
          id: string;
          name?: string;
          remove?: boolean;
          size?: number;
      }
      • id: string
      • Optional name?: string
      • Optional remove?: boolean
      • Optional size?: number

    Returns Promise<string>

  • Delete space category

    For space owner/category creator/user that has permission to manage categories

    Space members will receive SpaceEvent.SPACE_CATEGORY_UPDATED with SpaceCategoryUpdated

    Parameters

    • options: {
          categoryId: string;
          name: string;
          spaceId: string;
      }
      • categoryId: string
      • name: string
      • spaceId: string

    Returns Promise<void>

  • Update space icon

    Used to update space icon.

    Space members will receive SpaceOverviewUpdated with SpaceOverviewUpdated.icon as download url.

    Returns download url or null if removed.

    Parameters

    • options: {
          icon?: File;
          id: string;
          remove?: boolean;
      }
      • Optional icon?: File
      • id: string
      • Optional remove?: boolean

    Returns Promise<string>

  • Parameters

    • options: {
          id: string;
          name?: string;
          remove?: boolean;
          size?: number;
      }
      • id: string
      • Optional name?: string
      • Optional remove?: boolean
      • Optional size?: number

    Returns Promise<string>

  • Update nickname in the space Updates a user's nickname in the space.

    A custom nickname, if set, takes precedence over the user's global nickname. If no custom nickname is provided (or an empty string is passed), the user's global nickname must be displayed.

    To remove a previously set the custom nickname and revert to the global one, pass an empty string.

    Parameters

    • options: {
          nickname: string;
          spaceId: string;
          userId?: string;
      }
      • nickname: string
      • spaceId: string
      • Optional userId?: string

        Optional. The ID of the user whose nickname is being updated. If this field is omitted or set to the caller's own ID, the caller's nickname is updated. The space owner can update anyone's nickname by specifying user ID. If a non-owner attempts to update another user's nickname, a SpaceError.UPDATE_NICKNAME_ACCESS_RIGHTS_ERROR is thrown. All space members receive a SpaceEvent.USER_SPACE_NICKNAME_UPDATED event with a UserSpaceNicknameUpdated payload when the nickname is updated.

    Returns Promise<UserSpaceNicknameUpdated>

  • Update space overview

    Space members will receive SpaceEvent.SPACE_OVERVIEW_UPDATED with SpaceOverviewUpdated

    Parameters

    • space: {
          id: string;
          name: string;
      }
      • id: string
      • name: string

    Returns Promise<void>

  • Update space role

    For space owner/user that has permission to manage roles

    Space members will receive SpaceEvent.SPACE_ROLE_UPDATED with SpaceRoleUpdated

    On the client side, a new role must be added to the participants listed in the SpaceRoleUpdated.membersForAddRole and must be removed from participants listed in the SpaceRoleUpdated.membersForDeleteRole

    Participants from whom this role will be removed will receive SpaceEvent.SPACE_CHANNEL_DELETED with SpaceChannelDeleted for each channel they were part of because of this role.

    Participants who are assigned this role will receive SpaceEvent.NEW_SPACE_CHANNEL with NewSpaceChannelEvent for each channel that has this role in its access rights.

    Participants who had the role before the update and still have it afterward will receive SpaceEvent.SPACE_CHANNEL_UPDATED with SpaceChannelUpdated for each channel that has this role in its access rights.

    Parameters

    • role: {
          color: string;
          members: string[];
          name: string;
          permissions: string[];
          roleId: string;
          spaceId: string;
      }
      • color: string
      • members: string[]
      • name: string
      • permissions: string[]
      • roleId: string
      • spaceId: string

    Returns Promise<SpaceRoleUpdated>

  • Update space thread

    For space owner/thread creator

    Thread members will receive SpaceEvent.SPACE_THREAD_UPDATED with SpaceThreadUpdated

    Parameters

    • options: {
          channelId: string;
          name: string;
          spaceId: string;
          threadId: string;
      }
      • channelId: string
      • name: string
      • spaceId: string
      • threadId: string

    Returns Promise<void>

  • Update user avatar

    Used to update user avatar.

    User will receive UserInfoChangedEvent and ContactUpdated with self. User's contacts will receive ContactUpdated

    Returns download url or null if removed.

    Parameters

    • options: {
          icon?: File;
          remove?: boolean;
      }
      • Optional icon?: File
      • Optional remove?: boolean

    Returns Promise<string>

  • Parameters

    • options: {
          name?: string;
          remove?: boolean;
          size?: number;
      }
      • Optional name?: string
      • Optional remove?: boolean
      • Optional size?: number

    Returns Promise<string>

  • Update user pmi settings

    Parameters

    • settings: {
          accessCode: string;
          allowJoinAtAnyTime: boolean;
          useAccessCode: boolean;
          useLocalAutoRecord: boolean;
          useMuteAudioOnJoin: boolean;
          useOwnerVideo: boolean;
          useParticipantsVideo: boolean;
          useWaitingRoom: boolean;
      }
      • accessCode: string
      • allowJoinAtAnyTime: boolean
      • useAccessCode: boolean
      • useLocalAutoRecord: boolean
      • useMuteAudioOnJoin: boolean
      • useOwnerVideo: boolean
      • useParticipantsVideo: boolean
      • useWaitingRoom: boolean

    Returns Promise<UserPmiSettings>

  • Returns {
        authToken: string;
        email: string;
        nickname: string;
        pmi: string;
        username: string;
        webRTCMetricsServerDescription?: RTCMetricsServerDescription;
    }

    • authToken: string
    • email: string
    • nickname: string
    • pmi: string
    • username: string
    • Optional webRTCMetricsServerDescription?: RTCMetricsServerDescription
  • Parameters

    • data: Uint8Array

    Returns string

  • This method is recommended for using to generate attachment id before sending. Sending and downloading attachments may not work with other generating options.

    Returns string

    string of 36 ASCII characters

  • Parameters

    • str: string

    Returns number[]