/**
 * `event_log` cold-store adapter (Orchestrator side) —.
 *
 *  §2 row 6
 * and §10.
 *
 * Contract:
 *   - tenant column: `routing_key` (NOT NULL on this side — no
 *     synthetic-tenant fallback like access_log / secret_audit_log)
 *   - partition column: `received_at`
 *   - warm TTL: 30 days (replaces the previous 30-day hard delete in
 *     `packages/orchestrator/src/webhook/event-log.ts:cleanup` +
 *     `packages/orchestrator/src/queue/cleanup.ts:runCleanup` step 4)
 *
 * Per-row payload retention: rows on this table carry a `payload_key`
 * pointing at a gzipped webhook body in object storage (LogStorage).
 * Cold-store packages the row metadata — including `payload_key` —
 * but does NOT touch the body the key points to. The body remains in
 * S3 indefinitely so the dashboard delivery-detail page resolves
 * payload reads identically for hot and cold rows. The pre-Phase-E
 * cleanup that deleted both the row and the payload blob in
 * lock-step is retired.
 *
 * Recursive write: archiving event_log rows writes one access_log
 * audit row per chunk (the orchestrator's audit surface). The new
 * access_log rows themselves get archived in a later cycle by the
 * AccessLogAdapter, bounded.
 */
import { type Kysely, type Selectable } from 'kysely';
import { type ChunkCommitMetadata, type ColdStoreTableConfig, type EligiblePartition, type TableAdapter } from '@kici-dev/shared';
import type { Database, EventLogTable } from '../../db/types.js';
export type EventLogColdStoreRow = Selectable<EventLogTable>;
export interface EventLogAdapterOptions {
    overrides?: Partial<ColdStoreTableConfig>;
}
export declare class EventLogAdapter implements TableAdapter<EventLogColdStoreRow> {
    private readonly kdb;
    private readonly instanceId;
    readonly db: "orchestrator";
    readonly table = "event_log";
    readonly tenantColumn = "routing_key";
    readonly partitionColumn = "received_at";
    readonly config: ColdStoreTableConfig;
    constructor(kdb: Kysely<Database>, instanceId: string, opts?: EventLogAdapterOptions);
    listEligiblePartitions(args: {
        warmCutoff: Date;
    }): AsyncIterable<EligiblePartition>;
    countTenantWarmBytes(args: {
        tenantId: string;
        warmCutoff: Date;
    }): Promise<number>;
    withPartitionLock<T>(args: {
        tenantId: string;
        partitionDate: string;
    }, fn: () => Promise<T>): Promise<T | null>;
    selectEligible(args: {
        tenantId: string;
        partitionDate: string;
        limit: number;
    }): AsyncIterable<EventLogColdStoreRow>;
    encodeRow(row: EventLogColdStoreRow): string;
    decodeRow(line: string): EventLogColdStoreRow;
    rowId(row: EventLogColdStoreRow): string | number;
    rowTimestamp(row: EventLogColdStoreRow): Date | string;
    markArchivedAndDelete(args: {
        rowIds: ReadonlyArray<string | number>;
        chunkMeta: ChunkCommitMetadata;
    }): Promise<void>;
}
//# sourceMappingURL=event-log.d.ts.map