@flashphoner/sfusdk 2.0.277 → 2.0.279
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.version +1 -1
- package/dist/sdk/constants.d.ts +137 -1
- package/dist/sdk/constants.js +136 -0
- package/dist/sdk/constants.js.map +1 -1
- package/dist/sdk/room-extended.d.ts +154 -0
- package/dist/sdk/room-extended.js +154 -0
- package/dist/sdk/room-extended.js.map +1 -1
- package/dist/sdk/room.d.ts +41 -0
- package/dist/sdk/room.js +41 -0
- package/dist/sdk/room.js.map +1 -1
- package/dist/sdk/sfu-extended.d.ts +565 -91
- package/dist/sdk/sfu-extended.js +694 -214
- package/dist/sdk/sfu-extended.js.map +1 -1
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +78 -0
- package/docs/assets/icons.js +15 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +59 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1412 -0
- package/docs/classes/BitrateTest.BitrateTest.html +11 -0
- package/docs/classes/BitrateTest.PacedSender.html +13 -0
- package/docs/classes/connection.Connection.html +15 -0
- package/docs/classes/logger.default.html +14 -0
- package/docs/classes/notifier.Notifier.html +7 -0
- package/docs/classes/reset_password_handler.ResetPasswordHandler.html +4 -0
- package/docs/classes/room.Room.html +73 -0
- package/docs/classes/room_extended.RoomExtended.html +172 -0
- package/docs/classes/sending_attachments_handler.SendingAttachmentsHandler.html +7 -0
- package/docs/classes/sfu.Sfu.html +18 -0
- package/docs/classes/sfu_extended.SfuExtended.html +319 -0
- package/docs/classes/webrtc_stats.WebRTCStats.html +11 -0
- package/docs/enums/constants.AttachmentState.html +5 -0
- package/docs/enums/constants.AuthenticationStatus.html +2 -0
- package/docs/enums/constants.ChannelSendPolicy.html +4 -0
- package/docs/enums/constants.ChatError.html +15 -0
- package/docs/enums/constants.ChatReceivePolicy.html +4 -0
- package/docs/enums/constants.ChatSectionsError.html +2 -0
- package/docs/enums/constants.ChatType.html +3 -0
- package/docs/enums/constants.ConferenceType.html +4 -0
- package/docs/enums/constants.ConnectionType.html +5 -0
- package/docs/enums/constants.ContactError.html +2 -0
- package/docs/enums/constants.DeliveryStatus.html +4 -0
- package/docs/enums/constants.InternalApi.html +146 -0
- package/docs/enums/constants.MeetingSyncEvent.html +21 -0
- package/docs/enums/constants.MessageAttachmentMediaType.html +3 -0
- package/docs/enums/constants.MessageAttachmentType.html +3 -0
- package/docs/enums/constants.MessageState.html +10 -0
- package/docs/enums/constants.MessageTargetEntityType.html +4 -0
- package/docs/enums/constants.Operations.html +79 -0
- package/docs/enums/constants.ParticipantRole.html +4 -0
- package/docs/enums/constants.RemoteSdpType.html +4 -0
- package/docs/enums/constants.RoomError.html +14 -0
- package/docs/enums/constants.RoomEvent.html +91 -0
- package/docs/enums/constants.RoomState.html +6 -0
- package/docs/enums/constants.SfuEvent.html +93 -0
- package/docs/enums/constants.SortOrder.html +3 -0
- package/docs/enums/constants.SpaceError.html +3 -0
- package/docs/enums/constants.SpaceEvent.html +53 -0
- package/docs/enums/constants.State.html +7 -0
- package/docs/enums/constants.StatsType.html +3 -0
- package/docs/enums/constants.TrackType.html +3 -0
- package/docs/enums/constants.UserInfoError.html +6 -0
- package/docs/enums/constants.UserManagementError.html +11 -0
- package/docs/enums/constants.UserState.html +4 -0
- package/docs/enums/logger.Verbosity.html +6 -0
- package/docs/functions/promises.add.html +1 -0
- package/docs/functions/promises.reject.html +1 -0
- package/docs/functions/promises.resolve.html +1 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +11 -0
- package/docs/interfaces/BitrateTest.BitrateComponentEventBus.html +6 -0
- package/docs/interfaces/BitrateTest.BitrateTestController.html +4 -0
- package/docs/interfaces/BitrateTest.BitrateTestListener.html +2 -0
- package/docs/interfaces/BitrateTest.Sink.html +3 -0
- package/docs/interfaces/room.RemoteTrack.html +13 -0
- package/docs/modules/BitrateTest.html +8 -0
- package/docs/modules/connection.html +2 -0
- package/docs/modules/constants.html +198 -0
- package/docs/modules/logger.html +4 -0
- package/docs/modules/notifier.html +3 -0
- package/docs/modules/promises.html +5 -0
- package/docs/modules/reset_password_handler.html +2 -0
- package/docs/modules/room.html +3 -0
- package/docs/modules/room_extended.html +2 -0
- package/docs/modules/sending_attachments_handler.html +2 -0
- package/docs/modules/sfu.html +2 -0
- package/docs/modules/sfu_extended.html +2 -0
- package/docs/modules/webrtc_stats.html +2 -0
- package/docs/types/BitrateTest.DynamicRate.html +1 -0
- package/docs/types/constants.AddRemoveTracks.html +1 -0
- package/docs/types/constants.AddRemoveTracksSync.html +1 -0
- package/docs/types/constants.AddedRoleToMember.html +1 -0
- package/docs/types/constants.Attachment.html +1 -0
- package/docs/types/constants.AttachmentInfo.html +1 -0
- package/docs/types/constants.AttachmentRequest.html +1 -0
- package/docs/types/constants.AttachmentRequestAck.html +1 -0
- package/docs/types/constants.AttachmentStatus.html +1 -0
- package/docs/types/constants.AttachmentStatusEvent.html +1 -0
- package/docs/types/constants.AuthenticationStatusEvent.html +1 -0
- package/docs/types/constants.BitrateTestStatus.html +1 -0
- package/docs/types/constants.BooleanEvent.html +1 -0
- package/docs/types/constants.Calendar.html +1 -0
- package/docs/types/constants.CalendarEvent.html +1 -0
- package/docs/types/constants.CalendarEventEvent.html +1 -0
- package/docs/types/constants.Chat.html +1 -0
- package/docs/types/constants.ChatLoadedEvent.html +1 -0
- package/docs/types/constants.ChatMap.html +1 -0
- package/docs/types/constants.ChatMessagesCount.html +1 -0
- package/docs/types/constants.ChatMessagesEvent.html +1 -0
- package/docs/types/constants.ChatSearchResultEvent.html +1 -0
- package/docs/types/constants.ChatsEvent.html +1 -0
- package/docs/types/constants.ConnectionDetails.html +1 -0
- package/docs/types/constants.ConnectionFailedEvent.html +1 -0
- package/docs/types/constants.ContactInviteEvent.html +1 -0
- package/docs/types/constants.ContactRemovedEvent.html +1 -0
- package/docs/types/constants.ContactUpdateEvent.html +1 -0
- package/docs/types/constants.ControlMessage.html +1 -0
- package/docs/types/constants.ControlMessageEvent.html +1 -0
- package/docs/types/constants.CreatedRoom.html +1 -0
- package/docs/types/constants.EvictedFromRoom.html +1 -0
- package/docs/types/constants.EvictedSync.html +1 -0
- package/docs/types/constants.FirstAndLastChatMessage.html +1 -0
- package/docs/types/constants.FragmentedMessage.html +1 -0
- package/docs/types/constants.InternalMessage.html +1 -0
- package/docs/types/constants.Invite.html +1 -0
- package/docs/types/constants.JoinedRoom.html +1 -0
- package/docs/types/constants.JoinedRoomSync.html +1 -0
- package/docs/types/constants.LastReadMessageUpdate.html +1 -0
- package/docs/types/constants.LastReadMessageUpdated.html +1 -0
- package/docs/types/constants.LeftMeetingSync.html +1 -0
- package/docs/types/constants.LeftRoom.html +1 -0
- package/docs/types/constants.LoadMessagesWithMentionsResult.html +1 -0
- package/docs/types/constants.MeetingEndedSync.html +1 -0
- package/docs/types/constants.MeetingNameUpdatedSync.html +1 -0
- package/docs/types/constants.MeetingsPreviewEvent.html +1 -0
- package/docs/types/constants.Message.html +1 -0
- package/docs/types/constants.MessageAttachment.html +1 -0
- package/docs/types/constants.MessageAttachmentData.html +1 -0
- package/docs/types/constants.MessageAttachmentsSearchResult.html +1 -0
- package/docs/types/constants.MessageDeleted.html +1 -0
- package/docs/types/constants.MessageDeliveryStatus.html +1 -0
- package/docs/types/constants.MessageEdited.html +1 -0
- package/docs/types/constants.MessageInfo.html +1 -0
- package/docs/types/constants.MessageStatus.html +1 -0
- package/docs/types/constants.MessageStatusEvent.html +1 -0
- package/docs/types/constants.MessageStatusUpdate.html +1 -0
- package/docs/types/constants.MessageTargetEntityId.html +1 -0
- package/docs/types/constants.MessageWithUploadingAttachments.html +1 -0
- package/docs/types/constants.NewChatEvent.html +1 -0
- package/docs/types/constants.NewMeeting.html +1 -0
- package/docs/types/constants.NewSpaceCategoryEvent.html +1 -0
- package/docs/types/constants.NewSpaceChannelEvent.html +1 -0
- package/docs/types/constants.NewSpaceEvent.html +1 -0
- package/docs/types/constants.NewSpaceRoleAdded.html +1 -0
- package/docs/types/constants.NewSpaceThreadEvent.html +1 -0
- package/docs/types/constants.OperationFailed.html +1 -0
- package/docs/types/constants.OperationFailedEvent.html +1 -0
- package/docs/types/constants.Participant.html +1 -0
- package/docs/types/constants.ParticipantAVSMutedEvent.html +1 -0
- package/docs/types/constants.ParticipantConfigEvent.html +1 -0
- package/docs/types/constants.ParticipantRenamed.html +1 -0
- package/docs/types/constants.ParticipantsListEvent.html +1 -0
- package/docs/types/constants.ParticipantsListSyncEvent.html +1 -0
- package/docs/types/constants.PlacedInLobbyEvent.html +1 -0
- package/docs/types/constants.PlacedInWaitingRoomEvent.html +1 -0
- package/docs/types/constants.PublicChannelsEvent.html +1 -0
- package/docs/types/constants.Quality.html +1 -0
- package/docs/types/constants.RemoteSdp.html +1 -0
- package/docs/types/constants.RemoteSdpInfo.html +1 -0
- package/docs/types/constants.RemovedChatEvent.html +1 -0
- package/docs/types/constants.RemovedRoleFromMember.html +1 -0
- package/docs/types/constants.ResetPasswordRequestStatus.html +1 -0
- package/docs/types/constants.RoleAssigned.html +1 -0
- package/docs/types/constants.RolePermissionSectionsEvent.html +1 -0
- package/docs/types/constants.RolesListEvent.html +1 -0
- package/docs/types/constants.RoomAvailable.html +1 -0
- package/docs/types/constants.RoomConfigEvent.html +1 -0
- package/docs/types/constants.RoomExtendedConfig.html +1 -0
- package/docs/types/constants.RoomExtendedParticipantConfig.html +1 -0
- package/docs/types/constants.RoomExtendedParticipantsConfig.html +1 -0
- package/docs/types/constants.RoomExtendedScreenSharingConfig.html +1 -0
- package/docs/types/constants.RoomInfo.html +1 -0
- package/docs/types/constants.RoomMessage.html +1 -0
- package/docs/types/constants.RoomNameUpdated.html +1 -0
- package/docs/types/constants.RoomScreenSharingConfigEvent.html +1 -0
- package/docs/types/constants.SFUMeetingParticipantPreview.html +1 -0
- package/docs/types/constants.SFUMeetingPreview.html +1 -0
- package/docs/types/constants.SfuMessageEvent.html +1 -0
- package/docs/types/constants.SfuSpace.html +1 -0
- package/docs/types/constants.SfuSpaceCategory.html +1 -0
- package/docs/types/constants.SfuSpaceChannel.html +1 -0
- package/docs/types/constants.SfuSpaceChannelAccessRights.html +1 -0
- package/docs/types/constants.SfuSpaceInvite.html +1 -0
- package/docs/types/constants.SfuSpaceMember.html +1 -0
- package/docs/types/constants.SfuSpaceRole.html +1 -0
- package/docs/types/constants.SfuSpaceRolePermission.html +1 -0
- package/docs/types/constants.SfuSpaceRolePermissionSection.html +1 -0
- package/docs/types/constants.SfuSpaceThread.html +1 -0
- package/docs/types/constants.SfuSpaceUserBan.html +1 -0
- package/docs/types/constants.SignUpStatus.html +1 -0
- package/docs/types/constants.SpaceCategoryDeleted.html +1 -0
- package/docs/types/constants.SpaceCategoryUpdated.html +1 -0
- package/docs/types/constants.SpaceChannelDeleted.html +1 -0
- package/docs/types/constants.SpaceChannelMoved.html +1 -0
- package/docs/types/constants.SpaceChannelUpdated.html +1 -0
- package/docs/types/constants.SpaceCreatedEvent.html +1 -0
- package/docs/types/constants.SpaceDeletedEvent.html +1 -0
- package/docs/types/constants.SpaceInviteCreated.html +1 -0
- package/docs/types/constants.SpaceInviteRevoked.html +1 -0
- package/docs/types/constants.SpaceOverviewUpdated.html +1 -0
- package/docs/types/constants.SpaceRoleDeleted.html +1 -0
- package/docs/types/constants.SpaceRoleUpdated.html +1 -0
- package/docs/types/constants.SpaceThreadDeleted.html +1 -0
- package/docs/types/constants.SpaceThreadUpdated.html +1 -0
- package/docs/types/constants.StopScreenSharingEvent.html +1 -0
- package/docs/types/constants.StopTrackEvent.html +1 -0
- package/docs/types/constants.TracksQualityState.html +1 -0
- package/docs/types/constants.UnreadMessagesCountEvent.html +1 -0
- package/docs/types/constants.UnreadMessagesCountUpdate.html +1 -0
- package/docs/types/constants.UpdateChatEvent.html +1 -0
- package/docs/types/constants.UpdateMessagesDeliveryStatusEvent.html +1 -0
- package/docs/types/constants.UploadingAttachmentInfo.html +1 -0
- package/docs/types/constants.User.html +1 -0
- package/docs/types/constants.UserCalendarEvent.html +1 -0
- package/docs/types/constants.UserEmail.html +1 -0
- package/docs/types/constants.UserHostKey.html +1 -0
- package/docs/types/constants.UserHostKeyChangedEvent.html +1 -0
- package/docs/types/constants.UserId.html +1 -0
- package/docs/types/constants.UserInfo.html +1 -0
- package/docs/types/constants.UserInfoChangedEvent.html +1 -0
- package/docs/types/constants.UserInfoEvent.html +1 -0
- package/docs/types/constants.UserJoinedToSpaceEvent.html +1 -0
- package/docs/types/constants.UserLeftSpace.html +1 -0
- package/docs/types/constants.UserListEvent.html +1 -0
- package/docs/types/constants.UserNickname.html +1 -0
- package/docs/types/constants.UserNicknameChangedEvent.html +1 -0
- package/docs/types/constants.UserPassword.html +1 -0
- package/docs/types/constants.UserPhoneNumber.html +1 -0
- package/docs/types/constants.UserPhoneNumberChangedEvent.html +1 -0
- package/docs/types/constants.UserPmiSettings.html +1 -0
- package/docs/types/constants.UserRoomsEvent.html +1 -0
- package/docs/types/constants.UserSpacesEvent.html +1 -0
- package/docs/types/constants.UserSpecificChatInfo.html +1 -0
- package/docs/types/constants.UserTimezone.html +1 -0
- package/docs/types/constants.UserTimezoneChangedEvent.html +1 -0
- package/docs/types/constants.WaitingListEvent.html +1 -0
- package/docs/types/constants.WaitingParticipant.html +1 -0
- package/docs/types/constants.WaitingRoomUpdate.html +1 -0
- package/docs/types/logger.PrefixFunction.html +1 -0
- package/docs/types/notifier.NotifierHandler.html +1 -0
- package/docs/variables/constants.ATTACHMENT_CHUNK_SIZE.html +1 -0
- package/docs/variables/constants.ATTACHMENT_ID_LENGTH.html +1 -0
- package/docs/variables/constants.WS_CONNECTION_TIMEOUT.html +1 -0
- package/docs/variables/constants.WS_PINGS_MISSING_THRESHOLD.html +1 -0
- package/docs/variables/constants.WS_PING_INTERVAL_MS.html +1 -0
- package/docs/variables/promises.default.html +1 -0
- package/package.json +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddedRoleToMember, Attachment, AttachmentRequest, AttachmentStatus, Calendar, CalendarEvent, SfuSpaceCategory, ChannelSendPolicy, Chat, ChatMap, ChatMessagesCount, ChatReceivePolicy, ChatType, ConnectionDetails, FirstAndLastChatMessage, InternalMessage, Invite, LastReadMessageUpdated, LoadMessagesWithMentionsResult, Message, MessageAttachment, MessageAttachmentData, MessageAttachmentMediaType, MessageAttachmentsSearchResult, MessageStatus, RoomInfo, SfuEvent, SignUpStatus, SortOrder, SfuSpace, SfuSpaceRole, State, User, UserEmail, UserHostKey, UserId, UserInfo, UserNickname, UserPassword, UserPhoneNumber, UserPmiSettings, UserSpecificChatInfo, UserTimezone, SfuSpaceInvite, SfuSpaceChannel, SpaceRoleDeleted, RemovedRoleFromMember, SfuSpaceThread, SpaceChannelUpdated, SfuSpaceRolePermissionSection, SpaceRoleUpdated, SpaceChannelMoved, SpaceEvent, MessageTargetEntityType, MessageTargetEntityId,
|
|
1
|
+
import { AddedRoleToMember, Attachment, AttachmentRequest, AttachmentStatus, Calendar, CalendarEvent, SfuSpaceCategory, ChannelSendPolicy, Chat, ChatMap, ChatMessagesCount, ChatReceivePolicy, ChatType, ConnectionDetails, FirstAndLastChatMessage, InternalMessage, Invite, LastReadMessageUpdated, LoadMessagesWithMentionsResult, Message, MessageAttachment, MessageAttachmentData, MessageAttachmentMediaType, MessageAttachmentsSearchResult, MessageStatus, RoomInfo, SfuEvent, SignUpStatus, SortOrder, SfuSpace, SfuSpaceRole, State, User, UserEmail, UserHostKey, UserId, UserInfo, UserNickname, UserPassword, UserPhoneNumber, UserPmiSettings, UserSpecificChatInfo, UserTimezone, SfuSpaceInvite, SfuSpaceChannel, SpaceRoleDeleted, RemovedRoleFromMember, SfuSpaceThread, SpaceChannelUpdated, SfuSpaceRolePermissionSection, SpaceRoleUpdated, SpaceChannelMoved, SpaceEvent, MessageTargetEntityType, MessageTargetEntityId, MeetingSyncEvent, UnreadMessagesCountEvent } from "./constants";
|
|
2
2
|
import { RoomExtended } from "./room-extended";
|
|
3
3
|
import { SendingAttachmentsHandler } from "./sending-attachments-handler";
|
|
4
4
|
import { PrefixFunction, Verbosity } from "./logger";
|
|
@@ -8,6 +8,18 @@ declare type EventUnion = SfuEvent | SpaceEvent | MeetingSyncEvent;
|
|
|
8
8
|
export declare class SfuExtended {
|
|
9
9
|
#private;
|
|
10
10
|
constructor(logLevel?: Verbosity, prefix?: PrefixFunction, log?: any);
|
|
11
|
+
/**
|
|
12
|
+
* Connects the user to the server.
|
|
13
|
+
*
|
|
14
|
+
* The user can connect using either a username and password or an authToken.
|
|
15
|
+
*
|
|
16
|
+
* Once the connection is successful, the {@link state} will change to {@link State.AUTHENTICATED}.
|
|
17
|
+
* After that, the sfu-sdk will emit the event {@link SfuEvent.CONNECTED}.
|
|
18
|
+
*
|
|
19
|
+
* @param options.username - The user's username (optional if `authToken` is provided).
|
|
20
|
+
* @param options.password - The user's password (optional if `authToken` is provided).
|
|
21
|
+
* @param options.authToken - The authentication token for direct login (optional if `username` and `password` are provided).
|
|
22
|
+
*/
|
|
11
23
|
connect(options: {
|
|
12
24
|
url: string;
|
|
13
25
|
username?: UserId;
|
|
@@ -27,23 +39,76 @@ export declare class SfuExtended {
|
|
|
27
39
|
pmi: string;
|
|
28
40
|
authToken: string;
|
|
29
41
|
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Method to disconnect from the server
|
|
44
|
+
*
|
|
45
|
+
* When disconnecting, user leaves all active rooms
|
|
46
|
+
*
|
|
47
|
+
* {@link state} changed to {@link State.DISCONNECTED | DISCONNECTED}
|
|
48
|
+
*/
|
|
49
|
+
disconnect(): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Sign up for new users
|
|
52
|
+
*
|
|
53
|
+
* Works in a separate connection
|
|
54
|
+
*/
|
|
30
55
|
signUp(options: {
|
|
31
56
|
url: string;
|
|
32
57
|
timeout?: number;
|
|
33
58
|
email: string;
|
|
34
59
|
password: string;
|
|
35
60
|
}): Promise<SignUpStatus>;
|
|
61
|
+
/**
|
|
62
|
+
* Reset password
|
|
63
|
+
*
|
|
64
|
+
* When calls, returns {@link ResetPasswordHandler} then need to call {@link ResetPasswordHandler.resetPassword} to reset the password
|
|
65
|
+
*/
|
|
36
66
|
resetPassword(options: {
|
|
37
67
|
url: string;
|
|
38
68
|
timeout?: number;
|
|
39
69
|
email: string;
|
|
40
70
|
}): Promise<ResetPasswordHandler>;
|
|
71
|
+
/**
|
|
72
|
+
* Remove user (internal using)
|
|
73
|
+
*/
|
|
41
74
|
removeUser(options: {
|
|
42
75
|
url: string;
|
|
43
76
|
timeout?: number;
|
|
44
77
|
id: string;
|
|
45
78
|
}): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Logout from app
|
|
81
|
+
*/
|
|
46
82
|
logout(): Promise<LastReadMessageUpdated>;
|
|
83
|
+
/**
|
|
84
|
+
* Load messages for Direct chat | Channel | Thread
|
|
85
|
+
*
|
|
86
|
+
* @param params.timeFrame to load by start date to end date. For load all messages used with start = 0, end = -1.
|
|
87
|
+
* @param params.boundaries to load messages by specifying a particular message using its date,
|
|
88
|
+
* along with the number of messages above and below it. Upper limit includes message with date dateMark.
|
|
89
|
+
*/
|
|
90
|
+
loadMessages(params: {
|
|
91
|
+
targetEntityType: MessageTargetEntityType;
|
|
92
|
+
targetEntityId: MessageTargetEntityId;
|
|
93
|
+
timeFrame?: {
|
|
94
|
+
start: number;
|
|
95
|
+
end: number;
|
|
96
|
+
limit?: number;
|
|
97
|
+
};
|
|
98
|
+
boundaries?: {
|
|
99
|
+
dateMark: number;
|
|
100
|
+
lowerLimit: number;
|
|
101
|
+
upperLimit: number;
|
|
102
|
+
};
|
|
103
|
+
}): Promise<Message[]>;
|
|
104
|
+
/**
|
|
105
|
+
* Send a message to a Direct chat | Channel | Thread
|
|
106
|
+
*
|
|
107
|
+
* Members will receive {@link SfuEvent.MESSAGE} with {@link Message}
|
|
108
|
+
*
|
|
109
|
+
* @param msg.parentId to send reply message
|
|
110
|
+
* @param msg.to to send a private message
|
|
111
|
+
*/
|
|
47
112
|
sendMessage(msg: {
|
|
48
113
|
body?: string;
|
|
49
114
|
to?: string;
|
|
@@ -53,43 +118,165 @@ export declare class SfuExtended {
|
|
|
53
118
|
attachments?: Array<MessageAttachment>;
|
|
54
119
|
}): Promise<MessageStatus>;
|
|
55
120
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
121
|
+
* Edit a message in a Direct chat | Channel | Thread
|
|
122
|
+
*
|
|
123
|
+
* Members will receive {@link SfuEvent.CHAT_MESSAGE_EDITED} with {@link MessageEdited}
|
|
124
|
+
*
|
|
125
|
+
* @param msg.attachmentsToSend to add attachments to sent message
|
|
126
|
+
* @param msg.attachmentIdsToDelete to send a private message
|
|
127
|
+
*/
|
|
128
|
+
editMessage(msg: {
|
|
129
|
+
targetEntityType: MessageTargetEntityType;
|
|
130
|
+
targetEntityId: MessageTargetEntityId;
|
|
131
|
+
messageId: string;
|
|
132
|
+
body: string;
|
|
133
|
+
attachmentsToSend?: Array<MessageAttachment>;
|
|
134
|
+
attachmentIdsToDelete?: string[];
|
|
135
|
+
}): Promise<MessageStatus>;
|
|
136
|
+
/**
|
|
137
|
+
* Delete a message in a Direct chat | Channel | Thread
|
|
138
|
+
*
|
|
139
|
+
* The message body will be changed to an empty string.
|
|
140
|
+
* The {@link Message.status} will be changed to {@link MessageState.DELETED}
|
|
141
|
+
*
|
|
142
|
+
* Attachments will be removed.
|
|
143
|
+
*
|
|
144
|
+
* Members will receive {@link SfuEvent.CHAT_MESSAGE_DELETED} with {@link MessageDeleted}
|
|
145
|
+
*/
|
|
146
|
+
deleteMessage(msg: {
|
|
147
|
+
targetEntityType: MessageTargetEntityType;
|
|
148
|
+
targetEntityId: MessageTargetEntityId;
|
|
149
|
+
messageId: string;
|
|
150
|
+
}): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* Mark message as read in a Direct chat | Channel | Thread
|
|
153
|
+
*
|
|
154
|
+
* In targetEntity will change lastReadMessageId and lastReadMessageDate
|
|
155
|
+
*
|
|
156
|
+
* All unread messages with a {@link Message.date} earlier than or equal to the marked one will be marked as read.
|
|
157
|
+
* The sender of each message will receive {@link SfuEvent.UPDATE_MESSAGES_DELIVERY_STATUS}
|
|
158
|
+
* with {@link UpdateMessagesDeliveryStatusEvent} and {@link Message.deliveryStatus} will be changed at the server side to {@link DeliveryStatus.READ}.
|
|
159
|
+
*/
|
|
63
160
|
markMessageRead(msg: {
|
|
64
161
|
id: string;
|
|
65
162
|
targetEntityType: MessageTargetEntityType;
|
|
66
163
|
targetEntityId: MessageTargetEntityId;
|
|
67
164
|
}): Promise<LastReadMessageUpdated>;
|
|
165
|
+
/**
|
|
166
|
+
* Mark message as unread in a Direct chat | Channel | Thread
|
|
167
|
+
*
|
|
168
|
+
* In targetEntity will change lastReadMessageId and lastReadMessageDate. {@link Message.deliveryStatus}
|
|
169
|
+
*
|
|
170
|
+
* {@link Message.deliveryStatus} will not be changed at the server side. Senders will not receive events,
|
|
171
|
+
* however if the previous lastReadMessageDate is earlier than the updated value,
|
|
172
|
+
* the senders of those messages will receive {@link SfuEvent.UPDATE_MESSAGES_DELIVERY_STATUS}
|
|
173
|
+
* with {@link UpdateMessagesDeliveryStatusEvent} and {@link Message.deliveryStatus} will be changed at the server side to {@link DeliveryStatus.READ}.
|
|
174
|
+
*/
|
|
68
175
|
markMessageUnread(msg: {
|
|
69
176
|
id: string;
|
|
70
177
|
targetEntityType: MessageTargetEntityType;
|
|
71
178
|
targetEntityId: MessageTargetEntityId;
|
|
72
179
|
}): Promise<LastReadMessageUpdated>;
|
|
180
|
+
/**
|
|
181
|
+
* Get messages count in entity from {@link MessageTargetEntityType}
|
|
182
|
+
*/
|
|
183
|
+
getMessagesCount(options: {
|
|
184
|
+
targetEntityType: MessageTargetEntityType;
|
|
185
|
+
targetEntityId: MessageTargetEntityId;
|
|
186
|
+
}): Promise<ChatMessagesCount>;
|
|
187
|
+
/**
|
|
188
|
+
* Get first message and last message in entity from {@link MessageTargetEntityType}
|
|
189
|
+
*/
|
|
190
|
+
getFirstAndLastMessage(options: {
|
|
191
|
+
targetEntityType: MessageTargetEntityType;
|
|
192
|
+
targetEntityId: MessageTargetEntityId;
|
|
193
|
+
}): Promise<FirstAndLastChatMessage>;
|
|
194
|
+
/**
|
|
195
|
+
* Get count of unread messages in entity from {@link MessageTargetEntityType}
|
|
196
|
+
*/
|
|
197
|
+
getUnreadMessagesCount(options: {
|
|
198
|
+
targetEntityType: MessageTargetEntityType;
|
|
199
|
+
targetEntityId: MessageTargetEntityId;
|
|
200
|
+
}): Promise<UnreadMessagesCountEvent>;
|
|
201
|
+
/**
|
|
202
|
+
* This method is recommended for using to generate attachment id before sending.
|
|
203
|
+
* Sending and downloading attachments may not work with other generating options.
|
|
204
|
+
* @return string of 36 ASCII characters
|
|
205
|
+
**/
|
|
206
|
+
static generateAttachmentId(): string;
|
|
207
|
+
/**
|
|
208
|
+
* Get handler for send or cancel sending attachments
|
|
209
|
+
*
|
|
210
|
+
* Can't cancel sent attachment
|
|
211
|
+
*/
|
|
212
|
+
getSendingAttachmentsHandler(attachments: Array<MessageAttachmentData>, messageId: string): SendingAttachmentsHandler;
|
|
213
|
+
/**
|
|
214
|
+
* Load attachment from server
|
|
215
|
+
*
|
|
216
|
+
* On client side should receive {@link SfuEvent.MESSAGE_ATTACHMENT_STATE} with {@link AttachmentStatus} to show progress
|
|
217
|
+
*/
|
|
218
|
+
getMessageAttachment(attachment: AttachmentRequest): Promise<Attachment>;
|
|
219
|
+
/**
|
|
220
|
+
* Get all users from server
|
|
221
|
+
*/
|
|
73
222
|
getUserList(): Promise<User[]>;
|
|
223
|
+
/**
|
|
224
|
+
* Invite user to contacts
|
|
225
|
+
*
|
|
226
|
+
* UserId must be passed if user exist. That user will receive {@link SfuEvent.CONTACT_INVITE} with {@link Invite}
|
|
227
|
+
*
|
|
228
|
+
* UserEmail must be passed if there is no such user yet. In this case user will be created at the server side with {@link UserState.PENDING_REGISTRATION} and default parameters
|
|
229
|
+
*/
|
|
230
|
+
inviteContact(invite: {
|
|
231
|
+
to: UserId | UserEmail;
|
|
232
|
+
}): Promise<User>;
|
|
233
|
+
/**
|
|
234
|
+
* Add contact to favourites
|
|
235
|
+
*
|
|
236
|
+
* {@link User.favourite} will be changed to true at the server side
|
|
237
|
+
*/
|
|
238
|
+
addContactToFavourites(contact: {
|
|
239
|
+
id: UserId;
|
|
240
|
+
}): Promise<User>;
|
|
241
|
+
/**
|
|
242
|
+
* Remove contact from favourites
|
|
243
|
+
*
|
|
244
|
+
* {@link User.favourite} will be changed to false at the server side
|
|
245
|
+
*/
|
|
246
|
+
removeContactFromFavourites(contact: {
|
|
247
|
+
id: UserId;
|
|
248
|
+
}): Promise<User>;
|
|
249
|
+
/**
|
|
250
|
+
* Confirm contact
|
|
251
|
+
*
|
|
252
|
+
* {@link User.confirmed} will be changed to true for both users.
|
|
253
|
+
*
|
|
254
|
+
* @param invite.from - user with that userId will receive {@link SfuEvent.CONTACT_UPDATE} with {@link User}
|
|
255
|
+
*/
|
|
256
|
+
confirmContact(invite: {
|
|
257
|
+
id: string;
|
|
258
|
+
from: UserId;
|
|
259
|
+
to: UserId;
|
|
260
|
+
}): Promise<User>;
|
|
261
|
+
/**
|
|
262
|
+
* Confirm contact
|
|
263
|
+
*
|
|
264
|
+
* {@link User.confirmed} will be changed to true for both users.
|
|
265
|
+
*
|
|
266
|
+
* @param contact.id - user with that userId will receive {@link SfuEvent.CONTACT_REMOVED} with {@link User}
|
|
267
|
+
*/
|
|
268
|
+
removeContact(contact: {
|
|
269
|
+
id: UserId;
|
|
270
|
+
}): Promise<User>;
|
|
271
|
+
/**
|
|
272
|
+
* Get all user calendar events
|
|
273
|
+
*/
|
|
74
274
|
getUserCalendar(): Promise<Calendar>;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
useAccessCode: boolean;
|
|
81
|
-
useWaitingRoom: boolean;
|
|
82
|
-
useOwnerVideo: boolean;
|
|
83
|
-
useParticipantsVideo: boolean;
|
|
84
|
-
accessCode: string;
|
|
85
|
-
}): Promise<UserPmiSettings>;
|
|
86
|
-
getUserInfo(): Promise<UserInfo>;
|
|
87
|
-
changeUserEmail(email: UserEmail): Promise<void>;
|
|
88
|
-
changeUserPassword(currentPassword: UserPassword, newPassword: UserPassword): Promise<void>;
|
|
89
|
-
changeUserNickname(nickname: UserNickname): Promise<void>;
|
|
90
|
-
changeUserPhoneNumber(phoneNumber: UserPhoneNumber): Promise<void>;
|
|
91
|
-
changeUserHostKey(hostKey: UserHostKey): Promise<void>;
|
|
92
|
-
changeUserTimezone(timezone: UserTimezone): Promise<void>;
|
|
275
|
+
/**
|
|
276
|
+
* Add calendar event
|
|
277
|
+
*
|
|
278
|
+
* @param event.usePMI - if true then user PMI settings will be updated and user will receive {@link SfuEvent.UPDATE_USER_PMI_SETTINGS} with {@link UserPmiSettings}
|
|
279
|
+
*/
|
|
93
280
|
addCalendarEvent(event: {
|
|
94
281
|
title: string;
|
|
95
282
|
description: string;
|
|
@@ -108,6 +295,11 @@ export declare class SfuExtended {
|
|
|
108
295
|
removeCalendarEvent(event: {
|
|
109
296
|
id: string;
|
|
110
297
|
}): Promise<CalendarEvent>;
|
|
298
|
+
/**
|
|
299
|
+
* Update calendar event
|
|
300
|
+
*
|
|
301
|
+
* @param event.usePMI - if true then user PMI settings will be updated and user will receive {@link SfuEvent.UPDATE_USER_PMI_SETTINGS} with {@link UserPmiSettings}
|
|
302
|
+
*/
|
|
111
303
|
updateCalendarEvent(event: {
|
|
112
304
|
id: string;
|
|
113
305
|
title: string;
|
|
@@ -124,43 +316,63 @@ export declare class SfuExtended {
|
|
|
124
316
|
useMuteAudioOnJoin: boolean;
|
|
125
317
|
useLocalAutoRecord: boolean;
|
|
126
318
|
}): Promise<CalendarEvent>;
|
|
127
|
-
|
|
319
|
+
/**
|
|
320
|
+
* Get user pmi settings
|
|
321
|
+
*
|
|
322
|
+
* Used for create meetings
|
|
323
|
+
*/
|
|
324
|
+
getUserPmiSettings(): Promise<UserPmiSettings>;
|
|
325
|
+
/**
|
|
326
|
+
* Update user pmi settings
|
|
327
|
+
*/
|
|
328
|
+
updateUserPmiSettings(settings: {
|
|
329
|
+
allowJoinAtAnyTime: boolean;
|
|
330
|
+
useMuteAudioOnJoin: boolean;
|
|
331
|
+
useLocalAutoRecord: boolean;
|
|
332
|
+
useAccessCode: boolean;
|
|
333
|
+
useWaitingRoom: boolean;
|
|
334
|
+
useOwnerVideo: boolean;
|
|
335
|
+
useParticipantsVideo: boolean;
|
|
336
|
+
accessCode: string;
|
|
337
|
+
}): Promise<UserPmiSettings>;
|
|
338
|
+
/**
|
|
339
|
+
* Get user info
|
|
340
|
+
*
|
|
341
|
+
* Usually used to display profile info
|
|
342
|
+
*/
|
|
343
|
+
getUserInfo(): Promise<UserInfo>;
|
|
344
|
+
/**
|
|
345
|
+
* Change user email
|
|
346
|
+
*
|
|
347
|
+
* Users will receive {@link SfuEvent.CONTACT_UPDATED} with changed email
|
|
348
|
+
*/
|
|
349
|
+
changeUserEmail(email: UserEmail): Promise<void>;
|
|
350
|
+
changeUserPassword(currentPassword: UserPassword, newPassword: UserPassword): Promise<void>;
|
|
351
|
+
/**
|
|
352
|
+
* Change user email
|
|
353
|
+
*
|
|
354
|
+
* Users will receive {@link SfuEvent.CONTACT_UPDATED} with changed nickname
|
|
355
|
+
*/
|
|
356
|
+
changeUserNickname(nickname: UserNickname): Promise<void>;
|
|
357
|
+
changeUserPhoneNumber(phoneNumber: UserPhoneNumber): Promise<void>;
|
|
358
|
+
changeUserHostKey(hostKey: UserHostKey): Promise<void>;
|
|
359
|
+
changeUserTimezone(timezone: UserTimezone): Promise<void>;
|
|
360
|
+
/**
|
|
361
|
+
* @deprecated
|
|
362
|
+
*/
|
|
128
363
|
getPublicChannels(): Promise<ChatMap>;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
loadMessages(params: {
|
|
133
|
-
targetEntityType: MessageTargetEntityType;
|
|
134
|
-
targetEntityId: MessageTargetEntityId;
|
|
135
|
-
timeFrame?: {
|
|
136
|
-
start: number;
|
|
137
|
-
end: number;
|
|
138
|
-
limit?: number;
|
|
139
|
-
};
|
|
140
|
-
boundaries?: {
|
|
141
|
-
dateMark: number;
|
|
142
|
-
lowerLimit: number;
|
|
143
|
-
upperLimit: number;
|
|
144
|
-
};
|
|
145
|
-
}): Promise<Message[]>;
|
|
364
|
+
/**
|
|
365
|
+
* @deprecated
|
|
366
|
+
*/
|
|
146
367
|
searchChatMessages(params: {
|
|
147
368
|
chatId: string;
|
|
148
369
|
searchString: string;
|
|
149
370
|
searchId?: string;
|
|
150
371
|
limit?: number;
|
|
151
372
|
}): Promise<Message[]>;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}): Promise<ChatMessagesCount>;
|
|
156
|
-
getFirstAndLastMessage(options: {
|
|
157
|
-
targetEntityType: MessageTargetEntityType;
|
|
158
|
-
targetEntityId: MessageTargetEntityId;
|
|
159
|
-
}): Promise<FirstAndLastChatMessage>;
|
|
160
|
-
getUnreadMessagesCount(options: {
|
|
161
|
-
targetEntityType: MessageTargetEntityType;
|
|
162
|
-
targetEntityId: MessageTargetEntityId;
|
|
163
|
-
}): Promise<UnreadMessagesCountEvent>;
|
|
373
|
+
/**
|
|
374
|
+
* @deprecated
|
|
375
|
+
*/
|
|
164
376
|
searchMessageAttachments(params: {
|
|
165
377
|
chatId?: string;
|
|
166
378
|
attachmentsType?: MessageAttachmentMediaType;
|
|
@@ -178,6 +390,9 @@ export declare class SfuExtended {
|
|
|
178
390
|
searchString?: string;
|
|
179
391
|
sortOrder: SortOrder;
|
|
180
392
|
}): Promise<MessageAttachmentsSearchResult>;
|
|
393
|
+
/**
|
|
394
|
+
* @deprecated
|
|
395
|
+
*/
|
|
181
396
|
loadMessagesWithMentions(params: {
|
|
182
397
|
chatId?: string;
|
|
183
398
|
userTag: string;
|
|
@@ -193,6 +408,24 @@ export declare class SfuExtended {
|
|
|
193
408
|
};
|
|
194
409
|
sortOrder: SortOrder;
|
|
195
410
|
}): Promise<LoadMessagesWithMentionsResult>;
|
|
411
|
+
/**
|
|
412
|
+
* Get chats.
|
|
413
|
+
*
|
|
414
|
+
* To work with messages in the chat, you need to use {@link MessageTargetEntityType.CHAT}
|
|
415
|
+
*/
|
|
416
|
+
getUserChats(): Promise<ChatMap>;
|
|
417
|
+
loadChat(chat: {
|
|
418
|
+
id: string;
|
|
419
|
+
}): Promise<Chat>;
|
|
420
|
+
/**
|
|
421
|
+
* Create chat
|
|
422
|
+
*
|
|
423
|
+
* @param chat.members - these members will receive {@link SfuEvent.NEW_CHAT} with {@link UserSpecificChatInfo}
|
|
424
|
+
* @param chat.type - @deprecated
|
|
425
|
+
* @param chat.channelSendPolicy - @deprecated
|
|
426
|
+
* @param chat.sendPermissionList - @deprecated
|
|
427
|
+
* @param chat.allowedToAddExternalUser - @deprecated
|
|
428
|
+
*/
|
|
196
429
|
createChat(chat: {
|
|
197
430
|
id?: string;
|
|
198
431
|
name?: string;
|
|
@@ -204,51 +437,55 @@ export declare class SfuExtended {
|
|
|
204
437
|
sendPermissionList?: Array<string>;
|
|
205
438
|
allowedToAddExternalUser?: boolean;
|
|
206
439
|
}): Promise<UserSpecificChatInfo>;
|
|
440
|
+
/**
|
|
441
|
+
* Delete chat
|
|
442
|
+
*
|
|
443
|
+
* Chat members will receive {@link SfuEvent.CHAT_DELETED} with {@link UserSpecificChatInfo}
|
|
444
|
+
*
|
|
445
|
+
* If a direct meeting was started, it will end, and chat participants will receive {@link MeetingSyncEvent.MEETING_ENDED_SYNC} with {@link MeetingEndedSync}.
|
|
446
|
+
*/
|
|
207
447
|
deleteChat(chat: {
|
|
208
448
|
id: string;
|
|
209
449
|
}): Promise<void>;
|
|
450
|
+
/**
|
|
451
|
+
* Update chat
|
|
452
|
+
*
|
|
453
|
+
* Chat members will receive {@link SfuEvent.CHAT_UPDATED} with {@link UserSpecificChatInfo}
|
|
454
|
+
*/
|
|
210
455
|
renameChat(chat: {
|
|
211
456
|
id: string;
|
|
212
457
|
name: string;
|
|
213
458
|
}): Promise<void>;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
targetEntityType: MessageTargetEntityType;
|
|
224
|
-
targetEntityId: MessageTargetEntityId;
|
|
225
|
-
messageId: string;
|
|
226
|
-
}): Promise<void>;
|
|
459
|
+
/**
|
|
460
|
+
* Add a member to chat
|
|
461
|
+
*
|
|
462
|
+
* Chat members will receive {@link SfuEvent.CHAT_UPDATED} with {@link UserSpecificChatInfo}
|
|
463
|
+
*
|
|
464
|
+
* If a direct meeting was started, user will receive {@link SfuEvent.NEW_MEETING} with {@link NewMeeting}.
|
|
465
|
+
*
|
|
466
|
+
* @param chat.member - user will receive {@link SfuEvent.NEW_CHAT} with {@link UserSpecificChatInfo}.
|
|
467
|
+
*/
|
|
227
468
|
addMemberToChat(chat: {
|
|
228
469
|
id: string;
|
|
229
470
|
member: UserId;
|
|
230
471
|
}): Promise<UserSpecificChatInfo>;
|
|
472
|
+
/**
|
|
473
|
+
* Remove a member to chat
|
|
474
|
+
*
|
|
475
|
+
* Chat members will receive {@link SfuEvent.CHAT_UPDATED} with {@link UserSpecificChatInfo}
|
|
476
|
+
*
|
|
477
|
+
* If a direct meeting was started and user was , user will receive {@link MeetingSyncEvent.MEETING_ENDED_SYNC} with {@link MeetingEndedSync}.
|
|
478
|
+
* If the user was a participant in the meeting, users will receive {@link RoomEvent.EVICTED} with {@link EvictedFromRoom}.
|
|
479
|
+
*
|
|
480
|
+
* @param chat.member - user will receive {@link SfuEvent.CHAT_DELETED} with {@link UserSpecificChatInfo}.
|
|
481
|
+
*/
|
|
231
482
|
removeMemberFromChat(chat: {
|
|
232
483
|
id: string;
|
|
233
484
|
member: UserId;
|
|
234
485
|
}): Promise<UserSpecificChatInfo>;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
addContactToFavourites(contact: {
|
|
239
|
-
id: UserId;
|
|
240
|
-
}): Promise<User>;
|
|
241
|
-
removeContactFromFavourites(contact: {
|
|
242
|
-
id: UserId;
|
|
243
|
-
}): Promise<User>;
|
|
244
|
-
confirmContact(invite: {
|
|
245
|
-
id: string;
|
|
246
|
-
from: UserId;
|
|
247
|
-
to: UserId;
|
|
248
|
-
}): Promise<User>;
|
|
249
|
-
removeContact(contact: {
|
|
250
|
-
id: UserId;
|
|
251
|
-
}): Promise<User>;
|
|
486
|
+
/**
|
|
487
|
+
* @deprecated
|
|
488
|
+
*/
|
|
252
489
|
updateChannelSendPolicy(channel: {
|
|
253
490
|
id: string;
|
|
254
491
|
channelSendPolicy: ChannelSendPolicy;
|
|
@@ -257,14 +494,23 @@ export declare class SfuExtended {
|
|
|
257
494
|
id: string;
|
|
258
495
|
chatReceivePolicy: ChatReceivePolicy;
|
|
259
496
|
}): Promise<UserSpecificChatInfo>;
|
|
497
|
+
/**
|
|
498
|
+
* @deprecated
|
|
499
|
+
*/
|
|
260
500
|
addChannelSendPermissionListMember(channel: {
|
|
261
501
|
id: string;
|
|
262
502
|
member: UserId;
|
|
263
503
|
}): Promise<UserSpecificChatInfo>;
|
|
504
|
+
/**
|
|
505
|
+
* @deprecated
|
|
506
|
+
*/
|
|
264
507
|
removeChannelSendPermissionListMember(channel: {
|
|
265
508
|
id: string;
|
|
266
509
|
member: UserId;
|
|
267
510
|
}): Promise<UserSpecificChatInfo>;
|
|
511
|
+
/**
|
|
512
|
+
* @deprecated
|
|
513
|
+
*/
|
|
268
514
|
updateChatConfiguration(chat: {
|
|
269
515
|
id: string;
|
|
270
516
|
type?: ChatType;
|
|
@@ -272,17 +518,58 @@ export declare class SfuExtended {
|
|
|
272
518
|
sendPermissionList?: Array<string>;
|
|
273
519
|
allowedToAddExternalUser?: boolean;
|
|
274
520
|
}): Promise<UserSpecificChatInfo>;
|
|
521
|
+
/**
|
|
522
|
+
* Used to change {@link UserSpecificChatInfo.favourite} to true
|
|
523
|
+
*/
|
|
275
524
|
addChatToFavourites(chat: {
|
|
276
525
|
id: string;
|
|
277
526
|
}): Promise<UserSpecificChatInfo>;
|
|
527
|
+
/**
|
|
528
|
+
* Used to change {@link UserSpecificChatInfo.favourite} to false
|
|
529
|
+
*/
|
|
278
530
|
removeChatFromFavourites(chat: {
|
|
279
531
|
id: string;
|
|
280
532
|
}): Promise<UserSpecificChatInfo>;
|
|
533
|
+
/**
|
|
534
|
+
* Create room
|
|
535
|
+
*
|
|
536
|
+
* To create with PMI settings, PMI must be specified as the ID.
|
|
537
|
+
*
|
|
538
|
+
* To join, you need to use room.join.
|
|
539
|
+
*
|
|
540
|
+
* @return {@link RoomExtended} with {@link RoomExtended.conferenceType()} that equal {@link ConferenceType.GLOBAL}
|
|
541
|
+
*/
|
|
281
542
|
createRoom(options: {
|
|
282
543
|
name?: string;
|
|
283
544
|
pin?: string;
|
|
284
545
|
id?: string;
|
|
285
546
|
}): Promise<RoomExtended>;
|
|
547
|
+
/**
|
|
548
|
+
* Create channel meeting
|
|
549
|
+
*
|
|
550
|
+
* {@link Room.id()} will be equal channelId
|
|
551
|
+
*
|
|
552
|
+
* @return {@link RoomExtended} with {@link RoomExtended.conferenceType()} that equal {@link ConferenceType.CHANNEL}
|
|
553
|
+
*/
|
|
554
|
+
createChannelMeeting(options: {
|
|
555
|
+
spaceId: string;
|
|
556
|
+
channelId: string;
|
|
557
|
+
}): Promise<RoomExtended>;
|
|
558
|
+
/**
|
|
559
|
+
* Create channel meeting
|
|
560
|
+
*
|
|
561
|
+
* {@link Room.id()} will be equal directChatId
|
|
562
|
+
*
|
|
563
|
+
* @return {@link RoomExtended} with {@link RoomExtended.conferenceType()} that equal {@link ConferenceType.DIRECT}
|
|
564
|
+
*/
|
|
565
|
+
createDirectMeeting(options: {
|
|
566
|
+
directChatId: string;
|
|
567
|
+
}): Promise<RoomExtended>;
|
|
568
|
+
/**
|
|
569
|
+
* Creating a room based on a calendar event created using {@link addCalendarEvent}.
|
|
570
|
+
*
|
|
571
|
+
* To join, you need to use room.join()
|
|
572
|
+
*/
|
|
286
573
|
createRoomFromEvent(event: {
|
|
287
574
|
id: string;
|
|
288
575
|
title: string;
|
|
@@ -299,12 +586,23 @@ export declare class SfuExtended {
|
|
|
299
586
|
useMuteAudioOnJoin: boolean;
|
|
300
587
|
useLocalAutoRecord: boolean;
|
|
301
588
|
}): Promise<RoomExtended>;
|
|
589
|
+
/**
|
|
590
|
+
* Get running rooms
|
|
591
|
+
*/
|
|
302
592
|
loadActiveRooms(): Promise<RoomInfo[]>;
|
|
593
|
+
/**
|
|
594
|
+
* Check and get an available room.
|
|
595
|
+
*
|
|
596
|
+
* To join, you need to use room.join()
|
|
597
|
+
*/
|
|
303
598
|
roomAvailable(options: {
|
|
304
599
|
id: string;
|
|
305
600
|
pin?: string;
|
|
306
601
|
nickname?: string;
|
|
307
602
|
}): Promise<RoomExtended>;
|
|
603
|
+
/**
|
|
604
|
+
* Checks for the existence of a running room.
|
|
605
|
+
*/
|
|
308
606
|
roomExists(options: {
|
|
309
607
|
id: string;
|
|
310
608
|
pin?: string;
|
|
@@ -312,46 +610,120 @@ export declare class SfuExtended {
|
|
|
312
610
|
getRoom(options: {
|
|
313
611
|
id: string;
|
|
314
612
|
}): RoomExtended;
|
|
613
|
+
/**
|
|
614
|
+
* Get user spaces
|
|
615
|
+
*
|
|
616
|
+
* If channel meetings were started, user will receive {@link SfuEvent.USER_MEETINGS} with {@link MeetingsPreviewEvent}.
|
|
617
|
+
*/
|
|
315
618
|
getUserSpaces(): Promise<SfuSpace[]>;
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}): Promise<RoomExtended>;
|
|
619
|
+
/**
|
|
620
|
+
* The space is created with the default category Category1, default channel Channel1 and default role "@everyone".
|
|
621
|
+
*/
|
|
320
622
|
createSpace(space: {
|
|
321
623
|
name: string;
|
|
322
624
|
}): Promise<SfuSpace>;
|
|
625
|
+
/**
|
|
626
|
+
* Update space overview
|
|
627
|
+
*
|
|
628
|
+
* Space members will receive {@link SpaceEvent.SPACE_OVERVIEW_UPDATED} with {@link SpaceOverviewUpdated}
|
|
629
|
+
*/
|
|
323
630
|
updateSpaceOverview(space: {
|
|
324
631
|
id: string;
|
|
325
632
|
name: string;
|
|
326
633
|
}): Promise<void>;
|
|
634
|
+
/**
|
|
635
|
+
* Delete space
|
|
636
|
+
*
|
|
637
|
+
* Space members will receive {@link SpaceEvent.SPACE_DELETED} with {@link SpaceDeletedEvent}
|
|
638
|
+
*
|
|
639
|
+
* If channel meetings were started, users will receive {@link MeetingSyncEvent.MEETING_ENDED_SYNC} with {@link MeetingEndedSync}.
|
|
640
|
+
*/
|
|
327
641
|
deleteSpace(space: {
|
|
328
642
|
id: string;
|
|
329
643
|
}): Promise<string>;
|
|
644
|
+
/**
|
|
645
|
+
* Leave space
|
|
646
|
+
*
|
|
647
|
+
* Space members will receive {@link SpaceEvent.USER_LEFT_SPACE} with {@link UserLeftSpace}
|
|
648
|
+
*
|
|
649
|
+
* After receiving the event, it is necessary to remove the user from the list of members in the space and channels/threads.
|
|
650
|
+
*
|
|
651
|
+
* If channel meetings were started, user will receive {@link MeetingSyncEvent.MEETING_ENDED_SYNC} with {@link MeetingEndedSync}.
|
|
652
|
+
* If the user was a participant in the meeting, users will receive {@link RoomEvent.EVICTED} with {@link EvictedFromRoom}.
|
|
653
|
+
*/
|
|
330
654
|
leaveSpace(space: {
|
|
331
655
|
id: string;
|
|
332
656
|
}): Promise<void>;
|
|
657
|
+
/**
|
|
658
|
+
* Generate space invite
|
|
659
|
+
*
|
|
660
|
+
* If user has permission to create a space invite - generating invite code with 8 symbols.
|
|
661
|
+
* To create invite link - use 'ws:{serverUrl}:{port}/join-space/inviteCode'
|
|
662
|
+
*/
|
|
333
663
|
generateNewSpaceInvite(options: {
|
|
334
664
|
spaceId: string;
|
|
335
665
|
lifespan: number;
|
|
336
666
|
}): Promise<SfuSpaceInvite>;
|
|
667
|
+
/**
|
|
668
|
+
* Removing the space invite
|
|
669
|
+
*/
|
|
337
670
|
revokeSpaceInvite(options: {
|
|
338
671
|
spaceId: string;
|
|
339
672
|
inviteCode: string;
|
|
340
673
|
}): Promise<SfuSpaceInvite>;
|
|
674
|
+
/**
|
|
675
|
+
* Join space by invite code
|
|
676
|
+
*
|
|
677
|
+
* Space members will receive {@link SpaceEvent.USER_JOINED_TO_SPACE} with {@link UserJoinedToSpaceEvent}.
|
|
678
|
+
* On the client side, this user should be added to the list of participants in public channels and threads.
|
|
679
|
+
*
|
|
680
|
+
* If channel meetings were started, user will receive {@link SfuEvent.USER_MEETINGS} with {@link MeetingsPreviewEvent}.
|
|
681
|
+
*/
|
|
341
682
|
joinSpaceByInviteCode(inviteCode: string): Promise<SfuSpace>;
|
|
683
|
+
/**
|
|
684
|
+
* Create space category
|
|
685
|
+
*
|
|
686
|
+
* For space owner/user that has permission to manage categories
|
|
687
|
+
*
|
|
688
|
+
* Space members will receive {@link SpaceEvent.NEW_SPACE_CATEGORY} with {@link NewSpaceCategoryEvent}
|
|
689
|
+
*/
|
|
342
690
|
createSpaceCategory(category: {
|
|
343
691
|
spaceId: string;
|
|
344
692
|
name: string;
|
|
345
693
|
}): Promise<SfuSpaceCategory>;
|
|
694
|
+
/**
|
|
695
|
+
* Delete space category
|
|
696
|
+
*
|
|
697
|
+
* For space owner/category creator/user that has permission to manage categories
|
|
698
|
+
*
|
|
699
|
+
* Space members will receive {@link SpaceEvent.SPACE_CATEGORY_DELETED} with {@link SpaceCategoryDeleted}
|
|
700
|
+
*/
|
|
346
701
|
deleteSpaceCategory(options: {
|
|
347
702
|
spaceId: string;
|
|
348
703
|
categoryId: string;
|
|
349
704
|
}): Promise<SfuSpaceCategory>;
|
|
705
|
+
/**
|
|
706
|
+
* Delete space category
|
|
707
|
+
*
|
|
708
|
+
* For space owner/category creator/user that has permission to manage categories
|
|
709
|
+
*
|
|
710
|
+
* Space members will receive {@link SpaceEvent.SPACE_CATEGORY_UPDATED} with {@link SpaceCategoryUpdated}
|
|
711
|
+
*/
|
|
350
712
|
updateSpaceCategory(options: {
|
|
351
713
|
spaceId: string;
|
|
352
714
|
categoryId: string;
|
|
353
715
|
name: string;
|
|
354
716
|
}): Promise<void>;
|
|
717
|
+
/**
|
|
718
|
+
* Create space channel
|
|
719
|
+
*
|
|
720
|
+
* For space owner/user that has permission to manage channels
|
|
721
|
+
*
|
|
722
|
+
* Channel members will receive {@link SpaceEvent.NEW_SPACE_CHANNEL} with {@link NewSpaceChannelEvent}
|
|
723
|
+
*
|
|
724
|
+
* @param channel.roles - used to create a private channel. Array of role ids or empty array.
|
|
725
|
+
* @param channel.members - used to create a private channel. Array of member ids or empty array.
|
|
726
|
+
*/
|
|
355
727
|
createSpaceChannel(channel: {
|
|
356
728
|
spaceId: string;
|
|
357
729
|
categoryId?: string;
|
|
@@ -360,6 +732,22 @@ export declare class SfuExtended {
|
|
|
360
732
|
roles?: Array<string>;
|
|
361
733
|
members?: Array<string>;
|
|
362
734
|
}): Promise<SfuSpaceChannel>;
|
|
735
|
+
/**
|
|
736
|
+
* Update space channel
|
|
737
|
+
*
|
|
738
|
+
* For space owner/user that has permission to manage channels
|
|
739
|
+
*
|
|
740
|
+
* Channel members will receive {@link SpaceEvent.SPACE_CHANNEL_UPDATED} with {@link SpaceChannelUpdated}
|
|
741
|
+
* In the private channel added members will receive {@link SpaceEvent.NEW_SPACE_CHANNEL} with {@link NewSpaceChannelEvent}.
|
|
742
|
+
* If the channel meeting was started, added members will receive {@link SfuEvent.NEW_MEETING} with {@link NewMeeting}.
|
|
743
|
+
*
|
|
744
|
+
* In the private channel deleted members will receive {@link SpaceEvent.SPACE_CHANNEL_DELETED} with {@link SpaceChannelDeleted}
|
|
745
|
+
* If the channel meeting was started, deleted members will receive {@link MeetingSyncEvent.MEETING_ENDED_SYNC} with {@link MeetingEndedSync}.
|
|
746
|
+
* If the deleted user was a participant in the meeting, users will receive {@link RoomEvent.EVICTED} with {@link EvictedFromRoom}.
|
|
747
|
+
*
|
|
748
|
+
* @param channel.roles - used to create a private channel. Array of role ids or empty array.
|
|
749
|
+
* @param channel.members - used to create a private channel. Array of member ids or empty array.
|
|
750
|
+
*/
|
|
363
751
|
updateSpaceChannel(channel: {
|
|
364
752
|
spaceId: string;
|
|
365
753
|
channelId: string;
|
|
@@ -368,32 +756,74 @@ export declare class SfuExtended {
|
|
|
368
756
|
roles?: Array<string>;
|
|
369
757
|
members?: Array<string>;
|
|
370
758
|
}): Promise<SpaceChannelUpdated>;
|
|
759
|
+
/**
|
|
760
|
+
* Move space channel
|
|
761
|
+
*
|
|
762
|
+
* Channel members will receive {@link SpaceEvent.SPACE_CHANNEL_MOVED} with {@link SpaceChannelMoved}
|
|
763
|
+
*
|
|
764
|
+
* @param channel.categoryId - Specify the identifier of the category to which you want to move the channel, or an empty string to leave the channel uncategorized.
|
|
765
|
+
*/
|
|
371
766
|
moveSpaceChannel(channel: {
|
|
372
767
|
spaceId: string;
|
|
373
768
|
categoryId: string;
|
|
374
769
|
channelId: string;
|
|
375
770
|
}): Promise<SpaceChannelMoved>;
|
|
771
|
+
/**
|
|
772
|
+
* Delete space channel
|
|
773
|
+
*
|
|
774
|
+
* Channel members will receive {@link SpaceEvent.SPACE_CHANNEL_DELETED} with {@link SpaceChannelDeleted}
|
|
775
|
+
*
|
|
776
|
+
* If the channel meeting was started, members will receive {@link MeetingSyncEvent.MEETING_ENDED_SYNC} with {@link MeetingEndedSync}.
|
|
777
|
+
*/
|
|
376
778
|
deleteSpaceChannel(options: {
|
|
377
779
|
spaceId: string;
|
|
378
780
|
channelId: string;
|
|
379
781
|
}): Promise<void>;
|
|
782
|
+
/**
|
|
783
|
+
* Create space thread
|
|
784
|
+
*
|
|
785
|
+
* Thread members will receive {@link SpaceEvent.NEW_SPACE_THREAD} with {@link NewSpaceThreadEvent}
|
|
786
|
+
*/
|
|
380
787
|
createSpaceThread(thread: {
|
|
381
788
|
spaceId: string;
|
|
382
789
|
channelId: string;
|
|
383
790
|
name: string;
|
|
384
791
|
isPrivate: boolean;
|
|
385
792
|
}): Promise<SfuSpaceThread>;
|
|
793
|
+
/**
|
|
794
|
+
* Update space thread
|
|
795
|
+
*
|
|
796
|
+
* For space owner/thread creator
|
|
797
|
+
*
|
|
798
|
+
* Thread members will receive {@link SpaceEvent.SPACE_THREAD_UPDATED} with {@link SpaceThreadUpdated}
|
|
799
|
+
*/
|
|
386
800
|
updateSpaceThread(options: {
|
|
387
801
|
spaceId: string;
|
|
388
802
|
channelId: string;
|
|
389
803
|
threadId: string;
|
|
390
804
|
name: string;
|
|
391
805
|
}): Promise<void>;
|
|
806
|
+
/**
|
|
807
|
+
* Delete space thread
|
|
808
|
+
*
|
|
809
|
+
* For space owner/thread creator
|
|
810
|
+
*
|
|
811
|
+
* Thread members will receive {@link SpaceEvent.SPACE_THREAD_DELETED} with {@link SpaceThreadDeleted}
|
|
812
|
+
*/
|
|
392
813
|
deleteSpaceThread(options: {
|
|
393
814
|
spaceId: string;
|
|
394
815
|
channelId: string;
|
|
395
816
|
threadId: string;
|
|
396
817
|
}): Promise<void>;
|
|
818
|
+
/**
|
|
819
|
+
* Add space role
|
|
820
|
+
*
|
|
821
|
+
* For space owner/user that has permission to manage roles
|
|
822
|
+
*
|
|
823
|
+
* Space members will receive {@link SpaceEvent.NEW_SPACE_ROLE} with {@link NewSpaceRoleAdded}
|
|
824
|
+
*
|
|
825
|
+
* On the client side, a new role must be added to the participants listed in the {@link NewSpaceRoleAdded.members}
|
|
826
|
+
*/
|
|
397
827
|
addSpaceRole(role: {
|
|
398
828
|
spaceId: string;
|
|
399
829
|
name: string;
|
|
@@ -401,6 +831,22 @@ export declare class SfuExtended {
|
|
|
401
831
|
permissions: Array<string>;
|
|
402
832
|
members: Array<string>;
|
|
403
833
|
}): Promise<SfuSpaceRole>;
|
|
834
|
+
/**
|
|
835
|
+
* Update space role
|
|
836
|
+
*
|
|
837
|
+
* For space owner/user that has permission to manage roles
|
|
838
|
+
*
|
|
839
|
+
* Space members will receive {@link SpaceEvent.SPACE_ROLE_UPDATED} with {@link SpaceRoleUpdated}
|
|
840
|
+
*
|
|
841
|
+
* On the client side, a new role must be added to the participants listed in the {@link SpaceRoleUpdated.membersForAddRole}
|
|
842
|
+
* and must be removed from participants listed in the {@link SpaceRoleUpdated.membersForDeleteRole}
|
|
843
|
+
*
|
|
844
|
+
* Participants from whom this role will be removed will receive {@link SpaceEvent.SPACE_CHANNEL_DELETED} with {@link SpaceChannelDeleted} for each channel they were part of because of this role.
|
|
845
|
+
*
|
|
846
|
+
* Participants who are assigned this role will receive {@link SpaceEvent.NEW_SPACE_CHANNEL} with {@link NewSpaceChannelEvent} for each channel that has this role in its access rights.
|
|
847
|
+
*
|
|
848
|
+
* Participants who had the role before the update and still have it afterward will receive {@link SpaceEvent.SPACE_CHANNEL_UPDATED} with {@link SpaceChannelUpdated} for each channel that has this role in its access rights.
|
|
849
|
+
*/
|
|
404
850
|
updateSpaceRole(role: {
|
|
405
851
|
spaceId: string;
|
|
406
852
|
roleId: string;
|
|
@@ -409,22 +855,50 @@ export declare class SfuExtended {
|
|
|
409
855
|
permissions: Array<string>;
|
|
410
856
|
members: Array<string>;
|
|
411
857
|
}): Promise<SpaceRoleUpdated>;
|
|
858
|
+
/**
|
|
859
|
+
* Delete space role
|
|
860
|
+
*
|
|
861
|
+
* For space owner/user that has permission to manage roles
|
|
862
|
+
*
|
|
863
|
+
* Space members will receive {@link SpaceEvent.SPACE_ROLE_DELETED} with {@link SpaceRoleDeleted}
|
|
864
|
+
*
|
|
865
|
+
* On the client side, should remove this role from channel's access rights and update channel members list
|
|
866
|
+
*/
|
|
412
867
|
deleteSpaceRole(options: {
|
|
413
868
|
spaceId: string;
|
|
414
869
|
roleId: string;
|
|
415
870
|
}): Promise<SpaceRoleDeleted>;
|
|
871
|
+
/**
|
|
872
|
+
* Add space role to member
|
|
873
|
+
*
|
|
874
|
+
* For space owner/user that has permission to manage roles
|
|
875
|
+
*
|
|
876
|
+
* Space members will receive {@link SpaceEvent.ADDED_ROLE_TO_MEMBER} with {@link AddedRoleToMember}
|
|
877
|
+
*
|
|
878
|
+
* Member who are assigned this role will receive {@link SpaceEvent.NEW_SPACE_CHANNEL} with {@link NewSpaceChannelEvent} for each channel that has this role in its access rights.
|
|
879
|
+
* Other members of these channels will receive {@link SpaceEvent.SPACE_CHANNEL_UPDATED} with {@link SpaceChannelUpdated}.
|
|
880
|
+
*/
|
|
416
881
|
addRoleToMember(options: {
|
|
417
882
|
spaceId: string;
|
|
418
883
|
roleId: string;
|
|
419
884
|
memberId: string;
|
|
420
885
|
}): Promise<AddedRoleToMember>;
|
|
886
|
+
/**
|
|
887
|
+
* Remove space role from member
|
|
888
|
+
*
|
|
889
|
+
* For space owner/user that has permission to manage roles
|
|
890
|
+
*
|
|
891
|
+
* Space members will receive {@link SpaceEvent.REMOVED_ROLE_FROM_MEMBER} with {@link RemovedRoleFromMember}
|
|
892
|
+
*
|
|
893
|
+
* Participant from whom this role will be removed will receive {@link SpaceEvent.SPACE_CHANNEL_DELETED} with {@link SpaceChannelDeleted} for each channel they were part of because of this role.
|
|
894
|
+
* Other members of these channels will receive {@link SpaceEvent.SPACE_CHANNEL_UPDATED} with {@link SpaceChannelUpdated}.
|
|
895
|
+
*/
|
|
421
896
|
removeRoleFromMember(options: {
|
|
422
897
|
spaceId: string;
|
|
423
898
|
roleId: string;
|
|
424
899
|
memberId: string;
|
|
425
900
|
}): Promise<RemovedRoleFromMember>;
|
|
426
901
|
getRolePermissions(): Promise<SfuSpaceRolePermissionSection[]>;
|
|
427
|
-
disconnect(): Promise<void>;
|
|
428
902
|
user(): {
|
|
429
903
|
username: string;
|
|
430
904
|
email: string;
|