import { z } from "zod"; import type { ConnectAdvance, ConnectAttempt } from "@opengeni/contracts/connect"; import { type ConnectActorScope } from "@opengeni/db"; import type { ApiRouteDeps, PreparedConnectOperation } from "@opengeni/core"; declare const stateSchema: z.ZodObject<{ kind: z.ZodLiteral<"github_app_connect">; accountId: z.ZodString; workspaceId: z.ZodString; subjectId: z.ZodString; personalOwnerVerified: z.ZodBoolean; connectAttemptId: z.ZodString; phase: z.ZodEnum<{ bind: "bind"; discover: "discover"; install: "install"; }>; installationId: z.ZodOptional; providerId: z.ZodDefault>; nonce: z.ZodString; iat: z.ZodNumber; }, z.core.$strip>; type State = z.infer; export declare function isGitHubAppConnectState(deps: ApiRouteDeps, raw: string | undefined): boolean; type GitHubConnectScope = ConnectActorScope & { personalOwnerVerified?: boolean; providerId?: "github-app" | "github-lens"; }; export declare function githubAppConnectNavigation(deps: ApiRouteDeps, scope: GitHubConnectScope, attemptId: string, requestUrl: string, phase?: State["phase"], installationId?: number, providerId?: State["providerId"]): { authorizationUrl: string; expiresAt: string; }; export declare function prepareGitHubAppConnectAction(deps: ApiRouteDeps, scope: GitHubConnectScope, requestUrl: string, attempt: ConnectAttempt, action: ConnectAdvance): PreparedConnectOperation; /** No browser login/cookie required: signed attempt + current stored origin, * then fresh GitHub owner proof, are the two separate authority boundaries. */ export declare function completeGitHubAppConnect(deps: ApiRouteDeps, input: { state?: string | undefined; code?: string | undefined; installationId?: string | undefined; setupAction?: string | undefined; error?: string | undefined; requestUrl: string; expectedProvider?: "github-app" | "github-lens"; }): Promise; export {};