import { NeonApi } from "./neon-api.js"; //#region src/lib/auth.d.ts /** * Build a real {@link NeonApi} adapter from an explicit API key, or throw a uniform * `PLATFORM_MISSING_API_KEY` error when the caller didn't supply one. * * **This function is pure with respect to its environment**: it reads no environment * variables and no files. Everything it needs arrives in `options`. Resolving *where* a * credential comes from — a flag, `NEON_API_KEY`, a credentials file on disk — is the * caller's job, because only the caller knows which of those its users expect. See * `packages/cli` (`ensureAuth` + `resolveApiKeyFromEnv`) and its init flow * (`packages/cli/src/init/auth.ts`) for the two implementations in this repo. * * `apiHost` stays **optional** and defaults to production * (`https://console.neon.tech/api/v2`, applied by {@link createRealNeonApi}) — only pass it * to target a non-production API. It is the *ambient* `NEON_API_HOST` lookup that's gone, * not the default. * * Used by `pullConfig`, `pushConfig`, `fetchEnv`, and `branch` to build their default * adapter when the caller doesn't inject one. `operation` is the calling function's name * (e.g. `"pushConfig"`, `"branch"`) — it's prepended to the error message so users can tell * which call surfaced the missing key. */ declare function createNeonApiFromOptions(operation: string, options?: { apiKey?: string; apiHost?: string; }): NeonApi; //#endregion export { createNeonApiFromOptions }; //# sourceMappingURL=auth.d.ts.map