import { CloudStorageServiceInterface } from './CloudStorageServiceInterface'; import { NIMInitializeOptions, NIMOtherOptions } from './NIMInterface'; import { NIMServiceName } from './types'; import { NIMEInstanceStatus } from './types'; import { V2NIMConversationIdUtil, V2NIMConversationService } from './V2NIMConversationService'; import { V2NIMClientAntispamUtil, V2NIMMessageAttachmentCreator, V2NIMMessageConverter, V2NIMMessageCreator, V2NIMMessageService } from './V2NIMMessageService'; import { V2NIMNotificationService } from './V2NIMNotificationService'; import { V2NIMStorageService } from './V2NIMStorageService'; import { V2NIMLoginService } from './V2NIMLoginService'; import { V2NIMConversationGroupService } from './V2NIMConversationGroupService'; import { V2NIMTeamService } from './V2NIMTeamService'; import { V2NIMFriendService } from './V2NIMFriendService'; import { V2NIMSettingService } from './V2NIMSettingService'; import { V2NIMUserService } from './V2NIMUserService'; import { OfflinePushServiceInterface } from './OfflinePushInterface'; import { V2NIMAIService } from './V2NIMAIService'; import { V2NIMSignallingService } from './V2NIMSignallingService'; import { V2NIMSubscriptionService } from './V2NIMSubscriptionService'; import { V2NIMPassthroughService } from './V2NIMPassthroughService'; import { YSFService } from './YSFService'; import { V2NIMLocalConversationService } from './V2NIMLocalConversationService'; import { QChatServerServiceInterface } from './QChatServerServiceInterface'; import { QChatChannelServiceInterface } from './QChatChannelServiceInterface'; import { QChatMsgServiceInterface } from './QChatMsgServiceInterface'; import { QChatRoleServiceInterface } from './QChatRoleServiceInterface'; import { QChatMediaServiceInterface } from './QChatMediaServiceInterface'; export declare class V2NIM { /** * @deprecated * @Multi_Lang_Tag * @locale cn * 实例的状态 * @locale * * @locale en * The status of an instance * @locale */ status: NIMEInstanceStatus; /** * @deprecated * @Multi_Lang_Tag * @locale cn * 账号 * @locale * * @locale en * Account * @locale */ account: string; /** * @Multi_Lang_Tag * @locale cn * 连接参数 * @locale * * @locale en * Parameters of connections * @locale */ options: NIMInitializeOptions; /** * @deprecated * * v1 模块即将废弃, 请使用 v2 模块 V2NIMStorageService */ cloudStorage: CloudStorageServiceInterface; offlinePush: OfflinePushServiceInterface; /** ---------- 辅助工具类 ----------- */ V2NIMConversationIdUtil: V2NIMConversationIdUtil; V2NIMMessageCreator: V2NIMMessageCreator; V2NIMMessageAttachmentCreator: V2NIMMessageAttachmentCreator; V2NIMClientAntispamUtil: V2NIMClientAntispamUtil; V2NIMMessageConverter: V2NIMMessageConverter; /** ---------- 辅助工具类 end ----------- */ /** 通知类 */ V2NIMNotificationService: V2NIMNotificationService; V2NIMStorageService: V2NIMStorageService; /** ---------- 模块服务 ----------- */ V2NIMLoginService: V2NIMLoginService; V2NIMLocalConversationService: V2NIMLocalConversationService; V2NIMConversationService: V2NIMConversationService; V2NIMConversationGroupService: V2NIMConversationGroupService; V2NIMMessageService: V2NIMMessageService; V2NIMTeamService: V2NIMTeamService; V2NIMUserService: V2NIMUserService; V2NIMFriendService: V2NIMFriendService; V2NIMSettingService: V2NIMSettingService; V2NIMAIService: V2NIMAIService; V2NIMSignallingService: V2NIMSignallingService; V2NIMSubscriptionService: V2NIMSubscriptionService; V2NIMPassthroughService: V2NIMPassthroughService; YSFService: YSFService; qchatServer: QChatServerServiceInterface; qchatChannel: QChatChannelServiceInterface; qchatMsg: QChatMsgServiceInterface; qchatRole: QChatRoleServiceInterface; qchatMedia: QChatMediaServiceInterface; constructor(_options?: NIMInitializeOptions, _otherOptions?: NIMOtherOptions); /** * SDK 版本号-数字格式 */ static sdkVersion: number; /** * SDK 版本号-字符串格式 */ static sdkVersionFormat: string; /** * @Multi_Lang_Tag * @locale cn * 注册模块. 使用 dist/esm 产物时的 NIM 类专用 * @param _serviceClass 模块类 * @param _serviceName 标识的模块名 * @locale * * @locale en * Register a module in ESM for NIM class * @param _serviceClass module class * @param _serviceName Module name * @locale */ static registerService(_serviceClass: any, _serviceName: NIMServiceName): void; /** * @Multi_Lang_Tag * @locale cn * 注入宿主模块(插件)。SDK 不静态依赖这些库,由宿主自行决定安装版本。 * * 写法:`registerPlugin(NetInfo, 'netinfo')`——模块名必填,SDK 不做归属猜测; * 宿主模块与 SDK 内部插件共用同一套规则。已知模块名支持包名别名 * (`@react-native-community/netinfo` 会折算成 `netinfo`)。 * * 未注入 `netinfo` 时网络能力固定返回兜底值,不阻断初始化、登录与消息收发。 * * @param _plugin 模块实例 * @param _pluginName 模块名,不能为空字符串 * @locale * * @locale en * Register a host module (plugin). The SDK does not depend on these libraries statically, * so the host decides which version to install. * * Form: `registerPlugin(NetInfo, 'netinfo')` — the module name is required, the SDK never * guesses which capability a module provides. Host modules and internal plugins share the * same rules. Known names accept package aliases (e.g. `@react-native-community/netinfo`). * * When `netinfo` is not registered the network capability falls back to defaults without * blocking init, login or messaging. * * @param _plugin Module instance * @param _pluginName Module name, must not be an empty string * @locale */ static registerPlugin(_plugin: any, _pluginName: string): void; /** * @Multi_Lang_Tag * @locale cn * 单例模式获取实例 * @locale * * @locale en * Get a singleton instance * @locale */ static getInstance(_options?: NIMInitializeOptions, _otherOptions?: NIMOtherOptions): V2NIM; } export * as V2NIMConst from './V2NIMConst'; export default V2NIM;