/**
 * Read-through helper for `event_log` (Orchestrator) — Phase E.
 *
 * Mirrors the Platform-side `load-event-log-range.ts`. Tenant column is
 * `routing_key` (NOT NULL on this side) so cold-store partitioning
 * doesn't need a synthetic-tenant fallback. Partition column is
 * `received_at`.
 *
 * The orchestrator's `event_log` row carries the `payload_key` reference
 * (an S3 object that holds the gzipped webhook body). Cold-store
 * archives the row metadata and preserves `payload_key` verbatim — the
 * payload blob itself stays in object storage indefinitely so the
 * dashboard's payload-detail view continues to resolve archived
 * deliveries identically to hot ones.
 */
import { type Kysely, type Selectable } from 'kysely';
import { type ColdStore } from '@kici-dev/shared';
import type { Database, EventLogTable } from '../db/types.js';
export type EventLogColdStoreRow = Selectable<EventLogTable>;
export interface LoadOrchEventLogRangeArgs {
    db: Kysely<Database>;
    coldStore: ColdStore | undefined;
    /**
     * Routing key (tenant column on this side). Required when
     * `includeArchived` is true — cold-store fetch is keyed by tenant.
     * The hot list endpoint also typically narrows by routing_key.
     */
    routingKey: string;
    /** Optional org filter (event_log carries org_id for cross-tier joins). */
    orgId?: string;
    event?: string;
    action?: string;
    status?: string;
    deliveryId?: string;
    fromTs?: Date;
    toTs?: Date;
    limit: number;
    offset: number;
    includeArchived: boolean;
}
export declare function loadEventLogRange(args: LoadOrchEventLogRangeArgs): Promise<EventLogColdStoreRow[]>;
/**
 * Detail lookup by `(orgId, deliveryId)`. The dashboard handler joins
 * cross-tier on this composite key. Hot first; on miss scans cold for
 * the matching tenant. The caller must know `routingKey` to scope the
 * cold scan — when only `orgId+deliveryId` are known, callers fall
 * back to enumerating all routing keys for the org (rare; the dashboard
 * always knows the routing_key from the Platform-side row).
 */
export declare function loadEventLogByDeliveryId(args: {
    db: Kysely<Database>;
    coldStore: ColdStore | undefined;
    orgId: string;
    deliveryId: string;
    /**
     * Optional routing-key hint. When omitted, the cold scan iterates
     * every routing_key for the org — bounded but slower. The dashboard
     * always provides this hint from the Platform-side join.
     */
    routingKey?: string;
}): Promise<EventLogColdStoreRow | null>;
//# sourceMappingURL=load-event-log-range.d.ts.map