//#region src/shared/session.types.d.ts type DownloadItemState = "progressing" | "paused" | "completed" | "cancelled" | "interrupted"; interface DownloadItem { id: string; url: string; filename: string; totalBytes: number; receivedBytes: number; savePath: string; state: DownloadItemState; } interface SessionWillDownloadEventData { item: DownloadItem; sessionHash?: string; } interface SessionDownloadProgressData { id: string; receivedBytes: number; totalBytes: number; state: "progressing" | "paused"; sessionHash?: string; } interface SessionDownloadDoneData { id: string; state: "completed" | "cancelled" | "interrupted"; path: string; sessionHash?: string; } interface SessionClearStorageDataOptions { origin?: string; storages?: Array<"cookies" | "filesystem" | "indexdb" | "localstorage" | "shadercache" | "websql" | "serviceworkers" | "cachestorage">; quotas?: Array<"temporary" | "syncable">; } interface SessionClearDataOptions { dataTypes?: Array<"backgroundFetch" | "cache" | "cookies" | "downloads" | "fileSystems" | "indexedDB" | "localStorage" | "serviceWorkers" | "webSQL">; origins?: string[]; excludeOrigins?: string[]; avoidClosingConnections?: boolean; originMatchingMode?: "third-parties-included" | "origin-in-all-contexts"; } interface SessionSetUserAgentOptions { userAgent: string; acceptLanguages?: string; } declare namespace index_d_exports { export { clearCache, clearData, clearStorageData, downloadURL, getCacheSize, getSessionHash, getStoragePath, getUserAgent, isPersistent, item, onDownloadDone, onDownloadProgress, onWillDownload, setDownloadPath, setUserAgent }; } declare function setDownloadPath(path: string): Promise; declare function downloadURL(url: string): Promise; declare const item: { pause: (id: string) => Promise; resume: (id: string) => Promise; cancel: (id: string) => Promise; setSavePath: (id: string, path: string) => Promise; }; declare function onWillDownload(callback: (data: SessionWillDownloadEventData) => void, sessionHash?: string): () => void; declare function onDownloadProgress(callback: (data: SessionDownloadProgressData) => void, sessionHash?: string): () => void; declare function onDownloadDone(callback: (data: SessionDownloadDoneData) => void, sessionHash?: string): () => void; declare function getCacheSize(): Promise; declare function clearCache(): Promise; declare function clearStorageData(options?: SessionClearStorageDataOptions): Promise; declare function clearData(options?: SessionClearDataOptions): Promise; declare function getStoragePath(): Promise; declare function isPersistent(): Promise; declare function getUserAgent(): Promise; declare function setUserAgent(options: SessionSetUserAgentOptions): Promise; declare function getSessionHash(): Promise; //#endregion export { getCacheSize as a, getUserAgent as c, item as d, onDownloadDone as f, setUserAgent as g, setDownloadPath as h, downloadURL as i, index_d_exports as l, onWillDownload as m, clearData as n, getSessionHash as o, onDownloadProgress as p, clearStorageData as r, getStoragePath as s, clearCache as t, isPersistent as u }; //# sourceMappingURL=index-BVpQP2RB.d.mts.map