export interface HttpConnectGrant { readonly grant_id: string; readonly principal_id?: string; readonly provider: string; readonly scopes: readonly string[]; readonly connection_id?: string; readonly status: "active" | "revoked"; readonly created_at?: string; } export interface HttpConnectListResponse { readonly grants: readonly HttpConnectGrant[]; } export interface HttpConnectRevokeResponse { readonly status: "revoked"; readonly grant: HttpConnectGrant; } export interface HttpConnectStartReadyResponse { readonly status: "created" | "unchanged"; readonly grant: HttpConnectGrant; } export interface HttpConnectStartOauthResponse { readonly status: "oauth_required"; readonly flow_id: string; readonly authorize_url: string; readonly poll_after_ms?: number; readonly expires_at?: string; } export interface HttpConnectFlowPendingResponse { readonly status: "pending"; readonly flow_id: string; readonly poll_after_ms?: number; } export interface HttpConnectFlowFailedResponse { readonly status: "failed"; readonly flow_id: string; readonly error: string; } export type HttpConnectStartResponse = HttpConnectStartReadyResponse | HttpConnectStartOauthResponse; export type HttpConnectFlowResponse = HttpConnectStartReadyResponse | HttpConnectFlowPendingResponse | HttpConnectFlowFailedResponse; export interface HttpConnectServiceOptions { readonly baseUrl: string; readonly accessToken: string; readonly fetchImpl?: typeof fetch; readonly openCommand?: string; readonly pollIntervalMs?: number; readonly timeoutMs?: number; readonly env?: NodeJS.ProcessEnv; } export declare function createHttpConnectService(options: HttpConnectServiceOptions): { readonly list: () => Promise; readonly preprovision: (provider: string, scopes: readonly string[]) => Promise; readonly revoke: (grantId: string) => Promise; };