import type { SolidAuthSession } from '../pod-dialect'; export declare class PodRuntime { private session; private webId; private podUrl; private storageUrl; private storageResolvedAt; private connected; private wrappedFetch; private requestIdSupported; private explicitPodUrl; /** Storage 缓存过期时间,默认 5 分钟 */ private storageTTL; constructor(options: { session: SolidAuthSession; webId: string; podUrl?: string; storageTTL?: number; }); /** * 检测服务器是否允许 X-Request-ID header (通过 CORS preflight) * 使用原生 fetch 发送最干净的 OPTIONS 请求 */ private detectRequestIdSupport; /** * 创建包装的 fetch 函数,自动添加 X-Request-ID header */ private createWrappedFetch; getSession(): SolidAuthSession; /** * 获取 fetch 函数(如果服务器支持,会自动添加 X-Request-ID) */ getFetch(): typeof fetch; getWebId(): string; getPodUrl(): string; /** * 获取缓存的 storage URL (从 profile 的 pim:storage 读取) * 如果没有显式配置,返回 null */ getStorageUrl(): string | null; /** * 检查 storage 缓存是否过期 */ isStorageExpired(): boolean; /** * 获取 Pod URL,如果 storage 缓存过期则自动刷新 * 用于需要确保最新 storage 的场景 */ getPodUrlWithRefresh(): Promise; /** * 强制刷新 storage URL(从 profile 重新读取) * 用于 storage 配置变更后的场景 */ refreshStorage(): Promise; setPodUrl(url: string): void; isConnected(): boolean; connect(): Promise; disconnect(): Promise; } //# sourceMappingURL=pod-runtime.d.ts.map