import { CreateError } from "../errors"; import type { AuthTelemetryClient } from "./telemetry"; export declare const THESYS_KEYS_URL = "https://console.thesys.dev/keys"; export declare function assertValidApiKeyName(name: string): void; export type CloudAuthMethod = "oauth" | "manual" | "skip"; export declare function normalizeAuth(a?: string): CloudAuthMethod | undefined; /** How the cloud key was obtained (for telemetry) — auth method + the `--api-key` flag case. */ export type ResolvedAuthMethod = CloudAuthMethod | "apikey-flag"; type CloudAuthFailureStage = "method_resolution" | "manual_key_prompt" | "oidc_discovery" | "browser_auth" | "userinfo" | "organization" | "key_mint_request" | "key_mint_response"; export declare class CloudAuthError extends CreateError { constructor(authFailureStage: CloudAuthFailureStage, errorCode: string, message: string, httpStatus?: number); } /** Sign in via the browser and mint an OpenUI Cloud API key for the user's org. */ export declare function mintCloudApiKey(projectName: string, tel: AuthTelemetryClient): Promise; /** * Resolve a cloud API key by the chosen method: an explicitly provided key, a * browser OAuth mint, the deprecated manual paste, or skip (null → leave the * .env slot empty). */ export declare function resolveCloudApiKey(opts: { apiKey?: string; auth?: CloudAuthMethod; projectName: string; interactive: boolean; tel: AuthTelemetryClient; }): Promise<{ key: string | null; method: ResolvedAuthMethod; }>; export {}; //# sourceMappingURL=mint.d.ts.map