node-nim 9.14.2 → 9.14.4

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 (132) hide show
  1. package/dist/chatroom/chatroom.js +262 -262
  2. package/dist/chatroom_def/chatroom_def.js +119 -119
  3. package/dist/loader.js +35 -35
  4. package/dist/nim/client.js +184 -184
  5. package/dist/nim/data_sync.js +19 -19
  6. package/dist/nim/friend.js +150 -150
  7. package/dist/nim/global.js +131 -131
  8. package/dist/nim/msglog.js +687 -687
  9. package/dist/nim/nos.js +180 -180
  10. package/dist/nim/online_session.js +85 -85
  11. package/dist/nim/pass_through_proxy.js +39 -39
  12. package/dist/nim/plugin.js +65 -65
  13. package/dist/nim/session.js +392 -392
  14. package/dist/nim/subscribe_event.js +142 -142
  15. package/dist/nim/super_team.js +651 -592
  16. package/dist/nim/super_team.js.map +1 -1
  17. package/dist/nim/sysmsg.js +194 -194
  18. package/dist/nim/talk.js +209 -209
  19. package/dist/nim/talk.js.map +1 -1
  20. package/dist/nim/talkex.js +191 -191
  21. package/dist/nim/team.js +866 -818
  22. package/dist/nim/team.js.map +1 -1
  23. package/dist/nim/tool.js +119 -119
  24. package/dist/nim/user.js +201 -201
  25. package/dist/nim_def/client_def.js +245 -245
  26. package/dist/nim_def/data_sync_def.js +20 -20
  27. package/dist/nim_def/doc_trans_def.js +16 -16
  28. package/dist/nim_def/friend_def.js +37 -37
  29. package/dist/nim_def/global_def.js +39 -39
  30. package/dist/nim_def/msglog_def.js +148 -148
  31. package/dist/nim_def/nos_def.js +16 -16
  32. package/dist/nim_def/online_session_def.js +2 -2
  33. package/dist/nim_def/pass_through_proxy_def.js +10 -10
  34. package/dist/nim_def/plugin_def.js +2 -2
  35. package/dist/nim_def/session_def.js +26 -26
  36. package/dist/nim_def/subscribe_event_def.js +52 -52
  37. package/dist/nim_def/super_team_def.js +71 -64
  38. package/dist/nim_def/super_team_def.js.map +1 -1
  39. package/dist/nim_def/sysmsg_def.js +28 -28
  40. package/dist/nim_def/talk_def.js +2 -2
  41. package/dist/nim_def/talkex_def.js +2 -2
  42. package/dist/nim_def/team_def.js +76 -69
  43. package/dist/nim_def/team_def.js.map +1 -1
  44. package/dist/nim_def/tool_def.js +11 -11
  45. package/dist/nim_def/user_def.js +22 -22
  46. package/dist/node-nim.js +171 -171
  47. package/dist/qchat/attachment.js +63 -63
  48. package/dist/qchat/channel.js +314 -314
  49. package/dist/qchat/channel_category.js +187 -187
  50. package/dist/qchat/instance.js +77 -77
  51. package/dist/qchat/message.js +285 -285
  52. package/dist/qchat/role.js +423 -423
  53. package/dist/qchat/server.js +453 -453
  54. package/dist/qchat/system_notification.js +74 -74
  55. package/dist/qchat_def/attachment_def.js +2 -2
  56. package/dist/qchat_def/channel_def.js +2 -2
  57. package/dist/qchat_def/instance_def.js +2 -2
  58. package/dist/qchat_def/message_def.js +2 -2
  59. package/dist/qchat_def/public_def.js +649 -649
  60. package/dist/qchat_def/role_def.js +2 -2
  61. package/dist/qchat_def/server_def.js +2 -2
  62. package/dist/qchat_def/system_notification_def.js +2 -2
  63. package/dist/v2/v2_nim_instance.js +43 -43
  64. package/dist/v2/v2_nim_login_service.js +123 -123
  65. package/dist/v2_def/v2_nim_callback_def.js +2 -2
  66. package/dist/v2_def/v2_nim_enum_def.js +325 -325
  67. package/dist/v2_def/v2_nim_struct_def.js +2 -2
  68. package/package.json +74 -74
  69. package/script/download-sdk.js +78 -78
  70. package/script/exec-node-nim-tester.js +17 -17
  71. package/types/chatroom/chatroom.d.ts +55 -55
  72. package/types/chatroom_def/chatroom_def.d.ts +448 -448
  73. package/types/loader.d.ts +2 -2
  74. package/types/nim/client.d.ts +123 -123
  75. package/types/nim/data_sync.d.ts +12 -12
  76. package/types/nim/friend.d.ts +82 -82
  77. package/types/nim/global.d.ts +69 -69
  78. package/types/nim/msglog.d.ts +392 -392
  79. package/types/nim/nos.d.ts +118 -118
  80. package/types/nim/online_session.d.ts +44 -44
  81. package/types/nim/pass_through_proxy.d.ts +24 -24
  82. package/types/nim/plugin.d.ts +39 -39
  83. package/types/nim/session.d.ts +212 -212
  84. package/types/nim/subscribe_event.d.ts +87 -87
  85. package/types/nim/super_team.d.ts +356 -331
  86. package/types/nim/sysmsg.d.ts +105 -105
  87. package/types/nim/talk.d.ts +94 -94
  88. package/types/nim/talkex.d.ts +95 -95
  89. package/types/nim/team.d.ts +481 -461
  90. package/types/nim/tool.d.ts +77 -77
  91. package/types/nim/user.d.ts +111 -111
  92. package/types/nim_def/client_def.d.ts +284 -284
  93. package/types/nim_def/data_sync_def.d.ts +19 -19
  94. package/types/nim_def/doc_trans_def.d.ts +11 -11
  95. package/types/nim_def/friend_def.d.ts +65 -65
  96. package/types/nim_def/global_def.d.ts +62 -62
  97. package/types/nim_def/msglog_def.d.ts +373 -373
  98. package/types/nim_def/nos_def.d.ts +72 -72
  99. package/types/nim_def/online_session_def.d.ts +34 -34
  100. package/types/nim_def/pass_through_proxy_def.d.ts +13 -13
  101. package/types/nim_def/plugin_def.d.ts +8 -8
  102. package/types/nim_def/session_def.d.ts +114 -114
  103. package/types/nim_def/subscribe_event_def.d.ts +83 -83
  104. package/types/nim_def/super_team_def.d.ts +165 -137
  105. package/types/nim_def/sysmsg_def.d.ts +70 -70
  106. package/types/nim_def/talk_def.d.ts +96 -96
  107. package/types/nim_def/talkex_def.d.ts +112 -112
  108. package/types/nim_def/team_def.d.ts +186 -167
  109. package/types/nim_def/tool_def.d.ts +28 -28
  110. package/types/nim_def/user_def.d.ts +59 -59
  111. package/types/node-nim.d.ts +93 -93
  112. package/types/qchat/attachment.d.ts +40 -40
  113. package/types/qchat/channel.d.ts +139 -139
  114. package/types/qchat/channel_category.d.ts +82 -82
  115. package/types/qchat/instance.d.ts +46 -46
  116. package/types/qchat/message.d.ts +128 -128
  117. package/types/qchat/role.d.ts +166 -166
  118. package/types/qchat/server.d.ts +198 -198
  119. package/types/qchat/system_notification.d.ts +39 -39
  120. package/types/qchat_def/attachment_def.d.ts +71 -71
  121. package/types/qchat_def/channel_def.d.ts +643 -643
  122. package/types/qchat_def/instance_def.d.ts +214 -214
  123. package/types/qchat_def/message_def.d.ts +565 -565
  124. package/types/qchat_def/public_def.d.ts +754 -754
  125. package/types/qchat_def/role_def.d.ts +413 -413
  126. package/types/qchat_def/server_def.d.ts +529 -529
  127. package/types/qchat_def/system_notification_def.d.ts +172 -172
  128. package/types/v2/v2_nim_instance.d.ts +25 -25
  129. package/types/v2/v2_nim_login_service.d.ts +96 -96
  130. package/types/v2_def/v2_nim_callback_def.d.ts +20 -20
  131. package/types/v2_def/v2_nim_enum_def.d.ts +300 -300
  132. package/types/v2_def/v2_nim_struct_def.d.ts +338 -338
