@rongcloud/engine 5.0.1-custom-qihoo.3 → 5.0.2

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.0.1-custom-qihoo.3
3
- * CommitId - f511810a05b1ef295d16225d99189c244ea0fdfc
4
- * Wed Nov 24 2021 15:31:55 GMT+0800 (China Standard Time)
2
+ * RCEngine - v5.0.2
3
+ * CommitId - 2f7e168dbfa90aeb36ded32505fa5b07d1fde72f
4
+ * Thu Dec 30 2021 14:14:19 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  /**
@@ -738,12 +738,17 @@ interface IUserProfile {
738
738
  name?: string;
739
739
  /**
740
740
  * 用户头像地址
741
+ * @deprecated
741
742
  */
742
743
  portraitUri?: string;
743
744
  /**
744
745
  * user info 中附加信息
745
746
  */
746
747
  extra?: string;
748
+ /**
749
+ * 用户头像地址(向移动端兼容)
750
+ */
751
+ portrait?: string;
747
752
  }
748
753
  interface IRecallMsgOptions {
749
754
  /**
@@ -876,6 +881,10 @@ interface ISendMsgOptions {
876
881
  * 20 个字符长度限制
877
882
  */
878
883
  channelId?: string;
884
+ /**
885
+ * 客户端的消息标识
886
+ */
887
+ messageId?: string;
879
888
  }
880
889
  interface IInsertMsgOptions {
881
890
  senderUserId: string;
@@ -933,6 +942,7 @@ interface IBlockedMessageInfo {
933
942
  blockedMessageUId: string;
934
943
  conversationType: number;
935
944
  targetId: string;
945
+ channelId: string;
936
946
  blockType: MessageBlockType;
937
947
  }
938
948
 
@@ -1269,7 +1279,7 @@ declare enum ErrorCode {
1269
1279
  */
1270
1280
  EXPANSION_LIMIT_EXCEET = 34010,
1271
1281
  /**
1272
- * 消息不支持扩展 (错误码与移动端对齐)
1282
+ * 消息不支持扩展,原消息 canIncludeExpansion 值为 false (错误码与移动端对齐)
1273
1283
  */
1274
1284
  MESSAGE_KV_NOT_SUPPORT = 34008,
1275
1285
  CLEAR_HIS_TIME_ERROR = 34011,
@@ -2163,6 +2173,7 @@ interface IJoinRTCRoomData extends IRTCUsers {
2163
2173
  key: string;
2164
2174
  value: string;
2165
2175
  }[];
2176
+ kvEntries: IServerRTCRoomEntry[];
2166
2177
  }
2167
2178
  interface KVString {
2168
2179
  [key: string]: string;
@@ -2231,9 +2242,9 @@ interface IRequest {
2231
2242
  */
2232
2243
  timeout?: number;
2233
2244
  /**
2234
- * 返回数据类型,目前仅用于alipay
2245
+ * 期望返回的数据格式,如果为 json 则返回后会对返回的数据进行一次 JSON.parse, 在小程序平台需要
2235
2246
  */
2236
- dataType?: string;
2247
+ dataType?: 'json' | 'text' | 'base64' | 'arraybuffer';
2237
2248
  }
2238
2249
  interface IStorage {
2239
2250
  setItem(key: string, value: string): void;
@@ -3684,6 +3695,10 @@ declare class WebSocketChannel extends ADataChannel {
3684
3695
  * @param apiVersion - apiVersion 需符合 `/\d+(\.\d+){2}/` 规则
3685
3696
  */
3686
3697
  connect(appkey: string, token: string, hosts: string[], protocol: 'http' | 'https', apiVersion: string, protocolVer: ConnAckProtocolVer): Promise<ErrorCode>;
3698
+ /**
3699
+ * 发起连接请求
3700
+ */
3701
+ private _connect;
3687
3702
  /**
3688
3703
  * 当前累计心跳超时次数
3689
3704
  */
@@ -3733,6 +3748,7 @@ declare class CometChannel extends ADataChannel {
3733
3748
  * @returns
3734
3749
  */
3735
3750
  connect(appkey: string, token: string, hosts: string[], protocol: 'http' | 'https', apiVersion: string, protocolVer: ConnAckProtocolVer): Promise<ErrorCode>;
3751
+ private _connect;
3736
3752
  private _idCount;
3737
3753
  private _generateMessageId;
3738
3754
  sendCometData(writer: BaseWriter, timeout?: number): Promise<void>;
@@ -4078,6 +4094,10 @@ declare class APIContext {
4078
4094
  * 清除会话消息未读数
4079
4095
  */
4080
4096
  clearUnreadCount(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
4097
+ /**
4098
+ * 清除全部会话消息未读数
4099
+ */
4100
+ clearAllUnreadCount(): Promise<ErrorCode>;
4081
4101
  /**
4082
4102
  * 获取指定会话消息未读数
4083
4103
  */
@@ -4843,6 +4863,10 @@ declare abstract class AEngine implements IEngine {
4843
4863
  * 清除指定会话未读数
4844
4864
  */
4845
4865
  abstract clearConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
4866
+ /**
4867
+ * 清除全部会话未读数
4868
+ */
4869
+ abstract clearAllUnreadCount(): Promise<ErrorCode>;
4846
4870
  /**
4847
4871
  * 获取第一个未读消息
4848
4872
  */
@@ -5698,4 +5722,4 @@ declare enum CONNECTION_TYPE {
5698
5722
  */
5699
5723
  declare const version: string;
5700
5724
 
5701
- 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, IChatRoomEntries, IChatRoomEntry, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, 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, IRTCUsers, IReadReceiptInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRequest, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, 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, 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, cloneByJSON, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidFileType, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, todo, usingCppEngine, validate, version };
5725
+ 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, IChatRoomEntries, IChatRoomEntry, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, 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, IRTCUsers, IReadReceiptInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRequest, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, 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, cloneByJSON, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidFileType, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, todo, usingCppEngine, validate, version };