import type { PipelineResponse, PipelineStatusValue } from '../../sdk/pipeline/types'; export declare const PIPELINE_CONNECTIVITY_QUERY_KEY = "pipelineConnectivity"; export type ConnectionConnectivityState = 'connected' | 'warning' | 'error'; export type ConnectionValidationType = 'cdc' | 'general'; export interface ConnectionConnectivityResult { state: ConnectionConnectivityState; /** Kind of dry-run validation that produced the diagnostic. */ validationType?: ConnectionValidationType; /** First validation diagnostic message (when `state === 'warning'` or `'error'`). */ errorMessage?: string; /** First remediation hint, when the backend supplied one. */ errorRemediation?: string; } export interface PipelineConnectivityResult { /** * Source-side status that applies to any source the backend did not attribute * its validation errors to — the whole pipeline when nothing is attributed. */ source: ConnectionConnectivityResult; target: ConnectionConnectivityResult; /** * Per-source status, keyed by the name the backend reported in * `details.source` — only the sources it actually blamed appear. A source that * is absent falls back to `source`; see `pickSourceConnectivity`. */ sourcesByName: Record; } export declare const isBusyPipelineStatus: (status: PipelineStatusValue | undefined) => boolean; interface UsePipelineConnectivityQueryArgs { pipeline: PipelineResponse | undefined; } /** * Issues a one-shot `PUT /api/v2/pipelines/{name}?dry_run=true&validate_cdc=true` * that resends the existing pipeline configuration purely to trigger the * backend's CDC validation. `dry_run=true` ensures the backend validates without * persisting the config or causing any pipeline side effects. The result is * cached indefinitely so the dashboard runs the probe exactly once per mount * instead of polling. * * The probe is intentionally skipped while the pipeline is undergoing a * lifecycle transition (`creating`, `updating`, `starting`, …) — the dashboard * keeps the previous status in that case until the pipeline settles and the * query becomes enabled. * * Because the payload is the *whole* config, the backend validates every source * and stamps each failure with the source it belongs to. Those are grouped into * `sourcesByName` so a problem on one source does not mark the others as broken; * unattributed failures stay in `source` and apply to all of them. */ export declare const usePipelineConnectivityQuery: ({ pipeline }: UsePipelineConnectivityQueryArgs) => import("@tanstack/react-query").UseQueryResult; export {};