@rongcloud/engine 5.20.0-c-ycsw-alpha.2 → 5.20.0-c-unikit.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/index.d.ts CHANGED
@@ -233,9 +233,7 @@ declare enum LogTagId {
233
233
  L_REQ_STREAM_MSG_CONTENT_T = "L-req_stream_msg_content-T",
234
234
  L_REQ_STREAM_MSG_CONTENT_R = "L-req_stream_msg_content-R",
235
235
  L_REQ_STREAM_MSG_CONTENT_O = "L-req_stream_msg_content-O",
236
- L_REQ_STREAM_MSG_CONTENT_E = "L-req_stream_msg_content-E",
237
- /** 事件循环阻塞告警 */
238
- L_EVENT_LOOP_BLOCKING_S = "L-event_loop_blocking-S"
236
+ L_REQ_STREAM_MSG_CONTENT_E = "L-req_stream_msg_content-E"
239
237
  }
240
238
 
241
239
  /**
@@ -4476,6 +4474,19 @@ interface IPushConfig {
4476
4474
  */
4477
4475
  templateId?: string;
4478
4476
  }
4477
+ /**
4478
+ * 应用推送配置
4479
+ */
4480
+ interface IAppPushConfig {
4481
+ /**
4482
+ * 设备Id
4483
+ */
4484
+ deviceId: string;
4485
+ /**
4486
+ * 包名
4487
+ */
4488
+ packageName: string;
4489
+ }
4479
4490
 
4480
4491
  /**
4481
4492
  * 标签相关接口
@@ -6495,6 +6506,12 @@ interface INaviInfo {
6495
6506
  * 是否开启 baggage 功能
6496
6507
  */
6497
6508
  baggageEnabled?: number;
6509
+ /**
6510
+ * 推送服务器地址
6511
+ */
6512
+ active?: {
6513
+ addrs: IStreamServerAddress[];
6514
+ };
6498
6515
  }
6499
6516
 
6500
6517
  /**
@@ -7506,7 +7523,7 @@ interface IEngine {
7506
7523
  /**
7507
7524
  * 断开连接
7508
7525
  */
7509
- disconnect(closeDB?: boolean): void;
7526
+ disconnect(closeDB?: boolean, disablePush?: boolean): Promise<void>;
7510
7527
  /**
7511
7528
  * 消息注册
7512
7529
  * @description
@@ -8630,6 +8647,19 @@ interface IRuntime {
8630
8647
  * 创建 EventSource 客户端建立 SSE 链路,用于拉取 AI 流式消息数据
8631
8648
  */
8632
8649
  createSSEClient(initOpts: ISSEClientInitOpts): RCResult<SSEClient>;
8650
+ /**
8651
+ * 获取 apiVer
8652
+ */
8653
+ getApiVer?: () => string;
8654
+ /**
8655
+ * 获取 runtime 信息
8656
+ */
8657
+ get runtimeInfo(): {
8658
+ /** 小程序平台为 runtime tag 数据,浏览器为浏览器品牌信息 */
8659
+ type: string;
8660
+ /** 浏览器版本,小程序平台始终为 Unknown */
8661
+ version: string;
8662
+ };
8633
8663
  }
8634
8664
 
8635
8665
  declare const runtime: IRuntime;
