@rongcloud/engine 5.18.0-alpha.2 → 5.18.0

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
@@ -3130,24 +3130,9 @@ declare enum PushImportanceHonor {
3130
3130
  LOW = "LOW"
3131
3131
  }
3132
3132
 
3133
- /**
3134
- * @deprecated 已废弃,请使用 {@link NotificationLevel}
3135
- * @category Enum
3136
- */
3137
- declare enum NotificationStatus {
3138
- /**
3139
- * 免打扰已开启
3140
- */
3141
- OPEN = 1,
3142
- /**
3143
- * 免打扰已关闭
3144
- */
3145
- CLOSE = 2
3146
- }
3147
-
3148
3133
  /**
3149
3134
  * 免打扰级别
3150
- * @desc 原: NotificationStatus 已废弃
3135
+ * @desc 原:NotificationStatus 已废弃
3151
3136
  * @category Enum
3152
3137
  */
3153
3138
  declare enum NotificationLevel {
@@ -3179,6 +3164,32 @@ declare enum NotificationLevel {
3179
3164
  */
3180
3165
  NOT_MESSAGE_NOTIFICATION = 5
3181
3166
  }
3167
+ /**
3168
+ * @deprecated 已废弃,请使用 {@link NotificationLevel}
3169
+ * @category Enum
3170
+ */
3171
+ declare enum NotificationStatus {
3172
+ /**
3173
+ * 免打扰已开启,对应 `NotificationLevel.AT_MESSAGE_NOTIFICATION`
3174
+ */
3175
+ OPEN = 1,
3176
+ /**
3177
+ * 免打扰已关闭,对应 `NotificationLevel.NOT_SET`
3178
+ */
3179
+ CLOSE = 2
3180
+ }
3181
+ /**
3182
+ * 转换 NotificationStatus 为 NotificationLevel
3183
+ * @param status
3184
+ * @returns
3185
+ */
3186
+ declare const transformNotificationStatus: (status: NotificationStatus) => NotificationLevel;
3187
+ /**
3188
+ * 转换 NotificationLevel 为 NotificationStatus
3189
+ * @param level
3190
+ * @returns
3191
+ */
3192
+ declare const transformNotificationLevel: (level: NotificationLevel) => NotificationStatus;
3182
3193
 
3183
3194
  /**
3184
3195
  * 消息接受状态
@@ -4463,15 +4474,6 @@ interface IPushConfig {
4463
4474
  */
4464
4475
  templateId?: string;
4465
4476
  }
4466
- /**
4467
- * 应用推送配置
4468
- */
4469
- interface IAppPushConfig {
4470
- /**
4471
- * 设备Id
4472
- */
4473
- deviceId: string;
4474
- }
4475
4477
 
4476
4478
  /**
4477
4479
  * 标签相关接口
@@ -4827,7 +4829,6 @@ interface ISetConversationStatusOptions {
4827
4829
  conversationType: ConversationType;
4828
4830
  targetId: string;
4829
4831
  isTop?: boolean;
4830
- notificationStatus?: number;
4831
4832
  notificationLevel?: number;
4832
4833
  channelId?: string;
4833
4834
  isUpdateTime?: boolean;
@@ -5106,7 +5107,6 @@ interface IServerConversationStatus {
5106
5107
  notificationStatus?: number;
5107
5108
  notificationLevel?: number;
5108
5109
  isTop?: boolean;
5109
- type?: number;
5110
5110
  tags?: IConversationTag[];
5111
5111
  channelId?: string;
5112
5112
  }
@@ -6490,11 +6490,9 @@ interface INaviInfo {
6490
6490
  addrs?: IStreamServerAddress[];
6491
6491
  };
6492
6492
  /**
6493
- * 推送服务器地址
6493
+ * 是否开启 baggage 功能
6494
6494
  */
6495
- active?: {
6496
- addrs: IStreamServerAddress[];
6497
- };
6495
+ baggageEnabled?: number;
6498
6496
  }
6499
6497
 
6500
6498
  /**
@@ -9074,20 +9072,11 @@ declare class PluginContext {
9074
9072
  * 用户连接建立之前及 disconnect 之后,该方法返回 '' 值
9075
9073
  */
9076
9074
  getCurrentId(): string;
9077
- /**
9078
- * 获取当前已连接用户的 token
9079
- */
9080
- getUserToken(): string;
9081
9075
  /**
9082
9076
  * 获取当前连接状态
9083
9077
  */
9084
9078
  getConnectionStatus(): RCConnectionStatus;
