import type { Client } from "../client/client/index.js"; import { type NeonConfig } from "./config.js"; import { ApiKeys, Regions, User } from "./resources/account.js"; import { AiGateway } from "./resources/ai-gateway.js"; import { Auth } from "./resources/auth.js"; import { Branches } from "./resources/branches.js"; import { Consumption } from "./resources/consumption.js"; import { Credentials } from "./resources/credentials.js"; import { Functions } from "./resources/functions.js"; import { Logs } from "./resources/logs.js"; import { Operations } from "./resources/operations.js"; import { Postgres } from "./resources/postgres.js"; import { Projects } from "./resources/projects.js"; import { Realtime } from "./resources/realtime.js"; import { Snapshots } from "./resources/snapshots.js"; import { Storage } from "./resources/storage.js"; import { Triggers } from "./resources/triggers.js"; /** * The ergonomic Neon client. Resource namespaces wrap the raw operations with auth-once, * retries, the `{ data, error }` envelope, optional readiness polling, and typed errors. * Drop to the raw layer any time via `.client`. * * `projects` and `branches` are top-level; the Postgres data plane (compute endpoints, * roles, databases, the Data API, connection strings) is grouped under `postgres` so * future top-level namespaces (e.g. functions, object storage) stay unambiguous. * * `DThrow` defaults to `false`, matching `createNeonClient`. Use `NeonClient` for a * client created with `throwOnError: true`. */ export interface NeonClient { readonly projects: Projects; readonly branches: Branches; readonly postgres: Postgres; readonly storage: Storage; readonly functions: Functions; readonly triggers: Triggers; readonly credentials: Credentials; readonly aiGateway: AiGateway; readonly realtime: Realtime; readonly logs: Logs; readonly snapshots: Snapshots; readonly operations: Operations; readonly auth: Auth; readonly consumption: Consumption; readonly apiKeys: ApiKeys; readonly regions: Regions; readonly user: User; /** * The underlying configured raw client. Pass it to any raw function * (`import { raw } from "@neon/sdk"`) to reuse this client's auth + base URL. */ readonly client: Client; } /** * Create an ergonomic Neon client. * * @example * ```ts * import { createNeonClient } from "@neon/sdk"; * * const neon = createNeonClient({ apiKey: process.env.NEON_API_KEY! }); * const { data, error } = await neon.projects.list().all(); * ``` */ export declare function createNeonClient(config: NeonConfig): NeonClient; //# sourceMappingURL=client.d.ts.map