@flashphoner/sfusdk 2.0.316 → 2.0.322
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/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/sdk/constants.d.ts +48 -2
- package/dist/sdk/constants.js +22 -1
- package/dist/sdk/constants.js.map +1 -1
- package/dist/sdk/file-upload.d.ts +4 -0
- package/dist/sdk/file-upload.js +58 -0
- package/dist/sdk/file-upload.js.map +1 -0
- package/dist/sdk/room.d.ts +3 -2
- package/dist/sdk/room.js +4 -2
- package/dist/sdk/room.js.map +1 -1
- package/dist/sdk/sfu-extended.d.ts +62 -1
- package/dist/sdk/sfu-extended.js +184 -0
- package/dist/sdk/sfu-extended.js.map +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/room.Room.html +11 -10
- package/docs/classes/room_extended.RoomExtended.html +14 -13
- package/docs/classes/sfu_extended.SfuExtended.html +125 -99
- package/docs/enums/constants.AttachmentState.html +2 -2
- package/docs/enums/constants.AttachmentType.html +3 -0
- package/docs/enums/constants.AuthenticationStatus.html +2 -2
- package/docs/enums/constants.ChannelSendPolicy.html +2 -2
- package/docs/enums/constants.ChatError.html +2 -2
- package/docs/enums/constants.ChatReceivePolicy.html +2 -2
- package/docs/enums/constants.ChatSectionsError.html +2 -2
- package/docs/enums/constants.ChatType.html +2 -2
- package/docs/enums/constants.ConferenceType.html +2 -2
- package/docs/enums/constants.ConnectionError.html +2 -2
- package/docs/enums/constants.ConnectionType.html +2 -2
- package/docs/enums/constants.ContactError.html +2 -2
- package/docs/enums/constants.DeliveryStatus.html +2 -2
- package/docs/enums/constants.ExamplesError.html +2 -2
- package/docs/enums/constants.ExamplesEvent.html +2 -2
- package/docs/enums/constants.InternalApi.html +7 -2
- package/docs/enums/constants.MeetingSyncEvent.html +11 -11
- package/docs/enums/constants.MessageAttachmentMediaType.html +2 -2
- package/docs/enums/constants.MessageAttachmentType.html +2 -2
- package/docs/enums/constants.MessageState.html +2 -2
- package/docs/enums/constants.MessageTargetEntityType.html +2 -2
- package/docs/enums/constants.MessageType.html +2 -2
- package/docs/enums/constants.NotificationMode.html +2 -2
- package/docs/enums/constants.Operations.html +2 -2
- package/docs/enums/constants.ParticipantRole.html +2 -2
- package/docs/enums/constants.PresenceStatus.html +2 -2
- package/docs/enums/constants.RemoteSdpType.html +2 -2
- package/docs/enums/constants.RoomError.html +2 -2
- package/docs/enums/constants.RoomEvent.html +43 -43
- package/docs/enums/constants.RoomState.html +2 -2
- package/docs/enums/constants.SfuEvent.html +31 -25
- package/docs/enums/constants.SortOrder.html +2 -2
- package/docs/enums/constants.SpaceError.html +2 -2
- package/docs/enums/constants.SpaceEvent.html +38 -38
- package/docs/enums/constants.State.html +2 -2
- package/docs/enums/constants.StatsType.html +2 -2
- package/docs/enums/constants.TrackType.html +2 -2
- package/docs/enums/constants.TransportType.html +3 -0
- package/docs/enums/constants.UserInfoError.html +2 -2
- package/docs/enums/constants.UserManagementError.html +2 -2
- package/docs/functions/file_upload.uploadFile.html +1 -0
- package/docs/interfaces/room.RemoteTrack.html +2 -2
- package/docs/modules/constants.html +7 -0
- package/docs/modules/file_upload.html +2 -0
- package/docs/types/constants.AddRemoveTracks.html +1 -1
- package/docs/types/constants.AddRemoveTracksSync.html +1 -1
- package/docs/types/constants.AddedMembersToThread.html +1 -1
- package/docs/types/constants.AddedRemovedReactionOnMessage.html +1 -1
- package/docs/types/constants.AddedRoleToMember.html +1 -1
- package/docs/types/constants.Attachment.html +1 -1
- package/docs/types/constants.AttachmentInfo.html +1 -1
- package/docs/types/constants.AttachmentListItem.html +1 -0
- package/docs/types/constants.AttachmentListResult.html +1 -0
- package/docs/types/constants.AttachmentRequest.html +1 -1
- package/docs/types/constants.AttachmentRequestAck.html +1 -1
- package/docs/types/constants.AttachmentSizeInfo.html +1 -0
- package/docs/types/constants.AttachmentStatus.html +1 -1
- package/docs/types/constants.AttachmentStatusEvent.html +1 -1
- package/docs/types/constants.AuthenticationStatusEvent.html +1 -1
- package/docs/types/constants.BannedContact.html +1 -1
- package/docs/types/constants.BitrateTestStatus.html +1 -1
- package/docs/types/constants.BooleanEvent.html +1 -1
- package/docs/types/constants.Calendar.html +1 -1
- package/docs/types/constants.CalendarEvent.html +1 -1
- package/docs/types/constants.CalendarEventEvent.html +1 -1
- package/docs/types/constants.ChannelMuted.html +1 -1
- package/docs/types/constants.ChannelNotificationSettingsUpdated.html +1 -1
- package/docs/types/constants.ChannelUnmuted.html +1 -1
- package/docs/types/constants.Chat.html +1 -1
- package/docs/types/constants.ChatIconUpdated.html +1 -0
- package/docs/types/constants.ChatLoadedEvent.html +1 -1
- package/docs/types/constants.ChatMap.html +1 -1
- package/docs/types/constants.ChatMessagesCount.html +1 -1
- package/docs/types/constants.ChatMessagesEvent.html +1 -1
- package/docs/types/constants.ChatMuted.html +1 -1
- package/docs/types/constants.ChatNotificationSettingsUpdated.html +1 -1
- package/docs/types/constants.ChatSearchResultEvent.html +1 -1
- package/docs/types/constants.ChatUnmuted.html +1 -1
- package/docs/types/constants.ChatsEvent.html +1 -1
- package/docs/types/constants.ConnectionDetails.html +1 -1
- package/docs/types/constants.ConnectionFailedEvent.html +1 -1
- package/docs/types/constants.Contact.html +1 -1
- package/docs/types/constants.ContactDeleted.html +1 -1
- package/docs/types/constants.ContactPersonalSettings.html +1 -1
- package/docs/types/constants.ContactPersonalSettingsUpdated.html +1 -1
- package/docs/types/constants.ContactUpdated.html +1 -1
- package/docs/types/constants.ControlMessage.html +1 -1
- package/docs/types/constants.ControlMessageEvent.html +1 -1
- package/docs/types/constants.CreatedRoom.html +1 -1
- package/docs/types/constants.EvictedFromRoom.html +1 -1
- package/docs/types/constants.EvictedSync.html +1 -1
- package/docs/types/constants.ExamplesUser.html +1 -1
- package/docs/types/constants.ExamplesUserEvent.html +1 -1
- package/docs/types/constants.FirstAndLastChatMessage.html +1 -1
- package/docs/types/constants.ForcefullyLeftEvent.html +1 -1
- package/docs/types/constants.FragmentedMessage.html +1 -1
- package/docs/types/constants.FriendInvite.html +1 -1
- package/docs/types/constants.FriendInviteDeleted.html +1 -1
- package/docs/types/constants.InternalMessage.html +1 -1
- package/docs/types/constants.JoinedRoom.html +1 -1
- package/docs/types/constants.JoinedRoomSync.html +1 -1
- package/docs/types/constants.LastReadMessageUpdate.html +1 -1
- package/docs/types/constants.LastReadMessageUpdated.html +1 -1
- package/docs/types/constants.LeftMeetingSync.html +1 -1
- package/docs/types/constants.LeftRoom.html +1 -1
- package/docs/types/constants.LoadMessagesWithMentionsResult.html +1 -1
- package/docs/types/constants.MeetingAddedToHistory.html +1 -1
- package/docs/types/constants.MeetingEndedSync.html +1 -1
- package/docs/types/constants.MeetingHistoryItem.html +1 -1
- package/docs/types/constants.MeetingNameUpdatedSync.html +1 -1
- package/docs/types/constants.MeetingRecordDeleted.html +1 -1
- package/docs/types/constants.MeetingRemovedFromHistory.html +1 -1
- package/docs/types/constants.MeetingsHistoryEvent.html +1 -1
- package/docs/types/constants.MeetingsPreviewEvent.html +1 -1
- package/docs/types/constants.Message.html +1 -1
- package/docs/types/constants.MessageAttachment.html +1 -1
- package/docs/types/constants.MessageAttachmentData.html +1 -1
- package/docs/types/constants.MessageAttachmentsSearchResult.html +1 -1
- package/docs/types/constants.MessageDeleted.html +1 -1
- package/docs/types/constants.MessageDeliveryStatus.html +1 -1
- package/docs/types/constants.MessageEdited.html +1 -1
- package/docs/types/constants.MessageInfo.html +1 -1
- package/docs/types/constants.MessageReaction.html +1 -1
- package/docs/types/constants.MessageStatus.html +1 -1
- package/docs/types/constants.MessageStatusEvent.html +1 -1
- package/docs/types/constants.MessageStatusUpdate.html +1 -1
- package/docs/types/constants.MessageTargetEntityId.html +1 -1
- package/docs/types/constants.MessageWithUploadingAttachments.html +1 -1
- package/docs/types/constants.MuteSettings.html +1 -1
- package/docs/types/constants.NewChatEvent.html +1 -1
- package/docs/types/constants.NewContact.html +1 -1
- package/docs/types/constants.NewFriendInvite.html +1 -1
- package/docs/types/constants.NewMeeting.html +1 -1
- package/docs/types/constants.NewSpaceCategoryEvent.html +1 -1
- package/docs/types/constants.NewSpaceChannelEvent.html +1 -1
- package/docs/types/constants.NewSpaceEvent.html +1 -1
- package/docs/types/constants.NewSpaceRoleAdded.html +1 -1
- package/docs/types/constants.NewSpaceThreadEvent.html +1 -1
- package/docs/types/constants.OperationFailed.html +1 -1
- package/docs/types/constants.OperationFailedEvent.html +1 -1
- package/docs/types/constants.Participant.html +1 -1
- package/docs/types/constants.ParticipantAVSMutedEvent.html +1 -1
- package/docs/types/constants.ParticipantConfigEvent.html +1 -1
- package/docs/types/constants.ParticipantRenamed.html +1 -1
- package/docs/types/constants.ParticipantRenamedSyncEvent.html +1 -1
- package/docs/types/constants.ParticipantsListEvent.html +1 -1
- package/docs/types/constants.ParticipantsListSyncEvent.html +1 -1
- package/docs/types/constants.PlacedInLobbyEvent.html +1 -1
- package/docs/types/constants.PlacedInWaitingRoomEvent.html +1 -1
- package/docs/types/constants.PublicChannelsEvent.html +1 -1
- package/docs/types/constants.Quality.html +1 -1
- package/docs/types/constants.RecordInfo.html +1 -1
- package/docs/types/constants.RecorderConfig.html +1 -1
- package/docs/types/constants.RemoteSdp.html +1 -1
- package/docs/types/constants.RemoteSdpInfo.html +1 -1
- package/docs/types/constants.RemovedChatEvent.html +1 -1
- package/docs/types/constants.RemovedMemberFromThread.html +1 -1
- package/docs/types/constants.RemovedRoleFromMember.html +1 -1
- package/docs/types/constants.ResetPasswordRequestStatus.html +1 -1
- package/docs/types/constants.RoleAssigned.html +1 -1
- package/docs/types/constants.RolePermissionSectionsEvent.html +1 -1
- package/docs/types/constants.RolesListEvent.html +1 -1
- package/docs/types/constants.RoomAvailable.html +1 -1
- package/docs/types/constants.RoomConfigEvent.html +1 -1
- package/docs/types/constants.RoomExtendedConfig.html +1 -1
- package/docs/types/constants.RoomExtendedParticipantConfig.html +1 -1
- package/docs/types/constants.RoomExtendedParticipantsConfig.html +1 -1
- package/docs/types/constants.RoomExtendedScreenSharingConfig.html +1 -1
- package/docs/types/constants.RoomInfo.html +1 -1
- package/docs/types/constants.RoomMessage.html +1 -1
- package/docs/types/constants.RoomNameUpdated.html +1 -1
- package/docs/types/constants.RoomScreenSharingConfigEvent.html +1 -1
- package/docs/types/constants.SFUMeetingParticipantPreview.html +1 -1
- package/docs/types/constants.SFUMeetingPreview.html +1 -1
- package/docs/types/constants.SfuMessageEvent.html +1 -1
- package/docs/types/constants.SfuSpace.html +1 -1
- package/docs/types/constants.SfuSpaceCategory.html +1 -1
- package/docs/types/constants.SfuSpaceChannel.html +1 -1
- package/docs/types/constants.SfuSpaceChannelAccessRights.html +1 -1
- package/docs/types/constants.SfuSpaceInvite.html +1 -1
- package/docs/types/constants.SfuSpaceMember.html +1 -1
- package/docs/types/constants.SfuSpaceRole.html +1 -1
- package/docs/types/constants.SfuSpaceRolePermission.html +1 -1
- package/docs/types/constants.SfuSpaceRolePermissionSection.html +1 -1
- package/docs/types/constants.SfuSpaceThread.html +1 -1
- package/docs/types/constants.SfuSpaceUserBan.html +1 -1
- package/docs/types/constants.SignUpStatus.html +1 -1
- package/docs/types/constants.SpaceCategoryDeleted.html +1 -1
- package/docs/types/constants.SpaceCategoryUpdated.html +1 -1
- package/docs/types/constants.SpaceChannelDeleted.html +1 -1
- package/docs/types/constants.SpaceChannelMoved.html +1 -1
- package/docs/types/constants.SpaceChannelUpdated.html +1 -1
- package/docs/types/constants.SpaceCreatedEvent.html +1 -1
- package/docs/types/constants.SpaceDeletedEvent.html +1 -1
- package/docs/types/constants.SpaceInviteCreated.html +1 -1
- package/docs/types/constants.SpaceInviteRevoked.html +1 -1
- package/docs/types/constants.SpaceMuted.html +1 -1
- package/docs/types/constants.SpaceNotificationSettingsUpdated.html +1 -1
- package/docs/types/constants.SpaceOverviewUpdated.html +1 -1
- package/docs/types/constants.SpaceRoleDeleted.html +1 -1
- package/docs/types/constants.SpaceRoleUpdated.html +1 -1
- package/docs/types/constants.SpaceThreadDeleted.html +1 -1
- package/docs/types/constants.SpaceThreadUpdated.html +1 -1
- package/docs/types/constants.SpaceUnmuted.html +1 -1
- package/docs/types/constants.StopScreenSharingEvent.html +1 -1
- package/docs/types/constants.StopTrackEvent.html +1 -1
- package/docs/types/constants.SystemConfig.html +1 -1
- package/docs/types/constants.SystemConfigEvent.html +1 -1
- package/docs/types/constants.ThreadMuted.html +1 -1
- package/docs/types/constants.ThreadNotificationSettingsUpdated.html +1 -1
- package/docs/types/constants.ThreadUnmuted.html +1 -1
- package/docs/types/constants.TracksQualityState.html +1 -1
- package/docs/types/constants.UnreadMessagesCountEvent.html +1 -1
- package/docs/types/constants.UnreadMessagesCountUpdate.html +1 -1
- package/docs/types/constants.UpdateChatEvent.html +1 -1
- package/docs/types/constants.UpdateMessagesDeliveryStatusEvent.html +1 -1
- package/docs/types/constants.UploadIconEvent.html +1 -0
- package/docs/types/constants.UploadingAttachmentInfo.html +1 -1
- package/docs/types/constants.UserCalendarEvent.html +1 -1
- package/docs/types/constants.UserChatEncryptedPassword.html +1 -1
- package/docs/types/constants.UserContacts.html +1 -1
- package/docs/types/constants.UserContactsEvent.html +1 -1
- package/docs/types/constants.UserEmail.html +1 -1
- package/docs/types/constants.UserEncryptionInfo.html +1 -1
- package/docs/types/constants.UserEncryptionInfoEvent.html +1 -1
- package/docs/types/constants.UserHostKey.html +1 -1
- package/docs/types/constants.UserHostKeyChangedEvent.html +1 -1
- package/docs/types/constants.UserId.html +1 -1
- package/docs/types/constants.UserInfo.html +1 -1
- package/docs/types/constants.UserInfoChangedEvent.html +1 -1
- package/docs/types/constants.UserInfoEvent.html +1 -1
- package/docs/types/constants.UserJoinedToSpaceEvent.html +1 -1
- package/docs/types/constants.UserLeftSpace.html +1 -1
- package/docs/types/constants.UserNickname.html +1 -1
- package/docs/types/constants.UserNicknameChangedEvent.html +1 -1
- package/docs/types/constants.UserPassword.html +1 -1
- package/docs/types/constants.UserPhoneNumber.html +1 -1
- package/docs/types/constants.UserPhoneNumberChangedEvent.html +1 -1
- package/docs/types/constants.UserPmiSettings.html +1 -1
- package/docs/types/constants.UserPresenceStatusUpdated.html +1 -1
- package/docs/types/constants.UserRoomsEvent.html +1 -1
- package/docs/types/constants.UserSpaceNicknameUpdated.html +1 -1
- package/docs/types/constants.UserSpacesEvent.html +1 -1
- package/docs/types/constants.UserSpecificChatInfo.html +1 -1
- package/docs/types/constants.UserTimezone.html +1 -1
- package/docs/types/constants.UserTimezoneChangedEvent.html +1 -1
- package/docs/types/constants.WaitingListEvent.html +1 -1
- package/docs/types/constants.WaitingParticipant.html +1 -1
- package/docs/types/constants.WaitingRoomUpdate.html +1 -1
- package/docs/types/sfu_extended.EventUnion.html +1 -1
- package/docs/types/sfu_extended.NotifyUnion.html +1 -1
- package/docs/variables/constants.ATTACHMENT_CHUNK_SIZE.html +1 -1
- package/docs/variables/constants.ATTACHMENT_ID_LENGTH.html +1 -1
- package/docs/variables/constants.WS_CONNECTION_TIMEOUT.html +1 -1
- package/docs/variables/constants.WS_PINGS_MISSING_THRESHOLD.html +1 -1
- package/docs/variables/constants.WS_PING_INTERVAL_MS.html +1 -1
- package/package.json +4 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddedRoleToMember, Attachment, AttachmentRequest, AttachmentStatus, Calendar, CalendarEvent, SfuSpaceCategory, ChannelSendPolicy, Chat, ChatMap, ChatMessagesCount, ChatReceivePolicy, ChatType, ConnectionDetails, FirstAndLastChatMessage, InternalMessage, LastReadMessageUpdated, LoadMessagesWithMentionsResult, Message, MessageAttachment, MessageAttachmentData, MessageAttachmentMediaType, MessageAttachmentsSearchResult, MessageStatus, RoomInfo, SfuEvent, SignUpStatus, SortOrder, SfuSpace, SfuSpaceRole, State, UserEmail, UserHostKey, UserId, UserInfo, UserNickname, UserPassword, UserPhoneNumber, UserPmiSettings, UserSpecificChatInfo, UserTimezone, SfuSpaceInvite, SfuSpaceChannel, SpaceRoleDeleted, RemovedRoleFromMember, SfuSpaceThread, SpaceChannelUpdated, SfuSpaceRolePermissionSection, SpaceRoleUpdated, SpaceChannelMoved, SpaceEvent, MessageTargetEntityType, MessageTargetEntityId, MeetingSyncEvent, UnreadMessagesCountEvent, FriendInviteDeleted, UserContacts, PresenceStatus, Contact, ExamplesUser, UserEncryptionInfo, UserChatEncryptedPassword, AddedRemovedReactionOnMessage, AddedMembersToThread, RemovedMemberFromThread, UserSpaceNicknameUpdated, SpaceNotificationSettingsUpdated, ChannelNotificationSettingsUpdated, ThreadNotificationSettingsUpdated, NotificationMode, ChatNotificationSettingsUpdated, ChatMuted, SpaceMuted, ChannelMuted, ThreadMuted, SpaceUnmuted, ChannelUnmuted, ThreadUnmuted, ChatUnmuted, ContactPersonalSettings, MeetingsHistoryEvent, ConferenceType, SystemConfig } from "./constants";
|
|
1
|
+
import { AddedRoleToMember, Attachment, AttachmentRequest, AttachmentStatus, Calendar, CalendarEvent, SfuSpaceCategory, ChannelSendPolicy, Chat, ChatMap, ChatMessagesCount, ChatReceivePolicy, ChatType, ConnectionDetails, FirstAndLastChatMessage, InternalMessage, LastReadMessageUpdated, LoadMessagesWithMentionsResult, Message, MessageAttachment, MessageAttachmentData, MessageAttachmentMediaType, MessageAttachmentsSearchResult, MessageStatus, RoomInfo, SfuEvent, SignUpStatus, SortOrder, SfuSpace, SfuSpaceRole, State, UserEmail, UserHostKey, UserId, UserInfo, UserNickname, UserPassword, UserPhoneNumber, UserPmiSettings, UserSpecificChatInfo, UserTimezone, SfuSpaceInvite, SfuSpaceChannel, SpaceRoleDeleted, RemovedRoleFromMember, SfuSpaceThread, SpaceChannelUpdated, SfuSpaceRolePermissionSection, SpaceRoleUpdated, SpaceChannelMoved, SpaceEvent, MessageTargetEntityType, MessageTargetEntityId, MeetingSyncEvent, UnreadMessagesCountEvent, FriendInviteDeleted, UserContacts, PresenceStatus, Contact, ExamplesUser, UserEncryptionInfo, UserChatEncryptedPassword, AddedRemovedReactionOnMessage, AddedMembersToThread, RemovedMemberFromThread, UserSpaceNicknameUpdated, SpaceNotificationSettingsUpdated, ChannelNotificationSettingsUpdated, ThreadNotificationSettingsUpdated, NotificationMode, ChatNotificationSettingsUpdated, ChatMuted, SpaceMuted, ChannelMuted, ThreadMuted, SpaceUnmuted, ChannelUnmuted, ThreadUnmuted, ChatUnmuted, ContactPersonalSettings, MeetingsHistoryEvent, ConferenceType, SystemConfig, AttachmentListResult, AttachmentSizeInfo, AttachmentType } from "./constants";
|
|
2
2
|
import { RoomExtended } from "./room-extended";
|
|
3
3
|
import { SendingAttachmentsHandler } from "./sending-attachments-handler";
|
|
4
4
|
import { PrefixFunction, Verbosity } from "./logger";
|
|
@@ -223,6 +223,22 @@ export declare class SfuExtended {
|
|
|
223
223
|
targetEntityType: MessageTargetEntityType;
|
|
224
224
|
targetEntityId: MessageTargetEntityId;
|
|
225
225
|
}): Promise<ChatMessagesCount>;
|
|
226
|
+
/**
|
|
227
|
+
* List user attachments
|
|
228
|
+
*
|
|
229
|
+
* @param filter.offset starting point for retrieving a subset of attachments
|
|
230
|
+
* @param filter.pageSize number of items retrieved and displayed per page
|
|
231
|
+
*/
|
|
232
|
+
listAttachments(filter: {
|
|
233
|
+
offset: number;
|
|
234
|
+
pageSize: number;
|
|
235
|
+
}): Promise<AttachmentListResult>;
|
|
236
|
+
/**
|
|
237
|
+
* Get total size of attachments
|
|
238
|
+
*
|
|
239
|
+
* @param type {@link AttachmentType}
|
|
240
|
+
*/
|
|
241
|
+
getAttachmentsSize(type?: AttachmentType): Promise<AttachmentSizeInfo>;
|
|
226
242
|
/**
|
|
227
243
|
* Get first message and last message in entity from {@link MessageTargetEntityType}
|
|
228
244
|
*/
|
|
@@ -1273,6 +1289,51 @@ export declare class SfuExtended {
|
|
|
1273
1289
|
* Used to receive {@link SystemConfig}
|
|
1274
1290
|
*/
|
|
1275
1291
|
getSystemConfig(): Promise<SystemConfig>;
|
|
1292
|
+
private updateSpaceIconRequest;
|
|
1293
|
+
/**
|
|
1294
|
+
* Update space icon
|
|
1295
|
+
*
|
|
1296
|
+
* Used to update space icon.
|
|
1297
|
+
*
|
|
1298
|
+
* Space members will receive {@link SpaceOverviewUpdated} with {@link SpaceOverviewUpdated.icon} as download url.
|
|
1299
|
+
*
|
|
1300
|
+
* Returns download url or null if removed.
|
|
1301
|
+
*/
|
|
1302
|
+
updateSpaceIcon(options: {
|
|
1303
|
+
id: string;
|
|
1304
|
+
icon?: File;
|
|
1305
|
+
remove?: boolean;
|
|
1306
|
+
}): Promise<string | null>;
|
|
1307
|
+
private updateUserIconRequest;
|
|
1308
|
+
/**
|
|
1309
|
+
* Update user avatar
|
|
1310
|
+
*
|
|
1311
|
+
* Used to update user avatar.
|
|
1312
|
+
*
|
|
1313
|
+
* User will receive {@link UserInfoChangedEvent} and {@link ContactUpdated} with self.
|
|
1314
|
+
* User's contacts will receive {@link ContactUpdated}
|
|
1315
|
+
*
|
|
1316
|
+
* Returns download url or null if removed.
|
|
1317
|
+
*/
|
|
1318
|
+
updateUserIcon(options: {
|
|
1319
|
+
icon?: File;
|
|
1320
|
+
remove?: boolean;
|
|
1321
|
+
}): Promise<string | null>;
|
|
1322
|
+
private updateChatIconRequest;
|
|
1323
|
+
/**
|
|
1324
|
+
* Update chat icon
|
|
1325
|
+
*
|
|
1326
|
+
* Used to update direct chat icon.
|
|
1327
|
+
*
|
|
1328
|
+
* Chat members will receive {@link ChatIconUpdated} with {@link ChatIconUpdated.icon} as download url.
|
|
1329
|
+
*
|
|
1330
|
+
* Returns download url or null if removed.
|
|
1331
|
+
*/
|
|
1332
|
+
updateChatIcon(options: {
|
|
1333
|
+
id: string;
|
|
1334
|
+
icon?: File;
|
|
1335
|
+
remove?: boolean;
|
|
1336
|
+
}): Promise<string | null>;
|
|
1276
1337
|
user(): {
|
|
1277
1338
|
username: string;
|
|
1278
1339
|
email: string;
|
package/dist/sdk/sfu-extended.js
CHANGED
|
@@ -58,6 +58,7 @@ const sending_attachments_handler_1 = require("./sending-attachments-handler");
|
|
|
58
58
|
const logger_1 = __importStar(require("./logger"));
|
|
59
59
|
const reset_password_handler_1 = require("./reset-password-handler");
|
|
60
60
|
const attachments_transfer_manager_1 = require("./attachments-transfer-manager");
|
|
61
|
+
const file_upload_1 = require("./file-upload");
|
|
61
62
|
class SfuExtended {
|
|
62
63
|
constructor(logLevel, prefix, log) {
|
|
63
64
|
_SfuExtended_instances.add(this);
|
|
@@ -639,6 +640,33 @@ class SfuExtended {
|
|
|
639
640
|
}, resolve, reject);
|
|
640
641
|
});
|
|
641
642
|
}
|
|
643
|
+
/**
|
|
644
|
+
* List user attachments
|
|
645
|
+
*
|
|
646
|
+
* @param filter.offset starting point for retrieving a subset of attachments
|
|
647
|
+
* @param filter.pageSize number of items retrieved and displayed per page
|
|
648
|
+
*/
|
|
649
|
+
listAttachments(filter) {
|
|
650
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
651
|
+
const self = this;
|
|
652
|
+
return new Promise(function (resolve, reject) {
|
|
653
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.LIST_ATTACHMENTS, Object.assign({}, filter), resolve, reject);
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Get total size of attachments
|
|
658
|
+
*
|
|
659
|
+
* @param type {@link AttachmentType}
|
|
660
|
+
*/
|
|
661
|
+
getAttachmentsSize(type) {
|
|
662
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
663
|
+
const self = this;
|
|
664
|
+
return new Promise(function (resolve, reject) {
|
|
665
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.GET_ATTACHMENTS_SIZE, {
|
|
666
|
+
type: type
|
|
667
|
+
}, resolve, reject);
|
|
668
|
+
});
|
|
669
|
+
}
|
|
642
670
|
/**
|
|
643
671
|
* Get first message and last message in entity from {@link MessageTargetEntityType}
|
|
644
672
|
*/
|
|
@@ -2393,6 +2421,140 @@ class SfuExtended {
|
|
|
2393
2421
|
});
|
|
2394
2422
|
});
|
|
2395
2423
|
}
|
|
2424
|
+
updateSpaceIconRequest(options) {
|
|
2425
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2426
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
2427
|
+
const self = this;
|
|
2428
|
+
return new Promise(function (resolve, reject) {
|
|
2429
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_SPACE_ICON, {
|
|
2430
|
+
id: options.id,
|
|
2431
|
+
iconName: options.name,
|
|
2432
|
+
iconSize: options.size,
|
|
2433
|
+
remove: options.remove
|
|
2434
|
+
}, resolve, reject);
|
|
2435
|
+
});
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2438
|
+
/**
|
|
2439
|
+
* Update space icon
|
|
2440
|
+
*
|
|
2441
|
+
* Used to update space icon.
|
|
2442
|
+
*
|
|
2443
|
+
* Space members will receive {@link SpaceOverviewUpdated} with {@link SpaceOverviewUpdated.icon} as download url.
|
|
2444
|
+
*
|
|
2445
|
+
* Returns download url or null if removed.
|
|
2446
|
+
*/
|
|
2447
|
+
updateSpaceIcon(options) {
|
|
2448
|
+
var _a, _b;
|
|
2449
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2450
|
+
try {
|
|
2451
|
+
const uploadUrl = yield this.updateSpaceIconRequest({
|
|
2452
|
+
id: options.id,
|
|
2453
|
+
name: (_a = options.icon) === null || _a === void 0 ? void 0 : _a.name,
|
|
2454
|
+
size: (_b = options.icon) === null || _b === void 0 ? void 0 : _b.size,
|
|
2455
|
+
remove: options.remove
|
|
2456
|
+
});
|
|
2457
|
+
if (!uploadUrl) {
|
|
2458
|
+
return null;
|
|
2459
|
+
}
|
|
2460
|
+
return (0, file_upload_1.uploadFile)({
|
|
2461
|
+
url: uploadUrl,
|
|
2462
|
+
file: options.icon
|
|
2463
|
+
});
|
|
2464
|
+
}
|
|
2465
|
+
catch (error) {
|
|
2466
|
+
throw new Error(error.error);
|
|
2467
|
+
}
|
|
2468
|
+
});
|
|
2469
|
+
}
|
|
2470
|
+
updateUserIconRequest(options) {
|
|
2471
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2472
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
2473
|
+
const self = this;
|
|
2474
|
+
return new Promise(function (resolve, reject) {
|
|
2475
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_USER_ICON, {
|
|
2476
|
+
iconName: options.name,
|
|
2477
|
+
iconSize: options.size,
|
|
2478
|
+
remove: options.remove
|
|
2479
|
+
}, resolve, reject);
|
|
2480
|
+
});
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2483
|
+
/**
|
|
2484
|
+
* Update user avatar
|
|
2485
|
+
*
|
|
2486
|
+
* Used to update user avatar.
|
|
2487
|
+
*
|
|
2488
|
+
* User will receive {@link UserInfoChangedEvent} and {@link ContactUpdated} with self.
|
|
2489
|
+
* User's contacts will receive {@link ContactUpdated}
|
|
2490
|
+
*
|
|
2491
|
+
* Returns download url or null if removed.
|
|
2492
|
+
*/
|
|
2493
|
+
updateUserIcon(options) {
|
|
2494
|
+
var _a, _b;
|
|
2495
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2496
|
+
try {
|
|
2497
|
+
const uploadUrl = yield this.updateUserIconRequest({
|
|
2498
|
+
name: (_a = options.icon) === null || _a === void 0 ? void 0 : _a.name,
|
|
2499
|
+
size: (_b = options.icon) === null || _b === void 0 ? void 0 : _b.size,
|
|
2500
|
+
remove: options.remove
|
|
2501
|
+
});
|
|
2502
|
+
if (!uploadUrl) {
|
|
2503
|
+
return null;
|
|
2504
|
+
}
|
|
2505
|
+
return (0, file_upload_1.uploadFile)({
|
|
2506
|
+
url: uploadUrl,
|
|
2507
|
+
file: options.icon
|
|
2508
|
+
});
|
|
2509
|
+
}
|
|
2510
|
+
catch (error) {
|
|
2511
|
+
throw new Error(error.error);
|
|
2512
|
+
}
|
|
2513
|
+
});
|
|
2514
|
+
}
|
|
2515
|
+
updateChatIconRequest(options) {
|
|
2516
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2517
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
2518
|
+
const self = this;
|
|
2519
|
+
return new Promise(function (resolve, reject) {
|
|
2520
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_CHAT_ICON, {
|
|
2521
|
+
id: options.id,
|
|
2522
|
+
iconName: options.name,
|
|
2523
|
+
iconSize: options.size,
|
|
2524
|
+
remove: options.remove
|
|
2525
|
+
}, resolve, reject);
|
|
2526
|
+
});
|
|
2527
|
+
});
|
|
2528
|
+
}
|
|
2529
|
+
/**
|
|
2530
|
+
* Update chat icon
|
|
2531
|
+
*
|
|
2532
|
+
* Used to update direct chat icon.
|
|
2533
|
+
*
|
|
2534
|
+
* Chat members will receive {@link ChatIconUpdated} with {@link ChatIconUpdated.icon} as download url.
|
|
2535
|
+
*
|
|
2536
|
+
* Returns download url or null if removed.
|
|
2537
|
+
*/
|
|
2538
|
+
updateChatIcon(options) {
|
|
2539
|
+
var _a, _b;
|
|
2540
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2541
|
+
try {
|
|
2542
|
+
const uploadUrl = yield this.updateChatIconRequest({
|
|
2543
|
+
id: options.id,
|
|
2544
|
+
name: (_a = options.icon) === null || _a === void 0 ? void 0 : _a.name,
|
|
2545
|
+
size: (_b = options.icon) === null || _b === void 0 ? void 0 : _b.size,
|
|
2546
|
+
remove: options.remove
|
|
2547
|
+
});
|
|
2548
|
+
if (!uploadUrl) {
|
|
2549
|
+
return null;
|
|
2550
|
+
}
|
|
2551
|
+
return (0, file_upload_1.uploadFile)({ url: uploadUrl, file: options.icon });
|
|
2552
|
+
}
|
|
2553
|
+
catch (error) {
|
|
2554
|
+
throw new Error(error.error);
|
|
2555
|
+
}
|
|
2556
|
+
});
|
|
2557
|
+
}
|
|
2396
2558
|
user() {
|
|
2397
2559
|
return __classPrivateFieldGet(this, _SfuExtended__user, "f");
|
|
2398
2560
|
}
|
|
@@ -2848,6 +3010,18 @@ _SfuExtended_connection = new WeakMap(), _SfuExtended__user = new WeakMap(), _Sf
|
|
|
2848
3010
|
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.MESSAGE_ATTACHMENTS_SEARCH_RESULT, result);
|
|
2849
3011
|
}
|
|
2850
3012
|
}
|
|
3013
|
+
else if (data[0].type === constants_1.SfuEvent.ATTACHMENTS_LIST_RESULT) {
|
|
3014
|
+
const result = data[0];
|
|
3015
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, result)) {
|
|
3016
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.ATTACHMENTS_LIST_RESULT, result);
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
else if (data[0].type === constants_1.SfuEvent.ATTACHMENTS_SIZE_INFO) {
|
|
3020
|
+
const result = data[0];
|
|
3021
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, result)) {
|
|
3022
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.ATTACHMENTS_SIZE_INFO, result);
|
|
3023
|
+
}
|
|
3024
|
+
}
|
|
2851
3025
|
else if (data[0].type === constants_1.SfuEvent.LOAD_MESSAGES_WITH_MENTIONS_RESULT) {
|
|
2852
3026
|
const result = data[0];
|
|
2853
3027
|
if (!promises_1.default.resolve(data[0].internalMessageId, result)) {
|
|
@@ -3224,6 +3398,16 @@ _SfuExtended_connection = new WeakMap(), _SfuExtended__user = new WeakMap(), _Sf
|
|
|
3224
3398
|
const event = data[0];
|
|
3225
3399
|
promises_1.default.resolve(data[0].internalMessageId, event.config);
|
|
3226
3400
|
}
|
|
3401
|
+
else if (data[0].type === constants_1.SfuEvent.UPLOAD_ICON) {
|
|
3402
|
+
const event = data[0];
|
|
3403
|
+
promises_1.default.resolve(data[0].internalMessageId, event.url);
|
|
3404
|
+
}
|
|
3405
|
+
else if (data[0].type === constants_1.SfuEvent.CHAT_ICON_UPDATED) {
|
|
3406
|
+
const event = data[0];
|
|
3407
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
3408
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.CHAT_ICON_UPDATED, event);
|
|
3409
|
+
}
|
|
3410
|
+
}
|
|
3227
3411
|
else {
|
|
3228
3412
|
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(data[0].type, data[0]);
|
|
3229
3413
|
}
|