@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.
Files changed (278) hide show
  1. package/dist/client.version +1 -1
  2. package/dist/index.d.ts +2 -2
  3. package/dist/index.js +2 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/sdk/constants.d.ts +48 -2
  6. package/dist/sdk/constants.js +22 -1
  7. package/dist/sdk/constants.js.map +1 -1
  8. package/dist/sdk/file-upload.d.ts +4 -0
  9. package/dist/sdk/file-upload.js +58 -0
  10. package/dist/sdk/file-upload.js.map +1 -0
  11. package/dist/sdk/room.d.ts +3 -2
  12. package/dist/sdk/room.js +4 -2
  13. package/dist/sdk/room.js.map +1 -1
  14. package/dist/sdk/sfu-extended.d.ts +62 -1
  15. package/dist/sdk/sfu-extended.js +184 -0
  16. package/dist/sdk/sfu-extended.js.map +1 -1
  17. package/docs/assets/navigation.js +1 -1
  18. package/docs/assets/search.js +1 -1
  19. package/docs/classes/room.Room.html +11 -10
  20. package/docs/classes/room_extended.RoomExtended.html +14 -13
  21. package/docs/classes/sfu_extended.SfuExtended.html +125 -99
  22. package/docs/enums/constants.AttachmentState.html +2 -2
  23. package/docs/enums/constants.AttachmentType.html +3 -0
  24. package/docs/enums/constants.AuthenticationStatus.html +2 -2
  25. package/docs/enums/constants.ChannelSendPolicy.html +2 -2
  26. package/docs/enums/constants.ChatError.html +2 -2
  27. package/docs/enums/constants.ChatReceivePolicy.html +2 -2
  28. package/docs/enums/constants.ChatSectionsError.html +2 -2
  29. package/docs/enums/constants.ChatType.html +2 -2
  30. package/docs/enums/constants.ConferenceType.html +2 -2
  31. package/docs/enums/constants.ConnectionError.html +2 -2
  32. package/docs/enums/constants.ConnectionType.html +2 -2
  33. package/docs/enums/constants.ContactError.html +2 -2
  34. package/docs/enums/constants.DeliveryStatus.html +2 -2
  35. package/docs/enums/constants.ExamplesError.html +2 -2
  36. package/docs/enums/constants.ExamplesEvent.html +2 -2
  37. package/docs/enums/constants.InternalApi.html +7 -2
  38. package/docs/enums/constants.MeetingSyncEvent.html +11 -11
  39. package/docs/enums/constants.MessageAttachmentMediaType.html +2 -2
  40. package/docs/enums/constants.MessageAttachmentType.html +2 -2
  41. package/docs/enums/constants.MessageState.html +2 -2
  42. package/docs/enums/constants.MessageTargetEntityType.html +2 -2
  43. package/docs/enums/constants.MessageType.html +2 -2
  44. package/docs/enums/constants.NotificationMode.html +2 -2
  45. package/docs/enums/constants.Operations.html +2 -2
  46. package/docs/enums/constants.ParticipantRole.html +2 -2
  47. package/docs/enums/constants.PresenceStatus.html +2 -2
  48. package/docs/enums/constants.RemoteSdpType.html +2 -2
  49. package/docs/enums/constants.RoomError.html +2 -2
  50. package/docs/enums/constants.RoomEvent.html +43 -43
  51. package/docs/enums/constants.RoomState.html +2 -2
  52. package/docs/enums/constants.SfuEvent.html +31 -25
  53. package/docs/enums/constants.SortOrder.html +2 -2
  54. package/docs/enums/constants.SpaceError.html +2 -2
  55. package/docs/enums/constants.SpaceEvent.html +38 -38
  56. package/docs/enums/constants.State.html +2 -2
  57. package/docs/enums/constants.StatsType.html +2 -2
  58. package/docs/enums/constants.TrackType.html +2 -2
  59. package/docs/enums/constants.TransportType.html +3 -0
  60. package/docs/enums/constants.UserInfoError.html +2 -2
  61. package/docs/enums/constants.UserManagementError.html +2 -2
  62. package/docs/functions/file_upload.uploadFile.html +1 -0
  63. package/docs/interfaces/room.RemoteTrack.html +2 -2
  64. package/docs/modules/constants.html +7 -0
  65. package/docs/modules/file_upload.html +2 -0
  66. package/docs/types/constants.AddRemoveTracks.html +1 -1
  67. package/docs/types/constants.AddRemoveTracksSync.html +1 -1
  68. package/docs/types/constants.AddedMembersToThread.html +1 -1
  69. package/docs/types/constants.AddedRemovedReactionOnMessage.html +1 -1
  70. package/docs/types/constants.AddedRoleToMember.html +1 -1
  71. package/docs/types/constants.Attachment.html +1 -1
  72. package/docs/types/constants.AttachmentInfo.html +1 -1
  73. package/docs/types/constants.AttachmentListItem.html +1 -0
  74. package/docs/types/constants.AttachmentListResult.html +1 -0
  75. package/docs/types/constants.AttachmentRequest.html +1 -1
  76. package/docs/types/constants.AttachmentRequestAck.html +1 -1
  77. package/docs/types/constants.AttachmentSizeInfo.html +1 -0
  78. package/docs/types/constants.AttachmentStatus.html +1 -1
  79. package/docs/types/constants.AttachmentStatusEvent.html +1 -1
  80. package/docs/types/constants.AuthenticationStatusEvent.html +1 -1
  81. package/docs/types/constants.BannedContact.html +1 -1
  82. package/docs/types/constants.BitrateTestStatus.html +1 -1
  83. package/docs/types/constants.BooleanEvent.html +1 -1
  84. package/docs/types/constants.Calendar.html +1 -1
  85. package/docs/types/constants.CalendarEvent.html +1 -1
  86. package/docs/types/constants.CalendarEventEvent.html +1 -1
  87. package/docs/types/constants.ChannelMuted.html +1 -1
  88. package/docs/types/constants.ChannelNotificationSettingsUpdated.html +1 -1
  89. package/docs/types/constants.ChannelUnmuted.html +1 -1
  90. package/docs/types/constants.Chat.html +1 -1
  91. package/docs/types/constants.ChatIconUpdated.html +1 -0
  92. package/docs/types/constants.ChatLoadedEvent.html +1 -1
  93. package/docs/types/constants.ChatMap.html +1 -1
  94. package/docs/types/constants.ChatMessagesCount.html +1 -1
  95. package/docs/types/constants.ChatMessagesEvent.html +1 -1
  96. package/docs/types/constants.ChatMuted.html +1 -1
  97. package/docs/types/constants.ChatNotificationSettingsUpdated.html +1 -1
  98. package/docs/types/constants.ChatSearchResultEvent.html +1 -1
  99. package/docs/types/constants.ChatUnmuted.html +1 -1
  100. package/docs/types/constants.ChatsEvent.html +1 -1
  101. package/docs/types/constants.ConnectionDetails.html +1 -1
  102. package/docs/types/constants.ConnectionFailedEvent.html +1 -1
  103. package/docs/types/constants.Contact.html +1 -1
  104. package/docs/types/constants.ContactDeleted.html +1 -1
  105. package/docs/types/constants.ContactPersonalSettings.html +1 -1
  106. package/docs/types/constants.ContactPersonalSettingsUpdated.html +1 -1
  107. package/docs/types/constants.ContactUpdated.html +1 -1
  108. package/docs/types/constants.ControlMessage.html +1 -1
  109. package/docs/types/constants.ControlMessageEvent.html +1 -1
  110. package/docs/types/constants.CreatedRoom.html +1 -1
  111. package/docs/types/constants.EvictedFromRoom.html +1 -1
  112. package/docs/types/constants.EvictedSync.html +1 -1
  113. package/docs/types/constants.ExamplesUser.html +1 -1
  114. package/docs/types/constants.ExamplesUserEvent.html +1 -1
  115. package/docs/types/constants.FirstAndLastChatMessage.html +1 -1
  116. package/docs/types/constants.ForcefullyLeftEvent.html +1 -1
  117. package/docs/types/constants.FragmentedMessage.html +1 -1
  118. package/docs/types/constants.FriendInvite.html +1 -1
  119. package/docs/types/constants.FriendInviteDeleted.html +1 -1
  120. package/docs/types/constants.InternalMessage.html +1 -1
  121. package/docs/types/constants.JoinedRoom.html +1 -1
  122. package/docs/types/constants.JoinedRoomSync.html +1 -1
  123. package/docs/types/constants.LastReadMessageUpdate.html +1 -1
  124. package/docs/types/constants.LastReadMessageUpdated.html +1 -1
  125. package/docs/types/constants.LeftMeetingSync.html +1 -1
  126. package/docs/types/constants.LeftRoom.html +1 -1
  127. package/docs/types/constants.LoadMessagesWithMentionsResult.html +1 -1
  128. package/docs/types/constants.MeetingAddedToHistory.html +1 -1
  129. package/docs/types/constants.MeetingEndedSync.html +1 -1
  130. package/docs/types/constants.MeetingHistoryItem.html +1 -1
  131. package/docs/types/constants.MeetingNameUpdatedSync.html +1 -1
  132. package/docs/types/constants.MeetingRecordDeleted.html +1 -1
  133. package/docs/types/constants.MeetingRemovedFromHistory.html +1 -1
  134. package/docs/types/constants.MeetingsHistoryEvent.html +1 -1
  135. package/docs/types/constants.MeetingsPreviewEvent.html +1 -1
  136. package/docs/types/constants.Message.html +1 -1
  137. package/docs/types/constants.MessageAttachment.html +1 -1
  138. package/docs/types/constants.MessageAttachmentData.html +1 -1
  139. package/docs/types/constants.MessageAttachmentsSearchResult.html +1 -1
  140. package/docs/types/constants.MessageDeleted.html +1 -1
  141. package/docs/types/constants.MessageDeliveryStatus.html +1 -1
  142. package/docs/types/constants.MessageEdited.html +1 -1
  143. package/docs/types/constants.MessageInfo.html +1 -1
  144. package/docs/types/constants.MessageReaction.html +1 -1
  145. package/docs/types/constants.MessageStatus.html +1 -1
  146. package/docs/types/constants.MessageStatusEvent.html +1 -1
  147. package/docs/types/constants.MessageStatusUpdate.html +1 -1
  148. package/docs/types/constants.MessageTargetEntityId.html +1 -1
  149. package/docs/types/constants.MessageWithUploadingAttachments.html +1 -1
  150. package/docs/types/constants.MuteSettings.html +1 -1
  151. package/docs/types/constants.NewChatEvent.html +1 -1
  152. package/docs/types/constants.NewContact.html +1 -1
  153. package/docs/types/constants.NewFriendInvite.html +1 -1
  154. package/docs/types/constants.NewMeeting.html +1 -1
  155. package/docs/types/constants.NewSpaceCategoryEvent.html +1 -1
  156. package/docs/types/constants.NewSpaceChannelEvent.html +1 -1
  157. package/docs/types/constants.NewSpaceEvent.html +1 -1
  158. package/docs/types/constants.NewSpaceRoleAdded.html +1 -1
  159. package/docs/types/constants.NewSpaceThreadEvent.html +1 -1
  160. package/docs/types/constants.OperationFailed.html +1 -1
  161. package/docs/types/constants.OperationFailedEvent.html +1 -1
  162. package/docs/types/constants.Participant.html +1 -1
  163. package/docs/types/constants.ParticipantAVSMutedEvent.html +1 -1
  164. package/docs/types/constants.ParticipantConfigEvent.html +1 -1
  165. package/docs/types/constants.ParticipantRenamed.html +1 -1
  166. package/docs/types/constants.ParticipantRenamedSyncEvent.html +1 -1
  167. package/docs/types/constants.ParticipantsListEvent.html +1 -1
  168. package/docs/types/constants.ParticipantsListSyncEvent.html +1 -1
  169. package/docs/types/constants.PlacedInLobbyEvent.html +1 -1
  170. package/docs/types/constants.PlacedInWaitingRoomEvent.html +1 -1
  171. package/docs/types/constants.PublicChannelsEvent.html +1 -1
  172. package/docs/types/constants.Quality.html +1 -1
  173. package/docs/types/constants.RecordInfo.html +1 -1
  174. package/docs/types/constants.RecorderConfig.html +1 -1
  175. package/docs/types/constants.RemoteSdp.html +1 -1
  176. package/docs/types/constants.RemoteSdpInfo.html +1 -1
  177. package/docs/types/constants.RemovedChatEvent.html +1 -1
  178. package/docs/types/constants.RemovedMemberFromThread.html +1 -1
  179. package/docs/types/constants.RemovedRoleFromMember.html +1 -1
  180. package/docs/types/constants.ResetPasswordRequestStatus.html +1 -1
  181. package/docs/types/constants.RoleAssigned.html +1 -1
  182. package/docs/types/constants.RolePermissionSectionsEvent.html +1 -1
  183. package/docs/types/constants.RolesListEvent.html +1 -1
  184. package/docs/types/constants.RoomAvailable.html +1 -1
  185. package/docs/types/constants.RoomConfigEvent.html +1 -1
  186. package/docs/types/constants.RoomExtendedConfig.html +1 -1
  187. package/docs/types/constants.RoomExtendedParticipantConfig.html +1 -1
  188. package/docs/types/constants.RoomExtendedParticipantsConfig.html +1 -1
  189. package/docs/types/constants.RoomExtendedScreenSharingConfig.html +1 -1
  190. package/docs/types/constants.RoomInfo.html +1 -1
  191. package/docs/types/constants.RoomMessage.html +1 -1
  192. package/docs/types/constants.RoomNameUpdated.html +1 -1
  193. package/docs/types/constants.RoomScreenSharingConfigEvent.html +1 -1
  194. package/docs/types/constants.SFUMeetingParticipantPreview.html +1 -1
  195. package/docs/types/constants.SFUMeetingPreview.html +1 -1
  196. package/docs/types/constants.SfuMessageEvent.html +1 -1
  197. package/docs/types/constants.SfuSpace.html +1 -1
  198. package/docs/types/constants.SfuSpaceCategory.html +1 -1
  199. package/docs/types/constants.SfuSpaceChannel.html +1 -1
  200. package/docs/types/constants.SfuSpaceChannelAccessRights.html +1 -1
  201. package/docs/types/constants.SfuSpaceInvite.html +1 -1
  202. package/docs/types/constants.SfuSpaceMember.html +1 -1
  203. package/docs/types/constants.SfuSpaceRole.html +1 -1
  204. package/docs/types/constants.SfuSpaceRolePermission.html +1 -1
  205. package/docs/types/constants.SfuSpaceRolePermissionSection.html +1 -1
  206. package/docs/types/constants.SfuSpaceThread.html +1 -1
  207. package/docs/types/constants.SfuSpaceUserBan.html +1 -1
  208. package/docs/types/constants.SignUpStatus.html +1 -1
  209. package/docs/types/constants.SpaceCategoryDeleted.html +1 -1
  210. package/docs/types/constants.SpaceCategoryUpdated.html +1 -1
  211. package/docs/types/constants.SpaceChannelDeleted.html +1 -1
  212. package/docs/types/constants.SpaceChannelMoved.html +1 -1
  213. package/docs/types/constants.SpaceChannelUpdated.html +1 -1
  214. package/docs/types/constants.SpaceCreatedEvent.html +1 -1
  215. package/docs/types/constants.SpaceDeletedEvent.html +1 -1
  216. package/docs/types/constants.SpaceInviteCreated.html +1 -1
  217. package/docs/types/constants.SpaceInviteRevoked.html +1 -1
  218. package/docs/types/constants.SpaceMuted.html +1 -1
  219. package/docs/types/constants.SpaceNotificationSettingsUpdated.html +1 -1
  220. package/docs/types/constants.SpaceOverviewUpdated.html +1 -1
  221. package/docs/types/constants.SpaceRoleDeleted.html +1 -1
  222. package/docs/types/constants.SpaceRoleUpdated.html +1 -1
  223. package/docs/types/constants.SpaceThreadDeleted.html +1 -1
  224. package/docs/types/constants.SpaceThreadUpdated.html +1 -1
  225. package/docs/types/constants.SpaceUnmuted.html +1 -1
  226. package/docs/types/constants.StopScreenSharingEvent.html +1 -1
  227. package/docs/types/constants.StopTrackEvent.html +1 -1
  228. package/docs/types/constants.SystemConfig.html +1 -1
  229. package/docs/types/constants.SystemConfigEvent.html +1 -1
  230. package/docs/types/constants.ThreadMuted.html +1 -1
  231. package/docs/types/constants.ThreadNotificationSettingsUpdated.html +1 -1
  232. package/docs/types/constants.ThreadUnmuted.html +1 -1
  233. package/docs/types/constants.TracksQualityState.html +1 -1
  234. package/docs/types/constants.UnreadMessagesCountEvent.html +1 -1
  235. package/docs/types/constants.UnreadMessagesCountUpdate.html +1 -1
  236. package/docs/types/constants.UpdateChatEvent.html +1 -1
  237. package/docs/types/constants.UpdateMessagesDeliveryStatusEvent.html +1 -1
  238. package/docs/types/constants.UploadIconEvent.html +1 -0
  239. package/docs/types/constants.UploadingAttachmentInfo.html +1 -1
  240. package/docs/types/constants.UserCalendarEvent.html +1 -1
  241. package/docs/types/constants.UserChatEncryptedPassword.html +1 -1
  242. package/docs/types/constants.UserContacts.html +1 -1
  243. package/docs/types/constants.UserContactsEvent.html +1 -1
  244. package/docs/types/constants.UserEmail.html +1 -1
  245. package/docs/types/constants.UserEncryptionInfo.html +1 -1
  246. package/docs/types/constants.UserEncryptionInfoEvent.html +1 -1
  247. package/docs/types/constants.UserHostKey.html +1 -1
  248. package/docs/types/constants.UserHostKeyChangedEvent.html +1 -1
  249. package/docs/types/constants.UserId.html +1 -1
  250. package/docs/types/constants.UserInfo.html +1 -1
  251. package/docs/types/constants.UserInfoChangedEvent.html +1 -1
  252. package/docs/types/constants.UserInfoEvent.html +1 -1
  253. package/docs/types/constants.UserJoinedToSpaceEvent.html +1 -1
  254. package/docs/types/constants.UserLeftSpace.html +1 -1
  255. package/docs/types/constants.UserNickname.html +1 -1
  256. package/docs/types/constants.UserNicknameChangedEvent.html +1 -1
  257. package/docs/types/constants.UserPassword.html +1 -1
  258. package/docs/types/constants.UserPhoneNumber.html +1 -1
  259. package/docs/types/constants.UserPhoneNumberChangedEvent.html +1 -1
  260. package/docs/types/constants.UserPmiSettings.html +1 -1
  261. package/docs/types/constants.UserPresenceStatusUpdated.html +1 -1
  262. package/docs/types/constants.UserRoomsEvent.html +1 -1
  263. package/docs/types/constants.UserSpaceNicknameUpdated.html +1 -1
  264. package/docs/types/constants.UserSpacesEvent.html +1 -1
  265. package/docs/types/constants.UserSpecificChatInfo.html +1 -1
  266. package/docs/types/constants.UserTimezone.html +1 -1
  267. package/docs/types/constants.UserTimezoneChangedEvent.html +1 -1
  268. package/docs/types/constants.WaitingListEvent.html +1 -1
  269. package/docs/types/constants.WaitingParticipant.html +1 -1
  270. package/docs/types/constants.WaitingRoomUpdate.html +1 -1
  271. package/docs/types/sfu_extended.EventUnion.html +1 -1
  272. package/docs/types/sfu_extended.NotifyUnion.html +1 -1
  273. package/docs/variables/constants.ATTACHMENT_CHUNK_SIZE.html +1 -1
  274. package/docs/variables/constants.ATTACHMENT_ID_LENGTH.html +1 -1
  275. package/docs/variables/constants.WS_CONNECTION_TIMEOUT.html +1 -1
  276. package/docs/variables/constants.WS_PINGS_MISSING_THRESHOLD.html +1 -1
  277. package/docs/variables/constants.WS_PING_INTERVAL_MS.html +1 -1
  278. 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;
@@ -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
  }