import type { CallOptions, RequestContext } from "../context.js"; import { type Outcome } from "../result.js"; import { DataApi } from "./dataapi.js"; import { Databases } from "./databases.js"; import { Endpoints } from "./endpoints.js"; import { Roles } from "./roles.js"; /** Parameters for {@link Postgres.connectionString}. */ export interface ConnectionStringParams { projectId: string; /** Defaults to the project's default branch. */ branchId?: string; /** Defaults to the branch's read-write endpoint. */ endpointId?: string; /** Auto-selected when the branch has exactly one database. */ databaseName?: string; /** Auto-selected when the branch has exactly one role. */ roleName?: string; /** Pooled connection string (default `true`). */ pooled?: boolean; } /** * The Postgres data plane of a branch: compute endpoints, roles, databases, the Data API, * and a connection-string helper. (Grouped under `neon.postgres.*` so future top-level * namespaces like `functions` / `storage` stay unambiguous.) */ export declare class Postgres { #private; readonly endpoints: Endpoints; readonly roles: Roles; readonly databases: Databases; readonly dataApi: DataApi; constructor(ctx: RequestContext); /** * Resolve a Postgres connection string. Auto-selects the default branch and the sole * role/database when not specified (mirrors `@neon/config`'s `fetchEnv`); returns * a {@link NeonClientError} when the selection is ambiguous. */ connectionString(params: ConnectionStringParams): Promise>; connectionString(params: ConnectionStringParams, opts: CallOptions): Promise>; } //# sourceMappingURL=postgres.d.ts.map