@rongcloud/engine 5.2.1-alpha.1 → 5.2.1-enterprise-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +71 -7
- package/dist/index.esm.js +7 -2
- package/dist/index.js +7 -2
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCEngine - v5.2.1-alpha.1
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCEngine - v5.2.1-enterprise-alpha.1
|
|
3
|
+
* CommitId - 2db8186f9f3c4b502828f95f4f67dac6c8097869
|
|
4
|
+
* Wed Mar 30 2022 16:45:53 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
@@ -365,7 +365,7 @@ declare class QueryWriter extends RetryableWriter {
|
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
/**
|
|
368
|
-
*
|
|
368
|
+
* 输入状态类型
|
|
369
369
|
*/
|
|
370
370
|
declare enum OperateStatus {
|
|
371
371
|
typing = 0
|
|
@@ -394,11 +394,14 @@ interface IChrmKVEntry {
|
|
|
394
394
|
userId?: string;
|
|
395
395
|
type?: number;
|
|
396
396
|
isDeleted?: boolean;
|
|
397
|
+
version?: number;
|
|
397
398
|
}
|
|
398
399
|
interface IChrmKVEntries {
|
|
399
400
|
entries: {
|
|
400
401
|
key: string;
|
|
401
402
|
value?: string;
|
|
403
|
+
timestamp?: number;
|
|
404
|
+
version?: number;
|
|
402
405
|
}[];
|
|
403
406
|
notificationExtra?: string;
|
|
404
407
|
isOverwrite?: boolean;
|
|
@@ -741,6 +744,10 @@ interface IReceivedMessage {
|
|
|
741
744
|
* 超级群专有字段,是否断档,服务端收到大量消息可能会断档,所以消息存在此标志位,断档需要客户手动拉取历史消息
|
|
742
745
|
*/
|
|
743
746
|
isInterrupt?: boolean;
|
|
747
|
+
/**
|
|
748
|
+
* 拉取历史消息时表示该消息是否修改过(仅超级群有效)
|
|
749
|
+
*/
|
|
750
|
+
isModifyMessage?: boolean;
|
|
744
751
|
}
|
|
745
752
|
interface IUserProfile {
|
|
746
753
|
/**
|
|
@@ -1154,6 +1161,11 @@ declare enum ErrorCode {
|
|
|
1154
1161
|
* 聊天室Key不存在
|
|
1155
1162
|
*/
|
|
1156
1163
|
CHATROOM_KEY_NOT_EXIST = 23427,
|
|
1164
|
+
/*!
|
|
1165
|
+
聊天室设置 KV 失败,出现在两人或者多端同时操作一个 kv。
|
|
1166
|
+
如果出现该错误,为避免和其他端同时操作,请延时一定时间再试
|
|
1167
|
+
*/
|
|
1168
|
+
CHATROOM_KV_SET_ERROR = 23431,
|
|
1157
1169
|
/**
|
|
1158
1170
|
* 敏感词屏蔽
|
|
1159
1171
|
*/
|
|
@@ -2983,6 +2995,17 @@ interface IEndRoomPKOptions {
|
|
|
2983
2995
|
keys: string[];
|
|
2984
2996
|
}
|
|
2985
2997
|
|
|
2998
|
+
interface IRTCRoomBindOption {
|
|
2999
|
+
/**
|
|
3000
|
+
* 聊天室 ID
|
|
3001
|
+
*/
|
|
3002
|
+
chatRoomId: string;
|
|
3003
|
+
/**
|
|
3004
|
+
* RTC房间 ID
|
|
3005
|
+
*/
|
|
3006
|
+
rtcRoomId: string;
|
|
3007
|
+
}
|
|
3008
|
+
|
|
2986
3009
|
/**
|
|
2987
3010
|
* engine 基本接口定义,用于约束 Electron 下主进程、渲染进程、JSEngine 的编码一致性
|
|
2988
3011
|
*/
|
|
@@ -3401,16 +3424,27 @@ interface IEngine {
|
|
|
3401
3424
|
*/
|
|
3402
3425
|
setMessageSearchField(messageId: number, content: any, searchFiles: string): Promise<ErrorCode>;
|
|
3403
3426
|
/**
|
|
3404
|
-
*
|
|
3427
|
+
* 通过关键字与 channelId 搜索所有会话
|
|
3405
3428
|
*/
|
|
3406
3429
|
searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3407
3430
|
/**
|
|
3408
|
-
*
|
|
3431
|
+
* 通过关键字搜索所有会话
|
|
3432
|
+
*/
|
|
3433
|
+
searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3434
|
+
/**
|
|
3435
|
+
* 按内容搜索指定会话内的消息
|
|
3409
3436
|
*/
|
|
3410
3437
|
searchMessageByContent(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number, channelId: string): IPromiseResult<{
|
|
3411
3438
|
messages: IReceivedMessage[];
|
|
3412
3439
|
count: number;
|
|
3413
3440
|
}>;
|
|
3441
|
+
/**
|
|
3442
|
+
* 按内容搜索指定会话(不区分 channelId)的消息
|
|
3443
|
+
*/
|
|
3444
|
+
searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number): IPromiseResult<{
|
|
3445
|
+
messages: IReceivedMessage[];
|
|
3446
|
+
count: number;
|
|
3447
|
+
}>;
|
|
3414
3448
|
/**
|
|
3415
3449
|
* 获取会话下所有未读的 @ 消息
|
|
3416
3450
|
*/
|
|
@@ -3492,6 +3526,7 @@ interface IEngine {
|
|
|
3492
3526
|
cancelRoomPK(options: ICancelRoomPKOptions): Promise<ErrorCode>;
|
|
3493
3527
|
responseRoomPK(options: IResRoomPKOptions): Promise<ErrorCode>;
|
|
3494
3528
|
endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
|
|
3529
|
+
bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<ErrorCode>;
|
|
3495
3530
|
}
|
|
3496
3531
|
|
|
3497
3532
|
interface IExpansionMsgContent {
|
|
@@ -3692,6 +3727,10 @@ declare class DataCodec {
|
|
|
3692
3727
|
* 格式化 RTC 用户加入房间后通知拉取的数据(房间内主播全量列表、房间全量资源)
|
|
3693
3728
|
*/
|
|
3694
3729
|
private _formatRTCRoomKVList;
|
|
3730
|
+
/**
|
|
3731
|
+
* 拉取聊天室 kv 存储时的最新时间戳
|
|
3732
|
+
*/
|
|
3733
|
+
private _formatChrmKVVersion;
|
|
3695
3734
|
/**
|
|
3696
3735
|
* 格式化观众加房间后返回数据
|
|
3697
3736
|
*/
|
|
@@ -3940,6 +3979,10 @@ declare class DataCodec {
|
|
|
3940
3979
|
* 结束连麦 PK
|
|
3941
3980
|
*/
|
|
3942
3981
|
encodeEndRoomPK(options: IEndRoomPKOptions): any;
|
|
3982
|
+
/**
|
|
3983
|
+
* 设置聊天室关联的rtc房间
|
|
3984
|
+
*/
|
|
3985
|
+
encodebindRTCRoomForChatroom(options: IRTCRoomBindOption): any;
|
|
3943
3986
|
}
|
|
3944
3987
|
|
|
3945
3988
|
interface IDataChannelWatcher {
|
|
@@ -4808,10 +4851,15 @@ declare class APIContext {
|
|
|
4808
4851
|
status: string;
|
|
4809
4852
|
}>>;
|
|
4810
4853
|
searchConversationByContent(keyword: string, customMessageTypes?: string[], channelId?: string, conversationTypes?: ConversationType[]): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
4854
|
+
searchConversationByContentWithAllChannel(keyword: string, customMessageTypes?: string[], conversationTypes?: ConversationType[]): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
4811
4855
|
searchMessageByContent(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number, channelId?: string): Promise<IAsyncRes<{
|
|
4812
4856
|
messages: IReceivedMessage[];
|
|
4813
4857
|
count: number;
|
|
4814
4858
|
}>>;
|
|
4859
|
+
searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number): Promise<IAsyncRes<{
|
|
4860
|
+
messages: IReceivedMessage[];
|
|
4861
|
+
count: number;
|
|
4862
|
+
}>>;
|
|
4815
4863
|
getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId?: string): IReceivedMessage[];
|
|
4816
4864
|
clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<ErrorCode>;
|
|
4817
4865
|
/**
|
|
@@ -4892,6 +4940,10 @@ declare class APIContext {
|
|
|
4892
4940
|
* 结束连麦 PK
|
|
4893
4941
|
*/
|
|
4894
4942
|
endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
|
|
4943
|
+
/**
|
|
4944
|
+
* SDK设置聊天室关联的rtc房间
|
|
4945
|
+
*/
|
|
4946
|
+
bindRTCRoomForChatroom(option: IRTCRoomBindOption): Promise<ErrorCode>;
|
|
4895
4947
|
}
|
|
4896
4948
|
|
|
4897
4949
|
declare class PluginContext {
|
|
@@ -5659,6 +5711,10 @@ declare abstract class AEngine implements IEngine {
|
|
|
5659
5711
|
* 通过关键字搜索会话
|
|
5660
5712
|
*/
|
|
5661
5713
|
abstract searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
5714
|
+
/**
|
|
5715
|
+
* 通过关键字搜索所有会话
|
|
5716
|
+
*/
|
|
5717
|
+
abstract searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
5662
5718
|
/**
|
|
5663
5719
|
* 按内容搜索会话内的消息
|
|
5664
5720
|
*/
|
|
@@ -5666,6 +5722,13 @@ declare abstract class AEngine implements IEngine {
|
|
|
5666
5722
|
messages: IReceivedMessage[];
|
|
5667
5723
|
count: number;
|
|
5668
5724
|
}>;
|
|
5725
|
+
/**
|
|
5726
|
+
* 按内容搜索指定会话(不区分 channelId)的消息
|
|
5727
|
+
*/
|
|
5728
|
+
abstract searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number): IPromiseResult<{
|
|
5729
|
+
messages: IReceivedMessage[];
|
|
5730
|
+
count: number;
|
|
5731
|
+
}>;
|
|
5669
5732
|
/**
|
|
5670
5733
|
* 获取会话下所有未读的 @ 消息
|
|
5671
5734
|
*/
|
|
@@ -5758,6 +5821,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
5758
5821
|
abstract cancelRoomPK(options: ICancelRoomPKOptions): Promise<ErrorCode>;
|
|
5759
5822
|
abstract responseRoomPK(options: IResRoomPKOptions): Promise<ErrorCode>;
|
|
5760
5823
|
abstract endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
|
|
5824
|
+
abstract bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<ErrorCode>;
|
|
5761
5825
|
}
|
|
5762
5826
|
|
|
5763
5827
|
declare class AppStorage {
|
|
@@ -6230,4 +6294,4 @@ declare enum CONNECTION_TYPE {
|
|
|
6230
6294
|
*/
|
|
6231
6295
|
declare const version: string;
|
|
6232
6296
|
|
|
6233
|
-
export { AEngine, ANavi, APIContext, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType as ChatroomMemberChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, DelayTimer, ErrorCode, EventEmitter, FileType, HttpMethod, IAPIContextOption, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, ICancelRoomPKOptions, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IInsertMsgOptions, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, IM_COMET_PULLMSG_TIMEOUT, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviInfo, IPluginGenerator, IPromiseResult, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraExMsgOptions, IUltraModifyMsgOptions, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogType, Logger, MAX_MESSAGE_CONTENT_BYTES, MINI_COMET_CONNECT_URIS, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NotificationStatus, PING_REQ_TIMEOUT, PUBLIC_CLOUD_NAVI_URIS, PluginContext, RCAssertError, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, TagChangeType, UploadMethod, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketChannel, appendUrl, assert, clone, cloneByJSON, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, todo, usingCppEngine, validate, version };
|
|
6297
|
+
export { AEngine, ANavi, APIContext, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType as ChatroomMemberChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, DelayTimer, ErrorCode, EventEmitter, FileType, HttpMethod, IAPIContextOption, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, ICancelRoomPKOptions, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGetMsgOption, IInsertMsgOptions, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, IM_COMET_PULLMSG_TIMEOUT, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviInfo, IPluginGenerator, IPromiseResult, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraExMsgOptions, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogType, Logger, MAX_MESSAGE_CONTENT_BYTES, MINI_COMET_CONNECT_URIS, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NotificationStatus, OperateStatus, PING_REQ_TIMEOUT, PUBLIC_CLOUD_NAVI_URIS, PluginContext, RCAssertError, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, TagChangeType, UploadMethod, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketChannel, appendUrl, assert, clone, cloneByJSON, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, todo, usingCppEngine, validate, version };
|