/** * 平台适配器注册表 * 使用注册表模式管理所有平台适配器 */ import type { IPlatformAdapter, PlatformMeta, Article } from './interface.js'; import type { RuntimeInterface } from '../runtime/index.js'; type AdapterConstructor = new () => IPlatformAdapter; /** * 适配器注册表 */ declare class AdapterRegistry { private adapters; private runtime; setRuntime(runtime: RuntimeInterface): void; /** * 获取所有平台元信息 */ getAllMeta(): PlatformMeta[]; /** * 获取已登录的平台列表 */ getLoggedInPlatforms(): Promise; /** * 获取适配器实例 */ get(platformId: string): IPlatformAdapter | undefined; /** * 注册适配器 */ register(AdapterClass: AdapterConstructor): void; /** * 初始化所有适配器 */ initAll(): Promise; /** * 获取所有已注册的适配器 */ getAll(): Map; } export declare const adapterRegistry: AdapterRegistry; /** * 初始化适配器注册表 */ export declare function initAdapterRegistry(runtime: RuntimeInterface): Promise; /** * 获取适配器 */ export declare function getAdapter(platformId: string): IPlatformAdapter | undefined; /** * 获取所有已登录的平台 */ export declare function getLoggedInPlatforms(): Promise; /** * 发布到多个平台 */ export declare function publishToPlatforms(platformIds: string[], article: Article, onProgress?: (platform: string, result: import('./interface.js').SyncResult) => void): Promise; export {};