node-nim 9.5.0-rc.1 → 9.8.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.
Files changed (86) hide show
  1. package/README.md +128 -149
  2. package/dist/chatroom/chatroom.js +14 -4
  3. package/dist/chatroom/chatroom.js.map +1 -1
  4. package/dist/loader.js +15 -7
  5. package/dist/loader.js.map +1 -1
  6. package/dist/nim/client.js +5 -5
  7. package/dist/nim/client.js.map +1 -1
  8. package/dist/nim/friend.js.map +1 -1
  9. package/dist/nim/global.js.map +1 -1
  10. package/dist/nim/msglog.js +24 -0
  11. package/dist/nim/msglog.js.map +1 -1
  12. package/dist/nim/nos.js.map +1 -1
  13. package/dist/nim/online_session.js.map +1 -1
  14. package/dist/nim/pass_through_proxy.js.map +1 -1
  15. package/dist/nim/plugin.js.map +1 -1
  16. package/dist/nim/session.js.map +1 -1
  17. package/dist/nim/subscribe_event.js.map +1 -1
  18. package/dist/nim/super_team.js.map +1 -1
  19. package/dist/nim/sysmsg.js.map +1 -1
  20. package/dist/nim/talk.js.map +1 -1
  21. package/dist/nim/talkex.js.map +1 -1
  22. package/dist/nim/team.js.map +1 -1
  23. package/dist/nim/tool.js.map +1 -1
  24. package/dist/nim/user.js.map +1 -1
  25. package/dist/nim_def/client_def.js +164 -79
  26. package/dist/nim_def/client_def.js.map +1 -1
  27. package/dist/nim_def/msglog_def.js +1 -0
  28. package/dist/nim_def/msglog_def.js.map +1 -1
  29. package/dist/node-nim.js +97 -1
  30. package/dist/node-nim.js.map +1 -1
  31. package/dist/qchat/channel.js +19 -0
  32. package/dist/qchat/channel.js.map +1 -1
  33. package/dist/qchat/server.js +57 -0
  34. package/dist/qchat/server.js.map +1 -1
  35. package/dist/qchat_def/public_def.js +118 -70
  36. package/dist/qchat_def/public_def.js.map +1 -1
  37. package/package.json +64 -64
  38. package/script/download-sdk.mjs +67 -64
  39. package/types/chatroom/chatroom.d.ts +24 -23
  40. package/types/chatroom_def/chatroom_def.d.ts +44 -18
  41. package/types/nim/client.d.ts +8 -8
  42. package/types/nim/friend.d.ts +6 -6
  43. package/types/nim/global.d.ts +6 -6
  44. package/types/nim/msglog.d.ts +43 -28
  45. package/types/nim/nos.d.ts +5 -5
  46. package/types/nim/online_session.d.ts +4 -4
  47. package/types/nim/pass_through_proxy.d.ts +1 -1
  48. package/types/nim/plugin.d.ts +2 -2
  49. package/types/nim/session.d.ts +19 -19
  50. package/types/nim/subscribe_event.d.ts +5 -5
  51. package/types/nim/super_team.d.ts +24 -24
  52. package/types/nim/sysmsg.d.ts +8 -8
  53. package/types/nim/talk.d.ts +3 -3
  54. package/types/nim/talkex.d.ts +11 -11
  55. package/types/nim/team.d.ts +33 -33
  56. package/types/nim/tool.d.ts +2 -2
  57. package/types/nim/user.d.ts +8 -8
  58. package/types/nim_def/client_def.d.ts +95 -92
  59. package/types/nim_def/data_sync_def.d.ts +1 -1
  60. package/types/nim_def/friend_def.d.ts +10 -10
  61. package/types/nim_def/global_def.d.ts +13 -13
  62. package/types/nim_def/msglog_def.d.ts +54 -45
  63. package/types/nim_def/nos_def.d.ts +14 -14
  64. package/types/nim_def/online_session_def.d.ts +9 -9
  65. package/types/nim_def/pass_through_proxy_def.d.ts +3 -3
  66. package/types/nim_def/plugin_def.d.ts +4 -4
  67. package/types/nim_def/session_def.d.ts +36 -36
  68. package/types/nim_def/subscribe_event_def.d.ts +12 -12
  69. package/types/nim_def/super_team_def.d.ts +32 -32
  70. package/types/nim_def/sysmsg_def.d.ts +13 -13
  71. package/types/nim_def/talk_def.d.ts +12 -11
  72. package/types/nim_def/talkex_def.d.ts +27 -27
  73. package/types/nim_def/team_def.d.ts +47 -47
  74. package/types/nim_def/tool_def.d.ts +4 -4
  75. package/types/nim_def/user_def.d.ts +14 -14
  76. package/types/node-nim.d.ts +61 -0
  77. package/types/qchat/channel.d.ts +7 -1
  78. package/types/qchat/server.d.ts +19 -1
  79. package/types/qchat_def/attachment_def.d.ts +4 -4
  80. package/types/qchat_def/channel_def.d.ts +68 -49
  81. package/types/qchat_def/instance_def.d.ts +9 -13
  82. package/types/qchat_def/message_def.d.ts +31 -23
  83. package/types/qchat_def/public_def.d.ts +35 -71
  84. package/types/qchat_def/role_def.d.ts +45 -76
  85. package/types/qchat_def/server_def.d.ts +92 -48
  86. package/types/qchat_def/system_notification_def.d.ts +9 -9
@@ -66,18 +66,18 @@ export interface EventSubscribeData {
66
66
  subscribe_accid_?: string; /**< 订阅人的accid */
67
67
  subscribe_time_?: number; /**< 订阅时间戳 */
68
68
  }
69
- export declare type PushEventCallback = (rescode: NIMResCode, result: EventData) => void;
70
- export declare type BatchPushEventCallback = (rescode: NIMResCode, result: Array<EventData>) => void;
71
- export declare type PublishEventCallback = (rescode: NIMResCode, eventType: number, result: EventData) => void;
72
- export declare type SubscribeEventCallback = (rescode: NIMResCode, eventType: number, failedList: Array<string>) => void;
73
- export declare type UnSubscribeEventCallback = (rescode: NIMResCode, eventType: number, failedList: Array<string>) => void;
74
- export declare type BatchUnSubscribeEventCallback = (rescode: NIMResCode, eventType: number) => void;
75
- export declare type QuerySubscribeEventCallback = (rescode: NIMResCode, eventType: number, result: Array<EventSubscribeData>) => void;
69
+ export type PushEventCallback = (rescode: NIMResCode, result: EventData) => void;
70
+ export type BatchPushEventCallback = (rescode: NIMResCode, result: Array<EventData>) => void;
71
+ export type PublishEventCallback = (rescode: NIMResCode, eventType: number, result: EventData) => void;
72
+ export type SubscribeEventCallback = (rescode: NIMResCode, eventType: number, failedList: Array<string>) => void;
73
+ export type UnSubscribeEventCallback = (rescode: NIMResCode, eventType: number, failedList: Array<string>) => void;
74
+ export type BatchUnSubscribeEventCallback = (rescode: NIMResCode, eventType: number) => void;
75
+ export type QuerySubscribeEventCallback = (rescode: NIMResCode, eventType: number, result: Array<EventSubscribeData>) => void;
76
76
  export interface NIMSubscribeEventAPI {
77
77
  InitEventHandlers(): void;
78
- Publish(data: EventData, cb: PublishEventCallback, jsonExtension: string): boolean;
79
- Subscribe(eventType: NIMEventType, ttl: number, syncType: NIMEventSubscribeSyncEventType, accids: Array<string>, cb: SubscribeEventCallback, jsonExtension: string): boolean;
80
- UnSubscribe(eventType: NIMEventType, accids: Array<string>, cb: UnSubscribeEventCallback, jsonExtension: string): boolean;
81
- BatchUnSubscribe(eventType: NIMEventType, cb: BatchUnSubscribeEventCallback, jsonExtension: string): boolean;
82
- QuerySubscribe(eventType: NIMEventType, accids: Array<string>, cb: QuerySubscribeEventCallback, jsonExtension: string): void;
78
+ Publish(data: EventData, cb: PublishEventCallback | null, jsonExtension: string): boolean;
79
+ Subscribe(eventType: NIMEventType, ttl: number, syncType: NIMEventSubscribeSyncEventType, accids: Array<string>, cb: SubscribeEventCallback | null, jsonExtension: string): boolean;
80
+ UnSubscribe(eventType: NIMEventType, accids: Array<string>, cb: UnSubscribeEventCallback | null, jsonExtension: string): boolean;
81
+ BatchUnSubscribe(eventType: NIMEventType, cb: BatchUnSubscribeEventCallback | null, jsonExtension: string): boolean;
82
+ QuerySubscribe(eventType: NIMEventType, accids: Array<string>, cb: QuerySubscribeEventCallback | null, jsonExtension: string): void;
83
83
  }