@@ -9074,11 +9104,20 @@ declare class PluginContext {
9074
9104
  * 用户连接建立之前及 disconnect 之后,该方法返回 '' 值
9075
9105
  */
9076
9106
  getCurrentId(): string;
9107
+ /**
9108
+ * 获取当前已连接用户的 token
9109
+ */
9110
+ getUserToken(): string;
9077
9111
  /**
9078
9112
  * 获取当前连接状态
9079
9113
  */
9080
9114
  getConnectionStatus(): RCConnectionStatus;
9081
9115
  getDeviceId(): string;
9116
+ /**
9117
+ * 设置推送配置 (uni app 平台使用)
9118
+ * @param config 推送配置
9119
+ */
9120
+ setPushConfig(config: IAppPushConfig): void;
9082
9121
  /**
9083
9122
  * 发送消息
9084
9123
  */
@@ -9118,6 +9157,10 @@ declare class PluginContext {
9118
9157
  * @param type 目前仅支持 `IM` 与 `RTC` 两个值
9119
9158
  */
9120
9159
  createLogger(id: string, type: LogType): BasicLogger;
9160
+ /**
9161
+ * 获取统计地址
9162
+ */
9163
+ getStatsUrlList(): Promise<RCResult<string[]>>;
9121
9164
  }
9122
9165
 
9123
9166
  interface IPluginGenerator<API, InitOption> {
@@ -9297,10 +9340,6 @@ interface IAPIContextOption {
9297
9340
  * 私有云环境配置
9298
9341
  */
9299
9342
  environment?: string;
9300
- /**
9301
- * 启动线程阻塞检查
9302
- */
9303
- eventLoopBlockingCheck?: boolean;
9304
9343
  }
9305
9344
  interface IConnectResult {
9306
9345
  /**
@@ -9541,6 +9580,11 @@ declare class APIContext {
9541
9580
  getConnectedTime(): number;
9542
9581
  getServerTime(): number;
9543
9582
  getDeviceId(): string;
9583
+ /**
9584
+ * 设置推送配置 (仅 Web 端支持)
9585
+ * @param config 推送配置
9586
+ */
9587
+ setPushConfig(config: IAppPushConfig): void;
9544
9588
  getCurrentUserId(): string;
9545
9589
  getConnectionStatus(): RCConnectionStatus;
9546
9590
  /** 高阶函数,生成一个验证方法,验证是否处于连接中状态,并在连接状态可用时返回导航数据 */
@@ -9561,7 +9605,7 @@ declare class APIContext {
9561
9605
  设置 reconnectKickEnable 为 true 时,SDK 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。
9562
9606
  */
9563
9607
  connect(token: string, reconnectKickEnable: boolean, traceId: string): Promise<IConnectResult>;
9564
- disconnect(closeDB?: boolean): Promise<void>;
9608
+ disconnect(closeDB?: boolean, disablePush?: boolean): Promise<void>;
9565
9609
  reconnect(reconnectKickEnable?: boolean): Promise<IConnectResult>;
9566
9610
  private _getTokenWithoutNavi;
9567
9611
  /**
@@ -10361,6 +10405,10 @@ declare class APIContext {
10361
10405
  setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
10362
10406
  removeNotificationQuietHoursSetting(): Promise<RCResult>;
10363
10407
  getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
10408
+ /**
10409
+ * 获取统计地址
10410
+ */
10411
+ getStatsUrlList(): Promise<RCResult<string[]>>;
10364
10412
  }
10365
10413
 
10366
10414
  declare class RTCPluginContext extends PluginContext {
@@ -10863,8 +10911,9 @@ declare abstract class BasicEngine {
10863
10911
  /**
10864
10912
  * 断开连接
10865
10913
  * @param closeDB 是否关闭数据库,默认为 true,仅 Electron 平台有效
10914
+ * @param disablePush 是否禁用推送,默认为 false(≥ 5.20.0)
10866
10915
  */
10867
- abstract disconnect(closeDB?: boolean): Promise<void>;
10916
+ abstract disconnect(closeDB?: boolean, disablePush?: boolean): Promise<void>;
10868
10917
  /**
10869
10918
  * 获取当前连接状态
10870
10919
  */
@@ -11040,6 +11089,11 @@ declare abstract class BasicEngine {
11040
11089
  * 获取设备ID
11041
11090
  */
11042
11091
  abstract getDeviceId(): string;
11092
+ /**
11093
+ * 设置推送配置
11094
+ * @param config 推送配置
11095
+ */
11096
+ abstract setPushConfig(config: IAppPushConfig): void;
11043
11097
  /**
11044
11098
  * 获取当前 userId
11045
11099
  */
@@ -11490,6 +11544,10 @@ declare abstract class BasicEngine {
11490
11544
  abstract setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
11491
11545
  abstract removeNotificationQuietHoursSetting(): Promise<RCResult>;
11492
11546
  abstract getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
11547
+ /**
11548
+ * 获取统计地址
11549
+ */
11550
+ abstract getStatsUrlList(): Promise<RCResult<string[]>>;
11493
11551
  }
11494
11552
 
11495
11553
  /**
@@ -11841,4 +11899,4 @@ declare class AppStorage {
11841
11899
  }): void;
11842
11900
  }
11843
11901
 
11844
- export { APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationType, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatModule, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomModule, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICombineV2MessageContent, ICombinedMessage, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, ICreateGroupFail, IDataHostingModule, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEngine, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IExtraMethod, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHarmonyOSPushConfig, IInsertMessage, IInsertMsgOptions, ILocalTagStatus, ILogData, ILogger, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRuntime, ISendMsgOptions, IServerConversationStatus, IServerGroupBaseInfo, IServerUserSetting, ISetConversationStatusOptions, IStorage, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IWatcher, IiOSPushConfig, InnerRTCKeyMaps, InterruptionLevel, ItypingStateListener, KVString, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_UPLOAD_FILE_SIZE, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, PlatformInfo, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, SSEModule, SentStatus, StreamMessageResponseEventType, SubscribeOperationType, SubscribeType, SuspendablePromise, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, Validator, ValidatorManage, VersionManage, assert, fail, fixUrlProtocol, forEach, getUUID, getUUID22, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversation, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidNotificationLevel, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, runtime, transformNotificationLevel, transformNotificationStatus, transformReceivedStatusFlag, transformReceivedStatusInfo, usingCppEngine, validate };
11902
+ export { APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BasicEngine, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationType, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAppPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatModule, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomModule, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICombineV2MessageContent, ICombinedMessage, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, ICreateGroupFail, IDataHostingModule, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEngine, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IExtraMethod, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHarmonyOSPushConfig, IInsertMessage, IInsertMsgOptions, ILocalTagStatus, ILogData, ILogger, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRuntime, ISendMsgOptions, IServerConversationStatus, IServerGroupBaseInfo, IServerUserSetting, ISetConversationStatusOptions, IStorage, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IWatcher, IiOSPushConfig, InnerRTCKeyMaps, InterruptionLevel, ItypingStateListener, KVString, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_UPLOAD_FILE_SIZE, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, PlatformInfo, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, SSEModule, SentStatus, StreamMessageResponseEventType, SubscribeOperationType, SubscribeType, SuspendablePromise, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, Validator, ValidatorManage, VersionManage, assert, fail, fixUrlProtocol, forEach, getUUID, getUUID22, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversation, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidNotificationLevel, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, runtime, transformNotificationLevel, transformNotificationStatus, transformReceivedStatusFlag, transformReceivedStatusInfo, usingCppEngine, validate };