9085
9079
  getDeviceId(): string;
9086
- /**
9087
- * 设置推送配置 (uni app 平台使用)
9088
- * @param config 推送配置
9089
- */
9090
- setPushConfig(config: IAppPushConfig): void;
9091
9080
  /**
9092
9081
  * 发送消息
9093
9082
  */
@@ -9127,10 +9116,6 @@ declare class PluginContext {
9127
9116
  * @param type 目前仅支持 `IM` 与 `RTC` 两个值
9128
9117
  */
9129
9118
  createLogger(id: string, type: LogType): BasicLogger;
9130
- /**
9131
- * 获取统计地址
9132
- */
9133
- getStatsUrlList(): Promise<RCResult<string[]>>;
9134
9119
  }
9135
9120
 
9136
9121
  interface IPluginGenerator<API, InitOption> {
@@ -9550,11 +9535,6 @@ declare class APIContext {
9550
9535
  getConnectedTime(): number;
9551
9536
  getServerTime(): number;
9552
9537
  getDeviceId(): string;
9553
- /**
9554
- * 设置推送配置 (仅 Web 端支持)
9555
- * @param config 推送配置
9556
- */
9557
- setPushConfig(config: IAppPushConfig): void;
9558
9538
  getCurrentUserId(): string;
9559
9539
  getConnectionStatus(): RCConnectionStatus;
9560
9540
  /** 高阶函数,生成一个验证方法,验证是否处于连接中状态,并在连接状态可用时返回导航数据 */
@@ -9778,6 +9758,10 @@ declare class APIContext {
9778
9758
  */
9779
9759
  setConversationNotificationLevel(conversationType: ConversationType, targetId: string, notificationLevel?: NotificationLevel, channelId?: string): Promise<ErrorCode>;
9780
9760
  batchSetConversationNotificationLevel(conversations: IConversationOption[], notificationLevel: NotificationLevel): Promise<ErrorCode>;
9761
+ /**
9762
+ * @deprecated 同时设置置顶、免打扰状态,为兼容 v2/v4 使用,v5 后不再支持
9763
+ * @returns
9764
+ */
9781
9765
  setConversationStatus(conversationType: ConversationType, targetId: string, isTop?: boolean, notificationStatus?: 1 | 2, channelId?: string, isUpdateTime?: boolean): Promise<ErrorCode>;
9782
9766
  setConversationToTop(conversationType: ConversationType, targetId: string, isTop: boolean, channelId: string, isUpdateTime: boolean): Promise<ErrorCode>;
9783
9767
  batchSetConversationToTop(conversations: IConversationOption[], isTop: boolean, isCreateConversation?: boolean): Promise<ErrorCode>;
@@ -10371,10 +10355,6 @@ declare class APIContext {
10371
10355
  setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
10372
10356
  removeNotificationQuietHoursSetting(): Promise<RCResult>;
10373
10357
  getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
10374
- /**
10375
- * 获取统计地址
10376
- */
10377
- getStatsUrlList(): Promise<RCResult<string[]>>;
10378
10358
  }
10379
10359
 
10380
10360
  declare class RTCPluginContext extends PluginContext {
@@ -11054,11 +11034,6 @@ declare abstract class BasicEngine {
11054
11034
  * 获取设备ID
11055
11035
  */
11056
11036
  abstract getDeviceId(): string;
11057
- /**
11058
- * 设置推送配置
11059
- * @param config 推送配置
11060
- */
11061
- abstract setPushConfig(config: IAppPushConfig): void;
11062
11037
  /**
11063
11038
  * 获取当前 userId
11064
11039
  */
@@ -11509,10 +11484,6 @@ declare abstract class BasicEngine {
11509
11484
  abstract setNotificationQuietHoursWithSetting(opts: INotificationQuietHoursSetting): Promise<RCResult>;
11510
11485
  abstract removeNotificationQuietHoursSetting(): Promise<RCResult>;
11511
11486
  abstract getNotificationQuietHoursSetting(): Promise<RCResult<INotificationQuietHoursSetting>>;
11512
- /**
11513
- * 获取统计地址
11514
- */
11515
- abstract getStatsUrlList(): Promise<RCResult<string[]>>;
11516
11487
  }
11517
11488
 
11518
11489
  /**
@@ -11864,4 +11835,4 @@ declare class AppStorage {
11864
11835
  }): void;
11865
11836
  }
11866
11837
 
11867
- 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, transformReceivedStatusFlag, transformReceivedStatusInfo, usingCppEngine, validate };
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 };