Circle V2 API Docs
    Preparing search index...
    get: QueryProcedure<
        {
            input: { id: string; type: "rpa" }
            | { id: string; type: "extend" };
            meta: object;
            output:
                | {
                    run: {
                        completed_at: string & { __brand: "DbDate" }
                        | null;
                        created_at: DbDate;
                        current_step: string | null;
                        document_count: number | null;
                        dry_run: boolean;
                        entity_id: number & { __brand: "EntityId" } | null;
                        external_run_id: string | null;
                        facility_id: string & { __brand: "FacilityId" } | null;
                        failure_reason: string | null;
                        id: RpaRunId;
                        integration_id: string & { __brand: "IntegrationId" } | null;
                        last_step_at: string & { __brand: "DbDate" } | null;
                        live_view_url: string | null;
                        patient_id: string & { __brand: "PatientId" } | null;
                        raw_payload: Record<string, unknown> | null;
                        started_at: string & { __brand: "DbDate" } | null;
                        status: "success" | "failed" | "pending" | "running" | "stopped";
                        step_history: { at: string; step: string }[] | null;
                        sync_type: string | null;
                        treatment_episode_id: string & { __brand: "TreatmentEpisodeId" } | null;
                        triggered_by: string & { __brand: "UserId" } | null;
                    };
                    type: "rpa";
                }
                | {
                    run: {
                        completed_at: string & { __brand: "DbDate" }
                        | null;
                        created_at: DbDate;
                        entity_id: number & { __brand: "EntityId" } | null;
                        external_run_id: string | null;
                        facility_id: string & { __brand: "FacilityId" } | null;
                        failure_reason: string | null;
                        file_name: string | null;
                        id: ExtendRunId;
                        integration_id: string & { __brand: "IntegrationId" } | null;
                        patient_chart_id: string & { __brand: "PatientChartId" } | null;
                        patient_id: string & { __brand: "PatientId" } | null;
                        raw_payload: Record<string, unknown> | null;
                        rpa_run_id: string & { __brand: "RpaRunId" } | null;
                        source: string | null;
                        status:
                            | "processing"
                            | "failed"
                            | "rejected"
                            | "needs_review"
                            | "pending"
                            | "completed";
                        treatment_episode_id: string & { __brand: "TreatmentEpisodeId" }
                        | null;
                        workflow_id: string | null;
                    };
                    type: "extend";
                };
        },
    > = ...

    Full detail (including the raw provider webhook payload) for a single run. Shape is discriminated by type so the client can render either provider.