/** * @module runtime/types/storage-contract * @description Storage contract interface for pluggable manifest storage backends * * Allows Gati to use any storage implementation (in-memory, SQLite, PostgreSQL, etc.) * via the module system. */ import type { HandlerManifest, HookManifest, GType, Transformer, VersionGraph, TimescapeMetadata } from './manifest-store.js'; /** * Storage statistics */ export interface StorageStats { manifestCount: number; gtypeCount: number; transformerCount: number; versionGraphCount: number; timescapeMetadataCount: number; hookManifestCount: number; } /** * Storage Contract * * Interface that all storage backends must implement. * Provides persistence for manifests, GTypes, transformers, and metadata. */ export interface StorageContract { storeManifest(manifest: HandlerManifest): Promise; getManifest(id: string, version?: string): Promise; getAllManifestVersions(id: string): Promise; storeHookManifest(manifest: HookManifest): Promise; getHookManifest(handlerId: string): Promise; listHookManifests(): Promise; storeGType(gtype: GType): Promise; getGType(ref: string): Promise; storeTransformer(transformer: Transformer): Promise; getTransformer(id: string): Promise; getTransformersForVersions(handlerId: string, fromVersion: string, toVersion: string): Promise; storeVersionGraph(graph: VersionGraph): Promise; getVersionGraph(handlerId: string): Promise; storeTimescapeMetadata(metadata: TimescapeMetadata): Promise; getTimescapeMetadata(handlerId: string, version: string): Promise; clear(): Promise; getStats(): StorageStats; } //# sourceMappingURL=storage-contract.d.ts.map