@rongcloud/engine 5.2.1-alpha.2 → 5.2.2-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
- * RCEngine - v5.2.1-alpha.2
3
- * CommitId - dd7ef7feba5b7d52ab85eca736707953c9652394
4
- * Tue Mar 08 2022 14:52:47 GMT+0800 (China Standard Time)
2
+ * RCEngine - v5.2.2-alpha.1
3
+ * CommitId - ef90f759b22769f0aae56777d549b30aeae50502
4
+ * Fri Mar 18 2022 10:40:26 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
- * 聊天室 kv 存储操作类型. 对方操作, 己方收到消息(RC:chrmKVNotiMsg)中会带入此值. 根据此值判断是删除还是更新
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;
@@ -742,7 +745,7 @@ interface IReceivedMessage {
742
745
  */
743
746
  isInterrupt?: boolean;
744
747
  /**
745
- * 拉取历史消息时表示该消息是否修改过
748
+ * 拉取历史消息时表示该消息是否修改过(仅超级群有效)
746
749
  */
747
750
  isModifyMessage?: boolean;
748
751
  }
@@ -1158,6 +1161,11 @@ declare enum ErrorCode {
1158
1161
  * 聊天室Key不存在
1159
1162
  */
1160
1163
  CHATROOM_KEY_NOT_EXIST = 23427,
1164
+ /*!
1165
+ 聊天室设置 KV 失败,出现在两人或者多端同时操作一个 kv。
1166
+ 如果出现该错误,为避免和其他端同时操作,请延时一定时间再试
1167
+ */
1168
+ CHATROOM_KV_SET_ERROR = 23431,
1161
1169
  /**
1162
1170
  * 敏感词屏蔽
1163
1171
  */
@@ -2987,6 +2995,17 @@ interface IEndRoomPKOptions {
2987
2995
  keys: string[];
2988
2996
  }
2989
2997
 
2998
+ interface IRTCRoomBindOption {
2999
+ /**
3000
+ * 聊天室 ID
3001
+ */
3002
+ chatRoomId: string;
3003
+ /**
3004
+ * RTC房间 ID
3005
+ */
3006
+ rtcRoomId: string;
3007
+ }
3008
+
2990
3009
  /**
2991
3010
  * engine 基本接口定义,用于约束 Electron 下主进程、渲染进程、JSEngine 的编码一致性
2992
3011
  */
@@ -3496,6 +3515,7 @@ interface IEngine {
3496
3515
  cancelRoomPK(options: ICancelRoomPKOptions): Promise<ErrorCode>;
3497
3516
  responseRoomPK(options: IResRoomPKOptions): Promise<ErrorCode>;
3498
3517
  endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
3518
+ bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<ErrorCode>;
3499
3519
  }
3500
3520
 
3501
3521
  interface IExpansionMsgContent {
@@ -3696,6 +3716,10 @@ declare class DataCodec {
3696
3716
  * 格式化 RTC 用户加入房间后通知拉取的数据(房间内主播全量列表、房间全量资源)
3697
3717
  */
3698
3718
  private _formatRTCRoomKVList;
3719
+ /**
3720
+ * 拉取聊天室 kv 存储时的最新时间戳
3721
+ */
3722
+ private _formatChrmKVVersion;
3699
3723
  /**
3700
3724
  * 格式化观众加房间后返回数据
3701
3725
  */
@@ -3944,6 +3968,10 @@ declare class DataCodec {
3944
3968
  * 结束连麦 PK
3945
3969
  */
3946
3970
  encodeEndRoomPK(options: IEndRoomPKOptions): any;
3971
+ /**
3972
+ * 设置聊天室关联的rtc房间
3973
+ */
3974
+ encodebindRTCRoomForChatroom(options: IRTCRoomBindOption): any;
3947
3975
  }
3948
3976
 
3949
3977
  interface IDataChannelWatcher {
@@ -4896,6 +4924,10 @@ declare class APIContext {
4896
4924
  * 结束连麦 PK
4897
4925
  */
4898
4926
  endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
4927
+ /**
4928
+ * SDK设置聊天室关联的rtc房间
4929
+ */
4930
+ bindRTCRoomForChatroom(option: IRTCRoomBindOption): Promise<ErrorCode>;
4899
4931
  }
4900
4932
 
4901
4933
  declare class PluginContext {
@@ -5762,6 +5794,7 @@ declare abstract class AEngine implements IEngine {
5762
5794
  abstract cancelRoomPK(options: ICancelRoomPKOptions): Promise<ErrorCode>;
5763
5795
  abstract responseRoomPK(options: IResRoomPKOptions): Promise<ErrorCode>;
5764
5796
  abstract endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
5797
+ abstract bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<ErrorCode>;
5765
5798
  }
5766
5799
 
5767
5800
  declare class AppStorage {
@@ -6234,4 +6267,4 @@ declare enum CONNECTION_TYPE {
6234
6267
  */
6235
6268
  declare const version: string;
6236
6269
 
6237
- 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 };
6270
+ 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 };