@rongcloud/engine 5.2.1-alpha.1 → 5.2.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.1
3
- * CommitId - c92d4d82612fce55930384270b7c9e99cba689a2
4
- * Mon Mar 07 2022 10:08:54 GMT+0800 (China Standard Time)
2
+ * RCEngine - v5.2.1
3
+ * CommitId - 5af4c20ffb161461319532f700e7603c9cd9893c
4
+ * Thu Mar 17 2022 15:09:51 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;
@@ -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
  */
@@ -3492,6 +3515,7 @@ interface IEngine {
3492
3515
  cancelRoomPK(options: ICancelRoomPKOptions): Promise<ErrorCode>;
3493
3516
  responseRoomPK(options: IResRoomPKOptions): Promise<ErrorCode>;
3494
3517
  endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
3518
+ bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<ErrorCode>;
3495
3519
  }
3496
3520
 
3497
3521
  interface IExpansionMsgContent {
@@ -3692,6 +3716,10 @@ declare class DataCodec {
3692
3716
  * 格式化 RTC 用户加入房间后通知拉取的数据(房间内主播全量列表、房间全量资源)
3693
3717
  */
3694
3718
  private _formatRTCRoomKVList;
3719
+ /**
3720
+ * 拉取聊天室 kv 存储时的最新时间戳
3721
+ */
3722
+ private _formatChrmKVVersion;
3695
3723
  /**
3696
3724
  * 格式化观众加房间后返回数据
3697
3725
  */
@@ -3940,6 +3968,10 @@ declare class DataCodec {
3940
3968
  * 结束连麦 PK
3941
3969
  */
3942
3970
  encodeEndRoomPK(options: IEndRoomPKOptions): any;
3971
+ /**
3972
+ * 设置聊天室关联的rtc房间
3973
+ */
3974
+ encodebindRTCRoomForChatroom(options: IRTCRoomBindOption): any;
3943
3975
  }
3944
3976
 
3945
3977
  interface IDataChannelWatcher {
@@ -4892,6 +4924,10 @@ declare class APIContext {
4892
4924
  * 结束连麦 PK
4893
4925
  */
4894
4926
  endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
4927
+ /**
4928
+ * SDK设置聊天室关联的rtc房间
4929
+ */
4930
+ bindRTCRoomForChatroom(option: IRTCRoomBindOption): Promise<ErrorCode>;
4895
4931
  }
4896
4932
 
4897
4933
  declare class PluginContext {
@@ -5758,6 +5794,7 @@ declare abstract class AEngine implements IEngine {
5758
5794
  abstract cancelRoomPK(options: ICancelRoomPKOptions): Promise<ErrorCode>;
5759
5795
  abstract responseRoomPK(options: IResRoomPKOptions): Promise<ErrorCode>;
5760
5796
  abstract endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
5797
+ abstract bindRTCRoomForChatroom(options: IRTCRoomBindOption): Promise<ErrorCode>;
5761
5798
  }
5762
5799
 
5763
5800
  declare class AppStorage {
@@ -6230,4 +6267,4 @@ declare enum CONNECTION_TYPE {
6230
6267
  */
6231
6268
  declare const version: string;
6232
6269
 
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 };
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 };