Skip to content

createNeonClient

createNeonClient(opts): object

Defined in: clients/neon-client/dist/index.d.mts:112

Creates a Neon API client with branches, connection, databases and users groups, all sharing one REST client.

NeonClientOptions

object

apiKeys: object

create: (keyName) => Promise<NeonApiKeyCreated>

string

Promise<NeonApiKeyCreated>

revoke: (keyId) => Promise<NeonApiKeyRevoked>

string

Promise<NeonApiKeyRevoked>

branches: object

create: (projectId, input) => Promise<NeonBranchResponse>

string

CreateNeonBranchInput

Promise<NeonBranchResponse>

destroy: (projectId, branchId) => Promise<void>

string

string

Promise<void>

list: (projectId) => Promise<NeonBranchesResponse>

string

Promise<NeonBranchesResponse>

restore: (projectId, branchId, sourceBranchId) => Promise<void>

string

string

string

Promise<void>

connection: object

uri: (projectId, params) => Promise<NeonConnectionUriResponse>

string

NeonConnectionUriParams

Promise<NeonConnectionUriResponse>

databases: object

list: (projectId, branchId) => Promise<NeonDatabasesResponse>

string

string

Promise<NeonDatabasesResponse>

runSql: (projectId, branchId, dbName, query) => Promise<void>

string

string

string

string

Promise<void>

users: object

me: () => Promise<NeonMe>

Promise<NeonMe>