import { Permission } from "@opengeni/contracts"; import { type Database } from "./database.js"; /** Callback authority for a server-signed API-key principal. No bearer is stored * in OAuth state. Organization keys remain shared-workspace-only; workspace keys * remain bound to their original workspace. Hold the row lock through commit. */ export declare function lockConnectionSetupKey(db: Database, input: { accountId: string; workspaceId: string; subjectId: string; }): Promise; export declare function lockConnectionSetupKeyAuthority(db: Database, input: { accountId: string; workspaceId: string; subjectId: string; }): Promise<{ permissions: Permission[]; permissionMode: "legacy" | "explicit"; } | null>;