@rongcloud/engine 5.3.0 → 5.3.3

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/index.d.ts CHANGED
@@ -820,6 +820,10 @@ interface IRecallMsgOptions {
820
820
  * 其他拓展信息
821
821
  */
822
822
  extra?: string;
823
+ /**
824
+ * 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
825
+ */
826
+ isDelete?: boolean;
823
827
  }
824
828
  interface IRecallMsgContent {
825
829
  conversationType: number;
@@ -839,6 +843,10 @@ interface IRecallMsgContent {
839
843
  * 发送消息携带的用户信息
840
844
  */
841
845
  user?: IUserProfile;
846
+ /**
847
+ * 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
848
+ */
849
+ isDelete?: boolean;
842
850
  }
843
851
  /**
844
852
  * 发送消息时的可选项信息
@@ -1066,6 +1074,7 @@ interface IBlockedMessageInfo {
1066
1074
  targetId: string;
1067
1075
  channelId: string;
1068
1076
  blockType: MessageBlockType;
1077
+ extra: any;
1069
1078
  }
1070
1079
 
1071
1080
  /**
@@ -1646,7 +1655,7 @@ declare enum NotificationLevel {
1646
1655
  /**
1647
1656
  * @ 群全员通知
1648
1657
  */
1649
- AT_GROUP_ALL_USER_NOFICATION = 4,
1658
+ AT_GROUP_ALL_USER_NOTIFICATION = 4,
1650
1659
  /**
1651
1660
  * 消息通知被屏蔽,即不接收消息通知
1652
1661
  */
@@ -2379,6 +2388,7 @@ interface IJoinRTCRoomData extends IRTCUsers {
2379
2388
  value: string;
2380
2389
  }[];
2381
2390
  kvEntries: IServerRTCRoomEntry[];
2391
+ offlineKickTime: number;
2382
2392
  }
2383
2393
  interface KVString {
2384
2394
  [key: string]: string;
@@ -3101,6 +3111,7 @@ interface IEngine {
3101
3111
  * @param reconnectKickEnable
3102
3112
  */
3103
3113
  connect(token: string, naviInfo: INaviInfo, reconnectKickEnable?: boolean): Promise<ErrorCode>;
3114
+ requestNaviInfo(uris: string[], appkey: string, token: string, checkCA?: boolean): Promise<INaviInfo | null>;
3104
3115
  /**
3105
3116
  * 上报版本信息
3106
3117
  * @param version
@@ -5276,34 +5287,6 @@ declare class RTCPluginContext extends PluginContext {
5276
5287
  endRoomPK(options: IEndRoomPKOptions): Promise<ErrorCode>;
5277
5288
  }
5278
5289
 
5279
- declare abstract class ANavi {
5280
- protected readonly _runtime: IRuntime;
5281
- protected readonly _options: IAPIContextOption;
5282
- protected readonly _apiVersion: string;
5283
- protected readonly _appkey: string;
5284
- protected _naviInfo: INaviInfo | null;
5285
- constructor(_runtime: IRuntime, _options: IAPIContextOption);
5286
- /**
5287
- * @param uris
5288
- * @param appkey
5289
- * @param token
5290
- */
5291
- protected abstract _reqNavi(uris: string[], appkey: string, token: string, checkCA?: boolean): Promise<INaviInfo | null>;
5292
- /**
5293
- * 获取导航数据
5294
- * @param token
5295
- * @param dynamicUris token 携带的动态导航地址
5296
- * @param force 是否强制重新获取并清空缓存数据
5297
- */
5298
- getInfo(token: string, dynamicUris: string[], force: boolean, checkCA?: boolean): Promise<INaviInfo | null>;
5299
- protected setNaviInfo2Cache(token: string, naviInfo: INaviInfo): void;
5300
- getInfoFromCache(token: string): INaviInfo | null;
5301
- /**
5302
- * 清空导航数据:内存数据、缓存数据
5303
- */
5304
- private _clear;
5305
- }
5306
-
5307
5290
  interface IEngineWatcher {
5308
5291
  /**
5309
5292
  * @param message 消息
@@ -5335,23 +5318,33 @@ declare abstract class AEngine implements IEngine {
5335
5318
  readonly runtime: IRuntime;
5336
5319
  protected readonly _watcher: IEngineWatcher;
5337
5320
  protected readonly _options: IAPIContextOption;
5338
- /**
5339
- * 当前用户 Id
5340
- */
5341
- currentUserId: string;
5342
5321
  /**
5343
5322
  * 连接时间
5344
5323
  */
5345
5324
  abstract getConnectedTime(): number;
5346
- readonly navi: ANavi;
5347
5325
  protected readonly _appkey: string;
5348
5326
  protected readonly _apiVer: string;
5327
+ protected readonly _apiVersion: string;
5328
+ protected _naviInfo: INaviInfo | null;
5349
5329
  /**
5350
5330
  * 引擎初始化
5351
5331
  * @param _appkey
5352
5332
  */
5353
5333
  constructor(runtime: IRuntime, _watcher: IEngineWatcher, _options: IAPIContextOption);
5354
- protected abstract _createNavi(): ANavi;
5334
+ abstract requestNaviInfo(uris: string[], appkey: string, token: string, checkCA?: boolean): Promise<INaviInfo | null>;
5335
+ /**
5336
+ * 获取导航数据
5337
+ * @param token
5338
+ * @param dynamicUris token 携带的动态导航地址
5339
+ * @param force 是否强制重新获取并清空缓存数据
5340
+ */
5341
+ getNaviInfo(token: string, dynamicUris: string[], force: boolean, checkCA?: boolean): Promise<INaviInfo | null>;
5342
+ protected setNaviInfo2Cache(token: string, naviInfo: INaviInfo): void;
5343
+ getInfoFromCache(token: string): INaviInfo | null;
5344
+ /**
5345
+ * 清空导航数据:内存数据、缓存数据
5346
+ */
5347
+ private _clear;
5355
5348
  /**
5356
5349
  * 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
5357
5350
  * 对于未实现的方法,接口响应 Unsupport 错误码
@@ -6541,6 +6534,10 @@ declare const MAX_MESSAGE_CONTENT_BYTES: number;
6541
6534
  * IM Comet 发送 pullmsg(嗅探 + 等待信令) 超时时间 45s
6542
6535
  */
6543
6536
  declare const IM_COMET_PULLMSG_TIMEOUT = 45000;
6537
+ /**
6538
+ * IM 加入聊天室后定时拉取消息和 KV 时间间隔
6539
+ */
6540
+ declare const IM_CHATROOM_PULL_INTERVAL_TIME: number;
6544
6541
  /**
6545
6542
  * storage key 使用的前缀
6546
6543
  */
@@ -6586,4 +6583,4 @@ declare enum CONNECTION_TYPE {
6586
6583
  */
6587
6584
  declare const version: string;
6588
6585
 
6589
- 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, IIsValidExpansion, 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, IRecallMsgContent, 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, IUltraGroupOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogType, Logger, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MINI_COMET_CONNECT_URIS, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NetworkType, NotificationLevel, 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 };
6586
+ export { AEngine, 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, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, IM_CHATROOM_PULL_INTERVAL_TIME, 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, IRecallMsgContent, 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, IUltraGroupOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogType, Logger, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MINI_COMET_CONNECT_URIS, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NetworkType, NotificationLevel, 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 };