@rongcloud/engine 4.5.0 → 4.5.4-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 - v4.5.0
3
- * CommitId - 6173fb54cb501bbee4d58e1141394bbe6918faa5
4
- * Fri Oct 22 2021 14:19:17 GMT+0800 (China Standard Time)
2
+ * RCEngine - v4.5.4-alpha.1
3
+ * CommitId - d1ef74bf72f4e0ee7c6b727b0c7358824c4c5d6e
4
+ * Thu Dec 23 2021 18:35:11 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  /**
@@ -365,6 +365,13 @@ interface IConversationOption {
365
365
  targetId: string;
366
366
  channelId?: string;
367
367
  }
368
+ interface IServerRTCRoomEntry {
369
+ key: string;
370
+ value: string;
371
+ status: number;
372
+ timestamp: number;
373
+ uid: string;
374
+ }
368
375
  interface IChrmKVEntry {
369
376
  key: string;
370
377
  value?: string;
@@ -432,13 +439,6 @@ interface IGetConversationListOption {
432
439
  interface IClearMsgOption {
433
440
  timestamp?: number;
434
441
  }
435
- interface IServerRTCRoomEntry {
436
- key: string;
437
- value: string;
438
- status: number;
439
- timestamp: number;
440
- uid: string;
441
- }
442
442
 
443
443
  /**
444
444
  * 聊天室 kv 存储操作类型. 对方操作, 己方收到消息(RC:chrmKVNotiMsg)中会带入此值. 根据此值判断是删除还是更新
@@ -558,12 +558,17 @@ interface IUserProfile {
558
558
  name?: string;
559
559
  /**
560
560
  * 用户头像地址
561
+ * @deprecated
561
562
  */
562
563
  portraitUri?: string;
563
564
  /**
564
565
  * user info 中附加信息
565
566
  */
566
567
  extra?: string;
568
+ /**
569
+ * 用户头像地址(向移动端兼容)
570
+ */
571
+ portrait?: string;
567
572
  }
568
573
  /**
569
574
  * 发送消息时的可选项信息
@@ -1733,6 +1738,10 @@ interface IRequest {
1733
1738
  * @default 10 * 1000 毫秒
1734
1739
  */
1735
1740
  timeout?: number;
1741
+ /**
1742
+ * 期望返回的数据格式,如果为 json 则返回后会对返回的数据进行一次 JSON.parse, 在小程序平台需要
1743
+ */
1744
+ dataType?: 'json' | 'text' | 'base64' | 'arraybuffer';
1736
1745
  }
1737
1746
  interface IStorage {
1738
1747
  setItem(key: string, value: string): void;
@@ -1852,6 +1861,10 @@ declare class WebSocketChannel extends ADataChannel {
1852
1861
  * @param apiVersion - apiVersion 需符合 `/\d+(\.\d+){2}/` 规则
1853
1862
  */
1854
1863
  connect(appkey: string, token: string, hosts: string[], protocol: 'http' | 'https', apiVersion: string, protocolVer: ConnAckProtocolVer): Promise<ErrorCode>;
1864
+ /**
1865
+ * 发起连接请求
1866
+ */
1867
+ private _connect;
1855
1868
  /**
1856
1869
  * 当前累计心跳超时次数
1857
1870
  */
@@ -1901,6 +1914,7 @@ declare class CometChannel extends ADataChannel {
1901
1914
  * @returns
1902
1915
  */
1903
1916
  connect(appkey: string, token: string, hosts: string[], protocol: 'http' | 'https', apiVersion: string, protocolVer: ConnAckProtocolVer): Promise<ErrorCode>;
1917
+ private _connect;
1904
1918
  private _idCount;
1905
1919
  private _generateMessageId;
1906
1920
  sendCometData(writer: BaseWriter, timeout?: number): Promise<void>;
@@ -2306,6 +2320,7 @@ interface IJoinRTCRoomData extends IRTCUsers {
2306
2320
  key: string;
2307
2321
  value: string;
2308
2322
  }[];
2323
+ kvEntries: IServerRTCRoomEntry[];
2309
2324
  }
2310
2325
 
2311
2326
  /**
@@ -2935,6 +2950,24 @@ declare enum LogType {
2935
2950
  RTC = "RTC"
2936
2951
  }
2937
2952
 
2953
+ /**
2954
+ * 消息被拦截类型
2955
+ */
2956
+ declare enum MessageBlockType {
2957
+ /*!
2958
+ 全局敏感词:命中了融云内置的全局敏感词
2959
+ */
2960
+ GLOBAL = 1,
2961
+ /*!
2962
+ 自定义敏感词拦截:命中了客户在融云自定义的敏感词
2963
+ */
2964
+ CUSTOM = 2,
2965
+ /*!
2966
+ 第三方审核拦截:命中了第三方(数美)或模板路由决定不下发的状态
2967
+ */
2968
+ THIRD_PARTY = 3
2969
+ }
2970
+
2938
2971
  /**
2939
2972
  * 导航信息数据就结构
2940
2973
  */
@@ -3186,24 +3219,6 @@ interface ITypingMessage {
3186
3219
  list: Array<ITypingUser>;
3187
3220
  }
3188
3221
 
3189
- /**
3190
- * 消息被拦截类型
3191
- */
3192
- declare enum MessageBlockType {
3193
- /*!
3194
- 全局敏感词:命中了融云内置的全局敏感词
3195
- */
3196
- GLOBAL = 1,
3197
- /*!
3198
- 自定义敏感词拦截:命中了客户在融云自定义的敏感词
3199
- */
3200
- CUSTOM = 2,
3201
- /*!
3202
- 第三方审核拦截:命中了第三方(数美)或模板路由决定不下发的状态
3203
- */
3204
- THIRD_PARTY = 3
3205
- }
3206
-
3207
3222
  /**
3208
3223
  * 被拦截的消息信息
3209
3224
  */
@@ -3211,6 +3226,7 @@ interface IBlockedMessageInfo {
3211
3226
  blockedMessageUId: string;
3212
3227
  conversationType: number;
3213
3228
  targetId: string;
3229
+ channelId: string;
3214
3230
  blockType: MessageBlockType;
3215
3231
  }
3216
3232
 
@@ -5594,4 +5610,4 @@ declare enum CONNECTION_TYPE {
5594
5610
  */
5595
5611
  declare const version: string;
5596
5612
 
5597
- 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, IBlockedMessageInfo, IChatroomEntries, IChatroomEntry, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IEngine, IEngineWatcher, 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, IMessageBlockedListener, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviInfo, IPluginGenerator, IPromiseResult, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomInfo, IRTCUsers, IReadReceiptInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntriesOption, IRemoveChatRoomEntryOption, 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 };
5613
+ 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, IBlockedMessageInfo, IChatroomEntries, IChatroomEntry, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IEngine, IEngineWatcher, 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, IMessageBlockedListener, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviInfo, IPluginGenerator, IPromiseResult, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomInfo, IRTCUsers, IReadReceiptInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntriesOption, IRemoveChatRoomEntryOption, 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 };