nim-web-sdk-ng 10.9.80 → 10.9.90
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/README.md +171 -0
- package/dist/esm/adapters.d.ts +4 -3
- package/dist/esm/nim/src/CloudSessionServiceInterface.d.ts +33 -0
- package/dist/esm/nim/src/CloudStorageServiceInterface.d.ts +26 -0
- package/dist/esm/nim/src/EventServiceInterface.d.ts +22 -0
- package/dist/esm/nim/src/FriendServiceInterface.d.ts +36 -2
- package/dist/esm/nim/src/MiscServiceInterface.d.ts +6 -0
- package/dist/esm/nim/src/MsgLogServiceInterface.d.ts +10 -0
- package/dist/esm/nim/src/MsgServiceInterface.d.ts +34 -0
- package/dist/esm/nim/src/OfflinePushInterface.d.ts +13 -1
- package/dist/esm/nim/src/PassThroughServiceInterface.d.ts +10 -0
- package/dist/esm/nim/src/PluginServiceInterface.d.ts +13 -0
- package/dist/esm/nim/src/QChatMediaServiceInterface.d.ts +18 -0
- package/dist/esm/nim/src/QChatMsgServiceInterface.d.ts +4 -3
- package/dist/esm/nim/src/SessionServiceInterface.d.ts +48 -0
- package/dist/esm/nim/src/SignalingServiceInterface.d.ts +85 -0
- package/dist/esm/nim/src/SuperTeamServiceInterface.d.ts +117 -0
- package/dist/esm/nim/src/SystemMessageServiceInterface.d.ts +15 -0
- package/dist/esm/nim/src/TeamServiceInterface.d.ts +153 -8
- package/dist/esm/nim/src/UserServiceInterface.d.ts +35 -0
- package/dist/esm/nim/src/V2NIMAIService.d.ts +315 -0
- package/dist/esm/nim/src/V2NIMConst.d.ts +5 -0
- package/dist/esm/nim/src/V2NIMConversationGroupService.d.ts +35 -0
- package/dist/esm/nim/src/V2NIMFriendService.d.ts +67 -0
- package/dist/esm/nim/src/V2NIMLocalConversationService.d.ts +8 -0
- package/dist/esm/nim/src/V2NIMLoginService.d.ts +50 -0
- package/dist/esm/nim/src/V2NIMMessageService.d.ts +334 -0
- package/dist/esm/nim/src/V2NIMNotificationService.d.ts +4 -0
- package/dist/esm/nim/src/V2NIMSettingService.d.ts +44 -0
- package/dist/esm/nim/src/V2NIMSignallingService.d.ts +72 -0
- package/dist/esm/nim/src/V2NIMStorageService.d.ts +36 -2
- package/dist/esm/nim/src/V2NIMSubscriptionService.d.ts +23 -0
- package/dist/esm/nim/src/V2NIMTeamService.d.ts +55 -0
- package/dist/esm/nim/src/V2NIMTopicService.d.ts +357 -0
- package/dist/esm/nim/src/V2NIMUserService.d.ts +33 -0
- package/dist/esm/nim/src/index.d.ts +10 -0
- package/dist/esm/nim/src/types.d.ts +5 -7
- package/dist/esm/nim.js +5 -7
- package/dist/v1/CHATROOM_BROWSER_SDK/ChatroomInterface.d.ts +22 -0
- package/dist/v1/CHATROOM_BROWSER_SDK/ChatroomMemberServiceInterface.d.ts +35 -2
- package/dist/v1/CHATROOM_BROWSER_SDK/ChatroomQueueInterface.d.ts +10 -0
- package/dist/v1/CHATROOM_BROWSER_SDK/CloudStorageServiceInterface.d.ts +11 -0
- package/dist/v1/CHATROOM_BROWSER_SDK/types.d.ts +4 -6
- package/dist/v1/CHATROOM_BROWSER_SDK.js +6 -8
- package/dist/v1/CHATROOM_MINIAPP_SDK/ChatroomInterface.d.ts +22 -0
- package/dist/v1/CHATROOM_MINIAPP_SDK/ChatroomMemberServiceInterface.d.ts +35 -2
- package/dist/v1/CHATROOM_MINIAPP_SDK/ChatroomQueueInterface.d.ts +10 -0
- package/dist/v1/CHATROOM_MINIAPP_SDK/CloudStorageServiceInterface.d.ts +11 -0
- package/dist/v1/CHATROOM_MINIAPP_SDK/types.d.ts +4 -6
- package/dist/v1/CHATROOM_MINIAPP_SDK.js +4 -6
- package/dist/v1/CHATROOM_UNIAPP_SDK/ChatroomInterface.d.ts +22 -0
- package/dist/v1/CHATROOM_UNIAPP_SDK/ChatroomMemberServiceInterface.d.ts +35 -2
- package/dist/v1/CHATROOM_UNIAPP_SDK/ChatroomQueueInterface.d.ts +10 -0
- package/dist/v1/CHATROOM_UNIAPP_SDK/CloudStorageServiceInterface.d.ts +11 -0
- package/dist/v1/CHATROOM_UNIAPP_SDK/types.d.ts +4 -6
- package/dist/v1/CHATROOM_UNIAPP_SDK.js +4 -6
- package/dist/v1/NIM_BROWSER_SDK/CloudSessionServiceInterface.d.ts +33 -0
- package/dist/v1/NIM_BROWSER_SDK/CloudStorageServiceInterface.d.ts +26 -0
- package/dist/v1/NIM_BROWSER_SDK/EventServiceInterface.d.ts +22 -0
- package/dist/v1/NIM_BROWSER_SDK/FriendServiceInterface.d.ts +36 -2
- package/dist/v1/NIM_BROWSER_SDK/MiscServiceInterface.d.ts +6 -0
- package/dist/v1/NIM_BROWSER_SDK/MsgLogServiceInterface.d.ts +10 -0
- package/dist/v1/NIM_BROWSER_SDK/MsgServiceInterface.d.ts +34 -0
- package/dist/v1/NIM_BROWSER_SDK/OfflinePushInterface.d.ts +13 -1
- package/dist/v1/NIM_BROWSER_SDK/PassThroughServiceInterface.d.ts +10 -0
- package/dist/v1/NIM_BROWSER_SDK/PluginServiceInterface.d.ts +13 -0
- package/dist/v1/NIM_BROWSER_SDK/QChatMediaServiceInterface.d.ts +18 -0
- package/dist/v1/NIM_BROWSER_SDK/QChatMsgServiceInterface.d.ts +4 -3
- package/dist/v1/NIM_BROWSER_SDK/SessionServiceInterface.d.ts +48 -0
- package/dist/v1/NIM_BROWSER_SDK/SignalingServiceInterface.d.ts +85 -0
- package/dist/v1/NIM_BROWSER_SDK/SuperTeamServiceInterface.d.ts +117 -0
- package/dist/v1/NIM_BROWSER_SDK/SystemMessageServiceInterface.d.ts +15 -0
- package/dist/v1/NIM_BROWSER_SDK/TeamServiceInterface.d.ts +153 -8
- package/dist/v1/NIM_BROWSER_SDK/UserServiceInterface.d.ts +35 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMAIService.d.ts +315 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMConst.d.ts +5 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMConversationGroupService.d.ts +35 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMFriendService.d.ts +67 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMLocalConversationService.d.ts +8 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMLoginService.d.ts +50 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMMessageService.d.ts +334 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMNotificationService.d.ts +4 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMSettingService.d.ts +44 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMSignallingService.d.ts +72 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMStorageService.d.ts +36 -2
- package/dist/v1/NIM_BROWSER_SDK/V2NIMSubscriptionService.d.ts +23 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMTeamService.d.ts +55 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMTopicService.d.ts +357 -0
- package/dist/v1/NIM_BROWSER_SDK/V2NIMUserService.d.ts +33 -0
- package/dist/v1/NIM_BROWSER_SDK/index.d.ts +10 -0
- package/dist/v1/NIM_BROWSER_SDK/types.d.ts +5 -7
- package/dist/v1/NIM_BROWSER_SDK.js +6 -8
- package/dist/v1/NIM_MINIAPP_SDK/CloudSessionServiceInterface.d.ts +33 -0
- package/dist/v1/NIM_MINIAPP_SDK/CloudStorageServiceInterface.d.ts +26 -0
- package/dist/v1/NIM_MINIAPP_SDK/EventServiceInterface.d.ts +22 -0
- package/dist/v1/NIM_MINIAPP_SDK/FriendServiceInterface.d.ts +36 -2
- package/dist/v1/NIM_MINIAPP_SDK/MiscServiceInterface.d.ts +6 -0
- package/dist/v1/NIM_MINIAPP_SDK/MsgLogServiceInterface.d.ts +10 -0
- package/dist/v1/NIM_MINIAPP_SDK/MsgServiceInterface.d.ts +34 -0
- package/dist/v1/NIM_MINIAPP_SDK/OfflinePushInterface.d.ts +13 -1
- package/dist/v1/NIM_MINIAPP_SDK/PassThroughServiceInterface.d.ts +10 -0
- package/dist/v1/NIM_MINIAPP_SDK/PluginServiceInterface.d.ts +13 -0
- package/dist/v1/NIM_MINIAPP_SDK/QChatMediaServiceInterface.d.ts +18 -0
- package/dist/v1/NIM_MINIAPP_SDK/QChatMsgServiceInterface.d.ts +4 -3
- package/dist/v1/NIM_MINIAPP_SDK/SessionServiceInterface.d.ts +48 -0
- package/dist/v1/NIM_MINIAPP_SDK/SignalingServiceInterface.d.ts +85 -0
- package/dist/v1/NIM_MINIAPP_SDK/SuperTeamServiceInterface.d.ts +117 -0
- package/dist/v1/NIM_MINIAPP_SDK/SystemMessageServiceInterface.d.ts +15 -0
- package/dist/v1/NIM_MINIAPP_SDK/TeamServiceInterface.d.ts +153 -8
- package/dist/v1/NIM_MINIAPP_SDK/UserServiceInterface.d.ts +35 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMAIService.d.ts +315 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMConst.d.ts +5 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMConversationGroupService.d.ts +35 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMFriendService.d.ts +67 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMLocalConversationService.d.ts +8 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMLoginService.d.ts +50 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMMessageService.d.ts +334 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMNotificationService.d.ts +4 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMSettingService.d.ts +44 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMSignallingService.d.ts +72 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMStorageService.d.ts +36 -2
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMSubscriptionService.d.ts +23 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMTeamService.d.ts +55 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMTopicService.d.ts +357 -0
- package/dist/v1/NIM_MINIAPP_SDK/V2NIMUserService.d.ts +33 -0
- package/dist/v1/NIM_MINIAPP_SDK/index.d.ts +10 -0
- package/dist/v1/NIM_MINIAPP_SDK/types.d.ts +5 -7
- package/dist/v1/NIM_MINIAPP_SDK.js +4 -6
- package/dist/v1/NIM_UNIAPP_SDK/CloudSessionServiceInterface.d.ts +33 -0
- package/dist/v1/NIM_UNIAPP_SDK/CloudStorageServiceInterface.d.ts +26 -0
- package/dist/v1/NIM_UNIAPP_SDK/EventServiceInterface.d.ts +22 -0
- package/dist/v1/NIM_UNIAPP_SDK/FriendServiceInterface.d.ts +36 -2
- package/dist/v1/NIM_UNIAPP_SDK/MiscServiceInterface.d.ts +6 -0
- package/dist/v1/NIM_UNIAPP_SDK/MsgLogServiceInterface.d.ts +10 -0
- package/dist/v1/NIM_UNIAPP_SDK/MsgServiceInterface.d.ts +34 -0
- package/dist/v1/NIM_UNIAPP_SDK/OfflinePushInterface.d.ts +13 -1
- package/dist/v1/NIM_UNIAPP_SDK/PassThroughServiceInterface.d.ts +10 -0
- package/dist/v1/NIM_UNIAPP_SDK/PluginServiceInterface.d.ts +13 -0
- package/dist/v1/NIM_UNIAPP_SDK/QChatMediaServiceInterface.d.ts +18 -0
- package/dist/v1/NIM_UNIAPP_SDK/QChatMsgServiceInterface.d.ts +4 -3
- package/dist/v1/NIM_UNIAPP_SDK/SessionServiceInterface.d.ts +48 -0
- package/dist/v1/NIM_UNIAPP_SDK/SignalingServiceInterface.d.ts +85 -0
- package/dist/v1/NIM_UNIAPP_SDK/SuperTeamServiceInterface.d.ts +117 -0
- package/dist/v1/NIM_UNIAPP_SDK/SystemMessageServiceInterface.d.ts +15 -0
- package/dist/v1/NIM_UNIAPP_SDK/TeamServiceInterface.d.ts +153 -8
- package/dist/v1/NIM_UNIAPP_SDK/UserServiceInterface.d.ts +35 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMAIService.d.ts +315 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMConst.d.ts +5 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMConversationGroupService.d.ts +35 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMFriendService.d.ts +67 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMLocalConversationService.d.ts +8 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMLoginService.d.ts +50 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMMessageService.d.ts +334 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMNotificationService.d.ts +4 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMSettingService.d.ts +44 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMSignallingService.d.ts +72 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMStorageService.d.ts +36 -2
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMSubscriptionService.d.ts +23 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMTeamService.d.ts +55 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMTopicService.d.ts +357 -0
- package/dist/v1/NIM_UNIAPP_SDK/V2NIMUserService.d.ts +33 -0
- package/dist/v1/NIM_UNIAPP_SDK/index.d.ts +10 -0
- package/dist/v1/NIM_UNIAPP_SDK/types.d.ts +5 -7
- package/dist/v1/NIM_UNIAPP_SDK.js +4 -6
- package/dist/v1/QCHAT_BROWSER_SDK/CloudStorageServiceInterface.d.ts +17 -6
- package/dist/v1/QCHAT_BROWSER_SDK/QChatInterface.d.ts +30 -0
- package/dist/v1/QCHAT_BROWSER_SDK/QChatMediaServiceInterface.d.ts +45 -0
- package/dist/v1/QCHAT_BROWSER_SDK.js +6 -8
- package/dist/v1/QCHAT_UNIAPP_SDK/CloudStorageServiceInterface.d.ts +17 -6
- package/dist/v1/QCHAT_UNIAPP_SDK/QChatInterface.d.ts +30 -0
- package/dist/v1/QCHAT_UNIAPP_SDK/QChatMediaServiceInterface.d.ts +45 -0
- package/dist/v1/QCHAT_UNIAPP_SDK.js +4 -6
- package/dist/v2/CHATROOM_BROWSER_SDK/V2NIMChatroomConst.d.ts +5 -0
- package/dist/v2/CHATROOM_BROWSER_SDK/V2NIMChatroomService.d.ts +123 -2
- package/dist/v2/CHATROOM_BROWSER_SDK/V2NIMStatisticsService.d.ts +41 -0
- package/dist/v2/CHATROOM_BROWSER_SDK/V2NIMStorageService.d.ts +61 -0
- package/dist/v2/CHATROOM_BROWSER_SDK/index.d.ts +11 -1
- package/dist/v2/CHATROOM_BROWSER_SDK.js +6 -8
- package/dist/v2/CHATROOM_MINIAPP_SDK/V2NIMChatroomConst.d.ts +5 -0
- package/dist/v2/CHATROOM_MINIAPP_SDK/V2NIMChatroomService.d.ts +123 -2
- package/dist/v2/CHATROOM_MINIAPP_SDK/V2NIMStatisticsService.d.ts +41 -0
- package/dist/v2/CHATROOM_MINIAPP_SDK/V2NIMStorageService.d.ts +61 -0
- package/dist/v2/CHATROOM_MINIAPP_SDK/index.d.ts +11 -1
- package/dist/v2/CHATROOM_MINIAPP_SDK.js +4 -6
- package/dist/v2/CHATROOM_RN_SDK/V2NIMChatroomConst.d.ts +5 -0
- package/dist/v2/CHATROOM_RN_SDK/V2NIMChatroomService.d.ts +123 -2
- package/dist/v2/CHATROOM_RN_SDK/V2NIMStatisticsService.d.ts +41 -0
- package/dist/v2/CHATROOM_RN_SDK/V2NIMStorageService.d.ts +61 -0
- package/dist/v2/CHATROOM_RN_SDK/index.d.ts +11 -1
- package/dist/v2/CHATROOM_RN_SDK.js +4 -6
- package/dist/v2/CHATROOM_UNIAPP_SDK/V2NIMChatroomConst.d.ts +5 -0
- package/dist/v2/CHATROOM_UNIAPP_SDK/V2NIMChatroomService.d.ts +123 -2
- package/dist/v2/CHATROOM_UNIAPP_SDK/V2NIMStatisticsService.d.ts +41 -0
- package/dist/v2/CHATROOM_UNIAPP_SDK/V2NIMStorageService.d.ts +61 -0
- package/dist/v2/CHATROOM_UNIAPP_SDK/index.d.ts +11 -1
- package/dist/v2/CHATROOM_UNIAPP_SDK.js +4 -6
- package/dist/v2/NIM_BROWSER_SDK/CloudSessionServiceInterface.d.ts +33 -0
- package/dist/v2/NIM_BROWSER_SDK/CloudStorageServiceInterface.d.ts +26 -0
- package/dist/v2/NIM_BROWSER_SDK/EventServiceInterface.d.ts +22 -0
- package/dist/v2/NIM_BROWSER_SDK/FriendServiceInterface.d.ts +36 -2
- package/dist/v2/NIM_BROWSER_SDK/MiscServiceInterface.d.ts +6 -0
- package/dist/v2/NIM_BROWSER_SDK/MsgLogServiceInterface.d.ts +10 -0
- package/dist/v2/NIM_BROWSER_SDK/MsgServiceInterface.d.ts +34 -0
- package/dist/v2/NIM_BROWSER_SDK/OfflinePushInterface.d.ts +13 -1
- package/dist/v2/NIM_BROWSER_SDK/PassThroughServiceInterface.d.ts +10 -0
- package/dist/v2/NIM_BROWSER_SDK/PluginServiceInterface.d.ts +13 -0
- package/dist/v2/NIM_BROWSER_SDK/QChatMediaServiceInterface.d.ts +18 -0
- package/dist/v2/NIM_BROWSER_SDK/QChatMsgServiceInterface.d.ts +4 -3
- package/dist/v2/NIM_BROWSER_SDK/SessionServiceInterface.d.ts +48 -0
- package/dist/v2/NIM_BROWSER_SDK/SignalingServiceInterface.d.ts +85 -0
- package/dist/v2/NIM_BROWSER_SDK/SuperTeamServiceInterface.d.ts +117 -0
- package/dist/v2/NIM_BROWSER_SDK/SystemMessageServiceInterface.d.ts +15 -0
- package/dist/v2/NIM_BROWSER_SDK/TeamServiceInterface.d.ts +153 -8
- package/dist/v2/NIM_BROWSER_SDK/UserServiceInterface.d.ts +35 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMAIService.d.ts +315 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMConst.d.ts +5 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMConversationGroupService.d.ts +35 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMFriendService.d.ts +67 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMLocalConversationService.d.ts +8 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMLoginService.d.ts +50 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMMessageService.d.ts +334 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMNotificationService.d.ts +4 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMSettingService.d.ts +44 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMSignallingService.d.ts +72 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMStorageService.d.ts +36 -2
- package/dist/v2/NIM_BROWSER_SDK/V2NIMSubscriptionService.d.ts +23 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMTeamService.d.ts +55 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMTopicService.d.ts +357 -0
- package/dist/v2/NIM_BROWSER_SDK/V2NIMUserService.d.ts +33 -0
- package/dist/v2/NIM_BROWSER_SDK/index.d.ts +10 -0
- package/dist/v2/NIM_BROWSER_SDK/types.d.ts +5 -7
- package/dist/v2/NIM_BROWSER_SDK.js +6 -8
- package/dist/v2/NIM_MINIAPP_SDK/CloudSessionServiceInterface.d.ts +33 -0
- package/dist/v2/NIM_MINIAPP_SDK/CloudStorageServiceInterface.d.ts +26 -0
- package/dist/v2/NIM_MINIAPP_SDK/EventServiceInterface.d.ts +22 -0
- package/dist/v2/NIM_MINIAPP_SDK/FriendServiceInterface.d.ts +36 -2
- package/dist/v2/NIM_MINIAPP_SDK/MiscServiceInterface.d.ts +6 -0
- package/dist/v2/NIM_MINIAPP_SDK/MsgLogServiceInterface.d.ts +10 -0
- package/dist/v2/NIM_MINIAPP_SDK/MsgServiceInterface.d.ts +34 -0
- package/dist/v2/NIM_MINIAPP_SDK/OfflinePushInterface.d.ts +13 -1
- package/dist/v2/NIM_MINIAPP_SDK/PassThroughServiceInterface.d.ts +10 -0
- package/dist/v2/NIM_MINIAPP_SDK/PluginServiceInterface.d.ts +13 -0
- package/dist/v2/NIM_MINIAPP_SDK/QChatMediaServiceInterface.d.ts +18 -0
- package/dist/v2/NIM_MINIAPP_SDK/QChatMsgServiceInterface.d.ts +4 -3
- package/dist/v2/NIM_MINIAPP_SDK/SessionServiceInterface.d.ts +48 -0
- package/dist/v2/NIM_MINIAPP_SDK/SignalingServiceInterface.d.ts +85 -0
- package/dist/v2/NIM_MINIAPP_SDK/SuperTeamServiceInterface.d.ts +117 -0
- package/dist/v2/NIM_MINIAPP_SDK/SystemMessageServiceInterface.d.ts +15 -0
- package/dist/v2/NIM_MINIAPP_SDK/TeamServiceInterface.d.ts +153 -8
- package/dist/v2/NIM_MINIAPP_SDK/UserServiceInterface.d.ts +35 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMAIService.d.ts +315 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMConst.d.ts +5 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMConversationGroupService.d.ts +35 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMFriendService.d.ts +67 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMLocalConversationService.d.ts +8 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMLoginService.d.ts +50 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMMessageService.d.ts +334 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMNotificationService.d.ts +4 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMSettingService.d.ts +44 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMSignallingService.d.ts +72 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMStorageService.d.ts +36 -2
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMSubscriptionService.d.ts +23 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMTeamService.d.ts +55 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMTopicService.d.ts +357 -0
- package/dist/v2/NIM_MINIAPP_SDK/V2NIMUserService.d.ts +33 -0
- package/dist/v2/NIM_MINIAPP_SDK/index.d.ts +10 -0
- package/dist/v2/NIM_MINIAPP_SDK/types.d.ts +5 -7
- package/dist/v2/NIM_MINIAPP_SDK.js +4 -6
- package/dist/v2/NIM_RN_SDK/CloudSessionServiceInterface.d.ts +33 -0
- package/dist/v2/NIM_RN_SDK/CloudStorageServiceInterface.d.ts +26 -0
- package/dist/v2/NIM_RN_SDK/EventServiceInterface.d.ts +22 -0
- package/dist/v2/NIM_RN_SDK/FriendServiceInterface.d.ts +36 -2
- package/dist/v2/NIM_RN_SDK/MiscServiceInterface.d.ts +6 -0
- package/dist/v2/NIM_RN_SDK/MsgLogServiceInterface.d.ts +10 -0
- package/dist/v2/NIM_RN_SDK/MsgServiceInterface.d.ts +34 -0
- package/dist/v2/NIM_RN_SDK/OfflinePushInterface.d.ts +13 -1
- package/dist/v2/NIM_RN_SDK/PassThroughServiceInterface.d.ts +10 -0
- package/dist/v2/NIM_RN_SDK/PluginServiceInterface.d.ts +13 -0
- package/dist/v2/NIM_RN_SDK/QChatMediaServiceInterface.d.ts +18 -0
- package/dist/v2/NIM_RN_SDK/QChatMsgServiceInterface.d.ts +4 -3
- package/dist/v2/NIM_RN_SDK/SessionServiceInterface.d.ts +48 -0
- package/dist/v2/NIM_RN_SDK/SignalingServiceInterface.d.ts +85 -0
- package/dist/v2/NIM_RN_SDK/SuperTeamServiceInterface.d.ts +117 -0
- package/dist/v2/NIM_RN_SDK/SystemMessageServiceInterface.d.ts +15 -0
- package/dist/v2/NIM_RN_SDK/TeamServiceInterface.d.ts +153 -8
- package/dist/v2/NIM_RN_SDK/UserServiceInterface.d.ts +35 -0
- package/dist/v2/NIM_RN_SDK/V2NIMAIService.d.ts +315 -0
- package/dist/v2/NIM_RN_SDK/V2NIMConst.d.ts +5 -0
- package/dist/v2/NIM_RN_SDK/V2NIMConversationGroupService.d.ts +35 -0
- package/dist/v2/NIM_RN_SDK/V2NIMFriendService.d.ts +67 -0
- package/dist/v2/NIM_RN_SDK/V2NIMLocalConversationService.d.ts +8 -0
- package/dist/v2/NIM_RN_SDK/V2NIMLoginService.d.ts +50 -0
- package/dist/v2/NIM_RN_SDK/V2NIMMessageService.d.ts +334 -0
- package/dist/v2/NIM_RN_SDK/V2NIMNotificationService.d.ts +4 -0
- package/dist/v2/NIM_RN_SDK/V2NIMSettingService.d.ts +44 -0
- package/dist/v2/NIM_RN_SDK/V2NIMSignallingService.d.ts +72 -0
- package/dist/v2/NIM_RN_SDK/V2NIMStorageService.d.ts +36 -2
- package/dist/v2/NIM_RN_SDK/V2NIMSubscriptionService.d.ts +23 -0
- package/dist/v2/NIM_RN_SDK/V2NIMTeamService.d.ts +55 -0
- package/dist/v2/NIM_RN_SDK/V2NIMTopicService.d.ts +357 -0
- package/dist/v2/NIM_RN_SDK/V2NIMUserService.d.ts +33 -0
- package/dist/v2/NIM_RN_SDK/index.d.ts +10 -0
- package/dist/v2/NIM_RN_SDK/types.d.ts +5 -7
- package/dist/v2/NIM_RN_SDK.js +5 -7
- package/dist/v2/NIM_UNIAPP_SDK/CloudSessionServiceInterface.d.ts +33 -0
- package/dist/v2/NIM_UNIAPP_SDK/CloudStorageServiceInterface.d.ts +26 -0
- package/dist/v2/NIM_UNIAPP_SDK/EventServiceInterface.d.ts +22 -0
- package/dist/v2/NIM_UNIAPP_SDK/FriendServiceInterface.d.ts +36 -2
- package/dist/v2/NIM_UNIAPP_SDK/MiscServiceInterface.d.ts +6 -0
- package/dist/v2/NIM_UNIAPP_SDK/MsgLogServiceInterface.d.ts +10 -0
- package/dist/v2/NIM_UNIAPP_SDK/MsgServiceInterface.d.ts +34 -0
- package/dist/v2/NIM_UNIAPP_SDK/OfflinePushInterface.d.ts +13 -1
- package/dist/v2/NIM_UNIAPP_SDK/PassThroughServiceInterface.d.ts +10 -0
- package/dist/v2/NIM_UNIAPP_SDK/PluginServiceInterface.d.ts +13 -0
- package/dist/v2/NIM_UNIAPP_SDK/QChatMediaServiceInterface.d.ts +18 -0
- package/dist/v2/NIM_UNIAPP_SDK/QChatMsgServiceInterface.d.ts +4 -3
- package/dist/v2/NIM_UNIAPP_SDK/SessionServiceInterface.d.ts +48 -0
- package/dist/v2/NIM_UNIAPP_SDK/SignalingServiceInterface.d.ts +85 -0
- package/dist/v2/NIM_UNIAPP_SDK/SuperTeamServiceInterface.d.ts +117 -0
- package/dist/v2/NIM_UNIAPP_SDK/SystemMessageServiceInterface.d.ts +15 -0
- package/dist/v2/NIM_UNIAPP_SDK/TeamServiceInterface.d.ts +153 -8
- package/dist/v2/NIM_UNIAPP_SDK/UserServiceInterface.d.ts +35 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMAIService.d.ts +315 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMConst.d.ts +5 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMConversationGroupService.d.ts +35 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMFriendService.d.ts +67 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMLocalConversationService.d.ts +8 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMLoginService.d.ts +50 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMMessageService.d.ts +334 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMNotificationService.d.ts +4 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMSettingService.d.ts +44 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMSignallingService.d.ts +72 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMStorageService.d.ts +36 -2
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMSubscriptionService.d.ts +23 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMTeamService.d.ts +55 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMTopicService.d.ts +357 -0
- package/dist/v2/NIM_UNIAPP_SDK/V2NIMUserService.d.ts +33 -0
- package/dist/v2/NIM_UNIAPP_SDK/index.d.ts +10 -0
- package/dist/v2/NIM_UNIAPP_SDK/types.d.ts +5 -7
- package/dist/v2/NIM_UNIAPP_SDK.js +4 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,6 +34,10 @@ dist/
|
|
|
34
34
|
├── CHATROOM_MINIAPP_SDK.js v2 聊天室小程序适配版 UMD 格式
|
|
35
35
|
├── CHATROOM_UNIAPP_SDK.js v2 聊天室 UNIAPP 适配版 UMD 格式
|
|
36
36
|
├── CHATROOM_RN_SDK.js v2 聊天室 RN 适配版 UMD 格式
|
|
37
|
+
|── nodejs
|
|
38
|
+
├── nim.js v2 IM Node.js 适配版 ESM 格式
|
|
39
|
+
├── nim.d.ts TypeScript 类型定义入口
|
|
40
|
+
├── nim/ TypeScript 类型定义目录
|
|
37
41
|
|── v1
|
|
38
42
|
├── CHATROOM_BROWSER_SDK.js v1 聊天室浏览器适配版 UMD 格式
|
|
39
43
|
├── CHATROOM_MINIAPP_SDK.js v1 聊天室小程序适配版 UMD 格式
|
|
@@ -77,6 +81,173 @@ async function init() {
|
|
|
77
81
|
init()
|
|
78
82
|
```
|
|
79
83
|
|
|
84
|
+
### Node.js 环境
|
|
85
|
+
|
|
86
|
+
Node.js 版本专为服务端场景设计,支持在 Node.js 环境中使用 NIM SDK 的核心功能。
|
|
87
|
+
|
|
88
|
+
#### 环境要求
|
|
89
|
+
|
|
90
|
+
- **Node.js 版本**: >= 20.0.0(使用原生 `fetch`、`FormData`、`Blob` API)
|
|
91
|
+
- **模块格式**: ESM(ES Modules)
|
|
92
|
+
- **依赖**: `ws`(WebSocket 库,已包含在 SDK 依赖中)
|
|
93
|
+
|
|
94
|
+
#### 安装
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm install nim-web-sdk-ng@">=10"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### 引入方式
|
|
101
|
+
|
|
102
|
+
```js
|
|
103
|
+
// Node.js 环境专用入口
|
|
104
|
+
import NIM from 'nim-web-sdk-ng/dist/nodejs/nim.js'
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
#### 支持的服务模块
|
|
108
|
+
|
|
109
|
+
| 服务模块 | 描述 |
|
|
110
|
+
| ------------------------------- | -------------------------------- |
|
|
111
|
+
| `V2NIMLoginService` | 登录服务 |
|
|
112
|
+
| `V2NIMMessageService` | 消息服务(发送/接收消息) |
|
|
113
|
+
| `V2NIMMessageLogUtil` | 消息日志工具(查询历史消息) |
|
|
114
|
+
| `V2NIMMessageExtendUtil` | 消息扩展工具(快捷评论、PIN 等) |
|
|
115
|
+
| `V2NIMLocalConversationService` | 本地会话服务 |
|
|
116
|
+
| `V2NIMConversationService` | 会话服务 |
|
|
117
|
+
| `V2NIMConversationGroupService` | 会话分组服务 |
|
|
118
|
+
| `V2NIMUserService` | 用户服务 |
|
|
119
|
+
| `V2NIMFriendService` | 好友服务 |
|
|
120
|
+
| `V2NIMTeamService` | 群组服务 |
|
|
121
|
+
| `V2NIMNotificationService` | 通知服务 |
|
|
122
|
+
| `V2NIMStorageService` | 存储服务(文件上传下载) |
|
|
123
|
+
| `V2NIMSettingService` | 设置服务 |
|
|
124
|
+
| `V2NIMSyncService` | 同步服务 |
|
|
125
|
+
| `V2NIMAIService` | AI 服务 |
|
|
126
|
+
| `V2NIMSignallingService` | 信令服务 |
|
|
127
|
+
| `V2NIMPassthroughService` | 透传服务 |
|
|
128
|
+
|
|
129
|
+
#### 基础示例
|
|
130
|
+
|
|
131
|
+
```js
|
|
132
|
+
import NIM from 'nim-web-sdk-ng/dist/nodejs/nim.js'
|
|
133
|
+
|
|
134
|
+
// 创建实例
|
|
135
|
+
const nim = NIM.getInstance({
|
|
136
|
+
appkey: 'YOUR_APPKEY',
|
|
137
|
+
account: 'YOUR_ACCOUNT',
|
|
138
|
+
token: 'YOUR_TOKEN',
|
|
139
|
+
debugLevel: 'debug',
|
|
140
|
+
apiVersion: 'v2'
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
// 监听登录状态
|
|
144
|
+
nim.V2NIMLoginService.on('onLoginStatus', (status) => {
|
|
145
|
+
console.log('登录状态:', status)
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
nim.V2NIMLoginService.on('onConnectStatus', (status) => {
|
|
149
|
+
console.log('连接状态:', status)
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
// 登录
|
|
153
|
+
async function main() {
|
|
154
|
+
try {
|
|
155
|
+
await nim.V2NIMLoginService.login('YOUR_ACCOUNT', 'YOUR_TOKEN')
|
|
156
|
+
console.log('登录成功')
|
|
157
|
+
|
|
158
|
+
// 发送文本消息
|
|
159
|
+
const message = nim.V2NIMMessageCreator.createTextMessage('Hello from Node.js!')
|
|
160
|
+
const conversationId = nim.V2NIMConversationIdUtil.p2pConversationId('TARGET_ACCOUNT')
|
|
161
|
+
await nim.V2NIMMessageService.sendMessage(message, conversationId)
|
|
162
|
+
console.log('消息发送成功')
|
|
163
|
+
} catch (err) {
|
|
164
|
+
console.error('操作失败:', err)
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
main()
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
#### 发送图片消息
|
|
172
|
+
|
|
173
|
+
```js
|
|
174
|
+
import NIM from 'nim-web-sdk-ng/dist/nodejs/nim.js'
|
|
175
|
+
import path from 'path'
|
|
176
|
+
|
|
177
|
+
const nim = NIM.getInstance({
|
|
178
|
+
appkey: 'YOUR_APPKEY',
|
|
179
|
+
account: 'YOUR_ACCOUNT',
|
|
180
|
+
token: 'YOUR_TOKEN',
|
|
181
|
+
apiVersion: 'v2'
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
async function sendImage() {
|
|
185
|
+
await nim.V2NIMLoginService.login('YOUR_ACCOUNT', 'YOUR_TOKEN')
|
|
186
|
+
|
|
187
|
+
// 使用文件路径创建图片消息
|
|
188
|
+
const imagePath = path.join(process.cwd(), 'image.png')
|
|
189
|
+
const message = nim.V2NIMMessageCreator.createImageMessage(imagePath, 'image.png')
|
|
190
|
+
|
|
191
|
+
const conversationId = nim.V2NIMConversationIdUtil.p2pConversationId('TARGET_ACCOUNT')
|
|
192
|
+
|
|
193
|
+
// 发送消息,支持上传进度回调
|
|
194
|
+
const result = await nim.V2NIMMessageService.sendMessage(message, conversationId, {}, (progress) => {
|
|
195
|
+
console.log(`上传进度: ${Math.round(progress * 100)}%`)
|
|
196
|
+
})
|
|
197
|
+
|
|
198
|
+
console.log('图片发送成功:', result.attachment?.url)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
sendImage()
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
#### 查询历史消息
|
|
205
|
+
|
|
206
|
+
```js
|
|
207
|
+
async function getHistory() {
|
|
208
|
+
const conversationId = nim.V2NIMConversationIdUtil.p2pConversationId('TARGET_ACCOUNT')
|
|
209
|
+
|
|
210
|
+
const messages = await nim.V2NIMMessageLogUtil.getMessageList({
|
|
211
|
+
conversationId,
|
|
212
|
+
limit: 50
|
|
213
|
+
})
|
|
214
|
+
|
|
215
|
+
messages.forEach((msg) => {
|
|
216
|
+
console.log(`[${msg.senderId}]: ${msg.text || msg.messageType}`)
|
|
217
|
+
})
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
#### TypeScript 支持
|
|
222
|
+
|
|
223
|
+
Node.js 版本提供完整的 TypeScript 类型定义:
|
|
224
|
+
|
|
225
|
+
```typescript
|
|
226
|
+
import NIM from 'nim-web-sdk-ng/dist/nodejs/nim.js'
|
|
227
|
+
import type V2NIM from 'nim-web-sdk-ng/dist/nodejs/nim'
|
|
228
|
+
|
|
229
|
+
const nim: V2NIM = NIM.getInstance({
|
|
230
|
+
appkey: 'YOUR_APPKEY',
|
|
231
|
+
account: 'YOUR_ACCOUNT',
|
|
232
|
+
token: 'YOUR_TOKEN',
|
|
233
|
+
apiVersion: 'v2'
|
|
234
|
+
})
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
#### 注意事项
|
|
238
|
+
|
|
239
|
+
1. **内存存储**: Node.js 版本使用内存实现 localStorage,数据不会持久化。进程重启后会话和消息缓存将丢失。
|
|
240
|
+
|
|
241
|
+
2. **网络状态**: 网络状态检测返回固定的"已连接"状态,不支持实时网络状态变化监听。
|
|
242
|
+
|
|
243
|
+
3. **电源状态**: 电源状态相关 API 为存根实现,不提供实际功能。
|
|
244
|
+
|
|
245
|
+
4. **文件上传**: 支持通过文件路径上传本地文件,使用原生 `FormData` 和 `fetch` API。
|
|
246
|
+
|
|
247
|
+
5. **WebSocket**: 使用 `ws` 库实现 WebSocket 连接,需确保网络环境允许 WebSocket 连接。
|
|
248
|
+
|
|
249
|
+
6. **长连接管理**: 服务端场景建议实现心跳检测和断线重连逻辑,确保连接稳定性。
|
|
250
|
+
|
|
80
251
|
## IM V1
|
|
81
252
|
|
|
82
253
|
### sdk 选择
|
package/dist/esm/adapters.d.ts
CHANGED
|
@@ -48,7 +48,8 @@ export declare const enum HostEnvTypes {
|
|
|
48
48
|
QQ = 106,
|
|
49
49
|
JD = 107,
|
|
50
50
|
KS = 108,
|
|
51
|
-
APP = 110
|
|
51
|
+
APP = 110,
|
|
52
|
+
NODEJS = 111
|
|
52
53
|
}
|
|
53
54
|
export declare type GetAdapterType = () => RecursivePartial<AdaptersInterface>;
|
|
54
55
|
export interface AdaptersInterface {
|
|
@@ -263,9 +264,9 @@ export interface AdapterSystemInfo {
|
|
|
263
264
|
/**
|
|
264
265
|
* https://docs.popo.netease.com/lingxi/d722dd9717d940a6bff97b207bc06cb4
|
|
265
266
|
*
|
|
266
|
-
* 登录 44 号字段。客户使用的 SDK 产物为,取值有: BROWSER, UNIAPP, MINIAPP, React Native
|
|
267
|
+
* 登录 44 号字段。客户使用的 SDK 产物为,取值有: BROWSER, UNIAPP, MINIAPP, React Native, NodeJs
|
|
267
268
|
*/
|
|
268
|
-
libEnv: 'BROWSER' | 'UNIAPP' | 'MINIAPP' | 'React Native';
|
|
269
|
+
libEnv: 'BROWSER' | 'UNIAPP' | 'MINIAPP' | 'React Native' | 'NodeJs';
|
|
269
270
|
/**
|
|
270
271
|
* 登录时的 42 号字段
|
|
271
272
|
*
|
|
@@ -16,6 +16,17 @@ export interface CloudSessionServiceInterface {
|
|
|
16
16
|
* @locale en
|
|
17
17
|
* Query the list of sessions on the server
|
|
18
18
|
* @locale
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const result = await nim.cloudSession.queryCloudSessionList({
|
|
23
|
+
* minTimestamp: 0,
|
|
24
|
+
* maxTimestamp: Date.now(),
|
|
25
|
+
* limit: 100,
|
|
26
|
+
* includedLastMsg: true
|
|
27
|
+
* })
|
|
28
|
+
* console.log(result.sessionList, result.hasMore)
|
|
29
|
+
* ```
|
|
19
30
|
*/
|
|
20
31
|
queryCloudSessionList(options: NIMEQueryCloudSessionListOptions): Promise<NIMEQueryCloudSessionListResult>;
|
|
21
32
|
/**
|
|
@@ -27,6 +38,13 @@ export interface CloudSessionServiceInterface {
|
|
|
27
38
|
* @locale en
|
|
28
39
|
* Query a specified session
|
|
29
40
|
* @locale
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const session = await nim.cloudSession.queryCloudSession({
|
|
45
|
+
* sessionId: 'p2p-user123'
|
|
46
|
+
* })
|
|
47
|
+
* ```
|
|
30
48
|
*/
|
|
31
49
|
queryCloudSession(options: NIMEQueryCloudSessionOptions): Promise<NIMECloudSession>;
|
|
32
50
|
/**
|
|
@@ -38,6 +56,14 @@ export interface CloudSessionServiceInterface {
|
|
|
38
56
|
* @locale en
|
|
39
57
|
* Update a session on the server
|
|
40
58
|
* @locale
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* await nim.cloudSession.updateCloudSession({
|
|
63
|
+
* sessionId: 'p2p-user123',
|
|
64
|
+
* ext: JSON.stringify({ pinned: true })
|
|
65
|
+
* })
|
|
66
|
+
* ```
|
|
41
67
|
*/
|
|
42
68
|
updateCloudSession(options: NIMEUpdateCloudSessionOptions): Promise<void>;
|
|
43
69
|
/**
|
|
@@ -49,6 +75,13 @@ export interface CloudSessionServiceInterface {
|
|
|
49
75
|
* @locale en
|
|
50
76
|
* Delete a session on the server
|
|
51
77
|
* @locale
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* await nim.cloudSession.deleteCloudSessionList({
|
|
82
|
+
* sessionIdList: ['p2p-user123', 'team-456']
|
|
83
|
+
* })
|
|
84
|
+
* ```
|
|
52
85
|
*/
|
|
53
86
|
deleteCloudSessionList(options: NIMEDeleteCloudSessionListOptions): Promise<void>;
|
|
54
87
|
}
|
|
@@ -15,6 +15,16 @@ export interface CloudStorageServiceInterface {
|
|
|
15
15
|
* @locale en
|
|
16
16
|
* Upload files
|
|
17
17
|
* @locale
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const result = await nim.cloudStorage.uploadFile({
|
|
22
|
+
* file: fileInput.files[0],
|
|
23
|
+
* type: 'image',
|
|
24
|
+
* onProgress: (progress) => console.log(progress.percentageText)
|
|
25
|
+
* })
|
|
26
|
+
* console.log(result.url)
|
|
27
|
+
* ```
|
|
18
28
|
*/
|
|
19
29
|
uploadFile(options: IUploadFileOptions): Promise<UploadFileResult>;
|
|
20
30
|
/**
|
|
@@ -26,6 +36,11 @@ export interface CloudStorageServiceInterface {
|
|
|
26
36
|
* @locale en
|
|
27
37
|
* Convert a shortened URL to a full URL.
|
|
28
38
|
* @locale
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const fullUrl = await nim.cloudStorage.getOriginUrl('https://short.url/abc')
|
|
43
|
+
* ```
|
|
29
44
|
* */
|
|
30
45
|
getOriginUrl(options: string): Promise<string>;
|
|
31
46
|
/**
|
|
@@ -36,6 +51,17 @@ export interface CloudStorageServiceInterface {
|
|
|
36
51
|
* @locale en
|
|
37
52
|
* Get the token for the authorization of file access.
|
|
38
53
|
* @locale
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* // 获取全局token
|
|
58
|
+
* const globalToken = await nim.cloudStorage.getFileToken({ type: 2 })
|
|
59
|
+
* // 获取url鉴权token
|
|
60
|
+
* const urlToken = await nim.cloudStorage.getFileToken({
|
|
61
|
+
* type: 3,
|
|
62
|
+
* urls: ['https://example.com/file1', 'https://example.com/file2']
|
|
63
|
+
* })
|
|
64
|
+
* ```
|
|
39
65
|
*/
|
|
40
66
|
getFileToken(options: GetFileTokenOptions): Promise<GetFileTokenResult | void>;
|
|
41
67
|
}
|
|
@@ -98,6 +98,17 @@ export interface EventServiceInterface {
|
|
|
98
98
|
*
|
|
99
99
|
* Combine unSubscribeEventsByAccounts and unSubscribeEventsByType of IM1
|
|
100
100
|
* @locale
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* // 取消订阅指定账户
|
|
105
|
+
* const result = await nim.event.unSubscribeEvents({
|
|
106
|
+
* type: 1,
|
|
107
|
+
* accounts: ['user1', 'user2']
|
|
108
|
+
* })
|
|
109
|
+
* // 取消订阅该类型下所有账户
|
|
110
|
+
* await nim.event.unSubscribeEvents({ type: 1 })
|
|
111
|
+
* ```
|
|
101
112
|
*/
|
|
102
113
|
unSubscribeEvents(options: UnSubscribeEventsOptions): Promise<UnSubscribeEventsResult>;
|
|
103
114
|
/**
|
|
@@ -111,6 +122,17 @@ export interface EventServiceInterface {
|
|
|
111
122
|
*
|
|
112
123
|
* Combine querySubscribeEventsByAccounts and querySubscribeEventsByType of IM1
|
|
113
124
|
* @locale
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```ts
|
|
128
|
+
* // 查询指定账户的订阅关系
|
|
129
|
+
* const subscriptions = await nim.event.querySubscribeEvents({
|
|
130
|
+
* type: 1,
|
|
131
|
+
* accounts: ['user1', 'user2']
|
|
132
|
+
* })
|
|
133
|
+
* // 查询该类型下所有订阅关系
|
|
134
|
+
* const allSubs = await nim.event.querySubscribeEvents({ type: 1 })
|
|
135
|
+
* ```
|
|
114
136
|
*/
|
|
115
137
|
querySubscribeEvents(options: QuerySubscribeEventsOptions): Promise<MsgEventSubscribe[]>;
|
|
116
138
|
}
|
|
@@ -14,6 +14,11 @@ export interface FriendServiceInterface {
|
|
|
14
14
|
* @locale en
|
|
15
15
|
* Get friend list
|
|
16
16
|
* @locale
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const friends = await nim.friend.getFriends()
|
|
21
|
+
* ```
|
|
17
22
|
*/
|
|
18
23
|
getFriends(): Promise<FriendProfile[]>;
|
|
19
24
|
/**
|
|
@@ -35,9 +40,13 @@ export interface FriendServiceInterface {
|
|
|
35
40
|
* Add as friends directly
|
|
36
41
|
*
|
|
37
42
|
* After user A (the currently logged-in user) directly add user B as a friend, user B does not need to approve it and directly becomes the friend of user A.
|
|
38
|
-
*
|
|
39
|
-
* The value of the “from” field of this type of system notification is the account of the sender (in this case, user A). And the value of the “to” field is the account of the receiver (in this case, user B).
|
|
43
|
+
* The value of the "from" field of this type of system notification is the account of the sender (in this case, user A). And the value of the "to" field is the account of the receiver (in this case, user B).
|
|
40
44
|
* @locale
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const friend = await nim.friend.addFriend({ account: 'accid1', ps: '我是xxx' })
|
|
49
|
+
* ```
|
|
41
50
|
*/
|
|
42
51
|
addFriend(options: AddFriendOptions): Promise<FriendProfile>;
|
|
43
52
|
/**
|
|
@@ -56,6 +65,11 @@ export interface FriendServiceInterface {
|
|
|
56
65
|
* After user A (sender) sends a friend to User B (receiver), user B will receive a system notification whose type is friendRequest and attach.type is applyFriend.
|
|
57
66
|
* After receiving the friend request, user B can approve or reject the friend request.
|
|
58
67
|
* @locale
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* await nim.friend.applyFriend({ account: 'accid1', ps: '请求加为好友' })
|
|
72
|
+
* ```
|
|
59
73
|
*/
|
|
60
74
|
applyFriend(options: ApplyFriendOptions): Promise<void>;
|
|
61
75
|
/**
|
|
@@ -81,6 +95,11 @@ export interface FriendServiceInterface {
|
|
|
81
95
|
*
|
|
82
96
|
* After user B approves the friend request, user A will receive a system notification whose type is friendRequest, attach.type is passFriendApply,
|
|
83
97
|
* @locale
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* await nim.friend.passFriendApply({ idServer: '123456', from: 'applicantAccid' })
|
|
102
|
+
* ```
|
|
84
103
|
*/
|
|
85
104
|
passFriendApply(options: PassFriendApplyOptions): Promise<void>;
|
|
86
105
|
/**
|
|
@@ -101,6 +120,11 @@ export interface FriendServiceInterface {
|
|
|
101
120
|
*
|
|
102
121
|
* After user B rejects the friend request, user A will receive a system notification whose type is friendRequest and attach.type is rejectFriendApply.
|
|
103
122
|
* @locale
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```ts
|
|
126
|
+
* await nim.friend.rejectFriendApply({ idServer: '123456', from: 'applicantAccid', ps: '拒绝原因' })
|
|
127
|
+
* ```
|
|
104
128
|
*/
|
|
105
129
|
rejectFriendApply(options: RejectFriendApplyOptions): Promise<void>;
|
|
106
130
|
/**
|
|
@@ -124,6 +148,11 @@ export interface FriendServiceInterface {
|
|
|
124
148
|
* After user B deletes user A from user B’s friend list, user A will receive a system notification whose type is deleteFriend.
|
|
125
149
|
* The value of the “from” field of this type of system notification is the account of the person who deletes their friend (in this case, user B); and the value of the “to” field is the account of the deleted person (in this case, user A).
|
|
126
150
|
* @locale
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* await nim.friend.deleteFriend({ account: 'accid1', delAlias: true })
|
|
155
|
+
* ```
|
|
127
156
|
*/
|
|
128
157
|
deleteFriend(options: DeleteFriendOptions): Promise<void>;
|
|
129
158
|
/**
|
|
@@ -145,6 +174,11 @@ export interface FriendServiceInterface {
|
|
|
145
174
|
*
|
|
146
175
|
* Only remarks and extension fields can be updated.
|
|
147
176
|
* @locale
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```ts
|
|
180
|
+
* await nim.friend.updateFriend({ account: 'accid1', alias: '备注名', ext: '扩展字段' })
|
|
181
|
+
* ```
|
|
148
182
|
*/
|
|
149
183
|
updateFriend(options: UpdateFriendOptions): Promise<void>;
|
|
150
184
|
}
|
|
@@ -13,6 +13,12 @@ export interface MiscServiceInterface {
|
|
|
13
13
|
*
|
|
14
14
|
* @locale en
|
|
15
15
|
* @locale
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const serverTime = await nim.misc.getServerTime()
|
|
20
|
+
* console.log('Server time:', new Date(serverTime))
|
|
21
|
+
* ```
|
|
16
22
|
*/
|
|
17
23
|
getServerTime(): Promise<number>;
|
|
18
24
|
}
|
|
@@ -16,6 +16,11 @@ export interface MsgLogServiceInterface {
|
|
|
16
16
|
* 要想让下次同步时不再接到这个会话:
|
|
17
17
|
* 1. resetSessionUnreadCount 重置过这个会话的已读信息
|
|
18
18
|
* 2. deleteRoamingMsgs 删除服务器漫游消息
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```js
|
|
22
|
+
* await nim.msgLog.deleteRoamingMsgs({ ids: ['p2p-accid1', 'team-12345'] })
|
|
23
|
+
* ```
|
|
19
24
|
* @locale
|
|
20
25
|
*
|
|
21
26
|
* @locale en
|
|
@@ -125,6 +130,11 @@ export interface MsgLogServiceInterface {
|
|
|
125
130
|
* <ul>
|
|
126
131
|
* <li><a href="https://github.com/netease-im/im-code-example-web/blob/master/im-elite/session/%E5%88%A0%E9%99%A4%E4%BC%9A%E8%AF%9D.js" target="_blank">删除会话</a></li>
|
|
127
132
|
* </ul>
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```js
|
|
136
|
+
* await nim.msgLog.clearHistoryMsgsFromServer({ scene: 'p2p', to: 'accid1' })
|
|
137
|
+
* ```
|
|
128
138
|
* @locale
|
|
129
139
|
*
|
|
130
140
|
* @locale en
|
|
@@ -55,6 +55,15 @@ export interface MsgServiceInterface {
|
|
|
55
55
|
*
|
|
56
56
|
* Reminder messages are used for status reminders in the session, such as the welcome message when entering the session, the prompt message after the session hits a sensitive word, etc.
|
|
57
57
|
* @locale
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const msg = await nim.msg.sendTipMsg({
|
|
62
|
+
* scene: 'p2p',
|
|
63
|
+
* to: 'accid',
|
|
64
|
+
* body: '欢迎进入会话'
|
|
65
|
+
* })
|
|
66
|
+
* ```
|
|
58
67
|
*/
|
|
59
68
|
sendTipMsg(options: ISendTipMsgOptions): Promise<IMMessage>;
|
|
60
69
|
/**
|
|
@@ -111,6 +120,15 @@ export interface MsgServiceInterface {
|
|
|
111
120
|
* @locale en
|
|
112
121
|
* Send custom messages
|
|
113
122
|
* @locale
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```ts
|
|
126
|
+
* const msg = await nim.msg.sendCustomMsg({
|
|
127
|
+
* scene: 'p2p',
|
|
128
|
+
* to: 'accid',
|
|
129
|
+
* attach: JSON.stringify({ type: 'emoji', emoji: '😀' })
|
|
130
|
+
* })
|
|
131
|
+
* ```
|
|
114
132
|
*/
|
|
115
133
|
sendCustomMsg(options: ISendCustomMsgOptions): Promise<IMMessage>;
|
|
116
134
|
/**
|
|
@@ -533,6 +551,13 @@ export interface MsgServiceInterface {
|
|
|
533
551
|
*
|
|
534
552
|
* If you log in to the same account on multiple devices at the same time, the current device and the other devices will receive a one-way deletion event.
|
|
535
553
|
* @locale
|
|
554
|
+
*
|
|
555
|
+
* @example
|
|
556
|
+
* ```ts
|
|
557
|
+
* const result = await nim.msg.deleteSelfMsgs({
|
|
558
|
+
* msgs: [{ idClient: 'xxx', idServer: 'yyy', from: 'accid1', to: 'accid2', time: 1234567890 }]
|
|
559
|
+
* })
|
|
560
|
+
* ```
|
|
536
561
|
*/
|
|
537
562
|
deleteSelfMsgs(options: DeleteSelfMsgsOptions): Promise<DeleteSelfMsgsResult[]>;
|
|
538
563
|
/**
|
|
@@ -619,6 +644,15 @@ export interface MsgServiceInterface {
|
|
|
619
644
|
* @locale en
|
|
620
645
|
* Send message receipt for a group message
|
|
621
646
|
* @locale
|
|
647
|
+
*
|
|
648
|
+
* @example
|
|
649
|
+
* ```ts
|
|
650
|
+
* await nim.msg.sendTeamMsgReceipt({
|
|
651
|
+
* teamMsgReceipts: [
|
|
652
|
+
* { idClient: 'xxx', idServer: 'yyy', teamId: '12345' }
|
|
653
|
+
* ]
|
|
654
|
+
* })
|
|
655
|
+
* ```
|
|
622
656
|
*/
|
|
623
657
|
sendTeamMsgReceipt(options: SendTeamMsgReceiptOptions): Promise<void>;
|
|
624
658
|
/**
|
|
@@ -13,6 +13,18 @@ export interface OfflinePushServiceInterface {
|
|
|
13
13
|
*
|
|
14
14
|
* @locale en
|
|
15
15
|
* @locale
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* nim.offlinePush.setOfflinePushConfig({
|
|
20
|
+
* plugin: NIMUniPlugin,
|
|
21
|
+
* authConfig: {
|
|
22
|
+
* xmAppId: 'YOUR_XIAOMI_APP_ID',
|
|
23
|
+
* xmAppKey: 'YOUR_XIAOMI_APP_KEY',
|
|
24
|
+
* xmCertificateName: 'YOUR_XIAOMI_CERT_NAME'
|
|
25
|
+
* }
|
|
26
|
+
* })
|
|
27
|
+
* ```
|
|
16
28
|
*/
|
|
17
29
|
setOfflinePushConfig(options: NIMESetOfflinePushConfigOptions): void;
|
|
18
30
|
}
|
|
@@ -129,7 +141,7 @@ export interface NIMEOfflinePushAuthConfig {
|
|
|
129
141
|
* @locale
|
|
130
142
|
*
|
|
131
143
|
* @locale en
|
|
132
|
-
* Dedicated for push notification; update and upload the device token of the manufacturer
|
|
144
|
+
* Dedicated for push notification; update and upload the device token of the manufacturer's push notification services (APNs, Xiaomi push, etc.)
|
|
133
145
|
* @locale
|
|
134
146
|
*/
|
|
135
147
|
export interface NIMEUpdatePushTokenOptions {
|
|
@@ -14,6 +14,16 @@ export interface PassThroughServiceInterface {
|
|
|
14
14
|
* @locale en
|
|
15
15
|
* Transparent transmission protocol
|
|
16
16
|
* @locale
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const result = await nim.passThrough.request({
|
|
21
|
+
* path: '/api/custom/endpoint',
|
|
22
|
+
* method: 2, // POST
|
|
23
|
+
* header: JSON.stringify({ 'Content-Type': 'application/json' }),
|
|
24
|
+
* body: JSON.stringify({ key: 'value' })
|
|
25
|
+
* })
|
|
26
|
+
* ```
|
|
17
27
|
*/
|
|
18
28
|
request(options: RequestProxyOptions): Promise<RequestProxyResult>;
|
|
19
29
|
}
|
|
@@ -18,6 +18,14 @@ export interface PluginServiceInterface {
|
|
|
18
18
|
*
|
|
19
19
|
* Note: It is recommended that you use the HTTP interface to obtain a list of available connection addresses. See the server documentation for details.
|
|
20
20
|
* @locale
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const addresses = await nim.plugin.getChatroomAddress({
|
|
25
|
+
* chatroomId: '12345',
|
|
26
|
+
* ipType: 0 // IPv4
|
|
27
|
+
* })
|
|
28
|
+
* ```
|
|
21
29
|
*/
|
|
22
30
|
getChatroomAddress(options: GetChatroomAddressOptions): Promise<string[]>;
|
|
23
31
|
/**
|
|
@@ -33,6 +41,11 @@ export interface PluginServiceInterface {
|
|
|
33
41
|
*
|
|
34
42
|
* Note: It is recommended that you use the HTTP interface to obtain a list of available connection addresses. See the server documentation for details.
|
|
35
43
|
* @locale
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const addresses = await nim.plugin.getQChatAddress({ ipType: 0 })
|
|
48
|
+
* ```
|
|
36
49
|
*/
|
|
37
50
|
getQChatAddress(options?: GetQChatAddressOptions): Promise<string[]>;
|
|
38
51
|
}
|
|
@@ -8,14 +8,32 @@ import { NEDeviceBaseInfo, NEDeviceSwitchInfo } from 'neroom-web-sdk';
|
|
|
8
8
|
export interface QChatMediaServiceInterface {
|
|
9
9
|
/**
|
|
10
10
|
* 初始化
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* await qchat.qchatMedia.initQChatMedia({ debug: false })
|
|
15
|
+
* ```
|
|
11
16
|
*/
|
|
12
17
|
initQChatMedia(options: InitOptions): Promise<void>;
|
|
13
18
|
/**
|
|
14
19
|
* 登录圈组多媒体服务,必须先初始化后在调用该接口
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* await qchat.qchatMedia.loginByIM()
|
|
24
|
+
* ```
|
|
15
25
|
*/
|
|
16
26
|
loginByIM(): Promise<void>;
|
|
17
27
|
/**
|
|
18
28
|
* 连接圈组多媒体频道(房间),必须先登录后再调用该接口
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* await qchat.qchatMedia.connectChannel({
|
|
33
|
+
* serverId: '123456',
|
|
34
|
+
* channelId: '789'
|
|
35
|
+
* })
|
|
36
|
+
* ```
|
|
19
37
|
*/
|
|
20
38
|
connectChannel(options: ConnectOptions): Promise<void>;
|
|
21
39
|
/**
|
|
@@ -275,10 +275,11 @@ export interface IUploadFileOptions {
|
|
|
275
275
|
/**
|
|
276
276
|
* maxSize 限制文件大小。
|
|
277
277
|
*
|
|
278
|
-
*
|
|
278
|
+
* 对浏览器生效(v10.0.0+)
|
|
279
279
|
*
|
|
280
|
-
* uni-app
|
|
281
|
-
*
|
|
280
|
+
* 而在 uni-app、小程序等 filePath 上传场景中,调用 stat 方法检测生效 (v10.9.90+)。
|
|
281
|
+
*
|
|
282
|
+
* 若宿主环境不支持文件大小探查,则仍建议开发者在选择文件后自行判断,参考 wx.chooseImage、uni.chooseImage 等端能力。
|
|
282
283
|
*/
|
|
283
284
|
maxSize?: number;
|
|
284
285
|
/**
|