node-nim 9.14.2 → 10.2.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/README.md +7 -1
- package/dist/loader.js +35 -35
- package/dist/nim/client.js +184 -184
- package/dist/nim/client.js.map +1 -1
- package/dist/nim/data_sync.js +19 -19
- package/dist/nim/friend.js +150 -150
- package/dist/nim/global.js +131 -131
- package/dist/nim/msglog.js +687 -687
- package/dist/nim/nos.js +216 -180
- package/dist/nim/nos.js.map +1 -1
- package/dist/nim/online_session.js +85 -85
- package/dist/nim/pass_through_proxy.js +39 -39
- package/dist/nim/plugin.js +65 -65
- package/dist/nim/session.js +392 -392
- package/dist/nim/subscribe_event.js +142 -142
- package/dist/nim/super_team.js +592 -592
- package/dist/nim/sysmsg.js +194 -194
- package/dist/nim/talk.js +209 -209
- package/dist/nim/talk.js.map +1 -1
- package/dist/nim/talkex.js +191 -191
- package/dist/nim/team.js +818 -818
- package/dist/nim/tool.js +119 -119
- package/dist/nim/user.js +201 -201
- package/dist/nim_def/client_def.js +245 -245
- package/dist/nim_def/client_def.js.map +1 -1
- package/dist/nim_def/data_sync_def.js +20 -20
- package/dist/nim_def/doc_trans_def.js +16 -16
- package/dist/nim_def/friend_def.js +37 -37
- package/dist/nim_def/global_def.js +39 -39
- package/dist/nim_def/msglog_def.js +148 -148
- package/dist/nim_def/nos_def.js +16 -16
- package/dist/nim_def/online_session_def.js +2 -2
- package/dist/nim_def/pass_through_proxy_def.js +10 -10
- package/dist/nim_def/plugin_def.js +2 -2
- package/dist/nim_def/session_def.js +26 -26
- package/dist/nim_def/subscribe_event_def.js +52 -52
- package/dist/nim_def/super_team_def.js +64 -64
- package/dist/nim_def/sysmsg_def.js +28 -28
- package/dist/nim_def/talk_def.js +2 -2
- package/dist/nim_def/talkex_def.js +2 -2
- package/dist/nim_def/team_def.js +69 -69
- package/dist/nim_def/tool_def.js +11 -11
- package/dist/nim_def/user_def.js +22 -22
- package/dist/node-nim.js +171 -171
- package/dist/node-nim.js.map +1 -1
- package/dist/qchat/attachment.js +63 -63
- package/dist/qchat/channel.js +314 -314
- package/dist/qchat/channel_category.js +187 -187
- package/dist/qchat/instance.js +77 -77
- package/dist/qchat/message.js +285 -285
- package/dist/qchat/role.js +423 -423
- package/dist/qchat/server.js +453 -453
- package/dist/qchat/system_notification.js +74 -74
- package/dist/qchat_def/attachment_def.js +2 -2
- package/dist/qchat_def/channel_def.js +2 -2
- package/dist/qchat_def/instance_def.js +2 -2
- package/dist/qchat_def/message_def.js +2 -2
- package/dist/qchat_def/public_def.js +649 -649
- package/dist/qchat_def/public_def.js.map +1 -1
- package/dist/qchat_def/role_def.js +2 -2
- package/dist/qchat_def/server_def.js +2 -2
- package/dist/qchat_def/system_notification_def.js +2 -2
- package/dist/v2/v2_nim_chatroom_client.js +135 -0
- package/dist/v2/v2_nim_chatroom_client.js.map +1 -0
- package/dist/v2/v2_nim_chatroom_service.js +244 -0
- package/dist/v2/v2_nim_chatroom_service.js.map +1 -0
- package/dist/v2/v2_nim_client.js +138 -0
- package/dist/v2/v2_nim_client.js.map +1 -0
- package/dist/v2/v2_nim_conversation_group_service.js +116 -0
- package/dist/v2/v2_nim_conversation_group_service.js.map +1 -0
- package/dist/v2/v2_nim_conversation_service.js +236 -0
- package/dist/v2/v2_nim_conversation_service.js.map +1 -0
- package/dist/v2/v2_nim_friend_service.js +128 -0
- package/dist/v2/v2_nim_friend_service.js.map +1 -0
- package/dist/v2/v2_nim_login_service.js +119 -123
- package/dist/v2/v2_nim_login_service.js.map +1 -1
- package/dist/v2/v2_nim_message_service.js +382 -0
- package/dist/v2/v2_nim_message_service.js.map +1 -0
- package/dist/v2/v2_nim_notification_service.js +30 -0
- package/dist/v2/v2_nim_notification_service.js.map +1 -0
- package/dist/v2/v2_nim_setting_service.js +86 -0
- package/dist/v2/v2_nim_setting_service.js.map +1 -0
- package/dist/v2/v2_nim_storage_service.js +58 -0
- package/dist/v2/v2_nim_storage_service.js.map +1 -0
- package/dist/v2/v2_nim_team_service.js +360 -0
- package/dist/v2/v2_nim_team_service.js.map +1 -0
- package/dist/v2/v2_nim_user_service.js +76 -0
- package/dist/v2/v2_nim_user_service.js.map +1 -0
- package/dist/v2/v2_nim_utilities.js +276 -0
- package/dist/v2/v2_nim_utilities.js.map +1 -0
- package/dist/v2_def/v2_nim_callback_def.js +2 -2
- package/dist/v2_def/v2_nim_enum_def.js +1087 -325
- package/dist/v2_def/v2_nim_enum_def.js.map +1 -1
- package/dist/v2_def/v2_nim_struct_def.js +2 -2
- package/package.json +74 -74
- package/script/download-sdk.js +78 -78
- package/script/exec-node-nim-tester.js +17 -17
- package/script/publish-to-netease-npm.js +3 -2
- package/types/loader.d.ts +2 -2
- package/types/nim/client.d.ts +123 -123
- package/types/nim/data_sync.d.ts +12 -12
- package/types/nim/friend.d.ts +82 -82
- package/types/nim/global.d.ts +69 -69
- package/types/nim/msglog.d.ts +392 -392
- package/types/nim/nos.d.ts +118 -118
- package/types/nim/online_session.d.ts +44 -44
- package/types/nim/pass_through_proxy.d.ts +24 -24
- package/types/nim/plugin.d.ts +39 -39
- package/types/nim/session.d.ts +212 -212
- package/types/nim/subscribe_event.d.ts +87 -87
- package/types/nim/super_team.d.ts +331 -331
- package/types/nim/sysmsg.d.ts +105 -105
- package/types/nim/talk.d.ts +94 -94
- package/types/nim/talkex.d.ts +95 -95
- package/types/nim/team.d.ts +461 -461
- package/types/nim/tool.d.ts +77 -77
- package/types/nim/user.d.ts +111 -111
- package/types/nim_def/client_def.d.ts +284 -284
- package/types/nim_def/data_sync_def.d.ts +19 -19
- package/types/nim_def/doc_trans_def.d.ts +11 -11
- package/types/nim_def/friend_def.d.ts +65 -65
- package/types/nim_def/global_def.d.ts +62 -62
- package/types/nim_def/msglog_def.d.ts +373 -373
- package/types/nim_def/nos_def.d.ts +72 -72
- package/types/nim_def/online_session_def.d.ts +34 -34
- package/types/nim_def/pass_through_proxy_def.d.ts +13 -13
- package/types/nim_def/plugin_def.d.ts +8 -8
- package/types/nim_def/session_def.d.ts +114 -114
- package/types/nim_def/subscribe_event_def.d.ts +83 -83
- package/types/nim_def/super_team_def.d.ts +144 -137
- package/types/nim_def/sysmsg_def.d.ts +70 -70
- package/types/nim_def/talk_def.d.ts +96 -96
- package/types/nim_def/talkex_def.d.ts +112 -112
- package/types/nim_def/team_def.d.ts +167 -167
- package/types/nim_def/tool_def.d.ts +28 -28
- package/types/nim_def/user_def.d.ts +59 -59
- package/types/node-nim.d.ts +90 -93
- package/types/qchat/attachment.d.ts +40 -40
- package/types/qchat/channel.d.ts +139 -139
- package/types/qchat/channel_category.d.ts +82 -82
- package/types/qchat/instance.d.ts +46 -46
- package/types/qchat/message.d.ts +128 -128
- package/types/qchat/role.d.ts +166 -166
- package/types/qchat/server.d.ts +198 -198
- package/types/qchat/system_notification.d.ts +39 -39
- package/types/qchat_def/attachment_def.d.ts +71 -71
- package/types/qchat_def/channel_def.d.ts +643 -643
- package/types/qchat_def/instance_def.d.ts +214 -214
- package/types/qchat_def/message_def.d.ts +565 -565
- package/types/qchat_def/public_def.d.ts +754 -754
- package/types/qchat_def/role_def.d.ts +413 -413
- package/types/qchat_def/server_def.d.ts +529 -529
- package/types/qchat_def/system_notification_def.d.ts +172 -172
- package/types/v2/v2_nim_chatroom_client.d.ts +73 -0
- package/types/v2/v2_nim_chatroom_service.d.ts +114 -0
- package/types/v2/v2_nim_client.d.ts +75 -0
- package/types/v2/v2_nim_conversation_group_service.d.ts +54 -0
- package/types/v2/v2_nim_conversation_service.d.ts +110 -0
- package/types/v2/v2_nim_friend_service.d.ts +58 -0
- package/types/v2/v2_nim_login_service.d.ts +80 -96
- package/types/v2/v2_nim_message_service.d.ts +143 -0
- package/types/v2/v2_nim_notification_service.d.ts +18 -0
- package/types/v2/v2_nim_setting_service.d.ts +43 -0
- package/types/v2/v2_nim_storage_service.d.ts +28 -0
- package/types/v2/v2_nim_team_service.d.ts +184 -0
- package/types/v2/v2_nim_user_service.d.ts +34 -0
- package/types/v2/v2_nim_utilities.d.ts +168 -0
- package/types/v2_def/v2_nim_callback_def.d.ts +7 -20
- package/types/v2_def/v2_nim_enum_def.d.ts +1009 -300
- package/types/v2_def/v2_nim_struct_def.d.ts +1539 -338
- package/dist/chatroom/chatroom.js +0 -263
- package/dist/chatroom/chatroom.js.map +0 -1
- package/dist/chatroom_def/chatroom_def.js +0 -120
- package/dist/chatroom_def/chatroom_def.js.map +0 -1
- package/dist/v2/v2_nim_instance.js +0 -44
- package/dist/v2/v2_nim_instance.js.map +0 -1
- package/types/chatroom/chatroom.d.ts +0 -55
- package/types/chatroom_def/chatroom_def.d.ts +0 -448
- package/types/v2/v2_nim_instance.d.ts +0 -25
package/dist/nim_def/user_def.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NINPushType = exports.NIMUserQueryType = exports.NIMUserSpecialRelationshipChangeType = void 0;
|
|
4
|
-
/** @enum NIMUserSpecialRelationshipChangeType 用户特殊关系数据变更类型 */
|
|
5
|
-
var NIMUserSpecialRelationshipChangeType;
|
|
6
|
-
(function (NIMUserSpecialRelationshipChangeType) {
|
|
7
|
-
NIMUserSpecialRelationshipChangeType[NIMUserSpecialRelationshipChangeType["kNIMUserSpecialRelationshipChangeTypeMarkBlack"] = 1] = "kNIMUserSpecialRelationshipChangeTypeMarkBlack"; /** < 添加删除黑名单 */
|
|
8
|
-
NIMUserSpecialRelationshipChangeType[NIMUserSpecialRelationshipChangeType["kNIMUserSpecialRelationshipChangeTypeMarkMute"] = 2] = "kNIMUserSpecialRelationshipChangeTypeMarkMute"; /** < 添加删除静音名单 */
|
|
9
|
-
NIMUserSpecialRelationshipChangeType[NIMUserSpecialRelationshipChangeType["kNIMUserSpecialRelationshipChangeTypeSyncMuteAndBlackList"] = 3] = "kNIMUserSpecialRelationshipChangeTypeSyncMuteAndBlackList"; /** < 同步黑名单和静音名单 */
|
|
10
|
-
})(NIMUserSpecialRelationshipChangeType = exports.NIMUserSpecialRelationshipChangeType || (exports.NIMUserSpecialRelationshipChangeType = {}));
|
|
11
|
-
/** @enum NIMUserQueryType 查询用户信息条件选项 */
|
|
12
|
-
var NIMUserQueryType;
|
|
13
|
-
(function (NIMUserQueryType) {
|
|
14
|
-
NIMUserQueryType[NIMUserQueryType["kNIMUserQueryDefault"] = 0] = "kNIMUserQueryDefault"; /** < 查询默认条件,将匹配账户ID和昵称 */
|
|
15
|
-
NIMUserQueryType[NIMUserQueryType["kNIMUserQueryByAccId"] = 1] = "kNIMUserQueryByAccId"; /** < 仅匹配账户ID */
|
|
16
|
-
NIMUserQueryType[NIMUserQueryType["kNIMUserQueryByNickname"] = 2] = "kNIMUserQueryByNickname"; /** < 仅匹配用户昵称 */
|
|
17
|
-
})(NIMUserQueryType = exports.NIMUserQueryType || (exports.NIMUserQueryType = {}));
|
|
18
|
-
var NINPushType;
|
|
19
|
-
(function (NINPushType) {
|
|
20
|
-
NINPushType[NINPushType["kNIMPushTypeDefault"] = 0] = "kNIMPushTypeDefault"; /** < 默认apns */
|
|
21
|
-
NINPushType[NINPushType["kNIMPushTypePushKit"] = 1] = "kNIMPushTypePushKit"; /** < pushkit,仅iOS */
|
|
22
|
-
})(NINPushType = exports.NINPushType || (exports.NINPushType = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NINPushType = exports.NIMUserQueryType = exports.NIMUserSpecialRelationshipChangeType = void 0;
|
|
4
|
+
/** @enum NIMUserSpecialRelationshipChangeType 用户特殊关系数据变更类型 */
|
|
5
|
+
var NIMUserSpecialRelationshipChangeType;
|
|
6
|
+
(function (NIMUserSpecialRelationshipChangeType) {
|
|
7
|
+
NIMUserSpecialRelationshipChangeType[NIMUserSpecialRelationshipChangeType["kNIMUserSpecialRelationshipChangeTypeMarkBlack"] = 1] = "kNIMUserSpecialRelationshipChangeTypeMarkBlack"; /** < 添加删除黑名单 */
|
|
8
|
+
NIMUserSpecialRelationshipChangeType[NIMUserSpecialRelationshipChangeType["kNIMUserSpecialRelationshipChangeTypeMarkMute"] = 2] = "kNIMUserSpecialRelationshipChangeTypeMarkMute"; /** < 添加删除静音名单 */
|
|
9
|
+
NIMUserSpecialRelationshipChangeType[NIMUserSpecialRelationshipChangeType["kNIMUserSpecialRelationshipChangeTypeSyncMuteAndBlackList"] = 3] = "kNIMUserSpecialRelationshipChangeTypeSyncMuteAndBlackList"; /** < 同步黑名单和静音名单 */
|
|
10
|
+
})(NIMUserSpecialRelationshipChangeType = exports.NIMUserSpecialRelationshipChangeType || (exports.NIMUserSpecialRelationshipChangeType = {}));
|
|
11
|
+
/** @enum NIMUserQueryType 查询用户信息条件选项 */
|
|
12
|
+
var NIMUserQueryType;
|
|
13
|
+
(function (NIMUserQueryType) {
|
|
14
|
+
NIMUserQueryType[NIMUserQueryType["kNIMUserQueryDefault"] = 0] = "kNIMUserQueryDefault"; /** < 查询默认条件,将匹配账户ID和昵称 */
|
|
15
|
+
NIMUserQueryType[NIMUserQueryType["kNIMUserQueryByAccId"] = 1] = "kNIMUserQueryByAccId"; /** < 仅匹配账户ID */
|
|
16
|
+
NIMUserQueryType[NIMUserQueryType["kNIMUserQueryByNickname"] = 2] = "kNIMUserQueryByNickname"; /** < 仅匹配用户昵称 */
|
|
17
|
+
})(NIMUserQueryType = exports.NIMUserQueryType || (exports.NIMUserQueryType = {}));
|
|
18
|
+
var NINPushType;
|
|
19
|
+
(function (NINPushType) {
|
|
20
|
+
NINPushType[NINPushType["kNIMPushTypeDefault"] = 0] = "kNIMPushTypeDefault"; /** < 默认apns */
|
|
21
|
+
NINPushType[NINPushType["kNIMPushTypePushKit"] = 1] = "kNIMPushTypePushKit"; /** < pushkit,仅iOS */
|
|
22
|
+
})(NINPushType = exports.NINPushType || (exports.NINPushType = {}));
|
|
23
23
|
//# sourceMappingURL=user_def.js.map
|
package/dist/node-nim.js
CHANGED
|
@@ -1,172 +1,172 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.v2 = exports.qchat = exports.
|
|
18
|
-
const client_1 = require("./nim/client");
|
|
19
|
-
Object.defineProperty(exports, "NIMClient", { enumerable: true, get: function () { return client_1.NIMClient; } });
|
|
20
|
-
const data_sync_1 = require("./nim/data_sync");
|
|
21
|
-
Object.defineProperty(exports, "NIMDataSync", { enumerable: true, get: function () { return data_sync_1.NIMDataSync; } });
|
|
22
|
-
const friend_1 = require("./nim/friend");
|
|
23
|
-
Object.defineProperty(exports, "NIMFriend", { enumerable: true, get: function () { return friend_1.NIMFriend; } });
|
|
24
|
-
const global_1 = require("./nim/global");
|
|
25
|
-
Object.defineProperty(exports, "NIMGlobal", { enumerable: true, get: function () { return global_1.NIMGlobal; } });
|
|
26
|
-
const msglog_1 = require("./nim/msglog");
|
|
27
|
-
Object.defineProperty(exports, "NIMMsgLog", { enumerable: true, get: function () { return msglog_1.NIMMsgLog; } });
|
|
28
|
-
const nos_1 = require("./nim/nos");
|
|
29
|
-
Object.defineProperty(exports, "NIMNOS", { enumerable: true, get: function () { return nos_1.NIMNOS; } });
|
|
30
|
-
const online_session_1 = require("./nim/online_session");
|
|
31
|
-
Object.defineProperty(exports, "NIMOnlineSession", { enumerable: true, get: function () { return online_session_1.NIMOnlineSession; } });
|
|
32
|
-
const pass_through_proxy_1 = require("./nim/pass_through_proxy");
|
|
33
|
-
Object.defineProperty(exports, "NIMPassThroughProxy", { enumerable: true, get: function () { return pass_through_proxy_1.NIMPassThroughProxy; } });
|
|
34
|
-
const session_1 = require("./nim/session");
|
|
35
|
-
Object.defineProperty(exports, "NIMSession", { enumerable: true, get: function () { return session_1.NIMSession; } });
|
|
36
|
-
const subscribe_event_1 = require("./nim/subscribe_event");
|
|
37
|
-
Object.defineProperty(exports, "NIMSubscribeEvent", { enumerable: true, get: function () { return subscribe_event_1.NIMSubscribeEvent; } });
|
|
38
|
-
const super_team_1 = require("./nim/super_team");
|
|
39
|
-
Object.defineProperty(exports, "NIMSuperTeam", { enumerable: true, get: function () { return super_team_1.NIMSuperTeam; } });
|
|
40
|
-
const sysmsg_1 = require("./nim/sysmsg");
|
|
41
|
-
Object.defineProperty(exports, "NIMSysMsg", { enumerable: true, get: function () { return sysmsg_1.NIMSysMsg; } });
|
|
42
|
-
const talk_1 = require("./nim/talk");
|
|
43
|
-
Object.defineProperty(exports, "NIMTalk", { enumerable: true, get: function () { return talk_1.NIMTalk; } });
|
|
44
|
-
const team_1 = require("./nim/team");
|
|
45
|
-
Object.defineProperty(exports, "NIMTeam", { enumerable: true, get: function () { return team_1.NIMTeam; } });
|
|
46
|
-
const tool_1 = require("./nim/tool");
|
|
47
|
-
Object.defineProperty(exports, "NIMTool", { enumerable: true, get: function () { return tool_1.NIMTool; } });
|
|
48
|
-
const user_1 = require("./nim/user");
|
|
49
|
-
Object.defineProperty(exports, "NIMUser", { enumerable: true, get: function () { return user_1.NIMUser; } });
|
|
50
|
-
const plugin_1 = require("./nim/plugin");
|
|
51
|
-
Object.defineProperty(exports, "NIMPlugin", { enumerable: true, get: function () { return plugin_1.NIMPlugin; } });
|
|
52
|
-
const talkex_1 = require("./nim/talkex");
|
|
53
|
-
Object.defineProperty(exports, "NIMTalkEx", { enumerable: true, get: function () { return talkex_1.NIMTalkEx; } });
|
|
54
|
-
const
|
|
55
|
-
Object.defineProperty(exports, "
|
|
56
|
-
const
|
|
57
|
-
Object.defineProperty(exports, "
|
|
58
|
-
const
|
|
59
|
-
Object.defineProperty(exports, "
|
|
60
|
-
const
|
|
61
|
-
Object.defineProperty(exports, "
|
|
62
|
-
const
|
|
63
|
-
Object.defineProperty(exports, "
|
|
64
|
-
const
|
|
65
|
-
Object.defineProperty(exports, "
|
|
66
|
-
const
|
|
67
|
-
Object.defineProperty(exports, "
|
|
68
|
-
const
|
|
69
|
-
Object.defineProperty(exports, "
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
__exportStar(require("./nim_def/
|
|
79
|
-
__exportStar(require("./nim_def/
|
|
80
|
-
__exportStar(require("./nim_def/
|
|
81
|
-
__exportStar(require("./nim_def/
|
|
82
|
-
__exportStar(require("./nim_def/
|
|
83
|
-
__exportStar(require("./nim_def/
|
|
84
|
-
__exportStar(require("./nim_def/
|
|
85
|
-
__exportStar(require("./nim_def/
|
|
86
|
-
__exportStar(require("./nim_def/
|
|
87
|
-
__exportStar(require("./nim_def/
|
|
88
|
-
__exportStar(require("./nim_def/
|
|
89
|
-
__exportStar(require("./nim_def/
|
|
90
|
-
__exportStar(require("./nim_def/
|
|
91
|
-
__exportStar(require("./
|
|
92
|
-
__exportStar(require("./
|
|
93
|
-
__exportStar(require("./
|
|
94
|
-
__exportStar(require("./
|
|
95
|
-
__exportStar(require("./
|
|
96
|
-
__exportStar(require("./qchat_def/
|
|
97
|
-
__exportStar(require("./qchat_def/
|
|
98
|
-
__exportStar(require("./qchat_def/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
109
|
-
this.
|
|
110
|
-
this.
|
|
111
|
-
this.
|
|
112
|
-
this.
|
|
113
|
-
this.
|
|
114
|
-
this.
|
|
115
|
-
this.
|
|
116
|
-
this.
|
|
117
|
-
this.
|
|
118
|
-
this.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
this.
|
|
122
|
-
this.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
127
|
-
this.
|
|
128
|
-
this.
|
|
129
|
-
this.
|
|
130
|
-
this.
|
|
131
|
-
this.
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
135
|
-
this.
|
|
136
|
-
this.
|
|
137
|
-
this.
|
|
138
|
-
this.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
this.
|
|
149
|
-
this.
|
|
150
|
-
this.
|
|
151
|
-
this.
|
|
152
|
-
this.
|
|
153
|
-
this.
|
|
154
|
-
this.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
this.
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
162
|
-
this.
|
|
163
|
-
this.
|
|
164
|
-
this.
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
exports.
|
|
169
|
-
exports.
|
|
170
|
-
exports.qchat = new QChat();
|
|
171
|
-
exports.v2 = new
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.v2 = exports.qchat = exports.nim = exports.QChat = exports.NIM = exports.V2NIMConversationIdUtil = exports.V2NIMChatroomMessageCreator = exports.V2NIMClientAntispamUtil = exports.V2NIMMessageCreator = exports.V2NIMChatroomClient = exports.QChatRoleModule = exports.QChatAttachmentModule = exports.QChatSystemNotificationModule = exports.QChatMessageModule = exports.QChatChannelCategoryModule = exports.QChatChannelModule = exports.QChatServerModule = exports.QChatInstanceModule = 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
|
+
Object.defineProperty(exports, "NIMClient", { enumerable: true, get: function () { return client_1.NIMClient; } });
|
|
20
|
+
const data_sync_1 = require("./nim/data_sync");
|
|
21
|
+
Object.defineProperty(exports, "NIMDataSync", { enumerable: true, get: function () { return data_sync_1.NIMDataSync; } });
|
|
22
|
+
const friend_1 = require("./nim/friend");
|
|
23
|
+
Object.defineProperty(exports, "NIMFriend", { enumerable: true, get: function () { return friend_1.NIMFriend; } });
|
|
24
|
+
const global_1 = require("./nim/global");
|
|
25
|
+
Object.defineProperty(exports, "NIMGlobal", { enumerable: true, get: function () { return global_1.NIMGlobal; } });
|
|
26
|
+
const msglog_1 = require("./nim/msglog");
|
|
27
|
+
Object.defineProperty(exports, "NIMMsgLog", { enumerable: true, get: function () { return msglog_1.NIMMsgLog; } });
|
|
28
|
+
const nos_1 = require("./nim/nos");
|
|
29
|
+
Object.defineProperty(exports, "NIMNOS", { enumerable: true, get: function () { return nos_1.NIMNOS; } });
|
|
30
|
+
const online_session_1 = require("./nim/online_session");
|
|
31
|
+
Object.defineProperty(exports, "NIMOnlineSession", { enumerable: true, get: function () { return online_session_1.NIMOnlineSession; } });
|
|
32
|
+
const pass_through_proxy_1 = require("./nim/pass_through_proxy");
|
|
33
|
+
Object.defineProperty(exports, "NIMPassThroughProxy", { enumerable: true, get: function () { return pass_through_proxy_1.NIMPassThroughProxy; } });
|
|
34
|
+
const session_1 = require("./nim/session");
|
|
35
|
+
Object.defineProperty(exports, "NIMSession", { enumerable: true, get: function () { return session_1.NIMSession; } });
|
|
36
|
+
const subscribe_event_1 = require("./nim/subscribe_event");
|
|
37
|
+
Object.defineProperty(exports, "NIMSubscribeEvent", { enumerable: true, get: function () { return subscribe_event_1.NIMSubscribeEvent; } });
|
|
38
|
+
const super_team_1 = require("./nim/super_team");
|
|
39
|
+
Object.defineProperty(exports, "NIMSuperTeam", { enumerable: true, get: function () { return super_team_1.NIMSuperTeam; } });
|
|
40
|
+
const sysmsg_1 = require("./nim/sysmsg");
|
|
41
|
+
Object.defineProperty(exports, "NIMSysMsg", { enumerable: true, get: function () { return sysmsg_1.NIMSysMsg; } });
|
|
42
|
+
const talk_1 = require("./nim/talk");
|
|
43
|
+
Object.defineProperty(exports, "NIMTalk", { enumerable: true, get: function () { return talk_1.NIMTalk; } });
|
|
44
|
+
const team_1 = require("./nim/team");
|
|
45
|
+
Object.defineProperty(exports, "NIMTeam", { enumerable: true, get: function () { return team_1.NIMTeam; } });
|
|
46
|
+
const tool_1 = require("./nim/tool");
|
|
47
|
+
Object.defineProperty(exports, "NIMTool", { enumerable: true, get: function () { return tool_1.NIMTool; } });
|
|
48
|
+
const user_1 = require("./nim/user");
|
|
49
|
+
Object.defineProperty(exports, "NIMUser", { enumerable: true, get: function () { return user_1.NIMUser; } });
|
|
50
|
+
const plugin_1 = require("./nim/plugin");
|
|
51
|
+
Object.defineProperty(exports, "NIMPlugin", { enumerable: true, get: function () { return plugin_1.NIMPlugin; } });
|
|
52
|
+
const talkex_1 = require("./nim/talkex");
|
|
53
|
+
Object.defineProperty(exports, "NIMTalkEx", { enumerable: true, get: function () { return talkex_1.NIMTalkEx; } });
|
|
54
|
+
const instance_1 = require("./qchat/instance");
|
|
55
|
+
Object.defineProperty(exports, "QChatInstanceModule", { enumerable: true, get: function () { return instance_1.QChatInstanceModule; } });
|
|
56
|
+
const server_1 = require("./qchat/server");
|
|
57
|
+
Object.defineProperty(exports, "QChatServerModule", { enumerable: true, get: function () { return server_1.QChatServerModule; } });
|
|
58
|
+
const channel_1 = require("./qchat/channel");
|
|
59
|
+
Object.defineProperty(exports, "QChatChannelModule", { enumerable: true, get: function () { return channel_1.QChatChannelModule; } });
|
|
60
|
+
const channel_category_1 = require("./qchat/channel_category");
|
|
61
|
+
Object.defineProperty(exports, "QChatChannelCategoryModule", { enumerable: true, get: function () { return channel_category_1.QChatChannelCategoryModule; } });
|
|
62
|
+
const message_1 = require("./qchat/message");
|
|
63
|
+
Object.defineProperty(exports, "QChatMessageModule", { enumerable: true, get: function () { return message_1.QChatMessageModule; } });
|
|
64
|
+
const system_notification_1 = require("./qchat/system_notification");
|
|
65
|
+
Object.defineProperty(exports, "QChatSystemNotificationModule", { enumerable: true, get: function () { return system_notification_1.QChatSystemNotificationModule; } });
|
|
66
|
+
const attachment_1 = require("./qchat/attachment");
|
|
67
|
+
Object.defineProperty(exports, "QChatAttachmentModule", { enumerable: true, get: function () { return attachment_1.QChatAttachmentModule; } });
|
|
68
|
+
const role_1 = require("./qchat/role");
|
|
69
|
+
Object.defineProperty(exports, "QChatRoleModule", { enumerable: true, get: function () { return role_1.QChatRoleModule; } });
|
|
70
|
+
const v2_nim_client_1 = require("./v2/v2_nim_client");
|
|
71
|
+
const v2_nim_chatroom_client_1 = require("./v2/v2_nim_chatroom_client");
|
|
72
|
+
Object.defineProperty(exports, "V2NIMChatroomClient", { enumerable: true, get: function () { return v2_nim_chatroom_client_1.V2NIMChatroomClient; } });
|
|
73
|
+
const v2_nim_utilities_1 = require("./v2/v2_nim_utilities");
|
|
74
|
+
Object.defineProperty(exports, "V2NIMMessageCreator", { enumerable: true, get: function () { return v2_nim_utilities_1.V2NIMMessageCreator; } });
|
|
75
|
+
Object.defineProperty(exports, "V2NIMClientAntispamUtil", { enumerable: true, get: function () { return v2_nim_utilities_1.V2NIMClientAntispamUtil; } });
|
|
76
|
+
Object.defineProperty(exports, "V2NIMChatroomMessageCreator", { enumerable: true, get: function () { return v2_nim_utilities_1.V2NIMChatroomMessageCreator; } });
|
|
77
|
+
Object.defineProperty(exports, "V2NIMConversationIdUtil", { enumerable: true, get: function () { return v2_nim_utilities_1.V2NIMConversationIdUtil; } });
|
|
78
|
+
__exportStar(require("./nim_def/client_def"), exports);
|
|
79
|
+
__exportStar(require("./nim_def/data_sync_def"), exports);
|
|
80
|
+
__exportStar(require("./nim_def/friend_def"), exports);
|
|
81
|
+
__exportStar(require("./nim_def/global_def"), exports);
|
|
82
|
+
__exportStar(require("./nim_def/msglog_def"), exports);
|
|
83
|
+
__exportStar(require("./nim_def/nos_def"), exports);
|
|
84
|
+
__exportStar(require("./nim_def/online_session_def"), exports);
|
|
85
|
+
__exportStar(require("./nim_def/pass_through_proxy_def"), exports);
|
|
86
|
+
__exportStar(require("./nim_def/session_def"), exports);
|
|
87
|
+
__exportStar(require("./nim_def/subscribe_event_def"), exports);
|
|
88
|
+
__exportStar(require("./nim_def/super_team_def"), exports);
|
|
89
|
+
__exportStar(require("./nim_def/sysmsg_def"), exports);
|
|
90
|
+
__exportStar(require("./nim_def/talk_def"), exports);
|
|
91
|
+
__exportStar(require("./nim_def/team_def"), exports);
|
|
92
|
+
__exportStar(require("./nim_def/tool_def"), exports);
|
|
93
|
+
__exportStar(require("./nim_def/user_def"), exports);
|
|
94
|
+
__exportStar(require("./nim_def/plugin_def"), exports);
|
|
95
|
+
__exportStar(require("./nim_def/talkex_def"), exports);
|
|
96
|
+
__exportStar(require("./qchat_def/instance_def"), exports);
|
|
97
|
+
__exportStar(require("./qchat_def/server_def"), exports);
|
|
98
|
+
__exportStar(require("./qchat_def/channel_def"), exports);
|
|
99
|
+
__exportStar(require("./qchat_def/message_def"), exports);
|
|
100
|
+
__exportStar(require("./qchat_def/system_notification_def"), exports);
|
|
101
|
+
__exportStar(require("./qchat_def/attachment_def"), exports);
|
|
102
|
+
__exportStar(require("./qchat_def/role_def"), exports);
|
|
103
|
+
class NIM {
|
|
104
|
+
constructor() {
|
|
105
|
+
this.client = new client_1.NIMClient();
|
|
106
|
+
this.dataSync = new data_sync_1.NIMDataSync();
|
|
107
|
+
this.friend = new friend_1.NIMFriend();
|
|
108
|
+
this.global = new global_1.NIMGlobal();
|
|
109
|
+
this.msgLog = new msglog_1.NIMMsgLog();
|
|
110
|
+
this.nos = new nos_1.NIMNOS();
|
|
111
|
+
this.onlineSession = new online_session_1.NIMOnlineSession();
|
|
112
|
+
this.passThroughProxy = new pass_through_proxy_1.NIMPassThroughProxy();
|
|
113
|
+
this.session = new session_1.NIMSession();
|
|
114
|
+
this.subscribeEvent = new subscribe_event_1.NIMSubscribeEvent();
|
|
115
|
+
this.superTeam = new super_team_1.NIMSuperTeam();
|
|
116
|
+
this.sysMsg = new sysmsg_1.NIMSysMsg();
|
|
117
|
+
this.talk = new talk_1.NIMTalk();
|
|
118
|
+
this.team = new team_1.NIMTeam();
|
|
119
|
+
this.tool = new tool_1.NIMTool();
|
|
120
|
+
this.user = new user_1.NIMUser();
|
|
121
|
+
this.plugin = new plugin_1.NIMPlugin();
|
|
122
|
+
this.talkEx = new talkex_1.NIMTalkEx();
|
|
123
|
+
}
|
|
124
|
+
initEventHandlers() {
|
|
125
|
+
this.client.initEventHandlers();
|
|
126
|
+
this.dataSync.initEventHandlers();
|
|
127
|
+
this.friend.initEventHandlers();
|
|
128
|
+
this.global.initEventHandlers();
|
|
129
|
+
this.msgLog.initEventHandlers();
|
|
130
|
+
this.nos.initEventHandlers();
|
|
131
|
+
this.onlineSession.initEventHandlers();
|
|
132
|
+
this.passThroughProxy.initEventHandlers();
|
|
133
|
+
this.session.initEventHandlers();
|
|
134
|
+
this.subscribeEvent.initEventHandlers();
|
|
135
|
+
this.superTeam.initEventHandlers();
|
|
136
|
+
this.sysMsg.initEventHandlers();
|
|
137
|
+
this.talk.initEventHandlers();
|
|
138
|
+
this.team.initEventHandlers();
|
|
139
|
+
this.tool.initEventHandlers();
|
|
140
|
+
this.user.initEventHandlers();
|
|
141
|
+
this.plugin.initEventHandlers();
|
|
142
|
+
this.talkEx.initEventHandlers();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
exports.NIM = NIM;
|
|
146
|
+
class QChat {
|
|
147
|
+
constructor() {
|
|
148
|
+
this.instance = new instance_1.QChatInstanceModule();
|
|
149
|
+
this.server = new server_1.QChatServerModule();
|
|
150
|
+
this.channel = new channel_1.QChatChannelModule();
|
|
151
|
+
this.channelCategory = new channel_category_1.QChatChannelCategoryModule();
|
|
152
|
+
this.message = new message_1.QChatMessageModule();
|
|
153
|
+
this.systemNotification = new system_notification_1.QChatSystemNotificationModule();
|
|
154
|
+
this.attachment = new attachment_1.QChatAttachmentModule();
|
|
155
|
+
this.role = new role_1.QChatRoleModule();
|
|
156
|
+
}
|
|
157
|
+
initEventHandlers() {
|
|
158
|
+
this.instance.initEventHandlers();
|
|
159
|
+
this.server.initEventHandlers();
|
|
160
|
+
this.channel.initEventHandlers();
|
|
161
|
+
this.channelCategory.initEventHandlers();
|
|
162
|
+
this.message.initEventHandlers();
|
|
163
|
+
this.systemNotification.initEventHandlers();
|
|
164
|
+
this.attachment.initEventHandlers();
|
|
165
|
+
this.role.initEventHandlers();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
exports.QChat = QChat;
|
|
169
|
+
exports.nim = new NIM();
|
|
170
|
+
exports.qchat = new QChat();
|
|
171
|
+
exports.v2 = new v2_nim_client_1.V2NIMClient();
|
|
172
172
|
//# sourceMappingURL=node-nim.js.map
|
package/dist/node-nim.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-nim.js","sourceRoot":"","sources":["../ts/node-nim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAwC;
|
|
1
|
+
{"version":3,"file":"node-nim.js","sourceRoot":"","sources":["../ts/node-nim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAwC;AA8BpC,0FA9BK,kBAAS,OA8BL;AA7Bb,+CAA6C;AA8BzC,4FA9BK,uBAAW,OA8BL;AA7Bf,yCAAwC;AA8BpC,0FA9BK,kBAAS,OA8BL;AA7Bb,yCAAwC;AA8BpC,0FA9BK,kBAAS,OA8BL;AA7Bb,yCAAwC;AA8BpC,0FA9BK,kBAAS,OA8BL;AA7Bb,mCAAkC;AA8B9B,uFA9BK,YAAM,OA8BL;AA7BV,yDAAuD;AA8BnD,iGA9BK,iCAAgB,OA8BL;AA7BpB,iEAA8D;AA8B1D,oGA9BK,wCAAmB,OA8BL;AA7BvB,2CAA0C;AA8BtC,2FA9BK,oBAAU,OA8BL;AA7Bd,2DAAyD;AA8BrD,kGA9BK,mCAAiB,OA8BL;AA7BrB,iDAA+C;AA8B3C,6FA9BK,yBAAY,OA8BL;AA7BhB,yCAAwC;AA8BpC,0FA9BK,kBAAS,OA8BL;AA7Bb,qCAAoC;AA8BhC,wFA9BK,cAAO,OA8BL;AA7BX,qCAAoC;AA8BhC,wFA9BK,cAAO,OA8BL;AA7BX,qCAAoC;AA8BhC,wFA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AC,iBAAiB,EAAE,CAAA;QACnC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAA;IACjC,CAAC;CACJ;AAnBD,sBAmBC;AACY,QAAA,GAAG,GAAG,IAAI,GAAG,EAAE,CAAA;AACf,QAAA,KAAK,GAAG,IAAI,KAAK,EAAE,CAAA;AACnB,QAAA,EAAE,GAAG,IAAI,2BAAW,EAAE,CAAA"}
|
package/dist/qchat/attachment.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
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.QChatAttachmentModule = void 0;
|
|
7
|
-
const loader_1 = __importDefault(require("../loader"));
|
|
8
|
-
const eventemitter3_1 = require("eventemitter3");
|
|
9
|
-
class QChatAttachmentModule extends eventemitter3_1.EventEmitter {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
this.instance = new loader_1.default.QChatAttachment({ emit: this.emit.bind(this) });
|
|
13
|
-
}
|
|
14
|
-
/** 注册全局回调 */
|
|
15
|
-
initEventHandlers() {
|
|
16
|
-
return this.instance.InitEventHandlers();
|
|
17
|
-
}
|
|
18
|
-
/** @fn upload(param: QChatAttachmentUploadParam)
|
|
19
|
-
* 上传附件
|
|
20
|
-
* @param[in] param 接口参数
|
|
21
|
-
* @return void
|
|
22
|
-
*/
|
|
23
|
-
upload(param) {
|
|
24
|
-
const p = new Promise((resolve) => {
|
|
25
|
-
param.cb = (resp) => {
|
|
26
|
-
resolve(resp);
|
|
27
|
-
};
|
|
28
|
-
this.instance.Upload(param);
|
|
29
|
-
});
|
|
30
|
-
return p;
|
|
31
|
-
}
|
|
32
|
-
/** @fn void StopUpload(const std::string& task_id)
|
|
33
|
-
* 停止上传附件
|
|
34
|
-
* @param[in] param 接口参数
|
|
35
|
-
* @return void
|
|
36
|
-
*/
|
|
37
|
-
stopUpload(param) {
|
|
38
|
-
return this.instance.StopUpload(param);
|
|
39
|
-
}
|
|
40
|
-
/** @fn download(param: QChatAttachmentDownloadParam)
|
|
41
|
-
* 下载附件
|
|
42
|
-
* @param[in] param 接口参数
|
|
43
|
-
* @return void
|
|
44
|
-
*/
|
|
45
|
-
download(param) {
|
|
46
|
-
const p = new Promise((resolve) => {
|
|
47
|
-
param.cb = (resp) => {
|
|
48
|
-
resolve(resp);
|
|
49
|
-
};
|
|
50
|
-
this.instance.Download(param);
|
|
51
|
-
});
|
|
52
|
-
return p;
|
|
53
|
-
}
|
|
54
|
-
/** @fn stopDownload(param: QChatAttachmentStopDownloadParam)
|
|
55
|
-
* 停止下载附件
|
|
56
|
-
* @param[in] param 接口参数
|
|
57
|
-
* @return void
|
|
58
|
-
*/
|
|
59
|
-
stopDownload(param) {
|
|
60
|
-
return this.instance.StopDownload(param);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.QChatAttachmentModule = QChatAttachmentModule;
|
|
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.QChatAttachmentModule = void 0;
|
|
7
|
+
const loader_1 = __importDefault(require("../loader"));
|
|
8
|
+
const eventemitter3_1 = require("eventemitter3");
|
|
9
|
+
class QChatAttachmentModule extends eventemitter3_1.EventEmitter {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.instance = new loader_1.default.QChatAttachment({ emit: this.emit.bind(this) });
|
|
13
|
+
}
|
|
14
|
+
/** 注册全局回调 */
|
|
15
|
+
initEventHandlers() {
|
|
16
|
+
return this.instance.InitEventHandlers();
|
|
17
|
+
}
|
|
18
|
+
/** @fn upload(param: QChatAttachmentUploadParam)
|
|
19
|
+
* 上传附件
|
|
20
|
+
* @param[in] param 接口参数
|
|
21
|
+
* @return void
|
|
22
|
+
*/
|
|
23
|
+
upload(param) {
|
|
24
|
+
const p = new Promise((resolve) => {
|
|
25
|
+
param.cb = (resp) => {
|
|
26
|
+
resolve(resp);
|
|
27
|
+
};
|
|
28
|
+
this.instance.Upload(param);
|
|
29
|
+
});
|
|
30
|
+
return p;
|
|
31
|
+
}
|
|
32
|
+
/** @fn void StopUpload(const std::string& task_id)
|
|
33
|
+
* 停止上传附件
|
|
34
|
+
* @param[in] param 接口参数
|
|
35
|
+
* @return void
|
|
36
|
+
*/
|
|
37
|
+
stopUpload(param) {
|
|
38
|
+
return this.instance.StopUpload(param);
|
|
39
|
+
}
|
|
40
|
+
/** @fn download(param: QChatAttachmentDownloadParam)
|
|
41
|
+
* 下载附件
|
|
42
|
+
* @param[in] param 接口参数
|
|
43
|
+
* @return void
|
|
44
|
+
*/
|
|
45
|
+
download(param) {
|
|
46
|
+
const p = new Promise((resolve) => {
|
|
47
|
+
param.cb = (resp) => {
|
|
48
|
+
resolve(resp);
|
|
49
|
+
};
|
|
50
|
+
this.instance.Download(param);
|
|
51
|
+
});
|
|
52
|
+
return p;
|
|
53
|
+
}
|
|
54
|
+
/** @fn stopDownload(param: QChatAttachmentStopDownloadParam)
|
|
55
|
+
* 停止下载附件
|
|
56
|
+
* @param[in] param 接口参数
|
|
57
|
+
* @return void
|
|
58
|
+
*/
|
|
59
|
+
stopDownload(param) {
|
|
60
|
+
return this.instance.StopDownload(param);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.QChatAttachmentModule = QChatAttachmentModule;
|
|
64
64
|
//# sourceMappingURL=attachment.js.map
|