import type { Result } from '@fgv/ts-utils'; /** * Namespace identifier for scoped storage. * @public */ export type StorageNamespace = string; /** * Storage item type. * @public */ export type StorageItemType = 'file' | 'directory'; /** * Storage tree item metadata. * @public */ export interface IStorageTreeItem { readonly path: string; readonly name: string; readonly type: StorageItemType; } /** * Response for listing children. * @public */ export interface IStorageTreeChildrenResponse { readonly path: string; readonly children: ReadonlyArray; } /** * Response for reading a file. * @public */ export interface IStorageFileResponse { readonly path: string; readonly contents: string; readonly contentType?: string; } /** * Request for path-based operations. * @public */ export interface IStoragePathRequest { readonly path: string; readonly namespace?: StorageNamespace; } /** * Request for writing file contents. * @public */ export interface IStorageWriteFileRequest extends IStoragePathRequest { readonly contents: string; readonly contentType?: string; } /** * Request for sync operation. * @public */ export interface IStorageSyncRequest { readonly namespace?: StorageNamespace; } /** * Sync response metadata. * @public */ export interface IStorageSyncResponse { readonly synced: number; } /** * Provider contract for storage backends. * All methods are async to support both filesystem and database backends. * @public */ export interface IHttpStorageProvider { getItem(path: string): Promise>; getChildren(path: string): Promise>>; getFile(path: string): Promise>; saveFile(path: string, contents: string, contentType?: string): Promise>; deleteFile(path: string): Promise>; createDirectory(path: string): Promise>; sync(): Promise>; } //# sourceMappingURL=model.d.ts.map