/**
 * Provenance Storage
 *
 * Storage interface and implementations for provenance records.
 * Includes in-memory storage for testing and PostgreSQL for production.
 *
 * @packageDocumentation
 */
import type { ProvenanceRecord, ProvenanceQueryFilters, PaginationOptions, PaginatedResult, Actor } from './types.js';
/**
 * Provenance records table schema
 */
export declare const provenanceRecords: import("drizzle-orm/pg-core").PgTableWithColumns<{
    name: "provenance_records";
    schema: undefined;
    columns: {
        id: import("drizzle-orm/pg-core").PgColumn<{
            name: "id";
            tableName: "provenance_records";
            dataType: "string";
            columnType: "PgUUID";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        entityId: import("drizzle-orm/pg-core").PgColumn<{
            name: "entity_id";
            tableName: "provenance_records";
            dataType: "string";
            columnType: "PgUUID";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        entityType: import("drizzle-orm/pg-core").PgColumn<{
            name: "entity_type";
            tableName: "provenance_records";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        action: import("drizzle-orm/pg-core").PgColumn<{
            name: "action";
            tableName: "provenance_records";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        data: import("drizzle-orm/pg-core").PgColumn<{
            name: "data";
            tableName: "provenance_records";
            dataType: "json";
            columnType: "PgJsonb";
            data: Record<string, unknown>;
            driverParam: unknown;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            $type: Record<string, unknown>;
        }>;
        actor: import("drizzle-orm/pg-core").PgColumn<{
            name: "actor";
            tableName: "provenance_records";
            dataType: "json";
            columnType: "PgJsonb";
            data: Actor;
            driverParam: unknown;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            $type: Actor;
        }>;
        hash: import("drizzle-orm/pg-core").PgColumn<{
            name: "hash";
            tableName: "provenance_records";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        previousHash: import("drizzle-orm/pg-core").PgColumn<{
            name: "previous_hash";
            tableName: "provenance_records";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        chainPosition: import("drizzle-orm/pg-core").PgColumn<{
            name: "chain_position";
            tableName: "provenance_records";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        tenantId: import("drizzle-orm/pg-core").PgColumn<{
            name: "tenant_id";
            tableName: "provenance_records";
            dataType: "string";
            columnType: "PgUUID";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        metadata: import("drizzle-orm/pg-core").PgColumn<{
            name: "metadata";
            tableName: "provenance_records";
            dataType: "json";
            columnType: "PgJsonb";
            data: Record<string, unknown>;
            driverParam: unknown;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            $type: Record<string, unknown>;
        }>;
        createdAt: import("drizzle-orm/pg-core").PgColumn<{
            name: "created_at";
            tableName: "provenance_records";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * Storage interface for provenance records
 */
export interface ProvenanceStorage {
    /**
     * Save a provenance record
     */
    save(record: ProvenanceRecord): Promise<ProvenanceRecord>;
    /**
     * Save multiple provenance records in batch
     */
    saveBatch(records: ProvenanceRecord[]): Promise<ProvenanceRecord[]>;
    /**
     * Get a provenance record by ID
     */
    getById(id: string, tenantId: string): Promise<ProvenanceRecord | null>;
    /**
     * Get provenance records by entity ID
     */
    getByEntityId(entityId: string, tenantId: string, options?: PaginationOptions): Promise<PaginatedResult<ProvenanceRecord>>;
    /**
     * Query provenance records with filters
     */
    query(filters: ProvenanceQueryFilters, options?: PaginationOptions): Promise<PaginatedResult<ProvenanceRecord>>;
    /**
     * Delete provenance records for an entity (for testing)
     */
    deleteByEntityId(entityId: string, tenantId: string): Promise<number>;
    /**
     * Clear all records (for testing)
     */
    clear(): Promise<void>;
}
/**
 * In-memory storage implementation for testing
 */
export declare class InMemoryProvenanceStorage implements ProvenanceStorage {
    private records;
    save(record: ProvenanceRecord): Promise<ProvenanceRecord>;
    saveBatch(records: ProvenanceRecord[]): Promise<ProvenanceRecord[]>;
    getById(id: string, tenantId: string): Promise<ProvenanceRecord | null>;
    getByEntityId(entityId: string, tenantId: string, options?: PaginationOptions): Promise<PaginatedResult<ProvenanceRecord>>;
    query(filters: ProvenanceQueryFilters, options?: PaginationOptions): Promise<PaginatedResult<ProvenanceRecord>>;
    deleteByEntityId(entityId: string, tenantId: string): Promise<number>;
    clear(): Promise<void>;
}
/**
 * PostgreSQL storage implementation for production
 */
export declare class PostgresProvenanceStorage implements ProvenanceStorage {
    save(record: ProvenanceRecord): Promise<ProvenanceRecord>;
    saveBatch(records: ProvenanceRecord[]): Promise<ProvenanceRecord[]>;
    getById(id: string, tenantId: string): Promise<ProvenanceRecord | null>;
    getByEntityId(entityId: string, tenantId: string, options?: PaginationOptions): Promise<PaginatedResult<ProvenanceRecord>>;
    query(filters: ProvenanceQueryFilters, options?: PaginationOptions): Promise<PaginatedResult<ProvenanceRecord>>;
    deleteByEntityId(entityId: string, tenantId: string): Promise<number>;
    clear(): Promise<void>;
    private rowToRecord;
}
/**
 * Create an in-memory storage instance (for testing)
 */
export declare function createInMemoryStorage(): InMemoryProvenanceStorage;
/**
 * Create a PostgreSQL storage instance (for production)
 */
export declare function createPostgresStorage(): PostgresProvenanceStorage;
//# sourceMappingURL=storage.d.ts.map