import { B2Client } from "./client"; import { SnapshotItem } from "./archive"; export interface FileListEntry { id: string; handle: string; path: string; type: string; controller_id?: string; override_params?: {}; created_at: string; updated_at: string; } export interface FileEntry { id?: string; handle?: string; override_params?: {}; path?: string; revision?: string; type: string; content: string; controller_id?: string; children?: FileEntry[]; created_at?: string; updated_at?: string; } export declare function getComponentStyleFile(f: FileEntry): FileEntry; export interface ComponentFileConfig { handle: string; path: string; override_params?: {}; template: string; style?: string; } export interface StyleFileConfig { handle: string; style: string; } export declare class B2FileType { static createComponentFile(config: ComponentFileConfig): FileEntry; static createStyleFile(config: StyleFileConfig): FileEntry; } export declare class B2File { readonly isRef: boolean; private c; private path; constructor(client: B2Client, entryPath: string, isRef?: boolean); listAll(): Promise; get(id: string): Promise; getByHandle(handle: string): Promise; create(file: FileEntry): Promise; update(file: FileEntry): Promise; delete(id: string): Promise; walk(fn: (file: FileEntry, index: number, total: number) => Promise): Promise; walkAndUpdate(fn: (file: FileEntry, index: number, total: number) => Promise): Promise; getSnapshot(): Promise; getSnapshotItems(items: SnapshotItem[]): Promise; }