node-nim 9.12.0 → 9.13.0
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/node-nim.js +57 -82
- package/dist/node-nim.js.map +1 -1
- package/dist/v2/v2_nim_instance.js +44 -0
- package/dist/v2/v2_nim_instance.js.map +1 -0
- package/dist/v2/v2_nim_login_service.js +124 -0
- package/dist/v2/v2_nim_login_service.js.map +1 -0
- package/dist/v2_def/v2_nim_callback_def.js +3 -0
- package/dist/v2_def/v2_nim_callback_def.js.map +1 -0
- package/dist/v2_def/v2_nim_enum_def.js +326 -0
- package/dist/v2_def/v2_nim_enum_def.js.map +1 -0
- package/dist/v2_def/v2_nim_struct_def.js +3 -0
- package/dist/v2_def/v2_nim_struct_def.js.map +1 -0
- package/package.json +1 -1
- package/types/node-nim.d.ts +3 -27
- package/types/v2/v2_nim_instance.d.ts +25 -0
- package/types/v2/v2_nim_login_service.d.ts +96 -0
- package/types/v2_def/v2_nim_callback_def.d.ts +20 -0
- package/types/v2_def/v2_nim_enum_def.d.ts +300 -0
- package/types/v2_def/v2_nim_struct_def.d.ts +338 -0
package/dist/node-nim.js
CHANGED
|
@@ -14,88 +14,62 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.qchat = exports.chatroom = exports.nim = exports.QChat = exports.ChatRoom = exports.NIM = exports.QChatRoleModule = exports.QChatAttachmentModule = exports.QChatSystemNotificationModule = exports.QChatMessageModule = exports.QChatChannelCategoryModule = exports.QChatChannelModule = exports.QChatServerModule = exports.QChatInstanceModule = exports.ChatRoomModule = exports.NIMTalkEx = exports.NIMPlugin = exports.NIMUser = exports.NIMTool = exports.NIMTeam = exports.NIMTalk = exports.NIMSysMsg = exports.NIMSuperTeam = exports.NIMSubscribeEvent = exports.NIMSession = exports.NIMPassThroughProxy = exports.NIMOnlineSession = exports.NIMNOS = exports.NIMMsgLog = exports.NIMGlobal = exports.NIMFriend = exports.NIMDataSync = exports.NIMClient = void 0;
|
|
18
|
-
|
|
17
|
+
exports.v2 = exports.qchat = exports.chatroom = exports.nim = exports.QChat = exports.ChatRoom = exports.NIM = exports.QChatRoleModule = exports.QChatAttachmentModule = exports.QChatSystemNotificationModule = exports.QChatMessageModule = exports.QChatChannelCategoryModule = exports.QChatChannelModule = exports.QChatServerModule = exports.QChatInstanceModule = exports.ChatRoomModule = exports.NIMTalkEx = exports.NIMPlugin = exports.NIMUser = exports.NIMTool = exports.NIMTeam = exports.NIMTalk = exports.NIMSysMsg = exports.NIMSuperTeam = exports.NIMSubscribeEvent = exports.NIMSession = exports.NIMPassThroughProxy = exports.NIMOnlineSession = exports.NIMNOS = exports.NIMMsgLog = exports.NIMGlobal = exports.NIMFriend = exports.NIMDataSync = exports.NIMClient = void 0;
|
|
18
|
+
const client_1 = require("./nim/client");
|
|
19
19
|
Object.defineProperty(exports, "NIMClient", { enumerable: true, get: function () { return client_1.NIMClient; } });
|
|
20
|
-
|
|
20
|
+
const data_sync_1 = require("./nim/data_sync");
|
|
21
21
|
Object.defineProperty(exports, "NIMDataSync", { enumerable: true, get: function () { return data_sync_1.NIMDataSync; } });
|
|
22
|
-
|
|
22
|
+
const friend_1 = require("./nim/friend");
|
|
23
23
|
Object.defineProperty(exports, "NIMFriend", { enumerable: true, get: function () { return friend_1.NIMFriend; } });
|
|
24
|
-
|
|
24
|
+
const global_1 = require("./nim/global");
|
|
25
25
|
Object.defineProperty(exports, "NIMGlobal", { enumerable: true, get: function () { return global_1.NIMGlobal; } });
|
|
26
|
-
|
|
26
|
+
const msglog_1 = require("./nim/msglog");
|
|
27
27
|
Object.defineProperty(exports, "NIMMsgLog", { enumerable: true, get: function () { return msglog_1.NIMMsgLog; } });
|
|
28
|
-
|
|
28
|
+
const nos_1 = require("./nim/nos");
|
|
29
29
|
Object.defineProperty(exports, "NIMNOS", { enumerable: true, get: function () { return nos_1.NIMNOS; } });
|
|
30
|
-
|
|
30
|
+
const online_session_1 = require("./nim/online_session");
|
|
31
31
|
Object.defineProperty(exports, "NIMOnlineSession", { enumerable: true, get: function () { return online_session_1.NIMOnlineSession; } });
|
|
32
|
-
|
|
32
|
+
const pass_through_proxy_1 = require("./nim/pass_through_proxy");
|
|
33
33
|
Object.defineProperty(exports, "NIMPassThroughProxy", { enumerable: true, get: function () { return pass_through_proxy_1.NIMPassThroughProxy; } });
|
|
34
|
-
|
|
34
|
+
const session_1 = require("./nim/session");
|
|
35
35
|
Object.defineProperty(exports, "NIMSession", { enumerable: true, get: function () { return session_1.NIMSession; } });
|
|
36
|
-
|
|
36
|
+
const subscribe_event_1 = require("./nim/subscribe_event");
|
|
37
37
|
Object.defineProperty(exports, "NIMSubscribeEvent", { enumerable: true, get: function () { return subscribe_event_1.NIMSubscribeEvent; } });
|
|
38
|
-
|
|
38
|
+
const super_team_1 = require("./nim/super_team");
|
|
39
39
|
Object.defineProperty(exports, "NIMSuperTeam", { enumerable: true, get: function () { return super_team_1.NIMSuperTeam; } });
|
|
40
|
-
|
|
40
|
+
const sysmsg_1 = require("./nim/sysmsg");
|
|
41
41
|
Object.defineProperty(exports, "NIMSysMsg", { enumerable: true, get: function () { return sysmsg_1.NIMSysMsg; } });
|
|
42
|
-
|
|
42
|
+
const talk_1 = require("./nim/talk");
|
|
43
43
|
Object.defineProperty(exports, "NIMTalk", { enumerable: true, get: function () { return talk_1.NIMTalk; } });
|
|
44
|
-
|
|
44
|
+
const team_1 = require("./nim/team");
|
|
45
45
|
Object.defineProperty(exports, "NIMTeam", { enumerable: true, get: function () { return team_1.NIMTeam; } });
|
|
46
|
-
|
|
46
|
+
const tool_1 = require("./nim/tool");
|
|
47
47
|
Object.defineProperty(exports, "NIMTool", { enumerable: true, get: function () { return tool_1.NIMTool; } });
|
|
48
|
-
|
|
48
|
+
const user_1 = require("./nim/user");
|
|
49
49
|
Object.defineProperty(exports, "NIMUser", { enumerable: true, get: function () { return user_1.NIMUser; } });
|
|
50
|
-
|
|
50
|
+
const plugin_1 = require("./nim/plugin");
|
|
51
51
|
Object.defineProperty(exports, "NIMPlugin", { enumerable: true, get: function () { return plugin_1.NIMPlugin; } });
|
|
52
|
-
|
|
52
|
+
const talkex_1 = require("./nim/talkex");
|
|
53
53
|
Object.defineProperty(exports, "NIMTalkEx", { enumerable: true, get: function () { return talkex_1.NIMTalkEx; } });
|
|
54
|
-
|
|
54
|
+
const chatroom_1 = require("./chatroom/chatroom");
|
|
55
55
|
Object.defineProperty(exports, "ChatRoomModule", { enumerable: true, get: function () { return chatroom_1.ChatRoomModule; } });
|
|
56
|
-
|
|
56
|
+
const instance_1 = require("./qchat/instance");
|
|
57
57
|
Object.defineProperty(exports, "QChatInstanceModule", { enumerable: true, get: function () { return instance_1.QChatInstanceModule; } });
|
|
58
|
-
|
|
58
|
+
const server_1 = require("./qchat/server");
|
|
59
59
|
Object.defineProperty(exports, "QChatServerModule", { enumerable: true, get: function () { return server_1.QChatServerModule; } });
|
|
60
|
-
|
|
60
|
+
const channel_1 = require("./qchat/channel");
|
|
61
61
|
Object.defineProperty(exports, "QChatChannelModule", { enumerable: true, get: function () { return channel_1.QChatChannelModule; } });
|
|
62
|
-
|
|
62
|
+
const channel_category_1 = require("./qchat/channel_category");
|
|
63
63
|
Object.defineProperty(exports, "QChatChannelCategoryModule", { enumerable: true, get: function () { return channel_category_1.QChatChannelCategoryModule; } });
|
|
64
|
-
|
|
64
|
+
const message_1 = require("./qchat/message");
|
|
65
65
|
Object.defineProperty(exports, "QChatMessageModule", { enumerable: true, get: function () { return message_1.QChatMessageModule; } });
|
|
66
|
-
|
|
66
|
+
const system_notification_1 = require("./qchat/system_notification");
|
|
67
67
|
Object.defineProperty(exports, "QChatSystemNotificationModule", { enumerable: true, get: function () { return system_notification_1.QChatSystemNotificationModule; } });
|
|
68
|
-
|
|
68
|
+
const attachment_1 = require("./qchat/attachment");
|
|
69
69
|
Object.defineProperty(exports, "QChatAttachmentModule", { enumerable: true, get: function () { return attachment_1.QChatAttachmentModule; } });
|
|
70
|
-
|
|
70
|
+
const role_1 = require("./qchat/role");
|
|
71
71
|
Object.defineProperty(exports, "QChatRoleModule", { enumerable: true, get: function () { return role_1.QChatRoleModule; } });
|
|
72
|
-
const
|
|
73
|
-
const data_sync_2 = require("./nim/data_sync");
|
|
74
|
-
const friend_2 = require("./nim/friend");
|
|
75
|
-
const global_2 = require("./nim/global");
|
|
76
|
-
const msglog_2 = require("./nim/msglog");
|
|
77
|
-
const nos_2 = require("./nim/nos");
|
|
78
|
-
const online_session_2 = require("./nim/online_session");
|
|
79
|
-
const pass_through_proxy_2 = require("./nim/pass_through_proxy");
|
|
80
|
-
const session_2 = require("./nim/session");
|
|
81
|
-
const subscribe_event_2 = require("./nim/subscribe_event");
|
|
82
|
-
const super_team_2 = require("./nim/super_team");
|
|
83
|
-
const sysmsg_2 = require("./nim/sysmsg");
|
|
84
|
-
const talk_2 = require("./nim/talk");
|
|
85
|
-
const team_2 = require("./nim/team");
|
|
86
|
-
const tool_2 = require("./nim/tool");
|
|
87
|
-
const user_2 = require("./nim/user");
|
|
88
|
-
const plugin_2 = require("./nim/plugin");
|
|
89
|
-
const talkex_2 = require("./nim/talkex");
|
|
90
|
-
const chatroom_2 = require("./chatroom/chatroom");
|
|
91
|
-
const instance_2 = require("./qchat/instance");
|
|
92
|
-
const server_2 = require("./qchat/server");
|
|
93
|
-
const channel_2 = require("./qchat/channel");
|
|
94
|
-
const channel_category_2 = require("./qchat/channel_category");
|
|
95
|
-
const message_2 = require("./qchat/message");
|
|
96
|
-
const system_notification_2 = require("./qchat/system_notification");
|
|
97
|
-
const attachment_2 = require("./qchat/attachment");
|
|
98
|
-
const role_2 = require("./qchat/role");
|
|
72
|
+
const v2_nim_instance_1 = require("./v2/v2_nim_instance");
|
|
99
73
|
__exportStar(require("./nim_def/client_def"), exports);
|
|
100
74
|
__exportStar(require("./nim_def/data_sync_def"), exports);
|
|
101
75
|
__exportStar(require("./nim_def/friend_def"), exports);
|
|
@@ -124,24 +98,24 @@ __exportStar(require("./qchat_def/attachment_def"), exports);
|
|
|
124
98
|
__exportStar(require("./qchat_def/role_def"), exports);
|
|
125
99
|
class NIM {
|
|
126
100
|
constructor() {
|
|
127
|
-
this.client = new
|
|
128
|
-
this.dataSync = new
|
|
129
|
-
this.friend = new
|
|
130
|
-
this.global = new
|
|
131
|
-
this.msgLog = new
|
|
132
|
-
this.nos = new
|
|
133
|
-
this.onlineSession = new
|
|
134
|
-
this.passThroughProxy = new
|
|
135
|
-
this.session = new
|
|
136
|
-
this.subscribeEvent = new
|
|
137
|
-
this.superTeam = new
|
|
138
|
-
this.sysMsg = new
|
|
139
|
-
this.talk = new
|
|
140
|
-
this.team = new
|
|
141
|
-
this.tool = new
|
|
142
|
-
this.user = new
|
|
143
|
-
this.plugin = new
|
|
144
|
-
this.talkEx = new
|
|
101
|
+
this.client = new client_1.NIMClient();
|
|
102
|
+
this.dataSync = new data_sync_1.NIMDataSync();
|
|
103
|
+
this.friend = new friend_1.NIMFriend();
|
|
104
|
+
this.global = new global_1.NIMGlobal();
|
|
105
|
+
this.msgLog = new msglog_1.NIMMsgLog();
|
|
106
|
+
this.nos = new nos_1.NIMNOS();
|
|
107
|
+
this.onlineSession = new online_session_1.NIMOnlineSession();
|
|
108
|
+
this.passThroughProxy = new pass_through_proxy_1.NIMPassThroughProxy();
|
|
109
|
+
this.session = new session_1.NIMSession();
|
|
110
|
+
this.subscribeEvent = new subscribe_event_1.NIMSubscribeEvent();
|
|
111
|
+
this.superTeam = new super_team_1.NIMSuperTeam();
|
|
112
|
+
this.sysMsg = new sysmsg_1.NIMSysMsg();
|
|
113
|
+
this.talk = new talk_1.NIMTalk();
|
|
114
|
+
this.team = new team_1.NIMTeam();
|
|
115
|
+
this.tool = new tool_1.NIMTool();
|
|
116
|
+
this.user = new user_1.NIMUser();
|
|
117
|
+
this.plugin = new plugin_1.NIMPlugin();
|
|
118
|
+
this.talkEx = new talkex_1.NIMTalkEx();
|
|
145
119
|
}
|
|
146
120
|
initEventHandlers() {
|
|
147
121
|
this.client.initEventHandlers();
|
|
@@ -165,19 +139,19 @@ class NIM {
|
|
|
165
139
|
}
|
|
166
140
|
}
|
|
167
141
|
exports.NIM = NIM;
|
|
168
|
-
class ChatRoom extends
|
|
142
|
+
class ChatRoom extends chatroom_1.ChatRoomModule {
|
|
169
143
|
}
|
|
170
144
|
exports.ChatRoom = ChatRoom;
|
|
171
145
|
class QChat {
|
|
172
146
|
constructor() {
|
|
173
|
-
this.instance = new
|
|
174
|
-
this.server = new
|
|
175
|
-
this.channel = new
|
|
176
|
-
this.channelCategory = new
|
|
177
|
-
this.message = new
|
|
178
|
-
this.systemNotification = new
|
|
179
|
-
this.attachment = new
|
|
180
|
-
this.role = new
|
|
147
|
+
this.instance = new instance_1.QChatInstanceModule();
|
|
148
|
+
this.server = new server_1.QChatServerModule();
|
|
149
|
+
this.channel = new channel_1.QChatChannelModule();
|
|
150
|
+
this.channelCategory = new channel_category_1.QChatChannelCategoryModule();
|
|
151
|
+
this.message = new message_1.QChatMessageModule();
|
|
152
|
+
this.systemNotification = new system_notification_1.QChatSystemNotificationModule();
|
|
153
|
+
this.attachment = new attachment_1.QChatAttachmentModule();
|
|
154
|
+
this.role = new role_1.QChatRoleModule();
|
|
181
155
|
}
|
|
182
156
|
initEventHandlers() {
|
|
183
157
|
this.instance.initEventHandlers();
|
|
@@ -194,4 +168,5 @@ exports.QChat = QChat;
|
|
|
194
168
|
exports.nim = new NIM();
|
|
195
169
|
exports.chatroom = new ChatRoom();
|
|
196
170
|
exports.qchat = new QChat();
|
|
171
|
+
exports.v2 = new v2_nim_instance_1.V2NIMInstance();
|
|
197
172
|
//# sourceMappingURL=node-nim.js.map
|
package/dist/node-nim.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-n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|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.V2NIMInstance = void 0;
|
|
7
|
+
const loader_1 = __importDefault(require("../loader"));
|
|
8
|
+
const eventemitter3_1 = require("eventemitter3");
|
|
9
|
+
const v2_nim_login_service_1 = require("./v2_nim_login_service");
|
|
10
|
+
class V2NIMInstance extends eventemitter3_1.EventEmitter {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.instance = new loader_1.default.V2NIMInstance({ emit: this.emit.bind(this) });
|
|
14
|
+
this.loginService = null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 初始化
|
|
18
|
+
* @param option - 初始化选项
|
|
19
|
+
* @returns V2NIMError | null
|
|
20
|
+
* @example
|
|
21
|
+
*/
|
|
22
|
+
init(option) {
|
|
23
|
+
let error = this.instance.init(option);
|
|
24
|
+
if (error) {
|
|
25
|
+
return error;
|
|
26
|
+
}
|
|
27
|
+
this.loginService = new v2_nim_login_service_1.V2NIMLoginService();
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
/** @brief 反初始化
|
|
31
|
+
* @return V2NIMError | null
|
|
32
|
+
*/
|
|
33
|
+
uninit() {
|
|
34
|
+
return this.instance.uninit();
|
|
35
|
+
}
|
|
36
|
+
/** @brief 获取登录服务
|
|
37
|
+
* @return V2NIMLoginService
|
|
38
|
+
*/
|
|
39
|
+
getLoginService() {
|
|
40
|
+
return this.loginService;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.V2NIMInstance = V2NIMInstance;
|
|
44
|
+
//# sourceMappingURL=v2_nim_instance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2_nim_instance.js","sourceRoot":"","sources":["../../ts/v2/v2_nim_instance.ts"],"names":[],"mappings":";;;;;;AACA,uDAA2B;AAC3B,iDAA4C;AAC5C,iEAA0D;AAI1D,MAAa,aAAc,SAAQ,4BAAiC;IAGhE;QACI,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAG,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACrE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAA;IAC5B,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,MAAuB;QACxB,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,KAAK,EAAE;YACP,OAAO,KAAK,CAAA;SACf;QACD,IAAI,CAAC,YAAY,GAAG,IAAI,wCAAiB,EAAE,CAAA;QAC3C,OAAO,IAAI,CAAA;IACf,CAAC;IAED;;OAEG;IACH,MAAM;QACF,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA;IACjC,CAAC;IAED;;OAEG;IACH,eAAe;QACX,OAAO,IAAI,CAAC,YAAY,CAAA;IAC5B,CAAC;CACJ;AArCD,sCAqCC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.V2NIMLoginDetail = exports.V2NIMLoginService = void 0;
|
|
7
|
+
const loader_1 = __importDefault(require("../loader"));
|
|
8
|
+
const eventemitter3_1 = require("eventemitter3");
|
|
9
|
+
class V2NIMLoginService extends eventemitter3_1.EventEmitter {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.instance = new loader_1.default.V2NIMLoginService({ emit: this.emit.bind(this) });
|
|
13
|
+
this.loginDetail = new V2NIMLoginDetail();
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 登录接口
|
|
17
|
+
* @param account 账号
|
|
18
|
+
* @param token 密码
|
|
19
|
+
* @param option 登录选项
|
|
20
|
+
* @returns Promise<void>
|
|
21
|
+
*/
|
|
22
|
+
login(account, token, option) {
|
|
23
|
+
return new Promise((resolve, reject) => {
|
|
24
|
+
this.instance.login(account, token, option, () => {
|
|
25
|
+
resolve();
|
|
26
|
+
}, (error) => {
|
|
27
|
+
reject(error);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 登出接口
|
|
33
|
+
* @returns Promise<void>
|
|
34
|
+
*/
|
|
35
|
+
logout() {
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
this.instance.logout(() => {
|
|
38
|
+
resolve();
|
|
39
|
+
}, (error) => {
|
|
40
|
+
reject(error);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 获取当前登录用户
|
|
46
|
+
* @returns string 当前登录用户
|
|
47
|
+
*/
|
|
48
|
+
getLoginUser() {
|
|
49
|
+
return this.instance.getLoginUser();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* 获取登录状态
|
|
53
|
+
* @returns V2NIMLoginStatus 登录状态
|
|
54
|
+
*/
|
|
55
|
+
getLoginStatus() {
|
|
56
|
+
return this.instance.getLoginStatus();
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 获取登录客户端列表
|
|
60
|
+
* @returns V2NIMLoginClient[] 登录客户端列表
|
|
61
|
+
*/
|
|
62
|
+
getLoginClients() {
|
|
63
|
+
return this.instance.getLoginClients();
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 踢掉登录客户端下线
|
|
67
|
+
* @param client 登录客户端
|
|
68
|
+
* @returns Promise<void>
|
|
69
|
+
*/
|
|
70
|
+
kickOffline(client) {
|
|
71
|
+
return new Promise((resolve, reject) => {
|
|
72
|
+
this.instance.kickOffline(client, () => {
|
|
73
|
+
resolve();
|
|
74
|
+
}, (error) => {
|
|
75
|
+
reject(error);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* 获取被踢下线原因
|
|
81
|
+
* @returns V2NIMKickedOfflineDetail 被踢下线原因
|
|
82
|
+
*/
|
|
83
|
+
getKickedOfflineDetail() {
|
|
84
|
+
return this.instance.getKickedOfflineDetail();
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 获取登录详情信息
|
|
88
|
+
* @returns V2NIMLoginDetail 登录详情信息
|
|
89
|
+
*/
|
|
90
|
+
getLoginDetail() {
|
|
91
|
+
return this.loginDetail;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.V2NIMLoginService = V2NIMLoginService;
|
|
95
|
+
class V2NIMLoginDetail extends eventemitter3_1.EventEmitter {
|
|
96
|
+
constructor() {
|
|
97
|
+
super();
|
|
98
|
+
this.instance = new loader_1.default.V2NIMLoginDetail({ emit: this.emit.bind(this) });
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* 获取连接状态
|
|
102
|
+
* @returns V2NIMConnectStatus 连接状态
|
|
103
|
+
*/
|
|
104
|
+
getConnectStatus() {
|
|
105
|
+
return this.instance.getConnectStatus();
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* 获取数据同步状态
|
|
109
|
+
* @returns V2NIMDataSyncDetail[] 数据同步状态列表
|
|
110
|
+
*/
|
|
111
|
+
getDataSync() {
|
|
112
|
+
return this.instance.getDataSync();
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* 设置获取重连延时回调
|
|
116
|
+
* @param provider 获取重连延时回调
|
|
117
|
+
* @returns void
|
|
118
|
+
*/
|
|
119
|
+
setReconnectDelayProvider(provider) {
|
|
120
|
+
this.instance.setReconnectDelayProvider(provider);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
exports.V2NIMLoginDetail = V2NIMLoginDetail;
|
|
124
|
+
//# sourceMappingURL=v2_nim_login_service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2_nim_login_service.js","sourceRoot":"","sources":["../../ts/v2/v2_nim_login_service.ts"],"names":[],"mappings":";;;;;;AACA,uDAA2B;AAC3B,iDAA4C;AAc5C,MAAa,iBAAkB,SAAQ,4BAAqC;IAGxE;QACI,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAG,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACzE,IAAI,CAAC,WAAW,GAAG,IAAI,gBAAgB,EAAE,CAAA;IAC7C,CAAC;IACD;;;;;;OAMG;IACH,KAAK,CAAC,OAAe,EAAE,KAAa,EAAE,MAAwB;QAC1D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,IAAI,CAAC,QAAQ,CAAC,KAAK,CACf,OAAO,EACP,KAAK,EACL,MAAM,EACN,GAAG,EAAE;gBACD,OAAO,EAAE,CAAA;YACb,CAAC,EACD,CAAC,KAAiB,EAAE,EAAE;gBAClB,MAAM,CAAC,KAAK,CAAC,CAAA;YACjB,CAAC,CACJ,CAAA;QACL,CAAC,CAAC,CAAA;IACN,CAAC;IAED;;;OAGG;IACH,MAAM;QACF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAChB,GAAG,EAAE;gBACD,OAAO,EAAE,CAAA;YACb,CAAC,EACD,CAAC,KAAiB,EAAE,EAAE;gBAClB,MAAM,CAAC,KAAK,CAAC,CAAA;YACjB,CAAC,CACJ,CAAA;QACL,CAAC,CAAC,CAAA;IACN,CAAC;IAED;;;OAGG;IACH,YAAY;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAA;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