node-nim 9.5.0-rc.1 → 9.7.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 +130 -149
- package/dist/chatroom/chatroom.js +14 -4
- package/dist/chatroom/chatroom.js.map +1 -1
- package/dist/loader.js +15 -7
- package/dist/loader.js.map +1 -1
- package/dist/nim/client.js +5 -5
- package/dist/nim/client.js.map +1 -1
- package/dist/nim/friend.js.map +1 -1
- package/dist/nim/global.js.map +1 -1
- package/dist/nim/msglog.js +24 -0
- package/dist/nim/msglog.js.map +1 -1
- package/dist/nim/nos.js.map +1 -1
- package/dist/nim/online_session.js.map +1 -1
- package/dist/nim/pass_through_proxy.js.map +1 -1
- package/dist/nim/plugin.js.map +1 -1
- package/dist/nim/session.js.map +1 -1
- package/dist/nim/subscribe_event.js.map +1 -1
- package/dist/nim/super_team.js.map +1 -1
- package/dist/nim/sysmsg.js.map +1 -1
- package/dist/nim/talk.js.map +1 -1
- package/dist/nim/talkex.js.map +1 -1
- package/dist/nim/team.js.map +1 -1
- package/dist/nim/tool.js.map +1 -1
- package/dist/nim/user.js.map +1 -1
- package/dist/nim_def/client_def.js +164 -79
- package/dist/nim_def/client_def.js.map +1 -1
- package/dist/nim_def/msglog_def.js +1 -0
- package/dist/nim_def/msglog_def.js.map +1 -1
- package/dist/qchat_def/public_def.js +102 -69
- package/dist/qchat_def/public_def.js.map +1 -1
- package/package.json +64 -64
- package/script/download-sdk.mjs +67 -64
- package/types/chatroom/chatroom.d.ts +24 -23
- package/types/chatroom_def/chatroom_def.d.ts +44 -18
- package/types/nim/client.d.ts +8 -8
- package/types/nim/friend.d.ts +6 -6
- package/types/nim/global.d.ts +6 -6
- package/types/nim/msglog.d.ts +43 -28
- package/types/nim/nos.d.ts +5 -5
- package/types/nim/online_session.d.ts +4 -4
- package/types/nim/pass_through_proxy.d.ts +1 -1
- package/types/nim/plugin.d.ts +2 -2
- package/types/nim/session.d.ts +19 -19
- package/types/nim/subscribe_event.d.ts +5 -5
- package/types/nim/super_team.d.ts +24 -24
- package/types/nim/sysmsg.d.ts +8 -8
- package/types/nim/talk.d.ts +3 -3
- package/types/nim/talkex.d.ts +11 -11
- package/types/nim/team.d.ts +33 -33
- package/types/nim/tool.d.ts +2 -2
- package/types/nim/user.d.ts +8 -8
- package/types/nim_def/client_def.d.ts +95 -92
- package/types/nim_def/data_sync_def.d.ts +1 -1
- package/types/nim_def/friend_def.d.ts +10 -10
- package/types/nim_def/global_def.d.ts +13 -13
- package/types/nim_def/msglog_def.d.ts +54 -45
- package/types/nim_def/nos_def.d.ts +14 -14
- package/types/nim_def/online_session_def.d.ts +9 -9
- package/types/nim_def/pass_through_proxy_def.d.ts +3 -3
- package/types/nim_def/plugin_def.d.ts +4 -4
- package/types/nim_def/session_def.d.ts +36 -36
- package/types/nim_def/subscribe_event_def.d.ts +12 -12
- package/types/nim_def/super_team_def.d.ts +32 -32
- package/types/nim_def/sysmsg_def.d.ts +13 -13
- package/types/nim_def/talk_def.d.ts +11 -11
- package/types/nim_def/talkex_def.d.ts +27 -27
- package/types/nim_def/team_def.d.ts +47 -47
- package/types/nim_def/tool_def.d.ts +4 -4
- package/types/nim_def/user_def.d.ts +14 -14
- package/types/qchat_def/attachment_def.d.ts +4 -4
- package/types/qchat_def/channel_def.d.ts +47 -47
- package/types/qchat_def/instance_def.d.ts +9 -11
- package/types/qchat_def/message_def.d.ts +27 -23
- package/types/qchat_def/public_def.d.ts +20 -70
- package/types/qchat_def/role_def.d.ts +45 -45
- package/types/qchat_def/server_def.d.ts +44 -44
- package/types/qchat_def/system_notification_def.d.ts +9 -9
|
@@ -30,85 +30,88 @@ export declare enum NIMClientType {
|
|
|
30
30
|
}
|
|
31
31
|
/** @enum NIMResCode 返回的错误号(只定义需要客户端处理的) */
|
|
32
32
|
export declare enum NIMResCode {
|
|
33
|
-
kNIMResError = 0
|
|
34
|
-
kNIMResSuccess = 200
|
|
35
|
-
kNIMResVersionError = 201
|
|
36
|
-
kNIMResUidPassError = 302
|
|
37
|
-
kNIMResForbidden = 403
|
|
38
|
-
kNIMResNotExist = 404
|
|
39
|
-
kNIMResNoModify = 406
|
|
40
|
-
kNIMResTimeoutError = 408
|
|
41
|
-
kNIMResParameterError = 414
|
|
42
|
-
kNIMResConnectionError = 415
|
|
43
|
-
kNIMResFrequently = 416
|
|
44
|
-
kNIMResExist = 417
|
|
45
|
-
kNIMResOverrun = 419
|
|
46
|
-
kNIMResAccountBlock = 422
|
|
47
|
-
kNIMResUnknownError = 500
|
|
48
|
-
kNIMResServerDataError = 501
|
|
49
|
-
kNIMResTooBuzy = 503
|
|
50
|
-
kNIMResExceedLimit = 508
|
|
51
|
-
kNIMResInvalid = 509
|
|
52
|
-
kNIMResTeamECountLimit = 801
|
|
53
|
-
kNIMResTeamENAccess = 802
|
|
54
|
-
kNIMResTeamENotExist = 803
|
|
55
|
-
kNIMResTeamEMemberNotExist = 804
|
|
56
|
-
kNIMResTeamErrType = 805
|
|
57
|
-
kNIMResTeamLimit = 806
|
|
58
|
-
kNIMResTeamUserStatusErr = 807
|
|
59
|
-
kNIMResTeamApplySuccess = 808
|
|
60
|
-
kNIMResTeamAlreadyIn = 809
|
|
61
|
-
kNIMResTeamInviteSuccess = 810
|
|
62
|
-
kNIMResForcePushCountLimit = 811
|
|
63
|
-
kNIMResTeamMemberLimit = 813
|
|
64
|
-
kNIMResTeamGetInfoListPartSuccess = 816
|
|
65
|
-
kNIMResInvalidProtocol = 997
|
|
66
|
-
kNIMResEUnpacket = 998
|
|
67
|
-
kNIMResEPacket = 999
|
|
68
|
-
kNIMResInBlack = 7101
|
|
69
|
-
kNIMResRoomNotExists = 10404
|
|
70
|
-
kNIMResRoomHasExists = 10405
|
|
71
|
-
kNIMResRoomMemberNotExists = 10406
|
|
72
|
-
kNIMResRoomMemberHasExists = 10407
|
|
73
|
-
kNIMResRoomInviteNotExists = 10408
|
|
74
|
-
kNIMResRoomInviteHasReject = 10409
|
|
75
|
-
kNIMResRoomInviteHasAccept = 10410
|
|
76
|
-
kNIMResPeerNimOffline = 10201
|
|
77
|
-
kNIMResPeerPushOffline = 10202
|
|
78
|
-
kNIMResRoomUidConflict = 10417
|
|
79
|
-
kNIMResRoomMemberExceed = 10419
|
|
80
|
-
kNIMResRoomMemberHasExistsOtherClient = 10420
|
|
81
|
-
kNIMLocalRes = 10000
|
|
82
|
-
kNIMResRoomLocalNeedRequestAgain = 10001
|
|
83
|
-
kNIMLocalResNetworkError = 10010
|
|
84
|
-
kNIMLocalResMsgNosUploadCancel = 10200
|
|
85
|
-
kNIMLocalResMsgNosDownloadCancel = 10206
|
|
86
|
-
kNIMLocalResMsgNosDownloadCheckError = 10207
|
|
87
|
-
|
|
88
|
-
kNIMLocalResMsgFileNotExist = 10404
|
|
89
|
-
kNIMLocalResParameterError = 10414
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
33
|
+
kNIMResError = 0,
|
|
34
|
+
kNIMResSuccess = 200,
|
|
35
|
+
kNIMResVersionError = 201,
|
|
36
|
+
kNIMResUidPassError = 302,
|
|
37
|
+
kNIMResForbidden = 403,
|
|
38
|
+
kNIMResNotExist = 404,
|
|
39
|
+
kNIMResNoModify = 406,
|
|
40
|
+
kNIMResTimeoutError = 408,
|
|
41
|
+
kNIMResParameterError = 414,
|
|
42
|
+
kNIMResConnectionError = 415,
|
|
43
|
+
kNIMResFrequently = 416,
|
|
44
|
+
kNIMResExist = 417,
|
|
45
|
+
kNIMResOverrun = 419,
|
|
46
|
+
kNIMResAccountBlock = 422,
|
|
47
|
+
kNIMResUnknownError = 500,
|
|
48
|
+
kNIMResServerDataError = 501,
|
|
49
|
+
kNIMResTooBuzy = 503,
|
|
50
|
+
kNIMResExceedLimit = 508,
|
|
51
|
+
kNIMResInvalid = 509,
|
|
52
|
+
kNIMResTeamECountLimit = 801,
|
|
53
|
+
kNIMResTeamENAccess = 802,
|
|
54
|
+
kNIMResTeamENotExist = 803,
|
|
55
|
+
kNIMResTeamEMemberNotExist = 804,
|
|
56
|
+
kNIMResTeamErrType = 805,
|
|
57
|
+
kNIMResTeamLimit = 806,
|
|
58
|
+
kNIMResTeamUserStatusErr = 807,
|
|
59
|
+
kNIMResTeamApplySuccess = 808,
|
|
60
|
+
kNIMResTeamAlreadyIn = 809,
|
|
61
|
+
kNIMResTeamInviteSuccess = 810,
|
|
62
|
+
kNIMResForcePushCountLimit = 811,
|
|
63
|
+
kNIMResTeamMemberLimit = 813,
|
|
64
|
+
kNIMResTeamGetInfoListPartSuccess = 816,
|
|
65
|
+
kNIMResInvalidProtocol = 997,
|
|
66
|
+
kNIMResEUnpacket = 998,
|
|
67
|
+
kNIMResEPacket = 999,
|
|
68
|
+
kNIMResInBlack = 7101,
|
|
69
|
+
kNIMResRoomNotExists = 10404,
|
|
70
|
+
kNIMResRoomHasExists = 10405,
|
|
71
|
+
kNIMResRoomMemberNotExists = 10406,
|
|
72
|
+
kNIMResRoomMemberHasExists = 10407,
|
|
73
|
+
kNIMResRoomInviteNotExists = 10408,
|
|
74
|
+
kNIMResRoomInviteHasReject = 10409,
|
|
75
|
+
kNIMResRoomInviteHasAccept = 10410,
|
|
76
|
+
kNIMResPeerNimOffline = 10201,
|
|
77
|
+
kNIMResPeerPushOffline = 10202,
|
|
78
|
+
kNIMResRoomUidConflict = 10417,
|
|
79
|
+
kNIMResRoomMemberExceed = 10419,
|
|
80
|
+
kNIMResRoomMemberHasExistsOtherClient = 10420,
|
|
81
|
+
kNIMLocalRes = 10000,
|
|
82
|
+
kNIMResRoomLocalNeedRequestAgain = 10001,
|
|
83
|
+
kNIMLocalResNetworkError = 10010,
|
|
84
|
+
kNIMLocalResMsgNosUploadCancel = 10200,
|
|
85
|
+
kNIMLocalResMsgNosDownloadCancel = 10206,
|
|
86
|
+
kNIMLocalResMsgNosDownloadCheckError = 10207,
|
|
87
|
+
kNIMLocalResMsgAccessDenied = 10403,
|
|
88
|
+
kNIMLocalResMsgFileNotExist = 10404,
|
|
89
|
+
kNIMLocalResParameterError = 10414,
|
|
90
|
+
kNIMLocalResFrequently = 10416,
|
|
91
|
+
kNIMLocalResExist = 10417,
|
|
92
|
+
kNIMLocalResParaError = 10450,
|
|
93
|
+
kNIMLocalResMsgSendNosError = 10502,
|
|
94
|
+
kNIMLocalResExceedLimit = 10508,
|
|
95
|
+
kNIMLocalResCheckMsgDBFailed = 10600,
|
|
96
|
+
kNIMLocalResImportMsgDBFailed = 10601,
|
|
97
|
+
kNIMLocalResTMembersSyncUndone = 10602,
|
|
98
|
+
kNIMLocalResRtsError = 11100,
|
|
99
|
+
kNIMLocalResRtsIdNotExist = 11101,
|
|
100
|
+
kNIMLocalResRtsVChatExist = 11417,
|
|
101
|
+
kNIMLocalResRtsStatusError = 11501,
|
|
102
|
+
kNIMLocalResRtsChannelNotExist = 11510,
|
|
103
|
+
kNIMResRoomLinkError = 13001,
|
|
104
|
+
kNIMResRoomError = 13002,
|
|
105
|
+
kNIMResRoomBlackBeOut = 13003,
|
|
106
|
+
kNIMResRoomBeMuted = 13004,
|
|
107
|
+
kNIMResRoomAllMuted = 13006,
|
|
108
|
+
kNIMLocalResAPIErrorInitUndone = 20000,
|
|
109
|
+
kNIMLocalResAPIErrorLoginUndone = 20001,
|
|
110
|
+
kNIMLocalResAPIErrorLogined = 20002,
|
|
111
|
+
kNIMLocalResAPIErrorVersionError = 20003,
|
|
112
|
+
kNIMLocalResAPIErrorChatroomMixError = 20005,
|
|
113
|
+
kNIMLocalResAPIErrorLoginExceedRetryCount = 20006,
|
|
114
|
+
kNIMLocalResAPIErrorRunOutOfLinkAddress = 20007
|
|
112
115
|
}
|
|
113
116
|
/** @enum NIMLoginStep 登录步骤 */
|
|
114
117
|
export declare enum NIMLoginStep {
|
|
@@ -253,28 +256,28 @@ export interface KickOtherRes {
|
|
|
253
256
|
res_code_?: NIMResCode; /**< 返回的错误码NIMResCode */
|
|
254
257
|
device_ids_?: Array<string>; /**< 设备id,uuid */
|
|
255
258
|
}
|
|
256
|
-
export
|
|
257
|
-
export
|
|
258
|
-
export
|
|
259
|
-
export
|
|
260
|
-
export
|
|
261
|
-
export
|
|
262
|
-
export
|
|
263
|
-
export
|
|
259
|
+
export type LoginCallback = (result: LoginRes) => void;
|
|
260
|
+
export type LogoutCallback = (rescode: NIMResCode) => void;
|
|
261
|
+
export type KickoutCallback = (result: KickoutRes) => void;
|
|
262
|
+
export type DisconnectCallback = () => void;
|
|
263
|
+
export type MultiSpotLoginCallback = (result: MultiSpotLoginRes) => void;
|
|
264
|
+
export type KickOtherCallback = (result: KickOtherRes) => void;
|
|
265
|
+
export type MultiportPushConfigCallback = (rescode: NIMResCode, open: boolean) => void;
|
|
266
|
+
export type GetCurrentServerTimeCallback = (rescode: NIMResCode, calcLocal: boolean, time: number) => void;
|
|
264
267
|
export interface NIMClientAPI {
|
|
265
268
|
Init(appKey: string, appDataDir: string, appInstallDir: string, config: SDKConfig): boolean;
|
|
266
269
|
InitEventHandlers(): void;
|
|
267
|
-
Login(appKey: string, account: string, password: string, cb: LoginCallback, jsonExtension: string): boolean;
|
|
268
|
-
Logout(logoutType: NIMLogoutType, cb: LogoutCallback, jsonExtension: string): void;
|
|
270
|
+
Login(appKey: string, account: string, password: string, cb: LoginCallback | null, jsonExtension: string): boolean;
|
|
271
|
+
Logout(logoutType: NIMLogoutType, cb: LogoutCallback | null, jsonExtension: string): void;
|
|
269
272
|
Cleanup(jsonExtension: string): void;
|
|
270
273
|
GetSDKConfig(): SDKConfig;
|
|
271
274
|
LoginCustomDataToJson(customData: string): string;
|
|
272
275
|
GetLoginState(jsonExtension: string): NIMLoginState;
|
|
273
276
|
Relogin(jsonExtension: string): void;
|
|
274
277
|
KickOtherClient(clients: Array<string>): void;
|
|
275
|
-
SetMultiportPushConfigAsync(switch_on: boolean, cb: MultiportPushConfigCallback, jsonExtension: string): void;
|
|
276
|
-
GetMultiportPushConfigAsync(cb: MultiportPushConfigCallback, jsonExtension: string): void;
|
|
278
|
+
SetMultiportPushConfigAsync(switch_on: boolean, cb: MultiportPushConfigCallback | null, jsonExtension: string): void;
|
|
279
|
+
GetMultiportPushConfigAsync(cb: MultiportPushConfigCallback | null, jsonExtension: string): void;
|
|
277
280
|
GetSDKVersion(): string;
|
|
278
|
-
GetServerCurrentTime(cb: GetCurrentServerTimeCallback, calcLocal: boolean): void;
|
|
281
|
+
GetServerCurrentTime(cb: GetCurrentServerTimeCallback | null, calcLocal: boolean): void;
|
|
279
282
|
GetCurrentUserAccount(): string;
|
|
280
283
|
}
|
|
@@ -13,7 +13,7 @@ export declare enum NIMDataSyncType {
|
|
|
13
13
|
export declare enum NIMDataSyncStatus {
|
|
14
14
|
kNIMDataSyncStatusComplete = 1 /** < 同步完成*/
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export type DataSyncCallback = (syncType: NIMDataSyncType, status: NIMDataSyncStatus, dataSyncInfo: string) => void;
|
|
17
17
|
export interface NIMDataSyncAPI {
|
|
18
18
|
InitEventHandlers(): void;
|
|
19
19
|
}
|
|
@@ -51,16 +51,16 @@ export interface FriendChangeEvent {
|
|
|
51
51
|
type_?: NIMFriendChangeType; /** < 事件类型 */
|
|
52
52
|
content_?: string; /** < 事件内容,根据事件类型通过提供的ParsexxxEvent接口(nim_cpp_friend.h)解析该内容 */
|
|
53
53
|
}
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
export
|
|
54
|
+
export type FriendChangeCallback = (result: FriendChangeEvent) => void;
|
|
55
|
+
export type FriendOptCallback = (rescode: NIMResCode) => void;
|
|
56
|
+
export type GetFriendsListCallback = (rescode: NIMResCode, result: Array<FriendProfile>) => void;
|
|
57
|
+
export type GetFriendProfileCallback = (accid: string, result: FriendProfile) => void;
|
|
58
58
|
export interface NIMFriendAPI {
|
|
59
59
|
InitEventHandlers(): void;
|
|
60
|
-
Request(accid: string, verify_type: NIMVerifyType, msg: string, cb: FriendOptCallback, jsonExtension: string): boolean;
|
|
61
|
-
Delete(accid: string, option: DeleteFriendOption, cb: FriendOptCallback): boolean;
|
|
62
|
-
Update(profile: FriendProfile, cb: FriendOptCallback, jsonExtension: string): boolean;
|
|
63
|
-
GetList(cb: GetFriendsListCallback, jsonExtension: string): void;
|
|
64
|
-
GetFriendProfile(accid: string, cb: GetFriendProfileCallback, jsonExtension: string): void;
|
|
65
|
-
QueryFriendListByKeyword(keyword: string, cb: GetFriendsListCallback, jsonExtension: string): boolean;
|
|
60
|
+
Request(accid: string, verify_type: NIMVerifyType, msg: string, cb: FriendOptCallback | null, jsonExtension: string): boolean;
|
|
61
|
+
Delete(accid: string, option: DeleteFriendOption, cb: FriendOptCallback | null): boolean;
|
|
62
|
+
Update(profile: FriendProfile, cb: FriendOptCallback | null, jsonExtension: string): boolean;
|
|
63
|
+
GetList(cb: GetFriendsListCallback | null, jsonExtension: string): void;
|
|
64
|
+
GetFriendProfile(accid: string, cb: GetFriendProfileCallback | null, jsonExtension: string): void;
|
|
65
|
+
QueryFriendListByKeyword(keyword: string, cb: GetFriendsListCallback | null, jsonExtension: string): boolean;
|
|
66
66
|
}
|
|
@@ -43,20 +43,20 @@ export interface SDKDBErrorInfo {
|
|
|
43
43
|
description_?: string;
|
|
44
44
|
attach_?: string;
|
|
45
45
|
}
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
46
|
+
export type ExceptionCallback = (exception: NIMSDKException, log: string) => void;
|
|
47
|
+
export type SDKFeedbackCallback = (rescode: NIMResCode) => void;
|
|
48
|
+
export type DetectProxyCallback = (connect: boolean, step: NIMProxyDetectStep, jsonExtension: string) => void;
|
|
49
|
+
export type GetCachedFileInfoCallback = (rescode: NIMResCode, result: CachedFileInfo) => void;
|
|
50
|
+
export type DeleteCachedFileCallback = (rescode: NIMResCode) => void;
|
|
51
|
+
export type SDKDBErrorCallback = (result: SDKDBErrorInfo) => void;
|
|
52
|
+
export type UploadSDKLogCallback = (rescode: NIMResCode) => void;
|
|
53
53
|
export interface NIMGlobalAPI {
|
|
54
54
|
InitEventHandlers(): void;
|
|
55
|
-
SetExceptionReportCallback(jsonExtension: string, cb: ExceptionCallback): void;
|
|
55
|
+
SetExceptionReportCallback(jsonExtension: string, cb: ExceptionCallback | null): void;
|
|
56
56
|
SetProxy(type: NIMProxyType, host: string, port: number, user: string, password: string): void;
|
|
57
|
-
DetectProxy(type: NIMProxyType, host: string, port: number, user: string, password: string, cb: DetectProxyCallback): void;
|
|
58
|
-
GetSDKCachedFileInfoAsync(loginId: string, fileType: NIMCachedFileType, endTimestamp: number, jsonExtension: string, cb: GetCachedFileInfoCallback): void;
|
|
59
|
-
DeleteSDKCachedFileAsync(loginId: string, fileType: NIMCachedFileType, endTimestamp: number, jsonExtension: string, cb: DeleteCachedFileCallback): void;
|
|
60
|
-
SDKFeedbackAsync(url: string, jsonExtension: string, cb: SDKFeedbackCallback): void;
|
|
61
|
-
UploadSDKLog(feedbackStr: string, cb: UploadSDKLogCallback): void;
|
|
57
|
+
DetectProxy(type: NIMProxyType, host: string, port: number, user: string, password: string, cb: DetectProxyCallback | null): void;
|
|
58
|
+
GetSDKCachedFileInfoAsync(loginId: string, fileType: NIMCachedFileType, endTimestamp: number, jsonExtension: string, cb: GetCachedFileInfoCallback | null): void;
|
|
59
|
+
DeleteSDKCachedFileAsync(loginId: string, fileType: NIMCachedFileType, endTimestamp: number, jsonExtension: string, cb: DeleteCachedFileCallback | null): void;
|
|
60
|
+
SDKFeedbackAsync(url: string, jsonExtension: string, cb: SDKFeedbackCallback | null): void;
|
|
61
|
+
UploadSDKLog(feedbackStr: string, cb: UploadSDKLogCallback | null): void;
|
|
62
62
|
}
|
|
@@ -68,6 +68,7 @@ export declare enum NIMMessageType {
|
|
|
68
68
|
kNIMMessageTypeFile = 6 /** < 文件类型消息*/,
|
|
69
69
|
kNIMMessageTypeTips = 10 /** < 提醒类型消息,Tip内容根据格式要求填入消息结构中的kNIMMsgKeyServerExt字段*/,
|
|
70
70
|
kNIMMessageTypeRobot = 11 /** < 波特机器人消息*/,
|
|
71
|
+
kNIMMessageTypeG2NetCall = 12 /** < G2话单消息*/,
|
|
71
72
|
kNIMMessageTypeCustom = 100 /** < 自定义消息*/,
|
|
72
73
|
kNIMMessageTypeUnknown = 1000 /** < 未知类型消息,本地使用,发送时勿使用,作为默认值*/
|
|
73
74
|
}
|
|
@@ -167,8 +168,7 @@ export interface MessageSetting {
|
|
|
167
168
|
anti_spam_enable_?: BoolStatus; /**< 是否需要过易盾反垃圾 */
|
|
168
169
|
anti_spam_content_?: string; /**< (可选)开发者自定义的反垃圾字段,长度限制5000 */
|
|
169
170
|
anti_apam_biz_id_?: string; /**< (可选)用户配置的对某些单条消息另外的反垃圾的业务ID */
|
|
170
|
-
anti_apam_using_yidun_?: number; /**< number, (可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)
|
|
171
|
-
其他都是按照原来的规则 */
|
|
171
|
+
anti_apam_using_yidun_?: number; /**< number, (可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)不过易盾反垃圾 */
|
|
172
172
|
client_anti_spam_hitting_?: BoolStatus; /**< (可选) 是否命中客户端反垃圾 */
|
|
173
173
|
team_msg_need_ack_?: BoolStatus; /**< 群消息是否需要已读业务,0:不需要,1:需要 */
|
|
174
174
|
team_msg_ack_sent_?: BoolStatus; /**< 是否已经发送群消息已读回执 */
|
|
@@ -297,55 +297,64 @@ export interface QueryMsgByOptionsAsyncParam {
|
|
|
297
297
|
msg_sub_type_?: number; /**< 消息的子类型 */
|
|
298
298
|
search_content_?: string; /**< 检索文本(目前只支持kNIMMessageTypeText和kNIMMessageTypeFile这两种类型消息的文本关键字检索,即支持文字消息和文件名的检索 */
|
|
299
299
|
}
|
|
300
|
-
export
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
export
|
|
308
|
-
export
|
|
309
|
-
export
|
|
310
|
-
export
|
|
311
|
-
export
|
|
312
|
-
export
|
|
313
|
-
export
|
|
314
|
-
export
|
|
315
|
-
export
|
|
300
|
+
export interface GetMessagesResult {
|
|
301
|
+
rescode_?: NIMResCode; /**< 操作结果 */
|
|
302
|
+
session_id_?: string; /**< 会话ID */
|
|
303
|
+
session_type_?: NIMSessionType; /**< 会话类型 */
|
|
304
|
+
reliable_?: boolean; /**< 结果是否可信:例如当查询范围不在可信时间段内, 但远端请求失败时, 返回的本地结果可能不完整 */
|
|
305
|
+
messages_?: Array<IMMessage>; /**< 历史消息列表 */
|
|
306
|
+
}
|
|
307
|
+
export type QueryMsgCallback = (rescode: NIMResCode, id: string, to_type: NIMSessionType, result: QueryMsglogResult) => void;
|
|
308
|
+
export type GetMessagesDynamicallyCallback = (result: GetMessagesResult) => void;
|
|
309
|
+
export type QuerySingleMsgCallback = (rescode: NIMResCode, id: string, msg: IMMessage) => void;
|
|
310
|
+
export type ModifyMultipleMsglogCallback = (rescode: NIMResCode, uid: string, to_type: NIMSessionType) => void;
|
|
311
|
+
export type ModifySingleMsglogCallback = (rescode: NIMResCode, msg_id: string) => void;
|
|
312
|
+
export type DBFunctionCallback = (rescode: NIMResCode) => void;
|
|
313
|
+
export type DeleteMsglogSelfNotifyCallback = (result: Array<DeleteMsglogSelfNotifyItemInfo>) => void;
|
|
314
|
+
export type DeleteHistoryMessagesNotifyCallback = (result: Array<DeleteMsglogSelfNotifyParam>) => void;
|
|
315
|
+
export type DeleteMessageSelfAsyncCallback = (rescode: NIMResCode) => void;
|
|
316
|
+
export type MessageStatusChangedCallback = (result: MessageStatusChangedResult) => void;
|
|
317
|
+
export type ImportDbPrgCallback = (importedCount: number, totalCount: number) => void;
|
|
318
|
+
export type DeleteHistoryOnLineAsyncCallback = (rescode: NIMResCode, accid: string) => void;
|
|
319
|
+
export type DeleteHistoryOnLineAsyncExCallback = (rescode: NIMResCode, accid: string, to_type: number, timestamp: number, jsonExtension: string) => void;
|
|
320
|
+
export type QueryMessageIsThreadRootCallback = (rescode: NIMResCode, client_id: string, is_root: boolean) => void;
|
|
321
|
+
export type QueryMessageOnlineCallback = (rescode: NIMResCode, client_id: string, msg: IMMessage) => void;
|
|
322
|
+
export type QueryThreadHistoryMsgCallback = (rescode: NIMResCode, root_msg: IMMessage, total: number, last_msg_time: number, msg_array: Array<IMMessage>) => void;
|
|
323
|
+
export type FullTextSearchOnlineAsyncCallback = (rescode: NIMResCode, result: QueryMsglogResult) => void;
|
|
316
324
|
export interface NIMMsgLogAPI {
|
|
317
325
|
InitEventHandlers(): void;
|
|
318
|
-
QueryMsgByIDAysnc(clientMsgId: string, cb: QuerySingleMsgCallback, jsonExtension: string): boolean;
|
|
319
|
-
QueryMsgAsync(accid: string, to_type: NIMSessionType, limit_count: number, anchor_msg_time: number, cb: QueryMsgCallback, jsonExtension: string): boolean;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
326
|
+
QueryMsgByIDAysnc(clientMsgId: string, cb: QuerySingleMsgCallback | null, jsonExtension: string): boolean;
|
|
327
|
+
QueryMsgAsync(accid: string, to_type: NIMSessionType, limit_count: number, anchor_msg_time: number, cb: QueryMsgCallback | null, jsonExtension: string): boolean;
|
|
328
|
+
GetMessagesDynamically(session_id: string, to_type: NIMSessionType, from_time: number, to_time: number, limit_count: number, anchor_client_msg_id: string, anchor_server_msg_id: number, direction: NIMMsglogSearchDirection, cb: GetMessagesDynamicallyCallback | null, jsonExtension: string): void;
|
|
329
|
+
QueryMsgOnlineAsync(param: QueryMsgOnlineAsyncParam, cb: QueryMsgCallback | null): boolean;
|
|
330
|
+
QueryMsgByKeywordOnlineAsync(param: QueryMsgByKeywordOnlineParam, cb: QueryMsgCallback | null): boolean;
|
|
331
|
+
QueryMsgOfSpecifiedTypeInASessionAsync(to_type: NIMSessionType, id: string, limit_count: number, fromTime: number, endTime: number, endClientMsgId: string, reverse: boolean, msgType: Array<NIMMessageType>, cb: QueryMsgCallback | null, jsonExtension: string): boolean;
|
|
332
|
+
QueryMsgByOptionsAsync(param: QueryMsgByOptionsAsyncParam, cb: QueryMsgCallback | null): boolean;
|
|
333
|
+
BatchStatusReadAsync(accid: string, to_type: NIMSessionType, cb: ModifyMultipleMsglogCallback | null, jsonExtension: string): boolean;
|
|
334
|
+
BatchStatusDeleteAsync(accid: string, to_type: NIMSessionType, revert_by_query_online: boolean, cb: ModifyMultipleMsglogCallback | null, jsonExtension: string): boolean;
|
|
335
|
+
SetStatusAsync(msg_id: string, status: NIMMsgLogStatus, cb: ModifySingleMsglogCallback | null, jsonExtension: string): boolean;
|
|
336
|
+
SetSubStatusAsync(msg_id: string, status: NIMMsgLogSubStatus, cb: ModifySingleMsglogCallback | null, jsonExtension: string): boolean;
|
|
337
|
+
WriteMsglogToLocalAsync(talkId: string, msg: IMMessage, needUpdateSession: boolean, composeLastMsg: boolean, excludeMsgType: Array<number>, cb: ModifySingleMsglogCallback | null): boolean;
|
|
338
|
+
DeleteBySessionTypeAsync(delSessions: boolean, to_type: NIMSessionType, revert_by_query_online: boolean, cb: ModifyMultipleMsglogCallback | null, jsonExtension: string): boolean;
|
|
339
|
+
DeleteAsync(session_id: string, to_type: NIMSessionType, msg_id: string, cb: ModifySingleMsglogCallback | null, jsonExtension: string): boolean;
|
|
340
|
+
DeleteAllAsync(del_session: boolean, revert_by_query_online: boolean, cb: DBFunctionCallback | null, jsonExtension: string): boolean;
|
|
341
|
+
DeleteMsgByTimeAsync(session_id: string, to_type: NIMSessionType, revert_by_query_online: boolean, timestamp1: number, timestamp2: number, cb: DBFunctionCallback | null, jsonExtension: string): boolean;
|
|
342
|
+
ExportDbAsync(dst_path: string, cb: DBFunctionCallback | null, jsonExtension: string): boolean;
|
|
343
|
+
ImportDbAsync(src_path: string, db_cb: DBFunctionCallback, prg_cb: ImportDbPrgCallback | null, jsonExtension: string): boolean;
|
|
344
|
+
SendReceiptAsync(msg: IMMessage, cb: MessageStatusChangedCallback | null): void;
|
|
336
345
|
QuerySentMessageBeReaded(msg: IMMessage): boolean;
|
|
337
346
|
QueryReceivedMsgReceiptSent(msg: IMMessage): boolean;
|
|
338
|
-
UpdateLocalExtAsync(msg_id: string, local_ext: string, cb: ModifySingleMsglogCallback, jsonExtension: string): boolean;
|
|
339
|
-
ReadAllAsync(cb: DBFunctionCallback, jsonExtension: string): boolean;
|
|
347
|
+
UpdateLocalExtAsync(msg_id: string, local_ext: string, cb: ModifySingleMsglogCallback | null, jsonExtension: string): boolean;
|
|
348
|
+
ReadAllAsync(cb: DBFunctionCallback | null, jsonExtension: string): boolean;
|
|
340
349
|
ExportBackupToRemote(export_info: LogsBackupExportInfo): boolean;
|
|
341
350
|
ImportBackupToRemote(export_info: LogsBackupImportInfo): boolean;
|
|
342
351
|
CancelImportBackupFromRemote(): void;
|
|
343
352
|
CancelExportBackupToRemote(): void;
|
|
344
|
-
DeleteHistoryOnlineAsync(accid: string, delete_roaming: boolean, jsonExtension: string, cb: DeleteHistoryOnLineAsyncExCallback): void;
|
|
345
|
-
DeleteHistoryOnlineAsyncEx(accid: string, to_type: number, needs_notify_self: boolean, jsonExtension: string, cb: DeleteHistoryOnLineAsyncExCallback): void;
|
|
346
|
-
DeleteMessageSelfAsync(msg: IMMessage, ext: string, cb: DeleteMessageSelfAsyncCallback): void;
|
|
347
|
-
QueryMessageIsThreadRoot(client_id: string, cb: QueryMessageIsThreadRootCallback): void;
|
|
348
|
-
QueryMessageOnline(param: QueryMsgAsyncParam, cb: QueryMessageOnlineCallback): void;
|
|
349
|
-
QueryThreadHistoryMsg(msg: IMMessage, param: QueryThreadHistoryMsgAsyncParam, cb: QueryThreadHistoryMsgCallback): void;
|
|
350
|
-
FullTextSearchOnlineAsync(param: FullTextSearchOnlineAsyncParam, cb: FullTextSearchOnlineAsyncCallback): void;
|
|
353
|
+
DeleteHistoryOnlineAsync(accid: string, delete_roaming: boolean, jsonExtension: string, cb: DeleteHistoryOnLineAsyncExCallback | null): void;
|
|
354
|
+
DeleteHistoryOnlineAsyncEx(accid: string, to_type: number, needs_notify_self: boolean, jsonExtension: string, cb: DeleteHistoryOnLineAsyncExCallback | null): void;
|
|
355
|
+
DeleteMessageSelfAsync(msg: IMMessage, ext: string, cb: DeleteMessageSelfAsyncCallback | null): void;
|
|
356
|
+
QueryMessageIsThreadRoot(client_id: string, cb: QueryMessageIsThreadRootCallback | null): void;
|
|
357
|
+
QueryMessageOnline(param: QueryMsgAsyncParam, cb: QueryMessageOnlineCallback | null): void;
|
|
358
|
+
QueryThreadHistoryMsg(msg: IMMessage, param: QueryThreadHistoryMsgAsyncParam, cb: QueryThreadHistoryMsgCallback | null): void;
|
|
359
|
+
FullTextSearchOnlineAsync(param: FullTextSearchOnlineAsyncParam, cb: FullTextSearchOnlineAsyncCallback | null): void;
|
|
351
360
|
}
|
|
@@ -49,24 +49,24 @@ export interface UploadMediaResult {
|
|
|
49
49
|
export interface ProgressData {
|
|
50
50
|
res_id_?: string; /**< 资源id */
|
|
51
51
|
}
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
export
|
|
58
|
-
export
|
|
59
|
-
export
|
|
60
|
-
export
|
|
52
|
+
export type InitNosResultCallback = (res: InitNosResult) => void;
|
|
53
|
+
export type DownloadMediaCallback = (rescode: NIMResCode, filePath: string, callId: string, resId: string) => void;
|
|
54
|
+
export type UploadMediaExCallback = (rescode: NIMResCode, result: UploadMediaResult) => void;
|
|
55
|
+
export type ProgressCallback = (completedSize: number, fileSize: number) => void;
|
|
56
|
+
export type TransferInfoCallback = (actualSize: number, speed: number) => void;
|
|
57
|
+
export type ProgressExCallback = (completeSsize: number, fileSize: number, result: ProgressData) => void;
|
|
58
|
+
export type DownloadMediaExCallback = (rescode: NIMResCode, result: DownloadMediaResult) => void;
|
|
59
|
+
export type SafeURLToOriginURLCallback = (rescode: NIMResCode, originalUrl: string) => void;
|
|
60
|
+
export type SpeedCallback = (speed: number) => void;
|
|
61
61
|
export interface NIMNOSAPI {
|
|
62
62
|
InitEventHandlers(): void;
|
|
63
|
-
InitConfig(param: InitNosConfigParam, cb: InitNosResultCallback): void;
|
|
64
|
-
FetchMedia(msg: IMMessage, jsonExtension: string, res_cb: DownloadMediaCallback, prg_cb: ProgressCallback, speed_cb: SpeedCallback, transfer_cb: TransferInfoCallback): boolean;
|
|
63
|
+
InitConfig(param: InitNosConfigParam, cb: InitNosResultCallback | null): void;
|
|
64
|
+
FetchMedia(msg: IMMessage, jsonExtension: string, res_cb: DownloadMediaCallback | null, prg_cb: ProgressCallback | null, speed_cb: SpeedCallback | null, transfer_cb: TransferInfoCallback | null): boolean;
|
|
65
65
|
StopFetchMedia(msg: IMMessage): boolean;
|
|
66
|
-
UploadResource(local_file: string, tag: string, param: NOSParams, res_cb: UploadMediaExCallback, prg_cb: ProgressExCallback, speed_cb: SpeedCallback, transfer_cb: TransferInfoCallback): boolean;
|
|
66
|
+
UploadResource(local_file: string, tag: string, param: NOSParams, res_cb: UploadMediaExCallback | null, prg_cb: ProgressExCallback | null, speed_cb: SpeedCallback | null, transfer_cb: TransferInfoCallback | null): boolean;
|
|
67
67
|
StopUploadResource(task_id: string, jsonExtension: string): boolean;
|
|
68
|
-
DownloadResource(nosUrl: string, param: NOSParams, res_cb: DownloadMediaExCallback, prg_cb: ProgressExCallback, speed_cb: SpeedCallback, transfer_cb: TransferInfoCallback): boolean;
|
|
68
|
+
DownloadResource(nosUrl: string, param: NOSParams, res_cb: DownloadMediaExCallback | null, prg_cb: ProgressExCallback | null, speed_cb: SpeedCallback | null, transfer_cb: TransferInfoCallback | null): boolean;
|
|
69
69
|
StopDownloadResource(task_id: string, jsonExtension: string): boolean;
|
|
70
|
-
SafeURLToOriginURL(safe_url: string, cb: SafeURLToOriginURLCallback, jsonExtension: string): void;
|
|
70
|
+
SafeURLToOriginURL(safe_url: string, cb: SafeURLToOriginURLCallback | null, jsonExtension: string): void;
|
|
71
71
|
SetSupportQuickTrans(quick: boolean): void;
|
|
72
72
|
}
|
|
@@ -20,15 +20,15 @@ export interface DeleteSessionItem {
|
|
|
20
20
|
export interface DeleteSessionParam {
|
|
21
21
|
delete_list_?: Array<DeleteSessionItem>;
|
|
22
22
|
}
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
23
|
+
export type QueryOnlineSessionInfoCallback = (rescode: NIMResCode, result: SessionInfo) => void;
|
|
24
|
+
export type QueryOnlineSessionListCallback = (result: QuerySessionListResult) => void;
|
|
25
|
+
export type UpdateOnlineSessionInfoCallback = (rescode: NIMResCode) => void;
|
|
26
|
+
export type DeleteOnlineSessionInfoCallback = (rescode: NIMResCode) => void;
|
|
27
|
+
export type OnlineSessionChangedCallback = (result: SessionInfo) => void;
|
|
28
28
|
export interface NIMOnlineSessionAPI {
|
|
29
29
|
InitEventHandlers(): void;
|
|
30
|
-
QuerySessionList(minTime: number, maxTime: number, needLastMsg: boolean, limit: number, cb: QueryOnlineSessionListCallback): void;
|
|
31
|
-
QuerySession(to_type: NIMSessionType, session_id: string, cb: QueryOnlineSessionInfoCallback): void;
|
|
32
|
-
UpdateSession(to_type: NIMSessionType, session_id: string, ext: string, cb: UpdateOnlineSessionInfoCallback): void;
|
|
33
|
-
DeleteSession(param: DeleteSessionParam, cb: DeleteOnlineSessionInfoCallback): void;
|
|
30
|
+
QuerySessionList(minTime: number, maxTime: number, needLastMsg: boolean, limit: number, cb: QueryOnlineSessionListCallback | null): void;
|
|
31
|
+
QuerySession(to_type: NIMSessionType, session_id: string, cb: QueryOnlineSessionInfoCallback | null): void;
|
|
32
|
+
UpdateSession(to_type: NIMSessionType, session_id: string, ext: string, cb: UpdateOnlineSessionInfoCallback | null): void;
|
|
33
|
+
DeleteSession(param: DeleteSessionParam, cb: DeleteOnlineSessionInfoCallback | null): void;
|
|
34
34
|
}
|
|
@@ -5,9 +5,9 @@ export declare enum NIMSendHttpRequestMethods {
|
|
|
5
5
|
kNIMHttpPut = 3,
|
|
6
6
|
kNIMHttpDelete = 4
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type ReceivedHttpMsgCallback = (from_accid: string, body: string, timestamp: number) => void;
|
|
9
|
+
export type SendHttpRequestCallback = (rescode: NIMResCode, header: string, body: string, jsonExtension: string) => void;
|
|
10
10
|
export interface NIMPassThroughProxyAPI {
|
|
11
11
|
InitEventHandlers(): void;
|
|
12
|
-
SendHttpRequest(host: string, path: string, method: NIMSendHttpRequestMethods, headers: string, body: string, jsonExtension: string, cb: SendHttpRequestCallback): void;
|
|
12
|
+
SendHttpRequest(host: string, path: string, method: NIMSendHttpRequestMethods, headers: string, body: string, jsonExtension: string, cb: SendHttpRequestCallback | null): void;
|
|
13
13
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NIMResCode } from './client_def';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type ChatRoomRequestEnterCallback = (rescode: NIMResCode, result: string) => void;
|
|
3
|
+
export type QChatRequestLinkAddressCallback = (rescode: NIMResCode, result: Array<string>) => void;
|
|
4
4
|
export interface NIMPluginAPI {
|
|
5
5
|
InitEventHandlers(): void;
|
|
6
|
-
ChatRoomRequestEnterAsync(room_id: number, cb: ChatRoomRequestEnterCallback, ext: string): void;
|
|
7
|
-
QChatRequestLinkAddress(ip_version: number, cb: QChatRequestLinkAddressCallback, ext: string): void;
|
|
6
|
+
ChatRoomRequestEnterAsync(room_id: number, cb: ChatRoomRequestEnterCallback | null, ext: string): void;
|
|
7
|
+
QChatRequestLinkAddress(ip_version: number, cb: QChatRequestLinkAddressCallback | null, ext: string): void;
|
|
8
8
|
}
|
|
@@ -73,42 +73,42 @@ export interface SessionRoamMsgHasMoreTagInfo {
|
|
|
73
73
|
message_time_tag?: number;
|
|
74
74
|
message_server_id?: number;
|
|
75
75
|
}
|
|
76
|
-
export
|
|
77
|
-
export
|
|
78
|
-
export
|
|
79
|
-
export
|
|
80
|
-
export
|
|
81
|
-
export
|
|
82
|
-
export
|
|
83
|
-
export
|
|
84
|
-
export
|
|
85
|
-
export
|
|
86
|
-
export
|
|
87
|
-
export
|
|
88
|
-
export
|
|
89
|
-
export
|
|
90
|
-
export
|
|
91
|
-
export
|
|
92
|
-
export
|
|
76
|
+
export type SessionChangeCallback = (rescode: NIMResCode, result: SessionData, count: number) => void;
|
|
77
|
+
export type DeleteSessionRoamingMessageCallback = (rescode: NIMResCode, to_type: number, session_id: string) => void;
|
|
78
|
+
export type BadgeCountCallback = (result: string) => void;
|
|
79
|
+
export type QuerySessionListCallback = (count: number, result: SessionDataList) => void;
|
|
80
|
+
export type QuerySessionDataCallback = (rescode: NIMResCode, result: SessionData) => void;
|
|
81
|
+
export type SetToStickTopSessionNotifyCallback = (result: string) => void;
|
|
82
|
+
export type CancelStickTopSessionNotifyCallback = (session_id: string, session_type: NIMSessionType) => void;
|
|
83
|
+
export type UpdateStickTopSessionNotifyCallback = (result: string) => void;
|
|
84
|
+
export type QueryStickTopSessionListCallback = (res_code: NIMResCode, result: string) => void;
|
|
85
|
+
export type SetToStickTopSessionCallback = (res_code: NIMResCode, result: string) => void;
|
|
86
|
+
export type UpdateStickTopSessionCallback = (res_code: NIMResCode, result: string) => void;
|
|
87
|
+
export type CancelToStickTopSessionCallback = (res_code: NIMResCode, session_id: string, session_type: NIMSessionType) => void;
|
|
88
|
+
export type QueryHasmoreRoammsgCallback = (res_code: NIMResCode, info: SessionRoamMsgHasMoreTagInfo) => void;
|
|
89
|
+
export type QueryAllHasmoreRoammsgCallback = (res_code: NIMResCode, info_list: Array<SessionRoamMsgHasMoreTagInfo>) => void;
|
|
90
|
+
export type UpdateHasmoreRoammsgCallback = (res_code: NIMResCode) => void;
|
|
91
|
+
export type DeleteHasmoreRoammsgCallback = (res_code: NIMResCode) => void;
|
|
92
|
+
export type SetMultiUnreadCountZeroAsyncCallback = (res_code: NIMResCode, data_list: Array<SessionData>, unread_count: number) => void;
|
|
93
93
|
export interface NIMSessionAPI {
|
|
94
94
|
InitEventHandlers(): void;
|
|
95
|
-
QueryStickTopSessionList(cb: QueryStickTopSessionListCallback): void;
|
|
96
|
-
SetToStickTopSession(session_id: string, to_type: number, ext: string, cb: SetToStickTopSessionCallback): void;
|
|
97
|
-
UpdateToStickTopSession(session_id: string, to_type: number, ext: string, cb: UpdateStickTopSessionCallback): void;
|
|
98
|
-
CancelToStickTopSession(session_id: string, to_type: number, cb: CancelToStickTopSessionCallback): void;
|
|
99
|
-
QueryLastFewSessionAsync(limit: number, cb: QuerySessionListCallback, jsonExtension: string): void;
|
|
100
|
-
QueryAllRecentSessionAsync(msg_excluded_type_list: Array<NIMMessageType>, cb: QuerySessionListCallback, jsonExtension: string): void;
|
|
101
|
-
DeleteRecentSession(type: NIMSessionType, id: string, cb: SessionChangeCallback, delete_roaming: boolean): void;
|
|
102
|
-
DeleteAllRecentSession(cb: SessionChangeCallback, jsonExtension: string): void;
|
|
103
|
-
DeleteSessionRoamingMessage(to_type: number, session_id: string, cb: DeleteSessionRoamingMessageCallback, ext: string): boolean;
|
|
104
|
-
SetUnreadCountZeroAsync(type: NIMSessionType, id: string, cb: SessionChangeCallback, jsonExtension: string): boolean;
|
|
105
|
-
SetMultiUnreadCountZeroAsync(is_super_team: boolean, zero_list: Array<MultiUnreadCountZeroInfo>, cb: SetMultiUnreadCountZeroAsyncCallback): boolean;
|
|
106
|
-
SetSessionTop(type: NIMSessionType, id: string, top: boolean, cb: SessionChangeCallback, jsonExtension: string): boolean;
|
|
107
|
-
SetSessionExtendData(type: NIMSessionType, id: string, data: string, cb: SessionChangeCallback, jsonExtension: string): boolean;
|
|
108
|
-
SetAllUnreadCountZeroAsync(cb: SessionChangeCallback, jsonExtension: string): boolean;
|
|
109
|
-
QuerySessionDataById(type: NIMSessionType, id: string, cb: QuerySessionDataCallback, jsonExtension: string): void;
|
|
110
|
-
QueryHasmoreRoammsg(session_id: string, to_type: number, cb: QueryHasmoreRoammsgCallback): void;
|
|
111
|
-
QueryAllHasmoreRoammsg(cb: QueryAllHasmoreRoammsgCallback): void;
|
|
112
|
-
UpdateHasmoreRoammsg(msg: IMMessage, cb: UpdateHasmoreRoammsgCallback): void;
|
|
113
|
-
DeleteHasmoreRoammsg(session_id: string, to_type: NIMSessionType, cb: DeleteHasmoreRoammsgCallback): void;
|
|
95
|
+
QueryStickTopSessionList(cb: QueryStickTopSessionListCallback | null): void;
|
|
96
|
+
SetToStickTopSession(session_id: string, to_type: number, ext: string, cb: SetToStickTopSessionCallback | null): void;
|
|
97
|
+
UpdateToStickTopSession(session_id: string, to_type: number, ext: string, cb: UpdateStickTopSessionCallback | null): void;
|
|
98
|
+
CancelToStickTopSession(session_id: string, to_type: number, cb: CancelToStickTopSessionCallback | null): void;
|
|
99
|
+
QueryLastFewSessionAsync(limit: number, cb: QuerySessionListCallback | null, jsonExtension: string): void;
|
|
100
|
+
QueryAllRecentSessionAsync(msg_excluded_type_list: Array<NIMMessageType>, cb: QuerySessionListCallback | null, jsonExtension: string): void;
|
|
101
|
+
DeleteRecentSession(type: NIMSessionType, id: string, cb: SessionChangeCallback | null, delete_roaming: boolean): void;
|
|
102
|
+
DeleteAllRecentSession(cb: SessionChangeCallback | null, jsonExtension: string): void;
|
|
103
|
+
DeleteSessionRoamingMessage(to_type: number, session_id: string, cb: DeleteSessionRoamingMessageCallback | null, ext: string): boolean;
|
|
104
|
+
SetUnreadCountZeroAsync(type: NIMSessionType, id: string, cb: SessionChangeCallback | null, jsonExtension: string): boolean;
|
|
105
|
+
SetMultiUnreadCountZeroAsync(is_super_team: boolean, zero_list: Array<MultiUnreadCountZeroInfo>, cb: SetMultiUnreadCountZeroAsyncCallback | null): boolean;
|
|
106
|
+
SetSessionTop(type: NIMSessionType, id: string, top: boolean, cb: SessionChangeCallback | null, jsonExtension: string): boolean;
|
|
107
|
+
SetSessionExtendData(type: NIMSessionType, id: string, data: string, cb: SessionChangeCallback | null, jsonExtension: string): boolean;
|
|
108
|
+
SetAllUnreadCountZeroAsync(cb: SessionChangeCallback | null, jsonExtension: string): boolean;
|
|
109
|
+
QuerySessionDataById(type: NIMSessionType, id: string, cb: QuerySessionDataCallback | null, jsonExtension: string): void;
|
|
110
|
+
QueryHasmoreRoammsg(session_id: string, to_type: number, cb: QueryHasmoreRoammsgCallback | null): void;
|
|
111
|
+
QueryAllHasmoreRoammsg(cb: QueryAllHasmoreRoammsgCallback | null): void;
|
|
112
|
+
UpdateHasmoreRoammsg(msg: IMMessage, cb: UpdateHasmoreRoammsgCallback | null): void;
|
|
113
|
+
DeleteHasmoreRoammsg(session_id: string, to_type: NIMSessionType, cb: DeleteHasmoreRoammsgCallback | null): void;
|
|
114
114
|
}
|