@@ -96,38 +96,38 @@ export interface SuperTeamMemberPropertyJsonValue {
96
96
  export interface SuperTeamMemberProperty {
97
97
  member_info_json_value_?: SuperTeamMemberPropertyJsonValue;
98
98
  }
99
- export declare type SuperTeamEventCallback = (result: SuperTeamEvent) => void;
100
- export declare type QueryAllMySuperTeamsCallback = (count: number, result: Array<string>) => void;
101
- export declare type QueryAllMySuperTeamsInfoCallback = (count: number, result: Array<SuperTeamInfo>) => void;
102
- export declare type QuerySuperTeamMyAllMemberInfosCallback = (count: number, result: Array<SuperTeamMemberProperty>) => void;
103
- export declare type QuerySuperTeamMembersCallback = (tid: string, count: number, result: Array<SuperTeamMemberProperty>) => void;
104
- export declare type QuerySuperTeamMemberCallback = (result: SuperTeamMemberProperty) => void;
105
- export declare type QuerySuperTeamInfoCallback = (tid: string, result: SuperTeamInfo) => void;
106
- export declare type QuerySuperTeamMembersOnlineCallback = (rescode: NIMResCode, count: number, result: Array<SuperTeamMemberProperty>) => void;
99
+ export type SuperTeamEventCallback = (result: SuperTeamEvent) => void;
100
+ export type QueryAllMySuperTeamsCallback = (count: number, result: Array<string>) => void;
101
+ export type QueryAllMySuperTeamsInfoCallback = (count: number, result: Array<SuperTeamInfo>) => void;
102
+ export type QuerySuperTeamMyAllMemberInfosCallback = (count: number, result: Array<SuperTeamMemberProperty>) => void;
103
+ export type QuerySuperTeamMembersCallback = (tid: string, count: number, result: Array<SuperTeamMemberProperty>) => void;
104
+ export type QuerySuperTeamMemberCallback = (result: SuperTeamMemberProperty) => void;
105
+ export type QuerySuperTeamInfoCallback = (tid: string, result: SuperTeamInfo) => void;
106
+ export type QuerySuperTeamMembersOnlineCallback = (rescode: NIMResCode, count: number, result: Array<SuperTeamMemberProperty>) => void;
107
107
  export interface NIMSuperTeamAPI {
108
108
  InitEventHandlers(): void;
109
- InviteAsync(tid: string, ids: Array<string>, invitationPostscript: string, invitationAttachment: string, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
110
- KickAsync(tid: string, ids: Array<string>, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
111
- LeaveAsync(tid: string, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
112
- UpdateSuperTeamInfoAsync(tid: string, info: SuperTeamInfo, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
113
- ApplyJoinAsync(tid: string, reason: string, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
114
- PassJoinApplyAsync(tid: string, applicantId: string, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
115
- RejectJoinApplyAsync(tid: string, applicantId: string, reason: string, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
116
- AddManagersAsync(tid: string, ids: Array<string>, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
117
- RemoveManagersAsync(tid: string, ids: Array<string>, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
118
- TransferTeamAsync(tid: string, newOwnerId: string, isLeave: boolean, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
119
- UpdateMyPropertyAsync(prop: SuperTeamMemberProperty, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
120
- UpdateOtherNickAsync(prop: SuperTeamMemberProperty, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
121
- AcceptInvitationAsync(tid: string, inviterId: string, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
122
- RejectInvitationAsync(tid: string, inviterId: string, reason: string, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
123
- QueryAllMySuperTeamsAsync(cb: QueryAllMySuperTeamsCallback, jsonExtension: string): void;
124
- QueryAllMySuperTeamsInfoAsync(cb: QueryAllMySuperTeamsInfoCallback, jsonExtension: string): void;
125
- QueryMyAllMemberInfosAsync(cb: QuerySuperTeamMyAllMemberInfosCallback, jsonExtension: string): void;
126
- QuerySuperTeamMembersAsync(tid: string, cb: QuerySuperTeamMembersCallback, jsonExtension: string): boolean;
127
- QuerySuperTeamMemberAsync(tid: string, id: string, cb: QuerySuperTeamMemberCallback, jsonExtension: string): void;
128
- QuerySuperTeamInfoAsync(tid: string, cb: QuerySuperTeamInfoCallback, jsonExtension: string): boolean;
129
- QuerySuperTeamInfoOnlineAsync(tid: string, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
130
- MuteMemberAsync(tid: string, member_id: string, set_mute: boolean, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
131
- MuteAsync(tid: string, set_mute: boolean, cb: SuperTeamEventCallback, jsonExtension: string): boolean;
132
- QuerySuperTeamsInfoByKeywordAsync(keyword: string, cb: QueryAllMySuperTeamsInfoCallback, jsonExtension: string): void;
109
+ InviteAsync(tid: string, ids: Array<string>, invitationPostscript: string, invitationAttachment: string, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
110
+ KickAsync(tid: string, ids: Array<string>, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
111
+ LeaveAsync(tid: string, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
112
+ UpdateSuperTeamInfoAsync(tid: string, info: SuperTeamInfo, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
113
+ ApplyJoinAsync(tid: string, reason: string, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
114
+ PassJoinApplyAsync(tid: string, applicantId: string, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
115
+ RejectJoinApplyAsync(tid: string, applicantId: string, reason: string, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
116
+ AddManagersAsync(tid: string, ids: Array<string>, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
117
+ RemoveManagersAsync(tid: string, ids: Array<string>, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
118
+ TransferTeamAsync(tid: string, newOwnerId: string, isLeave: boolean, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
119
+ UpdateMyPropertyAsync(prop: SuperTeamMemberProperty, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
120
+ UpdateOtherNickAsync(prop: SuperTeamMemberProperty, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
121
+ AcceptInvitationAsync(tid: string, inviterId: string, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
122
+ RejectInvitationAsync(tid: string, inviterId: string, reason: string, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
123
+ QueryAllMySuperTeamsAsync(cb: QueryAllMySuperTeamsCallback | null, jsonExtension: string): void;
124
+ QueryAllMySuperTeamsInfoAsync(cb: QueryAllMySuperTeamsInfoCallback | null, jsonExtension: string): void;
125
+ QueryMyAllMemberInfosAsync(cb: QuerySuperTeamMyAllMemberInfosCallback | null, jsonExtension: string): void;
126
+ QuerySuperTeamMembersAsync(tid: string, cb: QuerySuperTeamMembersCallback | null, jsonExtension: string): boolean;
127
+ QuerySuperTeamMemberAsync(tid: string, id: string, cb: QuerySuperTeamMemberCallback | null, jsonExtension: string): void;
128
+ QuerySuperTeamInfoAsync(tid: string, cb: QuerySuperTeamInfoCallback | null, jsonExtension: string): boolean;
129
+ QuerySuperTeamInfoOnlineAsync(tid: string, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
130
+ MuteMemberAsync(tid: string, member_id: string, set_mute: boolean, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
131
+ MuteAsync(tid: string, set_mute: boolean, cb: SuperTeamEventCallback | null, jsonExtension: string): boolean;
132
+ QuerySuperTeamsInfoByKeywordAsync(keyword: string, cb: QueryAllMySuperTeamsInfoCallback | null, jsonExtension: string): void;
133
133
  }
@@ -51,20 +51,20 @@ export interface SysMessageSetting {
51
51
  anti_spam_content_?: string; /**< (功能暂时不开放)(可选)开发者自定义的反垃圾字段 */
52
52
  env_config_?: string; /**< (可选) 指向自定义抄送的配置 */
53
53
  }
54
- export declare type SysmsgCallback = (result: SysMessage) => void;
55
- export declare type SendCustomSysmsgCallback = (result: SendMessageArc) => void;
56
- export declare type NotifySingleSysmsgCallback = (res_code: NIMResCode, msg_id: number, unread_count: number) => void;
57
- export declare type NotifySysmsgResCallback = (res_code: NIMResCode, unread_count: number) => void;
58
- export declare type QuerySysmsgCallback = (count: number, unread_count: number, result: Array<SysMessage>) => void;
54
+ export type SysmsgCallback = (result: SysMessage) => void;
55
+ export type SendCustomSysmsgCallback = (result: SendMessageArc) => void;
56
+ export type NotifySingleSysmsgCallback = (res_code: NIMResCode, msg_id: number, unread_count: number) => void;
57
+ export type NotifySysmsgResCallback = (res_code: NIMResCode, unread_count: number) => void;
58
+ export type QuerySysmsgCallback = (count: number, unread_count: number, result: Array<SysMessage>) => void;
59
59
  export interface NIMSysMsgAPI {
60
60
  InitEventHandlers(): void;
61
61
  SendCustomNotificationMsg(msg: SysMessage): void;
62
- QueryMsgAsync(limit_count: number, last_time: number, cb: QuerySysmsgCallback, jsonExtension: string): boolean;
63
- QueryUnreadCount(cb: NotifySysmsgResCallback, jsonExtension: string): void;
64
- SetStatusAsync(msg_id: number, status: NIMSysMsgStatus, cb: NotifySingleSysmsgCallback, jsonExtension: string): boolean;
65
- ReadAllAsync(cb: NotifySysmsgResCallback, jsonExtension: string): void;
66
- DeleteAsync(msg_id: number, cb: NotifySingleSysmsgCallback, jsonExtension: string): boolean;
67
- DeleteAllAsync(cb: NotifySysmsgResCallback, jsonExtension: string): boolean;
68
- SetStatusByTypeAsync(type: NIMSysMsgType, status: NIMSysMsgStatus, cb: NotifySysmsgResCallback, jsonExtension: string): boolean;
69
- DeleteByTypeAsync(type: NIMSysMsgType, cb: NotifySysmsgResCallback, jsonExtension: string): boolean;
62
+ QueryMsgAsync(limit_count: number, last_time: number, cb: QuerySysmsgCallback | null, jsonExtension: string): boolean;
63
+ QueryUnreadCount(cb: NotifySysmsgResCallback | null, jsonExtension: string): void;
64
+ SetStatusAsync(msg_id: number, status: NIMSysMsgStatus, cb: NotifySingleSysmsgCallback | null, jsonExtension: string): boolean;
65
+ ReadAllAsync(cb: NotifySysmsgResCallback | null, jsonExtension: string): void;
66
+ DeleteAsync(msg_id: number, cb: NotifySingleSysmsgCallback | null, jsonExtension: string): boolean;
67
+ DeleteAllAsync(cb: NotifySysmsgResCallback | null, jsonExtension: string): boolean;
68
+ SetStatusByTypeAsync(type: NIMSysMsgType, status: NIMSysMsgStatus, cb: NotifySysmsgResCallback | null, jsonExtension: string): boolean;
69
+ DeleteByTypeAsync(type: NIMSysMsgType, cb: NotifySysmsgResCallback | null, jsonExtension: string): boolean;
70
70
  }
@@ -4,6 +4,7 @@ import { NIMSessionType } from './session_def';
4
4
  export interface SendMessageArc {
5
5
  talk_id_?: string; /**< 会话ID */
6
6
  msg_id_?: string; /**< 消息ID */
7
+ msg_id_server_?: number; /**< 服务器端消息ID */
7
8
  rescode_?: NIMResCode; /**< 错误码 */
8
9
  msg_timetag_?: number; /**< 消息时间戳 */
9
10
  third_party_callback_ext_?: string; /**< 第三方回调回来的自定义扩展字段 */
@@ -30,21 +31,21 @@ export interface RecallMsgNotify {
30
31
  attach_?: string; /**< v8.2.0 透传的附件信息 */
31
32
  callback_ext_?: string; /**< v8.2.0 第三方回调返回的字定义字段 */
32
33
  }
33
- export declare type SendMsgAckCallback = (result: SendMessageArc) => void;
34
- export declare type ReceiveMsgCallback = (result: IMMessage) => void;
35
- export declare type ReceiveMsgsCallback = (result: Array<IMMessage>) => void;
36
- export declare type RecallMsgsCallback = (rescode: NIMResCode, result: Array<RecallMsgNotify>) => void;
37
- export declare type ReceiveBroadcastMsgCallback = (result: BroadcastMessage) => void;
38
- export declare type ReceiveBroadcastMsgsCallback = (result: Array<BroadcastMessage>) => void;
39
- export declare type TeamNotificationFilterCallback = (result: IMMessage) => boolean;
40
- export declare type MessageFilterCallback = (result: IMMessage) => boolean;
34
+ export type SendMsgAckCallback = (result: SendMessageArc) => void;
35
+ export type ReceiveMsgCallback = (result: IMMessage) => void;
36
+ export type ReceiveMsgsCallback = (result: Array<IMMessage>) => void;
37
+ export type RecallMsgsCallback = (rescode: NIMResCode, result: Array<RecallMsgNotify>) => void;
38
+ export type ReceiveBroadcastMsgCallback = (result: BroadcastMessage) => void;
39
+ export type ReceiveBroadcastMsgsCallback = (result: Array<BroadcastMessage>) => void;
40
+ export type TeamNotificationFilterCallback = (result: IMMessage) => boolean;
41
+ export type MessageFilterCallback = (result: IMMessage) => boolean;
41
42
  export interface NIMTalkAPI {
42
43
  InitEventHandlers(): void;
43
44
  SendMsg(msg: IMMessage, jsonExtension: string): void;
44
45
  StopSendMsg(clientMsgId: string, type: NIMMessageType, jsonExtension: string): void;
45
- RecallMsg(msg: IMMessage, notify_msg: string, cb: RecallMsgsCallback, apnstext: string, pushpayloadconst: string, jsonExtension: string): void;
46
+ RecallMsg(msg: IMMessage, notify_msg: string, cb: RecallMsgsCallback | null, apnstext: string, pushpayloadconst: string, jsonExtension: string): void;
46
47
  GetAttachmentPathFromMsg(msg: IMMessage): string;
47
48
  ReplyMessage(msg: IMMessage, json_reply_msg: string): void;
48
- RegMessageFilter(cb: MessageFilterCallback, jsonExtension: string): void;
49
- RegTeamNotificationFilter(cb: TeamNotificationFilterCallback, jsonExtension: string): void;
49
+ RegMessageFilter(cb: MessageFilterCallback | null, jsonExtension: string): void;
50
+ RegTeamNotificationFilter(cb: TeamNotificationFilterCallback | null, jsonExtension: string): void;
50
51
  }
@@ -80,33 +80,33 @@ export interface ModifyPinMessageParam {
80
80
  export interface QueryAllPinMessageResponse {
81
81
  pin_list?: Array<PinMessageInfo>;
82
82
  }
83
- export declare type AddCollectCallback = (rescode: NIMResCode, info: CollectInfo) => void;
84
- export declare type RemoveCollectsCallback = (rescode: NIMResCode, count: number) => void;
85
- export declare type UpdateCollectCallback = (rescode: NIMResCode, info: CollectInfo) => void;
86
- export declare type QueryCollectsCallback = (rescode: NIMResCode, count: number, info: CollectInfoList) => void;
87
- export declare type AddQuickCommentCallback = (rescode: NIMResCode, info: QuickCommentInfo) => void;
88
- export declare type RemoveQuickCommentCallback = (rescode: NIMResCode, id: string) => void;
89
- export declare type QueryQuickCommentCallback = (rescode: NIMResCode, res: QueryQuickCommentsResponse) => void;
90
- export declare type AddQuickCommentNotifyCallback = (session: string, to_type: NIMSessionType, msg_client_id: string, qc_info: QuickCommentInfo) => void;
91
- export declare type RemoveQuickCommentNotifyCallback = (session: string, to_type: NIMSessionType, msg_client_id: string, quick_comment_id: string, ext: string) => void;
92
- export declare type PinMessageCallback = (rescode: NIMResCode, session: string, to_type: number, info: PinMessageInfo) => void;
93
- export declare type UnPinMessageCallback = (rescode: NIMResCode, session: string, to_type: number, id: string) => void;
94
- export declare type UpdatePinMessageCallback = (rescode: NIMResCode, session: string, to_type: number, info: PinMessageInfo) => void;
95
- export declare type QueryPinMessageCallback = (rescode: NIMResCode, session: string, to_type: number, res: QueryAllPinMessageResponse) => void;
96
- export declare type AddPinMessageNotifyCallback = (session: string, to_type: number, info: PinMessageInfo) => void;
97
- export declare type UnPinMessageNotifyCallback = (session: string, to_type: number, id: string) => void;
98
- export declare type UpdatePinMessageNotifyCallback = (session: string, to_type: number, info: PinMessageInfo) => void;
83
+ export type AddCollectCallback = (rescode: NIMResCode, info: CollectInfo) => void;
84
+ export type RemoveCollectsCallback = (rescode: NIMResCode, count: number) => void;
85
+ export type UpdateCollectCallback = (rescode: NIMResCode, info: CollectInfo) => void;
86
+ export type QueryCollectsCallback = (rescode: NIMResCode, count: number, info: CollectInfoList) => void;
87
+ export type AddQuickCommentCallback = (rescode: NIMResCode, info: QuickCommentInfo) => void;
88
+ export type RemoveQuickCommentCallback = (rescode: NIMResCode, id: string) => void;
89
+ export type QueryQuickCommentCallback = (rescode: NIMResCode, res: QueryQuickCommentsResponse) => void;
90
+ export type AddQuickCommentNotifyCallback = (session: string, to_type: NIMSessionType, msg_client_id: string, qc_info: QuickCommentInfo) => void;
91
+ export type RemoveQuickCommentNotifyCallback = (session: string, to_type: NIMSessionType, msg_client_id: string, quick_comment_id: string, ext: string) => void;
92
+ export type PinMessageCallback = (rescode: NIMResCode, session: string, to_type: number, info: PinMessageInfo) => void;
93
+ export type UnPinMessageCallback = (rescode: NIMResCode, session: string, to_type: number, id: string) => void;
94
+ export type UpdatePinMessageCallback = (rescode: NIMResCode, session: string, to_type: number, info: PinMessageInfo) => void;
95
+ export type QueryPinMessageCallback = (rescode: NIMResCode, session: string, to_type: number, res: QueryAllPinMessageResponse) => void;
96
+ export type AddPinMessageNotifyCallback = (session: string, to_type: number, info: PinMessageInfo) => void;
97
+ export type UnPinMessageNotifyCallback = (session: string, to_type: number, id: string) => void;
98
+ export type UpdatePinMessageNotifyCallback = (session: string, to_type: number, info: PinMessageInfo) => void;
99
99
  export interface NIMTalkExAPI {
100
100
  InitEventHandlers(): void;
101
- AddCollect(collect_info: CollectInfo, cb: AddCollectCallback): void;
102
- RemoveCollects(collect_list: RemoveCollectsParm, cb: RemoveCollectsCallback): void;
103
- UpdateCollectExt(collect_match_param: MatchCollectParm, ext: string, cb: UpdateCollectCallback): void;
104
- QueryCollectList(query_collect_list_param: QueryCollectsParm, cb: QueryCollectsCallback): void;
105
- AddQuickComment(msg: IMMessage, info: QuickCommentInfo, cb: AddQuickCommentCallback): void;
106
- RemoveQuickComment(msg: IMMessage, param: RemoveQuickCommentParam, cb: RemoveQuickCommentCallback): void;
107
- QueryQuickCommentList(query_param: QueryQuickCommentsParam, cb: QueryQuickCommentCallback): void;
108
- AddPinMessage(msg: IMMessage, info: PinMessageInfo, cb: PinMessageCallback): void;
109
- UnPinMessage(modify_param: ModifyPinMessageParam, cb: UnPinMessageCallback): void;
110
- UpdatePinMessage(modify_param: ModifyPinMessageParam, cb: UpdatePinMessageCallback): void;
111
- QueryAllPinMessage(session: string, to_type: number, cb: QueryPinMessageCallback): void;
101
+ AddCollect(collect_info: CollectInfo, cb: AddCollectCallback | null): void;
102
+ RemoveCollects(collect_list: RemoveCollectsParm, cb: RemoveCollectsCallback | null): void;
103
+ UpdateCollectExt(collect_match_param: MatchCollectParm, ext: string, cb: UpdateCollectCallback | null): void;
104
+ QueryCollectList(query_collect_list_param: QueryCollectsParm, cb: QueryCollectsCallback | null): void;
105
+ AddQuickComment(msg: IMMessage, info: QuickCommentInfo, cb: AddQuickCommentCallback | null): void;
106
+ RemoveQuickComment(msg: IMMessage, param: RemoveQuickCommentParam, cb: RemoveQuickCommentCallback | null): void;
107
+ QueryQuickCommentList(query_param: QueryQuickCommentsParam, cb: QueryQuickCommentCallback | null): void;
108
+ AddPinMessage(msg: IMMessage, info: PinMessageInfo, cb: PinMessageCallback | null): void;
109
+ UnPinMessage(modify_param: ModifyPinMessageParam, cb: UnPinMessageCallback | null): void;
110
+ UpdatePinMessage(modify_param: ModifyPinMessageParam, cb: UpdatePinMessageCallback | null): void;
111
+ QueryAllPinMessage(session: string, to_type: number, cb: QueryPinMessageCallback | null): void;
112
112
  }
@@ -114,53 +114,53 @@ export interface TeamMemberPropertyJsonValue {
114
114
  export interface TeamMemberProperty {
115
115
  member_info_json_value_?: TeamMemberPropertyJsonValue;
116
116
  }
117
- export declare type TeamEventCallback = (result: TeamEvent) => void;
118
- export declare type QueryAllMyTeamsCallback = (count: number, result: Array<string>) => void;
119
- export declare type QueryAllMyTeamsInfoCallback = (count: number, result: Array<TeamInfo>) => void;
120
- export declare type QueryTeamMyAllMemberInfosCallback = (count: number, result: Array<TeamMemberProperty>) => void;
121
- export declare type QueryTeamMembersCallback = (tid: string, count: number, result: Array<TeamMemberProperty>) => void;
122
- export declare type QueryTeamMemberCallback = (result: TeamMemberProperty) => void;
123
- export declare type QueryTeamInfoCallback = (tid: string, result: TeamInfo) => void;
124
- export declare type QueryTeamMembersOnlineCallback = (rescode: NIMResCode, count: number, result: Array<TeamMemberProperty>) => void;
125
- export declare type QueryTeamMembersInvitorCallback = (rescode: NIMResCode, count: number, result: Map<string, string>) => void;
126
- export declare type QueryTeamsInfoCallback = (count: number, result: Array<TeamInfo>) => void;
127
- export declare type TeamMsgAckReadCallback = (tid: string, success_ids: Array<string>, failure_ids: Array<string>, ignored_ids: Array<string>) => void;
128
- export declare type UpdateTInfoLocalCallback = (success_ids: Array<string>, failure_ids: Array<string>) => void;
129
- export declare type GetTeamInfoBatchSFTransCallback = (count: number, infos: Array<TeamInfo>) => void;
130
- export declare type GetTeamInfoListCallback = (rescode: NIMResCode, infos: Array<TeamInfo>, failure_ids: Array<string>) => void;
117
+ export type TeamEventCallback = (result: TeamEvent) => void;
118
+ export type QueryAllMyTeamsCallback = (count: number, result: Array<string>) => void;
119
+ export type QueryAllMyTeamsInfoCallback = (count: number, result: Array<TeamInfo>) => void;
120
+ export type QueryTeamMyAllMemberInfosCallback = (count: number, result: Array<TeamMemberProperty>) => void;
121
+ export type QueryTeamMembersCallback = (tid: string, count: number, result: Array<TeamMemberProperty>) => void;
122
+ export type QueryTeamMemberCallback = (result: TeamMemberProperty) => void;
123
+ export type QueryTeamInfoCallback = (tid: string, result: TeamInfo) => void;
124
+ export type QueryTeamMembersOnlineCallback = (rescode: NIMResCode, count: number, result: Array<TeamMemberProperty>) => void;
125
+ export type QueryTeamMembersInvitorCallback = (rescode: NIMResCode, count: number, result: Map<string, string>) => void;
126
+ export type QueryTeamsInfoCallback = (count: number, result: Array<TeamInfo>) => void;
127
+ export type TeamMsgAckReadCallback = (tid: string, success_ids: Array<string>, failure_ids: Array<string>, ignored_ids: Array<string>) => void;
128
+ export type UpdateTInfoLocalCallback = (success_ids: Array<string>, failure_ids: Array<string>) => void;
129
+ export type GetTeamInfoBatchSFTransCallback = (count: number, infos: Array<TeamInfo>) => void;
130
+ export type GetTeamInfoListCallback = (rescode: NIMResCode, infos: Array<TeamInfo>, failure_ids: Array<string>) => void;
131
131
  export interface NIMTeamAPI {
132
132
  InitEventHandlers(): void;
133
- CreateTeamAsync(info: TeamInfo, ids: Array<string>, invitationPostscript: string, cb: TeamEventCallback, jsonExtension: string): boolean;
134
- InviteAsync(tid: string, ids: Array<string>, invitationPostscript: string, invitationAttachment: string, cb: TeamEventCallback, jsonExtension: string): boolean;
135
- KickAsync(tid: string, ids: Array<string>, cb: TeamEventCallback, jsonExtension: string): boolean;
136
- LeaveAsync(tid: string, cb: TeamEventCallback, jsonExtension: string): boolean;
137
- DismissAsync(tid: string, cb: TeamEventCallback, jsonExtension: string): boolean;
138
- UpdateTeamInfoAsync(tid: string, info: TeamInfo, cb: TeamEventCallback, jsonExtension: string): boolean;
139
- ApplyJoinAsync(tid: string, reason: string, cb: TeamEventCallback, jsonExtension: string): boolean;
140
- PassJoinApplyAsync(tid: string, applicantId: string, cb: TeamEventCallback, jsonExtension: string): boolean;
141
- RejectJoinApplyAsync(tid: string, applicantId: string, reason: string, cb: TeamEventCallback, jsonExtension: string): boolean;
142
- AddManagersAsync(tid: string, ids: Array<string>, cb: TeamEventCallback, jsonExtension: string): boolean;
143
- RemoveManagersAsync(tid: string, ids: Array<string>, cb: TeamEventCallback, jsonExtension: string): boolean;
144
- TransferTeamAsync(tid: string, newOwnerId: string, isLeave: boolean, cb: TeamEventCallback, jsonExtension: string): boolean;
145
- UpdateMyPropertyAsync(prop: TeamMemberProperty, cb: TeamEventCallback, jsonExtension: string): boolean;
146
- UpdateOtherNickAsync(prop: TeamMemberProperty, cb: TeamEventCallback, jsonExtension: string): boolean;
147
- AcceptInvitationAsync(tid: string, inviterId: string, cb: TeamEventCallback, jsonExtension: string): boolean;
148
- RejectInvitationAsync(tid: string, inviterId: string, reason: string, cb: TeamEventCallback, jsonExtension: string): boolean;
149
- QueryAllMyTeamsAsync(cb: QueryAllMyTeamsCallback, jsonExtension: string): void;
150
- QueryAllMyTeamsInfoAsync(cb: QueryAllMyTeamsInfoCallback, jsonExtension: string): void;
151
- QueryMyAllMemberInfosAsync(cb: QueryTeamMyAllMemberInfosCallback, jsonExtension: string): void;
152
- QueryTeamMembersAsync(tid: string, cb: QueryTeamMembersCallback, jsonExtension: string): boolean;
153
- QueryTeamMemberAsync(tid: string, id: string, cb: QueryTeamMemberCallback, jsonExtension: string): void;
154
- QueryTeamInfoAsync(tid: string, cb: QueryTeamInfoCallback, jsonExtension: string): boolean;
155
- QueryTeamInfoOnlineAsync(tid: string, cb: TeamEventCallback, jsonExtension: string): boolean;
156
- MuteMemberAsync(tid: string, member_id: string, set_mute: boolean, cb: TeamEventCallback, jsonExtension: string): boolean;
157
- QueryMuteListOnlineAsync(tid: string, cb: QueryTeamMembersOnlineCallback, jsonExtension: string): boolean;
158
- MuteAsync(tid: string, set_mute: boolean, cb: TeamEventCallback, jsonExtension: string): boolean;
159
- TeamMsgAckRead(tid: string, msgs: Array<IMMessage>, cb: TeamMsgAckReadCallback, jsonExtension: string): void;
160
- TeamMsgQueryUnreadList(tid: string, msg: IMMessage, accids: Array<string>, cb: TeamEventCallback, jsonExtension: string): void;
161
- QueryTeamMembersInvitor(tid: string, members: Array<string>, cb: QueryTeamMembersInvitorCallback): void;
162
- QueryTeamInfoByKeywordAsync(keyword: string, cb: QueryTeamsInfoCallback, jsonExtension: string): boolean;
163
- UpdateTInfoLocal(infos: Array<TeamInfo>, cb: UpdateTInfoLocalCallback, jsonExtension: string): void;
164
- GetTeamInfoBatchSFTrans(cb: GetTeamInfoBatchSFTransCallback, time_tag: number, jsonExtension: string): void;
165
- GetTeaminfoList(tids: Array<string>, cb: GetTeamInfoListCallback): void;
133
+ CreateTeamAsync(info: TeamInfo, ids: Array<string>, invitationPostscript: string, cb: TeamEventCallback | null, jsonExtension: string): boolean;
134
+ InviteAsync(tid: string, ids: Array<string>, invitationPostscript: string, invitationAttachment: string, cb: TeamEventCallback | null, jsonExtension: string): boolean;
135
+ KickAsync(tid: string, ids: Array<string>, cb: TeamEventCallback | null, jsonExtension: string): boolean;
136
+ LeaveAsync(tid: string, cb: TeamEventCallback | null, jsonExtension: string): boolean;
137
+ DismissAsync(tid: string, cb: TeamEventCallback | null, jsonExtension: string): boolean;
138
+ UpdateTeamInfoAsync(tid: string, info: TeamInfo, cb: TeamEventCallback | null, jsonExtension: string): boolean;
139
+ ApplyJoinAsync(tid: string, reason: string, cb: TeamEventCallback | null, jsonExtension: string): boolean;
140
+ PassJoinApplyAsync(tid: string, applicantId: string, cb: TeamEventCallback | null, jsonExtension: string): boolean;
141
+ RejectJoinApplyAsync(tid: string, applicantId: string, reason: string, cb: TeamEventCallback | null, jsonExtension: string): boolean;
142
+ AddManagersAsync(tid: string, ids: Array<string>, cb: TeamEventCallback | null, jsonExtension: string): boolean;
143
+ RemoveManagersAsync(tid: string, ids: Array<string>, cb: TeamEventCallback | null, jsonExtension: string): boolean;
144
+ TransferTeamAsync(tid: string, newOwnerId: string, isLeave: boolean, cb: TeamEventCallback | null, jsonExtension: string): boolean;
145
+ UpdateMyPropertyAsync(prop: TeamMemberProperty, cb: TeamEventCallback | null, jsonExtension: string): boolean;
146
+ UpdateOtherNickAsync(prop: TeamMemberProperty, cb: TeamEventCallback | null, jsonExtension: string): boolean;
147
+ AcceptInvitationAsync(tid: string, inviterId: string, cb: TeamEventCallback | null, jsonExtension: string): boolean;
148
+ RejectInvitationAsync(tid: string, inviterId: string, reason: string, cb: TeamEventCallback | null, jsonExtension: string): boolean;
149
+ QueryAllMyTeamsAsync(cb: QueryAllMyTeamsCallback | null, jsonExtension: string): void;
150
+ QueryAllMyTeamsInfoAsync(cb: QueryAllMyTeamsInfoCallback | null, jsonExtension: string): void;
151
+ QueryMyAllMemberInfosAsync(cb: QueryTeamMyAllMemberInfosCallback | null, jsonExtension: string): void;
152
+ QueryTeamMembersAsync(tid: string, cb: QueryTeamMembersCallback | null, jsonExtension: string): boolean;
153
+ QueryTeamMemberAsync(tid: string, id: string, cb: QueryTeamMemberCallback | null, jsonExtension: string): void;
154
+ QueryTeamInfoAsync(tid: string, cb: QueryTeamInfoCallback | null, jsonExtension: string): boolean;
155
+ QueryTeamInfoOnlineAsync(tid: string, cb: TeamEventCallback | null, jsonExtension: string): boolean;
156
+ MuteMemberAsync(tid: string, member_id: string, set_mute: boolean, cb: TeamEventCallback | null, jsonExtension: string): boolean;
157
+ QueryMuteListOnlineAsync(tid: string, cb: QueryTeamMembersOnlineCallback | null, jsonExtension: string): boolean;
158
+ MuteAsync(tid: string, set_mute: boolean, cb: TeamEventCallback | null, jsonExtension: string): boolean;
159
+ TeamMsgAckRead(tid: string, msgs: Array<IMMessage>, cb: TeamMsgAckReadCallback | null, jsonExtension: string): void;
160
+ TeamMsgQueryUnreadList(tid: string, msg: IMMessage, accids: Array<string>, cb: TeamEventCallback | null, jsonExtension: string): void;
161
+ QueryTeamMembersInvitor(tid: string, members: Array<string>, cb: QueryTeamMembersInvitorCallback | null): void;
162
+ QueryTeamInfoByKeywordAsync(keyword: string, cb: QueryTeamsInfoCallback | null, jsonExtension: string): boolean;
163
+ UpdateTInfoLocal(infos: Array<TeamInfo>, cb: UpdateTInfoLocalCallback | null, jsonExtension: string): void;
164
+ GetTeamInfoBatchSFTrans(cb: GetTeamInfoBatchSFTransCallback | null, time_tag: number, jsonExtension: string): void;
165
+ GetTeaminfoList(tids: Array<string>, cb: GetTeamInfoListCallback | null): void;
166
166
  }
@@ -12,8 +12,8 @@ export interface AudioInfo {
12
12
  url_?: string; /** < string 语音url*/
13
13
  duration_?: number; /** < long 语音时长,毫秒*/
14
14
  }
15
- export declare type GetAudioTextCallback = (rescode: NIMResCode, text: string) => void;
16
- export declare type FilterClientAntispamCallback = (succeed: boolean, rescode: NIMResCode, text: string) => void;
15
+ export type GetAudioTextCallback = (rescode: NIMResCode, text: string) => void;
16
+ export type FilterClientAntispamCallback = (succeed: boolean, rescode: NIMResCode, text: string) => void;
17
17
  export interface NIMToolAPI {
18
18
  InitEventHandlers(): void;
19
19
  GetUserAppdataDir(appAccount: string): string;
@@ -23,6 +23,6 @@ export interface NIMToolAPI {
23
23
  GetMd5(input: string): string;
24
24
  GetFileMd5(filePath: string): string;
25
25
  GetUuid(): string;
26
- GetAudioTextAsync(audioInfo: AudioInfo, cb: GetAudioTextCallback, jsonExtension: string): boolean;
27
- FilterClientAntispam(text: string, replaceString: string, libName: string, cb: FilterClientAntispamCallback): void;
26
+ GetAudioTextAsync(audioInfo: AudioInfo, cb: GetAudioTextCallback | null, jsonExtension: string): boolean;
27
+ FilterClientAntispam(text: string, replaceString: string, libName: string, cb: FilterClientAntispamCallback | null): void;
28
28
  }
@@ -39,21 +39,21 @@ export interface SpecialRelationshipChangeEvent {
39
39
  type_?: NIMUserSpecialRelationshipChangeType; /**< 黑名单/静音名单更新事件类型 */
40
40
  content_?: object; /**< 黑名单/静音名单更新事件内容 */
41
41
  }
42
- export declare type SpecialRelationshipChangedCallback = (result: SpecialRelationshipChangeEvent) => void;
43
- export declare type UserNameCardChangedCallback = (result: Array<UserNameCard>) => void;
44
- export declare type SetRelationCallback = (rescode: NIMResCode, accid: string, setOpt: boolean) => void;
45
- export declare type GetSpecialListCallback = (rescode: NIMResCode, result: Array<BlackMuteListInfo>) => void;
46
- export declare type GetUserNameCardCallback = (result: Array<UserNameCard>) => void;
47
- export declare type UpdateMyUserNameCardCallback = (rescode: NIMResCode) => void;
42
+ export type SpecialRelationshipChangedCallback = (result: SpecialRelationshipChangeEvent) => void;
43
+ export type UserNameCardChangedCallback = (result: Array<UserNameCard>) => void;
44
+ export type SetRelationCallback = (rescode: NIMResCode, accid: string, setOpt: boolean) => void;
45
+ export type GetSpecialListCallback = (rescode: NIMResCode, result: Array<BlackMuteListInfo>) => void;
46
+ export type GetUserNameCardCallback = (result: Array<UserNameCard>) => void;
47
+ export type UpdateMyUserNameCardCallback = (rescode: NIMResCode) => void;
48
48
  export interface NIMUserAPI {
49
49
  InitEventHandlers(): void;
50
- SetBlack(accid: string, setBlack: boolean, cb: SetRelationCallback, jsonExtension: string): boolean;
51
- SetMute(accid: string, set_mute: boolean, cb: SetRelationCallback, jsonExtension: string): boolean;
52
- GetMutelist(cb: GetSpecialListCallback, jsonExtension: string): void;
53
- GetBlacklist(cb: GetSpecialListCallback, jsonExtension: string): void;
54
- GetUserNameCard(accids: Array<string>, cb: GetUserNameCardCallback, jsonExtension: string): boolean;
55
- GetUserNameCardOnline(accids: Array<string>, cb: GetUserNameCardCallback, jsonExtension: string): boolean;
56
- UpdateMyUserNameCard(nameCard: UserNameCard, cb: UpdateMyUserNameCardCallback, jsonExtension: string): boolean;
57
- QueryUserListByKeyword(keyword: string, cb: GetUserNameCardCallback, jsonExtension: string): boolean;
50
+ SetBlack(accid: string, setBlack: boolean, cb: SetRelationCallback | null, jsonExtension: string): boolean;
51
+ SetMute(accid: string, set_mute: boolean, cb: SetRelationCallback | null, jsonExtension: string): boolean;
52
+ GetMutelist(cb: GetSpecialListCallback | null, jsonExtension: string): void;
53
+ GetBlacklist(cb: GetSpecialListCallback | null, jsonExtension: string): void;
54
+ GetUserNameCard(accids: Array<string>, cb: GetUserNameCardCallback | null, jsonExtension: string): boolean;
55
+ GetUserNameCardOnline(accids: Array<string>, cb: GetUserNameCardCallback | null, jsonExtension: string): boolean;
56
+ UpdateMyUserNameCard(nameCard: UserNameCard, cb: UpdateMyUserNameCardCallback | null, jsonExtension: string): boolean;
57
+ QueryUserListByKeyword(keyword: string, cb: GetUserNameCardCallback | null, jsonExtension: string): boolean;
58
58
  UpdatePushToken(cerName: string, token: string, type: NINPushType): void;
59
59
  }
@@ -25,6 +25,33 @@ export { QChatMessageModule } from './qchat/message';
25
25
  export { QChatSystemNotificationModule } from './qchat/system_notification';
26
26
  export { QChatAttachmentModule } from './qchat/attachment';
27
27
  export { QChatRoleModule } from './qchat/role';
28
+ import { NIMClient } from './nim/client';
29
+ import { NIMDataSync } from './nim/data_sync';
30
+ import { NIMFriend } from './nim/friend';
31
+ import { NIMGlobal } from './nim/global';
32
+ import { NIMMsgLog } from './nim/msglog';
33
+ import { NIMNOS } from './nim/nos';
34
+ import { NIMOnlineSession } from './nim/online_session';
35
+ import { NIMPassThroughProxy } from './nim/pass_through_proxy';
36
+ import { NIMSession } from './nim/session';
37
+ import { NIMSubscribeEvent } from './nim/subscribe_event';
38
+ import { NIMSuperTeam } from './nim/super_team';
39
+ import { NIMSysMsg } from './nim/sysmsg';
40
+ import { NIMTalk } from './nim/talk';
41
+ import { NIMTeam } from './nim/team';
42
+ import { NIMTool } from './nim/tool';
43
+ import { NIMUser } from './nim/user';
44
+ import { NIMPlugin } from './nim/plugin';
45
+ import { NIMTalkEx } from './nim/talkex';
46
+ import { ChatRoomModule } from './chatroom/chatroom';
47
+ import { QChatInstanceModule } from './qchat/instance';
48
+ import { QChatServerModule } from './qchat/server';
49
+ import { QChatChannelModule } from './qchat/channel';
50
+ import { QChatChannelCategoryModule } from './qchat/channel_category';
51
+ import { QChatMessageModule } from './qchat/message';
52
+ import { QChatSystemNotificationModule } from './qchat/system_notification';
53
+ import { QChatAttachmentModule } from './qchat/attachment';
54
+ import { QChatRoleModule } from './qchat/role';
28
55
  export * from './nim_def/client_def';
29
56
  export * from './nim_def/data_sync_def';
30
57
  export * from './nim_def/friend_def';
@@ -51,3 +78,37 @@ export * from './qchat_def/message_def';
51
78
  export * from './qchat_def/system_notification_def';
52
79
  export * from './qchat_def/attachment_def';
53
80
  export * from './qchat_def/role_def';
81
+ export declare class NIM {
82
+ client: NIMClient;
83
+ dataSync: NIMDataSync;
84
+ friend: NIMFriend;
85
+ global: NIMGlobal;
86
+ msgLog: NIMMsgLog;
87
+ nos: NIMNOS;
88
+ onlineSession: NIMOnlineSession;
89
+ passThroughProxy: NIMPassThroughProxy;
90
+ session: NIMSession;
91
+ subscribeEvent: NIMSubscribeEvent;
92
+ superTeam: NIMSuperTeam;
93
+ sysMsg: NIMSysMsg;
94
+ talk: NIMTalk;
95
+ team: NIMTeam;
96
+ tool: NIMTool;
97
+ user: NIMUser;
98
+ plugin: NIMPlugin;
99
+ talkEx: NIMTalkEx;
100
+ initEventHandlers(): void;
101
+ }
102
+ export declare class ChatRoom extends ChatRoomModule {
103
+ }
104
+ export declare class QChat {
105
+ instance: QChatInstanceModule;
106
+ server: QChatServerModule;
107
+ channel: QChatChannelModule;
108
+ channelCategory: QChatChannelCategoryModule;
109
+ message: QChatMessageModule;
110
+ systemNotification: QChatSystemNotificationModule;
111
+ attachment: QChatAttachmentModule;
112
+ role: QChatRoleModule;
113
+ initEventHandlers(): void;
114
+ }
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from 'eventemitter3';
2
- import { QChatChannelCreateParam, QChatChannelDeleteParam, QChatChannelUpdateParam, QChatChannelUpdateCategoryInfoParam, QChatChannelSubscribeParam, QChatChannelQueryUnreadInfoParam, QChatChannelGetChannelsParam, QChatChannelGetChannelsPageParam, QChatChannelGetMembersPageParam, QChatChannelUpdateWhiteBlackRoleParam, QChatChannelUpdateWhiteBlackMembersParam, QChatChannelGetWhiteBlackRolesPageParam, QChatChannelGetWhiteBlackMembersPageParam, QChatChannelGetExistingWhiteBlackRolesParam, QChatChannelGetExistingWhiteBlackMembersParam, QChatChannelSearchPageParam, QChatChannelMemberSearchParam, QChatChannelUpdateRTCInfoParam, QChatChannelGetRTCInfoParam, QChatChannelGetRTCOnlineMembersParam, QChatChannelCreateResp, QChatChannelDeleteResp, QChatChannelGetChannelsPageResp, QChatChannelGetChannelsResp, QChatChannelGetExistingWhiteBlackMembersResp, QChatChannelGetExistingWhiteBlackRolesResp, QChatChannelGetMembersPageResp, QChatChannelGetRTCInfoResp, QChatChannelGetRTCOnlineMembersResp, QChatChannelGetWhiteBlackMembersPageResp, QChatChannelGetWhiteBlackRolesPageResp, QChatChannelMemberSearchResp, QChatChannelQueryUnreadInfoResp, QChatChannelSearchPageResp, QChatChannelSubscribeResp, QChatChannelUpdateCategoryInfoResp, QChatChannelUpdateResp, QChatChannelUpdateRTCInfoResp, QChatChannelUpdateWhiteBlackMembersResp, QChatChannelUpdateWhiteBlackRoleResp, QChatChannelUnreadResp } from '../qchat_def/channel_def';
2
+ import { QChatChannelCreateParam, QChatChannelDeleteParam, QChatChannelUpdateParam, QChatChannelUpdateCategoryInfoParam, QChatChannelSubscribeParam, QChatChannelQueryUnreadInfoParam, QChatChannelGetChannelsParam, QChatChannelGetChannelsPageParam, QChatChannelGetMembersPageParam, QChatChannelUpdateWhiteBlackRoleParam, QChatChannelUpdateWhiteBlackMembersParam, QChatChannelGetWhiteBlackRolesPageParam, QChatChannelGetWhiteBlackMembersPageParam, QChatChannelGetExistingWhiteBlackRolesParam, QChatChannelGetExistingWhiteBlackMembersParam, QChatChannelSearchPageParam, QChatChannelMemberSearchParam, QChatChannelUpdateRTCInfoParam, QChatChannelGetRTCInfoParam, QChatChannelGetRTCOnlineMembersParam, QChatChannelCreateResp, QChatChannelDeleteResp, QChatChannelGetChannelsPageResp, QChatChannelGetChannelsResp, QChatChannelGetExistingWhiteBlackMembersResp, QChatChannelGetExistingWhiteBlackRolesResp, QChatChannelGetMembersPageResp, QChatChannelGetRTCInfoResp, QChatChannelGetRTCOnlineMembersResp, QChatChannelGetWhiteBlackMembersPageResp, QChatChannelGetWhiteBlackRolesPageResp, QChatChannelMemberSearchResp, QChatChannelQueryUnreadInfoResp, QChatChannelSearchPageResp, QChatChannelSubscribeResp, QChatChannelUpdateCategoryInfoResp, QChatChannelUpdateResp, QChatChannelUpdateRTCInfoResp, QChatChannelUpdateWhiteBlackMembersResp, QChatChannelUpdateWhiteBlackRoleResp, QChatChannelUnreadResp, QChatChannelSubscribeAsVisitorParam, QChatChannelSubscribeAsVisitorResp } from '../qchat_def/channel_def';
3
3
  export declare interface QChatChannelEvents {
4
4
  /** 频道未读数 */
5
5
  unread: [QChatChannelUnreadResp];
@@ -39,6 +39,12 @@ export declare class QChatChannelModule extends EventEmitter<QChatChannelEvents>
39
39
  * @return void
40
40
  */
41
41
  subscribe(param: QChatChannelSubscribeParam): Promise<QChatChannelSubscribeResp>;
42
+ /** @fn subscribeAsVisitor(param: QChatChannelSubscribeAsVisitorParam)
43
+ * 以游客模式订阅频道未读状态、未读数或未读消息、事件
44
+ * @param[in] param 接口参数
45
+ * @return void
46
+ */
47
+ subscribeAsVisitor(param: QChatChannelSubscribeAsVisitorParam): Promise<QChatChannelSubscribeAsVisitorResp>;
42
48
  /** @fn queryUnreadInfo(param: QChatChannelQueryUnreadInfoParam)
43
49
  * 查询消息未读数
44
50
  * @param[in] param 接口参数
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from 'eventemitter3';
2
- import { QChatServerAcceptApplyParam, QChatServerAcceptApplyResp, QChatServerAcceptInviteParam, QChatServerAcceptInviteResp, QChatServerApplyParam, QChatServerApplyResp, QChatServerBanMemberParam, QChatServerBanMemberResp, QChatServerCreateParam, QChatServerCreateResp, QChatServerDeleteParam, QChatServerDeleteResp, QChatServerGenerateInviteCodeParam, QChatServerGenerateInviteCodeResp, QChatServerGetBannedMembersPageParam, QChatServerGetBannedMembersPageResp, QChatServerGetInviteApplyRecordOfSelfParam, QChatServerGetInviteApplyRecordOfSelfResp, QChatServerGetInviteApplyRecordOfServerParam, QChatServerGetInviteApplyRecordOfServerResp, QChatServerGetMembersPageParam, QChatServerGetMembersPageResp, QChatServerGetMembersParam, QChatServerGetMembersResp, QChatServerGetServersPageParam, QChatServerGetServersPageResp, QChatServerGetServersParam, QChatServerGetServersResp, QChatServerInviteParam, QChatServerInviteResp, QChatServerJoinByInviteCodeParam, QChatServerJoinByInviteCodeResp, QChatServerKickParam, QChatServerKickResp, QChatServerLeaveParam, QChatServerLeaveResp, QChatServerMarkReadParam, QChatServerMarkReadResp, QChatServerMemberSearchParam, QChatServerMemberSearchResp, QChatServerRejectApplyParam, QChatServerRejectApplyResp, QChatServerRejectInviteParam, QChatServerRejectInviteResp, QChatServerSearchPageParam, QChatServerSearchPageResp, QChatServerSubscribeAllChannelParam, QChatServerSubscribeAllChannelResp, QChatServerSubscribeParam, QChatServerSubscribeResp, QChatServerUnbanMemberParam, QChatServerUnbanMemberResp, QChatServerUnreadResp, QChatServerUpdateMemberInfoParam, QChatServerUpdateMemberInfoResp, QChatServerUpdateParam, QChatServerUpdateResp } from '../qchat_def/server_def';
2
+ import { QChatServerAcceptApplyParam, QChatServerAcceptApplyResp, QChatServerAcceptInviteParam, QChatServerAcceptInviteResp, QChatServerApplyParam, QChatServerApplyResp, QChatServerBanMemberParam, QChatServerBanMemberResp, QChatServerCreateParam, QChatServerCreateResp, QChatServerDeleteParam, QChatServerDeleteResp, QChatServerEnterAsVisitorParam, QChatServerEnterAsVisitorResp, QChatServerGenerateInviteCodeParam, QChatServerGenerateInviteCodeResp, QChatServerGetBannedMembersPageParam, QChatServerGetBannedMembersPageResp, QChatServerGetInviteApplyRecordOfSelfParam, QChatServerGetInviteApplyRecordOfSelfResp, QChatServerGetInviteApplyRecordOfServerParam, QChatServerGetInviteApplyRecordOfServerResp, QChatServerGetMembersPageParam, QChatServerGetMembersPageResp, QChatServerGetMembersParam, QChatServerGetMembersResp, QChatServerGetServersPageParam, QChatServerGetServersPageResp, QChatServerGetServersParam, QChatServerGetServersResp, QChatServerInviteParam, QChatServerInviteResp, QChatServerJoinByInviteCodeParam, QChatServerJoinByInviteCodeResp, QChatServerKickParam, QChatServerKickResp, QChatServerLeaveAsVisitorParam, QChatServerLeaveAsVisitorResp, QChatServerLeaveParam, QChatServerLeaveResp, QChatServerMarkReadParam, QChatServerMarkReadResp, QChatServerMemberSearchParam, QChatServerMemberSearchResp, QChatServerRejectApplyParam, QChatServerRejectApplyResp, QChatServerRejectInviteParam, QChatServerRejectInviteResp, QChatServerSearchPageParam, QChatServerSearchPageResp, QChatServerSubscribeAllChannelParam, QChatServerSubscribeAllChannelResp, QChatServerSubscribeAsVisitorParam, QChatServerSubscribeAsVisitorResp, QChatServerSubscribeParam, QChatServerSubscribeResp, QChatServerUnbanMemberParam, QChatServerUnbanMemberResp, QChatServerUnreadResp, QChatServerUpdateMemberInfoParam, QChatServerUpdateMemberInfoResp, QChatServerUpdateParam, QChatServerUpdateResp } from '../qchat_def/server_def';
3
3
  export declare interface QChatServerEvents {
4
4
  /** 服务器未读数 */
5
5
  unread: [QChatServerUnreadResp];
@@ -27,12 +27,30 @@ export declare class QChatServerModule extends EventEmitter<QChatServerEvents> {
27
27
  * @return void
28
28
  */
29
29
  updateServer(param: QChatServerUpdateParam): Promise<QChatServerUpdateResp>;
30
+ /** @fn enterAsVisitor(param: QChatServerEnterAsVisitorParam)
31
+ * 以游客身份进入服务器
32
+ * @param[in] param 接口参数
33
+ * @return void
34
+ */
35
+ enterAsVisitor(param: QChatServerEnterAsVisitorParam): Promise<QChatServerEnterAsVisitorResp>;
36
+ /** @fn leaveAsVisitor(param: QChatServerLeaveAsVisitorParam)
37
+ * 以游客身份离开服务器
38
+ * @param[in] param 接口参数
39
+ * @return void
40
+ */
41
+ leaveAsVisitor(param: QChatServerLeaveAsVisitorParam): Promise<QChatServerLeaveAsVisitorResp>;
30
42
  /** @fn subscribe(param: QChatServerSubscribeParam)
31
43
  * 订阅指定服务器下的系统通知消息
32
44
  * @param[in] param 接口参数
33
45
  * @return void
34
46
  */
35
47
  subscribe(param: QChatServerSubscribeParam): Promise<QChatServerSubscribeResp>;
48
+ /** @fn subscribeAsVisitor(param: QChatServerSubscribeAsVisitorParam)
49
+ * 以游客模式订阅服务器下的系统通知消息
50
+ * @param[in] param 接口参数
51
+ * @return void
52
+ */
53
+ subscribeAsVisitor(param: QChatServerSubscribeAsVisitorParam): Promise<QChatServerSubscribeAsVisitorResp>;
36
54
  /** @fn subscribeAllChannel(param: QChatServerSubscribeAllChannelParam)
37
55
  * 订阅服务器下所有频道的消息
38
56
  * @param[in] param 接口参数
@@ -34,13 +34,13 @@ export interface QChatAttachmentProgressResp {
34
34
  cur_size?: number;
35
35
  }
36
36
  /** 获取附件自定义token回调 */
37
- export declare type AttachmentCustomTokenCallback = (resp: QChatAttachmentCustomTokenResp) => QChatAttachmentCustomTokenResp;
37
+ export type AttachmentCustomTokenCallback = (resp: QChatAttachmentCustomTokenResp) => QChatAttachmentCustomTokenResp;
38
38
  /** 上传附件回调 */
39
- export declare type AttachmentUploadCallback = (resp: QChatAttachmentUploadResp) => void;
39
+ export type AttachmentUploadCallback = (resp: QChatAttachmentUploadResp) => void;
40
40
  /** 下载附件回调 */
41
- export declare type AttachmentDownloadCallback = (resp: QChatAttachmentDownloadResp) => void;
41
+ export type AttachmentDownloadCallback = (resp: QChatAttachmentDownloadResp) => void;
42
42
  /** 上传/下载附件进度回调 */
43
- export declare type AttachmentProgressCallback = (resp: QChatAttachmentProgressResp) => void;
43
+ export type AttachmentProgressCallback = (resp: QChatAttachmentProgressResp) => void;
44
44
  export interface QChatAttachmentUploadParam {
45
45
  /** 进度回调 */
46
46
  progress_cb?: AttachmentProgressCallback;