@neon/tools 0.0.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4709 @@
1
+ import { zAcceptProjectTransferRequestBody, zAcceptProjectTransferRequestPath, zAddBranchNeonAuthOauthProviderBody, zAddBranchNeonAuthOauthProviderPath, zAddBranchNeonAuthTrustedDomainBody, zAddBranchNeonAuthTrustedDomainPath, zAddNeonAuthDomainToRedirectUriWhitelistBody, zAddNeonAuthDomainToRedirectUriWhitelistPath, zAddNeonAuthOauthProviderBody, zAddNeonAuthOauthProviderPath, zAddProjectJwksBody, zAddProjectJwksPath, zAssignOrganizationVpcEndpointBody, zAssignOrganizationVpcEndpointPath, zAssignProjectVpcEndpointBody, zAssignProjectVpcEndpointPath, zCountProjectBranchesPath, zCountProjectBranchesQuery, zCreateApiKeyBody, zCreateBranchNeonAuthNewUserBody, zCreateBranchNeonAuthNewUserPath, zCreateCredentialBody, zCreateCredentialPath, zCreateNeonAuthBody, zCreateNeonAuthIntegrationBody, zCreateNeonAuthNewUserBody, zCreateNeonAuthPath, zCreateNeonAuthProviderSdkKeysBody, zCreateOrgApiKeyBody, zCreateOrgApiKeyPath, zCreateOrganizationInvitationsBody, zCreateOrganizationInvitationsPath, zCreateProjectBody, zCreateProjectBranchAnonymizedBody, zCreateProjectBranchAnonymizedPath, zCreateProjectBranchBody, zCreateProjectBranchBucketBody, zCreateProjectBranchBucketPath, zCreateProjectBranchDataApiBody, zCreateProjectBranchDataApiPath, zCreateProjectBranchDatabaseBody, zCreateProjectBranchDatabasePath, zCreateProjectBranchFunctionDeploymentBody, zCreateProjectBranchFunctionDeploymentPath, zCreateProjectBranchPath, zCreateProjectBranchRoleBody, zCreateProjectBranchRolePath, zCreateProjectEndpointBody, zCreateProjectEndpointPath, zCreateProjectTransferRequestBody, zCreateProjectTransferRequestPath, zCreateSnapshotPath, zCreateSnapshotQuery, zDeleteBranchNeonAuthOauthProviderPath, zDeleteBranchNeonAuthTrustedDomainBody, zDeleteBranchNeonAuthTrustedDomainPath, zDeleteBranchNeonAuthUserPath, zDeleteNeonAuthDomainFromRedirectUriWhitelistBody, zDeleteNeonAuthDomainFromRedirectUriWhitelistPath, zDeleteNeonAuthIntegrationBody, zDeleteNeonAuthIntegrationPath, zDeleteNeonAuthOauthProviderPath, zDeleteNeonAuthUserPath, zDeleteOrganizationSpendingLimitPath, zDeleteOrganizationVpcEndpointPath, zDeleteProjectBranchBucketObjectPath, zDeleteProjectBranchBucketObjectsByPrefixPath, zDeleteProjectBranchBucketObjectsByPrefixQuery, zDeleteProjectBranchBucketPath, zDeleteProjectBranchDataApiPath, zDeleteProjectBranchDatabasePath, zDeleteProjectBranchFunctionPath, zDeleteProjectBranchPath, zDeleteProjectBranchQuery, zDeleteProjectBranchRolePath, zDeleteProjectEndpointPath, zDeleteProjectJwksPath, zDeleteProjectPath, zDeleteProjectVpcEndpointPath, zDeleteSnapshotPath, zDisableNeonAuthBody, zDisableNeonAuthPath, zFinalizeRestoreBranchBody, zFinalizeRestoreBranchPath, zGetActiveRegionsQuery, zGetAnonymizedBranchStatusPath, zGetAvailablePreloadLibrariesPath, zGetConnectionUriPath, zGetConnectionUriQuery, zGetConsumptionHistoryPerBranchV2Query, zGetConsumptionHistoryPerProjectQuery, zGetConsumptionHistoryPerProjectV2Query, zGetMaskingRulesPath, zGetNeonAuthAllowLocalhostPath, zGetNeonAuthEmailAndPasswordConfigPath, zGetNeonAuthEmailProviderPath, zGetNeonAuthEmailServerPath, zGetNeonAuthPath, zGetNeonAuthPhoneNumberPluginPath, zGetNeonAuthPluginConfigsPath, zGetNeonAuthWebhookConfigPath, zGetOrganizationInvitationsPath, zGetOrganizationMemberPath, zGetOrganizationMembersPath, zGetOrganizationMembersQuery, zGetOrganizationPath, zGetOrganizationSpendingLimitPath, zGetOrganizationVpcEndpointDetailsPath, zGetProjectAdvisorSecurityIssuesPath, zGetProjectAdvisorSecurityIssuesQuery, zGetProjectBranchAiGatewayPath, zGetProjectBranchBucketObjectPath, zGetProjectBranchDataApiPath, zGetProjectBranchDatabasePath, zGetProjectBranchFunctionPath, zGetProjectBranchPath, zGetProjectBranchRolePasswordPath, zGetProjectBranchRolePath, zGetProjectBranchSchemaComparisonPath, zGetProjectBranchSchemaComparisonQuery, zGetProjectBranchSchemaPath, zGetProjectBranchSchemaQuery, zGetProjectBranchStoragePath, zGetProjectEndpointPath, zGetProjectJwksPath, zGetProjectOperationPath, zGetProjectPath, zGetSnapshotSchedulePath, zGrantPermissionToProjectBody, zGrantPermissionToProjectPath, zListBranchNeonAuthOauthProvidersPath, zListBranchNeonAuthTrustedDomainsPath, zListCredentialsPath, zListNeonAuthIntegrationsPath, zListNeonAuthOauthProvidersPath, zListNeonAuthRedirectUriWhitelistDomainsPath, zListOrgApiKeysPath, zListOrganizationVpcEndpointsAllRegionsPath, zListOrganizationVpcEndpointsPath, zListProjectBranchBucketObjectsPath, zListProjectBranchBucketObjectsQuery, zListProjectBranchBucketsPath, zListProjectBranchDatabasesPath, zListProjectBranchEndpointsPath, zListProjectBranchFunctionsPath, zListProjectBranchFunctionsQuery, zListProjectBranchLogFieldValuesPath, zListProjectBranchLogFieldValuesQuery, zListProjectBranchLogFieldsPath, zListProjectBranchRolesPath, zListProjectBranchesPath, zListProjectBranchesQuery, zListProjectEndpointsPath, zListProjectMembersPath, zListProjectMembersQuery, zListProjectOperationsPath, zListProjectOperationsQuery, zListProjectPermissionsPath, zListProjectVpcEndpointsPath, zListProjectsQuery, zListSharedProjectsQuery, zListSnapshotsPath, zPresignProjectBranchBucketObjectBody, zPresignProjectBranchBucketObjectPath, zQueryProjectBranchLogsBody, zQueryProjectBranchLogsPath, zRecoverProjectPath, zRemoveOrganizationMemberPath, zRemoveProjectMemberRolePath, zRemoveProjectMemberRoleQuery, zResetProjectBranchRolePasswordPath, zRestartProjectEndpointPath, zRestoreProjectBranchBody, zRestoreProjectBranchPath, zRestoreSnapshotBody, zRestoreSnapshotPath, zRestoreSnapshotQuery, zRevokeApiKeyPath, zRevokeCredentialPath, zRevokeOrgApiKeyPath, zRevokePermissionFromProjectPath, zSendNeonAuthTestEmailBody, zSendNeonAuthTestEmailPath, zSetDefaultProjectBranchPath, zSetOrganizationSpendingLimitBody, zSetOrganizationSpendingLimitPath, zSetProjectMemberRoleBody, zSetProjectMemberRolePath, zSetProjectMemberRoleQuery, zSetSnapshotScheduleBody, zSetSnapshotSchedulePath, zStartAnonymizationPath, zStartProjectEndpointPath, zSuspendProjectEndpointPath, zTransferNeonAuthProviderProjectBody, zTransferProjectsFromOrgToOrgBody, zTransferProjectsFromOrgToOrgPath, zTransferProjectsFromUserToOrgBody, zUpdateBranchNeonAuthOauthProviderBody, zUpdateBranchNeonAuthOauthProviderPath, zUpdateMaskingRulesBody, zUpdateMaskingRulesPath, zUpdateNeonAuthAllowLocalhostBody, zUpdateNeonAuthAllowLocalhostPath, zUpdateNeonAuthConfigBody, zUpdateNeonAuthConfigPath, zUpdateNeonAuthEmailAndPasswordConfigBody, zUpdateNeonAuthEmailAndPasswordConfigPath, zUpdateNeonAuthEmailProviderBody, zUpdateNeonAuthEmailProviderPath, zUpdateNeonAuthEmailServerBody, zUpdateNeonAuthEmailServerPath, zUpdateNeonAuthMagicLinkPluginBody, zUpdateNeonAuthMagicLinkPluginPath, zUpdateNeonAuthOauthProviderBody, zUpdateNeonAuthOauthProviderPath, zUpdateNeonAuthOrganizationPluginBody, zUpdateNeonAuthOrganizationPluginPath, zUpdateNeonAuthPhoneNumberPluginBody, zUpdateNeonAuthPhoneNumberPluginPath, zUpdateNeonAuthUserRoleBody, zUpdateNeonAuthUserRolePath, zUpdateNeonAuthWebhookConfigBody, zUpdateNeonAuthWebhookConfigPath, zUpdateOrganizationMemberBody, zUpdateOrganizationMemberPath, zUpdateProjectBody, zUpdateProjectBranchBody, zUpdateProjectBranchDataApiBody, zUpdateProjectBranchDataApiPath, zUpdateProjectBranchDatabaseBody, zUpdateProjectBranchDatabasePath, zUpdateProjectBranchFunctionBody, zUpdateProjectBranchFunctionPath, zUpdateProjectBranchPath, zUpdateProjectEndpointBody, zUpdateProjectEndpointPath, zUpdateProjectPath, zUpdateSnapshotBody, zUpdateSnapshotPath } from "./generated/zod.gen.js";
2
+ import { decodeBase64 } from "./lib/binary.js";
3
+ import { bindOperation, defineOperation } from "./lib/operation.js";
4
+ import * as z from "zod";
5
+ import * as raw from "@neon/sdk/raw";
6
+ //#region src/operations.gen.ts
7
+ const operationIds = [
8
+ "acceptProjectTransferRequest",
9
+ "addBranchNeonAuthOauthProvider",
10
+ "addBranchNeonAuthTrustedDomain",
11
+ "addNeonAuthDomainToRedirectURIWhitelist",
12
+ "addNeonAuthOauthProvider",
13
+ "addProjectJWKS",
14
+ "assignOrganizationVPCEndpoint",
15
+ "assignProjectVPCEndpoint",
16
+ "countProjectBranches",
17
+ "createApiKey",
18
+ "createBranchNeonAuthNewUser",
19
+ "createCredential",
20
+ "createNeonAuth",
21
+ "createNeonAuthIntegration",
22
+ "createNeonAuthNewUser",
23
+ "createNeonAuthProviderSDKKeys",
24
+ "createOrganizationInvitations",
25
+ "createOrgApiKey",
26
+ "createProject",
27
+ "createProjectBranch",
28
+ "createProjectBranchAnonymized",
29
+ "createProjectBranchBucket",
30
+ "createProjectBranchDataAPI",
31
+ "createProjectBranchDatabase",
32
+ "createProjectBranchFunctionDeployment",
33
+ "createProjectBranchRole",
34
+ "createProjectEndpoint",
35
+ "createProjectTransferRequest",
36
+ "createSnapshot",
37
+ "deleteBranchNeonAuthOauthProvider",
38
+ "deleteBranchNeonAuthTrustedDomain",
39
+ "deleteBranchNeonAuthUser",
40
+ "deleteNeonAuthDomainFromRedirectURIWhitelist",
41
+ "deleteNeonAuthIntegration",
42
+ "deleteNeonAuthOauthProvider",
43
+ "deleteNeonAuthUser",
44
+ "deleteOrganizationSpendingLimit",
45
+ "deleteOrganizationVPCEndpoint",
46
+ "deleteProject",
47
+ "deleteProjectBranch",
48
+ "deleteProjectBranchBucket",
49
+ "deleteProjectBranchBucketObject",
50
+ "deleteProjectBranchBucketObjectsByPrefix",
51
+ "deleteProjectBranchDataAPI",
52
+ "deleteProjectBranchDatabase",
53
+ "deleteProjectBranchFunction",
54
+ "deleteProjectBranchRole",
55
+ "deleteProjectEndpoint",
56
+ "deleteProjectJWKS",
57
+ "deleteProjectVPCEndpoint",
58
+ "deleteSnapshot",
59
+ "disableNeonAuth",
60
+ "finalizeRestoreBranch",
61
+ "getActiveRegions",
62
+ "getAnonymizedBranchStatus",
63
+ "getAuthDetails",
64
+ "getAvailablePreloadLibraries",
65
+ "getConnectionURI",
66
+ "getConsumptionHistoryPerBranchV2",
67
+ "getConsumptionHistoryPerProject",
68
+ "getConsumptionHistoryPerProjectV2",
69
+ "getCurrentUserInfo",
70
+ "getCurrentUserOrganizations",
71
+ "getMaskingRules",
72
+ "getNeonAuth",
73
+ "getNeonAuthAllowLocalhost",
74
+ "getNeonAuthEmailAndPasswordConfig",
75
+ "getNeonAuthEmailProvider",
76
+ "getNeonAuthEmailServer",
77
+ "getNeonAuthPhoneNumberPlugin",
78
+ "getNeonAuthPluginConfigs",
79
+ "getNeonAuthWebhookConfig",
80
+ "getOrganization",
81
+ "getOrganizationInvitations",
82
+ "getOrganizationMember",
83
+ "getOrganizationMembers",
84
+ "getOrganizationSpendingLimit",
85
+ "getOrganizationVPCEndpointDetails",
86
+ "getProject",
87
+ "getProjectAdvisorSecurityIssues",
88
+ "getProjectBranch",
89
+ "getProjectBranchAiGateway",
90
+ "getProjectBranchBucketObject",
91
+ "getProjectBranchDataAPI",
92
+ "getProjectBranchDatabase",
93
+ "getProjectBranchFunction",
94
+ "getProjectBranchRole",
95
+ "getProjectBranchRolePassword",
96
+ "getProjectBranchSchema",
97
+ "getProjectBranchSchemaComparison",
98
+ "getProjectBranchStorage",
99
+ "getProjectEndpoint",
100
+ "getProjectJWKS",
101
+ "getProjectOperation",
102
+ "getSnapshotSchedule",
103
+ "grantPermissionToProject",
104
+ "listApiKeys",
105
+ "listBranchNeonAuthOauthProviders",
106
+ "listBranchNeonAuthTrustedDomains",
107
+ "listCredentials",
108
+ "listNeonAuthIntegrations",
109
+ "listNeonAuthOauthProviders",
110
+ "listNeonAuthRedirectURIWhitelistDomains",
111
+ "listOrganizationVPCEndpoints",
112
+ "listOrganizationVPCEndpointsAllRegions",
113
+ "listOrgApiKeys",
114
+ "listProjectBranchBucketObjects",
115
+ "listProjectBranchBuckets",
116
+ "listProjectBranchDatabases",
117
+ "listProjectBranchEndpoints",
118
+ "listProjectBranches",
119
+ "listProjectBranchFunctions",
120
+ "listProjectBranchLogFields",
121
+ "listProjectBranchLogFieldValues",
122
+ "listProjectBranchRoles",
123
+ "listProjectEndpoints",
124
+ "listProjectMembers",
125
+ "listProjectOperations",
126
+ "listProjectPermissions",
127
+ "listProjects",
128
+ "listProjectVPCEndpoints",
129
+ "listSharedProjects",
130
+ "listSnapshots",
131
+ "presignProjectBranchBucketObject",
132
+ "queryProjectBranchLogs",
133
+ "recoverProject",
134
+ "removeOrganizationMember",
135
+ "removeProjectMemberRole",
136
+ "resetProjectBranchRolePassword",
137
+ "restartProjectEndpoint",
138
+ "restoreProjectBranch",
139
+ "restoreSnapshot",
140
+ "revokeApiKey",
141
+ "revokeCredential",
142
+ "revokeOrgApiKey",
143
+ "revokePermissionFromProject",
144
+ "sendNeonAuthTestEmail",
145
+ "setDefaultProjectBranch",
146
+ "setOrganizationSpendingLimit",
147
+ "setProjectMemberRole",
148
+ "setSnapshotSchedule",
149
+ "startAnonymization",
150
+ "startProjectEndpoint",
151
+ "suspendProjectEndpoint",
152
+ "transferNeonAuthProviderProject",
153
+ "transferProjectsFromOrgToOrg",
154
+ "transferProjectsFromUserToOrg",
155
+ "updateBranchNeonAuthOauthProvider",
156
+ "updateMaskingRules",
157
+ "updateNeonAuthAllowLocalhost",
158
+ "updateNeonAuthConfig",
159
+ "updateNeonAuthEmailAndPasswordConfig",
160
+ "updateNeonAuthEmailProvider",
161
+ "updateNeonAuthEmailServer",
162
+ "updateNeonAuthMagicLinkPlugin",
163
+ "updateNeonAuthOauthProvider",
164
+ "updateNeonAuthOrganizationPlugin",
165
+ "updateNeonAuthPhoneNumberPlugin",
166
+ "updateNeonAuthUserRole",
167
+ "updateNeonAuthWebhookConfig",
168
+ "updateOrganizationMember",
169
+ "updateProject",
170
+ "updateProjectBranch",
171
+ "updateProjectBranchDataAPI",
172
+ "updateProjectBranchDatabase",
173
+ "updateProjectBranchFunction",
174
+ "updateProjectEndpoint",
175
+ "updateSnapshot"
176
+ ];
177
+ const operationFactories = {
178
+ "acceptProjectTransferRequest": (client) => bindOperation(defineOperation({
179
+ operationId: "acceptProjectTransferRequest",
180
+ id: "accept_project_transfer_request",
181
+ title: "Accept a project transfer request",
182
+ description: "Accepts a transfer request for the specified project, transferring it to the specified organization\nor user. If org_id is not passed, the project will be transferred to the current user or organization account.\n",
183
+ inputSchema: z.strictObject({
184
+ body: zAcceptProjectTransferRequestBody.optional(),
185
+ path: zAcceptProjectTransferRequestPath
186
+ }),
187
+ annotations: {
188
+ readOnlyHint: false,
189
+ destructiveHint: true,
190
+ openWorldHint: true
191
+ },
192
+ requiresApproval: true,
193
+ metadata: {
194
+ method: "PUT",
195
+ path: "/projects/{project_id}/transfer_requests/{request_id}",
196
+ stability: "stable",
197
+ deprecated: false,
198
+ tags: ["Project"]
199
+ },
200
+ invoke: (client, input, signal) => raw.acceptProjectTransferRequest({
201
+ ...input,
202
+ client,
203
+ signal,
204
+ throwOnError: true
205
+ })
206
+ }), client),
207
+ "addBranchNeonAuthOauthProvider": (client) => bindOperation(defineOperation({
208
+ operationId: "addBranchNeonAuthOauthProvider",
209
+ id: "add_branch_neon_auth_oauth_provider",
210
+ title: "Add an OAuth provider",
211
+ description: "Adds an OAuth provider configuration to the specified branch's Neon Auth integration.\nAfter adding, users can authenticate using the configured provider.\n",
212
+ inputSchema: z.strictObject({
213
+ body: zAddBranchNeonAuthOauthProviderBody,
214
+ path: zAddBranchNeonAuthOauthProviderPath
215
+ }),
216
+ annotations: {
217
+ readOnlyHint: false,
218
+ destructiveHint: true,
219
+ openWorldHint: true
220
+ },
221
+ requiresApproval: true,
222
+ metadata: {
223
+ method: "POST",
224
+ path: "/projects/{project_id}/branches/{branch_id}/auth/oauth_providers",
225
+ stability: "beta",
226
+ deprecated: false,
227
+ tags: ["Auth"]
228
+ },
229
+ invoke: (client, input, signal) => raw.addBranchNeonAuthOauthProvider({
230
+ ...input,
231
+ client,
232
+ signal,
233
+ throwOnError: true
234
+ })
235
+ }), client),
236
+ "addBranchNeonAuthTrustedDomain": (client) => bindOperation(defineOperation({
237
+ operationId: "addBranchNeonAuthTrustedDomain",
238
+ id: "add_branch_neon_auth_trusted_domain",
239
+ title: "Add domain to redirect_uri whitelist",
240
+ description: "Adds a domain to the redirect URI whitelist for the specified branch.\nOnly domains in this list are permitted as redirect targets after authentication.\n",
241
+ inputSchema: z.strictObject({
242
+ body: zAddBranchNeonAuthTrustedDomainBody,
243
+ path: zAddBranchNeonAuthTrustedDomainPath
244
+ }),
245
+ annotations: {
246
+ readOnlyHint: false,
247
+ destructiveHint: true,
248
+ openWorldHint: true
249
+ },
250
+ requiresApproval: true,
251
+ metadata: {
252
+ method: "POST",
253
+ path: "/projects/{project_id}/branches/{branch_id}/auth/domains",
254
+ stability: "beta",
255
+ deprecated: false,
256
+ tags: ["Auth"]
257
+ },
258
+ invoke: (client, input, signal) => raw.addBranchNeonAuthTrustedDomain({
259
+ ...input,
260
+ client,
261
+ signal,
262
+ throwOnError: true
263
+ })
264
+ }), client),
265
+ "addNeonAuthDomainToRedirectURIWhitelist": (client) => bindOperation(defineOperation({
266
+ operationId: "addNeonAuthDomainToRedirectURIWhitelist",
267
+ id: "add_neon_auth_domain_to_redirect_uri_whitelist",
268
+ title: "Add trusted redirect URI domain",
269
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Removal scheduled for March 1, 2026.\n",
270
+ inputSchema: z.strictObject({
271
+ body: zAddNeonAuthDomainToRedirectUriWhitelistBody,
272
+ path: zAddNeonAuthDomainToRedirectUriWhitelistPath
273
+ }),
274
+ annotations: {
275
+ readOnlyHint: false,
276
+ destructiveHint: true,
277
+ openWorldHint: true
278
+ },
279
+ requiresApproval: true,
280
+ metadata: {
281
+ method: "POST",
282
+ path: "/projects/{project_id}/auth/domains",
283
+ stability: "stable",
284
+ deprecated: true,
285
+ tags: ["Auth (legacy)"]
286
+ },
287
+ invoke: (client, input, signal) => raw.addNeonAuthDomainToRedirectUriWhitelist({
288
+ ...input,
289
+ client,
290
+ signal,
291
+ throwOnError: true
292
+ })
293
+ }), client),
294
+ "addNeonAuthOauthProvider": (client) => bindOperation(defineOperation({
295
+ operationId: "addNeonAuthOauthProvider",
296
+ id: "add_neon_auth_oauth_provider",
297
+ title: "Add an OAuth provider",
298
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers` instead. Removal scheduled for March 1, 2026.\n",
299
+ inputSchema: z.strictObject({
300
+ body: zAddNeonAuthOauthProviderBody,
301
+ path: zAddNeonAuthOauthProviderPath
302
+ }),
303
+ annotations: {
304
+ readOnlyHint: false,
305
+ destructiveHint: true,
306
+ openWorldHint: true
307
+ },
308
+ requiresApproval: true,
309
+ metadata: {
310
+ method: "POST",
311
+ path: "/projects/{project_id}/auth/oauth_providers",
312
+ stability: "stable",
313
+ deprecated: true,
314
+ tags: ["Auth (legacy)"]
315
+ },
316
+ invoke: (client, input, signal) => raw.addNeonAuthOauthProvider({
317
+ ...input,
318
+ client,
319
+ signal,
320
+ throwOnError: true
321
+ })
322
+ }), client),
323
+ "addProjectJWKS": (client) => bindOperation(defineOperation({
324
+ operationId: "addProjectJWKS",
325
+ id: "add_project_jwks",
326
+ title: "Add JWKS URL",
327
+ description: "Adds a JWKS URL to the specified project for verifying JWTs used as the authentication mechanism.\n\nThe URL must be a valid HTTPS URL that returns a JSON Web Key Set.\n\nThe `provider_name` field allows you to specify which authentication provider you're using (e.g., Clerk, Auth0, AWS Cognito).\n\nThe `branch_id` scopes the JWKS URL to specific branches; if not specified, it applies to all branches.\n\nThe `role_names` scopes the URL to specific roles; if not specified, default roles are used (`authenticator`, `authenticated`, `anonymous`).\n\nThe `jwt_audience` specifies which `aud` values are accepted in JWTs.\n",
328
+ inputSchema: z.strictObject({
329
+ body: zAddProjectJwksBody,
330
+ path: zAddProjectJwksPath
331
+ }),
332
+ annotations: {
333
+ readOnlyHint: false,
334
+ destructiveHint: true,
335
+ openWorldHint: true
336
+ },
337
+ requiresApproval: true,
338
+ metadata: {
339
+ method: "POST",
340
+ path: "/projects/{project_id}/jwks",
341
+ stability: "stable",
342
+ deprecated: false,
343
+ tags: ["Project"]
344
+ },
345
+ invoke: (client, input, signal) => raw.addProjectJwks({
346
+ ...input,
347
+ client,
348
+ signal,
349
+ throwOnError: true
350
+ })
351
+ }), client),
352
+ "assignOrganizationVPCEndpoint": (client) => bindOperation(defineOperation({
353
+ operationId: "assignOrganizationVPCEndpoint",
354
+ id: "assign_organization_vpc_endpoint",
355
+ title: "Assign or update VPC endpoint",
356
+ description: "Assigns a VPC endpoint to a Neon organization or updates its existing assignment.\n",
357
+ inputSchema: z.strictObject({
358
+ body: zAssignOrganizationVpcEndpointBody,
359
+ path: zAssignOrganizationVpcEndpointPath
360
+ }),
361
+ annotations: {
362
+ readOnlyHint: false,
363
+ destructiveHint: true,
364
+ openWorldHint: true
365
+ },
366
+ requiresApproval: true,
367
+ metadata: {
368
+ method: "POST",
369
+ path: "/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}",
370
+ stability: "stable",
371
+ deprecated: false,
372
+ tags: ["Organizations"]
373
+ },
374
+ invoke: (client, input, signal) => raw.assignOrganizationVpcEndpoint({
375
+ ...input,
376
+ client,
377
+ signal,
378
+ throwOnError: true
379
+ })
380
+ }), client),
381
+ "assignProjectVPCEndpoint": (client) => bindOperation(defineOperation({
382
+ operationId: "assignProjectVPCEndpoint",
383
+ id: "assign_project_vpc_endpoint",
384
+ title: "Set VPC endpoint restriction",
385
+ description: "Sets or updates a VPC endpoint restriction for a Neon project.\nWhen a VPC endpoint restriction is set, the project only accepts connections\nfrom the specified VPC.\nA VPC endpoint can be set as a restriction only after it is assigned to the\nparent organization of the Neon project.\n",
386
+ inputSchema: z.strictObject({
387
+ body: zAssignProjectVpcEndpointBody,
388
+ path: zAssignProjectVpcEndpointPath
389
+ }),
390
+ annotations: {
391
+ readOnlyHint: false,
392
+ destructiveHint: true,
393
+ openWorldHint: true
394
+ },
395
+ requiresApproval: true,
396
+ metadata: {
397
+ method: "POST",
398
+ path: "/projects/{project_id}/vpc_endpoints/{vpc_endpoint_id}",
399
+ stability: "stable",
400
+ deprecated: false,
401
+ tags: ["Project"]
402
+ },
403
+ invoke: (client, input, signal) => raw.assignProjectVpcEndpoint({
404
+ ...input,
405
+ client,
406
+ signal,
407
+ throwOnError: true
408
+ })
409
+ }), client),
410
+ "countProjectBranches": (client) => bindOperation(defineOperation({
411
+ operationId: "countProjectBranches",
412
+ id: "count_project_branches",
413
+ title: "Retrieve number of branches",
414
+ description: "Retrieves the total number of branches in the specified project.\nSupports an optional `search` parameter to count branches matching a name filter.\n",
415
+ inputSchema: z.strictObject({
416
+ path: zCountProjectBranchesPath,
417
+ query: zCountProjectBranchesQuery.optional()
418
+ }),
419
+ annotations: {
420
+ readOnlyHint: true,
421
+ openWorldHint: true
422
+ },
423
+ requiresApproval: false,
424
+ metadata: {
425
+ method: "GET",
426
+ path: "/projects/{project_id}/branches/count",
427
+ stability: "stable",
428
+ deprecated: false,
429
+ tags: ["Branch"]
430
+ },
431
+ invoke: (client, input, signal) => raw.countProjectBranches({
432
+ ...input,
433
+ client,
434
+ signal,
435
+ throwOnError: true
436
+ })
437
+ }), client),
438
+ "createApiKey": (client) => bindOperation(defineOperation({
439
+ operationId: "createApiKey",
440
+ id: "create_api_key",
441
+ title: "Create API key",
442
+ description: "Creates an API key.\nThe `key_name` is a user-specified name for the key.\nReturns an `id` and `key`; the `key` is a randomly generated, 64-bit token required to access the Neon API.\nStore the key securely — it is only returned once.\nAPI keys can also be managed in the Neon Console.\nSee [Manage API keys](https://neon.com/docs/manage/api-keys/).\n",
443
+ inputSchema: z.strictObject({ body: zCreateApiKeyBody }),
444
+ annotations: {
445
+ readOnlyHint: false,
446
+ destructiveHint: true,
447
+ openWorldHint: true
448
+ },
449
+ requiresApproval: true,
450
+ metadata: {
451
+ method: "POST",
452
+ path: "/api_keys",
453
+ stability: "stable",
454
+ deprecated: false,
455
+ tags: ["API Key"]
456
+ },
457
+ invoke: (client, input, signal) => raw.createApiKey({
458
+ ...input,
459
+ client,
460
+ signal,
461
+ throwOnError: true
462
+ })
463
+ }), client),
464
+ "createBranchNeonAuthNewUser": (client) => bindOperation(defineOperation({
465
+ operationId: "createBranchNeonAuthNewUser",
466
+ id: "create_branch_neon_auth_new_user",
467
+ title: "Create new auth user",
468
+ description: "Creates a new user in the Neon Auth user directory for the specified branch.\nThe user is created in the `neon_auth.users_sync` table and can immediately authenticate\nusing the branch's configured auth providers.\n",
469
+ inputSchema: z.strictObject({
470
+ body: zCreateBranchNeonAuthNewUserBody,
471
+ path: zCreateBranchNeonAuthNewUserPath
472
+ }),
473
+ annotations: {
474
+ readOnlyHint: false,
475
+ destructiveHint: true,
476
+ openWorldHint: true
477
+ },
478
+ requiresApproval: true,
479
+ metadata: {
480
+ method: "POST",
481
+ path: "/projects/{project_id}/branches/{branch_id}/auth/users",
482
+ stability: "beta",
483
+ deprecated: false,
484
+ tags: ["Auth"]
485
+ },
486
+ invoke: (client, input, signal) => raw.createBranchNeonAuthNewUser({
487
+ ...input,
488
+ client,
489
+ signal,
490
+ throwOnError: true
491
+ })
492
+ }), client),
493
+ "createCredential": (client) => bindOperation(defineOperation({
494
+ operationId: "createCredential",
495
+ id: "create_credential",
496
+ title: "Issue a scoped credential on the branch",
497
+ description: "Issues a new scoped service credential anchored to the specified\nbranch. The response carries `api_token` and `s3_secret_access_key`\nexactly once — they are not stored server-side.\n\n**Note**: This endpoint is currently in Beta.\n",
498
+ inputSchema: z.strictObject({
499
+ body: zCreateCredentialBody,
500
+ path: zCreateCredentialPath
501
+ }),
502
+ annotations: {
503
+ readOnlyHint: false,
504
+ destructiveHint: true,
505
+ openWorldHint: true
506
+ },
507
+ requiresApproval: true,
508
+ metadata: {
509
+ method: "POST",
510
+ path: "/projects/{project_id}/branches/{branch_id}/credentials",
511
+ stability: "beta",
512
+ deprecated: false,
513
+ tags: ["Credentials"]
514
+ },
515
+ invoke: (client, input, signal) => raw.createCredential({
516
+ ...input,
517
+ client,
518
+ signal,
519
+ throwOnError: true
520
+ })
521
+ }), client),
522
+ "createNeonAuth": (client) => bindOperation(defineOperation({
523
+ operationId: "createNeonAuth",
524
+ id: "create_neon_auth",
525
+ title: "Enable Neon Auth for the branch",
526
+ description: "Enables Neon Auth for the specified branch by connecting it to an authentication provider.\nCreating the integration provisions the `neon_auth` schema in the branch database, which stores user identity data synchronized from the provider.\n",
527
+ inputSchema: z.strictObject({
528
+ body: zCreateNeonAuthBody,
529
+ path: zCreateNeonAuthPath
530
+ }),
531
+ annotations: {
532
+ readOnlyHint: false,
533
+ destructiveHint: true,
534
+ openWorldHint: true
535
+ },
536
+ requiresApproval: true,
537
+ metadata: {
538
+ method: "POST",
539
+ path: "/projects/{project_id}/branches/{branch_id}/auth",
540
+ stability: "beta",
541
+ deprecated: false,
542
+ tags: ["Auth"]
543
+ },
544
+ invoke: (client, input, signal) => raw.createNeonAuth({
545
+ ...input,
546
+ client,
547
+ signal,
548
+ throwOnError: true
549
+ })
550
+ }), client),
551
+ "createNeonAuthIntegration": (client) => bindOperation(defineOperation({
552
+ operationId: "createNeonAuthIntegration",
553
+ id: "create_neon_auth_integration",
554
+ title: "Create Neon Auth integration",
555
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth` instead. Removal scheduled for March 1, 2026.\nUse this endpoint if the frontend integration flow can't be used.\n",
556
+ inputSchema: z.strictObject({ body: zCreateNeonAuthIntegrationBody }),
557
+ annotations: {
558
+ readOnlyHint: false,
559
+ destructiveHint: true,
560
+ openWorldHint: true
561
+ },
562
+ requiresApproval: true,
563
+ metadata: {
564
+ method: "POST",
565
+ path: "/projects/auth/create",
566
+ stability: "stable",
567
+ deprecated: true,
568
+ tags: ["Auth (legacy)"]
569
+ },
570
+ invoke: (client, input, signal) => raw.createNeonAuthIntegration({
571
+ ...input,
572
+ client,
573
+ signal,
574
+ throwOnError: true
575
+ })
576
+ }), client),
577
+ "createNeonAuthNewUser": (client) => bindOperation(defineOperation({
578
+ operationId: "createNeonAuthNewUser",
579
+ id: "create_neon_auth_new_user",
580
+ title: "Create new auth user",
581
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/users` instead. Removal scheduled for March 1, 2026.\nThe user will be created in your neon_auth.users_sync table and automatically propagated to your auth project, whether Neon-managed or provider-owned.\n",
582
+ inputSchema: z.strictObject({ body: zCreateNeonAuthNewUserBody }),
583
+ annotations: {
584
+ readOnlyHint: false,
585
+ destructiveHint: true,
586
+ openWorldHint: true
587
+ },
588
+ requiresApproval: true,
589
+ metadata: {
590
+ method: "POST",
591
+ path: "/projects/auth/user",
592
+ stability: "stable",
593
+ deprecated: true,
594
+ tags: ["Auth (legacy)"]
595
+ },
596
+ invoke: (client, input, signal) => raw.createNeonAuthNewUser({
597
+ ...input,
598
+ client,
599
+ signal,
600
+ throwOnError: true
601
+ })
602
+ }), client),
603
+ "createNeonAuthProviderSDKKeys": (client) => bindOperation(defineOperation({
604
+ operationId: "createNeonAuthProviderSDKKeys",
605
+ id: "create_neon_auth_provider_sdk_keys",
606
+ title: "Create Auth Provider SDK keys",
607
+ description: "Generates SDK or API Keys for the auth provider. These might be called different things depending\non the auth provider you're using, but are generally used for setting up the frontend and backend SDKs.\n",
608
+ inputSchema: z.strictObject({ body: zCreateNeonAuthProviderSdkKeysBody }),
609
+ annotations: {
610
+ readOnlyHint: false,
611
+ destructiveHint: true,
612
+ openWorldHint: true
613
+ },
614
+ requiresApproval: true,
615
+ metadata: {
616
+ method: "POST",
617
+ path: "/projects/auth/keys",
618
+ stability: "stable",
619
+ deprecated: false,
620
+ tags: ["Auth (legacy)"]
621
+ },
622
+ invoke: (client, input, signal) => raw.createNeonAuthProviderSdkKeys({
623
+ ...input,
624
+ client,
625
+ signal,
626
+ throwOnError: true
627
+ })
628
+ }), client),
629
+ "createOrganizationInvitations": (client) => bindOperation(defineOperation({
630
+ operationId: "createOrganizationInvitations",
631
+ id: "create_organization_invitations",
632
+ title: "Create organization invitations",
633
+ description: "Creates invitations for a specific organization.\nIf the invited user has an existing account, they automatically join as a member.\nIf they don't yet have an account, they are invited to create one, after which they become a member.\nEach invited user receives an email notification.\n",
634
+ inputSchema: z.strictObject({
635
+ body: zCreateOrganizationInvitationsBody,
636
+ path: zCreateOrganizationInvitationsPath
637
+ }),
638
+ annotations: {
639
+ readOnlyHint: false,
640
+ destructiveHint: true,
641
+ openWorldHint: true
642
+ },
643
+ requiresApproval: true,
644
+ metadata: {
645
+ method: "POST",
646
+ path: "/organizations/{org_id}/invitations",
647
+ stability: "stable",
648
+ deprecated: false,
649
+ tags: ["Organizations"]
650
+ },
651
+ invoke: (client, input, signal) => raw.createOrganizationInvitations({
652
+ ...input,
653
+ client,
654
+ signal,
655
+ throwOnError: true
656
+ })
657
+ }), client),
658
+ "createOrgApiKey": (client) => bindOperation(defineOperation({
659
+ operationId: "createOrgApiKey",
660
+ id: "create_org_api_key",
661
+ title: "Create organization API key",
662
+ description: "Creates an API key for the specified organization.\nThe `key_name` is a user-specified name for the key.\nReturns an `id` and `key`; the `key` is a randomly generated, 64-bit token required to access the Neon API.\nStore the key securely — it is only returned once.\nAPI keys can also be managed in the Neon Console.\nSee [Manage API keys](https://neon.com/docs/manage/api-keys/).\n",
663
+ inputSchema: z.strictObject({
664
+ body: zCreateOrgApiKeyBody,
665
+ path: zCreateOrgApiKeyPath
666
+ }),
667
+ annotations: {
668
+ readOnlyHint: false,
669
+ destructiveHint: true,
670
+ openWorldHint: true
671
+ },
672
+ requiresApproval: true,
673
+ metadata: {
674
+ method: "POST",
675
+ path: "/organizations/{org_id}/api_keys",
676
+ stability: "stable",
677
+ deprecated: false,
678
+ tags: ["Organizations"]
679
+ },
680
+ invoke: (client, input, signal) => raw.createOrgApiKey({
681
+ ...input,
682
+ client,
683
+ signal,
684
+ throwOnError: true
685
+ })
686
+ }), client),
687
+ "createProject": (client) => bindOperation(defineOperation({
688
+ operationId: "createProject",
689
+ id: "create_project",
690
+ title: "Create project",
691
+ description: "Creates a Neon project within an organization.\nIf using a personal API key, include the `org_id` parameter to specify which organization to create the project in.\nIf using an org API key, `org_id` is automatically inferred from the key.\nPlan limits define how many projects you can create.\nFor more information, see [Manage projects](https://neon.com/docs/manage/projects/).\n\nYou can specify a region and Postgres version in the request body.\nNeon supports Postgres 14 through 18, with 19 rolling out to enabled regions.\nFor supported regions and `region_id` values, see [Regions](https://neon.com/docs/introduction/regions/).\n",
692
+ inputSchema: z.strictObject({ body: zCreateProjectBody }),
693
+ annotations: {
694
+ readOnlyHint: false,
695
+ destructiveHint: true,
696
+ openWorldHint: true
697
+ },
698
+ requiresApproval: true,
699
+ metadata: {
700
+ method: "POST",
701
+ path: "/projects",
702
+ stability: "stable",
703
+ deprecated: false,
704
+ tags: ["Project"]
705
+ },
706
+ invoke: (client, input, signal) => raw.createProject({
707
+ ...input,
708
+ client,
709
+ signal,
710
+ throwOnError: true
711
+ })
712
+ }), client),
713
+ "createProjectBranch": (client) => bindOperation(defineOperation({
714
+ operationId: "createProjectBranch",
715
+ id: "create_project_branch",
716
+ title: "Create branch",
717
+ description: "Creates a branch in the specified project.\nNo request body is required, but you can specify one to create a compute endpoint or select a non-default parent branch.\nBy default, the branch is created from the project's default branch with no compute endpoint, and the branch name is auto-generated.\nTo access the branch, add a `read_write` endpoint.\nEach branch supports one read-write endpoint and multiple read-only endpoints.\nFor related information, see [Manage branches](https://neon.com/docs/manage/branches/).\n",
718
+ inputSchema: z.strictObject({
719
+ body: zCreateProjectBranchBody.optional(),
720
+ path: zCreateProjectBranchPath
721
+ }),
722
+ annotations: {
723
+ readOnlyHint: false,
724
+ destructiveHint: true,
725
+ openWorldHint: true
726
+ },
727
+ requiresApproval: true,
728
+ metadata: {
729
+ method: "POST",
730
+ path: "/projects/{project_id}/branches",
731
+ stability: "stable",
732
+ deprecated: false,
733
+ tags: ["Branch"]
734
+ },
735
+ invoke: (client, input, signal) => raw.createProjectBranch({
736
+ ...input,
737
+ client,
738
+ signal,
739
+ throwOnError: true
740
+ })
741
+ }), client),
742
+ "createProjectBranchAnonymized": (client) => bindOperation(defineOperation({
743
+ operationId: "createProjectBranchAnonymized",
744
+ id: "create_project_branch_anonymized",
745
+ title: "Create anonymized branch",
746
+ description: "Creates a new branch with anonymized data using PostgreSQL Anonymizer for static masking.\nThis allows developers to work with masked production data.\nOptionally, provide `masking_rules` to set initial masking rules for the branch\nand `start_anonymization` to automatically start anonymization after creation. This\ncombines functionality of updating masking rules and starting anonymization into the\nbranch creation request.\n\n**Note**: This endpoint is currently in Beta.\n",
747
+ inputSchema: z.strictObject({
748
+ body: zCreateProjectBranchAnonymizedBody,
749
+ path: zCreateProjectBranchAnonymizedPath
750
+ }),
751
+ annotations: {
752
+ readOnlyHint: false,
753
+ destructiveHint: true,
754
+ openWorldHint: true
755
+ },
756
+ requiresApproval: true,
757
+ metadata: {
758
+ method: "POST",
759
+ path: "/projects/{project_id}/branch_anonymized",
760
+ stability: "stable",
761
+ deprecated: false,
762
+ tags: ["Branch"]
763
+ },
764
+ invoke: (client, input, signal) => raw.createProjectBranchAnonymized({
765
+ ...input,
766
+ client,
767
+ signal,
768
+ throwOnError: true
769
+ })
770
+ }), client),
771
+ "createProjectBranchBucket": (client) => bindOperation(defineOperation({
772
+ operationId: "createProjectBranchBucket",
773
+ id: "create_project_branch_bucket",
774
+ title: "Create a bucket on the branch",
775
+ description: "Creates a new branchable object storage bucket on the specified branch.\nBuckets are managed by the Neon Platform branchable object storage service.\n\n**Note**: This endpoint is currently in Beta.\n",
776
+ inputSchema: z.strictObject({
777
+ body: zCreateProjectBranchBucketBody,
778
+ path: zCreateProjectBranchBucketPath
779
+ }),
780
+ annotations: {
781
+ readOnlyHint: false,
782
+ destructiveHint: true,
783
+ openWorldHint: true
784
+ },
785
+ requiresApproval: true,
786
+ metadata: {
787
+ method: "POST",
788
+ path: "/projects/{project_id}/branches/{branch_id}/buckets",
789
+ stability: "beta",
790
+ deprecated: false,
791
+ tags: ["Buckets"]
792
+ },
793
+ invoke: (client, input, signal) => raw.createProjectBranchBucket({
794
+ ...input,
795
+ client,
796
+ signal,
797
+ throwOnError: true
798
+ })
799
+ }), client),
800
+ "createProjectBranchDataAPI": (client) => bindOperation(defineOperation({
801
+ operationId: "createProjectBranchDataAPI",
802
+ id: "create_project_branch_data_api",
803
+ title: "Create Neon Data API",
804
+ description: "Creates a new instance of Neon Data API in the specified branch.\nThe Data API exposes a REST interface over the branch database. The `database_name` path parameter determines which database the API serves.\n",
805
+ inputSchema: z.strictObject({
806
+ body: zCreateProjectBranchDataApiBody.optional(),
807
+ path: zCreateProjectBranchDataApiPath
808
+ }),
809
+ annotations: {
810
+ readOnlyHint: false,
811
+ destructiveHint: true,
812
+ openWorldHint: true
813
+ },
814
+ requiresApproval: true,
815
+ metadata: {
816
+ method: "POST",
817
+ path: "/projects/{project_id}/branches/{branch_id}/data-api/{database_name}",
818
+ stability: "stable",
819
+ deprecated: false,
820
+ tags: ["DataAPI"]
821
+ },
822
+ invoke: (client, input, signal) => raw.createProjectBranchDataApi({
823
+ ...input,
824
+ client,
825
+ signal,
826
+ throwOnError: true
827
+ })
828
+ }), client),
829
+ "createProjectBranchDatabase": (client) => bindOperation(defineOperation({
830
+ operationId: "createProjectBranchDatabase",
831
+ id: "create_project_branch_database",
832
+ title: "Create database",
833
+ description: "Creates a database in the specified branch.\nA branch can have multiple databases.\nFor related information, see [Manage databases](https://neon.com/docs/manage/databases/).\n",
834
+ inputSchema: z.strictObject({
835
+ body: zCreateProjectBranchDatabaseBody,
836
+ path: zCreateProjectBranchDatabasePath
837
+ }),
838
+ annotations: {
839
+ readOnlyHint: false,
840
+ destructiveHint: true,
841
+ openWorldHint: true
842
+ },
843
+ requiresApproval: true,
844
+ metadata: {
845
+ method: "POST",
846
+ path: "/projects/{project_id}/branches/{branch_id}/databases",
847
+ stability: "stable",
848
+ deprecated: false,
849
+ tags: ["Branch"]
850
+ },
851
+ invoke: (client, input, signal) => raw.createProjectBranchDatabase({
852
+ ...input,
853
+ client,
854
+ signal,
855
+ throwOnError: true
856
+ })
857
+ }), client),
858
+ "createProjectBranchFunctionDeployment": (client) => bindOperation(defineOperation({
859
+ operationId: "createProjectBranchFunctionDeployment",
860
+ id: "create_project_branch_function_deployment",
861
+ title: "Deploy code to a function",
862
+ description: "Creates a deployment for the function. Supply any subset of zip,\nenvironment, and runtime; omitted fields inherit the\nfunction's latest version. At least one field must be supplied. The\nfirst deployment of a function must include zip. The newest deployment\nbecomes active.\n\n**Note**: This endpoint is currently in Beta.\n",
863
+ inputSchema: z.strictObject({
864
+ body: zCreateProjectBranchFunctionDeploymentBody.safeExtend({ "zip": z.base64().describe("Base64-encoded binary file contents.").optional() }),
865
+ path: zCreateProjectBranchFunctionDeploymentPath
866
+ }),
867
+ annotations: {
868
+ readOnlyHint: false,
869
+ destructiveHint: true,
870
+ openWorldHint: true
871
+ },
872
+ requiresApproval: true,
873
+ metadata: {
874
+ method: "POST",
875
+ path: "/projects/{project_id}/branches/{branch_id}/functions/{slug}/deployments",
876
+ stability: "beta",
877
+ deprecated: false,
878
+ tags: ["Functions"]
879
+ },
880
+ invoke: (client, input, signal) => {
881
+ const { ["zip"]: binary0, ...body } = input.body;
882
+ return raw.createProjectBranchFunctionDeployment({
883
+ ...input,
884
+ body: {
885
+ ...body,
886
+ ...binary0 === void 0 ? {} : { "zip": decodeBase64(binary0) }
887
+ },
888
+ client,
889
+ signal,
890
+ throwOnError: true
891
+ });
892
+ }
893
+ }), client),
894
+ "createProjectBranchRole": (client) => bindOperation(defineOperation({
895
+ operationId: "createProjectBranchRole",
896
+ id: "create_project_branch_role",
897
+ title: "Create role",
898
+ description: "Creates a Postgres role in the specified branch.\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n\nConnections established to the active compute endpoint will be dropped.\nIf the compute endpoint is idle, the endpoint becomes active for a short period of time and is suspended afterward.\n",
899
+ inputSchema: z.strictObject({
900
+ body: zCreateProjectBranchRoleBody,
901
+ path: zCreateProjectBranchRolePath
902
+ }),
903
+ annotations: {
904
+ readOnlyHint: false,
905
+ destructiveHint: true,
906
+ openWorldHint: true
907
+ },
908
+ requiresApproval: true,
909
+ metadata: {
910
+ method: "POST",
911
+ path: "/projects/{project_id}/branches/{branch_id}/roles",
912
+ stability: "stable",
913
+ deprecated: false,
914
+ tags: ["Branch"]
915
+ },
916
+ invoke: (client, input, signal) => raw.createProjectBranchRole({
917
+ ...input,
918
+ client,
919
+ signal,
920
+ throwOnError: true
921
+ })
922
+ }), client),
923
+ "createProjectEndpoint": (client) => bindOperation(defineOperation({
924
+ operationId: "createProjectEndpoint",
925
+ id: "create_project_endpoint",
926
+ title: "Create compute endpoint",
927
+ description: "Creates a compute endpoint for the specified branch.\nA compute endpoint is a Neon compute instance.\nThere is a maximum of one read-write compute endpoint per branch.\nIf the specified branch already has a read-write compute endpoint, the operation fails.\nA branch can have multiple read-only compute endpoints.\n\nFor more information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n",
928
+ inputSchema: z.strictObject({
929
+ body: zCreateProjectEndpointBody,
930
+ path: zCreateProjectEndpointPath
931
+ }),
932
+ annotations: {
933
+ readOnlyHint: false,
934
+ destructiveHint: true,
935
+ openWorldHint: true
936
+ },
937
+ requiresApproval: true,
938
+ metadata: {
939
+ method: "POST",
940
+ path: "/projects/{project_id}/endpoints",
941
+ stability: "stable",
942
+ deprecated: false,
943
+ tags: ["Endpoint"]
944
+ },
945
+ invoke: (client, input, signal) => raw.createProjectEndpoint({
946
+ ...input,
947
+ client,
948
+ signal,
949
+ throwOnError: true
950
+ })
951
+ }), client),
952
+ "createProjectTransferRequest": (client) => bindOperation(defineOperation({
953
+ operationId: "createProjectTransferRequest",
954
+ id: "create_project_transfer_request",
955
+ title: "Create a project transfer request",
956
+ description: "Creates a transfer request for the specified project. The request expires after a set period.\nTo accept the request, the recipient calls `PUT /projects/{project_id}/transfer_requests/{request_id}`\nor uses the Neon Console claim link.\nThe optional `ru` parameter redirects the recipient after acceptance.\n",
957
+ inputSchema: z.strictObject({
958
+ body: zCreateProjectTransferRequestBody.optional(),
959
+ path: zCreateProjectTransferRequestPath
960
+ }),
961
+ annotations: {
962
+ readOnlyHint: false,
963
+ destructiveHint: true,
964
+ openWorldHint: true
965
+ },
966
+ requiresApproval: true,
967
+ metadata: {
968
+ method: "POST",
969
+ path: "/projects/{project_id}/transfer_requests",
970
+ stability: "stable",
971
+ deprecated: false,
972
+ tags: ["Project"]
973
+ },
974
+ invoke: (client, input, signal) => raw.createProjectTransferRequest({
975
+ ...input,
976
+ client,
977
+ signal,
978
+ throwOnError: true
979
+ })
980
+ }), client),
981
+ "createSnapshot": (client) => bindOperation(defineOperation({
982
+ operationId: "createSnapshot",
983
+ id: "create_snapshot",
984
+ title: "Create snapshot",
985
+ description: "Creates a snapshot from the specified branch.\nThis operation may initiate an asynchronous process.\n",
986
+ inputSchema: z.strictObject({
987
+ path: zCreateSnapshotPath,
988
+ query: zCreateSnapshotQuery.optional()
989
+ }),
990
+ annotations: {
991
+ readOnlyHint: false,
992
+ destructiveHint: true,
993
+ openWorldHint: true
994
+ },
995
+ requiresApproval: true,
996
+ metadata: {
997
+ method: "POST",
998
+ path: "/projects/{project_id}/branches/{branch_id}/snapshot",
999
+ stability: "stable",
1000
+ deprecated: false,
1001
+ tags: ["Snapshot"]
1002
+ },
1003
+ invoke: (client, input, signal) => raw.createSnapshot({
1004
+ ...input,
1005
+ client,
1006
+ signal,
1007
+ throwOnError: true
1008
+ })
1009
+ }), client),
1010
+ "deleteBranchNeonAuthOauthProvider": (client) => bindOperation(defineOperation({
1011
+ operationId: "deleteBranchNeonAuthOauthProvider",
1012
+ id: "delete_branch_neon_auth_oauth_provider",
1013
+ title: "Delete OAuth provider",
1014
+ description: "Deletes an OAuth provider from the specified project.\n",
1015
+ inputSchema: z.strictObject({ path: zDeleteBranchNeonAuthOauthProviderPath }),
1016
+ annotations: {
1017
+ readOnlyHint: false,
1018
+ destructiveHint: true,
1019
+ openWorldHint: true
1020
+ },
1021
+ requiresApproval: true,
1022
+ metadata: {
1023
+ method: "DELETE",
1024
+ path: "/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}",
1025
+ stability: "beta",
1026
+ deprecated: false,
1027
+ tags: ["Auth"]
1028
+ },
1029
+ invoke: (client, input, signal) => raw.deleteBranchNeonAuthOauthProvider({
1030
+ ...input,
1031
+ client,
1032
+ signal,
1033
+ throwOnError: true
1034
+ })
1035
+ }), client),
1036
+ "deleteBranchNeonAuthTrustedDomain": (client) => bindOperation(defineOperation({
1037
+ operationId: "deleteBranchNeonAuthTrustedDomain",
1038
+ id: "delete_branch_neon_auth_trusted_domain",
1039
+ title: "Delete domain from redirect_uri whitelist",
1040
+ description: "Removes a domain from the redirect URI whitelist for the specified branch.\nAfter removal, the domain can no longer be used as a redirect target after authentication.\n",
1041
+ inputSchema: z.strictObject({
1042
+ body: zDeleteBranchNeonAuthTrustedDomainBody,
1043
+ path: zDeleteBranchNeonAuthTrustedDomainPath
1044
+ }),
1045
+ annotations: {
1046
+ readOnlyHint: false,
1047
+ destructiveHint: true,
1048
+ openWorldHint: true
1049
+ },
1050
+ requiresApproval: true,
1051
+ metadata: {
1052
+ method: "DELETE",
1053
+ path: "/projects/{project_id}/branches/{branch_id}/auth/domains",
1054
+ stability: "beta",
1055
+ deprecated: false,
1056
+ tags: ["Auth"]
1057
+ },
1058
+ invoke: (client, input, signal) => raw.deleteBranchNeonAuthTrustedDomain({
1059
+ ...input,
1060
+ client,
1061
+ signal,
1062
+ throwOnError: true
1063
+ })
1064
+ }), client),
1065
+ "deleteBranchNeonAuthUser": (client) => bindOperation(defineOperation({
1066
+ operationId: "deleteBranchNeonAuthUser",
1067
+ id: "delete_branch_neon_auth_user",
1068
+ title: "Delete auth user",
1069
+ description: "Deletes the specified user from the Neon Auth user directory for the specified branch.\nRemoves the user record from `neon_auth.users_sync`. This action cannot be undone.\n",
1070
+ inputSchema: z.strictObject({ path: zDeleteBranchNeonAuthUserPath }),
1071
+ annotations: {
1072
+ readOnlyHint: false,
1073
+ destructiveHint: true,
1074
+ openWorldHint: true
1075
+ },
1076
+ requiresApproval: true,
1077
+ metadata: {
1078
+ method: "DELETE",
1079
+ path: "/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}",
1080
+ stability: "beta",
1081
+ deprecated: false,
1082
+ tags: ["Auth"]
1083
+ },
1084
+ invoke: (client, input, signal) => raw.deleteBranchNeonAuthUser({
1085
+ ...input,
1086
+ client,
1087
+ signal,
1088
+ throwOnError: true
1089
+ })
1090
+ }), client),
1091
+ "deleteNeonAuthDomainFromRedirectURIWhitelist": (client) => bindOperation(defineOperation({
1092
+ operationId: "deleteNeonAuthDomainFromRedirectURIWhitelist",
1093
+ id: "delete_neon_auth_domain_from_redirect_uri_whitelist",
1094
+ title: "Delete trusted redirect URI domain",
1095
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Removal scheduled for March 1, 2026.\n",
1096
+ inputSchema: z.strictObject({
1097
+ body: zDeleteNeonAuthDomainFromRedirectUriWhitelistBody,
1098
+ path: zDeleteNeonAuthDomainFromRedirectUriWhitelistPath
1099
+ }),
1100
+ annotations: {
1101
+ readOnlyHint: false,
1102
+ destructiveHint: true,
1103
+ openWorldHint: true
1104
+ },
1105
+ requiresApproval: true,
1106
+ metadata: {
1107
+ method: "DELETE",
1108
+ path: "/projects/{project_id}/auth/domains",
1109
+ stability: "stable",
1110
+ deprecated: true,
1111
+ tags: ["Auth (legacy)"]
1112
+ },
1113
+ invoke: (client, input, signal) => raw.deleteNeonAuthDomainFromRedirectUriWhitelist({
1114
+ ...input,
1115
+ client,
1116
+ signal,
1117
+ throwOnError: true
1118
+ })
1119
+ }), client),
1120
+ "deleteNeonAuthIntegration": (client) => bindOperation(defineOperation({
1121
+ operationId: "deleteNeonAuthIntegration",
1122
+ id: "delete_neon_auth_integration",
1123
+ title: "Delete integration with auth provider",
1124
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth` instead. Removal scheduled for March 1, 2026.",
1125
+ inputSchema: z.strictObject({
1126
+ body: zDeleteNeonAuthIntegrationBody.optional(),
1127
+ path: zDeleteNeonAuthIntegrationPath
1128
+ }),
1129
+ annotations: {
1130
+ readOnlyHint: false,
1131
+ destructiveHint: true,
1132
+ openWorldHint: true
1133
+ },
1134
+ requiresApproval: true,
1135
+ metadata: {
1136
+ method: "DELETE",
1137
+ path: "/projects/{project_id}/auth/integration/{auth_provider}",
1138
+ stability: "stable",
1139
+ deprecated: true,
1140
+ tags: ["Auth (legacy)"]
1141
+ },
1142
+ invoke: (client, input, signal) => raw.deleteNeonAuthIntegration({
1143
+ ...input,
1144
+ client,
1145
+ signal,
1146
+ throwOnError: true
1147
+ })
1148
+ }), client),
1149
+ "deleteNeonAuthOauthProvider": (client) => bindOperation(defineOperation({
1150
+ operationId: "deleteNeonAuthOauthProvider",
1151
+ id: "delete_neon_auth_oauth_provider",
1152
+ title: "Delete OAuth provider",
1153
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}` instead. Removal scheduled for March 1, 2026.\n",
1154
+ inputSchema: z.strictObject({ path: zDeleteNeonAuthOauthProviderPath }),
1155
+ annotations: {
1156
+ readOnlyHint: false,
1157
+ destructiveHint: true,
1158
+ openWorldHint: true
1159
+ },
1160
+ requiresApproval: true,
1161
+ metadata: {
1162
+ method: "DELETE",
1163
+ path: "/projects/{project_id}/auth/oauth_providers/{oauth_provider_id}",
1164
+ stability: "stable",
1165
+ deprecated: true,
1166
+ tags: ["Auth (legacy)"]
1167
+ },
1168
+ invoke: (client, input, signal) => raw.deleteNeonAuthOauthProvider({
1169
+ ...input,
1170
+ client,
1171
+ signal,
1172
+ throwOnError: true
1173
+ })
1174
+ }), client),
1175
+ "deleteNeonAuthUser": (client) => bindOperation(defineOperation({
1176
+ operationId: "deleteNeonAuthUser",
1177
+ id: "delete_neon_auth_user",
1178
+ title: "Delete auth user",
1179
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}` instead. Removal scheduled for March 1, 2026.\n",
1180
+ inputSchema: z.strictObject({ path: zDeleteNeonAuthUserPath }),
1181
+ annotations: {
1182
+ readOnlyHint: false,
1183
+ destructiveHint: true,
1184
+ openWorldHint: true
1185
+ },
1186
+ requiresApproval: true,
1187
+ metadata: {
1188
+ method: "DELETE",
1189
+ path: "/projects/{project_id}/auth/users/{auth_user_id}",
1190
+ stability: "stable",
1191
+ deprecated: true,
1192
+ tags: ["Auth (legacy)"]
1193
+ },
1194
+ invoke: (client, input, signal) => raw.deleteNeonAuthUser({
1195
+ ...input,
1196
+ client,
1197
+ signal,
1198
+ throwOnError: true
1199
+ })
1200
+ }), client),
1201
+ "deleteOrganizationSpendingLimit": (client) => bindOperation(defineOperation({
1202
+ operationId: "deleteOrganizationSpendingLimit",
1203
+ id: "delete_organization_spending_limit",
1204
+ title: "Remove organization spending limit",
1205
+ description: "Removes the configured monthly spending limit for the specified organization.\nIdempotent — removing an already-unset limit still succeeds.\nAvailable to organization admins on Launch and Scale plans only.\n",
1206
+ inputSchema: z.strictObject({ path: zDeleteOrganizationSpendingLimitPath }),
1207
+ annotations: {
1208
+ readOnlyHint: false,
1209
+ destructiveHint: true,
1210
+ openWorldHint: true
1211
+ },
1212
+ requiresApproval: true,
1213
+ metadata: {
1214
+ method: "DELETE",
1215
+ path: "/organizations/{org_id}/billing/spending_limit",
1216
+ stability: "beta",
1217
+ deprecated: false,
1218
+ tags: ["Organizations"]
1219
+ },
1220
+ invoke: (client, input, signal) => raw.deleteOrganizationSpendingLimit({
1221
+ ...input,
1222
+ client,
1223
+ signal,
1224
+ throwOnError: true
1225
+ })
1226
+ }), client),
1227
+ "deleteOrganizationVPCEndpoint": (client) => bindOperation(defineOperation({
1228
+ operationId: "deleteOrganizationVPCEndpoint",
1229
+ id: "delete_organization_vpc_endpoint",
1230
+ title: "Delete VPC endpoint",
1231
+ description: "Deletes the VPC endpoint from the specified Neon organization.\nIf you delete a VPC endpoint from a Neon organization, that VPC endpoint cannot\nbe added back to the Neon organization.\n",
1232
+ inputSchema: z.strictObject({ path: zDeleteOrganizationVpcEndpointPath }),
1233
+ annotations: {
1234
+ readOnlyHint: false,
1235
+ destructiveHint: true,
1236
+ openWorldHint: true
1237
+ },
1238
+ requiresApproval: true,
1239
+ metadata: {
1240
+ method: "DELETE",
1241
+ path: "/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}",
1242
+ stability: "stable",
1243
+ deprecated: false,
1244
+ tags: ["Organizations"]
1245
+ },
1246
+ invoke: (client, input, signal) => raw.deleteOrganizationVpcEndpoint({
1247
+ ...input,
1248
+ client,
1249
+ signal,
1250
+ throwOnError: true
1251
+ })
1252
+ }), client),
1253
+ "deleteProject": (client) => bindOperation(defineOperation({
1254
+ operationId: "deleteProject",
1255
+ id: "delete_project",
1256
+ title: "Delete project",
1257
+ description: "Deletes the specified project and all its endpoints, branches, databases, and users.\nDeleted projects can be recovered within 7 days using `POST /projects/{project_id}/recover`.\nTo list recoverable projects, use `GET /projects?recoverable=true`.\n",
1258
+ inputSchema: z.strictObject({ path: zDeleteProjectPath }),
1259
+ annotations: {
1260
+ readOnlyHint: false,
1261
+ destructiveHint: true,
1262
+ openWorldHint: true
1263
+ },
1264
+ requiresApproval: true,
1265
+ metadata: {
1266
+ method: "DELETE",
1267
+ path: "/projects/{project_id}",
1268
+ stability: "stable",
1269
+ deprecated: false,
1270
+ tags: ["Project"]
1271
+ },
1272
+ invoke: (client, input, signal) => raw.deleteProject({
1273
+ ...input,
1274
+ client,
1275
+ signal,
1276
+ throwOnError: true
1277
+ })
1278
+ }), client),
1279
+ "deleteProjectBranch": (client) => bindOperation(defineOperation({
1280
+ operationId: "deleteProjectBranch",
1281
+ id: "delete_project_branch",
1282
+ title: "Delete branch",
1283
+ description: "Deletes the specified branch from a project and places all compute endpoints into an idle state, breaking existing client connections.\n\nThe deletion completes after all operations finish.\nYou cannot delete a project's root or default branch, or a branch that has a child branch.\nA project must have at least one branch.\n\nBy default, deleted branches can be recovered within a 7-day grace period.\nUse the `hard_delete` parameter to permanently delete the branch immediately.\nFor related information, see [Manage branches](https://neon.com/docs/manage/branches/).\n",
1284
+ inputSchema: z.strictObject({
1285
+ path: zDeleteProjectBranchPath,
1286
+ query: zDeleteProjectBranchQuery.optional()
1287
+ }),
1288
+ annotations: {
1289
+ readOnlyHint: false,
1290
+ destructiveHint: true,
1291
+ openWorldHint: true
1292
+ },
1293
+ requiresApproval: true,
1294
+ metadata: {
1295
+ method: "DELETE",
1296
+ path: "/projects/{project_id}/branches/{branch_id}",
1297
+ stability: "stable",
1298
+ deprecated: false,
1299
+ tags: ["Branch"]
1300
+ },
1301
+ invoke: (client, input, signal) => raw.deleteProjectBranch({
1302
+ ...input,
1303
+ client,
1304
+ signal,
1305
+ throwOnError: true
1306
+ })
1307
+ }), client),
1308
+ "deleteProjectBranchBucket": (client) => bindOperation(defineOperation({
1309
+ operationId: "deleteProjectBranchBucket",
1310
+ id: "delete_project_branch_bucket",
1311
+ title: "Delete a bucket on the branch",
1312
+ description: "Deletes the named bucket from the specified branch.\n\n**Note**: This endpoint is currently in Beta.\n",
1313
+ inputSchema: z.strictObject({ path: zDeleteProjectBranchBucketPath }),
1314
+ annotations: {
1315
+ readOnlyHint: false,
1316
+ destructiveHint: true,
1317
+ openWorldHint: true
1318
+ },
1319
+ requiresApproval: true,
1320
+ metadata: {
1321
+ method: "DELETE",
1322
+ path: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}",
1323
+ stability: "beta",
1324
+ deprecated: false,
1325
+ tags: ["Buckets"]
1326
+ },
1327
+ invoke: (client, input, signal) => raw.deleteProjectBranchBucket({
1328
+ ...input,
1329
+ client,
1330
+ signal,
1331
+ throwOnError: true
1332
+ })
1333
+ }), client),
1334
+ "deleteProjectBranchBucketObject": (client) => bindOperation(defineOperation({
1335
+ operationId: "deleteProjectBranchBucketObject",
1336
+ id: "delete_project_branch_bucket_object",
1337
+ title: "Delete an object in a bucket",
1338
+ description: "Deletes the named object from the bucket on the specified branch.\nServed by the user's session (no customer S3 credentials required).\n\n**Note**: This endpoint is currently in Beta.\n",
1339
+ inputSchema: z.strictObject({ path: zDeleteProjectBranchBucketObjectPath }),
1340
+ annotations: {
1341
+ readOnlyHint: false,
1342
+ destructiveHint: true,
1343
+ openWorldHint: true
1344
+ },
1345
+ requiresApproval: true,
1346
+ metadata: {
1347
+ method: "DELETE",
1348
+ path: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}",
1349
+ stability: "beta",
1350
+ deprecated: false,
1351
+ tags: ["Buckets"]
1352
+ },
1353
+ invoke: (client, input, signal) => raw.deleteProjectBranchBucketObject({
1354
+ ...input,
1355
+ client,
1356
+ signal,
1357
+ throwOnError: true
1358
+ })
1359
+ }), client),
1360
+ "deleteProjectBranchBucketObjectsByPrefix": (client) => bindOperation(defineOperation({
1361
+ operationId: "deleteProjectBranchBucketObjectsByPrefix",
1362
+ id: "delete_project_branch_bucket_objects_by_prefix",
1363
+ title: "Delete every object under a key prefix (folder) in a bucket",
1364
+ description: "Soft-deletes every object on the specified branch whose key starts with\n`prefix`, in a single call. Intended to back a \"delete folder\" action in\nan object browser: a `prefix` of `app/avatars/` removes every object\nbeneath that folder. Served by the user's session (no customer S3\ncredentials required).\n\n`prefix` must be non-empty, end with `/`, be at most 1024 bytes, and\ncontain no control characters - a partial-segment prefix cannot\naccidentally delete sibling keys. Returns the number of objects\nsoft-deleted (`deleted`), which may be 0 when no live object matched the\nprefix on this branch.\n\nOnly objects physically present on this branch are tombstoned; objects\ninherited from an ancestor branch via copy-on-write (not materialized on\nthis branch) are out of scope.\n\n**Note**: This endpoint is currently in Beta.\n",
1365
+ inputSchema: z.strictObject({
1366
+ path: zDeleteProjectBranchBucketObjectsByPrefixPath,
1367
+ query: zDeleteProjectBranchBucketObjectsByPrefixQuery
1368
+ }),
1369
+ annotations: {
1370
+ readOnlyHint: false,
1371
+ destructiveHint: true,
1372
+ openWorldHint: true
1373
+ },
1374
+ requiresApproval: true,
1375
+ metadata: {
1376
+ method: "DELETE",
1377
+ path: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects-by-prefix",
1378
+ stability: "beta",
1379
+ deprecated: false,
1380
+ tags: ["Buckets"]
1381
+ },
1382
+ invoke: (client, input, signal) => raw.deleteProjectBranchBucketObjectsByPrefix({
1383
+ ...input,
1384
+ client,
1385
+ signal,
1386
+ throwOnError: true
1387
+ })
1388
+ }), client),
1389
+ "deleteProjectBranchDataAPI": (client) => bindOperation(defineOperation({
1390
+ operationId: "deleteProjectBranchDataAPI",
1391
+ id: "delete_project_branch_data_api",
1392
+ title: "Delete Neon Data API",
1393
+ description: "Deletes the Neon Data API for the specified branch.\nExisting connections using the Data API endpoint will fail after deletion.\n",
1394
+ inputSchema: z.strictObject({ path: zDeleteProjectBranchDataApiPath }),
1395
+ annotations: {
1396
+ readOnlyHint: false,
1397
+ destructiveHint: true,
1398
+ openWorldHint: true
1399
+ },
1400
+ requiresApproval: true,
1401
+ metadata: {
1402
+ method: "DELETE",
1403
+ path: "/projects/{project_id}/branches/{branch_id}/data-api/{database_name}",
1404
+ stability: "stable",
1405
+ deprecated: false,
1406
+ tags: ["DataAPI"]
1407
+ },
1408
+ invoke: (client, input, signal) => raw.deleteProjectBranchDataApi({
1409
+ ...input,
1410
+ client,
1411
+ signal,
1412
+ throwOnError: true
1413
+ })
1414
+ }), client),
1415
+ "deleteProjectBranchDatabase": (client) => bindOperation(defineOperation({
1416
+ operationId: "deleteProjectBranchDatabase",
1417
+ id: "delete_project_branch_database",
1418
+ title: "Delete database",
1419
+ description: "Deletes the specified database from the branch.\nFor related information, see [Manage databases](https://neon.com/docs/manage/databases/).\n",
1420
+ inputSchema: z.strictObject({ path: zDeleteProjectBranchDatabasePath }),
1421
+ annotations: {
1422
+ readOnlyHint: false,
1423
+ destructiveHint: true,
1424
+ openWorldHint: true
1425
+ },
1426
+ requiresApproval: true,
1427
+ metadata: {
1428
+ method: "DELETE",
1429
+ path: "/projects/{project_id}/branches/{branch_id}/databases/{database_name}",
1430
+ stability: "stable",
1431
+ deprecated: false,
1432
+ tags: ["Branch"]
1433
+ },
1434
+ invoke: (client, input, signal) => raw.deleteProjectBranchDatabase({
1435
+ ...input,
1436
+ client,
1437
+ signal,
1438
+ throwOnError: true
1439
+ })
1440
+ }), client),
1441
+ "deleteProjectBranchFunction": (client) => bindOperation(defineOperation({
1442
+ operationId: "deleteProjectBranchFunction",
1443
+ id: "delete_project_branch_function",
1444
+ title: "Delete a function on the branch",
1445
+ description: "Deletes the function identified by its slug.\n\n**Note**: This endpoint is currently in Beta.\n",
1446
+ inputSchema: z.strictObject({ path: zDeleteProjectBranchFunctionPath }),
1447
+ annotations: {
1448
+ readOnlyHint: false,
1449
+ destructiveHint: true,
1450
+ openWorldHint: true
1451
+ },
1452
+ requiresApproval: true,
1453
+ metadata: {
1454
+ method: "DELETE",
1455
+ path: "/projects/{project_id}/branches/{branch_id}/functions/{slug}",
1456
+ stability: "beta",
1457
+ deprecated: false,
1458
+ tags: ["Functions"]
1459
+ },
1460
+ invoke: (client, input, signal) => raw.deleteProjectBranchFunction({
1461
+ ...input,
1462
+ client,
1463
+ signal,
1464
+ throwOnError: true
1465
+ })
1466
+ }), client),
1467
+ "deleteProjectBranchRole": (client) => bindOperation(defineOperation({
1468
+ operationId: "deleteProjectBranchRole",
1469
+ id: "delete_project_branch_role",
1470
+ title: "Delete role",
1471
+ description: "Deletes the specified Postgres role from the branch.\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n",
1472
+ inputSchema: z.strictObject({ path: zDeleteProjectBranchRolePath }),
1473
+ annotations: {
1474
+ readOnlyHint: false,
1475
+ destructiveHint: true,
1476
+ openWorldHint: true
1477
+ },
1478
+ requiresApproval: true,
1479
+ metadata: {
1480
+ method: "DELETE",
1481
+ path: "/projects/{project_id}/branches/{branch_id}/roles/{role_name}",
1482
+ stability: "stable",
1483
+ deprecated: false,
1484
+ tags: ["Branch"]
1485
+ },
1486
+ invoke: (client, input, signal) => raw.deleteProjectBranchRole({
1487
+ ...input,
1488
+ client,
1489
+ signal,
1490
+ throwOnError: true
1491
+ })
1492
+ }), client),
1493
+ "deleteProjectEndpoint": (client) => bindOperation(defineOperation({
1494
+ operationId: "deleteProjectEndpoint",
1495
+ id: "delete_project_endpoint",
1496
+ title: "Delete compute endpoint",
1497
+ description: "Deletes the specified compute endpoint.\nA compute endpoint is a Neon compute instance.\nDeleting a compute endpoint drops existing network connections to the compute endpoint.\nThe deletion is completed when the last operation in the chain finishes successfully.\n\nAn `endpoint_id` has an `ep-` prefix.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n",
1498
+ inputSchema: z.strictObject({ path: zDeleteProjectEndpointPath }),
1499
+ annotations: {
1500
+ readOnlyHint: false,
1501
+ destructiveHint: true,
1502
+ openWorldHint: true
1503
+ },
1504
+ requiresApproval: true,
1505
+ metadata: {
1506
+ method: "DELETE",
1507
+ path: "/projects/{project_id}/endpoints/{endpoint_id}",
1508
+ stability: "stable",
1509
+ deprecated: false,
1510
+ tags: ["Endpoint"]
1511
+ },
1512
+ invoke: (client, input, signal) => raw.deleteProjectEndpoint({
1513
+ ...input,
1514
+ client,
1515
+ signal,
1516
+ throwOnError: true
1517
+ })
1518
+ }), client),
1519
+ "deleteProjectJWKS": (client) => bindOperation(defineOperation({
1520
+ operationId: "deleteProjectJWKS",
1521
+ id: "delete_project_jwks",
1522
+ title: "Delete JWKS URL",
1523
+ description: "Removes the specified JWKS URL from the project.\nJWTs signed by keys from the removed URL can no longer authenticate to the project's endpoints.\n",
1524
+ inputSchema: z.strictObject({ path: zDeleteProjectJwksPath }),
1525
+ annotations: {
1526
+ readOnlyHint: false,
1527
+ destructiveHint: true,
1528
+ openWorldHint: true
1529
+ },
1530
+ requiresApproval: true,
1531
+ metadata: {
1532
+ method: "DELETE",
1533
+ path: "/projects/{project_id}/jwks/{jwks_id}",
1534
+ stability: "stable",
1535
+ deprecated: false,
1536
+ tags: ["Project"]
1537
+ },
1538
+ invoke: (client, input, signal) => raw.deleteProjectJwks({
1539
+ ...input,
1540
+ client,
1541
+ signal,
1542
+ throwOnError: true
1543
+ })
1544
+ }), client),
1545
+ "deleteProjectVPCEndpoint": (client) => bindOperation(defineOperation({
1546
+ operationId: "deleteProjectVPCEndpoint",
1547
+ id: "delete_project_vpc_endpoint",
1548
+ title: "Delete VPC endpoint restriction",
1549
+ description: "Removes the specified VPC endpoint restriction from a Neon project.\n",
1550
+ inputSchema: z.strictObject({ path: zDeleteProjectVpcEndpointPath }),
1551
+ annotations: {
1552
+ readOnlyHint: false,
1553
+ destructiveHint: true,
1554
+ openWorldHint: true
1555
+ },
1556
+ requiresApproval: true,
1557
+ metadata: {
1558
+ method: "DELETE",
1559
+ path: "/projects/{project_id}/vpc_endpoints/{vpc_endpoint_id}",
1560
+ stability: "stable",
1561
+ deprecated: false,
1562
+ tags: ["Project"]
1563
+ },
1564
+ invoke: (client, input, signal) => raw.deleteProjectVpcEndpoint({
1565
+ ...input,
1566
+ client,
1567
+ signal,
1568
+ throwOnError: true
1569
+ })
1570
+ }), client),
1571
+ "deleteSnapshot": (client) => bindOperation(defineOperation({
1572
+ operationId: "deleteSnapshot",
1573
+ id: "delete_snapshot",
1574
+ title: "Delete snapshot",
1575
+ description: "Deletes the specified snapshot.\n",
1576
+ inputSchema: z.strictObject({ path: zDeleteSnapshotPath }),
1577
+ annotations: {
1578
+ readOnlyHint: false,
1579
+ destructiveHint: true,
1580
+ openWorldHint: true
1581
+ },
1582
+ requiresApproval: true,
1583
+ metadata: {
1584
+ method: "DELETE",
1585
+ path: "/projects/{project_id}/snapshots/{snapshot_id}",
1586
+ stability: "stable",
1587
+ deprecated: false,
1588
+ tags: ["Snapshot"]
1589
+ },
1590
+ invoke: (client, input, signal) => raw.deleteSnapshot({
1591
+ ...input,
1592
+ client,
1593
+ signal,
1594
+ throwOnError: true
1595
+ })
1596
+ }), client),
1597
+ "disableNeonAuth": (client) => bindOperation(defineOperation({
1598
+ operationId: "disableNeonAuth",
1599
+ id: "disable_neon_auth",
1600
+ title: "Disable Neon Auth for the branch",
1601
+ description: "Disables the Neon Auth integration for the specified branch, removing the connection\nto the authentication provider.\nIf `delete_data` is `true`, also deletes the `neon_auth` schema and all associated tables\nfrom the branch database.\nThe integration can be re-enabled by calling `POST /projects/{project_id}/branches/{branch_id}/auth`.\n",
1602
+ inputSchema: z.strictObject({
1603
+ body: zDisableNeonAuthBody.optional(),
1604
+ path: zDisableNeonAuthPath
1605
+ }),
1606
+ annotations: {
1607
+ readOnlyHint: false,
1608
+ destructiveHint: true,
1609
+ openWorldHint: true
1610
+ },
1611
+ requiresApproval: true,
1612
+ metadata: {
1613
+ method: "DELETE",
1614
+ path: "/projects/{project_id}/branches/{branch_id}/auth",
1615
+ stability: "beta",
1616
+ deprecated: false,
1617
+ tags: ["Auth"]
1618
+ },
1619
+ invoke: (client, input, signal) => raw.disableNeonAuth({
1620
+ ...input,
1621
+ client,
1622
+ signal,
1623
+ throwOnError: true
1624
+ })
1625
+ }), client),
1626
+ "finalizeRestoreBranch": (client) => bindOperation(defineOperation({
1627
+ operationId: "finalizeRestoreBranch",
1628
+ id: "finalize_restore_branch",
1629
+ title: "Finalize branch restore from snapshot",
1630
+ description: "Finalize the restore operation for a branch created from a snapshot.\nThis operation updates the branch so it functions as the original branch it replaced.\nThis includes:\n - Reassigning any computes from the original branch to the restored branch (this will restart the computes)\n - Renaming the restored branch to the original branch's name\n - Renaming the original branch so it no longer uses the original name\n\nThis operation only applies to branches created using the `restoreSnapshot` endpoint with `finalize_restore: false`.\n",
1631
+ inputSchema: z.strictObject({
1632
+ body: zFinalizeRestoreBranchBody.optional(),
1633
+ path: zFinalizeRestoreBranchPath
1634
+ }),
1635
+ annotations: {
1636
+ readOnlyHint: false,
1637
+ destructiveHint: true,
1638
+ openWorldHint: true
1639
+ },
1640
+ requiresApproval: true,
1641
+ metadata: {
1642
+ method: "POST",
1643
+ path: "/projects/{project_id}/branches/{branch_id}/finalize_restore",
1644
+ stability: "stable",
1645
+ deprecated: false,
1646
+ tags: ["Branch"]
1647
+ },
1648
+ invoke: (client, input, signal) => raw.finalizeRestoreBranch({
1649
+ ...input,
1650
+ client,
1651
+ signal,
1652
+ throwOnError: true
1653
+ })
1654
+ }), client),
1655
+ "getActiveRegions": (client) => bindOperation(defineOperation({
1656
+ operationId: "getActiveRegions",
1657
+ id: "get_active_regions",
1658
+ title: "List supported regions",
1659
+ description: "Lists supported Neon regions.\n\n**Note:** Not all regions are available to all organizations. Pass the `org_id`\nparameter to get an accurate list of regions available to your organization.\n",
1660
+ inputSchema: z.strictObject({ query: zGetActiveRegionsQuery.optional() }),
1661
+ annotations: {
1662
+ readOnlyHint: true,
1663
+ openWorldHint: true
1664
+ },
1665
+ requiresApproval: false,
1666
+ metadata: {
1667
+ method: "GET",
1668
+ path: "/regions",
1669
+ stability: "stable",
1670
+ deprecated: false,
1671
+ tags: ["Region"]
1672
+ },
1673
+ invoke: (client, input, signal) => raw.getActiveRegions({
1674
+ ...input,
1675
+ client,
1676
+ signal,
1677
+ throwOnError: true
1678
+ })
1679
+ }), client),
1680
+ "getAnonymizedBranchStatus": (client) => bindOperation(defineOperation({
1681
+ operationId: "getAnonymizedBranchStatus",
1682
+ id: "get_anonymized_branch_status",
1683
+ title: "Retrieve anonymized branch status",
1684
+ description: "Retrieves the current status of an anonymized branch, including its state and progress information.\nThis endpoint allows you to monitor the anonymization process from initialization through completion.\nOnly anonymized branches will have status information available.\n\n**Note**: This endpoint is currently in Beta.\n",
1685
+ inputSchema: z.strictObject({ path: zGetAnonymizedBranchStatusPath }),
1686
+ annotations: {
1687
+ readOnlyHint: true,
1688
+ openWorldHint: true
1689
+ },
1690
+ requiresApproval: false,
1691
+ metadata: {
1692
+ method: "GET",
1693
+ path: "/projects/{project_id}/branches/{branch_id}/anonymized_status",
1694
+ stability: "stable",
1695
+ deprecated: false,
1696
+ tags: ["Branch"]
1697
+ },
1698
+ invoke: (client, input, signal) => raw.getAnonymizedBranchStatus({
1699
+ ...input,
1700
+ client,
1701
+ signal,
1702
+ throwOnError: true
1703
+ })
1704
+ }), client),
1705
+ "getAuthDetails": (client) => bindOperation(defineOperation({
1706
+ operationId: "getAuthDetails",
1707
+ id: "get_auth_details",
1708
+ title: "Retrieve request authentication details",
1709
+ description: "Returns authentication details for the credentials used in the request,\nincluding the credential type (API key, Bearer token, or OAuth session)\nand the associated identity.\n",
1710
+ inputSchema: z.strictObject({}),
1711
+ annotations: {
1712
+ readOnlyHint: true,
1713
+ openWorldHint: true
1714
+ },
1715
+ requiresApproval: false,
1716
+ metadata: {
1717
+ method: "GET",
1718
+ path: "/auth",
1719
+ stability: "stable",
1720
+ deprecated: false,
1721
+ tags: ["Users"]
1722
+ },
1723
+ invoke: (client, input, signal) => raw.getAuthDetails({
1724
+ ...input,
1725
+ client,
1726
+ signal,
1727
+ throwOnError: true
1728
+ })
1729
+ }), client),
1730
+ "getAvailablePreloadLibraries": (client) => bindOperation(defineOperation({
1731
+ operationId: "getAvailablePreloadLibraries",
1732
+ id: "get_available_preload_libraries",
1733
+ title: "List available shared preload libraries",
1734
+ description: "Returns the shared preload libraries available for the specified project's Postgres version.\nShared preload libraries are Postgres extensions that require the `shared_preload_libraries`\nsetting and a compute restart to activate.\nUse this list to determine which libraries can be enabled in the project's\n`settings.preload_libraries` configuration.\n",
1735
+ inputSchema: z.strictObject({ path: zGetAvailablePreloadLibrariesPath }),
1736
+ annotations: {
1737
+ readOnlyHint: true,
1738
+ openWorldHint: true
1739
+ },
1740
+ requiresApproval: false,
1741
+ metadata: {
1742
+ method: "GET",
1743
+ path: "/projects/{project_id}/available_preload_libraries",
1744
+ stability: "stable",
1745
+ deprecated: false,
1746
+ tags: ["Project"]
1747
+ },
1748
+ invoke: (client, input, signal) => raw.getAvailablePreloadLibraries({
1749
+ ...input,
1750
+ client,
1751
+ signal,
1752
+ throwOnError: true
1753
+ })
1754
+ }), client),
1755
+ "getConnectionURI": (client) => bindOperation(defineOperation({
1756
+ operationId: "getConnectionURI",
1757
+ id: "get_connection_uri",
1758
+ title: "Retrieve connection URI",
1759
+ description: "Retrieves a connection URI for the specified database.\nThe URI uses the standard PostgreSQL connection string format. Set `pooled=true` to include the `-pooler` suffix for a connection pooler URI.\n",
1760
+ inputSchema: z.strictObject({
1761
+ path: zGetConnectionUriPath,
1762
+ query: zGetConnectionUriQuery
1763
+ }),
1764
+ annotations: {
1765
+ readOnlyHint: true,
1766
+ openWorldHint: true
1767
+ },
1768
+ requiresApproval: true,
1769
+ metadata: {
1770
+ method: "GET",
1771
+ path: "/projects/{project_id}/connection_uri",
1772
+ stability: "stable",
1773
+ deprecated: false,
1774
+ tags: ["Project"]
1775
+ },
1776
+ invoke: (client, input, signal) => raw.getConnectionUri({
1777
+ ...input,
1778
+ client,
1779
+ signal,
1780
+ throwOnError: true
1781
+ })
1782
+ }), client),
1783
+ "getConsumptionHistoryPerBranchV2": (client) => bindOperation(defineOperation({
1784
+ operationId: "getConsumptionHistoryPerBranchV2",
1785
+ id: "get_consumption_history_per_branch_v2",
1786
+ title: "Retrieve branch consumption metrics",
1787
+ description: "Returns consumption metrics for each branch across one or more projects listed in\n`project_ids` (1 to 100 projects). Available for accounts on paid usage-based Launch, Scale,\nAgent, and Enterprise plans.\n\nHistory starts when the account first ingests branch-level consumption data.\n\nThe `metrics` query parameter is required. Only these six values are supported on this\nendpoint:\n`compute_unit_seconds`, `root_branch_bytes_month`, `child_branch_bytes_month`,\n`instant_restore_bytes_month`, `public_network_transfer_bytes`, `private_network_transfer_bytes`.\n\nThis endpoint does not support `extra_branches_month` or `snapshot_storage_bytes_month`.\nUse `GET /consumption_history/v2/projects` for those.\n\nConsumption metrics within each branch are returned in ascending time order (oldest first).\nThis request does not wake project computes.\n",
1788
+ inputSchema: z.strictObject({ query: zGetConsumptionHistoryPerBranchV2Query }),
1789
+ annotations: {
1790
+ readOnlyHint: true,
1791
+ openWorldHint: true
1792
+ },
1793
+ requiresApproval: false,
1794
+ metadata: {
1795
+ method: "GET",
1796
+ path: "/consumption_history/v2/branches",
1797
+ stability: "beta",
1798
+ deprecated: false,
1799
+ tags: ["Consumption"]
1800
+ },
1801
+ invoke: (client, input, signal) => raw.getConsumptionHistoryPerBranchV2({
1802
+ ...input,
1803
+ client,
1804
+ signal,
1805
+ throwOnError: true
1806
+ })
1807
+ }), client),
1808
+ "getConsumptionHistoryPerProject": (client) => bindOperation(defineOperation({
1809
+ operationId: "getConsumptionHistoryPerProject",
1810
+ id: "get_consumption_history_per_project",
1811
+ title: "Retrieve project consumption metrics (legacy plans)",
1812
+ description: "Retrieves consumption metrics for Scale, Business, and Enterprise plan projects. History begins at the time of upgrade.\nResults are ordered by time in ascending order (oldest to newest).\nIssuing a call to this API does not wake a project's compute endpoint.\n",
1813
+ inputSchema: z.strictObject({ query: zGetConsumptionHistoryPerProjectQuery }),
1814
+ annotations: {
1815
+ readOnlyHint: true,
1816
+ openWorldHint: true
1817
+ },
1818
+ requiresApproval: false,
1819
+ metadata: {
1820
+ method: "GET",
1821
+ path: "/consumption_history/projects",
1822
+ stability: "stable",
1823
+ deprecated: false,
1824
+ tags: ["Consumption"]
1825
+ },
1826
+ invoke: (client, input, signal) => raw.getConsumptionHistoryPerProject({
1827
+ ...input,
1828
+ client,
1829
+ signal,
1830
+ throwOnError: true
1831
+ })
1832
+ }), client),
1833
+ "getConsumptionHistoryPerProjectV2": (client) => bindOperation(defineOperation({
1834
+ operationId: "getConsumptionHistoryPerProjectV2",
1835
+ id: "get_consumption_history_per_project_v2",
1836
+ title: "Retrieve project consumption metrics",
1837
+ description: "Returns consumption metrics for up to `limit` projects per page. If `project_ids` is omitted,\nprojects in the organization are included across pages (use `cursor`). If `project_ids` is\nprovided, the response is limited to those projects (up to 100). Available for accounts on\nLaunch, Scale, Agent, Business, and Enterprise plans.\n\nHistory starts when the account upgrades to an eligible plan.\n\nThe `metrics` query parameter is required. Supported values:\n`compute_unit_seconds`, `root_branch_bytes_month`, `child_branch_bytes_month`,\n`instant_restore_bytes_month`, `public_network_transfer_bytes`, `private_network_transfer_bytes`,\n`extra_branches_month`, `snapshot_storage_bytes_month`.\n\nConsumption metrics within each project are returned in ascending time order (oldest first).\nThis request does not wake project computes.\n",
1838
+ inputSchema: z.strictObject({ query: zGetConsumptionHistoryPerProjectV2Query }),
1839
+ annotations: {
1840
+ readOnlyHint: true,
1841
+ openWorldHint: true
1842
+ },
1843
+ requiresApproval: false,
1844
+ metadata: {
1845
+ method: "GET",
1846
+ path: "/consumption_history/v2/projects",
1847
+ stability: "stable",
1848
+ deprecated: false,
1849
+ tags: ["Consumption"]
1850
+ },
1851
+ invoke: (client, input, signal) => raw.getConsumptionHistoryPerProjectV2({
1852
+ ...input,
1853
+ client,
1854
+ signal,
1855
+ throwOnError: true
1856
+ })
1857
+ }), client),
1858
+ "getCurrentUserInfo": (client) => bindOperation(defineOperation({
1859
+ operationId: "getCurrentUserInfo",
1860
+ id: "get_current_user_info",
1861
+ title: "Retrieve current user details",
1862
+ description: "Retrieves information about the currently authenticated Neon user,\nincluding account identifiers, plan details, and linked auth accounts.\n",
1863
+ inputSchema: z.strictObject({}),
1864
+ annotations: {
1865
+ readOnlyHint: true,
1866
+ openWorldHint: true
1867
+ },
1868
+ requiresApproval: false,
1869
+ metadata: {
1870
+ method: "GET",
1871
+ path: "/users/me",
1872
+ stability: "stable",
1873
+ deprecated: false,
1874
+ tags: ["Users"]
1875
+ },
1876
+ invoke: (client, input, signal) => raw.getCurrentUserInfo({
1877
+ ...input,
1878
+ client,
1879
+ signal,
1880
+ throwOnError: true
1881
+ })
1882
+ }), client),
1883
+ "getCurrentUserOrganizations": (client) => bindOperation(defineOperation({
1884
+ operationId: "getCurrentUserOrganizations",
1885
+ id: "get_current_user_organizations",
1886
+ title: "List organizations for the current user",
1887
+ description: "Retrieves the organizations that the currently authenticated user belongs to.\n\nWhen called with an organization- or project-scoped API key (which is not\ntied to a user), this returns the single organization that owns the key.\n",
1888
+ inputSchema: z.strictObject({}),
1889
+ annotations: {
1890
+ readOnlyHint: true,
1891
+ openWorldHint: true
1892
+ },
1893
+ requiresApproval: false,
1894
+ metadata: {
1895
+ method: "GET",
1896
+ path: "/users/me/organizations",
1897
+ stability: "stable",
1898
+ deprecated: false,
1899
+ tags: ["Users", "Organizations"]
1900
+ },
1901
+ invoke: (client, input, signal) => raw.getCurrentUserOrganizations({
1902
+ ...input,
1903
+ client,
1904
+ signal,
1905
+ throwOnError: true
1906
+ })
1907
+ }), client),
1908
+ "getMaskingRules": (client) => bindOperation(defineOperation({
1909
+ operationId: "getMaskingRules",
1910
+ id: "get_masking_rules",
1911
+ title: "Retrieve masking rules",
1912
+ description: "Retrieves the masking rules for the specified anonymized branch.\nMasking rules define how sensitive data should be anonymized using PostgreSQL Anonymizer.\n\n**Note**: This endpoint is currently in Beta.\n",
1913
+ inputSchema: z.strictObject({ path: zGetMaskingRulesPath }),
1914
+ annotations: {
1915
+ readOnlyHint: true,
1916
+ openWorldHint: true
1917
+ },
1918
+ requiresApproval: false,
1919
+ metadata: {
1920
+ method: "GET",
1921
+ path: "/projects/{project_id}/branches/{branch_id}/masking_rules",
1922
+ stability: "stable",
1923
+ deprecated: false,
1924
+ tags: ["Branch"]
1925
+ },
1926
+ invoke: (client, input, signal) => raw.getMaskingRules({
1927
+ ...input,
1928
+ client,
1929
+ signal,
1930
+ throwOnError: true
1931
+ })
1932
+ }), client),
1933
+ "getNeonAuth": (client) => bindOperation(defineOperation({
1934
+ operationId: "getNeonAuth",
1935
+ id: "get_neon_auth",
1936
+ title: "Retrieve Neon Auth details for the branch",
1937
+ description: "Retrieves the Neon Auth integration details for the specified branch,\nincluding the auth provider type and integration status.\n",
1938
+ inputSchema: z.strictObject({ path: zGetNeonAuthPath }),
1939
+ annotations: {
1940
+ readOnlyHint: true,
1941
+ openWorldHint: true
1942
+ },
1943
+ requiresApproval: false,
1944
+ metadata: {
1945
+ method: "GET",
1946
+ path: "/projects/{project_id}/branches/{branch_id}/auth",
1947
+ stability: "beta",
1948
+ deprecated: false,
1949
+ tags: ["Auth"]
1950
+ },
1951
+ invoke: (client, input, signal) => raw.getNeonAuth({
1952
+ ...input,
1953
+ client,
1954
+ signal,
1955
+ throwOnError: true
1956
+ })
1957
+ }), client),
1958
+ "getNeonAuthAllowLocalhost": (client) => bindOperation(defineOperation({
1959
+ operationId: "getNeonAuthAllowLocalhost",
1960
+ id: "get_neon_auth_allow_localhost",
1961
+ title: "Retrieve localhost allow setting",
1962
+ description: "Retrieves the localhost allow setting for the specified branch's Neon Auth integration.\nWhen enabled, authentication flows work from `localhost` without adding it to the redirect URI whitelist.\n",
1963
+ inputSchema: z.strictObject({ path: zGetNeonAuthAllowLocalhostPath }),
1964
+ annotations: {
1965
+ readOnlyHint: true,
1966
+ openWorldHint: true
1967
+ },
1968
+ requiresApproval: false,
1969
+ metadata: {
1970
+ method: "GET",
1971
+ path: "/projects/{project_id}/branches/{branch_id}/auth/allow_localhost",
1972
+ stability: "stable",
1973
+ deprecated: false,
1974
+ tags: ["Auth"]
1975
+ },
1976
+ invoke: (client, input, signal) => raw.getNeonAuthAllowLocalhost({
1977
+ ...input,
1978
+ client,
1979
+ signal,
1980
+ throwOnError: true
1981
+ })
1982
+ }), client),
1983
+ "getNeonAuthEmailAndPasswordConfig": (client) => bindOperation(defineOperation({
1984
+ operationId: "getNeonAuthEmailAndPasswordConfig",
1985
+ id: "get_neon_auth_email_and_password_config",
1986
+ title: "Retrieve email and password configuration",
1987
+ description: "Retrieves the email and password authentication configuration for the specified branch's Neon Auth integration,\nincluding whether it is enabled and the email verification method.\n",
1988
+ inputSchema: z.strictObject({ path: zGetNeonAuthEmailAndPasswordConfigPath }),
1989
+ annotations: {
1990
+ readOnlyHint: true,
1991
+ openWorldHint: true
1992
+ },
1993
+ requiresApproval: false,
1994
+ metadata: {
1995
+ method: "GET",
1996
+ path: "/projects/{project_id}/branches/{branch_id}/auth/email_and_password",
1997
+ stability: "stable",
1998
+ deprecated: false,
1999
+ tags: ["Auth"]
2000
+ },
2001
+ invoke: (client, input, signal) => raw.getNeonAuthEmailAndPasswordConfig({
2002
+ ...input,
2003
+ client,
2004
+ signal,
2005
+ throwOnError: true
2006
+ })
2007
+ }), client),
2008
+ "getNeonAuthEmailProvider": (client) => bindOperation(defineOperation({
2009
+ operationId: "getNeonAuthEmailProvider",
2010
+ id: "get_neon_auth_email_provider",
2011
+ title: "Retrieve email provider configuration",
2012
+ description: "Retrieves the email provider configuration for the specified branch's Neon Auth integration,\nincluding the provider type and server settings.\n",
2013
+ inputSchema: z.strictObject({ path: zGetNeonAuthEmailProviderPath }),
2014
+ annotations: {
2015
+ readOnlyHint: true,
2016
+ openWorldHint: true
2017
+ },
2018
+ requiresApproval: true,
2019
+ metadata: {
2020
+ method: "GET",
2021
+ path: "/projects/{project_id}/branches/{branch_id}/auth/email_provider",
2022
+ stability: "stable",
2023
+ deprecated: false,
2024
+ tags: ["Auth"]
2025
+ },
2026
+ invoke: (client, input, signal) => raw.getNeonAuthEmailProvider({
2027
+ ...input,
2028
+ client,
2029
+ signal,
2030
+ throwOnError: true
2031
+ })
2032
+ }), client),
2033
+ "getNeonAuthEmailServer": (client) => bindOperation(defineOperation({
2034
+ operationId: "getNeonAuthEmailServer",
2035
+ id: "get_neon_auth_email_server",
2036
+ title: "Retrieve email server configuration",
2037
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/email_provider` instead. Removal scheduled for March 1, 2026.\n",
2038
+ inputSchema: z.strictObject({ path: zGetNeonAuthEmailServerPath }),
2039
+ annotations: {
2040
+ readOnlyHint: true,
2041
+ openWorldHint: true
2042
+ },
2043
+ requiresApproval: true,
2044
+ metadata: {
2045
+ method: "GET",
2046
+ path: "/projects/{project_id}/auth/email_server",
2047
+ stability: "stable",
2048
+ deprecated: true,
2049
+ tags: ["Auth (legacy)"]
2050
+ },
2051
+ invoke: (client, input, signal) => raw.getNeonAuthEmailServer({
2052
+ ...input,
2053
+ client,
2054
+ signal,
2055
+ throwOnError: true
2056
+ })
2057
+ }), client),
2058
+ "getNeonAuthPhoneNumberPlugin": (client) => bindOperation(defineOperation({
2059
+ operationId: "getNeonAuthPhoneNumberPlugin",
2060
+ id: "get_neon_auth_phone_number_plugin",
2061
+ title: "Retrieve phone number plugin configuration",
2062
+ description: "Returns the phone number plugin configuration for Neon Auth.\nThe phone number plugin enables phone-based OTP authentication.\n",
2063
+ inputSchema: z.strictObject({ path: zGetNeonAuthPhoneNumberPluginPath }),
2064
+ annotations: {
2065
+ readOnlyHint: true,
2066
+ openWorldHint: true
2067
+ },
2068
+ requiresApproval: false,
2069
+ metadata: {
2070
+ method: "GET",
2071
+ path: "/projects/{project_id}/branches/{branch_id}/auth/plugins/phone-number",
2072
+ stability: "stable",
2073
+ deprecated: false,
2074
+ tags: ["Auth"]
2075
+ },
2076
+ invoke: (client, input, signal) => raw.getNeonAuthPhoneNumberPlugin({
2077
+ ...input,
2078
+ client,
2079
+ signal,
2080
+ throwOnError: true
2081
+ })
2082
+ }), client),
2083
+ "getNeonAuthPluginConfigs": (client) => bindOperation(defineOperation({
2084
+ operationId: "getNeonAuthPluginConfigs",
2085
+ id: "get_neon_auth_plugin_configs",
2086
+ title: "Retrieve Neon Auth plugin configurations",
2087
+ description: "Returns all plugin configurations for Neon Auth in a single response.\nThis endpoint aggregates organization, email provider, email and password,\nOAuth providers, and localhost settings.\n",
2088
+ inputSchema: z.strictObject({ path: zGetNeonAuthPluginConfigsPath }),
2089
+ annotations: {
2090
+ readOnlyHint: true,
2091
+ openWorldHint: true
2092
+ },
2093
+ requiresApproval: true,
2094
+ metadata: {
2095
+ method: "GET",
2096
+ path: "/projects/{project_id}/branches/{branch_id}/auth/plugins",
2097
+ stability: "stable",
2098
+ deprecated: false,
2099
+ tags: ["Auth"]
2100
+ },
2101
+ invoke: (client, input, signal) => raw.getNeonAuthPluginConfigs({
2102
+ ...input,
2103
+ client,
2104
+ signal,
2105
+ throwOnError: true
2106
+ })
2107
+ }), client),
2108
+ "getNeonAuthWebhookConfig": (client) => bindOperation(defineOperation({
2109
+ operationId: "getNeonAuthWebhookConfig",
2110
+ id: "get_neon_auth_webhook_config",
2111
+ title: "Retrieve Neon Auth webhook configuration",
2112
+ description: "Returns the webhook configuration for the specified branch's Neon Auth integration,\nincluding the endpoint URL and the events that trigger it.\n",
2113
+ inputSchema: z.strictObject({ path: zGetNeonAuthWebhookConfigPath }),
2114
+ annotations: {
2115
+ readOnlyHint: true,
2116
+ openWorldHint: true
2117
+ },
2118
+ requiresApproval: false,
2119
+ metadata: {
2120
+ method: "GET",
2121
+ path: "/projects/{project_id}/branches/{branch_id}/auth/webhooks",
2122
+ stability: "stable",
2123
+ deprecated: false,
2124
+ tags: ["Auth"]
2125
+ },
2126
+ invoke: (client, input, signal) => raw.getNeonAuthWebhookConfig({
2127
+ ...input,
2128
+ client,
2129
+ signal,
2130
+ throwOnError: true
2131
+ })
2132
+ }), client),
2133
+ "getOrganization": (client) => bindOperation(defineOperation({
2134
+ operationId: "getOrganization",
2135
+ id: "get_organization",
2136
+ title: "Retrieve organization details",
2137
+ description: "Retrieves details for the specified organization, including its name, plan, and configuration.\n",
2138
+ inputSchema: z.strictObject({ path: zGetOrganizationPath }),
2139
+ annotations: {
2140
+ readOnlyHint: true,
2141
+ openWorldHint: true
2142
+ },
2143
+ requiresApproval: false,
2144
+ metadata: {
2145
+ method: "GET",
2146
+ path: "/organizations/{org_id}",
2147
+ stability: "stable",
2148
+ deprecated: false,
2149
+ tags: ["Organizations"]
2150
+ },
2151
+ invoke: (client, input, signal) => raw.getOrganization({
2152
+ ...input,
2153
+ client,
2154
+ signal,
2155
+ throwOnError: true
2156
+ })
2157
+ }), client),
2158
+ "getOrganizationInvitations": (client) => bindOperation(defineOperation({
2159
+ operationId: "getOrganizationInvitations",
2160
+ id: "get_organization_invitations",
2161
+ title: "List organization invitations",
2162
+ description: "Retrieves pending and accepted invitations for the specified organization.\n",
2163
+ inputSchema: z.strictObject({ path: zGetOrganizationInvitationsPath }),
2164
+ annotations: {
2165
+ readOnlyHint: true,
2166
+ openWorldHint: true
2167
+ },
2168
+ requiresApproval: false,
2169
+ metadata: {
2170
+ method: "GET",
2171
+ path: "/organizations/{org_id}/invitations",
2172
+ stability: "stable",
2173
+ deprecated: false,
2174
+ tags: ["Organizations"]
2175
+ },
2176
+ invoke: (client, input, signal) => raw.getOrganizationInvitations({
2177
+ ...input,
2178
+ client,
2179
+ signal,
2180
+ throwOnError: true
2181
+ })
2182
+ }), client),
2183
+ "getOrganizationMember": (client) => bindOperation(defineOperation({
2184
+ operationId: "getOrganizationMember",
2185
+ id: "get_organization_member",
2186
+ title: "Retrieve organization member details",
2187
+ description: "Retrieves information about the specified organization member.\n",
2188
+ inputSchema: z.strictObject({ path: zGetOrganizationMemberPath }),
2189
+ annotations: {
2190
+ readOnlyHint: true,
2191
+ openWorldHint: true
2192
+ },
2193
+ requiresApproval: false,
2194
+ metadata: {
2195
+ method: "GET",
2196
+ path: "/organizations/{org_id}/members/{member_id}",
2197
+ stability: "stable",
2198
+ deprecated: false,
2199
+ tags: ["Organizations"]
2200
+ },
2201
+ invoke: (client, input, signal) => raw.getOrganizationMember({
2202
+ ...input,
2203
+ client,
2204
+ signal,
2205
+ throwOnError: true
2206
+ })
2207
+ }), client),
2208
+ "getOrganizationMembers": (client) => bindOperation(defineOperation({
2209
+ operationId: "getOrganizationMembers",
2210
+ id: "get_organization_members",
2211
+ title: "List organization members",
2212
+ description: "Retrieves a paginated list of members for the specified organization.\n",
2213
+ inputSchema: z.strictObject({
2214
+ path: zGetOrganizationMembersPath,
2215
+ query: zGetOrganizationMembersQuery.optional()
2216
+ }),
2217
+ annotations: {
2218
+ readOnlyHint: true,
2219
+ openWorldHint: true
2220
+ },
2221
+ requiresApproval: false,
2222
+ metadata: {
2223
+ method: "GET",
2224
+ path: "/organizations/{org_id}/members",
2225
+ stability: "stable",
2226
+ deprecated: false,
2227
+ tags: ["Organizations"]
2228
+ },
2229
+ invoke: (client, input, signal) => raw.getOrganizationMembers({
2230
+ ...input,
2231
+ client,
2232
+ signal,
2233
+ throwOnError: true
2234
+ })
2235
+ }), client),
2236
+ "getOrganizationSpendingLimit": (client) => bindOperation(defineOperation({
2237
+ operationId: "getOrganizationSpendingLimit",
2238
+ id: "get_organization_spending_limit",
2239
+ title: "Retrieve organization spending limit",
2240
+ description: "Returns the configured monthly spending limit for the specified organization.\n`spending_limit_cents: null` indicates that no limit is currently set.\nAvailable to organization members with read access on Launch and Scale plans only.\n",
2241
+ inputSchema: z.strictObject({ path: zGetOrganizationSpendingLimitPath }),
2242
+ annotations: {
2243
+ readOnlyHint: true,
2244
+ openWorldHint: true
2245
+ },
2246
+ requiresApproval: false,
2247
+ metadata: {
2248
+ method: "GET",
2249
+ path: "/organizations/{org_id}/billing/spending_limit",
2250
+ stability: "beta",
2251
+ deprecated: false,
2252
+ tags: ["Organizations"]
2253
+ },
2254
+ invoke: (client, input, signal) => raw.getOrganizationSpendingLimit({
2255
+ ...input,
2256
+ client,
2257
+ signal,
2258
+ throwOnError: true
2259
+ })
2260
+ }), client),
2261
+ "getOrganizationVPCEndpointDetails": (client) => bindOperation(defineOperation({
2262
+ operationId: "getOrganizationVPCEndpointDetails",
2263
+ id: "get_organization_vpc_endpoint_details",
2264
+ title: "Retrieve VPC endpoint details",
2265
+ description: "Retrieves the current state and configuration details of a specified VPC endpoint.\n",
2266
+ inputSchema: z.strictObject({ path: zGetOrganizationVpcEndpointDetailsPath }),
2267
+ annotations: {
2268
+ readOnlyHint: true,
2269
+ openWorldHint: true
2270
+ },
2271
+ requiresApproval: false,
2272
+ metadata: {
2273
+ method: "GET",
2274
+ path: "/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}",
2275
+ stability: "stable",
2276
+ deprecated: false,
2277
+ tags: ["Organizations"]
2278
+ },
2279
+ invoke: (client, input, signal) => raw.getOrganizationVpcEndpointDetails({
2280
+ ...input,
2281
+ client,
2282
+ signal,
2283
+ throwOnError: true
2284
+ })
2285
+ }), client),
2286
+ "getProject": (client) => bindOperation(defineOperation({
2287
+ operationId: "getProject",
2288
+ id: "get_project",
2289
+ title: "Retrieve project details",
2290
+ description: "Retrieves information about the specified project.\nReturned details include the project settings, compute configuration, history retention, owner information, and current usage metrics.\n",
2291
+ inputSchema: z.strictObject({ path: zGetProjectPath }),
2292
+ annotations: {
2293
+ readOnlyHint: true,
2294
+ openWorldHint: true
2295
+ },
2296
+ requiresApproval: false,
2297
+ metadata: {
2298
+ method: "GET",
2299
+ path: "/projects/{project_id}",
2300
+ stability: "stable",
2301
+ deprecated: false,
2302
+ tags: ["Project"]
2303
+ },
2304
+ invoke: (client, input, signal) => raw.getProject({
2305
+ ...input,
2306
+ client,
2307
+ signal,
2308
+ throwOnError: true
2309
+ })
2310
+ }), client),
2311
+ "getProjectAdvisorSecurityIssues": (client) => bindOperation(defineOperation({
2312
+ operationId: "getProjectAdvisorSecurityIssues",
2313
+ id: "get_project_advisor_security_issues",
2314
+ title: "Get advisor issues",
2315
+ description: "Analyzes the database for security and performance issues.\nReturns a list of issues categorized by severity (ERROR, WARN, INFO).\n\nRequires read access to the project and Data API enabled.\n",
2316
+ inputSchema: z.strictObject({
2317
+ path: zGetProjectAdvisorSecurityIssuesPath,
2318
+ query: zGetProjectAdvisorSecurityIssuesQuery.optional()
2319
+ }),
2320
+ annotations: {
2321
+ readOnlyHint: true,
2322
+ openWorldHint: true
2323
+ },
2324
+ requiresApproval: false,
2325
+ metadata: {
2326
+ method: "GET",
2327
+ path: "/projects/{project_id}/advisors",
2328
+ stability: "alpha",
2329
+ deprecated: false,
2330
+ tags: ["Project"]
2331
+ },
2332
+ invoke: (client, input, signal) => raw.getProjectAdvisorSecurityIssues({
2333
+ ...input,
2334
+ client,
2335
+ signal,
2336
+ throwOnError: true
2337
+ })
2338
+ }), client),
2339
+ "getProjectBranch": (client) => bindOperation(defineOperation({
2340
+ operationId: "getProjectBranch",
2341
+ id: "get_project_branch",
2342
+ title: "Retrieve branch details",
2343
+ description: "Retrieves information about the specified branch.\nA `branch_id` value has a `br-` prefix.\n\nEach Neon project is initially created with a root and default branch named `main`.\nA project can contain one or more branches.\nA parent branch is identified by a `parent_id` value, which is the `id` of the parent branch.\nFor related information, see [Manage branches](https://neon.com/docs/manage/branches/).\n",
2344
+ inputSchema: z.strictObject({ path: zGetProjectBranchPath }),
2345
+ annotations: {
2346
+ readOnlyHint: true,
2347
+ openWorldHint: true
2348
+ },
2349
+ requiresApproval: false,
2350
+ metadata: {
2351
+ method: "GET",
2352
+ path: "/projects/{project_id}/branches/{branch_id}",
2353
+ stability: "stable",
2354
+ deprecated: false,
2355
+ tags: ["Branch"]
2356
+ },
2357
+ invoke: (client, input, signal) => raw.getProjectBranch({
2358
+ ...input,
2359
+ client,
2360
+ signal,
2361
+ throwOnError: true
2362
+ })
2363
+ }), client),
2364
+ "getProjectBranchAiGateway": (client) => bindOperation(defineOperation({
2365
+ operationId: "getProjectBranchAiGateway",
2366
+ id: "get_project_branch_ai_gateway",
2367
+ title: "Get branch AI Gateway endpoint",
2368
+ description: "Returns the AI Gateway endpoint host for the specified branch, used to\nrender code-snippet base URLs. A 200 response means the branch is\nregistered and this region serves the AI gateway. A 404 response\nincludes a `reason` field indicating why the gateway is unavailable.\n\n**Note**: This endpoint is currently in Beta.\n",
2369
+ inputSchema: z.strictObject({ path: zGetProjectBranchAiGatewayPath }),
2370
+ annotations: {
2371
+ readOnlyHint: true,
2372
+ openWorldHint: true
2373
+ },
2374
+ requiresApproval: false,
2375
+ metadata: {
2376
+ method: "GET",
2377
+ path: "/projects/{project_id}/branches/{branch_id}/ai_gateway",
2378
+ stability: "beta",
2379
+ deprecated: false,
2380
+ tags: ["AI Gateway"]
2381
+ },
2382
+ invoke: (client, input, signal) => raw.getProjectBranchAiGateway({
2383
+ ...input,
2384
+ client,
2385
+ signal,
2386
+ throwOnError: true
2387
+ })
2388
+ }), client),
2389
+ "getProjectBranchBucketObject": (client) => bindOperation(defineOperation({
2390
+ operationId: "getProjectBranchBucketObject",
2391
+ id: "get_project_branch_bucket_object",
2392
+ title: "Download an object's bytes",
2393
+ description: "Streams the raw bytes of the named object from the bucket on the\nspecified branch, including objects inherited from ancestor branches.\nServed by the user's session (no customer S3 credentials required).\n\nThe body is returned as `application/octet-stream` so a browser treats\nit as a download; the `Content-Length` and `ETag` response headers echo\nthe stored object metadata.\n\nBINARY-STREAM EXCEPTION TO THE BUILD-GENERATED-TYPES RULE (#7029): the\nsuccessful 200 body is the raw object stream, proxied verbatim from the\nplatform object storage admin endpoint. It is modeled as an\n`application/octet-stream` binary body (not a JSON response schema) and\nis streamed without buffering the whole object in memory. Error\nresponses still use the generated `GeneralError` shape.\n\n**Note**: This endpoint is currently in Beta.\n",
2394
+ inputSchema: z.strictObject({ path: zGetProjectBranchBucketObjectPath }),
2395
+ annotations: {
2396
+ readOnlyHint: true,
2397
+ openWorldHint: true
2398
+ },
2399
+ requiresApproval: false,
2400
+ metadata: {
2401
+ method: "GET",
2402
+ path: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/download",
2403
+ stability: "beta",
2404
+ deprecated: false,
2405
+ tags: ["Buckets"]
2406
+ },
2407
+ invoke: (client, input, signal) => raw.getProjectBranchBucketObject({
2408
+ ...input,
2409
+ client,
2410
+ signal,
2411
+ throwOnError: true
2412
+ })
2413
+ }), client),
2414
+ "getProjectBranchDataAPI": (client) => bindOperation(defineOperation({
2415
+ operationId: "getProjectBranchDataAPI",
2416
+ id: "get_project_branch_data_api",
2417
+ title: "Retrieve Neon Data API configuration",
2418
+ description: "Retrieves the Neon Data API configuration for the specified branch,\nincluding endpoint URL, enabled state, and database settings.\n",
2419
+ inputSchema: z.strictObject({ path: zGetProjectBranchDataApiPath }),
2420
+ annotations: {
2421
+ readOnlyHint: true,
2422
+ openWorldHint: true
2423
+ },
2424
+ requiresApproval: false,
2425
+ metadata: {
2426
+ method: "GET",
2427
+ path: "/projects/{project_id}/branches/{branch_id}/data-api/{database_name}",
2428
+ stability: "stable",
2429
+ deprecated: false,
2430
+ tags: ["DataAPI"]
2431
+ },
2432
+ invoke: (client, input, signal) => raw.getProjectBranchDataApi({
2433
+ ...input,
2434
+ client,
2435
+ signal,
2436
+ throwOnError: true
2437
+ })
2438
+ }), client),
2439
+ "getProjectBranchDatabase": (client) => bindOperation(defineOperation({
2440
+ operationId: "getProjectBranchDatabase",
2441
+ id: "get_project_branch_database",
2442
+ title: "Retrieve database details",
2443
+ description: "Retrieves information about the specified database.\nFor related information, see [Manage databases](https://neon.com/docs/manage/databases/).\n",
2444
+ inputSchema: z.strictObject({ path: zGetProjectBranchDatabasePath }),
2445
+ annotations: {
2446
+ readOnlyHint: true,
2447
+ openWorldHint: true
2448
+ },
2449
+ requiresApproval: false,
2450
+ metadata: {
2451
+ method: "GET",
2452
+ path: "/projects/{project_id}/branches/{branch_id}/databases/{database_name}",
2453
+ stability: "stable",
2454
+ deprecated: false,
2455
+ tags: ["Branch"]
2456
+ },
2457
+ invoke: (client, input, signal) => raw.getProjectBranchDatabase({
2458
+ ...input,
2459
+ client,
2460
+ signal,
2461
+ throwOnError: true
2462
+ })
2463
+ }), client),
2464
+ "getProjectBranchFunction": (client) => bindOperation(defineOperation({
2465
+ operationId: "getProjectBranchFunction",
2466
+ id: "get_project_branch_function",
2467
+ title: "Get function details",
2468
+ description: "Returns the function identified by its slug.\n\n**Note**: This endpoint is currently in Beta.\n",
2469
+ inputSchema: z.strictObject({ path: zGetProjectBranchFunctionPath }),
2470
+ annotations: {
2471
+ readOnlyHint: true,
2472
+ openWorldHint: true
2473
+ },
2474
+ requiresApproval: false,
2475
+ metadata: {
2476
+ method: "GET",
2477
+ path: "/projects/{project_id}/branches/{branch_id}/functions/{slug}",
2478
+ stability: "beta",
2479
+ deprecated: false,
2480
+ tags: ["Functions"]
2481
+ },
2482
+ invoke: (client, input, signal) => raw.getProjectBranchFunction({
2483
+ ...input,
2484
+ client,
2485
+ signal,
2486
+ throwOnError: true
2487
+ })
2488
+ }), client),
2489
+ "getProjectBranchRole": (client) => bindOperation(defineOperation({
2490
+ operationId: "getProjectBranchRole",
2491
+ id: "get_project_branch_role",
2492
+ title: "Retrieve role details",
2493
+ description: "Retrieves details about the specified role.\nIn Neon, the terms \"role\" and \"user\" are synonymous.\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n",
2494
+ inputSchema: z.strictObject({ path: zGetProjectBranchRolePath }),
2495
+ annotations: {
2496
+ readOnlyHint: true,
2497
+ openWorldHint: true
2498
+ },
2499
+ requiresApproval: false,
2500
+ metadata: {
2501
+ method: "GET",
2502
+ path: "/projects/{project_id}/branches/{branch_id}/roles/{role_name}",
2503
+ stability: "stable",
2504
+ deprecated: false,
2505
+ tags: ["Branch"]
2506
+ },
2507
+ invoke: (client, input, signal) => raw.getProjectBranchRole({
2508
+ ...input,
2509
+ client,
2510
+ signal,
2511
+ throwOnError: true
2512
+ })
2513
+ }), client),
2514
+ "getProjectBranchRolePassword": (client) => bindOperation(defineOperation({
2515
+ operationId: "getProjectBranchRolePassword",
2516
+ id: "get_project_branch_role_password",
2517
+ title: "Retrieve role password",
2518
+ description: "Retrieves the password for the specified Postgres role, if possible.\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n",
2519
+ inputSchema: z.strictObject({ path: zGetProjectBranchRolePasswordPath }),
2520
+ annotations: {
2521
+ readOnlyHint: true,
2522
+ openWorldHint: true
2523
+ },
2524
+ requiresApproval: true,
2525
+ metadata: {
2526
+ method: "GET",
2527
+ path: "/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reveal_password",
2528
+ stability: "stable",
2529
+ deprecated: false,
2530
+ tags: ["Branch"]
2531
+ },
2532
+ invoke: (client, input, signal) => raw.getProjectBranchRolePassword({
2533
+ ...input,
2534
+ client,
2535
+ signal,
2536
+ throwOnError: true
2537
+ })
2538
+ }), client),
2539
+ "getProjectBranchSchema": (client) => bindOperation(defineOperation({
2540
+ operationId: "getProjectBranchSchema",
2541
+ id: "get_project_branch_schema",
2542
+ title: "Retrieve database schema",
2543
+ description: "Retrieves the database schema. Specify `lsn` or `timestamp` (not both) to read at a point in time; omit both to read from the database's head.",
2544
+ inputSchema: z.strictObject({
2545
+ path: zGetProjectBranchSchemaPath,
2546
+ query: zGetProjectBranchSchemaQuery
2547
+ }),
2548
+ annotations: {
2549
+ readOnlyHint: true,
2550
+ openWorldHint: true
2551
+ },
2552
+ requiresApproval: false,
2553
+ metadata: {
2554
+ method: "GET",
2555
+ path: "/projects/{project_id}/branches/{branch_id}/schema",
2556
+ stability: "stable",
2557
+ deprecated: false,
2558
+ tags: ["Branch"]
2559
+ },
2560
+ invoke: (client, input, signal) => raw.getProjectBranchSchema({
2561
+ ...input,
2562
+ client,
2563
+ signal,
2564
+ throwOnError: true
2565
+ })
2566
+ }), client),
2567
+ "getProjectBranchSchemaComparison": (client) => bindOperation(defineOperation({
2568
+ operationId: "getProjectBranchSchemaComparison",
2569
+ id: "get_project_branch_schema_comparison",
2570
+ title: "Compare database schema",
2571
+ description: "Compares the schema from the specified database with another branch's schema.",
2572
+ inputSchema: z.strictObject({
2573
+ path: zGetProjectBranchSchemaComparisonPath,
2574
+ query: zGetProjectBranchSchemaComparisonQuery
2575
+ }),
2576
+ annotations: {
2577
+ readOnlyHint: true,
2578
+ openWorldHint: true
2579
+ },
2580
+ requiresApproval: false,
2581
+ metadata: {
2582
+ method: "GET",
2583
+ path: "/projects/{project_id}/branches/{branch_id}/compare_schema",
2584
+ stability: "stable",
2585
+ deprecated: false,
2586
+ tags: ["Branch"]
2587
+ },
2588
+ invoke: (client, input, signal) => raw.getProjectBranchSchemaComparison({
2589
+ ...input,
2590
+ client,
2591
+ signal,
2592
+ throwOnError: true
2593
+ })
2594
+ }), client),
2595
+ "getProjectBranchStorage": (client) => bindOperation(defineOperation({
2596
+ operationId: "getProjectBranchStorage",
2597
+ id: "get_project_branch_storage",
2598
+ title: "Get branch object storage state",
2599
+ description: "Returns whether branchable object storage is usable for the specified\nbranch. A 200 response means the branch is registered in the object storage\nservice and the S3 data plane will accept requests for it. A 404\nresponse includes a `reason` field indicating why object storage is unavailable.\n\n**Note**: This endpoint is currently in Beta.\n",
2600
+ inputSchema: z.strictObject({ path: zGetProjectBranchStoragePath }),
2601
+ annotations: {
2602
+ readOnlyHint: true,
2603
+ openWorldHint: true
2604
+ },
2605
+ requiresApproval: false,
2606
+ metadata: {
2607
+ method: "GET",
2608
+ path: "/projects/{project_id}/branches/{branch_id}/storage",
2609
+ stability: "beta",
2610
+ deprecated: false,
2611
+ tags: ["Storage"]
2612
+ },
2613
+ invoke: (client, input, signal) => raw.getProjectBranchStorage({
2614
+ ...input,
2615
+ client,
2616
+ signal,
2617
+ throwOnError: true
2618
+ })
2619
+ }), client),
2620
+ "getProjectEndpoint": (client) => bindOperation(defineOperation({
2621
+ operationId: "getProjectEndpoint",
2622
+ id: "get_project_endpoint",
2623
+ title: "Retrieve compute endpoint details",
2624
+ description: "Retrieves information about the specified compute endpoint.\nA compute endpoint is a Neon compute instance.\nAn `endpoint_id` has an `ep-` prefix.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n",
2625
+ inputSchema: z.strictObject({ path: zGetProjectEndpointPath }),
2626
+ annotations: {
2627
+ readOnlyHint: true,
2628
+ openWorldHint: true
2629
+ },
2630
+ requiresApproval: false,
2631
+ metadata: {
2632
+ method: "GET",
2633
+ path: "/projects/{project_id}/endpoints/{endpoint_id}",
2634
+ stability: "stable",
2635
+ deprecated: false,
2636
+ tags: ["Endpoint"]
2637
+ },
2638
+ invoke: (client, input, signal) => raw.getProjectEndpoint({
2639
+ ...input,
2640
+ client,
2641
+ signal,
2642
+ throwOnError: true
2643
+ })
2644
+ }), client),
2645
+ "getProjectJWKS": (client) => bindOperation(defineOperation({
2646
+ operationId: "getProjectJWKS",
2647
+ id: "get_project_jwks",
2648
+ title: "List JWKS URLs",
2649
+ description: "Returns the JWKS URLs available for verifying JWTs used as the authentication mechanism for the specified project.\n",
2650
+ inputSchema: z.strictObject({ path: zGetProjectJwksPath }),
2651
+ annotations: {
2652
+ readOnlyHint: true,
2653
+ openWorldHint: true
2654
+ },
2655
+ requiresApproval: false,
2656
+ metadata: {
2657
+ method: "GET",
2658
+ path: "/projects/{project_id}/jwks",
2659
+ stability: "stable",
2660
+ deprecated: false,
2661
+ tags: ["Project"]
2662
+ },
2663
+ invoke: (client, input, signal) => raw.getProjectJwks({
2664
+ ...input,
2665
+ client,
2666
+ signal,
2667
+ throwOnError: true
2668
+ })
2669
+ }), client),
2670
+ "getProjectOperation": (client) => bindOperation(defineOperation({
2671
+ operationId: "getProjectOperation",
2672
+ id: "get_project_operation",
2673
+ title: "Retrieve operation details",
2674
+ description: "Retrieves details for the specified operation.\nAn operation is an action performed on a Neon project resource.\n",
2675
+ inputSchema: z.strictObject({ path: zGetProjectOperationPath }),
2676
+ annotations: {
2677
+ readOnlyHint: true,
2678
+ openWorldHint: true
2679
+ },
2680
+ requiresApproval: false,
2681
+ metadata: {
2682
+ method: "GET",
2683
+ path: "/projects/{project_id}/operations/{operation_id}",
2684
+ stability: "stable",
2685
+ deprecated: false,
2686
+ tags: ["Operation"]
2687
+ },
2688
+ invoke: (client, input, signal) => raw.getProjectOperation({
2689
+ ...input,
2690
+ client,
2691
+ signal,
2692
+ throwOnError: true
2693
+ })
2694
+ }), client),
2695
+ "getSnapshotSchedule": (client) => bindOperation(defineOperation({
2696
+ operationId: "getSnapshotSchedule",
2697
+ id: "get_snapshot_schedule",
2698
+ title: "Retrieve backup schedule",
2699
+ description: "Returns the backup schedule for the specified branch, including the configured snapshot frequencies.\n",
2700
+ inputSchema: z.strictObject({ path: zGetSnapshotSchedulePath }),
2701
+ annotations: {
2702
+ readOnlyHint: true,
2703
+ openWorldHint: true
2704
+ },
2705
+ requiresApproval: false,
2706
+ metadata: {
2707
+ method: "GET",
2708
+ path: "/projects/{project_id}/branches/{branch_id}/backup_schedule",
2709
+ stability: "stable",
2710
+ deprecated: false,
2711
+ tags: ["Snapshot"]
2712
+ },
2713
+ invoke: (client, input, signal) => raw.getSnapshotSchedule({
2714
+ ...input,
2715
+ client,
2716
+ signal,
2717
+ throwOnError: true
2718
+ })
2719
+ }), client),
2720
+ "grantPermissionToProject": (client) => bindOperation(defineOperation({
2721
+ operationId: "grantPermissionToProject",
2722
+ id: "grant_permission_to_project",
2723
+ title: "Grant project access",
2724
+ description: "Grants project access to the account associated with the specified email address.\n",
2725
+ inputSchema: z.strictObject({
2726
+ body: zGrantPermissionToProjectBody,
2727
+ path: zGrantPermissionToProjectPath
2728
+ }),
2729
+ annotations: {
2730
+ readOnlyHint: false,
2731
+ destructiveHint: true,
2732
+ openWorldHint: true
2733
+ },
2734
+ requiresApproval: true,
2735
+ metadata: {
2736
+ method: "POST",
2737
+ path: "/projects/{project_id}/permissions",
2738
+ stability: "stable",
2739
+ deprecated: false,
2740
+ tags: ["Project"]
2741
+ },
2742
+ invoke: (client, input, signal) => raw.grantPermissionToProject({
2743
+ ...input,
2744
+ client,
2745
+ signal,
2746
+ throwOnError: true
2747
+ })
2748
+ }), client),
2749
+ "listApiKeys": (client) => bindOperation(defineOperation({
2750
+ operationId: "listApiKeys",
2751
+ id: "list_api_keys",
2752
+ title: "List API keys",
2753
+ description: "Retrieves the API keys for your Neon account.\nThe response does not include API key tokens. A token is only provided when creating an API key.\nAPI keys can also be managed in the Neon Console.\nFor more information, see [Manage API keys](https://neon.com/docs/manage/api-keys/).\n",
2754
+ inputSchema: z.strictObject({}),
2755
+ annotations: {
2756
+ readOnlyHint: true,
2757
+ openWorldHint: true
2758
+ },
2759
+ requiresApproval: false,
2760
+ metadata: {
2761
+ method: "GET",
2762
+ path: "/api_keys",
2763
+ stability: "stable",
2764
+ deprecated: false,
2765
+ tags: ["API Key"]
2766
+ },
2767
+ invoke: (client, input, signal) => raw.listApiKeys({
2768
+ ...input,
2769
+ client,
2770
+ signal,
2771
+ throwOnError: true
2772
+ })
2773
+ }), client),
2774
+ "listBranchNeonAuthOauthProviders": (client) => bindOperation(defineOperation({
2775
+ operationId: "listBranchNeonAuthOauthProviders",
2776
+ id: "list_branch_neon_auth_oauth_providers",
2777
+ title: "List OAuth providers for the branch",
2778
+ description: "Lists the OAuth providers configured for the specified branch's Neon Auth integration.\n",
2779
+ inputSchema: z.strictObject({ path: zListBranchNeonAuthOauthProvidersPath }),
2780
+ annotations: {
2781
+ readOnlyHint: true,
2782
+ openWorldHint: true
2783
+ },
2784
+ requiresApproval: true,
2785
+ metadata: {
2786
+ method: "GET",
2787
+ path: "/projects/{project_id}/branches/{branch_id}/auth/oauth_providers",
2788
+ stability: "beta",
2789
+ deprecated: false,
2790
+ tags: ["Auth"]
2791
+ },
2792
+ invoke: (client, input, signal) => raw.listBranchNeonAuthOauthProviders({
2793
+ ...input,
2794
+ client,
2795
+ signal,
2796
+ throwOnError: true
2797
+ })
2798
+ }), client),
2799
+ "listBranchNeonAuthTrustedDomains": (client) => bindOperation(defineOperation({
2800
+ operationId: "listBranchNeonAuthTrustedDomains",
2801
+ id: "list_branch_neon_auth_trusted_domains",
2802
+ title: "List domains in redirect_uri whitelist",
2803
+ description: "Lists the trusted domains in the redirect URI whitelist for the specified branch.\nOnly domains in this list are permitted as redirect targets after authentication.\n",
2804
+ inputSchema: z.strictObject({ path: zListBranchNeonAuthTrustedDomainsPath }),
2805
+ annotations: {
2806
+ readOnlyHint: true,
2807
+ openWorldHint: true
2808
+ },
2809
+ requiresApproval: false,
2810
+ metadata: {
2811
+ method: "GET",
2812
+ path: "/projects/{project_id}/branches/{branch_id}/auth/domains",
2813
+ stability: "beta",
2814
+ deprecated: false,
2815
+ tags: ["Auth"]
2816
+ },
2817
+ invoke: (client, input, signal) => raw.listBranchNeonAuthTrustedDomains({
2818
+ ...input,
2819
+ client,
2820
+ signal,
2821
+ throwOnError: true
2822
+ })
2823
+ }), client),
2824
+ "listCredentials": (client) => bindOperation(defineOperation({
2825
+ operationId: "listCredentials",
2826
+ id: "list_credentials",
2827
+ title: "List credentials on the branch",
2828
+ description: "Returns metadata for customer-issued credentials on the branch.\nSecrets are never included.\n\n**Note**: This endpoint is currently in Beta.\n",
2829
+ inputSchema: z.strictObject({ path: zListCredentialsPath }),
2830
+ annotations: {
2831
+ readOnlyHint: true,
2832
+ openWorldHint: true
2833
+ },
2834
+ requiresApproval: false,
2835
+ metadata: {
2836
+ method: "GET",
2837
+ path: "/projects/{project_id}/branches/{branch_id}/credentials",
2838
+ stability: "beta",
2839
+ deprecated: false,
2840
+ tags: ["Credentials"]
2841
+ },
2842
+ invoke: (client, input, signal) => raw.listCredentials({
2843
+ ...input,
2844
+ client,
2845
+ signal,
2846
+ throwOnError: true
2847
+ })
2848
+ }), client),
2849
+ "listNeonAuthIntegrations": (client) => bindOperation(defineOperation({
2850
+ operationId: "listNeonAuthIntegrations",
2851
+ id: "list_neon_auth_integrations",
2852
+ title: "List active integrations with auth providers",
2853
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth` instead. Removal scheduled for March 1, 2026.",
2854
+ inputSchema: z.strictObject({ path: zListNeonAuthIntegrationsPath }),
2855
+ annotations: {
2856
+ readOnlyHint: true,
2857
+ openWorldHint: true
2858
+ },
2859
+ requiresApproval: false,
2860
+ metadata: {
2861
+ method: "GET",
2862
+ path: "/projects/{project_id}/auth/integrations",
2863
+ stability: "stable",
2864
+ deprecated: true,
2865
+ tags: ["Auth (legacy)"]
2866
+ },
2867
+ invoke: (client, input, signal) => raw.listNeonAuthIntegrations({
2868
+ ...input,
2869
+ client,
2870
+ signal,
2871
+ throwOnError: true
2872
+ })
2873
+ }), client),
2874
+ "listNeonAuthOauthProviders": (client) => bindOperation(defineOperation({
2875
+ operationId: "listNeonAuthOauthProviders",
2876
+ id: "list_neon_auth_oauth_providers",
2877
+ title: "List OAuth providers",
2878
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers` instead. Removal scheduled for March 1, 2026.\n",
2879
+ inputSchema: z.strictObject({ path: zListNeonAuthOauthProvidersPath }),
2880
+ annotations: {
2881
+ readOnlyHint: true,
2882
+ openWorldHint: true
2883
+ },
2884
+ requiresApproval: true,
2885
+ metadata: {
2886
+ method: "GET",
2887
+ path: "/projects/{project_id}/auth/oauth_providers",
2888
+ stability: "stable",
2889
+ deprecated: true,
2890
+ tags: ["Auth (legacy)"]
2891
+ },
2892
+ invoke: (client, input, signal) => raw.listNeonAuthOauthProviders({
2893
+ ...input,
2894
+ client,
2895
+ signal,
2896
+ throwOnError: true
2897
+ })
2898
+ }), client),
2899
+ "listNeonAuthRedirectURIWhitelistDomains": (client) => bindOperation(defineOperation({
2900
+ operationId: "listNeonAuthRedirectURIWhitelistDomains",
2901
+ id: "list_neon_auth_redirect_uri_whitelist_domains",
2902
+ title: "List trusted redirect URI domains",
2903
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Removal scheduled for March 1, 2026.\n",
2904
+ inputSchema: z.strictObject({ path: zListNeonAuthRedirectUriWhitelistDomainsPath }),
2905
+ annotations: {
2906
+ readOnlyHint: true,
2907
+ openWorldHint: true
2908
+ },
2909
+ requiresApproval: false,
2910
+ metadata: {
2911
+ method: "GET",
2912
+ path: "/projects/{project_id}/auth/domains",
2913
+ stability: "stable",
2914
+ deprecated: true,
2915
+ tags: ["Auth (legacy)"]
2916
+ },
2917
+ invoke: (client, input, signal) => raw.listNeonAuthRedirectUriWhitelistDomains({
2918
+ ...input,
2919
+ client,
2920
+ signal,
2921
+ throwOnError: true
2922
+ })
2923
+ }), client),
2924
+ "listOrganizationVPCEndpoints": (client) => bindOperation(defineOperation({
2925
+ operationId: "listOrganizationVPCEndpoints",
2926
+ id: "list_organization_vpc_endpoints",
2927
+ title: "List VPC endpoints",
2928
+ description: "Retrieves the list of VPC endpoints for the specified Neon organization.\n",
2929
+ inputSchema: z.strictObject({ path: zListOrganizationVpcEndpointsPath }),
2930
+ annotations: {
2931
+ readOnlyHint: true,
2932
+ openWorldHint: true
2933
+ },
2934
+ requiresApproval: false,
2935
+ metadata: {
2936
+ method: "GET",
2937
+ path: "/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints",
2938
+ stability: "stable",
2939
+ deprecated: false,
2940
+ tags: ["Organizations"]
2941
+ },
2942
+ invoke: (client, input, signal) => raw.listOrganizationVpcEndpoints({
2943
+ ...input,
2944
+ client,
2945
+ signal,
2946
+ throwOnError: true
2947
+ })
2948
+ }), client),
2949
+ "listOrganizationVPCEndpointsAllRegions": (client) => bindOperation(defineOperation({
2950
+ operationId: "listOrganizationVPCEndpointsAllRegions",
2951
+ id: "list_organization_vpc_endpoints_all_regions",
2952
+ title: "List VPC endpoints across all regions",
2953
+ description: "Retrieves the list of VPC endpoints for the specified Neon organization across all regions.\n",
2954
+ inputSchema: z.strictObject({ path: zListOrganizationVpcEndpointsAllRegionsPath }),
2955
+ annotations: {
2956
+ readOnlyHint: true,
2957
+ openWorldHint: true
2958
+ },
2959
+ requiresApproval: false,
2960
+ metadata: {
2961
+ method: "GET",
2962
+ path: "/organizations/{org_id}/vpc/vpc_endpoints",
2963
+ stability: "stable",
2964
+ deprecated: false,
2965
+ tags: ["Organizations"]
2966
+ },
2967
+ invoke: (client, input, signal) => raw.listOrganizationVpcEndpointsAllRegions({
2968
+ ...input,
2969
+ client,
2970
+ signal,
2971
+ throwOnError: true
2972
+ })
2973
+ }), client),
2974
+ "listOrgApiKeys": (client) => bindOperation(defineOperation({
2975
+ operationId: "listOrgApiKeys",
2976
+ id: "list_org_api_keys",
2977
+ title: "List organization API keys",
2978
+ description: "Retrieves the API keys for the specified organization.\nThe response does not include API key tokens. A token is only provided when creating an API key.\nAPI keys can also be managed in the Neon Console.\nFor more information, see [Manage API keys](https://neon.com/docs/manage/api-keys/).\n",
2979
+ inputSchema: z.strictObject({ path: zListOrgApiKeysPath }),
2980
+ annotations: {
2981
+ readOnlyHint: true,
2982
+ openWorldHint: true
2983
+ },
2984
+ requiresApproval: false,
2985
+ metadata: {
2986
+ method: "GET",
2987
+ path: "/organizations/{org_id}/api_keys",
2988
+ stability: "stable",
2989
+ deprecated: false,
2990
+ tags: ["Organizations"]
2991
+ },
2992
+ invoke: (client, input, signal) => raw.listOrgApiKeys({
2993
+ ...input,
2994
+ client,
2995
+ signal,
2996
+ throwOnError: true
2997
+ })
2998
+ }), client),
2999
+ "listProjectBranchBucketObjects": (client) => bindOperation(defineOperation({
3000
+ operationId: "listProjectBranchBucketObjects",
3001
+ id: "list_project_branch_bucket_objects",
3002
+ title: "List objects in a bucket",
3003
+ description: "Lists objects visible in the named bucket on the specified branch,\nincluding those inherited from ancestor branches. Listing is served by\nthe user's session (no customer S3 credentials required).\n\nWhen `delimiter` is supplied (typically `/`), keys are collapsed into\ncommon prefixes (`folders`) so callers can render a folder-style\nbrowser; keys that do not contain the delimiter after `prefix` are\nreturned as `objects`.\n\n**Note**: This endpoint is currently in Beta.\n",
3004
+ inputSchema: z.strictObject({
3005
+ path: zListProjectBranchBucketObjectsPath,
3006
+ query: zListProjectBranchBucketObjectsQuery.optional()
3007
+ }),
3008
+ annotations: {
3009
+ readOnlyHint: true,
3010
+ openWorldHint: true
3011
+ },
3012
+ requiresApproval: false,
3013
+ metadata: {
3014
+ method: "GET",
3015
+ path: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects",
3016
+ stability: "beta",
3017
+ deprecated: false,
3018
+ tags: ["Buckets"]
3019
+ },
3020
+ invoke: (client, input, signal) => raw.listProjectBranchBucketObjects({
3021
+ ...input,
3022
+ client,
3023
+ signal,
3024
+ throwOnError: true
3025
+ })
3026
+ }), client),
3027
+ "listProjectBranchBuckets": (client) => bindOperation(defineOperation({
3028
+ operationId: "listProjectBranchBuckets",
3029
+ id: "list_project_branch_buckets",
3030
+ title: "List buckets on the branch",
3031
+ description: "Lists branchable object storage buckets visible on the specified branch,\nincluding those inherited from ancestor branches.\n\n**Note**: This endpoint is currently in Beta.\n",
3032
+ inputSchema: z.strictObject({ path: zListProjectBranchBucketsPath }),
3033
+ annotations: {
3034
+ readOnlyHint: true,
3035
+ openWorldHint: true
3036
+ },
3037
+ requiresApproval: false,
3038
+ metadata: {
3039
+ method: "GET",
3040
+ path: "/projects/{project_id}/branches/{branch_id}/buckets",
3041
+ stability: "beta",
3042
+ deprecated: false,
3043
+ tags: ["Buckets"]
3044
+ },
3045
+ invoke: (client, input, signal) => raw.listProjectBranchBuckets({
3046
+ ...input,
3047
+ client,
3048
+ signal,
3049
+ throwOnError: true
3050
+ })
3051
+ }), client),
3052
+ "listProjectBranchDatabases": (client) => bindOperation(defineOperation({
3053
+ operationId: "listProjectBranchDatabases",
3054
+ id: "list_project_branch_databases",
3055
+ title: "List databases",
3056
+ description: "Retrieves a list of databases for the specified branch.\nA branch can have multiple databases.\nFor related information, see [Manage databases](https://neon.com/docs/manage/databases/).\n",
3057
+ inputSchema: z.strictObject({ path: zListProjectBranchDatabasesPath }),
3058
+ annotations: {
3059
+ readOnlyHint: true,
3060
+ openWorldHint: true
3061
+ },
3062
+ requiresApproval: false,
3063
+ metadata: {
3064
+ method: "GET",
3065
+ path: "/projects/{project_id}/branches/{branch_id}/databases",
3066
+ stability: "stable",
3067
+ deprecated: false,
3068
+ tags: ["Branch"]
3069
+ },
3070
+ invoke: (client, input, signal) => raw.listProjectBranchDatabases({
3071
+ ...input,
3072
+ client,
3073
+ signal,
3074
+ throwOnError: true
3075
+ })
3076
+ }), client),
3077
+ "listProjectBranchEndpoints": (client) => bindOperation(defineOperation({
3078
+ operationId: "listProjectBranchEndpoints",
3079
+ id: "list_project_branch_endpoints",
3080
+ title: "List branch endpoints",
3081
+ description: "Retrieves a list of compute endpoints for the specified branch.\nNeon permits only one read-write compute endpoint per branch.\nA branch can have multiple read-only compute endpoints.\n",
3082
+ inputSchema: z.strictObject({ path: zListProjectBranchEndpointsPath }),
3083
+ annotations: {
3084
+ readOnlyHint: true,
3085
+ openWorldHint: true
3086
+ },
3087
+ requiresApproval: false,
3088
+ metadata: {
3089
+ method: "GET",
3090
+ path: "/projects/{project_id}/branches/{branch_id}/endpoints",
3091
+ stability: "stable",
3092
+ deprecated: false,
3093
+ tags: ["Branch"]
3094
+ },
3095
+ invoke: (client, input, signal) => raw.listProjectBranchEndpoints({
3096
+ ...input,
3097
+ client,
3098
+ signal,
3099
+ throwOnError: true
3100
+ })
3101
+ }), client),
3102
+ "listProjectBranches": (client) => bindOperation(defineOperation({
3103
+ operationId: "listProjectBranches",
3104
+ id: "list_project_branches",
3105
+ title: "List branches",
3106
+ description: "Retrieves a list of branches for the specified project.\n\nEach Neon project has a root branch named `main`.\nA `branch_id` value has a `br-` prefix.\nA project may contain child branches that were branched from `main` or from another branch.\nA parent branch is identified by the `parent_id` value, which is the `id` of the parent branch.\nFor related information, see [Manage branches](https://neon.com/docs/manage/branches/).\n",
3107
+ inputSchema: z.strictObject({
3108
+ path: zListProjectBranchesPath,
3109
+ query: zListProjectBranchesQuery.optional()
3110
+ }),
3111
+ annotations: {
3112
+ readOnlyHint: true,
3113
+ openWorldHint: true
3114
+ },
3115
+ requiresApproval: false,
3116
+ metadata: {
3117
+ method: "GET",
3118
+ path: "/projects/{project_id}/branches",
3119
+ stability: "stable",
3120
+ deprecated: false,
3121
+ tags: ["Branch"]
3122
+ },
3123
+ invoke: (client, input, signal) => raw.listProjectBranches({
3124
+ ...input,
3125
+ client,
3126
+ signal,
3127
+ throwOnError: true
3128
+ })
3129
+ }), client),
3130
+ "listProjectBranchFunctions": (client) => bindOperation(defineOperation({
3131
+ operationId: "listProjectBranchFunctions",
3132
+ id: "list_project_branch_functions",
3133
+ title: "List functions on the branch",
3134
+ description: "Lists functions on the specified branch.\n\n**Note**: This endpoint is currently in Beta.\n",
3135
+ inputSchema: z.strictObject({
3136
+ path: zListProjectBranchFunctionsPath,
3137
+ query: zListProjectBranchFunctionsQuery.optional()
3138
+ }),
3139
+ annotations: {
3140
+ readOnlyHint: true,
3141
+ openWorldHint: true
3142
+ },
3143
+ requiresApproval: false,
3144
+ metadata: {
3145
+ method: "GET",
3146
+ path: "/projects/{project_id}/branches/{branch_id}/functions",
3147
+ stability: "beta",
3148
+ deprecated: false,
3149
+ tags: ["Functions"]
3150
+ },
3151
+ invoke: (client, input, signal) => raw.listProjectBranchFunctions({
3152
+ ...input,
3153
+ client,
3154
+ signal,
3155
+ throwOnError: true
3156
+ })
3157
+ }), client),
3158
+ "listProjectBranchLogFields": (client) => bindOperation(defineOperation({
3159
+ operationId: "listProjectBranchLogFields",
3160
+ id: "list_project_branch_log_fields",
3161
+ title: "List branch log fields",
3162
+ description: "Lists the low-cardinality log fields observed on this branch whose\ndistinct values can be discovered with the log field-values endpoint.\n\nThe set is computed per branch and grows as new fields are observed, so\ntreat it as data rather than a fixed list: discover a field here, then\npass it as `field_name` to the field-values endpoint.\n\n**Note**: This endpoint is currently in Private Beta.\n",
3163
+ inputSchema: z.strictObject({ path: zListProjectBranchLogFieldsPath }),
3164
+ annotations: {
3165
+ readOnlyHint: true,
3166
+ openWorldHint: true
3167
+ },
3168
+ requiresApproval: false,
3169
+ metadata: {
3170
+ method: "GET",
3171
+ path: "/projects/{project_id}/branches/{branch_id}/logs/fields",
3172
+ stability: "beta",
3173
+ deprecated: false,
3174
+ tags: ["Logs"]
3175
+ },
3176
+ invoke: (client, input, signal) => raw.listProjectBranchLogFields({
3177
+ ...input,
3178
+ client,
3179
+ signal,
3180
+ throwOnError: true
3181
+ })
3182
+ }), client),
3183
+ "listProjectBranchLogFieldValues": (client) => bindOperation(defineOperation({
3184
+ operationId: "listProjectBranchLogFieldValues",
3185
+ id: "list_project_branch_log_field_values",
3186
+ title: "List branch log field values",
3187
+ description: "Lists the distinct values observed for a low-cardinality log field in\nthe requested time range. Call the log fields endpoint first to learn\nwhich `field_name` values this branch supports; a field that branch has\nnever emitted is rejected with `unknown_field`.\n\nGive the window either as `since` or as an explicit `start_time`;\nsupplying both is rejected. If neither is given, the previous six hours\nare used. The maximum supported time range is seven days.\n\n**Note**: This endpoint is currently in Private Beta.\n",
3188
+ inputSchema: z.strictObject({
3189
+ path: zListProjectBranchLogFieldValuesPath,
3190
+ query: zListProjectBranchLogFieldValuesQuery.optional()
3191
+ }),
3192
+ annotations: {
3193
+ readOnlyHint: true,
3194
+ openWorldHint: true
3195
+ },
3196
+ requiresApproval: false,
3197
+ metadata: {
3198
+ method: "GET",
3199
+ path: "/projects/{project_id}/branches/{branch_id}/logs/fields/{field_name}/values",
3200
+ stability: "beta",
3201
+ deprecated: false,
3202
+ tags: ["Logs"]
3203
+ },
3204
+ invoke: (client, input, signal) => raw.listProjectBranchLogFieldValues({
3205
+ ...input,
3206
+ client,
3207
+ signal,
3208
+ throwOnError: true
3209
+ })
3210
+ }), client),
3211
+ "listProjectBranchRoles": (client) => bindOperation(defineOperation({
3212
+ operationId: "listProjectBranchRoles",
3213
+ id: "list_project_branch_roles",
3214
+ title: "List roles",
3215
+ description: "Retrieves a list of Postgres roles from the specified branch.\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n",
3216
+ inputSchema: z.strictObject({ path: zListProjectBranchRolesPath }),
3217
+ annotations: {
3218
+ readOnlyHint: true,
3219
+ openWorldHint: true
3220
+ },
3221
+ requiresApproval: false,
3222
+ metadata: {
3223
+ method: "GET",
3224
+ path: "/projects/{project_id}/branches/{branch_id}/roles",
3225
+ stability: "stable",
3226
+ deprecated: false,
3227
+ tags: ["Branch"]
3228
+ },
3229
+ invoke: (client, input, signal) => raw.listProjectBranchRoles({
3230
+ ...input,
3231
+ client,
3232
+ signal,
3233
+ throwOnError: true
3234
+ })
3235
+ }), client),
3236
+ "listProjectEndpoints": (client) => bindOperation(defineOperation({
3237
+ operationId: "listProjectEndpoints",
3238
+ id: "list_project_endpoints",
3239
+ title: "List compute endpoints",
3240
+ description: "Retrieves a list of compute endpoints for the specified project.\nA compute endpoint is a Neon compute instance.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n",
3241
+ inputSchema: z.strictObject({ path: zListProjectEndpointsPath }),
3242
+ annotations: {
3243
+ readOnlyHint: true,
3244
+ openWorldHint: true
3245
+ },
3246
+ requiresApproval: false,
3247
+ metadata: {
3248
+ method: "GET",
3249
+ path: "/projects/{project_id}/endpoints",
3250
+ stability: "stable",
3251
+ deprecated: false,
3252
+ tags: ["Endpoint"]
3253
+ },
3254
+ invoke: (client, input, signal) => raw.listProjectEndpoints({
3255
+ ...input,
3256
+ client,
3257
+ signal,
3258
+ throwOnError: true
3259
+ })
3260
+ }), client),
3261
+ "listProjectMembers": (client) => bindOperation(defineOperation({
3262
+ operationId: "listProjectMembers",
3263
+ id: "list_project_members",
3264
+ title: "List org members and their project roles",
3265
+ description: "Lists organization members and their per-project roles for an org-owned project.\nReturns 404 when the project is not org-owned, per-project role management is disabled,\nor the caller has no access. Callers with VIEWER or EDITOR see members with\neffective project access. Callers with ADMIN also see unassigned org members.\n",
3266
+ inputSchema: z.strictObject({
3267
+ path: zListProjectMembersPath,
3268
+ query: zListProjectMembersQuery.optional()
3269
+ }),
3270
+ annotations: {
3271
+ readOnlyHint: true,
3272
+ openWorldHint: true
3273
+ },
3274
+ requiresApproval: false,
3275
+ metadata: {
3276
+ method: "GET",
3277
+ path: "/projects/{project_id}/members",
3278
+ stability: "stable",
3279
+ deprecated: false,
3280
+ tags: ["Project"]
3281
+ },
3282
+ invoke: (client, input, signal) => raw.listProjectMembers({
3283
+ ...input,
3284
+ client,
3285
+ signal,
3286
+ throwOnError: true
3287
+ })
3288
+ }), client),
3289
+ "listProjectOperations": (client) => bindOperation(defineOperation({
3290
+ operationId: "listProjectOperations",
3291
+ id: "list_project_operations",
3292
+ title: "List operations",
3293
+ description: "Retrieves a list of operations for the specified Neon project.\nThe number of operations returned can be large.\nTo paginate the response, issue an initial request with a `limit` value.\nThen, add the `cursor` value that was returned in the response to the next request.\nOperations older than 6 months may be deleted from our systems.\nIf you need more history than that, you should store your own history.\n",
3294
+ inputSchema: z.strictObject({
3295
+ path: zListProjectOperationsPath,
3296
+ query: zListProjectOperationsQuery.optional()
3297
+ }),
3298
+ annotations: {
3299
+ readOnlyHint: true,
3300
+ openWorldHint: true
3301
+ },
3302
+ requiresApproval: false,
3303
+ metadata: {
3304
+ method: "GET",
3305
+ path: "/projects/{project_id}/operations",
3306
+ stability: "stable",
3307
+ deprecated: false,
3308
+ tags: ["Operation"]
3309
+ },
3310
+ invoke: (client, input, signal) => raw.listProjectOperations({
3311
+ ...input,
3312
+ client,
3313
+ signal,
3314
+ throwOnError: true
3315
+ })
3316
+ }), client),
3317
+ "listProjectPermissions": (client) => bindOperation(defineOperation({
3318
+ operationId: "listProjectPermissions",
3319
+ id: "list_project_permissions",
3320
+ title: "List project access",
3321
+ description: "Retrieves details about users who have access to the project, including the permission `id`, the granted-to email address, and the date project access was granted.",
3322
+ inputSchema: z.strictObject({ path: zListProjectPermissionsPath }),
3323
+ annotations: {
3324
+ readOnlyHint: true,
3325
+ openWorldHint: true
3326
+ },
3327
+ requiresApproval: false,
3328
+ metadata: {
3329
+ method: "GET",
3330
+ path: "/projects/{project_id}/permissions",
3331
+ stability: "stable",
3332
+ deprecated: false,
3333
+ tags: ["Project"]
3334
+ },
3335
+ invoke: (client, input, signal) => raw.listProjectPermissions({
3336
+ ...input,
3337
+ client,
3338
+ signal,
3339
+ throwOnError: true
3340
+ })
3341
+ }), client),
3342
+ "listProjects": (client) => bindOperation(defineOperation({
3343
+ operationId: "listProjects",
3344
+ id: "list_projects",
3345
+ title: "List projects",
3346
+ description: "Retrieves a list of projects for the specified organization.\nIf using a personal API key, include the `org_id` parameter to specify which organization to work with.\nIf using an org API key, `org_id` is automatically inferred from the key.\nFor more information, see [Manage organizations using the Neon API](https://neon.com/docs/manage/orgs-api)\nand [Manage projects](https://neon.com/docs/manage/projects/).\n",
3347
+ inputSchema: z.strictObject({ query: zListProjectsQuery.optional() }),
3348
+ annotations: {
3349
+ readOnlyHint: true,
3350
+ openWorldHint: true
3351
+ },
3352
+ requiresApproval: false,
3353
+ metadata: {
3354
+ method: "GET",
3355
+ path: "/projects",
3356
+ stability: "stable",
3357
+ deprecated: false,
3358
+ tags: ["Project"]
3359
+ },
3360
+ invoke: (client, input, signal) => raw.listProjects({
3361
+ ...input,
3362
+ client,
3363
+ signal,
3364
+ throwOnError: true
3365
+ })
3366
+ }), client),
3367
+ "listProjectVPCEndpoints": (client) => bindOperation(defineOperation({
3368
+ operationId: "listProjectVPCEndpoints",
3369
+ id: "list_project_vpc_endpoints",
3370
+ title: "List VPC endpoint restrictions",
3371
+ description: "Lists VPC endpoint restrictions for the specified Neon project.\n",
3372
+ inputSchema: z.strictObject({ path: zListProjectVpcEndpointsPath }),
3373
+ annotations: {
3374
+ readOnlyHint: true,
3375
+ openWorldHint: true
3376
+ },
3377
+ requiresApproval: false,
3378
+ metadata: {
3379
+ method: "GET",
3380
+ path: "/projects/{project_id}/vpc_endpoints",
3381
+ stability: "stable",
3382
+ deprecated: false,
3383
+ tags: ["Project"]
3384
+ },
3385
+ invoke: (client, input, signal) => raw.listProjectVpcEndpoints({
3386
+ ...input,
3387
+ client,
3388
+ signal,
3389
+ throwOnError: true
3390
+ })
3391
+ }), client),
3392
+ "listSharedProjects": (client) => bindOperation(defineOperation({
3393
+ operationId: "listSharedProjects",
3394
+ id: "list_shared_projects",
3395
+ title: "List shared projects",
3396
+ description: "Retrieves a list of projects shared with your Neon account.\nFor more information, see [Manage projects](https://neon.com/docs/manage/projects/).\n",
3397
+ inputSchema: z.strictObject({ query: zListSharedProjectsQuery.optional() }),
3398
+ annotations: {
3399
+ readOnlyHint: true,
3400
+ openWorldHint: true
3401
+ },
3402
+ requiresApproval: false,
3403
+ metadata: {
3404
+ method: "GET",
3405
+ path: "/projects/shared",
3406
+ stability: "stable",
3407
+ deprecated: false,
3408
+ tags: ["Project"]
3409
+ },
3410
+ invoke: (client, input, signal) => raw.listSharedProjects({
3411
+ ...input,
3412
+ client,
3413
+ signal,
3414
+ throwOnError: true
3415
+ })
3416
+ }), client),
3417
+ "listSnapshots": (client) => bindOperation(defineOperation({
3418
+ operationId: "listSnapshots",
3419
+ id: "list_snapshots",
3420
+ title: "List project snapshots",
3421
+ description: "Lists the snapshots for the specified project.\nEach snapshot represents a point-in-time backup of the project data.\n",
3422
+ inputSchema: z.strictObject({ path: zListSnapshotsPath }),
3423
+ annotations: {
3424
+ readOnlyHint: true,
3425
+ openWorldHint: true
3426
+ },
3427
+ requiresApproval: false,
3428
+ metadata: {
3429
+ method: "GET",
3430
+ path: "/projects/{project_id}/snapshots",
3431
+ stability: "stable",
3432
+ deprecated: false,
3433
+ tags: ["Snapshot"]
3434
+ },
3435
+ invoke: (client, input, signal) => raw.listSnapshots({
3436
+ ...input,
3437
+ client,
3438
+ signal,
3439
+ throwOnError: true
3440
+ })
3441
+ }), client),
3442
+ "presignProjectBranchBucketObject": (client) => bindOperation(defineOperation({
3443
+ operationId: "presignProjectBranchBucketObject",
3444
+ id: "presign_project_branch_bucket_object",
3445
+ title: "Presign an upload or download for an object in a bucket",
3446
+ description: "Returns a presigned URL that transfers bytes directly to or from the\nobject's bucket on the specified branch, without the caller ever\nhandling S3 credentials. The `operation` field selects the direction:\n\n- `upload` returns a presigned `PUT` URL (the caller `PUT`s the file\n bytes straight to `url` with the returned `headers`). Authorized with\n project write access.\n- `download` returns a presigned `GET` URL (the caller `GET`s the\n bytes straight from `url`). Authorized with project read access.\n\nThe platform mints a short-lived credential and builds the SigV4-signed\nURL against the branch's S3 data-plane host, returning it together with\nthe HTTP method, any headers the caller must echo, and the URL's expiry.\n\nServed by the user's session (no customer S3 credentials required).\n\n**Note**: This endpoint is currently in Beta.\n",
3447
+ inputSchema: z.strictObject({
3448
+ body: zPresignProjectBranchBucketObjectBody,
3449
+ path: zPresignProjectBranchBucketObjectPath
3450
+ }),
3451
+ annotations: {
3452
+ readOnlyHint: false,
3453
+ destructiveHint: true,
3454
+ openWorldHint: true
3455
+ },
3456
+ requiresApproval: true,
3457
+ metadata: {
3458
+ method: "POST",
3459
+ path: "/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/presign",
3460
+ stability: "beta",
3461
+ deprecated: false,
3462
+ tags: ["Buckets"]
3463
+ },
3464
+ invoke: (client, input, signal) => raw.presignProjectBranchBucketObject({
3465
+ ...input,
3466
+ client,
3467
+ signal,
3468
+ throwOnError: true
3469
+ })
3470
+ }), client),
3471
+ "queryProjectBranchLogs": (client) => bindOperation(defineOperation({
3472
+ operationId: "queryProjectBranchLogs",
3473
+ id: "query_project_branch_logs",
3474
+ title: "Query branch logs",
3475
+ description: "Returns logs emitted by services running on the specified branch,\nordered by timestamp according to `sort_order`.\n\nAll supplied filters are combined with `AND`: a record is returned only\nwhen it matches every filter. `minimum_severity` and `severity_text` are\nindependent filters, so setting both requires a record to clear the\nseverity floor *and* match the exact severity text.\n\nSupply `logql` instead of the structured filters to run a raw LogQL\nexpression. Combining it with any structured filter is rejected rather\nthan silently ignored; `limit`, `sort_order`, and the time window still\napply, because those bound the query rather than form part of the\nexpression.\n\nGive the window either as `since` — a duration ending at `end_time`, or\nat the current time when `end_time` is omitted — or as an explicit\n`start_time`. Supplying both is rejected.\n\nA single response holds at most 1,000 records. When `is_truncated` is\n`true`, pass the returned `next_cursor` back as `cursor` to fetch the\nnext page, repeating the time range and every filter unchanged.\n\nIf no time range is supplied, the query covers the previous hour. The\nmaximum supported time range is seven days. `end_time` is exclusive.\n\n**Note**: This endpoint is currently in Private Beta.\n",
3476
+ inputSchema: z.strictObject({
3477
+ body: zQueryProjectBranchLogsBody,
3478
+ path: zQueryProjectBranchLogsPath
3479
+ }),
3480
+ annotations: {
3481
+ readOnlyHint: false,
3482
+ destructiveHint: true,
3483
+ openWorldHint: true
3484
+ },
3485
+ requiresApproval: true,
3486
+ metadata: {
3487
+ method: "POST",
3488
+ path: "/projects/{project_id}/branches/{branch_id}/logs/query",
3489
+ stability: "beta",
3490
+ deprecated: false,
3491
+ tags: ["Logs"]
3492
+ },
3493
+ invoke: (client, input, signal) => raw.queryProjectBranchLogs({
3494
+ ...input,
3495
+ client,
3496
+ signal,
3497
+ throwOnError: true
3498
+ })
3499
+ }), client),
3500
+ "recoverProject": (client) => bindOperation(defineOperation({
3501
+ operationId: "recoverProject",
3502
+ id: "recover_project",
3503
+ title: "Recover a deleted project",
3504
+ description: "Recovers a deleted project within the 7-day deletion recovery period.\nRestores branches, endpoints, settings, and connection strings.\nSome integrations require manual reconfiguration after recovery.\nTo list recoverable projects, use `GET /projects?recoverable=true`.\n",
3505
+ inputSchema: z.strictObject({ path: zRecoverProjectPath }),
3506
+ annotations: {
3507
+ readOnlyHint: false,
3508
+ destructiveHint: true,
3509
+ openWorldHint: true
3510
+ },
3511
+ requiresApproval: true,
3512
+ metadata: {
3513
+ method: "POST",
3514
+ path: "/projects/{project_id}/recover",
3515
+ stability: "beta",
3516
+ deprecated: false,
3517
+ tags: ["Project"]
3518
+ },
3519
+ invoke: (client, input, signal) => raw.recoverProject({
3520
+ ...input,
3521
+ client,
3522
+ signal,
3523
+ throwOnError: true
3524
+ })
3525
+ }), client),
3526
+ "removeOrganizationMember": (client) => bindOperation(defineOperation({
3527
+ operationId: "removeOrganizationMember",
3528
+ id: "remove_organization_member",
3529
+ title: "Remove organization member",
3530
+ description: "Removes the specified member from the organization.\nOnly organization admins can perform this action.\nThe last admin in an organization cannot be removed.\n",
3531
+ inputSchema: z.strictObject({ path: zRemoveOrganizationMemberPath }),
3532
+ annotations: {
3533
+ readOnlyHint: false,
3534
+ destructiveHint: true,
3535
+ openWorldHint: true
3536
+ },
3537
+ requiresApproval: true,
3538
+ metadata: {
3539
+ method: "DELETE",
3540
+ path: "/organizations/{org_id}/members/{member_id}",
3541
+ stability: "stable",
3542
+ deprecated: false,
3543
+ tags: ["Organizations"]
3544
+ },
3545
+ invoke: (client, input, signal) => raw.removeOrganizationMember({
3546
+ ...input,
3547
+ client,
3548
+ signal,
3549
+ throwOnError: true
3550
+ })
3551
+ }), client),
3552
+ "removeProjectMemberRole": (client) => bindOperation(defineOperation({
3553
+ operationId: "removeProjectMemberRole",
3554
+ id: "remove_project_member_role",
3555
+ title: "Remove an org member's role on a project",
3556
+ description: "Idempotently removes the explicit project grant. The member's organization-role\ndefault project permission still applies. Self-DELETE requires\n`confirm_self_lockout=true` when effective manage access would be lost.\n",
3557
+ inputSchema: z.strictObject({
3558
+ path: zRemoveProjectMemberRolePath,
3559
+ query: zRemoveProjectMemberRoleQuery.optional()
3560
+ }),
3561
+ annotations: {
3562
+ readOnlyHint: false,
3563
+ destructiveHint: true,
3564
+ openWorldHint: true
3565
+ },
3566
+ requiresApproval: true,
3567
+ metadata: {
3568
+ method: "DELETE",
3569
+ path: "/projects/{project_id}/members/{member_id}/role",
3570
+ stability: "stable",
3571
+ deprecated: false,
3572
+ tags: ["Project"]
3573
+ },
3574
+ invoke: (client, input, signal) => raw.removeProjectMemberRole({
3575
+ ...input,
3576
+ client,
3577
+ signal,
3578
+ throwOnError: true
3579
+ })
3580
+ }), client),
3581
+ "resetProjectBranchRolePassword": (client) => bindOperation(defineOperation({
3582
+ operationId: "resetProjectBranchRolePassword",
3583
+ id: "reset_project_branch_role_password",
3584
+ title: "Reset role password",
3585
+ description: "Resets the password for the specified Postgres role.\nReturns a new password and operations. The new password is ready to use when the last operation finishes.\nThe old password remains valid until last operation finishes.\nConnections to the compute endpoint are dropped. If idle,\nthe compute endpoint becomes active for a short period of time.\n\nFor related information, see [Manage roles](https://neon.com/docs/manage/roles/).\n",
3586
+ inputSchema: z.strictObject({ path: zResetProjectBranchRolePasswordPath }),
3587
+ annotations: {
3588
+ readOnlyHint: false,
3589
+ destructiveHint: true,
3590
+ openWorldHint: true
3591
+ },
3592
+ requiresApproval: true,
3593
+ metadata: {
3594
+ method: "POST",
3595
+ path: "/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reset_password",
3596
+ stability: "stable",
3597
+ deprecated: false,
3598
+ tags: ["Branch"]
3599
+ },
3600
+ invoke: (client, input, signal) => raw.resetProjectBranchRolePassword({
3601
+ ...input,
3602
+ client,
3603
+ signal,
3604
+ throwOnError: true
3605
+ })
3606
+ }), client),
3607
+ "restartProjectEndpoint": (client) => bindOperation(defineOperation({
3608
+ operationId: "restartProjectEndpoint",
3609
+ id: "restart_project_endpoint",
3610
+ title: "Restart compute endpoint",
3611
+ description: "Restarts the specified compute endpoint by immediately suspending it and then starting it again.\nAn `endpoint_id` has an `ep-` prefix.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n",
3612
+ inputSchema: z.strictObject({ path: zRestartProjectEndpointPath }),
3613
+ annotations: {
3614
+ readOnlyHint: false,
3615
+ destructiveHint: true,
3616
+ openWorldHint: true
3617
+ },
3618
+ requiresApproval: true,
3619
+ metadata: {
3620
+ method: "POST",
3621
+ path: "/projects/{project_id}/endpoints/{endpoint_id}/restart",
3622
+ stability: "stable",
3623
+ deprecated: false,
3624
+ tags: ["Endpoint"]
3625
+ },
3626
+ invoke: (client, input, signal) => raw.restartProjectEndpoint({
3627
+ ...input,
3628
+ client,
3629
+ signal,
3630
+ throwOnError: true
3631
+ })
3632
+ }), client),
3633
+ "restoreProjectBranch": (client) => bindOperation(defineOperation({
3634
+ operationId: "restoreProjectBranch",
3635
+ id: "restore_project_branch",
3636
+ title: "Restore branch to a historical state",
3637
+ description: "Restores a branch to an earlier state in its own or another branch's history\nby specifying an LSN or timestamp.\nCreates a new branch from the historical state.\n",
3638
+ inputSchema: z.strictObject({
3639
+ body: zRestoreProjectBranchBody,
3640
+ path: zRestoreProjectBranchPath
3641
+ }),
3642
+ annotations: {
3643
+ readOnlyHint: false,
3644
+ destructiveHint: true,
3645
+ openWorldHint: true
3646
+ },
3647
+ requiresApproval: true,
3648
+ metadata: {
3649
+ method: "POST",
3650
+ path: "/projects/{project_id}/branches/{branch_id}/restore",
3651
+ stability: "stable",
3652
+ deprecated: false,
3653
+ tags: ["Branch"]
3654
+ },
3655
+ invoke: (client, input, signal) => raw.restoreProjectBranch({
3656
+ ...input,
3657
+ client,
3658
+ signal,
3659
+ throwOnError: true
3660
+ })
3661
+ }), client),
3662
+ "restoreSnapshot": (client) => bindOperation(defineOperation({
3663
+ operationId: "restoreSnapshot",
3664
+ id: "restore_snapshot",
3665
+ title: "Restore snapshot",
3666
+ description: "Restores the specified snapshot to a new branch,\nand optionally finalizes the restore operation to replace the original branch.\n",
3667
+ inputSchema: z.strictObject({
3668
+ body: zRestoreSnapshotBody.optional(),
3669
+ path: zRestoreSnapshotPath,
3670
+ query: zRestoreSnapshotQuery.optional()
3671
+ }),
3672
+ annotations: {
3673
+ readOnlyHint: false,
3674
+ destructiveHint: true,
3675
+ openWorldHint: true
3676
+ },
3677
+ requiresApproval: true,
3678
+ metadata: {
3679
+ method: "POST",
3680
+ path: "/projects/{project_id}/snapshots/{snapshot_id}/restore",
3681
+ stability: "beta",
3682
+ deprecated: false,
3683
+ tags: ["Snapshot"]
3684
+ },
3685
+ invoke: (client, input, signal) => raw.restoreSnapshot({
3686
+ ...input,
3687
+ client,
3688
+ signal,
3689
+ throwOnError: true
3690
+ })
3691
+ }), client),
3692
+ "revokeApiKey": (client) => bindOperation(defineOperation({
3693
+ operationId: "revokeApiKey",
3694
+ id: "revoke_api_key",
3695
+ title: "Revoke API key",
3696
+ description: "Revokes the specified API key.\nAn API key that is no longer needed can be revoked.\nThis action cannot be reversed.\nAPI keys can also be managed in the Neon Console.\nSee [Manage API keys](https://neon.com/docs/manage/api-keys/).\n",
3697
+ inputSchema: z.strictObject({ path: zRevokeApiKeyPath }),
3698
+ annotations: {
3699
+ readOnlyHint: false,
3700
+ destructiveHint: true,
3701
+ openWorldHint: true
3702
+ },
3703
+ requiresApproval: true,
3704
+ metadata: {
3705
+ method: "DELETE",
3706
+ path: "/api_keys/{key_id}",
3707
+ stability: "stable",
3708
+ deprecated: false,
3709
+ tags: ["API Key"]
3710
+ },
3711
+ invoke: (client, input, signal) => raw.revokeApiKey({
3712
+ ...input,
3713
+ client,
3714
+ signal,
3715
+ throwOnError: true
3716
+ })
3717
+ }), client),
3718
+ "revokeCredential": (client) => bindOperation(defineOperation({
3719
+ operationId: "revokeCredential",
3720
+ id: "revoke_credential",
3721
+ title: "Revoke a credential",
3722
+ description: "Soft-deletes the credential. Idempotent.\n\n**Note**: This endpoint is currently in Beta.\n",
3723
+ inputSchema: z.strictObject({ path: zRevokeCredentialPath }),
3724
+ annotations: {
3725
+ readOnlyHint: false,
3726
+ destructiveHint: true,
3727
+ openWorldHint: true
3728
+ },
3729
+ requiresApproval: true,
3730
+ metadata: {
3731
+ method: "DELETE",
3732
+ path: "/projects/{project_id}/branches/{branch_id}/credentials/{token_id}",
3733
+ stability: "beta",
3734
+ deprecated: false,
3735
+ tags: ["Credentials"]
3736
+ },
3737
+ invoke: (client, input, signal) => raw.revokeCredential({
3738
+ ...input,
3739
+ client,
3740
+ signal,
3741
+ throwOnError: true
3742
+ })
3743
+ }), client),
3744
+ "revokeOrgApiKey": (client) => bindOperation(defineOperation({
3745
+ operationId: "revokeOrgApiKey",
3746
+ id: "revoke_org_api_key",
3747
+ title: "Revoke organization API key",
3748
+ description: "Revokes the specified organization API key.\nAn API key that is no longer needed can be revoked.\nThis action cannot be reversed.\nAPI keys can also be managed in the Neon Console.\nSee [Manage API keys](https://neon.com/docs/manage/api-keys/).\n",
3749
+ inputSchema: z.strictObject({ path: zRevokeOrgApiKeyPath }),
3750
+ annotations: {
3751
+ readOnlyHint: false,
3752
+ destructiveHint: true,
3753
+ openWorldHint: true
3754
+ },
3755
+ requiresApproval: true,
3756
+ metadata: {
3757
+ method: "DELETE",
3758
+ path: "/organizations/{org_id}/api_keys/{key_id}",
3759
+ stability: "stable",
3760
+ deprecated: false,
3761
+ tags: ["Organizations"]
3762
+ },
3763
+ invoke: (client, input, signal) => raw.revokeOrgApiKey({
3764
+ ...input,
3765
+ client,
3766
+ signal,
3767
+ throwOnError: true
3768
+ })
3769
+ }), client),
3770
+ "revokePermissionFromProject": (client) => bindOperation(defineOperation({
3771
+ operationId: "revokePermissionFromProject",
3772
+ id: "revoke_permission_from_project",
3773
+ title: "Revoke project access",
3774
+ description: "Revokes project access from the user associated with the specified permission `id`. You can retrieve a user's permission `id` by listing project access.",
3775
+ inputSchema: z.strictObject({ path: zRevokePermissionFromProjectPath }),
3776
+ annotations: {
3777
+ readOnlyHint: false,
3778
+ destructiveHint: true,
3779
+ openWorldHint: true
3780
+ },
3781
+ requiresApproval: true,
3782
+ metadata: {
3783
+ method: "DELETE",
3784
+ path: "/projects/{project_id}/permissions/{permission_id}",
3785
+ stability: "stable",
3786
+ deprecated: false,
3787
+ tags: ["Project"]
3788
+ },
3789
+ invoke: (client, input, signal) => raw.revokePermissionFromProject({
3790
+ ...input,
3791
+ client,
3792
+ signal,
3793
+ throwOnError: true
3794
+ })
3795
+ }), client),
3796
+ "sendNeonAuthTestEmail": (client) => bindOperation(defineOperation({
3797
+ operationId: "sendNeonAuthTestEmail",
3798
+ id: "send_neon_auth_test_email",
3799
+ title: "Send test email",
3800
+ description: "Sends a test email using the configured email server settings to verify SMTP connectivity and credentials.\nThe request body must include the SMTP server settings\n(`host`, `port`, `username`, `password`, `sender_email`, `sender_name`) and the `recipient_email` address.\n",
3801
+ inputSchema: z.strictObject({
3802
+ body: zSendNeonAuthTestEmailBody,
3803
+ path: zSendNeonAuthTestEmailPath
3804
+ }),
3805
+ annotations: {
3806
+ readOnlyHint: false,
3807
+ destructiveHint: true,
3808
+ openWorldHint: true
3809
+ },
3810
+ requiresApproval: true,
3811
+ metadata: {
3812
+ method: "POST",
3813
+ path: "/projects/{project_id}/branches/{branch_id}/auth/send_test_email",
3814
+ stability: "beta",
3815
+ deprecated: false,
3816
+ tags: ["Auth"]
3817
+ },
3818
+ invoke: (client, input, signal) => raw.sendNeonAuthTestEmail({
3819
+ ...input,
3820
+ client,
3821
+ signal,
3822
+ throwOnError: true
3823
+ })
3824
+ }), client),
3825
+ "setDefaultProjectBranch": (client) => bindOperation(defineOperation({
3826
+ operationId: "setDefaultProjectBranch",
3827
+ id: "set_default_project_branch",
3828
+ title: "Set branch as default",
3829
+ description: "Sets the specified branch as the project's default branch.\nThe default designation is automatically removed from the previous default branch.\nFor more information, see [Manage branches](https://neon.com/docs/manage/branches/).\n",
3830
+ inputSchema: z.strictObject({ path: zSetDefaultProjectBranchPath }),
3831
+ annotations: {
3832
+ readOnlyHint: false,
3833
+ destructiveHint: true,
3834
+ openWorldHint: true
3835
+ },
3836
+ requiresApproval: true,
3837
+ metadata: {
3838
+ method: "POST",
3839
+ path: "/projects/{project_id}/branches/{branch_id}/set_as_default",
3840
+ stability: "stable",
3841
+ deprecated: false,
3842
+ tags: ["Branch"]
3843
+ },
3844
+ invoke: (client, input, signal) => raw.setDefaultProjectBranch({
3845
+ ...input,
3846
+ client,
3847
+ signal,
3848
+ throwOnError: true
3849
+ })
3850
+ }), client),
3851
+ "setOrganizationSpendingLimit": (client) => bindOperation(defineOperation({
3852
+ operationId: "setOrganizationSpendingLimit",
3853
+ id: "set_organization_spending_limit",
3854
+ title: "Set organization spending limit",
3855
+ description: "Sets the monthly spending limit for the specified organization.\nTo remove a previously configured limit, send a DELETE request to this endpoint.\nWhen a limit is configured, email notifications are sent at 80% and 100% of the limit.\nComputes are not suspended when the limit is reached.\nAvailable to organization admins on Launch and Scale plans only.\n",
3856
+ inputSchema: z.strictObject({
3857
+ body: zSetOrganizationSpendingLimitBody,
3858
+ path: zSetOrganizationSpendingLimitPath
3859
+ }),
3860
+ annotations: {
3861
+ readOnlyHint: false,
3862
+ destructiveHint: true,
3863
+ openWorldHint: true
3864
+ },
3865
+ requiresApproval: true,
3866
+ metadata: {
3867
+ method: "PUT",
3868
+ path: "/organizations/{org_id}/billing/spending_limit",
3869
+ stability: "beta",
3870
+ deprecated: false,
3871
+ tags: ["Organizations"]
3872
+ },
3873
+ invoke: (client, input, signal) => raw.setOrganizationSpendingLimit({
3874
+ ...input,
3875
+ client,
3876
+ signal,
3877
+ throwOnError: true
3878
+ })
3879
+ }), client),
3880
+ "setProjectMemberRole": (client) => bindOperation(defineOperation({
3881
+ operationId: "setProjectMemberRole",
3882
+ id: "set_project_member_role",
3883
+ title: "Set an org member's role on a project",
3884
+ description: "Idempotently sets or updates the explicit project grant of the specified org member.\nSelf-demotion requires `confirm_self_demotion=true`.\n",
3885
+ inputSchema: z.strictObject({
3886
+ body: zSetProjectMemberRoleBody,
3887
+ path: zSetProjectMemberRolePath,
3888
+ query: zSetProjectMemberRoleQuery.optional()
3889
+ }),
3890
+ annotations: {
3891
+ readOnlyHint: false,
3892
+ destructiveHint: true,
3893
+ openWorldHint: true
3894
+ },
3895
+ requiresApproval: true,
3896
+ metadata: {
3897
+ method: "PUT",
3898
+ path: "/projects/{project_id}/members/{member_id}/role",
3899
+ stability: "stable",
3900
+ deprecated: false,
3901
+ tags: ["Project"]
3902
+ },
3903
+ invoke: (client, input, signal) => raw.setProjectMemberRole({
3904
+ ...input,
3905
+ client,
3906
+ signal,
3907
+ throwOnError: true
3908
+ })
3909
+ }), client),
3910
+ "setSnapshotSchedule": (client) => bindOperation(defineOperation({
3911
+ operationId: "setSnapshotSchedule",
3912
+ id: "set_snapshot_schedule",
3913
+ title: "Update backup schedule",
3914
+ description: "Updates the backup schedule for the specified branch.\nThe schedule defines how often automatic snapshots are created (for example, `daily` or `weekly`). Requires a paid plan.\n",
3915
+ inputSchema: z.strictObject({
3916
+ body: zSetSnapshotScheduleBody,
3917
+ path: zSetSnapshotSchedulePath
3918
+ }),
3919
+ annotations: {
3920
+ readOnlyHint: false,
3921
+ destructiveHint: true,
3922
+ openWorldHint: true
3923
+ },
3924
+ requiresApproval: true,
3925
+ metadata: {
3926
+ method: "PUT",
3927
+ path: "/projects/{project_id}/branches/{branch_id}/backup_schedule",
3928
+ stability: "stable",
3929
+ deprecated: false,
3930
+ tags: ["Snapshot"]
3931
+ },
3932
+ invoke: (client, input, signal) => raw.setSnapshotSchedule({
3933
+ ...input,
3934
+ client,
3935
+ signal,
3936
+ throwOnError: true
3937
+ })
3938
+ }), client),
3939
+ "startAnonymization": (client) => bindOperation(defineOperation({
3940
+ operationId: "startAnonymization",
3941
+ id: "start_anonymization",
3942
+ title: "Start anonymization",
3943
+ description: "Starts the anonymization process for an anonymized branch that is in the initialized, error, or anonymized state.\nThis will apply all defined masking rules to anonymize sensitive data in the branch databases.\nThe branch must be an anonymized branch to start anonymization.\n\n**Note**: This endpoint is currently in Beta.\n",
3944
+ inputSchema: z.strictObject({ path: zStartAnonymizationPath }),
3945
+ annotations: {
3946
+ readOnlyHint: false,
3947
+ destructiveHint: true,
3948
+ openWorldHint: true
3949
+ },
3950
+ requiresApproval: true,
3951
+ metadata: {
3952
+ method: "POST",
3953
+ path: "/projects/{project_id}/branches/{branch_id}/anonymize",
3954
+ stability: "stable",
3955
+ deprecated: false,
3956
+ tags: ["Branch"]
3957
+ },
3958
+ invoke: (client, input, signal) => raw.startAnonymization({
3959
+ ...input,
3960
+ client,
3961
+ signal,
3962
+ throwOnError: true
3963
+ })
3964
+ }), client),
3965
+ "startProjectEndpoint": (client) => bindOperation(defineOperation({
3966
+ operationId: "startProjectEndpoint",
3967
+ id: "start_project_endpoint",
3968
+ title: "Start compute endpoint",
3969
+ description: "Starts a compute endpoint.\nThe compute endpoint is ready to use after the last operation in the chain finishes successfully.\n\nAn `endpoint_id` has an `ep-` prefix.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n",
3970
+ inputSchema: z.strictObject({ path: zStartProjectEndpointPath }),
3971
+ annotations: {
3972
+ readOnlyHint: false,
3973
+ destructiveHint: true,
3974
+ openWorldHint: true
3975
+ },
3976
+ requiresApproval: true,
3977
+ metadata: {
3978
+ method: "POST",
3979
+ path: "/projects/{project_id}/endpoints/{endpoint_id}/start",
3980
+ stability: "stable",
3981
+ deprecated: false,
3982
+ tags: ["Endpoint"]
3983
+ },
3984
+ invoke: (client, input, signal) => raw.startProjectEndpoint({
3985
+ ...input,
3986
+ client,
3987
+ signal,
3988
+ throwOnError: true
3989
+ })
3990
+ }), client),
3991
+ "suspendProjectEndpoint": (client) => bindOperation(defineOperation({
3992
+ operationId: "suspendProjectEndpoint",
3993
+ id: "suspend_project_endpoint",
3994
+ title: "Suspend compute endpoint",
3995
+ description: "Suspends the specified compute endpoint.\nAn `endpoint_id` has an `ep-` prefix.\nFor information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n",
3996
+ inputSchema: z.strictObject({ path: zSuspendProjectEndpointPath }),
3997
+ annotations: {
3998
+ readOnlyHint: false,
3999
+ destructiveHint: true,
4000
+ openWorldHint: true
4001
+ },
4002
+ requiresApproval: true,
4003
+ metadata: {
4004
+ method: "POST",
4005
+ path: "/projects/{project_id}/endpoints/{endpoint_id}/suspend",
4006
+ stability: "stable",
4007
+ deprecated: false,
4008
+ tags: ["Endpoint"]
4009
+ },
4010
+ invoke: (client, input, signal) => raw.suspendProjectEndpoint({
4011
+ ...input,
4012
+ client,
4013
+ signal,
4014
+ throwOnError: true
4015
+ })
4016
+ }), client),
4017
+ "transferNeonAuthProviderProject": (client) => bindOperation(defineOperation({
4018
+ operationId: "transferNeonAuthProviderProject",
4019
+ id: "transfer_neon_auth_provider_project",
4020
+ title: "Transfer Neon-managed auth project to your own account",
4021
+ description: "Transfers ownership of your Neon-managed auth project to your own auth provider account.\n",
4022
+ inputSchema: z.strictObject({ body: zTransferNeonAuthProviderProjectBody }),
4023
+ annotations: {
4024
+ readOnlyHint: false,
4025
+ destructiveHint: true,
4026
+ openWorldHint: true
4027
+ },
4028
+ requiresApproval: true,
4029
+ metadata: {
4030
+ method: "POST",
4031
+ path: "/projects/auth/transfer_ownership",
4032
+ stability: "stable",
4033
+ deprecated: false,
4034
+ tags: ["Auth (legacy)"]
4035
+ },
4036
+ invoke: (client, input, signal) => raw.transferNeonAuthProviderProject({
4037
+ ...input,
4038
+ client,
4039
+ signal,
4040
+ throwOnError: true
4041
+ })
4042
+ }), client),
4043
+ "transferProjectsFromOrgToOrg": (client) => bindOperation(defineOperation({
4044
+ operationId: "transferProjectsFromOrgToOrg",
4045
+ id: "transfer_projects_from_org_to_org",
4046
+ title: "Transfer projects between organizations",
4047
+ description: "Transfers selected projects, identified by their IDs, from your organization to another specified organization.\n",
4048
+ inputSchema: z.strictObject({
4049
+ body: zTransferProjectsFromOrgToOrgBody,
4050
+ path: zTransferProjectsFromOrgToOrgPath
4051
+ }),
4052
+ annotations: {
4053
+ readOnlyHint: false,
4054
+ destructiveHint: true,
4055
+ openWorldHint: true
4056
+ },
4057
+ requiresApproval: true,
4058
+ metadata: {
4059
+ method: "POST",
4060
+ path: "/organizations/{source_org_id}/projects/transfer",
4061
+ stability: "stable",
4062
+ deprecated: false,
4063
+ tags: ["Organizations"]
4064
+ },
4065
+ invoke: (client, input, signal) => raw.transferProjectsFromOrgToOrg({
4066
+ ...input,
4067
+ client,
4068
+ signal,
4069
+ throwOnError: true
4070
+ })
4071
+ }), client),
4072
+ "transferProjectsFromUserToOrg": (client) => bindOperation(defineOperation({
4073
+ operationId: "transferProjectsFromUserToOrg",
4074
+ id: "transfer_projects_from_user_to_org",
4075
+ title: "Transfer projects from personal account to organization",
4076
+ description: "Deprecated. Personal accounts have been migrated to organizations, so this operation no longer applies. Removal scheduled for July 1, 2026.\n",
4077
+ inputSchema: z.strictObject({ body: zTransferProjectsFromUserToOrgBody }),
4078
+ annotations: {
4079
+ readOnlyHint: false,
4080
+ destructiveHint: true,
4081
+ openWorldHint: true
4082
+ },
4083
+ requiresApproval: true,
4084
+ metadata: {
4085
+ method: "POST",
4086
+ path: "/users/me/projects/transfer",
4087
+ stability: "stable",
4088
+ deprecated: true,
4089
+ tags: ["Users"]
4090
+ },
4091
+ invoke: (client, input, signal) => raw.transferProjectsFromUserToOrg({
4092
+ ...input,
4093
+ client,
4094
+ signal,
4095
+ throwOnError: true
4096
+ })
4097
+ }), client),
4098
+ "updateBranchNeonAuthOauthProvider": (client) => bindOperation(defineOperation({
4099
+ operationId: "updateBranchNeonAuthOauthProvider",
4100
+ id: "update_branch_neon_auth_oauth_provider",
4101
+ title: "Update OAuth provider",
4102
+ description: "Updates an OAuth provider for the specified project.\n",
4103
+ inputSchema: z.strictObject({
4104
+ body: zUpdateBranchNeonAuthOauthProviderBody,
4105
+ path: zUpdateBranchNeonAuthOauthProviderPath
4106
+ }),
4107
+ annotations: {
4108
+ readOnlyHint: false,
4109
+ destructiveHint: true,
4110
+ openWorldHint: true
4111
+ },
4112
+ requiresApproval: true,
4113
+ metadata: {
4114
+ method: "PATCH",
4115
+ path: "/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}",
4116
+ stability: "beta",
4117
+ deprecated: false,
4118
+ tags: ["Auth"]
4119
+ },
4120
+ invoke: (client, input, signal) => raw.updateBranchNeonAuthOauthProvider({
4121
+ ...input,
4122
+ client,
4123
+ signal,
4124
+ throwOnError: true
4125
+ })
4126
+ }), client),
4127
+ "updateMaskingRules": (client) => bindOperation(defineOperation({
4128
+ operationId: "updateMaskingRules",
4129
+ id: "update_masking_rules",
4130
+ title: "Update masking rules",
4131
+ description: "Updates the masking rules for the specified anonymized branch.\nMasking rules define how sensitive data should be anonymized using PostgreSQL Anonymizer.\n\n**Note**: This endpoint is currently in Beta.\n",
4132
+ inputSchema: z.strictObject({
4133
+ body: zUpdateMaskingRulesBody,
4134
+ path: zUpdateMaskingRulesPath
4135
+ }),
4136
+ annotations: {
4137
+ readOnlyHint: false,
4138
+ destructiveHint: true,
4139
+ openWorldHint: true
4140
+ },
4141
+ requiresApproval: true,
4142
+ metadata: {
4143
+ method: "PATCH",
4144
+ path: "/projects/{project_id}/branches/{branch_id}/masking_rules",
4145
+ stability: "stable",
4146
+ deprecated: false,
4147
+ tags: ["Branch"]
4148
+ },
4149
+ invoke: (client, input, signal) => raw.updateMaskingRules({
4150
+ ...input,
4151
+ client,
4152
+ signal,
4153
+ throwOnError: true
4154
+ })
4155
+ }), client),
4156
+ "updateNeonAuthAllowLocalhost": (client) => bindOperation(defineOperation({
4157
+ operationId: "updateNeonAuthAllowLocalhost",
4158
+ id: "update_neon_auth_allow_localhost",
4159
+ title: "Update localhost allow setting",
4160
+ description: "Updates the localhost allow setting for the specified branch's Neon Auth integration.\nWhen enabled, authentication flows work from `localhost` without adding it to the redirect URI whitelist.\n",
4161
+ inputSchema: z.strictObject({
4162
+ body: zUpdateNeonAuthAllowLocalhostBody,
4163
+ path: zUpdateNeonAuthAllowLocalhostPath
4164
+ }),
4165
+ annotations: {
4166
+ readOnlyHint: false,
4167
+ destructiveHint: true,
4168
+ openWorldHint: true
4169
+ },
4170
+ requiresApproval: true,
4171
+ metadata: {
4172
+ method: "PATCH",
4173
+ path: "/projects/{project_id}/branches/{branch_id}/auth/allow_localhost",
4174
+ stability: "stable",
4175
+ deprecated: false,
4176
+ tags: ["Auth"]
4177
+ },
4178
+ invoke: (client, input, signal) => raw.updateNeonAuthAllowLocalhost({
4179
+ ...input,
4180
+ client,
4181
+ signal,
4182
+ throwOnError: true
4183
+ })
4184
+ }), client),
4185
+ "updateNeonAuthConfig": (client) => bindOperation(defineOperation({
4186
+ operationId: "updateNeonAuthConfig",
4187
+ id: "update_neon_auth_config",
4188
+ title: "Update auth configuration",
4189
+ description: "Updates the auth configuration for the branch.\nCurrently supports updating the application name used in auth emails.\n",
4190
+ inputSchema: z.strictObject({
4191
+ body: zUpdateNeonAuthConfigBody,
4192
+ path: zUpdateNeonAuthConfigPath
4193
+ }),
4194
+ annotations: {
4195
+ readOnlyHint: false,
4196
+ destructiveHint: true,
4197
+ openWorldHint: true
4198
+ },
4199
+ requiresApproval: true,
4200
+ metadata: {
4201
+ method: "PATCH",
4202
+ path: "/projects/{project_id}/branches/{branch_id}/auth/config",
4203
+ stability: "stable",
4204
+ deprecated: false,
4205
+ tags: ["Auth"]
4206
+ },
4207
+ invoke: (client, input, signal) => raw.updateNeonAuthConfig({
4208
+ ...input,
4209
+ client,
4210
+ signal,
4211
+ throwOnError: true
4212
+ })
4213
+ }), client),
4214
+ "updateNeonAuthEmailAndPasswordConfig": (client) => bindOperation(defineOperation({
4215
+ operationId: "updateNeonAuthEmailAndPasswordConfig",
4216
+ id: "update_neon_auth_email_and_password_config",
4217
+ title: "Update email and password configuration",
4218
+ description: "Updates the email and password authentication configuration for the specified branch's Neon Auth integration.\nOnly the fields provided in the request body are updated.\n",
4219
+ inputSchema: z.strictObject({
4220
+ body: zUpdateNeonAuthEmailAndPasswordConfigBody,
4221
+ path: zUpdateNeonAuthEmailAndPasswordConfigPath
4222
+ }),
4223
+ annotations: {
4224
+ readOnlyHint: false,
4225
+ destructiveHint: true,
4226
+ openWorldHint: true
4227
+ },
4228
+ requiresApproval: true,
4229
+ metadata: {
4230
+ method: "PATCH",
4231
+ path: "/projects/{project_id}/branches/{branch_id}/auth/email_and_password",
4232
+ stability: "stable",
4233
+ deprecated: false,
4234
+ tags: ["Auth"]
4235
+ },
4236
+ invoke: (client, input, signal) => raw.updateNeonAuthEmailAndPasswordConfig({
4237
+ ...input,
4238
+ client,
4239
+ signal,
4240
+ throwOnError: true
4241
+ })
4242
+ }), client),
4243
+ "updateNeonAuthEmailProvider": (client) => bindOperation(defineOperation({
4244
+ operationId: "updateNeonAuthEmailProvider",
4245
+ id: "update_neon_auth_email_provider",
4246
+ title: "Update email provider configuration",
4247
+ description: "Updates the email provider configuration for the specified branch's Neon Auth integration.\nThe email provider handles transactional messages such as verification emails and password reset links.\n\nPartial `standard` updates — omitting fields to keep their stored values — are supported only for\nBetter Auth integrations, which merge omitted fields server-side. Legacy Stack Auth integrations do\nnot merge and require all six `standard` fields (`host`, `port`, `username`, `password`,\n`sender_email`, `sender_name`) on every update; a partial `standard` body is rejected with 400.\n",
4248
+ inputSchema: z.strictObject({
4249
+ body: zUpdateNeonAuthEmailProviderBody,
4250
+ path: zUpdateNeonAuthEmailProviderPath
4251
+ }),
4252
+ annotations: {
4253
+ readOnlyHint: false,
4254
+ destructiveHint: true,
4255
+ openWorldHint: true
4256
+ },
4257
+ requiresApproval: true,
4258
+ metadata: {
4259
+ method: "PATCH",
4260
+ path: "/projects/{project_id}/branches/{branch_id}/auth/email_provider",
4261
+ stability: "stable",
4262
+ deprecated: false,
4263
+ tags: ["Auth"]
4264
+ },
4265
+ invoke: (client, input, signal) => raw.updateNeonAuthEmailProvider({
4266
+ ...input,
4267
+ client,
4268
+ signal,
4269
+ throwOnError: true
4270
+ })
4271
+ }), client),
4272
+ "updateNeonAuthEmailServer": (client) => bindOperation(defineOperation({
4273
+ operationId: "updateNeonAuthEmailServer",
4274
+ id: "update_neon_auth_email_server",
4275
+ title: "Update email server configuration",
4276
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/email_provider` instead. Removal scheduled for March 1, 2026.\n",
4277
+ inputSchema: z.strictObject({
4278
+ body: zUpdateNeonAuthEmailServerBody,
4279
+ path: zUpdateNeonAuthEmailServerPath
4280
+ }),
4281
+ annotations: {
4282
+ readOnlyHint: false,
4283
+ destructiveHint: true,
4284
+ openWorldHint: true
4285
+ },
4286
+ requiresApproval: true,
4287
+ metadata: {
4288
+ method: "PATCH",
4289
+ path: "/projects/{project_id}/auth/email_server",
4290
+ stability: "stable",
4291
+ deprecated: true,
4292
+ tags: ["Auth (legacy)"]
4293
+ },
4294
+ invoke: (client, input, signal) => raw.updateNeonAuthEmailServer({
4295
+ ...input,
4296
+ client,
4297
+ signal,
4298
+ throwOnError: true
4299
+ })
4300
+ }), client),
4301
+ "updateNeonAuthMagicLinkPlugin": (client) => bindOperation(defineOperation({
4302
+ operationId: "updateNeonAuthMagicLinkPlugin",
4303
+ id: "update_neon_auth_magic_link_plugin",
4304
+ title: "Update magic link plugin configuration",
4305
+ description: "Updates the magic link plugin configuration for Neon Auth.\nThe magic link plugin enables passwordless authentication via email magic links.\n",
4306
+ inputSchema: z.strictObject({
4307
+ body: zUpdateNeonAuthMagicLinkPluginBody,
4308
+ path: zUpdateNeonAuthMagicLinkPluginPath
4309
+ }),
4310
+ annotations: {
4311
+ readOnlyHint: false,
4312
+ destructiveHint: true,
4313
+ openWorldHint: true
4314
+ },
4315
+ requiresApproval: true,
4316
+ metadata: {
4317
+ method: "PATCH",
4318
+ path: "/projects/{project_id}/branches/{branch_id}/auth/plugins/magic-link",
4319
+ stability: "stable",
4320
+ deprecated: false,
4321
+ tags: ["Auth"]
4322
+ },
4323
+ invoke: (client, input, signal) => raw.updateNeonAuthMagicLinkPlugin({
4324
+ ...input,
4325
+ client,
4326
+ signal,
4327
+ throwOnError: true
4328
+ })
4329
+ }), client),
4330
+ "updateNeonAuthOauthProvider": (client) => bindOperation(defineOperation({
4331
+ operationId: "updateNeonAuthOauthProvider",
4332
+ id: "update_neon_auth_oauth_provider",
4333
+ title: "Update OAuth provider",
4334
+ description: "Deprecated. Use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}` instead. Removal scheduled for March 1, 2026.\n",
4335
+ inputSchema: z.strictObject({
4336
+ body: zUpdateNeonAuthOauthProviderBody,
4337
+ path: zUpdateNeonAuthOauthProviderPath
4338
+ }),
4339
+ annotations: {
4340
+ readOnlyHint: false,
4341
+ destructiveHint: true,
4342
+ openWorldHint: true
4343
+ },
4344
+ requiresApproval: true,
4345
+ metadata: {
4346
+ method: "PATCH",
4347
+ path: "/projects/{project_id}/auth/oauth_providers/{oauth_provider_id}",
4348
+ stability: "stable",
4349
+ deprecated: true,
4350
+ tags: ["Auth (legacy)"]
4351
+ },
4352
+ invoke: (client, input, signal) => raw.updateNeonAuthOauthProvider({
4353
+ ...input,
4354
+ client,
4355
+ signal,
4356
+ throwOnError: true
4357
+ })
4358
+ }), client),
4359
+ "updateNeonAuthOrganizationPlugin": (client) => bindOperation(defineOperation({
4360
+ operationId: "updateNeonAuthOrganizationPlugin",
4361
+ id: "update_neon_auth_organization_plugin",
4362
+ title: "Update organization plugin configuration",
4363
+ description: "Updates the organization plugin configuration for Neon Auth.\nThe organization plugin enables multi-tenant organization support.\n",
4364
+ inputSchema: z.strictObject({
4365
+ body: zUpdateNeonAuthOrganizationPluginBody,
4366
+ path: zUpdateNeonAuthOrganizationPluginPath
4367
+ }),
4368
+ annotations: {
4369
+ readOnlyHint: false,
4370
+ destructiveHint: true,
4371
+ openWorldHint: true
4372
+ },
4373
+ requiresApproval: true,
4374
+ metadata: {
4375
+ method: "PATCH",
4376
+ path: "/projects/{project_id}/branches/{branch_id}/auth/plugins/organization",
4377
+ stability: "stable",
4378
+ deprecated: false,
4379
+ tags: ["Auth"]
4380
+ },
4381
+ invoke: (client, input, signal) => raw.updateNeonAuthOrganizationPlugin({
4382
+ ...input,
4383
+ client,
4384
+ signal,
4385
+ throwOnError: true
4386
+ })
4387
+ }), client),
4388
+ "updateNeonAuthPhoneNumberPlugin": (client) => bindOperation(defineOperation({
4389
+ operationId: "updateNeonAuthPhoneNumberPlugin",
4390
+ id: "update_neon_auth_phone_number_plugin",
4391
+ title: "Update phone number plugin configuration",
4392
+ description: "Updates the phone number plugin configuration for Neon Auth.\nOnly the fields provided in the request body are updated; omitted fields retain their current values.\nThe phone number plugin enables phone-based OTP authentication.\nOTP codes are delivered via the `send.otp` webhook event with `delivery_preference: \"sms\"`.\nA webhook must be configured with the `send.otp` event enabled for SMS delivery to work.\n",
4393
+ inputSchema: z.strictObject({
4394
+ body: zUpdateNeonAuthPhoneNumberPluginBody,
4395
+ path: zUpdateNeonAuthPhoneNumberPluginPath
4396
+ }),
4397
+ annotations: {
4398
+ readOnlyHint: false,
4399
+ destructiveHint: true,
4400
+ openWorldHint: true
4401
+ },
4402
+ requiresApproval: true,
4403
+ metadata: {
4404
+ method: "PATCH",
4405
+ path: "/projects/{project_id}/branches/{branch_id}/auth/plugins/phone-number",
4406
+ stability: "stable",
4407
+ deprecated: false,
4408
+ tags: ["Auth"]
4409
+ },
4410
+ invoke: (client, input, signal) => raw.updateNeonAuthPhoneNumberPlugin({
4411
+ ...input,
4412
+ client,
4413
+ signal,
4414
+ throwOnError: true
4415
+ })
4416
+ }), client),
4417
+ "updateNeonAuthUserRole": (client) => bindOperation(defineOperation({
4418
+ operationId: "updateNeonAuthUserRole",
4419
+ id: "update_neon_auth_user_role",
4420
+ title: "Update auth user role",
4421
+ description: "Updates the role of a user in the Neon Auth user directory for the specified branch.\nThe role controls the user's level of access within the Neon Auth integration.\n",
4422
+ inputSchema: z.strictObject({
4423
+ body: zUpdateNeonAuthUserRoleBody,
4424
+ path: zUpdateNeonAuthUserRolePath
4425
+ }),
4426
+ annotations: {
4427
+ readOnlyHint: false,
4428
+ destructiveHint: true,
4429
+ openWorldHint: true
4430
+ },
4431
+ requiresApproval: true,
4432
+ metadata: {
4433
+ method: "PUT",
4434
+ path: "/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}/role",
4435
+ stability: "stable",
4436
+ deprecated: false,
4437
+ tags: ["Auth"]
4438
+ },
4439
+ invoke: (client, input, signal) => raw.updateNeonAuthUserRole({
4440
+ ...input,
4441
+ client,
4442
+ signal,
4443
+ throwOnError: true
4444
+ })
4445
+ }), client),
4446
+ "updateNeonAuthWebhookConfig": (client) => bindOperation(defineOperation({
4447
+ operationId: "updateNeonAuthWebhookConfig",
4448
+ id: "update_neon_auth_webhook_config",
4449
+ title: "Update Neon Auth webhook configuration",
4450
+ description: "Updates the webhook configuration for the specified branch's Neon Auth integration.\nWebhooks notify an external endpoint when auth events occur, such as user creation or sign-in.\n",
4451
+ inputSchema: z.strictObject({
4452
+ body: zUpdateNeonAuthWebhookConfigBody,
4453
+ path: zUpdateNeonAuthWebhookConfigPath
4454
+ }),
4455
+ annotations: {
4456
+ readOnlyHint: false,
4457
+ destructiveHint: true,
4458
+ openWorldHint: true
4459
+ },
4460
+ requiresApproval: true,
4461
+ metadata: {
4462
+ method: "PUT",
4463
+ path: "/projects/{project_id}/branches/{branch_id}/auth/webhooks",
4464
+ stability: "stable",
4465
+ deprecated: false,
4466
+ tags: ["Auth"]
4467
+ },
4468
+ invoke: (client, input, signal) => raw.updateNeonAuthWebhookConfig({
4469
+ ...input,
4470
+ client,
4471
+ signal,
4472
+ throwOnError: true
4473
+ })
4474
+ }), client),
4475
+ "updateOrganizationMember": (client) => bindOperation(defineOperation({
4476
+ operationId: "updateOrganizationMember",
4477
+ id: "update_organization_member",
4478
+ title: "Update role for organization member",
4479
+ description: "Updates the role of an existing member in the specified organization.\nThe requested role must be valid for the organization.\nOnly organization admins can call this endpoint.\n",
4480
+ inputSchema: z.strictObject({
4481
+ body: zUpdateOrganizationMemberBody,
4482
+ path: zUpdateOrganizationMemberPath
4483
+ }),
4484
+ annotations: {
4485
+ readOnlyHint: false,
4486
+ destructiveHint: true,
4487
+ openWorldHint: true
4488
+ },
4489
+ requiresApproval: true,
4490
+ metadata: {
4491
+ method: "PATCH",
4492
+ path: "/organizations/{org_id}/members/{member_id}",
4493
+ stability: "stable",
4494
+ deprecated: false,
4495
+ tags: ["Organizations"]
4496
+ },
4497
+ invoke: (client, input, signal) => raw.updateOrganizationMember({
4498
+ ...input,
4499
+ client,
4500
+ signal,
4501
+ throwOnError: true
4502
+ })
4503
+ }), client),
4504
+ "updateProject": (client) => bindOperation(defineOperation({
4505
+ operationId: "updateProject",
4506
+ id: "update_project",
4507
+ title: "Update project",
4508
+ description: "Updates the specified project.\nConfigurable properties include the project name, default compute settings, history retention period, and IP allowlist.\n",
4509
+ inputSchema: z.strictObject({
4510
+ body: zUpdateProjectBody,
4511
+ path: zUpdateProjectPath
4512
+ }),
4513
+ annotations: {
4514
+ readOnlyHint: false,
4515
+ destructiveHint: true,
4516
+ openWorldHint: true
4517
+ },
4518
+ requiresApproval: true,
4519
+ metadata: {
4520
+ method: "PATCH",
4521
+ path: "/projects/{project_id}",
4522
+ stability: "stable",
4523
+ deprecated: false,
4524
+ tags: ["Project"]
4525
+ },
4526
+ invoke: (client, input, signal) => raw.updateProject({
4527
+ ...input,
4528
+ client,
4529
+ signal,
4530
+ throwOnError: true
4531
+ })
4532
+ }), client),
4533
+ "updateProjectBranch": (client) => bindOperation(defineOperation({
4534
+ operationId: "updateProjectBranch",
4535
+ id: "update_project_branch",
4536
+ title: "Update branch",
4537
+ description: "Updates the specified branch.\nFor more information, see [Manage branches](https://neon.com/docs/manage/branches/).\n",
4538
+ inputSchema: z.strictObject({
4539
+ body: zUpdateProjectBranchBody,
4540
+ path: zUpdateProjectBranchPath
4541
+ }),
4542
+ annotations: {
4543
+ readOnlyHint: false,
4544
+ destructiveHint: true,
4545
+ openWorldHint: true
4546
+ },
4547
+ requiresApproval: true,
4548
+ metadata: {
4549
+ method: "PATCH",
4550
+ path: "/projects/{project_id}/branches/{branch_id}",
4551
+ stability: "stable",
4552
+ deprecated: false,
4553
+ tags: ["Branch"]
4554
+ },
4555
+ invoke: (client, input, signal) => raw.updateProjectBranch({
4556
+ ...input,
4557
+ client,
4558
+ signal,
4559
+ throwOnError: true
4560
+ })
4561
+ }), client),
4562
+ "updateProjectBranchDataAPI": (client) => bindOperation(defineOperation({
4563
+ operationId: "updateProjectBranchDataAPI",
4564
+ id: "update_project_branch_data_api",
4565
+ title: "Update Neon Data API",
4566
+ description: "Updates the Neon Data API configuration for the specified branch.\nYou can optionally provide settings to update the Data API configuration.\nThe schema cache is always refreshed as part of this operation.\n",
4567
+ inputSchema: z.strictObject({
4568
+ body: zUpdateProjectBranchDataApiBody.optional(),
4569
+ path: zUpdateProjectBranchDataApiPath
4570
+ }),
4571
+ annotations: {
4572
+ readOnlyHint: false,
4573
+ destructiveHint: true,
4574
+ openWorldHint: true
4575
+ },
4576
+ requiresApproval: true,
4577
+ metadata: {
4578
+ method: "PATCH",
4579
+ path: "/projects/{project_id}/branches/{branch_id}/data-api/{database_name}",
4580
+ stability: "stable",
4581
+ deprecated: false,
4582
+ tags: ["DataAPI"]
4583
+ },
4584
+ invoke: (client, input, signal) => raw.updateProjectBranchDataApi({
4585
+ ...input,
4586
+ client,
4587
+ signal,
4588
+ throwOnError: true
4589
+ })
4590
+ }), client),
4591
+ "updateProjectBranchDatabase": (client) => bindOperation(defineOperation({
4592
+ operationId: "updateProjectBranchDatabase",
4593
+ id: "update_project_branch_database",
4594
+ title: "Update database",
4595
+ description: "Updates the specified database in the branch.\nFor related information, see [Manage databases](https://neon.com/docs/manage/databases/).\n",
4596
+ inputSchema: z.strictObject({
4597
+ body: zUpdateProjectBranchDatabaseBody,
4598
+ path: zUpdateProjectBranchDatabasePath
4599
+ }),
4600
+ annotations: {
4601
+ readOnlyHint: false,
4602
+ destructiveHint: true,
4603
+ openWorldHint: true
4604
+ },
4605
+ requiresApproval: true,
4606
+ metadata: {
4607
+ method: "PATCH",
4608
+ path: "/projects/{project_id}/branches/{branch_id}/databases/{database_name}",
4609
+ stability: "stable",
4610
+ deprecated: false,
4611
+ tags: ["Branch"]
4612
+ },
4613
+ invoke: (client, input, signal) => raw.updateProjectBranchDatabase({
4614
+ ...input,
4615
+ client,
4616
+ signal,
4617
+ throwOnError: true
4618
+ })
4619
+ }), client),
4620
+ "updateProjectBranchFunction": (client) => bindOperation(defineOperation({
4621
+ operationId: "updateProjectBranchFunction",
4622
+ id: "update_project_branch_function",
4623
+ title: "Update a function",
4624
+ description: "Updates the function's mutable metadata — currently only the display\n`name`. A string sets the display name; `null` clears it, after which\nthe function's `name` falls back to its slug. Leading and trailing\nwhitespace is trimmed; a whitespace-only name is rejected. Acts only\non a function owned by the branch: a slug that is only inherited from\nan ancestor branch returns 404 — rename it on the branch that owns\nit. Like every other change on a branch, a rename is isolated per\nbranch: a branch forked before the rename keeps the name it had at\nfork time.\n\n**Note**: This endpoint is currently in Beta.\n",
4625
+ inputSchema: z.strictObject({
4626
+ body: zUpdateProjectBranchFunctionBody,
4627
+ path: zUpdateProjectBranchFunctionPath
4628
+ }),
4629
+ annotations: {
4630
+ readOnlyHint: false,
4631
+ destructiveHint: true,
4632
+ openWorldHint: true
4633
+ },
4634
+ requiresApproval: true,
4635
+ metadata: {
4636
+ method: "PATCH",
4637
+ path: "/projects/{project_id}/branches/{branch_id}/functions/{slug}",
4638
+ stability: "beta",
4639
+ deprecated: false,
4640
+ tags: ["Functions"]
4641
+ },
4642
+ invoke: (client, input, signal) => raw.updateProjectBranchFunction({
4643
+ ...input,
4644
+ client,
4645
+ signal,
4646
+ throwOnError: true
4647
+ })
4648
+ }), client),
4649
+ "updateProjectEndpoint": (client) => bindOperation(defineOperation({
4650
+ operationId: "updateProjectEndpoint",
4651
+ id: "update_project_endpoint",
4652
+ title: "Update compute endpoint",
4653
+ description: "Updates the specified compute endpoint.\n\nAn `endpoint_id` has an `ep-` prefix. A `branch_id` has a `br-` prefix.\nFor more information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).\n\nIf the returned list of operations is not empty, the compute endpoint is not ready to use.\nThe client must wait for the last operation to finish before using the compute endpoint.\nIf the compute endpoint was idle before the update, it becomes active for a short period of time,\nand the control plane suspends it again after the update.\n",
4654
+ inputSchema: z.strictObject({
4655
+ body: zUpdateProjectEndpointBody,
4656
+ path: zUpdateProjectEndpointPath
4657
+ }),
4658
+ annotations: {
4659
+ readOnlyHint: false,
4660
+ destructiveHint: true,
4661
+ openWorldHint: true
4662
+ },
4663
+ requiresApproval: true,
4664
+ metadata: {
4665
+ method: "PATCH",
4666
+ path: "/projects/{project_id}/endpoints/{endpoint_id}",
4667
+ stability: "stable",
4668
+ deprecated: false,
4669
+ tags: ["Endpoint"]
4670
+ },
4671
+ invoke: (client, input, signal) => raw.updateProjectEndpoint({
4672
+ ...input,
4673
+ client,
4674
+ signal,
4675
+ throwOnError: true
4676
+ })
4677
+ }), client),
4678
+ "updateSnapshot": (client) => bindOperation(defineOperation({
4679
+ operationId: "updateSnapshot",
4680
+ id: "update_snapshot",
4681
+ title: "Update snapshot",
4682
+ description: "Updates the specified snapshot.\n",
4683
+ inputSchema: z.strictObject({
4684
+ body: zUpdateSnapshotBody,
4685
+ path: zUpdateSnapshotPath
4686
+ }),
4687
+ annotations: {
4688
+ readOnlyHint: false,
4689
+ destructiveHint: true,
4690
+ openWorldHint: true
4691
+ },
4692
+ requiresApproval: true,
4693
+ metadata: {
4694
+ method: "PATCH",
4695
+ path: "/projects/{project_id}/snapshots/{snapshot_id}",
4696
+ stability: "stable",
4697
+ deprecated: false,
4698
+ tags: ["Snapshot"]
4699
+ },
4700
+ invoke: (client, input, signal) => raw.updateSnapshot({
4701
+ ...input,
4702
+ client,
4703
+ signal,
4704
+ throwOnError: true
4705
+ })
4706
+ }), client)
4707
+ };
4708
+ //#endregion
4709
+ export { operationFactories, operationIds };