@rongcloud/engine 5.20.0-c-esm-alpha.1 → 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.cjs +1 -1
- package/index.cjs.js +1 -1
- package/index.d.ts +68 -4
- package/index.esm.js +1 -2
- package/index.mjs +1 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4474,6 +4474,19 @@ interface IPushConfig {
|
|
|
4474
4474
|
*/
|
|
4475
4475
|
templateId?: string;
|
|
4476
4476
|
}
|
|
4477
|
+
/**
|
|
4478
|
+
* 应用推送配置
|
|
4479
|
+
*/
|
|
4480
|
+
interface IAppPushConfig {
|
|
4481
|
+
/**
|
|
4482
|
+
* 设备Id
|
|
4483
|
+
*/
|
|
4484
|
+
deviceId: string;
|
|
4485
|
+
/**
|
|
4486
|
+
* 包名
|
|
4487
|
+
*/
|
|
4488
|
+
packageName: string;
|
|
4489
|
+
}
|
|
4477
4490
|
|
|
4478
4491
|
/**
|
|
4479
4492
|
* 标签相关接口
|
|
@@ -6493,6 +6506,12 @@ interface INaviInfo {
|
|
|
6493
6506
|
* 是否开启 baggage 功能
|
|
6494
6507
|
*/
|
|
6495
6508
|
baggageEnabled?: number;
|
|
6509
|
+
/**
|
|
6510
|
+
* 推送服务器地址
|
|
6511
|
+
*/
|
|
6512
|
+
active?: {
|
|
6513
|
+
addrs: IStreamServerAddress[];
|
|
6514
|
+
};
|
|
6496
6515
|
}
|
|
6497
6516
|
|
|
6498
6517
|
/**
|
|
@@ -7504,7 +7523,7 @@ interface IEngine {
|
|
|
7504
7523
|
/**
|
|
7505
7524
|
* 断开连接
|
|
7506
7525
|
*/
|
|
7507
|
-
disconnect(closeDB?: boolean): void
|
|
7526
|
+
disconnect(closeDB?: boolean, disablePush?: boolean): Promise<void>;
|
|
7508
7527
|
/**
|
|
7509
7528
|
* 消息注册
|
|
7510
7529
|
* @description
|
|
@@ -8628,6 +8647,19 @@ interface IRuntime {
|
|
|
8628
8647
|
* 创建 EventSource 客户端建立 SSE 链路,用于拉取 AI 流式消息数据
|
|
8629
8648
|
*/
|
|
8630
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
|
+
};
|
|
8631
8663
|
}
|
|
8632
8664
|
|
|
8633
8665
|
declare const runtime: IRuntime;
|
|
@@ -9072,11 +9104,20 @@ declare class PluginContext {
|
|
|
9072
9104
|
* 用户连接建立之前及 disconnect 之后,该方法返回 '' 值
|
|
9073
9105
|
*/
|
|
9074
9106
|
getCurrentId(): string;
|
|
9107
|
+
/**
|
|
9108
|
+
* 获取当前已连接用户的 token
|
|
9109
|
+
*/
|
|
9110
|
+
getUserToken(): string;
|
|
9075
9111
|
/**
|
|
9076
9112
|
* 获取当前连接状态
|
|
9077
9113
|
*/
|
|
9078
9114
|
getConnectionStatus(): RCConnectionStatus;
|
|
9079
9115
|
getDeviceId(): string;
|
|
9116
|
+
/**
|
|
9117
|
+
* 设置推送配置 (uni app 平台使用)
|
|
9118
|
+
* @param config 推送配置
|
|
9119
|
+
*/
|
|
9120
|
+
setPushConfig(config: IAppPushConfig): void;
|
|
9080
9121
|
/**
|
|
9081
9122
|
* 发送消息
|
|
9082
9123
|
*/
|
|
@@ -9116,6 +9157,10 @@ declare class PluginContext {
|
|
|
9116
9157
|
* @param type 目前仅支持 `IM` 与 `RTC` 两个值
|
|
9117
9158
|
*/
|
|
9118
9159
|
createLogger(id: string, type: LogType): BasicLogger;
|
|
9160
|
+
/**
|
|
9161
|
+
* 获取统计地址
|
|
9162
|
+
*/
|
|
9163
|
+
getStatsUrlList(): Promise<RCResult<string[]>>;
|
|
9119
9164
|
}
|
|
9120
9165
|
|
|
9121
9166
|
interface IPluginGenerator<API, InitOption> {
|
|
@@ -9535,6 +9580,11 @@ declare class APIContext {
|
|
|
9535
9580
|
getConnectedTime(): number;
|
|
9536
9581
|
getServerTime(): number;
|
|
9537
9582
|
getDeviceId(): string;
|
|
9583
|
+
/**
|
|
9584
|
+
* 设置推送配置 (仅 Web 端支持)
|
|
9585
|
+
* @param config 推送配置
|
|
9586
|
+
*/
|
|
9587
|
+
setPushConfig(config: IAppPushConfig): void;
|
|
9538
9588
|
getCurrentUserId(): string;
|
|
9539
9589
|
getConnectionStatus(): RCConnectionStatus;
|
|
9540
9590
|
/** 高阶函数,生成一个验证方法,验证是否处于连接中状态,并在连接状态可用时返回导航数据 */
|
|
@@ -9555,7 +9605,7 @@ declare class APIContext {
|
|
|
9555
9605
|
设置 reconnectKickEnable 为 true 时,SDK 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。
|
|
9556
9606
|
*/
|
|
9557
9607
|
connect(token: string, reconnectKickEnable: boolean, traceId: string): Promise<IConnectResult>;
|
|
9558
|
-
disconnect(closeDB?: boolean): Promise<void>;
|
|
9608
|
+
disconnect(closeDB?: boolean, disablePush?: boolean): Promise<void>;
|
|
9559
9609
|
reconnect(reconnectKickEnable?: boolean): Promise<IConnectResult>;
|
|
9560
9610
|
private _getTokenWithoutNavi;
|
|
9561
9611
|
/**
|
|
@@ -10355,6 +10405,10 @@ declare class APIContext {
|
|
|
10355
10405
|
setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
|
|
10356
10406
|
removeNotificationQuietHoursSetting(): Promise<RCResult>;
|
|
10357
10407
|
getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
|
|
10408
|
+
/**
|
|
10409
|
+
* 获取统计地址
|
|
10410
|
+
*/
|
|
10411
|
+
getStatsUrlList(): Promise<RCResult<string[]>>;
|
|
10358
10412
|
}
|
|
10359
10413
|
|
|
10360
10414
|
declare class RTCPluginContext extends PluginContext {
|
|
@@ -10857,8 +10911,9 @@ declare abstract class BasicEngine {
|
|
|
10857
10911
|
/**
|
|
10858
10912
|
* 断开连接
|
|
10859
10913
|
* @param closeDB 是否关闭数据库,默认为 true,仅 Electron 平台有效
|
|
10914
|
+
* @param disablePush 是否禁用推送,默认为 false(≥ 5.20.0)
|
|
10860
10915
|
*/
|
|
10861
|
-
abstract disconnect(closeDB?: boolean): Promise<void>;
|
|
10916
|
+
abstract disconnect(closeDB?: boolean, disablePush?: boolean): Promise<void>;
|
|
10862
10917
|
/**
|
|
10863
10918
|
* 获取当前连接状态
|
|
10864
10919
|
*/
|
|
@@ -11034,6 +11089,11 @@ declare abstract class BasicEngine {
|
|
|
11034
11089
|
* 获取设备ID
|
|
11035
11090
|
*/
|
|
11036
11091
|
abstract getDeviceId(): string;
|
|
11092
|
+
/**
|
|
11093
|
+
* 设置推送配置
|
|
11094
|
+
* @param config 推送配置
|
|
11095
|
+
*/
|
|
11096
|
+
abstract setPushConfig(config: IAppPushConfig): void;
|
|
11037
11097
|
/**
|
|
11038
11098
|
* 获取当前 userId
|
|
11039
11099
|
*/
|
|
@@ -11484,6 +11544,10 @@ declare abstract class BasicEngine {
|
|
|
11484
11544
|
abstract setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
|
|
11485
11545
|
abstract removeNotificationQuietHoursSetting(): Promise<RCResult>;
|
|
11486
11546
|
abstract getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
|
|
11547
|
+
/**
|
|
11548
|
+
* 获取统计地址
|
|
11549
|
+
*/
|
|
11550
|
+
abstract getStatsUrlList(): Promise<RCResult<string[]>>;
|
|
11487
11551
|
}
|
|
11488
11552
|
|
|
11489
11553
|
/**
|
|
@@ -11835,4 +11899,4 @@ declare class AppStorage {
|
|
|
11835
11899
|
}): void;
|
|
11836
11900
|
}
|
|
11837
11901
|
|
|
11838
|
-
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 };
|