@@ -1,263 +1,263 @@
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.ChatRoomModule = void 0;
7
- const loader_1 = __importDefault(require("../loader"));
8
- const eventemitter3_1 = require("eventemitter3");
9
- class ChatRoomModule extends eventemitter3_1.EventEmitter {
10
- constructor() {
11
- super();
12
- this.chatroom = new loader_1.default.NIMChatRoom({ emit: this.emit.bind(this) });
13
- }
14
- initEventHandlers() {
15
- return this.chatroom.InitEventHandlers();
16
- }
17
- init(app_install_dir, json_extension) {
18
- return this.chatroom.Init(app_install_dir, json_extension);
19
- }
20
- cleanup(json_extension) {
21
- return this.chatroom.Cleanup(json_extension);
22
- }
23
- independentEnter(room_id, info, config) {
24
- return this.chatroom.IndependentEnter(room_id, info, config);
25
- }
26
- anonymousEnter(room_id, anonymity_info, info, config) {
27
- return this.chatroom.AnonymousEnter(room_id, anonymity_info, info, config);
28
- }
29
- enter(room_id, request_login_data, info, json_extension) {
30
- return this.chatroom.Enter(room_id, request_login_data, info, json_extension);
31
- }
32
- exit(room_id, json_extension) {
33
- return this.chatroom.Exit(room_id, json_extension);
34
- }
35
- getLoginState(room_id, json_extension) {
36
- return this.chatroom.GetLoginState(room_id, json_extension);
37
- }
38
- setMsgsBatchReport(set_batch, json_extension) {
39
- return this.chatroom.SetMsgsBatchReport(set_batch, json_extension);
40
- }
41
- sendMsg(room_id, msg, json_extension) {
42
- return this.chatroom.SendMsg(room_id, msg, json_extension);
43
- }
44
- getMembersOnlineAsync(room_id, parameters, cb, json_extension) {
45
- return new Promise((resolve) => {
46
- this.chatroom.GetMembersOnlineAsync(room_id, parameters, (room_id, rescode, infos) => {
47
- if (cb) {
48
- cb(room_id, rescode, infos);
49
- }
50
- resolve([room_id, rescode, infos]);
51
- }, json_extension);
52
- });
53
- }
54
- getMembersByTagOnlineAsync(room_id, parameters, cb, json_extension) {
55
- return new Promise((resolve) => {
56
- this.chatroom.GetMembersByTagOnlineAsync(room_id, parameters, (room_id, rescode, infos) => {
57
- if (cb) {
58
- cb(room_id, rescode, infos);
59
- }
60
- resolve([room_id, rescode, infos]);
61
- }, json_extension);
62
- });
63
- }
64
- getMembersCountByTagOnlineAsync(room_id, parameters, cb, json_extension) {
65
- return new Promise((resolve) => {
66
- this.chatroom.GetMembersCountByTagOnlineAsync(room_id, parameters, (room_id, rescode, count) => {
67
- if (cb) {
68
- cb(room_id, rescode, count);
69
- }
70
- resolve([room_id, rescode, count]);
71
- }, json_extension);
72
- });
73
- }
74
- getMessageHistoryOnlineAsync(room_id, parameters, cb, json_extension) {
75
- return new Promise((resolve) => {
76
- this.chatroom.GetMessageHistoryOnlineAsync(room_id, parameters, (room_id, rescode, msgs) => {
77
- if (cb) {
78
- cb(room_id, rescode, msgs);
79
- }
80
- resolve([room_id, rescode, msgs]);
81
- }, json_extension);
82
- });
83
- }
84
- getMessageHistoryByTagsOnlineAsync(room_id, parameters, cb, json_extension) {
85
- return new Promise((resolve) => {
86
- this.chatroom.GetMessageHistoryByTagsOnlineAsync(room_id, parameters, (room_id, rescode, msgs) => {
87
- if (cb) {
88
- cb(room_id, rescode, msgs);
89
- }
90
- resolve([room_id, rescode, msgs]);
91
- }, json_extension);
92
- });
93
- }
94
- setMemberAttributeOnlineAsync(room_id, parameters, cb, json_extension) {
95
- return new Promise((resolve) => {
96
- this.chatroom.SetMemberAttributeOnlineAsync(room_id, parameters, (room_id, rescode, info) => {
97
- if (cb) {
98
- cb(room_id, rescode, info);
99
- }
100
- resolve([room_id, rescode, info]);
101
- }, json_extension);
102
- });
103
- }
104
- getInfoAsync(room_id, cb, json_extension) {
105
- return new Promise((resolve) => {
106
- this.chatroom.GetInfoAsync(room_id, (room_id, rescode, info) => {
107
- if (cb) {
108
- cb(room_id, rescode, info);
109
- }
110
- resolve([room_id, rescode, info]);
111
- }, json_extension);
112
- });
113
- }
114
- getMemberInfoByIDsAsync(room_id, ids, cb, json_extension) {
115
- return new Promise((resolve) => {
116
- this.chatroom.GetMemberInfoByIDsAsync(room_id, ids, (room_id, rescode, infos) => {
117
- if (cb) {
118
- cb(room_id, rescode, infos);
119
- }
120
- resolve([room_id, rescode, infos]);
121
- }, json_extension);
122
- });
123
- }
124
- kickMemberAsync(room_id, id, notify_ext, cb, json_extension) {
125
- return new Promise((resolve) => {
126
- this.chatroom.KickMemberAsync(room_id, id, notify_ext, (room_id, rescode) => {
127
- if (cb) {
128
- cb(room_id, rescode);
129
- }
130
- resolve([room_id, rescode]);
131
- }, json_extension);
132
- });
133
- }
134
- setProxy(type, host, port, user, password) {
135
- return this.chatroom.SetProxy(type, host, port, user, password);
136
- }
137
- tempMuteMemberAsync(room_id, accid, duration, need_notify, notify_ext, cb, json_extension) {
138
- return new Promise((resolve) => {
139
- this.chatroom.TempMuteMemberAsync(room_id, accid, duration, need_notify, notify_ext, (room_id, rescode, info) => {
140
- if (cb) {
141
- cb(room_id, rescode, info);
142
- }
143
- resolve([room_id, rescode, info]);
144
- }, json_extension);
145
- });
146
- }
147
- tempMuteMemberByTagAsync(room_id, target_tag, duration, need_notify, notify_ext, cb, notify_tags, json_extension) {
148
- return new Promise((resolve) => {
149
- this.chatroom.TempMuteMemberByTagAsync(room_id, target_tag, duration, need_notify, notify_ext, (room_id, rescode, info) => {
150
- if (cb) {
151
- cb(room_id, rescode, info);
152
- }
153
- resolve([room_id, rescode, info]);
154
- }, notify_tags, json_extension);
155
- });
156
- }
157
- updateRoomInfoAsync(room_id, room_info, need_notify, notify_ext, cb, json_extension) {
158
- return new Promise((resolve) => {
159
- this.chatroom.UpdateRoomInfoAsync(room_id, room_info, need_notify, notify_ext, (room_id, rescode) => {
160
- if (cb) {
161
- cb(room_id, rescode);
162
- }
163
- resolve([room_id, rescode]);
164
- }, json_extension);
165
- });
166
- }
167
- updateMyRoomRoleAsync(room_id, info, need_notify, notify_ext, cb, json_extension) {
168
- return new Promise((resolve) => {
169
- this.chatroom.UpdateMyRoomRoleAsync(room_id, info, need_notify, notify_ext, (room_id, rescode) => {
170
- if (cb) {
171
- cb(room_id, rescode);
172
- }
173
- resolve([room_id, rescode]);
174
- }, json_extension);
175
- });
176
- }
177
- queueOfferAsync(room_id, element, option, cb, json_extension) {
178
- return new Promise((resolve) => {
179
- this.chatroom.QueueOfferAsync(room_id, element, option, (room_id, rescode, element) => {
180
- if (cb) {
181
- cb(room_id, rescode, element);
182
- }
183
- resolve([room_id, rescode, element]);
184
- }, json_extension);
185
- });
186
- }
187
- queuePollAsync(room_id, element_key, cb, json_extension) {
188
- return new Promise((resolve) => {
189
- this.chatroom.QueuePollAsync(room_id, element_key, (room_id, rescode, element) => {
190
- if (cb) {
191
- cb(room_id, rescode, element);
192
- }
193
- resolve([room_id, rescode, element]);
194
- }, json_extension);
195
- });
196
- }
197
- queueListAsync(room_id, cb, json_extension) {
198
- return new Promise((resolve) => {
199
- this.chatroom.QueueListAsync(room_id, (room_id, rescode, elements) => {
200
- if (cb) {
201
- cb(room_id, rescode, elements);
202
- }
203
- resolve([room_id, rescode, elements]);
204
- }, json_extension);
205
- });
206
- }
207
- queueHeaderAsync(room_id, cb, json_extension) {
208
- return new Promise((resolve) => {
209
- this.chatroom.QueueHeaderAsync(room_id, (room_id, rescode, element) => {
210
- if (cb) {
211
- cb(room_id, rescode, element);
212
- }
213
- resolve([room_id, rescode, element]);
214
- }, json_extension);
215
- });
216
- }
217
- queueDropAsync(room_id, cb, json_extension) {
218
- return new Promise((resolve) => {
219
- this.chatroom.QueueDropAsync(room_id, (room_id, rescode) => {
220
- if (cb) {
221
- cb(room_id, rescode);
222
- }
223
- resolve([room_id, rescode]);
224
- }, json_extension);
225
- });
226
- }
227
- queueBatchUpdateAsync(room_id, batch_elements, need_notify, notify_ext, cb, json_extension) {
228
- return new Promise((resolve) => {
229
- this.chatroom.QueueBatchUpdateAsync(room_id, batch_elements, need_notify, notify_ext, (room_id, rescode, element_keys) => {
230
- if (cb) {
231
- cb(room_id, rescode, element_keys);
232
- }
233
- resolve([room_id, rescode, element_keys]);
234
- }, json_extension);
235
- });
236
- }
237
- updateLocation(room_id, location, cb, json_extension) {
238
- return new Promise((resolve) => {
239
- if (!this.chatroom.UpdateLocation(room_id, location, (room_id, rescode) => {
240
- if (cb) {
241
- cb(room_id, rescode);
242
- }
243
- resolve([room_id, rescode]);
244
- }, json_extension)) {
245
- resolve(null);
246
- }
247
- });
248
- }
249
- updateTags(room_id, tags_info, cb, json_extension) {
250
- return new Promise((resolve) => {
251
- if (!this.chatroom.UpdateTags(room_id, tags_info, (room_id, rescode) => {
252
- if (cb) {
253
- cb(room_id, rescode);
254
- }
255
- resolve([room_id, rescode]);
256
- }, json_extension)) {
257
- resolve(null);
258
- }
259
- });
260
- }
261
- }
262
- exports.ChatRoomModule = ChatRoomModule;
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.ChatRoomModule = void 0;
7
+ const loader_1 = __importDefault(require("../loader"));
8
+ const eventemitter3_1 = require("eventemitter3");
9
+ class ChatRoomModule extends eventemitter3_1.EventEmitter {
10
+ constructor() {
11
+ super();
12
+ this.chatroom = new loader_1.default.NIMChatRoom({ emit: this.emit.bind(this) });
13
+ }
14
+ initEventHandlers() {
15
+ return this.chatroom.InitEventHandlers();
16
+ }
17
+ init(app_install_dir, json_extension) {
18
+ return this.chatroom.Init(app_install_dir, json_extension);
19
+ }
20
+ cleanup(json_extension) {
21
+ return this.chatroom.Cleanup(json_extension);
22
+ }
23
+ independentEnter(room_id, info, config) {
24
+ return this.chatroom.IndependentEnter(room_id, info, config);
25
+ }
26
+ anonymousEnter(room_id, anonymity_info, info, config) {
27
+ return this.chatroom.AnonymousEnter(room_id, anonymity_info, info, config);
28
+ }
29
+ enter(room_id, request_login_data, info, json_extension) {
30
+ return this.chatroom.Enter(room_id, request_login_data, info, json_extension);
31
+ }
32
+ exit(room_id, json_extension) {
33
+ return this.chatroom.Exit(room_id, json_extension);
34
+ }
35
+ getLoginState(room_id, json_extension) {
36
+ return this.chatroom.GetLoginState(room_id, json_extension);
37
+ }
38
+ setMsgsBatchReport(set_batch, json_extension) {
39
+ return this.chatroom.SetMsgsBatchReport(set_batch, json_extension);
40
+ }
41
+ sendMsg(room_id, msg, json_extension) {
42
+ return this.chatroom.SendMsg(room_id, msg, json_extension);
43
+ }
44
+ getMembersOnlineAsync(room_id, parameters, cb, json_extension) {
45
+ return new Promise((resolve) => {
46
+ this.chatroom.GetMembersOnlineAsync(room_id, parameters, (room_id, rescode, infos) => {
47
+ if (cb) {
48
+ cb(room_id, rescode, infos);
49
+ }
50
+ resolve([room_id, rescode, infos]);
51
+ }, json_extension);
52
+ });
53
+ }
54
+ getMembersByTagOnlineAsync(room_id, parameters, cb, json_extension) {
55
+ return new Promise((resolve) => {
56
+ this.chatroom.GetMembersByTagOnlineAsync(room_id, parameters, (room_id, rescode, infos) => {
57
+ if (cb) {
58
+ cb(room_id, rescode, infos);
59
+ }
60
+ resolve([room_id, rescode, infos]);
61
+ }, json_extension);
62
+ });
63
+ }
64
+ getMembersCountByTagOnlineAsync(room_id, parameters, cb, json_extension) {
65
+ return new Promise((resolve) => {
66
+ this.chatroom.GetMembersCountByTagOnlineAsync(room_id, parameters, (room_id, rescode, count) => {
67
+ if (cb) {
68
+ cb(room_id, rescode, count);
69
+ }
70
+ resolve([room_id, rescode, count]);
71
+ }, json_extension);
72
+ });
73
+ }
74
+ getMessageHistoryOnlineAsync(room_id, parameters, cb, json_extension) {
75
+ return new Promise((resolve) => {
76
+ this.chatroom.GetMessageHistoryOnlineAsync(room_id, parameters, (room_id, rescode, msgs) => {
77
+ if (cb) {
78
+ cb(room_id, rescode, msgs);
79
+ }
80
+ resolve([room_id, rescode, msgs]);
81
+ }, json_extension);
82
+ });
83
+ }
84
+ getMessageHistoryByTagsOnlineAsync(room_id, parameters, cb, json_extension) {
85
+ return new Promise((resolve) => {
86
+ this.chatroom.GetMessageHistoryByTagsOnlineAsync(room_id, parameters, (room_id, rescode, msgs) => {
87
+ if (cb) {
88
+ cb(room_id, rescode, msgs);
89
+ }
90
+ resolve([room_id, rescode, msgs]);
91
+ }, json_extension);
92
+ });
93
+ }
94
+ setMemberAttributeOnlineAsync(room_id, parameters, cb, json_extension) {
95
+ return new Promise((resolve) => {
96
+ this.chatroom.SetMemberAttributeOnlineAsync(room_id, parameters, (room_id, rescode, info) => {
97
+ if (cb) {
98
+ cb(room_id, rescode, info);
99
+ }
100
+ resolve([room_id, rescode, info]);
101
+ }, json_extension);
102
+ });
103
+ }
104
+ getInfoAsync(room_id, cb, json_extension) {
105
+ return new Promise((resolve) => {
106
+ this.chatroom.GetInfoAsync(room_id, (room_id, rescode, info) => {
107
+ if (cb) {
108
+ cb(room_id, rescode, info);
109
+ }
110
+ resolve([room_id, rescode, info]);
111
+ }, json_extension);
112
+ });
113
+ }
114
+ getMemberInfoByIDsAsync(room_id, ids, cb, json_extension) {
115
+ return new Promise((resolve) => {
116
+ this.chatroom.GetMemberInfoByIDsAsync(room_id, ids, (room_id, rescode, infos) => {
117
+ if (cb) {
118
+ cb(room_id, rescode, infos);
119
+ }
120
+ resolve([room_id, rescode, infos]);
121
+ }, json_extension);
122
+ });
123
+ }
124
+ kickMemberAsync(room_id, id, notify_ext, cb, json_extension) {
125
+ return new Promise((resolve) => {
126
+ this.chatroom.KickMemberAsync(room_id, id, notify_ext, (room_id, rescode) => {
127
+ if (cb) {
128
+ cb(room_id, rescode);
129
+ }
130
+ resolve([room_id, rescode]);
131
+ }, json_extension);
132
+ });
133
+ }
134
+ setProxy(type, host, port, user, password) {
135
+ return this.chatroom.SetProxy(type, host, port, user, password);
136
+ }
137
+ tempMuteMemberAsync(room_id, accid, duration, need_notify, notify_ext, cb, json_extension) {
138
+ return new Promise((resolve) => {
139
+ this.chatroom.TempMuteMemberAsync(room_id, accid, duration, need_notify, notify_ext, (room_id, rescode, info) => {
140
+ if (cb) {
141
+ cb(room_id, rescode, info);
142
+ }
143
+ resolve([room_id, rescode, info]);
144
+ }, json_extension);
145
+ });
146
+ }
147
+ tempMuteMemberByTagAsync(room_id, target_tag, duration, need_notify, notify_ext, cb, notify_tags, json_extension) {
148
+ return new Promise((resolve) => {
149
+ this.chatroom.TempMuteMemberByTagAsync(room_id, target_tag, duration, need_notify, notify_ext, (room_id, rescode, info) => {
150
+ if (cb) {
151
+ cb(room_id, rescode, info);
152
+ }
153
+ resolve([room_id, rescode, info]);
154
+ }, notify_tags, json_extension);
155
+ });
156
+ }
157
+ updateRoomInfoAsync(room_id, room_info, need_notify, notify_ext, cb, json_extension) {
158
+ return new Promise((resolve) => {
159
+ this.chatroom.UpdateRoomInfoAsync(room_id, room_info, need_notify, notify_ext, (room_id, rescode) => {
160
+ if (cb) {
161
+ cb(room_id, rescode);
162
+ }
163
+ resolve([room_id, rescode]);
164
+ }, json_extension);
165
+ });
166
+ }
167
+ updateMyRoomRoleAsync(room_id, info, need_notify, notify_ext, cb, json_extension) {
168
+ return new Promise((resolve) => {
169
+ this.chatroom.UpdateMyRoomRoleAsync(room_id, info, need_notify, notify_ext, (room_id, rescode) => {
170
+ if (cb) {
171
+ cb(room_id, rescode);
172
+ }
173
+ resolve([room_id, rescode]);
174
+ }, json_extension);
175
+ });
176
+ }
177
+ queueOfferAsync(room_id, element, option, cb, json_extension) {
178
+ return new Promise((resolve) => {
179
+ this.chatroom.QueueOfferAsync(room_id, element, option, (room_id, rescode, element) => {
180
+ if (cb) {
181
+ cb(room_id, rescode, element);
182
+ }
183
+ resolve([room_id, rescode, element]);
184
+ }, json_extension);
185
+ });
186
+ }
187
+ queuePollAsync(room_id, element_key, cb, json_extension) {
188
+ return new Promise((resolve) => {
189
+ this.chatroom.QueuePollAsync(room_id, element_key, (room_id, rescode, element) => {
190
+ if (cb) {
191
+ cb(room_id, rescode, element);
192
+ }
193
+ resolve([room_id, rescode, element]);
194
+ }, json_extension);
195
+ });
196
+ }
197
+ queueListAsync(room_id, cb, json_extension) {
198
+ return new Promise((resolve) => {
199
+ this.chatroom.QueueListAsync(room_id, (room_id, rescode, elements) => {
200
+ if (cb) {
201
+ cb(room_id, rescode, elements);
202
+ }
203
+ resolve([room_id, rescode, elements]);
204
+ }, json_extension);
205
+ });
206
+ }
207
+ queueHeaderAsync(room_id, cb, json_extension) {
208
+ return new Promise((resolve) => {
209
+ this.chatroom.QueueHeaderAsync(room_id, (room_id, rescode, element) => {
210
+ if (cb) {
211
+ cb(room_id, rescode, element);
212
+ }
213
+ resolve([room_id, rescode, element]);
214
+ }, json_extension);
215
+ });
216
+ }
217
+ queueDropAsync(room_id, cb, json_extension) {
218
+ return new Promise((resolve) => {
219
+ this.chatroom.QueueDropAsync(room_id, (room_id, rescode) => {
220
+ if (cb) {
221
+ cb(room_id, rescode);
222
+ }
223
+ resolve([room_id, rescode]);
224
+ }, json_extension);
225
+ });
226
+ }
227
+ queueBatchUpdateAsync(room_id, batch_elements, need_notify, notify_ext, cb, json_extension) {
228
+ return new Promise((resolve) => {
229
+ this.chatroom.QueueBatchUpdateAsync(room_id, batch_elements, need_notify, notify_ext, (room_id, rescode, element_keys) => {
230
+ if (cb) {
231
+ cb(room_id, rescode, element_keys);
232
+ }
233
+ resolve([room_id, rescode, element_keys]);
234
+ }, json_extension);
235
+ });
236
+ }
237
+ updateLocation(room_id, location, cb, json_extension) {
238
+ return new Promise((resolve) => {
239
+ if (!this.chatroom.UpdateLocation(room_id, location, (room_id, rescode) => {
240
+ if (cb) {
241
+ cb(room_id, rescode);
242
+ }
243
+ resolve([room_id, rescode]);
244
+ }, json_extension)) {
245
+ resolve(null);
246
+ }
247
+ });
248
+ }
249
+ updateTags(room_id, tags_info, cb, json_extension) {
250
+ return new Promise((resolve) => {
251
+ if (!this.chatroom.UpdateTags(room_id, tags_info, (room_id, rescode) => {
252
+ if (cb) {
253
+ cb(room_id, rescode);
254
+ }
255
+ resolve([room_id, rescode]);
256
+ }, json_extension)) {
257
+ resolve(null);
258
+ }
259
+ });
260
+ }
261
+ }
262
+ exports.ChatRoomModule = ChatRoomModule;
263
263
  //# sourceMappingURL=chatroom.js.map