import { Session } from '../../skychat/Session.js'; export type FileType = 'video' | 'audio' | 'image' | 'subtitle' | 'unknown'; export type FolderContent = { exists: boolean; thumb?: string; folders: string[]; files: { name: string; type: FileType; }[]; }; export type PlayableFileInfo = { url: string; title: string; duration: number; }; export declare class Gallery { static readonly FOLDER_PATH_REGEX: RegExp; static readonly FILE_PATH_REGEX: RegExp; static readonly THUMB_FILE_NAMES: string[]; static readonly EXTENSION_FILE_TYPES: { [key: string]: FileType; }; static readonly DEFAULT_FILE_TYPE = "unknown"; static readonly BASE_PATH = "gallery/"; static ensureNoParentDirectoryAccess(path: string): void; static canRead(session: Session): boolean; static canWrite(session: Session): boolean; static canDelete(session: Session): boolean; static checkFolderPath(folderPath: string): void; static checkFilePath(filePath: string): void; static ls(folderPath: string): Promise; static rm(filePath: string): Promise; /** * Tells whether a file exists in the gallery */ static fileExists(filePath: string): Promise; /** * Ensure a file type exists and get its type */ static getFileType(filePath: string): Promise; /** * Tells whether a file exists in the gallery */ static getPlayableFileInfo(filePath: string): Promise; }