import type { paths } from '../generated/api.js';
import { WorkspaceScopedResource } from './base.js';
import type { ListParams } from '../core/utils.js';
export type ListPipelineSourcesParams = NonNullable<paths['/v1/{workspace_id}/pipeline/sources']['get']['parameters']['query']>;
/**
 * Pipeline — observability into the workspace's data ingestion pipeline:
 * source health, throughput, entity resolution metrics, review backlog,
 * outbound deliveries, and per-source overviews / event histories.
 *
 * @beta New in this release; surface may evolve.
 */
export declare class PipelineResource extends WorkspaceScopedResource {
    /** Overall pipeline status (sources up/down, last successful run, etc.) */
    getStatus(): Promise<{
        active_polls?: number | undefined;
        connector_runner_status: string;
        entity_resolution?: {
            [x: string]: unknown;
        } | null | undefined;
        event_read_model_status?: "ready" | "empty" | "unavailable" | undefined;
        event_read_model_synced_at?: string | null | undefined;
        gap_scanner?: {
            [x: string]: unknown;
        } | null | undefined;
        outbound_dispatch?: {
            [x: string]: unknown;
        } | null | undefined;
        outbound_subscriber?: {
            [x: string]: unknown;
        } | null | undefined;
        reconciliation?: {
            [x: string]: unknown;
        } | null | undefined;
        review_loop?: {
            [x: string]: unknown;
        } | null | undefined;
        sources?: {
            connection_healthy?: boolean | undefined;
            connector_type?: string | null | undefined;
            consecutive_errors?: number | undefined;
            data_source_id: string;
            last_error?: string | null | undefined;
            last_poll_at?: string | null | undefined;
            last_poll_duration_ms?: number | undefined;
            last_poll_event_count?: number | undefined;
            source_type: "rest_api" | "webhook" | "file_drop" | "fhir_store" | "ehr" | "database" | "custom" | "smart_fhir" | "customer_intake" | "lakebase_schema" | "crm";
            status: string;
            workspace_id: string;
        }[] | undefined;
        status: string;
        total_entities?: number | undefined;
        total_events?: number | null | undefined;
        uptime_seconds?: number | null | undefined;
    } & import("../index.js").ResponseMetadata>;
    /** Throughput buckets over the recent window */
    getThroughput(): Promise<{
        bucket: string;
        event_count: number;
        source_system?: string | null | undefined;
    }[] & import("../index.js").ResponseMetadata>;
    /** Review backlog metrics (pending merges, pending escalations) */
    getReview(): Promise<{
        approved_7d: number;
        avg_review_time_hours?: number | null | undefined;
        pending_by_priority: {
            [x: string]: number;
        };
        queue_depth: number;
        rejected_7d: number;
        total_items?: number | undefined;
    } & import("../index.js").ResponseMetadata>;
    /** Entity resolution metrics (merge rate, candidate rate, false-positive rate) */
    getEntityResolution(): Promise<{
        last_tick_at?: string | null | undefined;
        loop_status: string;
        recent_merges_24h: number;
        total_same_as_edges: number;
    } & import("../index.js").ResponseMetadata>;
    readonly outbound: {
        /** List recent outbound deliveries */
        list: () => Promise<{
            data_source_id: string;
            data_source_name: string;
            failed: number;
            last_synced_at?: string | null | undefined;
            pending: number;
            synced: number;
            total: number;
        }[] & import("../index.js").ResponseMetadata>;
        /** Get the delivery log for a specific outbound data source */
        getLog: (dataSourceId: string, params?: ListParams) => Promise<{
            continuation_token?: number | null | undefined;
            has_more: boolean;
            items: {
                attempt_count: number;
                created_at: string;
                event_id: string;
                id: string;
                sync_error?: string | null | undefined;
                synced_at?: string | null | undefined;
            }[];
            total?: number | null | undefined;
        } & import("../index.js").ResponseMetadata>;
    };
    readonly sources: {
        /** List all configured pipeline sources */
        list: (params?: ListPipelineSourcesParams) => Promise<{
            display_name?: string | null | undefined;
            event_count?: number | undefined;
            health_status: "unknown" | "healthy" | "degraded";
            id: string;
            is_active: boolean;
            last_poll?: {
                at?: string | null | undefined;
                duration_ms?: number | undefined;
                error?: string | null | undefined;
                event_count?: number | undefined;
            } | null | undefined;
            last_sync_at?: string | null | undefined;
            name: string;
            source_type: "rest_api" | "webhook" | "file_drop" | "fhir_store" | "ehr" | "database" | "custom" | "smart_fhir" | "customer_intake" | "lakebase_schema" | "crm";
        }[] & import("../index.js").ResponseMetadata>;
        /** Get a per-source overview (last sync, error counts, deltas) */
        getOverview: (sourceId: string) => Promise<{
            created_at?: string | null | undefined;
            display_name?: string | null | undefined;
            entity_count?: number | undefined;
            event_count?: number | undefined;
            health_status: "unknown" | "healthy" | "degraded";
            id: string;
            is_active: boolean;
            last_poll?: {
                at?: string | null | undefined;
                duration_ms?: number | undefined;
                error?: string | null | undefined;
                event_count?: number | undefined;
            } | null | undefined;
            last_sync_at?: string | null | undefined;
            last_sync_event_count?: number | undefined;
            last_sync_status?: ("success" | "error") | null | undefined;
            name: string;
            outbound?: {
                failed?: number | undefined;
                last_synced_at?: string | null | undefined;
                pending?: number | undefined;
                synced?: number | undefined;
                total?: number | undefined;
            } | undefined;
            recent_failures?: {
                event_id: string;
                event_type: string;
                fhir_resource_type?: string | null | undefined;
                ingested_at?: string | null | undefined;
                sync_error?: string | null | undefined;
            }[] | undefined;
            source_type: "rest_api" | "webhook" | "file_drop" | "fhir_store" | "ehr" | "database" | "custom" | "smart_fhir" | "customer_intake" | "lakebase_schema" | "crm";
        } & import("../index.js").ResponseMetadata>;
        /** Stream the source's recent events */
        listEvents: (sourceId: string, params?: ListParams) => Promise<{
            continuation_token?: number | null | undefined;
            has_more: boolean;
            items: {
                confidence: number;
                entity_id?: string | null | undefined;
                entity_type?: string | null | undefined;
                event_type: string;
                id: string;
                ingested_at: string;
                source: string;
                source_system?: string | null | undefined;
            }[];
            total?: number | null | undefined;
        } & import("../index.js").ResponseMetadata>;
        /** Per-source historical timeline */
        getHistory: (sourceId: string) => Promise<{
            bucket: string;
            event_count: number;
            source_system?: string | null | undefined;
        }[] & import("../index.js").ResponseMetadata>;
    };
}
//# sourceMappingURL=pipeline.d.ts.map