import type { Transport } from './transport'; export interface StartConnectArgs { readonly provider_id: string; readonly alias: string; readonly enabled_sub_services: string[]; readonly config_values?: Record; readonly return_url?: string; } export declare function connectorsClient(t: Transport): { listProviders: (signal?: AbortSignal) => Promise<{ providers: { id: string; display_name: string; description: string; icon_url: string; kind: "none" | "oauth"; origin: "system" | "community"; category: string; sub_services: { id: string; display_name: string; description: string; scopes: string[]; }[]; config_fields: { key: string; label: string; target: "env" | "header"; required: boolean; secret: boolean; }[]; }[]; categories: { id: string; display_name: string; sort_order: number; }[]; }>; listConnections: (signal?: AbortSignal) => Promise<{ items: { connection_id: string; provider_id: string; alias: string; kind: "none" | "oauth"; account_identity: string | null; enabled_sub_services: string[]; granted_scopes: string[]; unreachable_sub_services: string[]; auth_health_state: "healthy" | "reconnect_required" | "refresh_failing"; created_at: string; }[]; total: number; unhealthy?: number | undefined; }>; getConnection: (id: string, signal?: AbortSignal) => Promise<{ connection_id: string; provider_id: string; alias: string; kind: "none" | "oauth"; account_identity: string | null; enabled_sub_services: string[]; granted_scopes: string[]; unreachable_sub_services: string[]; auth_health_state: "healthy" | "reconnect_required" | "refresh_failing"; created_at: string; }>; startConnect: (args: StartConnectArgs) => Promise<{ flow_id: string; authorize_url: string; } | { connection_id: string; added_manifest_entries: string[]; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; } | null; }>; disconnect: (id: string) => Promise<{ connection_id: string; upstream_revoke_outcome: "success" | "failed" | "skipped"; upstream_revoke_status: number | null; removed_manifest_entries: string[]; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; } | null; }>; reconnect: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{ flow_id: string; authorize_url: string; }>; patchSubServices: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{ connection_id: string; enabled_sub_services: string[]; consent_required: boolean; flow_id: string | null; authorize_url: string | null; added_manifest_entries: string[]; removed_manifest_entries: string[]; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; } | null; }>; completeOAuth: (state: string, code: string, error?: string) => Promise<{ kind: "success"; connection_id: string; return_url: string; fanout: { mode: "local-only"; note: string; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "fleet"; } | { op: string; reachable: boolean; local_only: boolean; results: { name: string; outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out"; payload: unknown; error: string | null; detail: string | null; }[]; error: string | null; mode: "unreachable"; } | null; } | { kind: "failed"; reason: string; } | { kind: "cancelled"; message: string; }>; }; //# sourceMappingURL=connectors-client.d.ts.map