@neon/sdk 0.0.0 → 0.1.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.
- package/LICENSE.md +178 -0
- package/README.md +349 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/client/client/client.gen.d.ts +7 -0
- package/dist/client/client/client.gen.d.ts.map +1 -0
- package/dist/client/client/client.gen.js +176 -0
- package/dist/client/client/client.gen.js.map +1 -0
- package/dist/client/client/index.d.ts +10 -0
- package/dist/client/client/index.js +6 -0
- package/dist/client/client/types.gen.d.ts +124 -0
- package/dist/client/client/types.gen.d.ts.map +1 -0
- package/dist/client/client/types.gen.js +1 -0
- package/dist/client/client/utils.gen.d.ts +42 -0
- package/dist/client/client/utils.gen.d.ts.map +1 -0
- package/dist/client/client/utils.gen.js +179 -0
- package/dist/client/client/utils.gen.js.map +1 -0
- package/dist/client/client.gen.d.ts +18 -0
- package/dist/client/client.gen.d.ts.map +1 -0
- package/dist/client/client.gen.js +8 -0
- package/dist/client/client.gen.js.map +1 -0
- package/dist/client/core/auth.gen.d.ts +29 -0
- package/dist/client/core/auth.gen.d.ts.map +1 -0
- package/dist/client/core/auth.gen.js +12 -0
- package/dist/client/core/auth.gen.js.map +1 -0
- package/dist/client/core/bodySerializer.gen.d.ts +29 -0
- package/dist/client/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/client/core/bodySerializer.gen.js +33 -0
- package/dist/client/core/bodySerializer.gen.js.map +1 -0
- package/dist/client/core/params.gen.d.ts +46 -0
- package/dist/client/core/params.gen.d.ts.map +1 -0
- package/dist/client/core/params.gen.js +65 -0
- package/dist/client/core/params.gen.js.map +1 -0
- package/dist/client/core/pathSerializer.gen.d.ts +52 -0
- package/dist/client/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/client/core/pathSerializer.gen.js +82 -0
- package/dist/client/core/pathSerializer.gen.js.map +1 -0
- package/dist/client/core/queryKeySerializer.gen.d.ts +22 -0
- package/dist/client/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/client/core/queryKeySerializer.gen.js +64 -0
- package/dist/client/core/queryKeySerializer.gen.js.map +1 -0
- package/dist/client/core/serverSentEvents.gen.d.ts +88 -0
- package/dist/client/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/client/core/serverSentEvents.gen.js +95 -0
- package/dist/client/core/serverSentEvents.gen.js.map +1 -0
- package/dist/client/core/types.gen.d.ts +80 -0
- package/dist/client/core/types.gen.d.ts.map +1 -0
- package/dist/client/core/types.gen.js +1 -0
- package/dist/client/core/utils.gen.d.ts +33 -0
- package/dist/client/core/utils.gen.d.ts.map +1 -0
- package/dist/client/core/utils.gen.js +78 -0
- package/dist/client/core/utils.gen.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.js +2 -0
- package/dist/client/sdk.gen.d.ts +1362 -0
- package/dist/client/sdk.gen.d.ts.map +1 -0
- package/dist/client/sdk.gen.js +4315 -0
- package/dist/client/sdk.gen.js.map +1 -0
- package/dist/client/types.gen.d.ts +9938 -0
- package/dist/client/types.gen.d.ts.map +1 -0
- package/dist/client/types.gen.js +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +4 -0
- package/dist/neon/client.d.ts +52 -0
- package/dist/neon/client.d.ts.map +1 -0
- package/dist/neon/client.js +40 -0
- package/dist/neon/client.js.map +1 -0
- package/dist/neon/config.d.ts +40 -0
- package/dist/neon/config.d.ts.map +1 -0
- package/dist/neon/config.js +23 -0
- package/dist/neon/config.js.map +1 -0
- package/dist/neon/connection.d.ts +22 -0
- package/dist/neon/connection.d.ts.map +1 -0
- package/dist/neon/connection.js +33 -0
- package/dist/neon/connection.js.map +1 -0
- package/dist/neon/context.d.ts +50 -0
- package/dist/neon/context.d.ts.map +1 -0
- package/dist/neon/context.js +59 -0
- package/dist/neon/context.js.map +1 -0
- package/dist/neon/coverage.d.ts +26 -0
- package/dist/neon/coverage.d.ts.map +1 -0
- package/dist/neon/coverage.js +229 -0
- package/dist/neon/coverage.js.map +1 -0
- package/dist/neon/errors.d.ts +78 -0
- package/dist/neon/errors.d.ts.map +1 -0
- package/dist/neon/errors.js +116 -0
- package/dist/neon/errors.js.map +1 -0
- package/dist/neon/paginate.d.ts +34 -0
- package/dist/neon/paginate.d.ts.map +1 -0
- package/dist/neon/paginate.js +51 -0
- package/dist/neon/paginate.js.map +1 -0
- package/dist/neon/resources/account.d.ts +45 -0
- package/dist/neon/resources/account.d.ts.map +1 -0
- package/dist/neon/resources/account.js +65 -0
- package/dist/neon/resources/account.js.map +1 -0
- package/dist/neon/resources/branches.d.ts +84 -0
- package/dist/neon/resources/branches.d.ts.map +1 -0
- package/dist/neon/resources/branches.js +132 -0
- package/dist/neon/resources/branches.js.map +1 -0
- package/dist/neon/resources/consumption.d.ts +22 -0
- package/dist/neon/resources/consumption.d.ts.map +1 -0
- package/dist/neon/resources/consumption.js +59 -0
- package/dist/neon/resources/consumption.js.map +1 -0
- package/dist/neon/resources/dataapi.d.ts +25 -0
- package/dist/neon/resources/dataapi.d.ts.map +1 -0
- package/dist/neon/resources/dataapi.js +59 -0
- package/dist/neon/resources/dataapi.js.map +1 -0
- package/dist/neon/resources/databases.d.ts +30 -0
- package/dist/neon/resources/databases.d.ts.map +1 -0
- package/dist/neon/resources/databases.js +68 -0
- package/dist/neon/resources/databases.js.map +1 -0
- package/dist/neon/resources/endpoints.d.ts +39 -0
- package/dist/neon/resources/endpoints.d.ts.map +1 -0
- package/dist/neon/resources/endpoints.js +89 -0
- package/dist/neon/resources/endpoints.js.map +1 -0
- package/dist/neon/resources/operations.d.ts +27 -0
- package/dist/neon/resources/operations.d.ts.map +1 -0
- package/dist/neon/resources/operations.js +50 -0
- package/dist/neon/resources/operations.js.map +1 -0
- package/dist/neon/resources/postgres.d.ts +45 -0
- package/dist/neon/resources/postgres.d.ts.map +1 -0
- package/dist/neon/resources/postgres.js +104 -0
- package/dist/neon/resources/postgres.js.map +1 -0
- package/dist/neon/resources/projects.d.ts +84 -0
- package/dist/neon/resources/projects.d.ts.map +1 -0
- package/dist/neon/resources/projects.js +111 -0
- package/dist/neon/resources/projects.js.map +1 -0
- package/dist/neon/resources/roles.d.ts +40 -0
- package/dist/neon/resources/roles.d.ts.map +1 -0
- package/dist/neon/resources/roles.js +78 -0
- package/dist/neon/resources/roles.js.map +1 -0
- package/dist/neon/resources/snapshots.d.ts +86 -0
- package/dist/neon/resources/snapshots.d.ts.map +1 -0
- package/dist/neon/resources/snapshots.js +125 -0
- package/dist/neon/resources/snapshots.js.map +1 -0
- package/dist/neon/result.d.ts +32 -0
- package/dist/neon/result.d.ts.map +1 -0
- package/dist/neon/result.js +26 -0
- package/dist/neon/result.js.map +1 -0
- package/dist/neon/retry.d.ts +17 -0
- package/dist/neon/retry.d.ts.map +1 -0
- package/dist/neon/retry.js +42 -0
- package/dist/neon/retry.js.map +1 -0
- package/dist/neon/wait.d.ts +27 -0
- package/dist/neon/wait.d.ts.map +1 -0
- package/dist/neon/wait.js +70 -0
- package/dist/neon/wait.js.map +1 -0
- package/dist/raw.d.ts +13 -0
- package/dist/raw.d.ts.map +1 -0
- package/dist/raw.js +159 -0
- package/dist/raw.js.map +1 -0
- package/package.json +57 -16
|
@@ -0,0 +1,4315 @@
|
|
|
1
|
+
import { client } from "./client.gen.js";
|
|
2
|
+
//#region src/client/sdk.gen.ts
|
|
3
|
+
/**
|
|
4
|
+
* Get advisor issues
|
|
5
|
+
*
|
|
6
|
+
* Analyzes the database for security and performance issues.
|
|
7
|
+
* Returns a list of issues categorized by severity (ERROR, WARN, INFO).
|
|
8
|
+
*
|
|
9
|
+
* Requires read access to the project and Data API enabled.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
const getProjectAdvisorSecurityIssues = (options) => (options.client ?? client).get({
|
|
13
|
+
security: [
|
|
14
|
+
{
|
|
15
|
+
scheme: "bearer",
|
|
16
|
+
type: "http"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
in: "cookie",
|
|
20
|
+
name: "zenith",
|
|
21
|
+
type: "apiKey"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
in: "cookie",
|
|
25
|
+
name: "keycloak_token",
|
|
26
|
+
type: "apiKey"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
url: "/projects/{project_id}/advisors",
|
|
30
|
+
...options
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* List API keys
|
|
34
|
+
*
|
|
35
|
+
* Retrieves the API keys for your Neon account.
|
|
36
|
+
* The response does not include API key tokens. A token is only provided when creating an API key.
|
|
37
|
+
* API keys can also be managed in the Neon Console.
|
|
38
|
+
* For more information, see [Manage API keys](https://neon.com/docs/manage/api-keys/).
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
const listApiKeys = (options) => (options?.client ?? client).get({
|
|
42
|
+
security: [
|
|
43
|
+
{
|
|
44
|
+
scheme: "bearer",
|
|
45
|
+
type: "http"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
in: "cookie",
|
|
49
|
+
name: "zenith",
|
|
50
|
+
type: "apiKey"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
in: "cookie",
|
|
54
|
+
name: "keycloak_token",
|
|
55
|
+
type: "apiKey"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
url: "/api_keys",
|
|
59
|
+
...options
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* Create API key
|
|
63
|
+
*
|
|
64
|
+
* Creates an API key.
|
|
65
|
+
* The `key_name` is a user-specified name for the key.
|
|
66
|
+
* Returns an `id` and `key`; the `key` is a randomly generated, 64-bit token required to access the Neon API.
|
|
67
|
+
* Store the key securely — it is only returned once.
|
|
68
|
+
* API keys can also be managed in the Neon Console.
|
|
69
|
+
* See [Manage API keys](https://neon.com/docs/manage/api-keys/).
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
const createApiKey = (options) => (options.client ?? client).post({
|
|
73
|
+
security: [
|
|
74
|
+
{
|
|
75
|
+
scheme: "bearer",
|
|
76
|
+
type: "http"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
in: "cookie",
|
|
80
|
+
name: "zenith",
|
|
81
|
+
type: "apiKey"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
in: "cookie",
|
|
85
|
+
name: "keycloak_token",
|
|
86
|
+
type: "apiKey"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
url: "/api_keys",
|
|
90
|
+
...options,
|
|
91
|
+
headers: {
|
|
92
|
+
"Content-Type": "application/json",
|
|
93
|
+
...options.headers
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* Revoke API key
|
|
98
|
+
*
|
|
99
|
+
* Revokes the specified API key.
|
|
100
|
+
* An API key that is no longer needed can be revoked.
|
|
101
|
+
* This action cannot be reversed.
|
|
102
|
+
* API keys can also be managed in the Neon Console.
|
|
103
|
+
* See [Manage API keys](https://neon.com/docs/manage/api-keys/).
|
|
104
|
+
*
|
|
105
|
+
*/
|
|
106
|
+
const revokeApiKey = (options) => (options.client ?? client).delete({
|
|
107
|
+
security: [
|
|
108
|
+
{
|
|
109
|
+
scheme: "bearer",
|
|
110
|
+
type: "http"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
in: "cookie",
|
|
114
|
+
name: "zenith",
|
|
115
|
+
type: "apiKey"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
in: "cookie",
|
|
119
|
+
name: "keycloak_token",
|
|
120
|
+
type: "apiKey"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
url: "/api_keys/{key_id}",
|
|
124
|
+
...options
|
|
125
|
+
});
|
|
126
|
+
/**
|
|
127
|
+
* Retrieve operation details
|
|
128
|
+
*
|
|
129
|
+
* Retrieves details for the specified operation.
|
|
130
|
+
* An operation is an action performed on a Neon project resource.
|
|
131
|
+
*
|
|
132
|
+
*/
|
|
133
|
+
const getProjectOperation = (options) => (options.client ?? client).get({
|
|
134
|
+
security: [
|
|
135
|
+
{
|
|
136
|
+
scheme: "bearer",
|
|
137
|
+
type: "http"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
in: "cookie",
|
|
141
|
+
name: "zenith",
|
|
142
|
+
type: "apiKey"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
in: "cookie",
|
|
146
|
+
name: "keycloak_token",
|
|
147
|
+
type: "apiKey"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
url: "/projects/{project_id}/operations/{operation_id}",
|
|
151
|
+
...options
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* List projects
|
|
155
|
+
*
|
|
156
|
+
* Retrieves a list of projects for the specified organization.
|
|
157
|
+
* If using a personal API key, include the `org_id` parameter to specify which organization to work with.
|
|
158
|
+
* If using an org API key, `org_id` is automatically inferred from the key.
|
|
159
|
+
* For more information, see [Manage organizations using the Neon API](https://neon.com/docs/manage/orgs-api)
|
|
160
|
+
* and [Manage projects](https://neon.com/docs/manage/projects/).
|
|
161
|
+
*
|
|
162
|
+
*/
|
|
163
|
+
const listProjects = (options) => (options?.client ?? client).get({
|
|
164
|
+
security: [
|
|
165
|
+
{
|
|
166
|
+
scheme: "bearer",
|
|
167
|
+
type: "http"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
in: "cookie",
|
|
171
|
+
name: "zenith",
|
|
172
|
+
type: "apiKey"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
in: "cookie",
|
|
176
|
+
name: "keycloak_token",
|
|
177
|
+
type: "apiKey"
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
url: "/projects",
|
|
181
|
+
...options
|
|
182
|
+
});
|
|
183
|
+
/**
|
|
184
|
+
* Create project
|
|
185
|
+
*
|
|
186
|
+
* Creates a Neon project within an organization.
|
|
187
|
+
* If using a personal API key, include the `org_id` parameter to specify which organization to create the project in.
|
|
188
|
+
* If using an org API key, `org_id` is automatically inferred from the key.
|
|
189
|
+
* Plan limits define how many projects you can create.
|
|
190
|
+
* For more information, see [Manage projects](https://neon.com/docs/manage/projects/).
|
|
191
|
+
*
|
|
192
|
+
* You can specify a region and Postgres version in the request body.
|
|
193
|
+
* Neon currently supports PostgreSQL 14, 15, 16, 17, and 18.
|
|
194
|
+
* For supported regions and `region_id` values, see [Regions](https://neon.com/docs/introduction/regions/).
|
|
195
|
+
*
|
|
196
|
+
*/
|
|
197
|
+
const createProject = (options) => (options.client ?? client).post({
|
|
198
|
+
security: [
|
|
199
|
+
{
|
|
200
|
+
scheme: "bearer",
|
|
201
|
+
type: "http"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
in: "cookie",
|
|
205
|
+
name: "zenith",
|
|
206
|
+
type: "apiKey"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
in: "cookie",
|
|
210
|
+
name: "keycloak_token",
|
|
211
|
+
type: "apiKey"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
url: "/projects",
|
|
215
|
+
...options,
|
|
216
|
+
headers: {
|
|
217
|
+
"Content-Type": "application/json",
|
|
218
|
+
...options.headers
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
/**
|
|
222
|
+
* List shared projects
|
|
223
|
+
*
|
|
224
|
+
* Retrieves a list of projects shared with your Neon account.
|
|
225
|
+
* For more information, see [Manage projects](https://neon.com/docs/manage/projects/).
|
|
226
|
+
*
|
|
227
|
+
*/
|
|
228
|
+
const listSharedProjects = (options) => (options?.client ?? client).get({
|
|
229
|
+
security: [
|
|
230
|
+
{
|
|
231
|
+
scheme: "bearer",
|
|
232
|
+
type: "http"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
in: "cookie",
|
|
236
|
+
name: "zenith",
|
|
237
|
+
type: "apiKey"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
in: "cookie",
|
|
241
|
+
name: "keycloak_token",
|
|
242
|
+
type: "apiKey"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
url: "/projects/shared",
|
|
246
|
+
...options
|
|
247
|
+
});
|
|
248
|
+
/**
|
|
249
|
+
* Delete project
|
|
250
|
+
*
|
|
251
|
+
* Deletes the specified project and all its endpoints, branches, databases, and users.
|
|
252
|
+
* Deleted projects can be recovered within 7 days using `POST /projects/{project_id}/recover`.
|
|
253
|
+
* To list recoverable projects, use `GET /projects?recoverable=true`.
|
|
254
|
+
*
|
|
255
|
+
*/
|
|
256
|
+
const deleteProject = (options) => (options.client ?? client).delete({
|
|
257
|
+
security: [
|
|
258
|
+
{
|
|
259
|
+
scheme: "bearer",
|
|
260
|
+
type: "http"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
in: "cookie",
|
|
264
|
+
name: "zenith",
|
|
265
|
+
type: "apiKey"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
in: "cookie",
|
|
269
|
+
name: "keycloak_token",
|
|
270
|
+
type: "apiKey"
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
url: "/projects/{project_id}",
|
|
274
|
+
...options
|
|
275
|
+
});
|
|
276
|
+
/**
|
|
277
|
+
* Retrieve project details
|
|
278
|
+
*
|
|
279
|
+
* Retrieves information about the specified project.
|
|
280
|
+
* Returned details include the project settings, compute configuration, history retention, owner information, and current usage metrics.
|
|
281
|
+
*
|
|
282
|
+
*/
|
|
283
|
+
const getProject = (options) => (options.client ?? client).get({
|
|
284
|
+
security: [
|
|
285
|
+
{
|
|
286
|
+
scheme: "bearer",
|
|
287
|
+
type: "http"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
in: "cookie",
|
|
291
|
+
name: "zenith",
|
|
292
|
+
type: "apiKey"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
in: "cookie",
|
|
296
|
+
name: "keycloak_token",
|
|
297
|
+
type: "apiKey"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
url: "/projects/{project_id}",
|
|
301
|
+
...options
|
|
302
|
+
});
|
|
303
|
+
/**
|
|
304
|
+
* Update project
|
|
305
|
+
*
|
|
306
|
+
* Updates the specified project.
|
|
307
|
+
* Configurable properties include the project name, default compute settings, history retention period, and IP allowlist.
|
|
308
|
+
*
|
|
309
|
+
*/
|
|
310
|
+
const updateProject = (options) => (options.client ?? client).patch({
|
|
311
|
+
security: [
|
|
312
|
+
{
|
|
313
|
+
scheme: "bearer",
|
|
314
|
+
type: "http"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
in: "cookie",
|
|
318
|
+
name: "zenith",
|
|
319
|
+
type: "apiKey"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
in: "cookie",
|
|
323
|
+
name: "keycloak_token",
|
|
324
|
+
type: "apiKey"
|
|
325
|
+
}
|
|
326
|
+
],
|
|
327
|
+
url: "/projects/{project_id}",
|
|
328
|
+
...options,
|
|
329
|
+
headers: {
|
|
330
|
+
"Content-Type": "application/json",
|
|
331
|
+
...options.headers
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
/**
|
|
335
|
+
* Recover a deleted project
|
|
336
|
+
*
|
|
337
|
+
* Recovers a deleted project within the 7-day deletion recovery period.
|
|
338
|
+
* Restores branches, endpoints, settings, and connection strings.
|
|
339
|
+
* Some integrations require manual reconfiguration after recovery.
|
|
340
|
+
* To list recoverable projects, use `GET /projects?recoverable=true`.
|
|
341
|
+
*
|
|
342
|
+
*/
|
|
343
|
+
const recoverProject = (options) => (options.client ?? client).post({
|
|
344
|
+
security: [
|
|
345
|
+
{
|
|
346
|
+
scheme: "bearer",
|
|
347
|
+
type: "http"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
in: "cookie",
|
|
351
|
+
name: "zenith",
|
|
352
|
+
type: "apiKey"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
in: "cookie",
|
|
356
|
+
name: "keycloak_token",
|
|
357
|
+
type: "apiKey"
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
url: "/projects/{project_id}/recover",
|
|
361
|
+
...options
|
|
362
|
+
});
|
|
363
|
+
/**
|
|
364
|
+
* List operations
|
|
365
|
+
*
|
|
366
|
+
* Retrieves a list of operations for the specified Neon project.
|
|
367
|
+
* The number of operations returned can be large.
|
|
368
|
+
* To paginate the response, issue an initial request with a `limit` value.
|
|
369
|
+
* Then, add the `cursor` value that was returned in the response to the next request.
|
|
370
|
+
* Operations older than 6 months may be deleted from our systems.
|
|
371
|
+
* If you need more history than that, you should store your own history.
|
|
372
|
+
*
|
|
373
|
+
*/
|
|
374
|
+
const listProjectOperations = (options) => (options.client ?? client).get({
|
|
375
|
+
security: [
|
|
376
|
+
{
|
|
377
|
+
scheme: "bearer",
|
|
378
|
+
type: "http"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
in: "cookie",
|
|
382
|
+
name: "zenith",
|
|
383
|
+
type: "apiKey"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
in: "cookie",
|
|
387
|
+
name: "keycloak_token",
|
|
388
|
+
type: "apiKey"
|
|
389
|
+
}
|
|
390
|
+
],
|
|
391
|
+
url: "/projects/{project_id}/operations",
|
|
392
|
+
...options
|
|
393
|
+
});
|
|
394
|
+
/**
|
|
395
|
+
* List project access
|
|
396
|
+
*
|
|
397
|
+
* 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.
|
|
398
|
+
*/
|
|
399
|
+
const listProjectPermissions = (options) => (options.client ?? client).get({
|
|
400
|
+
security: [
|
|
401
|
+
{
|
|
402
|
+
scheme: "bearer",
|
|
403
|
+
type: "http"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
in: "cookie",
|
|
407
|
+
name: "zenith",
|
|
408
|
+
type: "apiKey"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
in: "cookie",
|
|
412
|
+
name: "keycloak_token",
|
|
413
|
+
type: "apiKey"
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
url: "/projects/{project_id}/permissions",
|
|
417
|
+
...options
|
|
418
|
+
});
|
|
419
|
+
/**
|
|
420
|
+
* Grant project access
|
|
421
|
+
*
|
|
422
|
+
* Grants project access to the account associated with the specified email address.
|
|
423
|
+
*
|
|
424
|
+
*/
|
|
425
|
+
const grantPermissionToProject = (options) => (options.client ?? client).post({
|
|
426
|
+
security: [
|
|
427
|
+
{
|
|
428
|
+
scheme: "bearer",
|
|
429
|
+
type: "http"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
in: "cookie",
|
|
433
|
+
name: "zenith",
|
|
434
|
+
type: "apiKey"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
in: "cookie",
|
|
438
|
+
name: "keycloak_token",
|
|
439
|
+
type: "apiKey"
|
|
440
|
+
}
|
|
441
|
+
],
|
|
442
|
+
url: "/projects/{project_id}/permissions",
|
|
443
|
+
...options,
|
|
444
|
+
headers: {
|
|
445
|
+
"Content-Type": "application/json",
|
|
446
|
+
...options.headers
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
/**
|
|
450
|
+
* Revoke project access
|
|
451
|
+
*
|
|
452
|
+
* Revokes project access from the user associated with the specified permission `id`. You can retrieve a user's permission `id` by listing project access.
|
|
453
|
+
*/
|
|
454
|
+
const revokePermissionFromProject = (options) => (options.client ?? client).delete({
|
|
455
|
+
security: [
|
|
456
|
+
{
|
|
457
|
+
scheme: "bearer",
|
|
458
|
+
type: "http"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
in: "cookie",
|
|
462
|
+
name: "zenith",
|
|
463
|
+
type: "apiKey"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
in: "cookie",
|
|
467
|
+
name: "keycloak_token",
|
|
468
|
+
type: "apiKey"
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
url: "/projects/{project_id}/permissions/{permission_id}",
|
|
472
|
+
...options
|
|
473
|
+
});
|
|
474
|
+
/**
|
|
475
|
+
* List available shared preload libraries
|
|
476
|
+
*
|
|
477
|
+
* Returns the shared preload libraries available for the specified project's Postgres version.
|
|
478
|
+
* Shared preload libraries are Postgres extensions that require the `shared_preload_libraries`
|
|
479
|
+
* setting and a compute restart to activate.
|
|
480
|
+
* Use this list to determine which libraries can be enabled in the project's
|
|
481
|
+
* `settings.preload_libraries` configuration.
|
|
482
|
+
*
|
|
483
|
+
*/
|
|
484
|
+
const getAvailablePreloadLibraries = (options) => (options.client ?? client).get({
|
|
485
|
+
security: [
|
|
486
|
+
{
|
|
487
|
+
scheme: "bearer",
|
|
488
|
+
type: "http"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
in: "cookie",
|
|
492
|
+
name: "zenith",
|
|
493
|
+
type: "apiKey"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
in: "cookie",
|
|
497
|
+
name: "keycloak_token",
|
|
498
|
+
type: "apiKey"
|
|
499
|
+
}
|
|
500
|
+
],
|
|
501
|
+
url: "/projects/{project_id}/available_preload_libraries",
|
|
502
|
+
...options
|
|
503
|
+
});
|
|
504
|
+
/**
|
|
505
|
+
* Create a project transfer request
|
|
506
|
+
*
|
|
507
|
+
* Creates a transfer request for the specified project. The request expires after a set period.
|
|
508
|
+
* To accept the request, the recipient calls `PUT /projects/{project_id}/transfer_requests/{request_id}`
|
|
509
|
+
* or uses the Neon Console claim link.
|
|
510
|
+
* The optional `ru` parameter redirects the recipient after acceptance.
|
|
511
|
+
*
|
|
512
|
+
*/
|
|
513
|
+
const createProjectTransferRequest = (options) => (options.client ?? client).post({
|
|
514
|
+
security: [
|
|
515
|
+
{
|
|
516
|
+
scheme: "bearer",
|
|
517
|
+
type: "http"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
in: "cookie",
|
|
521
|
+
name: "zenith",
|
|
522
|
+
type: "apiKey"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
in: "cookie",
|
|
526
|
+
name: "keycloak_token",
|
|
527
|
+
type: "apiKey"
|
|
528
|
+
}
|
|
529
|
+
],
|
|
530
|
+
url: "/projects/{project_id}/transfer_requests",
|
|
531
|
+
...options,
|
|
532
|
+
headers: {
|
|
533
|
+
"Content-Type": "application/json",
|
|
534
|
+
...options.headers
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
/**
|
|
538
|
+
* Accept a project transfer request
|
|
539
|
+
*
|
|
540
|
+
* Accepts a transfer request for the specified project, transferring it to the specified organization
|
|
541
|
+
* or user. If org_id is not passed, the project will be transferred to the current user or organization account.
|
|
542
|
+
*
|
|
543
|
+
*/
|
|
544
|
+
const acceptProjectTransferRequest = (options) => (options.client ?? client).put({
|
|
545
|
+
security: [
|
|
546
|
+
{
|
|
547
|
+
scheme: "bearer",
|
|
548
|
+
type: "http"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
in: "cookie",
|
|
552
|
+
name: "zenith",
|
|
553
|
+
type: "apiKey"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
in: "cookie",
|
|
557
|
+
name: "keycloak_token",
|
|
558
|
+
type: "apiKey"
|
|
559
|
+
}
|
|
560
|
+
],
|
|
561
|
+
url: "/projects/{project_id}/transfer_requests/{request_id}",
|
|
562
|
+
...options,
|
|
563
|
+
headers: {
|
|
564
|
+
"Content-Type": "application/json",
|
|
565
|
+
...options.headers
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
/**
|
|
569
|
+
* List JWKS URLs
|
|
570
|
+
*
|
|
571
|
+
* Returns the JWKS URLs available for verifying JWTs used as the authentication mechanism for the specified project.
|
|
572
|
+
*
|
|
573
|
+
*/
|
|
574
|
+
const getProjectJwks = (options) => (options.client ?? client).get({
|
|
575
|
+
security: [
|
|
576
|
+
{
|
|
577
|
+
scheme: "bearer",
|
|
578
|
+
type: "http"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
in: "cookie",
|
|
582
|
+
name: "zenith",
|
|
583
|
+
type: "apiKey"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
in: "cookie",
|
|
587
|
+
name: "keycloak_token",
|
|
588
|
+
type: "apiKey"
|
|
589
|
+
}
|
|
590
|
+
],
|
|
591
|
+
url: "/projects/{project_id}/jwks",
|
|
592
|
+
...options
|
|
593
|
+
});
|
|
594
|
+
/**
|
|
595
|
+
* Add JWKS URL
|
|
596
|
+
*
|
|
597
|
+
* Adds a JWKS URL to the specified project for verifying JWTs used as the authentication mechanism.
|
|
598
|
+
*
|
|
599
|
+
* The URL must be a valid HTTPS URL that returns a JSON Web Key Set.
|
|
600
|
+
*
|
|
601
|
+
* The `provider_name` field allows you to specify which authentication provider you're using (e.g., Clerk, Auth0, AWS Cognito).
|
|
602
|
+
*
|
|
603
|
+
* The `branch_id` scopes the JWKS URL to specific branches; if not specified, it applies to all branches.
|
|
604
|
+
*
|
|
605
|
+
* The `role_names` scopes the URL to specific roles; if not specified, default roles are used (`authenticator`, `authenticated`, `anonymous`).
|
|
606
|
+
*
|
|
607
|
+
* The `jwt_audience` specifies which `aud` values are accepted in JWTs.
|
|
608
|
+
*
|
|
609
|
+
*/
|
|
610
|
+
const addProjectJwks = (options) => (options.client ?? client).post({
|
|
611
|
+
security: [
|
|
612
|
+
{
|
|
613
|
+
scheme: "bearer",
|
|
614
|
+
type: "http"
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
in: "cookie",
|
|
618
|
+
name: "zenith",
|
|
619
|
+
type: "apiKey"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
in: "cookie",
|
|
623
|
+
name: "keycloak_token",
|
|
624
|
+
type: "apiKey"
|
|
625
|
+
}
|
|
626
|
+
],
|
|
627
|
+
url: "/projects/{project_id}/jwks",
|
|
628
|
+
...options,
|
|
629
|
+
headers: {
|
|
630
|
+
"Content-Type": "application/json",
|
|
631
|
+
...options.headers
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
/**
|
|
635
|
+
* Delete JWKS URL
|
|
636
|
+
*
|
|
637
|
+
* Removes the specified JWKS URL from the project.
|
|
638
|
+
* JWTs signed by keys from the removed URL can no longer authenticate to the project's endpoints.
|
|
639
|
+
*
|
|
640
|
+
*/
|
|
641
|
+
const deleteProjectJwks = (options) => (options.client ?? client).delete({
|
|
642
|
+
security: [
|
|
643
|
+
{
|
|
644
|
+
scheme: "bearer",
|
|
645
|
+
type: "http"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
in: "cookie",
|
|
649
|
+
name: "zenith",
|
|
650
|
+
type: "apiKey"
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
in: "cookie",
|
|
654
|
+
name: "keycloak_token",
|
|
655
|
+
type: "apiKey"
|
|
656
|
+
}
|
|
657
|
+
],
|
|
658
|
+
url: "/projects/{project_id}/jwks/{jwks_id}",
|
|
659
|
+
...options
|
|
660
|
+
});
|
|
661
|
+
/**
|
|
662
|
+
* Delete Neon Data API
|
|
663
|
+
*
|
|
664
|
+
* Deletes the Neon Data API for the specified branch.
|
|
665
|
+
* Existing connections using the Data API endpoint will fail after deletion.
|
|
666
|
+
*
|
|
667
|
+
*/
|
|
668
|
+
const deleteProjectBranchDataApi = (options) => (options.client ?? client).delete({
|
|
669
|
+
security: [
|
|
670
|
+
{
|
|
671
|
+
scheme: "bearer",
|
|
672
|
+
type: "http"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
in: "cookie",
|
|
676
|
+
name: "zenith",
|
|
677
|
+
type: "apiKey"
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
in: "cookie",
|
|
681
|
+
name: "keycloak_token",
|
|
682
|
+
type: "apiKey"
|
|
683
|
+
}
|
|
684
|
+
],
|
|
685
|
+
url: "/projects/{project_id}/branches/{branch_id}/data-api/{database_name}",
|
|
686
|
+
...options
|
|
687
|
+
});
|
|
688
|
+
/**
|
|
689
|
+
* Retrieve Neon Data API configuration
|
|
690
|
+
*
|
|
691
|
+
* Retrieves the Neon Data API configuration for the specified branch,
|
|
692
|
+
* including endpoint URL, enabled state, and database settings.
|
|
693
|
+
*
|
|
694
|
+
*/
|
|
695
|
+
const getProjectBranchDataApi = (options) => (options.client ?? client).get({
|
|
696
|
+
security: [
|
|
697
|
+
{
|
|
698
|
+
scheme: "bearer",
|
|
699
|
+
type: "http"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
in: "cookie",
|
|
703
|
+
name: "zenith",
|
|
704
|
+
type: "apiKey"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
in: "cookie",
|
|
708
|
+
name: "keycloak_token",
|
|
709
|
+
type: "apiKey"
|
|
710
|
+
}
|
|
711
|
+
],
|
|
712
|
+
url: "/projects/{project_id}/branches/{branch_id}/data-api/{database_name}",
|
|
713
|
+
...options
|
|
714
|
+
});
|
|
715
|
+
/**
|
|
716
|
+
* Update Neon Data API
|
|
717
|
+
*
|
|
718
|
+
* Updates the Neon Data API configuration for the specified branch.
|
|
719
|
+
* You can optionally provide settings to update the Data API configuration.
|
|
720
|
+
* The schema cache is always refreshed as part of this operation.
|
|
721
|
+
*
|
|
722
|
+
*/
|
|
723
|
+
const updateProjectBranchDataApi = (options) => (options.client ?? client).patch({
|
|
724
|
+
security: [
|
|
725
|
+
{
|
|
726
|
+
scheme: "bearer",
|
|
727
|
+
type: "http"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
in: "cookie",
|
|
731
|
+
name: "zenith",
|
|
732
|
+
type: "apiKey"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
in: "cookie",
|
|
736
|
+
name: "keycloak_token",
|
|
737
|
+
type: "apiKey"
|
|
738
|
+
}
|
|
739
|
+
],
|
|
740
|
+
url: "/projects/{project_id}/branches/{branch_id}/data-api/{database_name}",
|
|
741
|
+
...options,
|
|
742
|
+
headers: {
|
|
743
|
+
"Content-Type": "application/json",
|
|
744
|
+
...options.headers
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
/**
|
|
748
|
+
* Create Neon Data API
|
|
749
|
+
*
|
|
750
|
+
* Creates a new instance of Neon Data API in the specified branch.
|
|
751
|
+
* The Data API exposes a REST interface over the branch database. The `database_name` path parameter determines which database the API serves.
|
|
752
|
+
*
|
|
753
|
+
*/
|
|
754
|
+
const createProjectBranchDataApi = (options) => (options.client ?? client).post({
|
|
755
|
+
security: [
|
|
756
|
+
{
|
|
757
|
+
scheme: "bearer",
|
|
758
|
+
type: "http"
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
in: "cookie",
|
|
762
|
+
name: "zenith",
|
|
763
|
+
type: "apiKey"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
in: "cookie",
|
|
767
|
+
name: "keycloak_token",
|
|
768
|
+
type: "apiKey"
|
|
769
|
+
}
|
|
770
|
+
],
|
|
771
|
+
url: "/projects/{project_id}/branches/{branch_id}/data-api/{database_name}",
|
|
772
|
+
...options,
|
|
773
|
+
headers: {
|
|
774
|
+
"Content-Type": "application/json",
|
|
775
|
+
...options.headers
|
|
776
|
+
}
|
|
777
|
+
});
|
|
778
|
+
/**
|
|
779
|
+
* Create Neon Auth integration
|
|
780
|
+
*
|
|
781
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth` instead. Creates a project on a third-party authentication provider's platform for use with Neon Auth.
|
|
782
|
+
* Use this endpoint if the frontend integration flow can't be used.
|
|
783
|
+
*
|
|
784
|
+
*
|
|
785
|
+
* @deprecated
|
|
786
|
+
*/
|
|
787
|
+
const createNeonAuthIntegration = (options) => (options.client ?? client).post({
|
|
788
|
+
security: [
|
|
789
|
+
{
|
|
790
|
+
scheme: "bearer",
|
|
791
|
+
type: "http"
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
in: "cookie",
|
|
795
|
+
name: "zenith",
|
|
796
|
+
type: "apiKey"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
in: "cookie",
|
|
800
|
+
name: "keycloak_token",
|
|
801
|
+
type: "apiKey"
|
|
802
|
+
}
|
|
803
|
+
],
|
|
804
|
+
url: "/projects/auth/create",
|
|
805
|
+
...options,
|
|
806
|
+
headers: {
|
|
807
|
+
"Content-Type": "application/json",
|
|
808
|
+
...options.headers
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
/**
|
|
812
|
+
* Disable Neon Auth for the branch
|
|
813
|
+
*
|
|
814
|
+
* Disables the Neon Auth integration for the specified branch, removing the connection
|
|
815
|
+
* to the authentication provider.
|
|
816
|
+
* If `delete_data` is `true`, also deletes the `neon_auth` schema and all associated tables
|
|
817
|
+
* from the branch database.
|
|
818
|
+
* The integration can be re-enabled by calling `POST /projects/{project_id}/branches/{branch_id}/auth`.
|
|
819
|
+
*
|
|
820
|
+
*/
|
|
821
|
+
const disableNeonAuth = (options) => (options.client ?? client).delete({
|
|
822
|
+
security: [
|
|
823
|
+
{
|
|
824
|
+
scheme: "bearer",
|
|
825
|
+
type: "http"
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
in: "cookie",
|
|
829
|
+
name: "zenith",
|
|
830
|
+
type: "apiKey"
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
in: "cookie",
|
|
834
|
+
name: "keycloak_token",
|
|
835
|
+
type: "apiKey"
|
|
836
|
+
}
|
|
837
|
+
],
|
|
838
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth",
|
|
839
|
+
...options,
|
|
840
|
+
headers: {
|
|
841
|
+
"Content-Type": "application/json",
|
|
842
|
+
...options.headers
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
/**
|
|
846
|
+
* Retrieve Neon Auth details for the branch
|
|
847
|
+
*
|
|
848
|
+
* Retrieves the Neon Auth integration details for the specified branch,
|
|
849
|
+
* including the auth provider type and integration status.
|
|
850
|
+
*
|
|
851
|
+
*/
|
|
852
|
+
const getNeonAuth = (options) => (options.client ?? client).get({
|
|
853
|
+
security: [
|
|
854
|
+
{
|
|
855
|
+
scheme: "bearer",
|
|
856
|
+
type: "http"
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
in: "cookie",
|
|
860
|
+
name: "zenith",
|
|
861
|
+
type: "apiKey"
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
in: "cookie",
|
|
865
|
+
name: "keycloak_token",
|
|
866
|
+
type: "apiKey"
|
|
867
|
+
}
|
|
868
|
+
],
|
|
869
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth",
|
|
870
|
+
...options
|
|
871
|
+
});
|
|
872
|
+
/**
|
|
873
|
+
* Enable Neon Auth for the branch
|
|
874
|
+
*
|
|
875
|
+
* Enables Neon Auth for the specified branch by connecting it to an authentication provider.
|
|
876
|
+
* Creating the integration provisions the `neon_auth` schema in the branch database, which stores user identity data synchronized from the provider.
|
|
877
|
+
*
|
|
878
|
+
*/
|
|
879
|
+
const createNeonAuth = (options) => (options.client ?? client).post({
|
|
880
|
+
security: [
|
|
881
|
+
{
|
|
882
|
+
scheme: "bearer",
|
|
883
|
+
type: "http"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
in: "cookie",
|
|
887
|
+
name: "zenith",
|
|
888
|
+
type: "apiKey"
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
in: "cookie",
|
|
892
|
+
name: "keycloak_token",
|
|
893
|
+
type: "apiKey"
|
|
894
|
+
}
|
|
895
|
+
],
|
|
896
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth",
|
|
897
|
+
...options,
|
|
898
|
+
headers: {
|
|
899
|
+
"Content-Type": "application/json",
|
|
900
|
+
...options.headers
|
|
901
|
+
}
|
|
902
|
+
});
|
|
903
|
+
/**
|
|
904
|
+
* Delete trusted redirect URI domain
|
|
905
|
+
*
|
|
906
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Deletes a domain from the redirect_uri whitelist for the specified project.
|
|
907
|
+
*
|
|
908
|
+
*
|
|
909
|
+
* @deprecated
|
|
910
|
+
*/
|
|
911
|
+
const deleteNeonAuthDomainFromRedirectUriWhitelist = (options) => (options.client ?? client).delete({
|
|
912
|
+
security: [
|
|
913
|
+
{
|
|
914
|
+
scheme: "bearer",
|
|
915
|
+
type: "http"
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
in: "cookie",
|
|
919
|
+
name: "zenith",
|
|
920
|
+
type: "apiKey"
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
in: "cookie",
|
|
924
|
+
name: "keycloak_token",
|
|
925
|
+
type: "apiKey"
|
|
926
|
+
}
|
|
927
|
+
],
|
|
928
|
+
url: "/projects/{project_id}/auth/domains",
|
|
929
|
+
...options,
|
|
930
|
+
headers: {
|
|
931
|
+
"Content-Type": "application/json",
|
|
932
|
+
...options.headers
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
/**
|
|
936
|
+
* List trusted redirect URI domains
|
|
937
|
+
*
|
|
938
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Lists the domains in the redirect_uri whitelist for the specified project.
|
|
939
|
+
*
|
|
940
|
+
*
|
|
941
|
+
* @deprecated
|
|
942
|
+
*/
|
|
943
|
+
const listNeonAuthRedirectUriWhitelistDomains = (options) => (options.client ?? client).get({
|
|
944
|
+
security: [
|
|
945
|
+
{
|
|
946
|
+
scheme: "bearer",
|
|
947
|
+
type: "http"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
in: "cookie",
|
|
951
|
+
name: "zenith",
|
|
952
|
+
type: "apiKey"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
in: "cookie",
|
|
956
|
+
name: "keycloak_token",
|
|
957
|
+
type: "apiKey"
|
|
958
|
+
}
|
|
959
|
+
],
|
|
960
|
+
url: "/projects/{project_id}/auth/domains",
|
|
961
|
+
...options
|
|
962
|
+
});
|
|
963
|
+
/**
|
|
964
|
+
* Add trusted redirect URI domain
|
|
965
|
+
*
|
|
966
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Adds a domain to the redirect_uri whitelist for the specified project.
|
|
967
|
+
*
|
|
968
|
+
*
|
|
969
|
+
* @deprecated
|
|
970
|
+
*/
|
|
971
|
+
const addNeonAuthDomainToRedirectUriWhitelist = (options) => (options.client ?? client).post({
|
|
972
|
+
security: [
|
|
973
|
+
{
|
|
974
|
+
scheme: "bearer",
|
|
975
|
+
type: "http"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
in: "cookie",
|
|
979
|
+
name: "zenith",
|
|
980
|
+
type: "apiKey"
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
in: "cookie",
|
|
984
|
+
name: "keycloak_token",
|
|
985
|
+
type: "apiKey"
|
|
986
|
+
}
|
|
987
|
+
],
|
|
988
|
+
url: "/projects/{project_id}/auth/domains",
|
|
989
|
+
...options,
|
|
990
|
+
headers: {
|
|
991
|
+
"Content-Type": "application/json",
|
|
992
|
+
...options.headers
|
|
993
|
+
}
|
|
994
|
+
});
|
|
995
|
+
/**
|
|
996
|
+
* Delete domain from redirect_uri whitelist
|
|
997
|
+
*
|
|
998
|
+
* Removes a domain from the redirect URI whitelist for the specified branch.
|
|
999
|
+
* After removal, the domain can no longer be used as a redirect target after authentication.
|
|
1000
|
+
*
|
|
1001
|
+
*/
|
|
1002
|
+
const deleteBranchNeonAuthTrustedDomain = (options) => (options.client ?? client).delete({
|
|
1003
|
+
security: [
|
|
1004
|
+
{
|
|
1005
|
+
scheme: "bearer",
|
|
1006
|
+
type: "http"
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
in: "cookie",
|
|
1010
|
+
name: "zenith",
|
|
1011
|
+
type: "apiKey"
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
in: "cookie",
|
|
1015
|
+
name: "keycloak_token",
|
|
1016
|
+
type: "apiKey"
|
|
1017
|
+
}
|
|
1018
|
+
],
|
|
1019
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/domains",
|
|
1020
|
+
...options,
|
|
1021
|
+
headers: {
|
|
1022
|
+
"Content-Type": "application/json",
|
|
1023
|
+
...options.headers
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
/**
|
|
1027
|
+
* List domains in redirect_uri whitelist
|
|
1028
|
+
*
|
|
1029
|
+
* Lists the trusted domains in the redirect URI whitelist for the specified branch.
|
|
1030
|
+
* Only domains in this list are permitted as redirect targets after authentication.
|
|
1031
|
+
*
|
|
1032
|
+
*/
|
|
1033
|
+
const listBranchNeonAuthTrustedDomains = (options) => (options.client ?? client).get({
|
|
1034
|
+
security: [
|
|
1035
|
+
{
|
|
1036
|
+
scheme: "bearer",
|
|
1037
|
+
type: "http"
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
in: "cookie",
|
|
1041
|
+
name: "zenith",
|
|
1042
|
+
type: "apiKey"
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
in: "cookie",
|
|
1046
|
+
name: "keycloak_token",
|
|
1047
|
+
type: "apiKey"
|
|
1048
|
+
}
|
|
1049
|
+
],
|
|
1050
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/domains",
|
|
1051
|
+
...options
|
|
1052
|
+
});
|
|
1053
|
+
/**
|
|
1054
|
+
* Add domain to redirect_uri whitelist
|
|
1055
|
+
*
|
|
1056
|
+
* Adds a domain to the redirect URI whitelist for the specified branch.
|
|
1057
|
+
* Only domains in this list are permitted as redirect targets after authentication.
|
|
1058
|
+
*
|
|
1059
|
+
*/
|
|
1060
|
+
const addBranchNeonAuthTrustedDomain = (options) => (options.client ?? client).post({
|
|
1061
|
+
security: [
|
|
1062
|
+
{
|
|
1063
|
+
scheme: "bearer",
|
|
1064
|
+
type: "http"
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
in: "cookie",
|
|
1068
|
+
name: "zenith",
|
|
1069
|
+
type: "apiKey"
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
in: "cookie",
|
|
1073
|
+
name: "keycloak_token",
|
|
1074
|
+
type: "apiKey"
|
|
1075
|
+
}
|
|
1076
|
+
],
|
|
1077
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/domains",
|
|
1078
|
+
...options,
|
|
1079
|
+
headers: {
|
|
1080
|
+
"Content-Type": "application/json",
|
|
1081
|
+
...options.headers
|
|
1082
|
+
}
|
|
1083
|
+
});
|
|
1084
|
+
/**
|
|
1085
|
+
* Create Auth Provider SDK keys
|
|
1086
|
+
*
|
|
1087
|
+
* Generates SDK or API Keys for the auth provider. These might be called different things depending
|
|
1088
|
+
* on the auth provider you're using, but are generally used for setting up the frontend and backend SDKs.
|
|
1089
|
+
*
|
|
1090
|
+
*/
|
|
1091
|
+
const createNeonAuthProviderSdkKeys = (options) => (options.client ?? client).post({
|
|
1092
|
+
security: [
|
|
1093
|
+
{
|
|
1094
|
+
scheme: "bearer",
|
|
1095
|
+
type: "http"
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
in: "cookie",
|
|
1099
|
+
name: "zenith",
|
|
1100
|
+
type: "apiKey"
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
in: "cookie",
|
|
1104
|
+
name: "keycloak_token",
|
|
1105
|
+
type: "apiKey"
|
|
1106
|
+
}
|
|
1107
|
+
],
|
|
1108
|
+
url: "/projects/auth/keys",
|
|
1109
|
+
...options,
|
|
1110
|
+
headers: {
|
|
1111
|
+
"Content-Type": "application/json",
|
|
1112
|
+
...options.headers
|
|
1113
|
+
}
|
|
1114
|
+
});
|
|
1115
|
+
/**
|
|
1116
|
+
* Create new auth user
|
|
1117
|
+
*
|
|
1118
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/users` instead. Creates a new user in Neon Auth.
|
|
1119
|
+
* The user will be created in your neon_auth.users_sync table and automatically propagated to your auth project, whether Neon-managed or provider-owned.
|
|
1120
|
+
*
|
|
1121
|
+
*
|
|
1122
|
+
* @deprecated
|
|
1123
|
+
*/
|
|
1124
|
+
const createNeonAuthNewUser = (options) => (options.client ?? client).post({
|
|
1125
|
+
security: [
|
|
1126
|
+
{
|
|
1127
|
+
scheme: "bearer",
|
|
1128
|
+
type: "http"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
in: "cookie",
|
|
1132
|
+
name: "zenith",
|
|
1133
|
+
type: "apiKey"
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
in: "cookie",
|
|
1137
|
+
name: "keycloak_token",
|
|
1138
|
+
type: "apiKey"
|
|
1139
|
+
}
|
|
1140
|
+
],
|
|
1141
|
+
url: "/projects/auth/user",
|
|
1142
|
+
...options,
|
|
1143
|
+
headers: {
|
|
1144
|
+
"Content-Type": "application/json",
|
|
1145
|
+
...options.headers
|
|
1146
|
+
}
|
|
1147
|
+
});
|
|
1148
|
+
/**
|
|
1149
|
+
* Create new auth user
|
|
1150
|
+
*
|
|
1151
|
+
* Creates a new user in the Neon Auth user directory for the specified branch.
|
|
1152
|
+
* The user is created in the `neon_auth.users_sync` table and can immediately authenticate
|
|
1153
|
+
* using the branch's configured auth providers.
|
|
1154
|
+
*
|
|
1155
|
+
*/
|
|
1156
|
+
const createBranchNeonAuthNewUser = (options) => (options.client ?? client).post({
|
|
1157
|
+
security: [
|
|
1158
|
+
{
|
|
1159
|
+
scheme: "bearer",
|
|
1160
|
+
type: "http"
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
in: "cookie",
|
|
1164
|
+
name: "zenith",
|
|
1165
|
+
type: "apiKey"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
in: "cookie",
|
|
1169
|
+
name: "keycloak_token",
|
|
1170
|
+
type: "apiKey"
|
|
1171
|
+
}
|
|
1172
|
+
],
|
|
1173
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/users",
|
|
1174
|
+
...options,
|
|
1175
|
+
headers: {
|
|
1176
|
+
"Content-Type": "application/json",
|
|
1177
|
+
...options.headers
|
|
1178
|
+
}
|
|
1179
|
+
});
|
|
1180
|
+
/**
|
|
1181
|
+
* Delete auth user
|
|
1182
|
+
*
|
|
1183
|
+
* Deletes the specified user from the Neon Auth user directory for the specified branch.
|
|
1184
|
+
* Removes the user record from `neon_auth.users_sync`. This action cannot be undone.
|
|
1185
|
+
*
|
|
1186
|
+
*/
|
|
1187
|
+
const deleteBranchNeonAuthUser = (options) => (options.client ?? client).delete({
|
|
1188
|
+
security: [
|
|
1189
|
+
{
|
|
1190
|
+
scheme: "bearer",
|
|
1191
|
+
type: "http"
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
in: "cookie",
|
|
1195
|
+
name: "zenith",
|
|
1196
|
+
type: "apiKey"
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
in: "cookie",
|
|
1200
|
+
name: "keycloak_token",
|
|
1201
|
+
type: "apiKey"
|
|
1202
|
+
}
|
|
1203
|
+
],
|
|
1204
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}",
|
|
1205
|
+
...options
|
|
1206
|
+
});
|
|
1207
|
+
/**
|
|
1208
|
+
* Update auth user role
|
|
1209
|
+
*
|
|
1210
|
+
* Updates the role of a user in the Neon Auth user directory for the specified branch.
|
|
1211
|
+
* The role controls the user's level of access within the Neon Auth integration.
|
|
1212
|
+
*
|
|
1213
|
+
*/
|
|
1214
|
+
const updateNeonAuthUserRole = (options) => (options.client ?? client).put({
|
|
1215
|
+
security: [
|
|
1216
|
+
{
|
|
1217
|
+
scheme: "bearer",
|
|
1218
|
+
type: "http"
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
in: "cookie",
|
|
1222
|
+
name: "zenith",
|
|
1223
|
+
type: "apiKey"
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
in: "cookie",
|
|
1227
|
+
name: "keycloak_token",
|
|
1228
|
+
type: "apiKey"
|
|
1229
|
+
}
|
|
1230
|
+
],
|
|
1231
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}/role",
|
|
1232
|
+
...options,
|
|
1233
|
+
headers: {
|
|
1234
|
+
"Content-Type": "application/json",
|
|
1235
|
+
...options.headers
|
|
1236
|
+
}
|
|
1237
|
+
});
|
|
1238
|
+
/**
|
|
1239
|
+
* Delete auth user
|
|
1240
|
+
*
|
|
1241
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}` instead. Deletes the auth user for the specified project.
|
|
1242
|
+
*
|
|
1243
|
+
*
|
|
1244
|
+
* @deprecated
|
|
1245
|
+
*/
|
|
1246
|
+
const deleteNeonAuthUser = (options) => (options.client ?? client).delete({
|
|
1247
|
+
security: [
|
|
1248
|
+
{
|
|
1249
|
+
scheme: "bearer",
|
|
1250
|
+
type: "http"
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
in: "cookie",
|
|
1254
|
+
name: "zenith",
|
|
1255
|
+
type: "apiKey"
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
in: "cookie",
|
|
1259
|
+
name: "keycloak_token",
|
|
1260
|
+
type: "apiKey"
|
|
1261
|
+
}
|
|
1262
|
+
],
|
|
1263
|
+
url: "/projects/{project_id}/auth/users/{auth_user_id}",
|
|
1264
|
+
...options
|
|
1265
|
+
});
|
|
1266
|
+
/**
|
|
1267
|
+
* Transfer Neon-managed auth project to your own account
|
|
1268
|
+
*
|
|
1269
|
+
* Transfers ownership of your Neon-managed auth project to your own auth provider account.
|
|
1270
|
+
*
|
|
1271
|
+
*/
|
|
1272
|
+
const transferNeonAuthProviderProject = (options) => (options.client ?? client).post({
|
|
1273
|
+
security: [
|
|
1274
|
+
{
|
|
1275
|
+
scheme: "bearer",
|
|
1276
|
+
type: "http"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
in: "cookie",
|
|
1280
|
+
name: "zenith",
|
|
1281
|
+
type: "apiKey"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
in: "cookie",
|
|
1285
|
+
name: "keycloak_token",
|
|
1286
|
+
type: "apiKey"
|
|
1287
|
+
}
|
|
1288
|
+
],
|
|
1289
|
+
url: "/projects/auth/transfer_ownership",
|
|
1290
|
+
...options,
|
|
1291
|
+
headers: {
|
|
1292
|
+
"Content-Type": "application/json",
|
|
1293
|
+
...options.headers
|
|
1294
|
+
}
|
|
1295
|
+
});
|
|
1296
|
+
/**
|
|
1297
|
+
* List active integrations with auth providers
|
|
1298
|
+
*
|
|
1299
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth` instead.
|
|
1300
|
+
*
|
|
1301
|
+
* @deprecated
|
|
1302
|
+
*/
|
|
1303
|
+
const listNeonAuthIntegrations = (options) => (options.client ?? client).get({
|
|
1304
|
+
security: [
|
|
1305
|
+
{
|
|
1306
|
+
scheme: "bearer",
|
|
1307
|
+
type: "http"
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
in: "cookie",
|
|
1311
|
+
name: "zenith",
|
|
1312
|
+
type: "apiKey"
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
in: "cookie",
|
|
1316
|
+
name: "keycloak_token",
|
|
1317
|
+
type: "apiKey"
|
|
1318
|
+
}
|
|
1319
|
+
],
|
|
1320
|
+
url: "/projects/{project_id}/auth/integrations",
|
|
1321
|
+
...options
|
|
1322
|
+
});
|
|
1323
|
+
/**
|
|
1324
|
+
* List OAuth providers
|
|
1325
|
+
*
|
|
1326
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers` instead. Lists the OAuth providers for the specified project.
|
|
1327
|
+
*
|
|
1328
|
+
*
|
|
1329
|
+
* @deprecated
|
|
1330
|
+
*/
|
|
1331
|
+
const listNeonAuthOauthProviders = (options) => (options.client ?? client).get({
|
|
1332
|
+
security: [
|
|
1333
|
+
{
|
|
1334
|
+
scheme: "bearer",
|
|
1335
|
+
type: "http"
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
in: "cookie",
|
|
1339
|
+
name: "zenith",
|
|
1340
|
+
type: "apiKey"
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
in: "cookie",
|
|
1344
|
+
name: "keycloak_token",
|
|
1345
|
+
type: "apiKey"
|
|
1346
|
+
}
|
|
1347
|
+
],
|
|
1348
|
+
url: "/projects/{project_id}/auth/oauth_providers",
|
|
1349
|
+
...options
|
|
1350
|
+
});
|
|
1351
|
+
/**
|
|
1352
|
+
* Add an OAuth provider
|
|
1353
|
+
*
|
|
1354
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers` instead.
|
|
1355
|
+
* Adds an OAuth provider to the specified project.
|
|
1356
|
+
*
|
|
1357
|
+
*
|
|
1358
|
+
* @deprecated
|
|
1359
|
+
*/
|
|
1360
|
+
const addNeonAuthOauthProvider = (options) => (options.client ?? client).post({
|
|
1361
|
+
security: [
|
|
1362
|
+
{
|
|
1363
|
+
scheme: "bearer",
|
|
1364
|
+
type: "http"
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
in: "cookie",
|
|
1368
|
+
name: "zenith",
|
|
1369
|
+
type: "apiKey"
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
in: "cookie",
|
|
1373
|
+
name: "keycloak_token",
|
|
1374
|
+
type: "apiKey"
|
|
1375
|
+
}
|
|
1376
|
+
],
|
|
1377
|
+
url: "/projects/{project_id}/auth/oauth_providers",
|
|
1378
|
+
...options,
|
|
1379
|
+
headers: {
|
|
1380
|
+
"Content-Type": "application/json",
|
|
1381
|
+
...options.headers
|
|
1382
|
+
}
|
|
1383
|
+
});
|
|
1384
|
+
/**
|
|
1385
|
+
* List OAuth providers for the branch
|
|
1386
|
+
*
|
|
1387
|
+
* Lists the OAuth providers configured for the specified branch's Neon Auth integration.
|
|
1388
|
+
*
|
|
1389
|
+
*/
|
|
1390
|
+
const listBranchNeonAuthOauthProviders = (options) => (options.client ?? client).get({
|
|
1391
|
+
security: [
|
|
1392
|
+
{
|
|
1393
|
+
scheme: "bearer",
|
|
1394
|
+
type: "http"
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
in: "cookie",
|
|
1398
|
+
name: "zenith",
|
|
1399
|
+
type: "apiKey"
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
in: "cookie",
|
|
1403
|
+
name: "keycloak_token",
|
|
1404
|
+
type: "apiKey"
|
|
1405
|
+
}
|
|
1406
|
+
],
|
|
1407
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/oauth_providers",
|
|
1408
|
+
...options
|
|
1409
|
+
});
|
|
1410
|
+
/**
|
|
1411
|
+
* Add an OAuth provider
|
|
1412
|
+
*
|
|
1413
|
+
* Adds an OAuth provider configuration to the specified branch's Neon Auth integration.
|
|
1414
|
+
* After adding, users can authenticate using the configured provider.
|
|
1415
|
+
*
|
|
1416
|
+
*/
|
|
1417
|
+
const addBranchNeonAuthOauthProvider = (options) => (options.client ?? client).post({
|
|
1418
|
+
security: [
|
|
1419
|
+
{
|
|
1420
|
+
scheme: "bearer",
|
|
1421
|
+
type: "http"
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
in: "cookie",
|
|
1425
|
+
name: "zenith",
|
|
1426
|
+
type: "apiKey"
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
in: "cookie",
|
|
1430
|
+
name: "keycloak_token",
|
|
1431
|
+
type: "apiKey"
|
|
1432
|
+
}
|
|
1433
|
+
],
|
|
1434
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/oauth_providers",
|
|
1435
|
+
...options,
|
|
1436
|
+
headers: {
|
|
1437
|
+
"Content-Type": "application/json",
|
|
1438
|
+
...options.headers
|
|
1439
|
+
}
|
|
1440
|
+
});
|
|
1441
|
+
/**
|
|
1442
|
+
* Delete OAuth provider
|
|
1443
|
+
*
|
|
1444
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}` instead. Deletes a OAuth provider from the specified project.
|
|
1445
|
+
*
|
|
1446
|
+
*
|
|
1447
|
+
* @deprecated
|
|
1448
|
+
*/
|
|
1449
|
+
const deleteNeonAuthOauthProvider = (options) => (options.client ?? client).delete({
|
|
1450
|
+
security: [
|
|
1451
|
+
{
|
|
1452
|
+
scheme: "bearer",
|
|
1453
|
+
type: "http"
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
in: "cookie",
|
|
1457
|
+
name: "zenith",
|
|
1458
|
+
type: "apiKey"
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
in: "cookie",
|
|
1462
|
+
name: "keycloak_token",
|
|
1463
|
+
type: "apiKey"
|
|
1464
|
+
}
|
|
1465
|
+
],
|
|
1466
|
+
url: "/projects/{project_id}/auth/oauth_providers/{oauth_provider_id}",
|
|
1467
|
+
...options
|
|
1468
|
+
});
|
|
1469
|
+
/**
|
|
1470
|
+
* Update OAuth provider
|
|
1471
|
+
*
|
|
1472
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}` instead. Updates a OAuth provider for the specified project.
|
|
1473
|
+
*
|
|
1474
|
+
*
|
|
1475
|
+
* @deprecated
|
|
1476
|
+
*/
|
|
1477
|
+
const updateNeonAuthOauthProvider = (options) => (options.client ?? client).patch({
|
|
1478
|
+
security: [
|
|
1479
|
+
{
|
|
1480
|
+
scheme: "bearer",
|
|
1481
|
+
type: "http"
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
in: "cookie",
|
|
1485
|
+
name: "zenith",
|
|
1486
|
+
type: "apiKey"
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
in: "cookie",
|
|
1490
|
+
name: "keycloak_token",
|
|
1491
|
+
type: "apiKey"
|
|
1492
|
+
}
|
|
1493
|
+
],
|
|
1494
|
+
url: "/projects/{project_id}/auth/oauth_providers/{oauth_provider_id}",
|
|
1495
|
+
...options,
|
|
1496
|
+
headers: {
|
|
1497
|
+
"Content-Type": "application/json",
|
|
1498
|
+
...options.headers
|
|
1499
|
+
}
|
|
1500
|
+
});
|
|
1501
|
+
/**
|
|
1502
|
+
* Delete OAuth provider
|
|
1503
|
+
*
|
|
1504
|
+
* Deletes a OAuth provider from the specified project.
|
|
1505
|
+
*
|
|
1506
|
+
*/
|
|
1507
|
+
const deleteBranchNeonAuthOauthProvider = (options) => (options.client ?? client).delete({
|
|
1508
|
+
security: [
|
|
1509
|
+
{
|
|
1510
|
+
scheme: "bearer",
|
|
1511
|
+
type: "http"
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
in: "cookie",
|
|
1515
|
+
name: "zenith",
|
|
1516
|
+
type: "apiKey"
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
in: "cookie",
|
|
1520
|
+
name: "keycloak_token",
|
|
1521
|
+
type: "apiKey"
|
|
1522
|
+
}
|
|
1523
|
+
],
|
|
1524
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}",
|
|
1525
|
+
...options
|
|
1526
|
+
});
|
|
1527
|
+
/**
|
|
1528
|
+
* Update OAuth provider
|
|
1529
|
+
*
|
|
1530
|
+
* Updates a OAuth provider for the specified project.
|
|
1531
|
+
*
|
|
1532
|
+
*/
|
|
1533
|
+
const updateBranchNeonAuthOauthProvider = (options) => (options.client ?? client).patch({
|
|
1534
|
+
security: [
|
|
1535
|
+
{
|
|
1536
|
+
scheme: "bearer",
|
|
1537
|
+
type: "http"
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
in: "cookie",
|
|
1541
|
+
name: "zenith",
|
|
1542
|
+
type: "apiKey"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
in: "cookie",
|
|
1546
|
+
name: "keycloak_token",
|
|
1547
|
+
type: "apiKey"
|
|
1548
|
+
}
|
|
1549
|
+
],
|
|
1550
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}",
|
|
1551
|
+
...options,
|
|
1552
|
+
headers: {
|
|
1553
|
+
"Content-Type": "application/json",
|
|
1554
|
+
...options.headers
|
|
1555
|
+
}
|
|
1556
|
+
});
|
|
1557
|
+
/**
|
|
1558
|
+
* Retrieve email server configuration
|
|
1559
|
+
*
|
|
1560
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/email_provider` instead. Gets the email server configuration for the specified project.
|
|
1561
|
+
*
|
|
1562
|
+
*
|
|
1563
|
+
* @deprecated
|
|
1564
|
+
*/
|
|
1565
|
+
const getNeonAuthEmailServer = (options) => (options.client ?? client).get({
|
|
1566
|
+
security: [
|
|
1567
|
+
{
|
|
1568
|
+
scheme: "bearer",
|
|
1569
|
+
type: "http"
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
in: "cookie",
|
|
1573
|
+
name: "zenith",
|
|
1574
|
+
type: "apiKey"
|
|
1575
|
+
},
|
|
1576
|
+
{
|
|
1577
|
+
in: "cookie",
|
|
1578
|
+
name: "keycloak_token",
|
|
1579
|
+
type: "apiKey"
|
|
1580
|
+
}
|
|
1581
|
+
],
|
|
1582
|
+
url: "/projects/{project_id}/auth/email_server",
|
|
1583
|
+
...options
|
|
1584
|
+
});
|
|
1585
|
+
/**
|
|
1586
|
+
* Update email server configuration
|
|
1587
|
+
*
|
|
1588
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/email_provider` instead. Updates the email server configuration for the specified project.
|
|
1589
|
+
*
|
|
1590
|
+
*
|
|
1591
|
+
* @deprecated
|
|
1592
|
+
*/
|
|
1593
|
+
const updateNeonAuthEmailServer = (options) => (options.client ?? client).patch({
|
|
1594
|
+
security: [
|
|
1595
|
+
{
|
|
1596
|
+
scheme: "bearer",
|
|
1597
|
+
type: "http"
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
in: "cookie",
|
|
1601
|
+
name: "zenith",
|
|
1602
|
+
type: "apiKey"
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
in: "cookie",
|
|
1606
|
+
name: "keycloak_token",
|
|
1607
|
+
type: "apiKey"
|
|
1608
|
+
}
|
|
1609
|
+
],
|
|
1610
|
+
url: "/projects/{project_id}/auth/email_server",
|
|
1611
|
+
...options,
|
|
1612
|
+
headers: {
|
|
1613
|
+
"Content-Type": "application/json",
|
|
1614
|
+
...options.headers
|
|
1615
|
+
}
|
|
1616
|
+
});
|
|
1617
|
+
/**
|
|
1618
|
+
* Send test email
|
|
1619
|
+
*
|
|
1620
|
+
* Sends a test email using the configured email server settings to verify SMTP connectivity and credentials.
|
|
1621
|
+
* The request body must include the SMTP server settings
|
|
1622
|
+
* (`host`, `port`, `username`, `password`, `sender_email`, `sender_name`) and the `recipient_email` address.
|
|
1623
|
+
*
|
|
1624
|
+
*/
|
|
1625
|
+
const sendNeonAuthTestEmail = (options) => (options.client ?? client).post({
|
|
1626
|
+
security: [
|
|
1627
|
+
{
|
|
1628
|
+
scheme: "bearer",
|
|
1629
|
+
type: "http"
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
in: "cookie",
|
|
1633
|
+
name: "zenith",
|
|
1634
|
+
type: "apiKey"
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
in: "cookie",
|
|
1638
|
+
name: "keycloak_token",
|
|
1639
|
+
type: "apiKey"
|
|
1640
|
+
}
|
|
1641
|
+
],
|
|
1642
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/send_test_email",
|
|
1643
|
+
...options,
|
|
1644
|
+
headers: {
|
|
1645
|
+
"Content-Type": "application/json",
|
|
1646
|
+
...options.headers
|
|
1647
|
+
}
|
|
1648
|
+
});
|
|
1649
|
+
/**
|
|
1650
|
+
* Retrieve email and password configuration
|
|
1651
|
+
*
|
|
1652
|
+
* Retrieves the email and password authentication configuration for the specified branch's Neon Auth integration,
|
|
1653
|
+
* including whether it is enabled and the email verification method.
|
|
1654
|
+
*
|
|
1655
|
+
*/
|
|
1656
|
+
const getNeonAuthEmailAndPasswordConfig = (options) => (options.client ?? client).get({
|
|
1657
|
+
security: [
|
|
1658
|
+
{
|
|
1659
|
+
scheme: "bearer",
|
|
1660
|
+
type: "http"
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
in: "cookie",
|
|
1664
|
+
name: "zenith",
|
|
1665
|
+
type: "apiKey"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
in: "cookie",
|
|
1669
|
+
name: "keycloak_token",
|
|
1670
|
+
type: "apiKey"
|
|
1671
|
+
}
|
|
1672
|
+
],
|
|
1673
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/email_and_password",
|
|
1674
|
+
...options
|
|
1675
|
+
});
|
|
1676
|
+
/**
|
|
1677
|
+
* Update email and password configuration
|
|
1678
|
+
*
|
|
1679
|
+
* Updates the email and password authentication configuration for the specified branch's Neon Auth integration.
|
|
1680
|
+
* Only the fields provided in the request body are updated.
|
|
1681
|
+
*
|
|
1682
|
+
*/
|
|
1683
|
+
const updateNeonAuthEmailAndPasswordConfig = (options) => (options.client ?? client).patch({
|
|
1684
|
+
security: [
|
|
1685
|
+
{
|
|
1686
|
+
scheme: "bearer",
|
|
1687
|
+
type: "http"
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
in: "cookie",
|
|
1691
|
+
name: "zenith",
|
|
1692
|
+
type: "apiKey"
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
in: "cookie",
|
|
1696
|
+
name: "keycloak_token",
|
|
1697
|
+
type: "apiKey"
|
|
1698
|
+
}
|
|
1699
|
+
],
|
|
1700
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/email_and_password",
|
|
1701
|
+
...options,
|
|
1702
|
+
headers: {
|
|
1703
|
+
"Content-Type": "application/json",
|
|
1704
|
+
...options.headers
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1707
|
+
/**
|
|
1708
|
+
* Retrieve email provider configuration
|
|
1709
|
+
*
|
|
1710
|
+
* Retrieves the email provider configuration for the specified branch's Neon Auth integration,
|
|
1711
|
+
* including the provider type and server settings.
|
|
1712
|
+
*
|
|
1713
|
+
*/
|
|
1714
|
+
const getNeonAuthEmailProvider = (options) => (options.client ?? client).get({
|
|
1715
|
+
security: [
|
|
1716
|
+
{
|
|
1717
|
+
scheme: "bearer",
|
|
1718
|
+
type: "http"
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
in: "cookie",
|
|
1722
|
+
name: "zenith",
|
|
1723
|
+
type: "apiKey"
|
|
1724
|
+
},
|
|
1725
|
+
{
|
|
1726
|
+
in: "cookie",
|
|
1727
|
+
name: "keycloak_token",
|
|
1728
|
+
type: "apiKey"
|
|
1729
|
+
}
|
|
1730
|
+
],
|
|
1731
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/email_provider",
|
|
1732
|
+
...options
|
|
1733
|
+
});
|
|
1734
|
+
/**
|
|
1735
|
+
* Update email provider configuration
|
|
1736
|
+
*
|
|
1737
|
+
* Updates the email provider configuration for the specified branch's Neon Auth integration.
|
|
1738
|
+
* The email provider handles transactional messages such as verification emails and password reset links.
|
|
1739
|
+
*
|
|
1740
|
+
*/
|
|
1741
|
+
const updateNeonAuthEmailProvider = (options) => (options.client ?? client).patch({
|
|
1742
|
+
security: [
|
|
1743
|
+
{
|
|
1744
|
+
scheme: "bearer",
|
|
1745
|
+
type: "http"
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
in: "cookie",
|
|
1749
|
+
name: "zenith",
|
|
1750
|
+
type: "apiKey"
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
in: "cookie",
|
|
1754
|
+
name: "keycloak_token",
|
|
1755
|
+
type: "apiKey"
|
|
1756
|
+
}
|
|
1757
|
+
],
|
|
1758
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/email_provider",
|
|
1759
|
+
...options,
|
|
1760
|
+
headers: {
|
|
1761
|
+
"Content-Type": "application/json",
|
|
1762
|
+
...options.headers
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1765
|
+
/**
|
|
1766
|
+
* Delete integration with auth provider
|
|
1767
|
+
*
|
|
1768
|
+
* DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth` instead.
|
|
1769
|
+
*
|
|
1770
|
+
* @deprecated
|
|
1771
|
+
*/
|
|
1772
|
+
const deleteNeonAuthIntegration = (options) => (options.client ?? client).delete({
|
|
1773
|
+
security: [
|
|
1774
|
+
{
|
|
1775
|
+
scheme: "bearer",
|
|
1776
|
+
type: "http"
|
|
1777
|
+
},
|
|
1778
|
+
{
|
|
1779
|
+
in: "cookie",
|
|
1780
|
+
name: "zenith",
|
|
1781
|
+
type: "apiKey"
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
in: "cookie",
|
|
1785
|
+
name: "keycloak_token",
|
|
1786
|
+
type: "apiKey"
|
|
1787
|
+
}
|
|
1788
|
+
],
|
|
1789
|
+
url: "/projects/{project_id}/auth/integration/{auth_provider}",
|
|
1790
|
+
...options,
|
|
1791
|
+
headers: {
|
|
1792
|
+
"Content-Type": "application/json",
|
|
1793
|
+
...options.headers
|
|
1794
|
+
}
|
|
1795
|
+
});
|
|
1796
|
+
/**
|
|
1797
|
+
* Retrieve connection URI
|
|
1798
|
+
*
|
|
1799
|
+
* Retrieves a connection URI for the specified database.
|
|
1800
|
+
* The URI uses the standard PostgreSQL connection string format. Set `pooled=true` to include the `-pooler` suffix for a connection pooler URI.
|
|
1801
|
+
*
|
|
1802
|
+
*/
|
|
1803
|
+
const getConnectionUri = (options) => (options.client ?? client).get({
|
|
1804
|
+
security: [
|
|
1805
|
+
{
|
|
1806
|
+
scheme: "bearer",
|
|
1807
|
+
type: "http"
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
in: "cookie",
|
|
1811
|
+
name: "zenith",
|
|
1812
|
+
type: "apiKey"
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
in: "cookie",
|
|
1816
|
+
name: "keycloak_token",
|
|
1817
|
+
type: "apiKey"
|
|
1818
|
+
}
|
|
1819
|
+
],
|
|
1820
|
+
url: "/projects/{project_id}/connection_uri",
|
|
1821
|
+
...options
|
|
1822
|
+
});
|
|
1823
|
+
/**
|
|
1824
|
+
* Retrieve localhost allow setting
|
|
1825
|
+
*
|
|
1826
|
+
* Retrieves the localhost allow setting for the specified branch's Neon Auth integration.
|
|
1827
|
+
* When enabled, authentication flows work from `localhost` without adding it to the redirect URI whitelist.
|
|
1828
|
+
*
|
|
1829
|
+
*/
|
|
1830
|
+
const getNeonAuthAllowLocalhost = (options) => (options.client ?? client).get({
|
|
1831
|
+
security: [
|
|
1832
|
+
{
|
|
1833
|
+
scheme: "bearer",
|
|
1834
|
+
type: "http"
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
in: "cookie",
|
|
1838
|
+
name: "zenith",
|
|
1839
|
+
type: "apiKey"
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
in: "cookie",
|
|
1843
|
+
name: "keycloak_token",
|
|
1844
|
+
type: "apiKey"
|
|
1845
|
+
}
|
|
1846
|
+
],
|
|
1847
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/allow_localhost",
|
|
1848
|
+
...options
|
|
1849
|
+
});
|
|
1850
|
+
/**
|
|
1851
|
+
* Update localhost allow setting
|
|
1852
|
+
*
|
|
1853
|
+
* Updates the localhost allow setting for the specified branch's Neon Auth integration.
|
|
1854
|
+
* When enabled, authentication flows work from `localhost` without adding it to the redirect URI whitelist.
|
|
1855
|
+
*
|
|
1856
|
+
*/
|
|
1857
|
+
const updateNeonAuthAllowLocalhost = (options) => (options.client ?? client).patch({
|
|
1858
|
+
security: [
|
|
1859
|
+
{
|
|
1860
|
+
scheme: "bearer",
|
|
1861
|
+
type: "http"
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
in: "cookie",
|
|
1865
|
+
name: "zenith",
|
|
1866
|
+
type: "apiKey"
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
in: "cookie",
|
|
1870
|
+
name: "keycloak_token",
|
|
1871
|
+
type: "apiKey"
|
|
1872
|
+
}
|
|
1873
|
+
],
|
|
1874
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/allow_localhost",
|
|
1875
|
+
...options,
|
|
1876
|
+
headers: {
|
|
1877
|
+
"Content-Type": "application/json",
|
|
1878
|
+
...options.headers
|
|
1879
|
+
}
|
|
1880
|
+
});
|
|
1881
|
+
/**
|
|
1882
|
+
* Retrieve Neon Auth plugin configurations
|
|
1883
|
+
*
|
|
1884
|
+
* Returns all plugin configurations for Neon Auth in a single response.
|
|
1885
|
+
* This endpoint aggregates organization, email provider, email and password,
|
|
1886
|
+
* OAuth providers, and localhost settings.
|
|
1887
|
+
*
|
|
1888
|
+
*/
|
|
1889
|
+
const getNeonAuthPluginConfigs = (options) => (options.client ?? client).get({
|
|
1890
|
+
security: [
|
|
1891
|
+
{
|
|
1892
|
+
scheme: "bearer",
|
|
1893
|
+
type: "http"
|
|
1894
|
+
},
|
|
1895
|
+
{
|
|
1896
|
+
in: "cookie",
|
|
1897
|
+
name: "zenith",
|
|
1898
|
+
type: "apiKey"
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
in: "cookie",
|
|
1902
|
+
name: "keycloak_token",
|
|
1903
|
+
type: "apiKey"
|
|
1904
|
+
}
|
|
1905
|
+
],
|
|
1906
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/plugins",
|
|
1907
|
+
...options
|
|
1908
|
+
});
|
|
1909
|
+
/**
|
|
1910
|
+
* Update organization plugin configuration
|
|
1911
|
+
*
|
|
1912
|
+
* Updates the organization plugin configuration for Neon Auth.
|
|
1913
|
+
* The organization plugin enables multi-tenant organization support.
|
|
1914
|
+
*
|
|
1915
|
+
*/
|
|
1916
|
+
const updateNeonAuthOrganizationPlugin = (options) => (options.client ?? client).patch({
|
|
1917
|
+
security: [
|
|
1918
|
+
{
|
|
1919
|
+
scheme: "bearer",
|
|
1920
|
+
type: "http"
|
|
1921
|
+
},
|
|
1922
|
+
{
|
|
1923
|
+
in: "cookie",
|
|
1924
|
+
name: "zenith",
|
|
1925
|
+
type: "apiKey"
|
|
1926
|
+
},
|
|
1927
|
+
{
|
|
1928
|
+
in: "cookie",
|
|
1929
|
+
name: "keycloak_token",
|
|
1930
|
+
type: "apiKey"
|
|
1931
|
+
}
|
|
1932
|
+
],
|
|
1933
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/plugins/organization",
|
|
1934
|
+
...options,
|
|
1935
|
+
headers: {
|
|
1936
|
+
"Content-Type": "application/json",
|
|
1937
|
+
...options.headers
|
|
1938
|
+
}
|
|
1939
|
+
});
|
|
1940
|
+
/**
|
|
1941
|
+
* Update auth configuration
|
|
1942
|
+
*
|
|
1943
|
+
* Updates the auth configuration for the branch.
|
|
1944
|
+
* Currently supports updating the application name used in auth emails.
|
|
1945
|
+
*
|
|
1946
|
+
*/
|
|
1947
|
+
const updateNeonAuthConfig = (options) => (options.client ?? client).patch({
|
|
1948
|
+
security: [
|
|
1949
|
+
{
|
|
1950
|
+
scheme: "bearer",
|
|
1951
|
+
type: "http"
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
in: "cookie",
|
|
1955
|
+
name: "zenith",
|
|
1956
|
+
type: "apiKey"
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
in: "cookie",
|
|
1960
|
+
name: "keycloak_token",
|
|
1961
|
+
type: "apiKey"
|
|
1962
|
+
}
|
|
1963
|
+
],
|
|
1964
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/config",
|
|
1965
|
+
...options,
|
|
1966
|
+
headers: {
|
|
1967
|
+
"Content-Type": "application/json",
|
|
1968
|
+
...options.headers
|
|
1969
|
+
}
|
|
1970
|
+
});
|
|
1971
|
+
/**
|
|
1972
|
+
* Update magic link plugin configuration
|
|
1973
|
+
*
|
|
1974
|
+
* Updates the magic link plugin configuration for Neon Auth.
|
|
1975
|
+
* The magic link plugin enables passwordless authentication via email magic links.
|
|
1976
|
+
*
|
|
1977
|
+
*/
|
|
1978
|
+
const updateNeonAuthMagicLinkPlugin = (options) => (options.client ?? client).patch({
|
|
1979
|
+
security: [
|
|
1980
|
+
{
|
|
1981
|
+
scheme: "bearer",
|
|
1982
|
+
type: "http"
|
|
1983
|
+
},
|
|
1984
|
+
{
|
|
1985
|
+
in: "cookie",
|
|
1986
|
+
name: "zenith",
|
|
1987
|
+
type: "apiKey"
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
in: "cookie",
|
|
1991
|
+
name: "keycloak_token",
|
|
1992
|
+
type: "apiKey"
|
|
1993
|
+
}
|
|
1994
|
+
],
|
|
1995
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/plugins/magic-link",
|
|
1996
|
+
...options,
|
|
1997
|
+
headers: {
|
|
1998
|
+
"Content-Type": "application/json",
|
|
1999
|
+
...options.headers
|
|
2000
|
+
}
|
|
2001
|
+
});
|
|
2002
|
+
/**
|
|
2003
|
+
* Retrieve phone number plugin configuration
|
|
2004
|
+
*
|
|
2005
|
+
* Returns the phone number plugin configuration for Neon Auth.
|
|
2006
|
+
* The phone number plugin enables phone-based OTP authentication.
|
|
2007
|
+
*
|
|
2008
|
+
*/
|
|
2009
|
+
const getNeonAuthPhoneNumberPlugin = (options) => (options.client ?? client).get({
|
|
2010
|
+
security: [
|
|
2011
|
+
{
|
|
2012
|
+
scheme: "bearer",
|
|
2013
|
+
type: "http"
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
in: "cookie",
|
|
2017
|
+
name: "zenith",
|
|
2018
|
+
type: "apiKey"
|
|
2019
|
+
},
|
|
2020
|
+
{
|
|
2021
|
+
in: "cookie",
|
|
2022
|
+
name: "keycloak_token",
|
|
2023
|
+
type: "apiKey"
|
|
2024
|
+
}
|
|
2025
|
+
],
|
|
2026
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/plugins/phone-number",
|
|
2027
|
+
...options
|
|
2028
|
+
});
|
|
2029
|
+
/**
|
|
2030
|
+
* Update phone number plugin configuration
|
|
2031
|
+
*
|
|
2032
|
+
* Updates the phone number plugin configuration for Neon Auth.
|
|
2033
|
+
* Only the fields provided in the request body are updated; omitted fields retain their current values.
|
|
2034
|
+
* The phone number plugin enables phone-based OTP authentication.
|
|
2035
|
+
* OTP codes are delivered via the `send.otp` webhook event with `delivery_preference: "sms"`.
|
|
2036
|
+
* A webhook must be configured with the `send.otp` event enabled for SMS delivery to work.
|
|
2037
|
+
*
|
|
2038
|
+
*/
|
|
2039
|
+
const updateNeonAuthPhoneNumberPlugin = (options) => (options.client ?? client).patch({
|
|
2040
|
+
security: [
|
|
2041
|
+
{
|
|
2042
|
+
scheme: "bearer",
|
|
2043
|
+
type: "http"
|
|
2044
|
+
},
|
|
2045
|
+
{
|
|
2046
|
+
in: "cookie",
|
|
2047
|
+
name: "zenith",
|
|
2048
|
+
type: "apiKey"
|
|
2049
|
+
},
|
|
2050
|
+
{
|
|
2051
|
+
in: "cookie",
|
|
2052
|
+
name: "keycloak_token",
|
|
2053
|
+
type: "apiKey"
|
|
2054
|
+
}
|
|
2055
|
+
],
|
|
2056
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/plugins/phone-number",
|
|
2057
|
+
...options,
|
|
2058
|
+
headers: {
|
|
2059
|
+
"Content-Type": "application/json",
|
|
2060
|
+
...options.headers
|
|
2061
|
+
}
|
|
2062
|
+
});
|
|
2063
|
+
/**
|
|
2064
|
+
* Retrieve Neon Auth webhook configuration
|
|
2065
|
+
*
|
|
2066
|
+
* Returns the webhook configuration for the specified branch's Neon Auth integration,
|
|
2067
|
+
* including the endpoint URL and the events that trigger it.
|
|
2068
|
+
*
|
|
2069
|
+
*/
|
|
2070
|
+
const getNeonAuthWebhookConfig = (options) => (options.client ?? client).get({
|
|
2071
|
+
security: [
|
|
2072
|
+
{
|
|
2073
|
+
scheme: "bearer",
|
|
2074
|
+
type: "http"
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
in: "cookie",
|
|
2078
|
+
name: "zenith",
|
|
2079
|
+
type: "apiKey"
|
|
2080
|
+
},
|
|
2081
|
+
{
|
|
2082
|
+
in: "cookie",
|
|
2083
|
+
name: "keycloak_token",
|
|
2084
|
+
type: "apiKey"
|
|
2085
|
+
}
|
|
2086
|
+
],
|
|
2087
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/webhooks",
|
|
2088
|
+
...options
|
|
2089
|
+
});
|
|
2090
|
+
/**
|
|
2091
|
+
* Update Neon Auth webhook configuration
|
|
2092
|
+
*
|
|
2093
|
+
* Updates the webhook configuration for the specified branch's Neon Auth integration.
|
|
2094
|
+
* Webhooks notify an external endpoint when auth events occur, such as user creation or sign-in.
|
|
2095
|
+
*
|
|
2096
|
+
*/
|
|
2097
|
+
const updateNeonAuthWebhookConfig = (options) => (options.client ?? client).put({
|
|
2098
|
+
security: [
|
|
2099
|
+
{
|
|
2100
|
+
scheme: "bearer",
|
|
2101
|
+
type: "http"
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
in: "cookie",
|
|
2105
|
+
name: "zenith",
|
|
2106
|
+
type: "apiKey"
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
in: "cookie",
|
|
2110
|
+
name: "keycloak_token",
|
|
2111
|
+
type: "apiKey"
|
|
2112
|
+
}
|
|
2113
|
+
],
|
|
2114
|
+
url: "/projects/{project_id}/branches/{branch_id}/auth/webhooks",
|
|
2115
|
+
...options,
|
|
2116
|
+
headers: {
|
|
2117
|
+
"Content-Type": "application/json",
|
|
2118
|
+
...options.headers
|
|
2119
|
+
}
|
|
2120
|
+
});
|
|
2121
|
+
/**
|
|
2122
|
+
* List branches
|
|
2123
|
+
*
|
|
2124
|
+
* Retrieves a list of branches for the specified project.
|
|
2125
|
+
*
|
|
2126
|
+
* Each Neon project has a root branch named `main`.
|
|
2127
|
+
* A `branch_id` value has a `br-` prefix.
|
|
2128
|
+
* A project may contain child branches that were branched from `main` or from another branch.
|
|
2129
|
+
* A parent branch is identified by the `parent_id` value, which is the `id` of the parent branch.
|
|
2130
|
+
* For related information, see [Manage branches](https://neon.com/docs/manage/branches/).
|
|
2131
|
+
*
|
|
2132
|
+
*/
|
|
2133
|
+
const listProjectBranches = (options) => (options.client ?? client).get({
|
|
2134
|
+
security: [
|
|
2135
|
+
{
|
|
2136
|
+
scheme: "bearer",
|
|
2137
|
+
type: "http"
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
in: "cookie",
|
|
2141
|
+
name: "zenith",
|
|
2142
|
+
type: "apiKey"
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
in: "cookie",
|
|
2146
|
+
name: "keycloak_token",
|
|
2147
|
+
type: "apiKey"
|
|
2148
|
+
}
|
|
2149
|
+
],
|
|
2150
|
+
url: "/projects/{project_id}/branches",
|
|
2151
|
+
...options
|
|
2152
|
+
});
|
|
2153
|
+
/**
|
|
2154
|
+
* Create branch
|
|
2155
|
+
*
|
|
2156
|
+
* Creates a branch in the specified project.
|
|
2157
|
+
* No request body is required, but you can specify one to create a compute endpoint or select a non-default parent branch.
|
|
2158
|
+
* By default, the branch is created from the project's default branch with no compute endpoint, and the branch name is auto-generated.
|
|
2159
|
+
* To access the branch, add a `read_write` endpoint.
|
|
2160
|
+
* Each branch supports one read-write endpoint and multiple read-only endpoints.
|
|
2161
|
+
* For related information, see [Manage branches](https://neon.com/docs/manage/branches/).
|
|
2162
|
+
*
|
|
2163
|
+
*/
|
|
2164
|
+
const createProjectBranch = (options) => (options.client ?? client).post({
|
|
2165
|
+
security: [
|
|
2166
|
+
{
|
|
2167
|
+
scheme: "bearer",
|
|
2168
|
+
type: "http"
|
|
2169
|
+
},
|
|
2170
|
+
{
|
|
2171
|
+
in: "cookie",
|
|
2172
|
+
name: "zenith",
|
|
2173
|
+
type: "apiKey"
|
|
2174
|
+
},
|
|
2175
|
+
{
|
|
2176
|
+
in: "cookie",
|
|
2177
|
+
name: "keycloak_token",
|
|
2178
|
+
type: "apiKey"
|
|
2179
|
+
}
|
|
2180
|
+
],
|
|
2181
|
+
url: "/projects/{project_id}/branches",
|
|
2182
|
+
...options,
|
|
2183
|
+
headers: {
|
|
2184
|
+
"Content-Type": "application/json",
|
|
2185
|
+
...options.headers
|
|
2186
|
+
}
|
|
2187
|
+
});
|
|
2188
|
+
/**
|
|
2189
|
+
* Create anonymized branch
|
|
2190
|
+
*
|
|
2191
|
+
* Creates a new branch with anonymized data using PostgreSQL Anonymizer for static masking.
|
|
2192
|
+
* This allows developers to work with masked production data.
|
|
2193
|
+
* Optionally, provide `masking_rules` to set initial masking rules for the branch
|
|
2194
|
+
* and `start_anonymization` to automatically start anonymization after creation. This
|
|
2195
|
+
* combines functionality of updating masking rules and starting anonymization into the
|
|
2196
|
+
* branch creation request.
|
|
2197
|
+
*
|
|
2198
|
+
* **Note**: This endpoint is currently in Beta.
|
|
2199
|
+
*
|
|
2200
|
+
*/
|
|
2201
|
+
const createProjectBranchAnonymized = (options) => (options.client ?? client).post({
|
|
2202
|
+
security: [
|
|
2203
|
+
{
|
|
2204
|
+
scheme: "bearer",
|
|
2205
|
+
type: "http"
|
|
2206
|
+
},
|
|
2207
|
+
{
|
|
2208
|
+
in: "cookie",
|
|
2209
|
+
name: "zenith",
|
|
2210
|
+
type: "apiKey"
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
in: "cookie",
|
|
2214
|
+
name: "keycloak_token",
|
|
2215
|
+
type: "apiKey"
|
|
2216
|
+
}
|
|
2217
|
+
],
|
|
2218
|
+
url: "/projects/{project_id}/branch_anonymized",
|
|
2219
|
+
...options,
|
|
2220
|
+
headers: {
|
|
2221
|
+
"Content-Type": "application/json",
|
|
2222
|
+
...options.headers
|
|
2223
|
+
}
|
|
2224
|
+
});
|
|
2225
|
+
/**
|
|
2226
|
+
* Retrieve number of branches
|
|
2227
|
+
*
|
|
2228
|
+
* Retrieves the total number of branches in the specified project.
|
|
2229
|
+
* Supports an optional `search` parameter to count branches matching a name filter.
|
|
2230
|
+
*
|
|
2231
|
+
*/
|
|
2232
|
+
const countProjectBranches = (options) => (options.client ?? client).get({
|
|
2233
|
+
security: [
|
|
2234
|
+
{
|
|
2235
|
+
scheme: "bearer",
|
|
2236
|
+
type: "http"
|
|
2237
|
+
},
|
|
2238
|
+
{
|
|
2239
|
+
in: "cookie",
|
|
2240
|
+
name: "zenith",
|
|
2241
|
+
type: "apiKey"
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
in: "cookie",
|
|
2245
|
+
name: "keycloak_token",
|
|
2246
|
+
type: "apiKey"
|
|
2247
|
+
}
|
|
2248
|
+
],
|
|
2249
|
+
url: "/projects/{project_id}/branches/count",
|
|
2250
|
+
...options
|
|
2251
|
+
});
|
|
2252
|
+
/**
|
|
2253
|
+
* Delete branch
|
|
2254
|
+
*
|
|
2255
|
+
* Deletes the specified branch from a project and places all compute endpoints into an idle state, breaking existing client connections.
|
|
2256
|
+
*
|
|
2257
|
+
* The deletion completes after all operations finish.
|
|
2258
|
+
* You cannot delete a project's root or default branch, or a branch that has a child branch.
|
|
2259
|
+
* A project must have at least one branch.
|
|
2260
|
+
*
|
|
2261
|
+
* By default, deleted branches can be recovered within a 7-day grace period.
|
|
2262
|
+
* Use the `hard_delete` parameter to permanently delete the branch immediately.
|
|
2263
|
+
* For related information, see [Manage branches](https://neon.com/docs/manage/branches/).
|
|
2264
|
+
*
|
|
2265
|
+
*/
|
|
2266
|
+
const deleteProjectBranch = (options) => (options.client ?? client).delete({
|
|
2267
|
+
security: [
|
|
2268
|
+
{
|
|
2269
|
+
scheme: "bearer",
|
|
2270
|
+
type: "http"
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
in: "cookie",
|
|
2274
|
+
name: "zenith",
|
|
2275
|
+
type: "apiKey"
|
|
2276
|
+
},
|
|
2277
|
+
{
|
|
2278
|
+
in: "cookie",
|
|
2279
|
+
name: "keycloak_token",
|
|
2280
|
+
type: "apiKey"
|
|
2281
|
+
}
|
|
2282
|
+
],
|
|
2283
|
+
url: "/projects/{project_id}/branches/{branch_id}",
|
|
2284
|
+
...options
|
|
2285
|
+
});
|
|
2286
|
+
/**
|
|
2287
|
+
* Retrieve branch details
|
|
2288
|
+
*
|
|
2289
|
+
* Retrieves information about the specified branch.
|
|
2290
|
+
* A `branch_id` value has a `br-` prefix.
|
|
2291
|
+
*
|
|
2292
|
+
* Each Neon project is initially created with a root and default branch named `main`.
|
|
2293
|
+
* A project can contain one or more branches.
|
|
2294
|
+
* A parent branch is identified by a `parent_id` value, which is the `id` of the parent branch.
|
|
2295
|
+
* For related information, see [Manage branches](https://neon.com/docs/manage/branches/).
|
|
2296
|
+
*
|
|
2297
|
+
*/
|
|
2298
|
+
const getProjectBranch = (options) => (options.client ?? client).get({
|
|
2299
|
+
security: [
|
|
2300
|
+
{
|
|
2301
|
+
scheme: "bearer",
|
|
2302
|
+
type: "http"
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
in: "cookie",
|
|
2306
|
+
name: "zenith",
|
|
2307
|
+
type: "apiKey"
|
|
2308
|
+
},
|
|
2309
|
+
{
|
|
2310
|
+
in: "cookie",
|
|
2311
|
+
name: "keycloak_token",
|
|
2312
|
+
type: "apiKey"
|
|
2313
|
+
}
|
|
2314
|
+
],
|
|
2315
|
+
url: "/projects/{project_id}/branches/{branch_id}",
|
|
2316
|
+
...options
|
|
2317
|
+
});
|
|
2318
|
+
/**
|
|
2319
|
+
* Update branch
|
|
2320
|
+
*
|
|
2321
|
+
* Updates the specified branch.
|
|
2322
|
+
* For more information, see [Manage branches](https://neon.com/docs/manage/branches/).
|
|
2323
|
+
*
|
|
2324
|
+
*/
|
|
2325
|
+
const updateProjectBranch = (options) => (options.client ?? client).patch({
|
|
2326
|
+
security: [
|
|
2327
|
+
{
|
|
2328
|
+
scheme: "bearer",
|
|
2329
|
+
type: "http"
|
|
2330
|
+
},
|
|
2331
|
+
{
|
|
2332
|
+
in: "cookie",
|
|
2333
|
+
name: "zenith",
|
|
2334
|
+
type: "apiKey"
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
in: "cookie",
|
|
2338
|
+
name: "keycloak_token",
|
|
2339
|
+
type: "apiKey"
|
|
2340
|
+
}
|
|
2341
|
+
],
|
|
2342
|
+
url: "/projects/{project_id}/branches/{branch_id}",
|
|
2343
|
+
...options,
|
|
2344
|
+
headers: {
|
|
2345
|
+
"Content-Type": "application/json",
|
|
2346
|
+
...options.headers
|
|
2347
|
+
}
|
|
2348
|
+
});
|
|
2349
|
+
/**
|
|
2350
|
+
* Restore branch to a historical state
|
|
2351
|
+
*
|
|
2352
|
+
* Restores a branch to an earlier state in its own or another branch's history
|
|
2353
|
+
* by specifying an LSN or timestamp.
|
|
2354
|
+
* Creates a new branch from the historical state.
|
|
2355
|
+
*
|
|
2356
|
+
*/
|
|
2357
|
+
const restoreProjectBranch = (options) => (options.client ?? client).post({
|
|
2358
|
+
security: [
|
|
2359
|
+
{
|
|
2360
|
+
scheme: "bearer",
|
|
2361
|
+
type: "http"
|
|
2362
|
+
},
|
|
2363
|
+
{
|
|
2364
|
+
in: "cookie",
|
|
2365
|
+
name: "zenith",
|
|
2366
|
+
type: "apiKey"
|
|
2367
|
+
},
|
|
2368
|
+
{
|
|
2369
|
+
in: "cookie",
|
|
2370
|
+
name: "keycloak_token",
|
|
2371
|
+
type: "apiKey"
|
|
2372
|
+
}
|
|
2373
|
+
],
|
|
2374
|
+
url: "/projects/{project_id}/branches/{branch_id}/restore",
|
|
2375
|
+
...options,
|
|
2376
|
+
headers: {
|
|
2377
|
+
"Content-Type": "application/json",
|
|
2378
|
+
...options.headers
|
|
2379
|
+
}
|
|
2380
|
+
});
|
|
2381
|
+
/**
|
|
2382
|
+
* Retrieve database schema
|
|
2383
|
+
*
|
|
2384
|
+
* Retrieves the schema from the specified database. The `lsn` and `timestamp` values cannot be specified at the same time. If both are omitted, the database schema is retrieved from database's head.
|
|
2385
|
+
*/
|
|
2386
|
+
const getProjectBranchSchema = (options) => (options.client ?? client).get({
|
|
2387
|
+
security: [
|
|
2388
|
+
{
|
|
2389
|
+
scheme: "bearer",
|
|
2390
|
+
type: "http"
|
|
2391
|
+
},
|
|
2392
|
+
{
|
|
2393
|
+
in: "cookie",
|
|
2394
|
+
name: "zenith",
|
|
2395
|
+
type: "apiKey"
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
in: "cookie",
|
|
2399
|
+
name: "keycloak_token",
|
|
2400
|
+
type: "apiKey"
|
|
2401
|
+
}
|
|
2402
|
+
],
|
|
2403
|
+
url: "/projects/{project_id}/branches/{branch_id}/schema",
|
|
2404
|
+
...options
|
|
2405
|
+
});
|
|
2406
|
+
/**
|
|
2407
|
+
* Compare database schema
|
|
2408
|
+
*
|
|
2409
|
+
* Compares the schema from the specified database with another branch's schema.
|
|
2410
|
+
*/
|
|
2411
|
+
const getProjectBranchSchemaComparison = (options) => (options.client ?? client).get({
|
|
2412
|
+
security: [
|
|
2413
|
+
{
|
|
2414
|
+
scheme: "bearer",
|
|
2415
|
+
type: "http"
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
in: "cookie",
|
|
2419
|
+
name: "zenith",
|
|
2420
|
+
type: "apiKey"
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
in: "cookie",
|
|
2424
|
+
name: "keycloak_token",
|
|
2425
|
+
type: "apiKey"
|
|
2426
|
+
}
|
|
2427
|
+
],
|
|
2428
|
+
url: "/projects/{project_id}/branches/{branch_id}/compare_schema",
|
|
2429
|
+
...options
|
|
2430
|
+
});
|
|
2431
|
+
/**
|
|
2432
|
+
* Retrieve masking rules
|
|
2433
|
+
*
|
|
2434
|
+
* Retrieves the masking rules for the specified anonymized branch.
|
|
2435
|
+
* Masking rules define how sensitive data should be anonymized using PostgreSQL Anonymizer.
|
|
2436
|
+
*
|
|
2437
|
+
* **Note**: This endpoint is currently in Beta.
|
|
2438
|
+
*
|
|
2439
|
+
*/
|
|
2440
|
+
const getMaskingRules = (options) => (options.client ?? client).get({
|
|
2441
|
+
security: [
|
|
2442
|
+
{
|
|
2443
|
+
scheme: "bearer",
|
|
2444
|
+
type: "http"
|
|
2445
|
+
},
|
|
2446
|
+
{
|
|
2447
|
+
in: "cookie",
|
|
2448
|
+
name: "zenith",
|
|
2449
|
+
type: "apiKey"
|
|
2450
|
+
},
|
|
2451
|
+
{
|
|
2452
|
+
in: "cookie",
|
|
2453
|
+
name: "keycloak_token",
|
|
2454
|
+
type: "apiKey"
|
|
2455
|
+
}
|
|
2456
|
+
],
|
|
2457
|
+
url: "/projects/{project_id}/branches/{branch_id}/masking_rules",
|
|
2458
|
+
...options
|
|
2459
|
+
});
|
|
2460
|
+
/**
|
|
2461
|
+
* Update masking rules
|
|
2462
|
+
*
|
|
2463
|
+
* Updates the masking rules for the specified anonymized branch.
|
|
2464
|
+
* Masking rules define how sensitive data should be anonymized using PostgreSQL Anonymizer.
|
|
2465
|
+
*
|
|
2466
|
+
* **Note**: This endpoint is currently in Beta.
|
|
2467
|
+
*
|
|
2468
|
+
*/
|
|
2469
|
+
const updateMaskingRules = (options) => (options.client ?? client).patch({
|
|
2470
|
+
security: [
|
|
2471
|
+
{
|
|
2472
|
+
scheme: "bearer",
|
|
2473
|
+
type: "http"
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
in: "cookie",
|
|
2477
|
+
name: "zenith",
|
|
2478
|
+
type: "apiKey"
|
|
2479
|
+
},
|
|
2480
|
+
{
|
|
2481
|
+
in: "cookie",
|
|
2482
|
+
name: "keycloak_token",
|
|
2483
|
+
type: "apiKey"
|
|
2484
|
+
}
|
|
2485
|
+
],
|
|
2486
|
+
url: "/projects/{project_id}/branches/{branch_id}/masking_rules",
|
|
2487
|
+
...options,
|
|
2488
|
+
headers: {
|
|
2489
|
+
"Content-Type": "application/json",
|
|
2490
|
+
...options.headers
|
|
2491
|
+
}
|
|
2492
|
+
});
|
|
2493
|
+
/**
|
|
2494
|
+
* Retrieve anonymized branch status
|
|
2495
|
+
*
|
|
2496
|
+
* Retrieves the current status of an anonymized branch, including its state and progress information.
|
|
2497
|
+
* This endpoint allows you to monitor the anonymization process from initialization through completion.
|
|
2498
|
+
* Only anonymized branches will have status information available.
|
|
2499
|
+
*
|
|
2500
|
+
* **Note**: This endpoint is currently in Beta.
|
|
2501
|
+
*
|
|
2502
|
+
*/
|
|
2503
|
+
const getAnonymizedBranchStatus = (options) => (options.client ?? client).get({
|
|
2504
|
+
security: [
|
|
2505
|
+
{
|
|
2506
|
+
scheme: "bearer",
|
|
2507
|
+
type: "http"
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
in: "cookie",
|
|
2511
|
+
name: "zenith",
|
|
2512
|
+
type: "apiKey"
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
in: "cookie",
|
|
2516
|
+
name: "keycloak_token",
|
|
2517
|
+
type: "apiKey"
|
|
2518
|
+
}
|
|
2519
|
+
],
|
|
2520
|
+
url: "/projects/{project_id}/branches/{branch_id}/anonymized_status",
|
|
2521
|
+
...options
|
|
2522
|
+
});
|
|
2523
|
+
/**
|
|
2524
|
+
* Start anonymization
|
|
2525
|
+
*
|
|
2526
|
+
* Starts the anonymization process for an anonymized branch that is in the initialized, error, or anonymized state.
|
|
2527
|
+
* This will apply all defined masking rules to anonymize sensitive data in the branch databases.
|
|
2528
|
+
* The branch must be an anonymized branch to start anonymization.
|
|
2529
|
+
*
|
|
2530
|
+
* **Note**: This endpoint is currently in Beta.
|
|
2531
|
+
*
|
|
2532
|
+
*/
|
|
2533
|
+
const startAnonymization = (options) => (options.client ?? client).post({
|
|
2534
|
+
security: [
|
|
2535
|
+
{
|
|
2536
|
+
scheme: "bearer",
|
|
2537
|
+
type: "http"
|
|
2538
|
+
},
|
|
2539
|
+
{
|
|
2540
|
+
in: "cookie",
|
|
2541
|
+
name: "zenith",
|
|
2542
|
+
type: "apiKey"
|
|
2543
|
+
},
|
|
2544
|
+
{
|
|
2545
|
+
in: "cookie",
|
|
2546
|
+
name: "keycloak_token",
|
|
2547
|
+
type: "apiKey"
|
|
2548
|
+
}
|
|
2549
|
+
],
|
|
2550
|
+
url: "/projects/{project_id}/branches/{branch_id}/anonymize",
|
|
2551
|
+
...options
|
|
2552
|
+
});
|
|
2553
|
+
/**
|
|
2554
|
+
* Set branch as default
|
|
2555
|
+
*
|
|
2556
|
+
* Sets the specified branch as the project's default branch.
|
|
2557
|
+
* The default designation is automatically removed from the previous default branch.
|
|
2558
|
+
* For more information, see [Manage branches](https://neon.com/docs/manage/branches/).
|
|
2559
|
+
*
|
|
2560
|
+
*/
|
|
2561
|
+
const setDefaultProjectBranch = (options) => (options.client ?? client).post({
|
|
2562
|
+
security: [
|
|
2563
|
+
{
|
|
2564
|
+
scheme: "bearer",
|
|
2565
|
+
type: "http"
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
in: "cookie",
|
|
2569
|
+
name: "zenith",
|
|
2570
|
+
type: "apiKey"
|
|
2571
|
+
},
|
|
2572
|
+
{
|
|
2573
|
+
in: "cookie",
|
|
2574
|
+
name: "keycloak_token",
|
|
2575
|
+
type: "apiKey"
|
|
2576
|
+
}
|
|
2577
|
+
],
|
|
2578
|
+
url: "/projects/{project_id}/branches/{branch_id}/set_as_default",
|
|
2579
|
+
...options
|
|
2580
|
+
});
|
|
2581
|
+
/**
|
|
2582
|
+
* Finalize branch restore from snapshot
|
|
2583
|
+
*
|
|
2584
|
+
* Finalize the restore operation for a branch created from a snapshot.
|
|
2585
|
+
* This operation updates the branch so it functions as the original branch it replaced.
|
|
2586
|
+
* This includes:
|
|
2587
|
+
* - Reassigning any computes from the original branch to the restored branch (this will restart the computes)
|
|
2588
|
+
* - Renaming the restored branch to the original branch's name
|
|
2589
|
+
* - Renaming the original branch so it no longer uses the original name
|
|
2590
|
+
*
|
|
2591
|
+
* This operation only applies to branches created using the `restoreSnapshot` endpoint with `finalize_restore: false`.
|
|
2592
|
+
*
|
|
2593
|
+
* **Note**: This endpoint is currently in Beta.
|
|
2594
|
+
*
|
|
2595
|
+
*/
|
|
2596
|
+
const finalizeRestoreBranch = (options) => (options.client ?? client).post({
|
|
2597
|
+
security: [
|
|
2598
|
+
{
|
|
2599
|
+
scheme: "bearer",
|
|
2600
|
+
type: "http"
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
in: "cookie",
|
|
2604
|
+
name: "zenith",
|
|
2605
|
+
type: "apiKey"
|
|
2606
|
+
},
|
|
2607
|
+
{
|
|
2608
|
+
in: "cookie",
|
|
2609
|
+
name: "keycloak_token",
|
|
2610
|
+
type: "apiKey"
|
|
2611
|
+
}
|
|
2612
|
+
],
|
|
2613
|
+
url: "/projects/{project_id}/branches/{branch_id}/finalize_restore",
|
|
2614
|
+
...options,
|
|
2615
|
+
headers: {
|
|
2616
|
+
"Content-Type": "application/json",
|
|
2617
|
+
...options.headers
|
|
2618
|
+
}
|
|
2619
|
+
});
|
|
2620
|
+
/**
|
|
2621
|
+
* List branch endpoints
|
|
2622
|
+
*
|
|
2623
|
+
* Retrieves a list of compute endpoints for the specified branch.
|
|
2624
|
+
* Neon permits only one read-write compute endpoint per branch.
|
|
2625
|
+
* A branch can have multiple read-only compute endpoints.
|
|
2626
|
+
*
|
|
2627
|
+
*/
|
|
2628
|
+
const listProjectBranchEndpoints = (options) => (options.client ?? client).get({
|
|
2629
|
+
security: [
|
|
2630
|
+
{
|
|
2631
|
+
scheme: "bearer",
|
|
2632
|
+
type: "http"
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
in: "cookie",
|
|
2636
|
+
name: "zenith",
|
|
2637
|
+
type: "apiKey"
|
|
2638
|
+
},
|
|
2639
|
+
{
|
|
2640
|
+
in: "cookie",
|
|
2641
|
+
name: "keycloak_token",
|
|
2642
|
+
type: "apiKey"
|
|
2643
|
+
}
|
|
2644
|
+
],
|
|
2645
|
+
url: "/projects/{project_id}/branches/{branch_id}/endpoints",
|
|
2646
|
+
...options
|
|
2647
|
+
});
|
|
2648
|
+
/**
|
|
2649
|
+
* List databases
|
|
2650
|
+
*
|
|
2651
|
+
* Retrieves a list of databases for the specified branch.
|
|
2652
|
+
* A branch can have multiple databases.
|
|
2653
|
+
* For related information, see [Manage databases](https://neon.com/docs/manage/databases/).
|
|
2654
|
+
*
|
|
2655
|
+
*/
|
|
2656
|
+
const listProjectBranchDatabases = (options) => (options.client ?? client).get({
|
|
2657
|
+
security: [
|
|
2658
|
+
{
|
|
2659
|
+
scheme: "bearer",
|
|
2660
|
+
type: "http"
|
|
2661
|
+
},
|
|
2662
|
+
{
|
|
2663
|
+
in: "cookie",
|
|
2664
|
+
name: "zenith",
|
|
2665
|
+
type: "apiKey"
|
|
2666
|
+
},
|
|
2667
|
+
{
|
|
2668
|
+
in: "cookie",
|
|
2669
|
+
name: "keycloak_token",
|
|
2670
|
+
type: "apiKey"
|
|
2671
|
+
}
|
|
2672
|
+
],
|
|
2673
|
+
url: "/projects/{project_id}/branches/{branch_id}/databases",
|
|
2674
|
+
...options
|
|
2675
|
+
});
|
|
2676
|
+
/**
|
|
2677
|
+
* Create database
|
|
2678
|
+
*
|
|
2679
|
+
* Creates a database in the specified branch.
|
|
2680
|
+
* A branch can have multiple databases.
|
|
2681
|
+
* For related information, see [Manage databases](https://neon.com/docs/manage/databases/).
|
|
2682
|
+
*
|
|
2683
|
+
*/
|
|
2684
|
+
const createProjectBranchDatabase = (options) => (options.client ?? client).post({
|
|
2685
|
+
security: [
|
|
2686
|
+
{
|
|
2687
|
+
scheme: "bearer",
|
|
2688
|
+
type: "http"
|
|
2689
|
+
},
|
|
2690
|
+
{
|
|
2691
|
+
in: "cookie",
|
|
2692
|
+
name: "zenith",
|
|
2693
|
+
type: "apiKey"
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
in: "cookie",
|
|
2697
|
+
name: "keycloak_token",
|
|
2698
|
+
type: "apiKey"
|
|
2699
|
+
}
|
|
2700
|
+
],
|
|
2701
|
+
url: "/projects/{project_id}/branches/{branch_id}/databases",
|
|
2702
|
+
...options,
|
|
2703
|
+
headers: {
|
|
2704
|
+
"Content-Type": "application/json",
|
|
2705
|
+
...options.headers
|
|
2706
|
+
}
|
|
2707
|
+
});
|
|
2708
|
+
/**
|
|
2709
|
+
* Delete database
|
|
2710
|
+
*
|
|
2711
|
+
* Deletes the specified database from the branch.
|
|
2712
|
+
* For related information, see [Manage databases](https://neon.com/docs/manage/databases/).
|
|
2713
|
+
*
|
|
2714
|
+
*/
|
|
2715
|
+
const deleteProjectBranchDatabase = (options) => (options.client ?? client).delete({
|
|
2716
|
+
security: [
|
|
2717
|
+
{
|
|
2718
|
+
scheme: "bearer",
|
|
2719
|
+
type: "http"
|
|
2720
|
+
},
|
|
2721
|
+
{
|
|
2722
|
+
in: "cookie",
|
|
2723
|
+
name: "zenith",
|
|
2724
|
+
type: "apiKey"
|
|
2725
|
+
},
|
|
2726
|
+
{
|
|
2727
|
+
in: "cookie",
|
|
2728
|
+
name: "keycloak_token",
|
|
2729
|
+
type: "apiKey"
|
|
2730
|
+
}
|
|
2731
|
+
],
|
|
2732
|
+
url: "/projects/{project_id}/branches/{branch_id}/databases/{database_name}",
|
|
2733
|
+
...options
|
|
2734
|
+
});
|
|
2735
|
+
/**
|
|
2736
|
+
* Retrieve database details
|
|
2737
|
+
*
|
|
2738
|
+
* Retrieves information about the specified database.
|
|
2739
|
+
* For related information, see [Manage databases](https://neon.com/docs/manage/databases/).
|
|
2740
|
+
*
|
|
2741
|
+
*/
|
|
2742
|
+
const getProjectBranchDatabase = (options) => (options.client ?? client).get({
|
|
2743
|
+
security: [
|
|
2744
|
+
{
|
|
2745
|
+
scheme: "bearer",
|
|
2746
|
+
type: "http"
|
|
2747
|
+
},
|
|
2748
|
+
{
|
|
2749
|
+
in: "cookie",
|
|
2750
|
+
name: "zenith",
|
|
2751
|
+
type: "apiKey"
|
|
2752
|
+
},
|
|
2753
|
+
{
|
|
2754
|
+
in: "cookie",
|
|
2755
|
+
name: "keycloak_token",
|
|
2756
|
+
type: "apiKey"
|
|
2757
|
+
}
|
|
2758
|
+
],
|
|
2759
|
+
url: "/projects/{project_id}/branches/{branch_id}/databases/{database_name}",
|
|
2760
|
+
...options
|
|
2761
|
+
});
|
|
2762
|
+
/**
|
|
2763
|
+
* Update database
|
|
2764
|
+
*
|
|
2765
|
+
* Updates the specified database in the branch.
|
|
2766
|
+
* For related information, see [Manage databases](https://neon.com/docs/manage/databases/).
|
|
2767
|
+
*
|
|
2768
|
+
*/
|
|
2769
|
+
const updateProjectBranchDatabase = (options) => (options.client ?? client).patch({
|
|
2770
|
+
security: [
|
|
2771
|
+
{
|
|
2772
|
+
scheme: "bearer",
|
|
2773
|
+
type: "http"
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
in: "cookie",
|
|
2777
|
+
name: "zenith",
|
|
2778
|
+
type: "apiKey"
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
in: "cookie",
|
|
2782
|
+
name: "keycloak_token",
|
|
2783
|
+
type: "apiKey"
|
|
2784
|
+
}
|
|
2785
|
+
],
|
|
2786
|
+
url: "/projects/{project_id}/branches/{branch_id}/databases/{database_name}",
|
|
2787
|
+
...options,
|
|
2788
|
+
headers: {
|
|
2789
|
+
"Content-Type": "application/json",
|
|
2790
|
+
...options.headers
|
|
2791
|
+
}
|
|
2792
|
+
});
|
|
2793
|
+
/**
|
|
2794
|
+
* List roles
|
|
2795
|
+
*
|
|
2796
|
+
* Retrieves a list of Postgres roles from the specified branch.
|
|
2797
|
+
* For related information, see [Manage roles](https://neon.com/docs/manage/roles/).
|
|
2798
|
+
*
|
|
2799
|
+
*/
|
|
2800
|
+
const listProjectBranchRoles = (options) => (options.client ?? client).get({
|
|
2801
|
+
security: [
|
|
2802
|
+
{
|
|
2803
|
+
scheme: "bearer",
|
|
2804
|
+
type: "http"
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
in: "cookie",
|
|
2808
|
+
name: "zenith",
|
|
2809
|
+
type: "apiKey"
|
|
2810
|
+
},
|
|
2811
|
+
{
|
|
2812
|
+
in: "cookie",
|
|
2813
|
+
name: "keycloak_token",
|
|
2814
|
+
type: "apiKey"
|
|
2815
|
+
}
|
|
2816
|
+
],
|
|
2817
|
+
url: "/projects/{project_id}/branches/{branch_id}/roles",
|
|
2818
|
+
...options
|
|
2819
|
+
});
|
|
2820
|
+
/**
|
|
2821
|
+
* Create role
|
|
2822
|
+
*
|
|
2823
|
+
* Creates a Postgres role in the specified branch.
|
|
2824
|
+
* For related information, see [Manage roles](https://neon.com/docs/manage/roles/).
|
|
2825
|
+
*
|
|
2826
|
+
* Connections established to the active compute endpoint will be dropped.
|
|
2827
|
+
* If the compute endpoint is idle, the endpoint becomes active for a short period of time and is suspended afterward.
|
|
2828
|
+
*
|
|
2829
|
+
*/
|
|
2830
|
+
const createProjectBranchRole = (options) => (options.client ?? client).post({
|
|
2831
|
+
security: [
|
|
2832
|
+
{
|
|
2833
|
+
scheme: "bearer",
|
|
2834
|
+
type: "http"
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
in: "cookie",
|
|
2838
|
+
name: "zenith",
|
|
2839
|
+
type: "apiKey"
|
|
2840
|
+
},
|
|
2841
|
+
{
|
|
2842
|
+
in: "cookie",
|
|
2843
|
+
name: "keycloak_token",
|
|
2844
|
+
type: "apiKey"
|
|
2845
|
+
}
|
|
2846
|
+
],
|
|
2847
|
+
url: "/projects/{project_id}/branches/{branch_id}/roles",
|
|
2848
|
+
...options,
|
|
2849
|
+
headers: {
|
|
2850
|
+
"Content-Type": "application/json",
|
|
2851
|
+
...options.headers
|
|
2852
|
+
}
|
|
2853
|
+
});
|
|
2854
|
+
/**
|
|
2855
|
+
* Delete role
|
|
2856
|
+
*
|
|
2857
|
+
* Deletes the specified Postgres role from the branch.
|
|
2858
|
+
* For related information, see [Manage roles](https://neon.com/docs/manage/roles/).
|
|
2859
|
+
*
|
|
2860
|
+
*/
|
|
2861
|
+
const deleteProjectBranchRole = (options) => (options.client ?? client).delete({
|
|
2862
|
+
security: [
|
|
2863
|
+
{
|
|
2864
|
+
scheme: "bearer",
|
|
2865
|
+
type: "http"
|
|
2866
|
+
},
|
|
2867
|
+
{
|
|
2868
|
+
in: "cookie",
|
|
2869
|
+
name: "zenith",
|
|
2870
|
+
type: "apiKey"
|
|
2871
|
+
},
|
|
2872
|
+
{
|
|
2873
|
+
in: "cookie",
|
|
2874
|
+
name: "keycloak_token",
|
|
2875
|
+
type: "apiKey"
|
|
2876
|
+
}
|
|
2877
|
+
],
|
|
2878
|
+
url: "/projects/{project_id}/branches/{branch_id}/roles/{role_name}",
|
|
2879
|
+
...options
|
|
2880
|
+
});
|
|
2881
|
+
/**
|
|
2882
|
+
* Retrieve role details
|
|
2883
|
+
*
|
|
2884
|
+
* Retrieves details about the specified role.
|
|
2885
|
+
* In Neon, the terms "role" and "user" are synonymous.
|
|
2886
|
+
* For related information, see [Manage roles](https://neon.com/docs/manage/roles/).
|
|
2887
|
+
*
|
|
2888
|
+
*/
|
|
2889
|
+
const getProjectBranchRole = (options) => (options.client ?? client).get({
|
|
2890
|
+
security: [
|
|
2891
|
+
{
|
|
2892
|
+
scheme: "bearer",
|
|
2893
|
+
type: "http"
|
|
2894
|
+
},
|
|
2895
|
+
{
|
|
2896
|
+
in: "cookie",
|
|
2897
|
+
name: "zenith",
|
|
2898
|
+
type: "apiKey"
|
|
2899
|
+
},
|
|
2900
|
+
{
|
|
2901
|
+
in: "cookie",
|
|
2902
|
+
name: "keycloak_token",
|
|
2903
|
+
type: "apiKey"
|
|
2904
|
+
}
|
|
2905
|
+
],
|
|
2906
|
+
url: "/projects/{project_id}/branches/{branch_id}/roles/{role_name}",
|
|
2907
|
+
...options
|
|
2908
|
+
});
|
|
2909
|
+
/**
|
|
2910
|
+
* Retrieve role password
|
|
2911
|
+
*
|
|
2912
|
+
* Retrieves the password for the specified Postgres role, if possible.
|
|
2913
|
+
* For related information, see [Manage roles](https://neon.com/docs/manage/roles/).
|
|
2914
|
+
*
|
|
2915
|
+
*/
|
|
2916
|
+
const getProjectBranchRolePassword = (options) => (options.client ?? client).get({
|
|
2917
|
+
security: [
|
|
2918
|
+
{
|
|
2919
|
+
scheme: "bearer",
|
|
2920
|
+
type: "http"
|
|
2921
|
+
},
|
|
2922
|
+
{
|
|
2923
|
+
in: "cookie",
|
|
2924
|
+
name: "zenith",
|
|
2925
|
+
type: "apiKey"
|
|
2926
|
+
},
|
|
2927
|
+
{
|
|
2928
|
+
in: "cookie",
|
|
2929
|
+
name: "keycloak_token",
|
|
2930
|
+
type: "apiKey"
|
|
2931
|
+
}
|
|
2932
|
+
],
|
|
2933
|
+
url: "/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reveal_password",
|
|
2934
|
+
...options
|
|
2935
|
+
});
|
|
2936
|
+
/**
|
|
2937
|
+
* Reset role password
|
|
2938
|
+
*
|
|
2939
|
+
* Resets the password for the specified Postgres role.
|
|
2940
|
+
* Returns a new password and operations. The new password is ready to use when the last operation finishes.
|
|
2941
|
+
* The old password remains valid until last operation finishes.
|
|
2942
|
+
* Connections to the compute endpoint are dropped. If idle,
|
|
2943
|
+
* the compute endpoint becomes active for a short period of time.
|
|
2944
|
+
*
|
|
2945
|
+
* For related information, see [Manage roles](https://neon.com/docs/manage/roles/).
|
|
2946
|
+
*
|
|
2947
|
+
*/
|
|
2948
|
+
const resetProjectBranchRolePassword = (options) => (options.client ?? client).post({
|
|
2949
|
+
security: [
|
|
2950
|
+
{
|
|
2951
|
+
scheme: "bearer",
|
|
2952
|
+
type: "http"
|
|
2953
|
+
},
|
|
2954
|
+
{
|
|
2955
|
+
in: "cookie",
|
|
2956
|
+
name: "zenith",
|
|
2957
|
+
type: "apiKey"
|
|
2958
|
+
},
|
|
2959
|
+
{
|
|
2960
|
+
in: "cookie",
|
|
2961
|
+
name: "keycloak_token",
|
|
2962
|
+
type: "apiKey"
|
|
2963
|
+
}
|
|
2964
|
+
],
|
|
2965
|
+
url: "/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reset_password",
|
|
2966
|
+
...options
|
|
2967
|
+
});
|
|
2968
|
+
/**
|
|
2969
|
+
* List VPC endpoint restrictions
|
|
2970
|
+
*
|
|
2971
|
+
* Lists VPC endpoint restrictions for the specified Neon project.
|
|
2972
|
+
*
|
|
2973
|
+
*/
|
|
2974
|
+
const listProjectVpcEndpoints = (options) => (options.client ?? client).get({
|
|
2975
|
+
security: [
|
|
2976
|
+
{
|
|
2977
|
+
scheme: "bearer",
|
|
2978
|
+
type: "http"
|
|
2979
|
+
},
|
|
2980
|
+
{
|
|
2981
|
+
in: "cookie",
|
|
2982
|
+
name: "zenith",
|
|
2983
|
+
type: "apiKey"
|
|
2984
|
+
},
|
|
2985
|
+
{
|
|
2986
|
+
in: "cookie",
|
|
2987
|
+
name: "keycloak_token",
|
|
2988
|
+
type: "apiKey"
|
|
2989
|
+
}
|
|
2990
|
+
],
|
|
2991
|
+
url: "/projects/{project_id}/vpc_endpoints",
|
|
2992
|
+
...options
|
|
2993
|
+
});
|
|
2994
|
+
/**
|
|
2995
|
+
* Delete VPC endpoint restriction
|
|
2996
|
+
*
|
|
2997
|
+
* Removes the specified VPC endpoint restriction from a Neon project.
|
|
2998
|
+
*
|
|
2999
|
+
*/
|
|
3000
|
+
const deleteProjectVpcEndpoint = (options) => (options.client ?? client).delete({
|
|
3001
|
+
security: [
|
|
3002
|
+
{
|
|
3003
|
+
scheme: "bearer",
|
|
3004
|
+
type: "http"
|
|
3005
|
+
},
|
|
3006
|
+
{
|
|
3007
|
+
in: "cookie",
|
|
3008
|
+
name: "zenith",
|
|
3009
|
+
type: "apiKey"
|
|
3010
|
+
},
|
|
3011
|
+
{
|
|
3012
|
+
in: "cookie",
|
|
3013
|
+
name: "keycloak_token",
|
|
3014
|
+
type: "apiKey"
|
|
3015
|
+
}
|
|
3016
|
+
],
|
|
3017
|
+
url: "/projects/{project_id}/vpc_endpoints/{vpc_endpoint_id}",
|
|
3018
|
+
...options
|
|
3019
|
+
});
|
|
3020
|
+
/**
|
|
3021
|
+
* Set VPC endpoint restriction
|
|
3022
|
+
*
|
|
3023
|
+
* Sets or updates a VPC endpoint restriction for a Neon project.
|
|
3024
|
+
* When a VPC endpoint restriction is set, the project only accepts connections
|
|
3025
|
+
* from the specified VPC.
|
|
3026
|
+
* A VPC endpoint can be set as a restriction only after it is assigned to the
|
|
3027
|
+
* parent organization of the Neon project.
|
|
3028
|
+
*
|
|
3029
|
+
*/
|
|
3030
|
+
const assignProjectVpcEndpoint = (options) => (options.client ?? client).post({
|
|
3031
|
+
security: [
|
|
3032
|
+
{
|
|
3033
|
+
scheme: "bearer",
|
|
3034
|
+
type: "http"
|
|
3035
|
+
},
|
|
3036
|
+
{
|
|
3037
|
+
in: "cookie",
|
|
3038
|
+
name: "zenith",
|
|
3039
|
+
type: "apiKey"
|
|
3040
|
+
},
|
|
3041
|
+
{
|
|
3042
|
+
in: "cookie",
|
|
3043
|
+
name: "keycloak_token",
|
|
3044
|
+
type: "apiKey"
|
|
3045
|
+
}
|
|
3046
|
+
],
|
|
3047
|
+
url: "/projects/{project_id}/vpc_endpoints/{vpc_endpoint_id}",
|
|
3048
|
+
...options,
|
|
3049
|
+
headers: {
|
|
3050
|
+
"Content-Type": "application/json",
|
|
3051
|
+
...options.headers
|
|
3052
|
+
}
|
|
3053
|
+
});
|
|
3054
|
+
/**
|
|
3055
|
+
* List compute endpoints
|
|
3056
|
+
*
|
|
3057
|
+
* Retrieves a list of compute endpoints for the specified project.
|
|
3058
|
+
* A compute endpoint is a Neon compute instance.
|
|
3059
|
+
* For information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).
|
|
3060
|
+
*
|
|
3061
|
+
*/
|
|
3062
|
+
const listProjectEndpoints = (options) => (options.client ?? client).get({
|
|
3063
|
+
security: [
|
|
3064
|
+
{
|
|
3065
|
+
scheme: "bearer",
|
|
3066
|
+
type: "http"
|
|
3067
|
+
},
|
|
3068
|
+
{
|
|
3069
|
+
in: "cookie",
|
|
3070
|
+
name: "zenith",
|
|
3071
|
+
type: "apiKey"
|
|
3072
|
+
},
|
|
3073
|
+
{
|
|
3074
|
+
in: "cookie",
|
|
3075
|
+
name: "keycloak_token",
|
|
3076
|
+
type: "apiKey"
|
|
3077
|
+
}
|
|
3078
|
+
],
|
|
3079
|
+
url: "/projects/{project_id}/endpoints",
|
|
3080
|
+
...options
|
|
3081
|
+
});
|
|
3082
|
+
/**
|
|
3083
|
+
* Create compute endpoint
|
|
3084
|
+
*
|
|
3085
|
+
* Creates a compute endpoint for the specified branch.
|
|
3086
|
+
* A compute endpoint is a Neon compute instance.
|
|
3087
|
+
* There is a maximum of one read-write compute endpoint per branch.
|
|
3088
|
+
* If the specified branch already has a read-write compute endpoint, the operation fails.
|
|
3089
|
+
* A branch can have multiple read-only compute endpoints.
|
|
3090
|
+
*
|
|
3091
|
+
* For more information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).
|
|
3092
|
+
*
|
|
3093
|
+
*/
|
|
3094
|
+
const createProjectEndpoint = (options) => (options.client ?? client).post({
|
|
3095
|
+
security: [
|
|
3096
|
+
{
|
|
3097
|
+
scheme: "bearer",
|
|
3098
|
+
type: "http"
|
|
3099
|
+
},
|
|
3100
|
+
{
|
|
3101
|
+
in: "cookie",
|
|
3102
|
+
name: "zenith",
|
|
3103
|
+
type: "apiKey"
|
|
3104
|
+
},
|
|
3105
|
+
{
|
|
3106
|
+
in: "cookie",
|
|
3107
|
+
name: "keycloak_token",
|
|
3108
|
+
type: "apiKey"
|
|
3109
|
+
}
|
|
3110
|
+
],
|
|
3111
|
+
url: "/projects/{project_id}/endpoints",
|
|
3112
|
+
...options,
|
|
3113
|
+
headers: {
|
|
3114
|
+
"Content-Type": "application/json",
|
|
3115
|
+
...options.headers
|
|
3116
|
+
}
|
|
3117
|
+
});
|
|
3118
|
+
/**
|
|
3119
|
+
* Delete compute endpoint
|
|
3120
|
+
*
|
|
3121
|
+
* Deletes the specified compute endpoint.
|
|
3122
|
+
* A compute endpoint is a Neon compute instance.
|
|
3123
|
+
* Deleting a compute endpoint drops existing network connections to the compute endpoint.
|
|
3124
|
+
* The deletion is completed when the last operation in the chain finishes successfully.
|
|
3125
|
+
*
|
|
3126
|
+
* An `endpoint_id` has an `ep-` prefix.
|
|
3127
|
+
* For information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).
|
|
3128
|
+
*
|
|
3129
|
+
*/
|
|
3130
|
+
const deleteProjectEndpoint = (options) => (options.client ?? client).delete({
|
|
3131
|
+
security: [
|
|
3132
|
+
{
|
|
3133
|
+
scheme: "bearer",
|
|
3134
|
+
type: "http"
|
|
3135
|
+
},
|
|
3136
|
+
{
|
|
3137
|
+
in: "cookie",
|
|
3138
|
+
name: "zenith",
|
|
3139
|
+
type: "apiKey"
|
|
3140
|
+
},
|
|
3141
|
+
{
|
|
3142
|
+
in: "cookie",
|
|
3143
|
+
name: "keycloak_token",
|
|
3144
|
+
type: "apiKey"
|
|
3145
|
+
}
|
|
3146
|
+
],
|
|
3147
|
+
url: "/projects/{project_id}/endpoints/{endpoint_id}",
|
|
3148
|
+
...options
|
|
3149
|
+
});
|
|
3150
|
+
/**
|
|
3151
|
+
* Retrieve compute endpoint details
|
|
3152
|
+
*
|
|
3153
|
+
* Retrieves information about the specified compute endpoint.
|
|
3154
|
+
* A compute endpoint is a Neon compute instance.
|
|
3155
|
+
* An `endpoint_id` has an `ep-` prefix.
|
|
3156
|
+
* For information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).
|
|
3157
|
+
*
|
|
3158
|
+
*/
|
|
3159
|
+
const getProjectEndpoint = (options) => (options.client ?? client).get({
|
|
3160
|
+
security: [
|
|
3161
|
+
{
|
|
3162
|
+
scheme: "bearer",
|
|
3163
|
+
type: "http"
|
|
3164
|
+
},
|
|
3165
|
+
{
|
|
3166
|
+
in: "cookie",
|
|
3167
|
+
name: "zenith",
|
|
3168
|
+
type: "apiKey"
|
|
3169
|
+
},
|
|
3170
|
+
{
|
|
3171
|
+
in: "cookie",
|
|
3172
|
+
name: "keycloak_token",
|
|
3173
|
+
type: "apiKey"
|
|
3174
|
+
}
|
|
3175
|
+
],
|
|
3176
|
+
url: "/projects/{project_id}/endpoints/{endpoint_id}",
|
|
3177
|
+
...options
|
|
3178
|
+
});
|
|
3179
|
+
/**
|
|
3180
|
+
* Update compute endpoint
|
|
3181
|
+
*
|
|
3182
|
+
* Updates the specified compute endpoint.
|
|
3183
|
+
*
|
|
3184
|
+
* An `endpoint_id` has an `ep-` prefix. A `branch_id` has a `br-` prefix.
|
|
3185
|
+
* For more information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).
|
|
3186
|
+
*
|
|
3187
|
+
* If the returned list of operations is not empty, the compute endpoint is not ready to use.
|
|
3188
|
+
* The client must wait for the last operation to finish before using the compute endpoint.
|
|
3189
|
+
* If the compute endpoint was idle before the update, it becomes active for a short period of time,
|
|
3190
|
+
* and the control plane suspends it again after the update.
|
|
3191
|
+
*
|
|
3192
|
+
*/
|
|
3193
|
+
const updateProjectEndpoint = (options) => (options.client ?? client).patch({
|
|
3194
|
+
security: [
|
|
3195
|
+
{
|
|
3196
|
+
scheme: "bearer",
|
|
3197
|
+
type: "http"
|
|
3198
|
+
},
|
|
3199
|
+
{
|
|
3200
|
+
in: "cookie",
|
|
3201
|
+
name: "zenith",
|
|
3202
|
+
type: "apiKey"
|
|
3203
|
+
},
|
|
3204
|
+
{
|
|
3205
|
+
in: "cookie",
|
|
3206
|
+
name: "keycloak_token",
|
|
3207
|
+
type: "apiKey"
|
|
3208
|
+
}
|
|
3209
|
+
],
|
|
3210
|
+
url: "/projects/{project_id}/endpoints/{endpoint_id}",
|
|
3211
|
+
...options,
|
|
3212
|
+
headers: {
|
|
3213
|
+
"Content-Type": "application/json",
|
|
3214
|
+
...options.headers
|
|
3215
|
+
}
|
|
3216
|
+
});
|
|
3217
|
+
/**
|
|
3218
|
+
* Start compute endpoint
|
|
3219
|
+
*
|
|
3220
|
+
* Starts a compute endpoint.
|
|
3221
|
+
* The compute endpoint is ready to use after the last operation in the chain finishes successfully.
|
|
3222
|
+
*
|
|
3223
|
+
* An `endpoint_id` has an `ep-` prefix.
|
|
3224
|
+
* For information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).
|
|
3225
|
+
*
|
|
3226
|
+
*/
|
|
3227
|
+
const startProjectEndpoint = (options) => (options.client ?? client).post({
|
|
3228
|
+
security: [
|
|
3229
|
+
{
|
|
3230
|
+
scheme: "bearer",
|
|
3231
|
+
type: "http"
|
|
3232
|
+
},
|
|
3233
|
+
{
|
|
3234
|
+
in: "cookie",
|
|
3235
|
+
name: "zenith",
|
|
3236
|
+
type: "apiKey"
|
|
3237
|
+
},
|
|
3238
|
+
{
|
|
3239
|
+
in: "cookie",
|
|
3240
|
+
name: "keycloak_token",
|
|
3241
|
+
type: "apiKey"
|
|
3242
|
+
}
|
|
3243
|
+
],
|
|
3244
|
+
url: "/projects/{project_id}/endpoints/{endpoint_id}/start",
|
|
3245
|
+
...options
|
|
3246
|
+
});
|
|
3247
|
+
/**
|
|
3248
|
+
* Suspend compute endpoint
|
|
3249
|
+
*
|
|
3250
|
+
* Suspends the specified compute endpoint.
|
|
3251
|
+
* An `endpoint_id` has an `ep-` prefix.
|
|
3252
|
+
* For information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).
|
|
3253
|
+
*
|
|
3254
|
+
*/
|
|
3255
|
+
const suspendProjectEndpoint = (options) => (options.client ?? client).post({
|
|
3256
|
+
security: [
|
|
3257
|
+
{
|
|
3258
|
+
scheme: "bearer",
|
|
3259
|
+
type: "http"
|
|
3260
|
+
},
|
|
3261
|
+
{
|
|
3262
|
+
in: "cookie",
|
|
3263
|
+
name: "zenith",
|
|
3264
|
+
type: "apiKey"
|
|
3265
|
+
},
|
|
3266
|
+
{
|
|
3267
|
+
in: "cookie",
|
|
3268
|
+
name: "keycloak_token",
|
|
3269
|
+
type: "apiKey"
|
|
3270
|
+
}
|
|
3271
|
+
],
|
|
3272
|
+
url: "/projects/{project_id}/endpoints/{endpoint_id}/suspend",
|
|
3273
|
+
...options
|
|
3274
|
+
});
|
|
3275
|
+
/**
|
|
3276
|
+
* Restart compute endpoint
|
|
3277
|
+
*
|
|
3278
|
+
* Restarts the specified compute endpoint by immediately suspending it and then starting it again.
|
|
3279
|
+
* An `endpoint_id` has an `ep-` prefix.
|
|
3280
|
+
* For information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).
|
|
3281
|
+
*
|
|
3282
|
+
*/
|
|
3283
|
+
const restartProjectEndpoint = (options) => (options.client ?? client).post({
|
|
3284
|
+
security: [
|
|
3285
|
+
{
|
|
3286
|
+
scheme: "bearer",
|
|
3287
|
+
type: "http"
|
|
3288
|
+
},
|
|
3289
|
+
{
|
|
3290
|
+
in: "cookie",
|
|
3291
|
+
name: "zenith",
|
|
3292
|
+
type: "apiKey"
|
|
3293
|
+
},
|
|
3294
|
+
{
|
|
3295
|
+
in: "cookie",
|
|
3296
|
+
name: "keycloak_token",
|
|
3297
|
+
type: "apiKey"
|
|
3298
|
+
}
|
|
3299
|
+
],
|
|
3300
|
+
url: "/projects/{project_id}/endpoints/{endpoint_id}/restart",
|
|
3301
|
+
...options
|
|
3302
|
+
});
|
|
3303
|
+
/**
|
|
3304
|
+
* Retrieve project consumption metrics (legacy plans)
|
|
3305
|
+
*
|
|
3306
|
+
* Retrieves consumption metrics for Scale, Business, and Enterprise plan projects. History begins at the time of upgrade.
|
|
3307
|
+
* Results are ordered by time in ascending order (oldest to newest).
|
|
3308
|
+
* Issuing a call to this API does not wake a project's compute endpoint.
|
|
3309
|
+
*
|
|
3310
|
+
*/
|
|
3311
|
+
const getConsumptionHistoryPerProject = (options) => (options.client ?? client).get({
|
|
3312
|
+
security: [
|
|
3313
|
+
{
|
|
3314
|
+
scheme: "bearer",
|
|
3315
|
+
type: "http"
|
|
3316
|
+
},
|
|
3317
|
+
{
|
|
3318
|
+
in: "cookie",
|
|
3319
|
+
name: "zenith",
|
|
3320
|
+
type: "apiKey"
|
|
3321
|
+
},
|
|
3322
|
+
{
|
|
3323
|
+
in: "cookie",
|
|
3324
|
+
name: "keycloak_token",
|
|
3325
|
+
type: "apiKey"
|
|
3326
|
+
}
|
|
3327
|
+
],
|
|
3328
|
+
url: "/consumption_history/projects",
|
|
3329
|
+
...options
|
|
3330
|
+
});
|
|
3331
|
+
/**
|
|
3332
|
+
* Retrieve project consumption metrics
|
|
3333
|
+
*
|
|
3334
|
+
* Returns consumption metrics for up to `limit` projects per page. If `project_ids` is omitted,
|
|
3335
|
+
* projects in the organization are included across pages (use `cursor`). If `project_ids` is
|
|
3336
|
+
* provided, the response is limited to those projects (up to 100). Available for accounts on
|
|
3337
|
+
* Launch, Scale, Agent, Business, and Enterprise plans.
|
|
3338
|
+
*
|
|
3339
|
+
* History starts when the account upgrades to an eligible plan.
|
|
3340
|
+
*
|
|
3341
|
+
* The `metrics` query parameter is required. Supported values:
|
|
3342
|
+
* `compute_unit_seconds`, `root_branch_bytes_month`, `child_branch_bytes_month`,
|
|
3343
|
+
* `instant_restore_bytes_month`, `public_network_transfer_bytes`, `private_network_transfer_bytes`,
|
|
3344
|
+
* `extra_branches_month`, `snapshot_storage_bytes_month`.
|
|
3345
|
+
*
|
|
3346
|
+
* Consumption metrics within each project are returned in ascending time order (oldest first).
|
|
3347
|
+
* This request does not wake project computes.
|
|
3348
|
+
*
|
|
3349
|
+
*/
|
|
3350
|
+
const getConsumptionHistoryPerProjectV2 = (options) => (options.client ?? client).get({
|
|
3351
|
+
security: [
|
|
3352
|
+
{
|
|
3353
|
+
scheme: "bearer",
|
|
3354
|
+
type: "http"
|
|
3355
|
+
},
|
|
3356
|
+
{
|
|
3357
|
+
in: "cookie",
|
|
3358
|
+
name: "zenith",
|
|
3359
|
+
type: "apiKey"
|
|
3360
|
+
},
|
|
3361
|
+
{
|
|
3362
|
+
in: "cookie",
|
|
3363
|
+
name: "keycloak_token",
|
|
3364
|
+
type: "apiKey"
|
|
3365
|
+
}
|
|
3366
|
+
],
|
|
3367
|
+
url: "/consumption_history/v2/projects",
|
|
3368
|
+
...options
|
|
3369
|
+
});
|
|
3370
|
+
/**
|
|
3371
|
+
* Retrieve branch consumption metrics
|
|
3372
|
+
*
|
|
3373
|
+
* Returns consumption metrics for each branch across one or more projects listed in
|
|
3374
|
+
* `project_ids` (1 to 100 projects). Available for accounts on paid usage-based Launch, Scale,
|
|
3375
|
+
* Agent, and Enterprise plans.
|
|
3376
|
+
*
|
|
3377
|
+
* History starts when the account first ingests branch-level consumption data.
|
|
3378
|
+
*
|
|
3379
|
+
* The `metrics` query parameter is required. Only these six values are supported on this
|
|
3380
|
+
* endpoint:
|
|
3381
|
+
* `compute_unit_seconds`, `root_branch_bytes_month`, `child_branch_bytes_month`,
|
|
3382
|
+
* `instant_restore_bytes_month`, `public_network_transfer_bytes`, `private_network_transfer_bytes`.
|
|
3383
|
+
*
|
|
3384
|
+
* This endpoint does not support `extra_branches_month` or `snapshot_storage_bytes_month`.
|
|
3385
|
+
* Use `GET /consumption_history/v2/projects` for those.
|
|
3386
|
+
*
|
|
3387
|
+
* Consumption metrics within each branch are returned in ascending time order (oldest first).
|
|
3388
|
+
* This request does not wake project computes.
|
|
3389
|
+
*
|
|
3390
|
+
*/
|
|
3391
|
+
const getConsumptionHistoryPerBranchV2 = (options) => (options.client ?? client).get({
|
|
3392
|
+
security: [
|
|
3393
|
+
{
|
|
3394
|
+
scheme: "bearer",
|
|
3395
|
+
type: "http"
|
|
3396
|
+
},
|
|
3397
|
+
{
|
|
3398
|
+
in: "cookie",
|
|
3399
|
+
name: "zenith",
|
|
3400
|
+
type: "apiKey"
|
|
3401
|
+
},
|
|
3402
|
+
{
|
|
3403
|
+
in: "cookie",
|
|
3404
|
+
name: "keycloak_token",
|
|
3405
|
+
type: "apiKey"
|
|
3406
|
+
}
|
|
3407
|
+
],
|
|
3408
|
+
url: "/consumption_history/v2/branches",
|
|
3409
|
+
...options
|
|
3410
|
+
});
|
|
3411
|
+
/**
|
|
3412
|
+
* Retrieve organization details
|
|
3413
|
+
*
|
|
3414
|
+
* Retrieves details for the specified organization, including its name, plan, and configuration.
|
|
3415
|
+
*
|
|
3416
|
+
*/
|
|
3417
|
+
const getOrganization = (options) => (options.client ?? client).get({
|
|
3418
|
+
security: [
|
|
3419
|
+
{
|
|
3420
|
+
scheme: "bearer",
|
|
3421
|
+
type: "http"
|
|
3422
|
+
},
|
|
3423
|
+
{
|
|
3424
|
+
in: "cookie",
|
|
3425
|
+
name: "zenith",
|
|
3426
|
+
type: "apiKey"
|
|
3427
|
+
},
|
|
3428
|
+
{
|
|
3429
|
+
in: "cookie",
|
|
3430
|
+
name: "keycloak_token",
|
|
3431
|
+
type: "apiKey"
|
|
3432
|
+
}
|
|
3433
|
+
],
|
|
3434
|
+
url: "/organizations/{org_id}",
|
|
3435
|
+
...options
|
|
3436
|
+
});
|
|
3437
|
+
/**
|
|
3438
|
+
* List organization API keys
|
|
3439
|
+
*
|
|
3440
|
+
* Retrieves the API keys for the specified organization.
|
|
3441
|
+
* The response does not include API key tokens. A token is only provided when creating an API key.
|
|
3442
|
+
* API keys can also be managed in the Neon Console.
|
|
3443
|
+
* For more information, see [Manage API keys](https://neon.com/docs/manage/api-keys/).
|
|
3444
|
+
*
|
|
3445
|
+
*/
|
|
3446
|
+
const listOrgApiKeys = (options) => (options.client ?? client).get({
|
|
3447
|
+
security: [
|
|
3448
|
+
{
|
|
3449
|
+
scheme: "bearer",
|
|
3450
|
+
type: "http"
|
|
3451
|
+
},
|
|
3452
|
+
{
|
|
3453
|
+
in: "cookie",
|
|
3454
|
+
name: "zenith",
|
|
3455
|
+
type: "apiKey"
|
|
3456
|
+
},
|
|
3457
|
+
{
|
|
3458
|
+
in: "cookie",
|
|
3459
|
+
name: "keycloak_token",
|
|
3460
|
+
type: "apiKey"
|
|
3461
|
+
}
|
|
3462
|
+
],
|
|
3463
|
+
url: "/organizations/{org_id}/api_keys",
|
|
3464
|
+
...options
|
|
3465
|
+
});
|
|
3466
|
+
/**
|
|
3467
|
+
* Create organization API key
|
|
3468
|
+
*
|
|
3469
|
+
* Creates an API key for the specified organization.
|
|
3470
|
+
* The `key_name` is a user-specified name for the key.
|
|
3471
|
+
* Returns an `id` and `key`; the `key` is a randomly generated, 64-bit token required to access the Neon API.
|
|
3472
|
+
* Store the key securely — it is only returned once.
|
|
3473
|
+
* API keys can also be managed in the Neon Console.
|
|
3474
|
+
* See [Manage API keys](https://neon.com/docs/manage/api-keys/).
|
|
3475
|
+
*
|
|
3476
|
+
*/
|
|
3477
|
+
const createOrgApiKey = (options) => (options.client ?? client).post({
|
|
3478
|
+
security: [
|
|
3479
|
+
{
|
|
3480
|
+
scheme: "bearer",
|
|
3481
|
+
type: "http"
|
|
3482
|
+
},
|
|
3483
|
+
{
|
|
3484
|
+
in: "cookie",
|
|
3485
|
+
name: "zenith",
|
|
3486
|
+
type: "apiKey"
|
|
3487
|
+
},
|
|
3488
|
+
{
|
|
3489
|
+
in: "cookie",
|
|
3490
|
+
name: "keycloak_token",
|
|
3491
|
+
type: "apiKey"
|
|
3492
|
+
}
|
|
3493
|
+
],
|
|
3494
|
+
url: "/organizations/{org_id}/api_keys",
|
|
3495
|
+
...options,
|
|
3496
|
+
headers: {
|
|
3497
|
+
"Content-Type": "application/json",
|
|
3498
|
+
...options.headers
|
|
3499
|
+
}
|
|
3500
|
+
});
|
|
3501
|
+
/**
|
|
3502
|
+
* Revoke organization API key
|
|
3503
|
+
*
|
|
3504
|
+
* Revokes the specified organization API key.
|
|
3505
|
+
* An API key that is no longer needed can be revoked.
|
|
3506
|
+
* This action cannot be reversed.
|
|
3507
|
+
* API keys can also be managed in the Neon Console.
|
|
3508
|
+
* See [Manage API keys](https://neon.com/docs/manage/api-keys/).
|
|
3509
|
+
*
|
|
3510
|
+
*/
|
|
3511
|
+
const revokeOrgApiKey = (options) => (options.client ?? client).delete({
|
|
3512
|
+
security: [
|
|
3513
|
+
{
|
|
3514
|
+
scheme: "bearer",
|
|
3515
|
+
type: "http"
|
|
3516
|
+
},
|
|
3517
|
+
{
|
|
3518
|
+
in: "cookie",
|
|
3519
|
+
name: "zenith",
|
|
3520
|
+
type: "apiKey"
|
|
3521
|
+
},
|
|
3522
|
+
{
|
|
3523
|
+
in: "cookie",
|
|
3524
|
+
name: "keycloak_token",
|
|
3525
|
+
type: "apiKey"
|
|
3526
|
+
}
|
|
3527
|
+
],
|
|
3528
|
+
url: "/organizations/{org_id}/api_keys/{key_id}",
|
|
3529
|
+
...options
|
|
3530
|
+
});
|
|
3531
|
+
/**
|
|
3532
|
+
* Remove organization spending limit
|
|
3533
|
+
*
|
|
3534
|
+
* Removes the configured monthly spending limit for the specified organization.
|
|
3535
|
+
* Idempotent — removing an already-unset limit still succeeds.
|
|
3536
|
+
* Available to organization admins on Launch and Scale plans only.
|
|
3537
|
+
*
|
|
3538
|
+
*/
|
|
3539
|
+
const deleteOrganizationSpendingLimit = (options) => (options.client ?? client).delete({
|
|
3540
|
+
security: [
|
|
3541
|
+
{
|
|
3542
|
+
scheme: "bearer",
|
|
3543
|
+
type: "http"
|
|
3544
|
+
},
|
|
3545
|
+
{
|
|
3546
|
+
in: "cookie",
|
|
3547
|
+
name: "zenith",
|
|
3548
|
+
type: "apiKey"
|
|
3549
|
+
},
|
|
3550
|
+
{
|
|
3551
|
+
in: "cookie",
|
|
3552
|
+
name: "keycloak_token",
|
|
3553
|
+
type: "apiKey"
|
|
3554
|
+
}
|
|
3555
|
+
],
|
|
3556
|
+
url: "/organizations/{org_id}/billing/spending_limit",
|
|
3557
|
+
...options
|
|
3558
|
+
});
|
|
3559
|
+
/**
|
|
3560
|
+
* Retrieve organization spending limit
|
|
3561
|
+
*
|
|
3562
|
+
* Returns the configured monthly spending limit for the specified organization.
|
|
3563
|
+
* `spending_limit_cents: null` indicates that no limit is currently set.
|
|
3564
|
+
* Available to organization members with read access on Launch and Scale plans only.
|
|
3565
|
+
*
|
|
3566
|
+
*/
|
|
3567
|
+
const getOrganizationSpendingLimit = (options) => (options.client ?? client).get({
|
|
3568
|
+
security: [
|
|
3569
|
+
{
|
|
3570
|
+
scheme: "bearer",
|
|
3571
|
+
type: "http"
|
|
3572
|
+
},
|
|
3573
|
+
{
|
|
3574
|
+
in: "cookie",
|
|
3575
|
+
name: "zenith",
|
|
3576
|
+
type: "apiKey"
|
|
3577
|
+
},
|
|
3578
|
+
{
|
|
3579
|
+
in: "cookie",
|
|
3580
|
+
name: "keycloak_token",
|
|
3581
|
+
type: "apiKey"
|
|
3582
|
+
}
|
|
3583
|
+
],
|
|
3584
|
+
url: "/organizations/{org_id}/billing/spending_limit",
|
|
3585
|
+
...options
|
|
3586
|
+
});
|
|
3587
|
+
/**
|
|
3588
|
+
* Set organization spending limit
|
|
3589
|
+
*
|
|
3590
|
+
* Sets the monthly spending limit for the specified organization.
|
|
3591
|
+
* To remove a previously configured limit, send a DELETE request to this endpoint.
|
|
3592
|
+
* When a limit is configured, email notifications are sent at 80% and 100% of the limit.
|
|
3593
|
+
* Computes are not suspended when the limit is reached.
|
|
3594
|
+
* Available to organization admins on Launch and Scale plans only.
|
|
3595
|
+
*
|
|
3596
|
+
*/
|
|
3597
|
+
const setOrganizationSpendingLimit = (options) => (options.client ?? client).put({
|
|
3598
|
+
security: [
|
|
3599
|
+
{
|
|
3600
|
+
scheme: "bearer",
|
|
3601
|
+
type: "http"
|
|
3602
|
+
},
|
|
3603
|
+
{
|
|
3604
|
+
in: "cookie",
|
|
3605
|
+
name: "zenith",
|
|
3606
|
+
type: "apiKey"
|
|
3607
|
+
},
|
|
3608
|
+
{
|
|
3609
|
+
in: "cookie",
|
|
3610
|
+
name: "keycloak_token",
|
|
3611
|
+
type: "apiKey"
|
|
3612
|
+
}
|
|
3613
|
+
],
|
|
3614
|
+
url: "/organizations/{org_id}/billing/spending_limit",
|
|
3615
|
+
...options,
|
|
3616
|
+
headers: {
|
|
3617
|
+
"Content-Type": "application/json",
|
|
3618
|
+
...options.headers
|
|
3619
|
+
}
|
|
3620
|
+
});
|
|
3621
|
+
/**
|
|
3622
|
+
* List organization members
|
|
3623
|
+
*
|
|
3624
|
+
* Retrieves a paginated list of members for the specified organization.
|
|
3625
|
+
*
|
|
3626
|
+
*/
|
|
3627
|
+
const getOrganizationMembers = (options) => (options.client ?? client).get({
|
|
3628
|
+
security: [
|
|
3629
|
+
{
|
|
3630
|
+
scheme: "bearer",
|
|
3631
|
+
type: "http"
|
|
3632
|
+
},
|
|
3633
|
+
{
|
|
3634
|
+
in: "cookie",
|
|
3635
|
+
name: "zenith",
|
|
3636
|
+
type: "apiKey"
|
|
3637
|
+
},
|
|
3638
|
+
{
|
|
3639
|
+
in: "cookie",
|
|
3640
|
+
name: "keycloak_token",
|
|
3641
|
+
type: "apiKey"
|
|
3642
|
+
}
|
|
3643
|
+
],
|
|
3644
|
+
url: "/organizations/{org_id}/members",
|
|
3645
|
+
...options
|
|
3646
|
+
});
|
|
3647
|
+
/**
|
|
3648
|
+
* Remove organization member
|
|
3649
|
+
*
|
|
3650
|
+
* Removes the specified member from the organization.
|
|
3651
|
+
* Only organization admins can perform this action.
|
|
3652
|
+
* The last admin in an organization cannot be removed.
|
|
3653
|
+
*
|
|
3654
|
+
*/
|
|
3655
|
+
const removeOrganizationMember = (options) => (options.client ?? client).delete({
|
|
3656
|
+
security: [
|
|
3657
|
+
{
|
|
3658
|
+
scheme: "bearer",
|
|
3659
|
+
type: "http"
|
|
3660
|
+
},
|
|
3661
|
+
{
|
|
3662
|
+
in: "cookie",
|
|
3663
|
+
name: "zenith",
|
|
3664
|
+
type: "apiKey"
|
|
3665
|
+
},
|
|
3666
|
+
{
|
|
3667
|
+
in: "cookie",
|
|
3668
|
+
name: "keycloak_token",
|
|
3669
|
+
type: "apiKey"
|
|
3670
|
+
}
|
|
3671
|
+
],
|
|
3672
|
+
url: "/organizations/{org_id}/members/{member_id}",
|
|
3673
|
+
...options
|
|
3674
|
+
});
|
|
3675
|
+
/**
|
|
3676
|
+
* Retrieve organization member details
|
|
3677
|
+
*
|
|
3678
|
+
* Retrieves information about the specified organization member.
|
|
3679
|
+
*
|
|
3680
|
+
*/
|
|
3681
|
+
const getOrganizationMember = (options) => (options.client ?? client).get({
|
|
3682
|
+
security: [
|
|
3683
|
+
{
|
|
3684
|
+
scheme: "bearer",
|
|
3685
|
+
type: "http"
|
|
3686
|
+
},
|
|
3687
|
+
{
|
|
3688
|
+
in: "cookie",
|
|
3689
|
+
name: "zenith",
|
|
3690
|
+
type: "apiKey"
|
|
3691
|
+
},
|
|
3692
|
+
{
|
|
3693
|
+
in: "cookie",
|
|
3694
|
+
name: "keycloak_token",
|
|
3695
|
+
type: "apiKey"
|
|
3696
|
+
}
|
|
3697
|
+
],
|
|
3698
|
+
url: "/organizations/{org_id}/members/{member_id}",
|
|
3699
|
+
...options
|
|
3700
|
+
});
|
|
3701
|
+
/**
|
|
3702
|
+
* Update role for organization member
|
|
3703
|
+
*
|
|
3704
|
+
* Updates the role of an existing member in the specified organization.
|
|
3705
|
+
* The requested role must be valid for the organization.
|
|
3706
|
+
* Only organization admins can call this endpoint.
|
|
3707
|
+
*
|
|
3708
|
+
*/
|
|
3709
|
+
const updateOrganizationMember = (options) => (options.client ?? client).patch({
|
|
3710
|
+
security: [
|
|
3711
|
+
{
|
|
3712
|
+
scheme: "bearer",
|
|
3713
|
+
type: "http"
|
|
3714
|
+
},
|
|
3715
|
+
{
|
|
3716
|
+
in: "cookie",
|
|
3717
|
+
name: "zenith",
|
|
3718
|
+
type: "apiKey"
|
|
3719
|
+
},
|
|
3720
|
+
{
|
|
3721
|
+
in: "cookie",
|
|
3722
|
+
name: "keycloak_token",
|
|
3723
|
+
type: "apiKey"
|
|
3724
|
+
}
|
|
3725
|
+
],
|
|
3726
|
+
url: "/organizations/{org_id}/members/{member_id}",
|
|
3727
|
+
...options,
|
|
3728
|
+
headers: {
|
|
3729
|
+
"Content-Type": "application/json",
|
|
3730
|
+
...options.headers
|
|
3731
|
+
}
|
|
3732
|
+
});
|
|
3733
|
+
/**
|
|
3734
|
+
* List organization invitations
|
|
3735
|
+
*
|
|
3736
|
+
* Retrieves pending and accepted invitations for the specified organization.
|
|
3737
|
+
*
|
|
3738
|
+
*/
|
|
3739
|
+
const getOrganizationInvitations = (options) => (options.client ?? client).get({
|
|
3740
|
+
security: [
|
|
3741
|
+
{
|
|
3742
|
+
scheme: "bearer",
|
|
3743
|
+
type: "http"
|
|
3744
|
+
},
|
|
3745
|
+
{
|
|
3746
|
+
in: "cookie",
|
|
3747
|
+
name: "zenith",
|
|
3748
|
+
type: "apiKey"
|
|
3749
|
+
},
|
|
3750
|
+
{
|
|
3751
|
+
in: "cookie",
|
|
3752
|
+
name: "keycloak_token",
|
|
3753
|
+
type: "apiKey"
|
|
3754
|
+
}
|
|
3755
|
+
],
|
|
3756
|
+
url: "/organizations/{org_id}/invitations",
|
|
3757
|
+
...options
|
|
3758
|
+
});
|
|
3759
|
+
/**
|
|
3760
|
+
* Create organization invitations
|
|
3761
|
+
*
|
|
3762
|
+
* Creates invitations for a specific organization.
|
|
3763
|
+
* If the invited user has an existing account, they automatically join as a member.
|
|
3764
|
+
* If they don't yet have an account, they are invited to create one, after which they become a member.
|
|
3765
|
+
* Each invited user receives an email notification.
|
|
3766
|
+
*
|
|
3767
|
+
*/
|
|
3768
|
+
const createOrganizationInvitations = (options) => (options.client ?? client).post({
|
|
3769
|
+
security: [
|
|
3770
|
+
{
|
|
3771
|
+
scheme: "bearer",
|
|
3772
|
+
type: "http"
|
|
3773
|
+
},
|
|
3774
|
+
{
|
|
3775
|
+
in: "cookie",
|
|
3776
|
+
name: "zenith",
|
|
3777
|
+
type: "apiKey"
|
|
3778
|
+
},
|
|
3779
|
+
{
|
|
3780
|
+
in: "cookie",
|
|
3781
|
+
name: "keycloak_token",
|
|
3782
|
+
type: "apiKey"
|
|
3783
|
+
}
|
|
3784
|
+
],
|
|
3785
|
+
url: "/organizations/{org_id}/invitations",
|
|
3786
|
+
...options,
|
|
3787
|
+
headers: {
|
|
3788
|
+
"Content-Type": "application/json",
|
|
3789
|
+
...options.headers
|
|
3790
|
+
}
|
|
3791
|
+
});
|
|
3792
|
+
/**
|
|
3793
|
+
* Transfer projects between organizations
|
|
3794
|
+
*
|
|
3795
|
+
* Transfers selected projects, identified by their IDs, from your organization to another specified organization.
|
|
3796
|
+
*
|
|
3797
|
+
*/
|
|
3798
|
+
const transferProjectsFromOrgToOrg = (options) => (options.client ?? client).post({
|
|
3799
|
+
security: [
|
|
3800
|
+
{
|
|
3801
|
+
scheme: "bearer",
|
|
3802
|
+
type: "http"
|
|
3803
|
+
},
|
|
3804
|
+
{
|
|
3805
|
+
in: "cookie",
|
|
3806
|
+
name: "zenith",
|
|
3807
|
+
type: "apiKey"
|
|
3808
|
+
},
|
|
3809
|
+
{
|
|
3810
|
+
in: "cookie",
|
|
3811
|
+
name: "keycloak_token",
|
|
3812
|
+
type: "apiKey"
|
|
3813
|
+
}
|
|
3814
|
+
],
|
|
3815
|
+
url: "/organizations/{source_org_id}/projects/transfer",
|
|
3816
|
+
...options,
|
|
3817
|
+
headers: {
|
|
3818
|
+
"Content-Type": "application/json",
|
|
3819
|
+
...options.headers
|
|
3820
|
+
}
|
|
3821
|
+
});
|
|
3822
|
+
/**
|
|
3823
|
+
* List VPC endpoints across all regions
|
|
3824
|
+
*
|
|
3825
|
+
* Retrieves the list of VPC endpoints for the specified Neon organization across all regions.
|
|
3826
|
+
*
|
|
3827
|
+
*/
|
|
3828
|
+
const listOrganizationVpcEndpointsAllRegions = (options) => (options.client ?? client).get({
|
|
3829
|
+
security: [
|
|
3830
|
+
{
|
|
3831
|
+
scheme: "bearer",
|
|
3832
|
+
type: "http"
|
|
3833
|
+
},
|
|
3834
|
+
{
|
|
3835
|
+
in: "cookie",
|
|
3836
|
+
name: "zenith",
|
|
3837
|
+
type: "apiKey"
|
|
3838
|
+
},
|
|
3839
|
+
{
|
|
3840
|
+
in: "cookie",
|
|
3841
|
+
name: "keycloak_token",
|
|
3842
|
+
type: "apiKey"
|
|
3843
|
+
}
|
|
3844
|
+
],
|
|
3845
|
+
url: "/organizations/{org_id}/vpc/vpc_endpoints",
|
|
3846
|
+
...options
|
|
3847
|
+
});
|
|
3848
|
+
/**
|
|
3849
|
+
* List VPC endpoints
|
|
3850
|
+
*
|
|
3851
|
+
* Retrieves the list of VPC endpoints for the specified Neon organization.
|
|
3852
|
+
*
|
|
3853
|
+
*/
|
|
3854
|
+
const listOrganizationVpcEndpoints = (options) => (options.client ?? client).get({
|
|
3855
|
+
security: [
|
|
3856
|
+
{
|
|
3857
|
+
scheme: "bearer",
|
|
3858
|
+
type: "http"
|
|
3859
|
+
},
|
|
3860
|
+
{
|
|
3861
|
+
in: "cookie",
|
|
3862
|
+
name: "zenith",
|
|
3863
|
+
type: "apiKey"
|
|
3864
|
+
},
|
|
3865
|
+
{
|
|
3866
|
+
in: "cookie",
|
|
3867
|
+
name: "keycloak_token",
|
|
3868
|
+
type: "apiKey"
|
|
3869
|
+
}
|
|
3870
|
+
],
|
|
3871
|
+
url: "/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints",
|
|
3872
|
+
...options
|
|
3873
|
+
});
|
|
3874
|
+
/**
|
|
3875
|
+
* Delete VPC endpoint
|
|
3876
|
+
*
|
|
3877
|
+
* Deletes the VPC endpoint from the specified Neon organization.
|
|
3878
|
+
* If you delete a VPC endpoint from a Neon organization, that VPC endpoint cannot
|
|
3879
|
+
* be added back to the Neon organization.
|
|
3880
|
+
*
|
|
3881
|
+
*/
|
|
3882
|
+
const deleteOrganizationVpcEndpoint = (options) => (options.client ?? client).delete({
|
|
3883
|
+
security: [
|
|
3884
|
+
{
|
|
3885
|
+
scheme: "bearer",
|
|
3886
|
+
type: "http"
|
|
3887
|
+
},
|
|
3888
|
+
{
|
|
3889
|
+
in: "cookie",
|
|
3890
|
+
name: "zenith",
|
|
3891
|
+
type: "apiKey"
|
|
3892
|
+
},
|
|
3893
|
+
{
|
|
3894
|
+
in: "cookie",
|
|
3895
|
+
name: "keycloak_token",
|
|
3896
|
+
type: "apiKey"
|
|
3897
|
+
}
|
|
3898
|
+
],
|
|
3899
|
+
url: "/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}",
|
|
3900
|
+
...options
|
|
3901
|
+
});
|
|
3902
|
+
/**
|
|
3903
|
+
* Retrieve VPC endpoint details
|
|
3904
|
+
*
|
|
3905
|
+
* Retrieves the current state and configuration details of a specified VPC endpoint.
|
|
3906
|
+
*
|
|
3907
|
+
*/
|
|
3908
|
+
const getOrganizationVpcEndpointDetails = (options) => (options.client ?? client).get({
|
|
3909
|
+
security: [
|
|
3910
|
+
{
|
|
3911
|
+
scheme: "bearer",
|
|
3912
|
+
type: "http"
|
|
3913
|
+
},
|
|
3914
|
+
{
|
|
3915
|
+
in: "cookie",
|
|
3916
|
+
name: "zenith",
|
|
3917
|
+
type: "apiKey"
|
|
3918
|
+
},
|
|
3919
|
+
{
|
|
3920
|
+
in: "cookie",
|
|
3921
|
+
name: "keycloak_token",
|
|
3922
|
+
type: "apiKey"
|
|
3923
|
+
}
|
|
3924
|
+
],
|
|
3925
|
+
url: "/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}",
|
|
3926
|
+
...options
|
|
3927
|
+
});
|
|
3928
|
+
/**
|
|
3929
|
+
* Assign or update VPC endpoint
|
|
3930
|
+
*
|
|
3931
|
+
* Assigns a VPC endpoint to a Neon organization or updates its existing assignment.
|
|
3932
|
+
*
|
|
3933
|
+
*/
|
|
3934
|
+
const assignOrganizationVpcEndpoint = (options) => (options.client ?? client).post({
|
|
3935
|
+
security: [
|
|
3936
|
+
{
|
|
3937
|
+
scheme: "bearer",
|
|
3938
|
+
type: "http"
|
|
3939
|
+
},
|
|
3940
|
+
{
|
|
3941
|
+
in: "cookie",
|
|
3942
|
+
name: "zenith",
|
|
3943
|
+
type: "apiKey"
|
|
3944
|
+
},
|
|
3945
|
+
{
|
|
3946
|
+
in: "cookie",
|
|
3947
|
+
name: "keycloak_token",
|
|
3948
|
+
type: "apiKey"
|
|
3949
|
+
}
|
|
3950
|
+
],
|
|
3951
|
+
url: "/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}",
|
|
3952
|
+
...options,
|
|
3953
|
+
headers: {
|
|
3954
|
+
"Content-Type": "application/json",
|
|
3955
|
+
...options.headers
|
|
3956
|
+
}
|
|
3957
|
+
});
|
|
3958
|
+
/**
|
|
3959
|
+
* List supported regions
|
|
3960
|
+
*
|
|
3961
|
+
* Lists supported Neon regions.
|
|
3962
|
+
*
|
|
3963
|
+
* **Note:** Not all regions are available to all organizations. Pass the `org_id`
|
|
3964
|
+
* parameter to get an accurate list of regions available to your organization.
|
|
3965
|
+
*
|
|
3966
|
+
*/
|
|
3967
|
+
const getActiveRegions = (options) => (options?.client ?? client).get({
|
|
3968
|
+
security: [
|
|
3969
|
+
{
|
|
3970
|
+
scheme: "bearer",
|
|
3971
|
+
type: "http"
|
|
3972
|
+
},
|
|
3973
|
+
{
|
|
3974
|
+
in: "cookie",
|
|
3975
|
+
name: "zenith",
|
|
3976
|
+
type: "apiKey"
|
|
3977
|
+
},
|
|
3978
|
+
{
|
|
3979
|
+
in: "cookie",
|
|
3980
|
+
name: "keycloak_token",
|
|
3981
|
+
type: "apiKey"
|
|
3982
|
+
}
|
|
3983
|
+
],
|
|
3984
|
+
url: "/regions",
|
|
3985
|
+
...options
|
|
3986
|
+
});
|
|
3987
|
+
/**
|
|
3988
|
+
* Retrieve current user details
|
|
3989
|
+
*
|
|
3990
|
+
* Retrieves information about the currently authenticated Neon user,
|
|
3991
|
+
* including account identifiers, plan details, and linked auth accounts.
|
|
3992
|
+
*
|
|
3993
|
+
*/
|
|
3994
|
+
const getCurrentUserInfo = (options) => (options?.client ?? client).get({
|
|
3995
|
+
security: [
|
|
3996
|
+
{
|
|
3997
|
+
scheme: "bearer",
|
|
3998
|
+
type: "http"
|
|
3999
|
+
},
|
|
4000
|
+
{
|
|
4001
|
+
in: "cookie",
|
|
4002
|
+
name: "zenith",
|
|
4003
|
+
type: "apiKey"
|
|
4004
|
+
},
|
|
4005
|
+
{
|
|
4006
|
+
in: "cookie",
|
|
4007
|
+
name: "keycloak_token",
|
|
4008
|
+
type: "apiKey"
|
|
4009
|
+
}
|
|
4010
|
+
],
|
|
4011
|
+
url: "/users/me",
|
|
4012
|
+
...options
|
|
4013
|
+
});
|
|
4014
|
+
/**
|
|
4015
|
+
* List organizations for the current user
|
|
4016
|
+
*
|
|
4017
|
+
* Retrieves the organizations that the currently authenticated user belongs to.
|
|
4018
|
+
*
|
|
4019
|
+
*/
|
|
4020
|
+
const getCurrentUserOrganizations = (options) => (options?.client ?? client).get({
|
|
4021
|
+
security: [
|
|
4022
|
+
{
|
|
4023
|
+
scheme: "bearer",
|
|
4024
|
+
type: "http"
|
|
4025
|
+
},
|
|
4026
|
+
{
|
|
4027
|
+
in: "cookie",
|
|
4028
|
+
name: "zenith",
|
|
4029
|
+
type: "apiKey"
|
|
4030
|
+
},
|
|
4031
|
+
{
|
|
4032
|
+
in: "cookie",
|
|
4033
|
+
name: "keycloak_token",
|
|
4034
|
+
type: "apiKey"
|
|
4035
|
+
}
|
|
4036
|
+
],
|
|
4037
|
+
url: "/users/me/organizations",
|
|
4038
|
+
...options
|
|
4039
|
+
});
|
|
4040
|
+
/**
|
|
4041
|
+
* Transfer projects from personal account to organization
|
|
4042
|
+
*
|
|
4043
|
+
* DEPRECATED. Personal accounts have been migrated to organizations, making this operation no longer applicable.
|
|
4044
|
+
*
|
|
4045
|
+
*
|
|
4046
|
+
* @deprecated
|
|
4047
|
+
*/
|
|
4048
|
+
const transferProjectsFromUserToOrg = (options) => (options.client ?? client).post({
|
|
4049
|
+
security: [
|
|
4050
|
+
{
|
|
4051
|
+
scheme: "bearer",
|
|
4052
|
+
type: "http"
|
|
4053
|
+
},
|
|
4054
|
+
{
|
|
4055
|
+
in: "cookie",
|
|
4056
|
+
name: "zenith",
|
|
4057
|
+
type: "apiKey"
|
|
4058
|
+
},
|
|
4059
|
+
{
|
|
4060
|
+
in: "cookie",
|
|
4061
|
+
name: "keycloak_token",
|
|
4062
|
+
type: "apiKey"
|
|
4063
|
+
}
|
|
4064
|
+
],
|
|
4065
|
+
url: "/users/me/projects/transfer",
|
|
4066
|
+
...options,
|
|
4067
|
+
headers: {
|
|
4068
|
+
"Content-Type": "application/json",
|
|
4069
|
+
...options.headers
|
|
4070
|
+
}
|
|
4071
|
+
});
|
|
4072
|
+
/**
|
|
4073
|
+
* Retrieve request authentication details
|
|
4074
|
+
*
|
|
4075
|
+
* Returns authentication details for the credentials used in the request,
|
|
4076
|
+
* including the credential type (API key, Bearer token, or OAuth session)
|
|
4077
|
+
* and the associated identity.
|
|
4078
|
+
*
|
|
4079
|
+
*/
|
|
4080
|
+
const getAuthDetails = (options) => (options?.client ?? client).get({
|
|
4081
|
+
security: [
|
|
4082
|
+
{
|
|
4083
|
+
scheme: "bearer",
|
|
4084
|
+
type: "http"
|
|
4085
|
+
},
|
|
4086
|
+
{
|
|
4087
|
+
in: "cookie",
|
|
4088
|
+
name: "zenith",
|
|
4089
|
+
type: "apiKey"
|
|
4090
|
+
},
|
|
4091
|
+
{
|
|
4092
|
+
in: "cookie",
|
|
4093
|
+
name: "keycloak_token",
|
|
4094
|
+
type: "apiKey"
|
|
4095
|
+
}
|
|
4096
|
+
],
|
|
4097
|
+
url: "/auth",
|
|
4098
|
+
...options
|
|
4099
|
+
});
|
|
4100
|
+
/**
|
|
4101
|
+
* Create snapshot
|
|
4102
|
+
*
|
|
4103
|
+
* Creates a snapshot from the specified branch.
|
|
4104
|
+
* This operation may initiate an asynchronous process.
|
|
4105
|
+
*
|
|
4106
|
+
* **Note**: This endpoint is currently in Beta.
|
|
4107
|
+
*
|
|
4108
|
+
*/
|
|
4109
|
+
const createSnapshot = (options) => (options.client ?? client).post({
|
|
4110
|
+
security: [
|
|
4111
|
+
{
|
|
4112
|
+
scheme: "bearer",
|
|
4113
|
+
type: "http"
|
|
4114
|
+
},
|
|
4115
|
+
{
|
|
4116
|
+
in: "cookie",
|
|
4117
|
+
name: "zenith",
|
|
4118
|
+
type: "apiKey"
|
|
4119
|
+
},
|
|
4120
|
+
{
|
|
4121
|
+
in: "cookie",
|
|
4122
|
+
name: "keycloak_token",
|
|
4123
|
+
type: "apiKey"
|
|
4124
|
+
}
|
|
4125
|
+
],
|
|
4126
|
+
url: "/projects/{project_id}/branches/{branch_id}/snapshot",
|
|
4127
|
+
...options
|
|
4128
|
+
});
|
|
4129
|
+
/**
|
|
4130
|
+
* List project snapshots
|
|
4131
|
+
*
|
|
4132
|
+
* Lists the snapshots for the specified project.
|
|
4133
|
+
* Each snapshot represents a point-in-time backup of the project data.
|
|
4134
|
+
*
|
|
4135
|
+
* **Note**: This endpoint is currently in Beta.
|
|
4136
|
+
*
|
|
4137
|
+
*/
|
|
4138
|
+
const listSnapshots = (options) => (options.client ?? client).get({
|
|
4139
|
+
security: [
|
|
4140
|
+
{
|
|
4141
|
+
scheme: "bearer",
|
|
4142
|
+
type: "http"
|
|
4143
|
+
},
|
|
4144
|
+
{
|
|
4145
|
+
in: "cookie",
|
|
4146
|
+
name: "zenith",
|
|
4147
|
+
type: "apiKey"
|
|
4148
|
+
},
|
|
4149
|
+
{
|
|
4150
|
+
in: "cookie",
|
|
4151
|
+
name: "keycloak_token",
|
|
4152
|
+
type: "apiKey"
|
|
4153
|
+
}
|
|
4154
|
+
],
|
|
4155
|
+
url: "/projects/{project_id}/snapshots",
|
|
4156
|
+
...options
|
|
4157
|
+
});
|
|
4158
|
+
/**
|
|
4159
|
+
* Delete snapshot
|
|
4160
|
+
*
|
|
4161
|
+
* Deletes the specified snapshot.
|
|
4162
|
+
*
|
|
4163
|
+
* **Note**: This endpoint is currently in Beta.
|
|
4164
|
+
*
|
|
4165
|
+
*/
|
|
4166
|
+
const deleteSnapshot = (options) => (options.client ?? client).delete({
|
|
4167
|
+
security: [
|
|
4168
|
+
{
|
|
4169
|
+
scheme: "bearer",
|
|
4170
|
+
type: "http"
|
|
4171
|
+
},
|
|
4172
|
+
{
|
|
4173
|
+
in: "cookie",
|
|
4174
|
+
name: "zenith",
|
|
4175
|
+
type: "apiKey"
|
|
4176
|
+
},
|
|
4177
|
+
{
|
|
4178
|
+
in: "cookie",
|
|
4179
|
+
name: "keycloak_token",
|
|
4180
|
+
type: "apiKey"
|
|
4181
|
+
}
|
|
4182
|
+
],
|
|
4183
|
+
url: "/projects/{project_id}/snapshots/{snapshot_id}",
|
|
4184
|
+
...options
|
|
4185
|
+
});
|
|
4186
|
+
/**
|
|
4187
|
+
* Update snapshot
|
|
4188
|
+
*
|
|
4189
|
+
* Updates the specified snapshot.
|
|
4190
|
+
*
|
|
4191
|
+
* **Note**: This endpoint is currently in Beta.
|
|
4192
|
+
*
|
|
4193
|
+
*/
|
|
4194
|
+
const updateSnapshot = (options) => (options.client ?? client).patch({
|
|
4195
|
+
security: [
|
|
4196
|
+
{
|
|
4197
|
+
scheme: "bearer",
|
|
4198
|
+
type: "http"
|
|
4199
|
+
},
|
|
4200
|
+
{
|
|
4201
|
+
in: "cookie",
|
|
4202
|
+
name: "zenith",
|
|
4203
|
+
type: "apiKey"
|
|
4204
|
+
},
|
|
4205
|
+
{
|
|
4206
|
+
in: "cookie",
|
|
4207
|
+
name: "keycloak_token",
|
|
4208
|
+
type: "apiKey"
|
|
4209
|
+
}
|
|
4210
|
+
],
|
|
4211
|
+
url: "/projects/{project_id}/snapshots/{snapshot_id}",
|
|
4212
|
+
...options,
|
|
4213
|
+
headers: {
|
|
4214
|
+
"Content-Type": "application/json",
|
|
4215
|
+
...options.headers
|
|
4216
|
+
}
|
|
4217
|
+
});
|
|
4218
|
+
/**
|
|
4219
|
+
* Restore snapshot
|
|
4220
|
+
*
|
|
4221
|
+
* Restores the specified snapshot to a new branch,
|
|
4222
|
+
* and optionally finalizes the restore operation to replace the original branch.
|
|
4223
|
+
*
|
|
4224
|
+
* **Note**: This endpoint is currently in Beta.
|
|
4225
|
+
*
|
|
4226
|
+
*/
|
|
4227
|
+
const restoreSnapshot = (options) => (options.client ?? client).post({
|
|
4228
|
+
security: [
|
|
4229
|
+
{
|
|
4230
|
+
scheme: "bearer",
|
|
4231
|
+
type: "http"
|
|
4232
|
+
},
|
|
4233
|
+
{
|
|
4234
|
+
in: "cookie",
|
|
4235
|
+
name: "zenith",
|
|
4236
|
+
type: "apiKey"
|
|
4237
|
+
},
|
|
4238
|
+
{
|
|
4239
|
+
in: "cookie",
|
|
4240
|
+
name: "keycloak_token",
|
|
4241
|
+
type: "apiKey"
|
|
4242
|
+
}
|
|
4243
|
+
],
|
|
4244
|
+
url: "/projects/{project_id}/snapshots/{snapshot_id}/restore",
|
|
4245
|
+
...options,
|
|
4246
|
+
headers: {
|
|
4247
|
+
"Content-Type": "application/json",
|
|
4248
|
+
...options.headers
|
|
4249
|
+
}
|
|
4250
|
+
});
|
|
4251
|
+
/**
|
|
4252
|
+
* Retrieve backup schedule
|
|
4253
|
+
*
|
|
4254
|
+
* Returns the backup schedule for the specified branch, including the configured snapshot frequencies.
|
|
4255
|
+
*
|
|
4256
|
+
* **Note**: This endpoint is currently in Beta.
|
|
4257
|
+
*
|
|
4258
|
+
*/
|
|
4259
|
+
const getSnapshotSchedule = (options) => (options.client ?? client).get({
|
|
4260
|
+
security: [
|
|
4261
|
+
{
|
|
4262
|
+
scheme: "bearer",
|
|
4263
|
+
type: "http"
|
|
4264
|
+
},
|
|
4265
|
+
{
|
|
4266
|
+
in: "cookie",
|
|
4267
|
+
name: "zenith",
|
|
4268
|
+
type: "apiKey"
|
|
4269
|
+
},
|
|
4270
|
+
{
|
|
4271
|
+
in: "cookie",
|
|
4272
|
+
name: "keycloak_token",
|
|
4273
|
+
type: "apiKey"
|
|
4274
|
+
}
|
|
4275
|
+
],
|
|
4276
|
+
url: "/projects/{project_id}/branches/{branch_id}/backup_schedule",
|
|
4277
|
+
...options
|
|
4278
|
+
});
|
|
4279
|
+
/**
|
|
4280
|
+
* Update backup schedule
|
|
4281
|
+
*
|
|
4282
|
+
* Updates the backup schedule for the specified branch.
|
|
4283
|
+
* The schedule defines how often automatic snapshots are created (e.g., `hourly`, `daily`).
|
|
4284
|
+
*
|
|
4285
|
+
* **Note**: This endpoint is currently in Beta.
|
|
4286
|
+
*
|
|
4287
|
+
*/
|
|
4288
|
+
const setSnapshotSchedule = (options) => (options.client ?? client).put({
|
|
4289
|
+
security: [
|
|
4290
|
+
{
|
|
4291
|
+
scheme: "bearer",
|
|
4292
|
+
type: "http"
|
|
4293
|
+
},
|
|
4294
|
+
{
|
|
4295
|
+
in: "cookie",
|
|
4296
|
+
name: "zenith",
|
|
4297
|
+
type: "apiKey"
|
|
4298
|
+
},
|
|
4299
|
+
{
|
|
4300
|
+
in: "cookie",
|
|
4301
|
+
name: "keycloak_token",
|
|
4302
|
+
type: "apiKey"
|
|
4303
|
+
}
|
|
4304
|
+
],
|
|
4305
|
+
url: "/projects/{project_id}/branches/{branch_id}/backup_schedule",
|
|
4306
|
+
...options,
|
|
4307
|
+
headers: {
|
|
4308
|
+
"Content-Type": "application/json",
|
|
4309
|
+
...options.headers
|
|
4310
|
+
}
|
|
4311
|
+
});
|
|
4312
|
+
//#endregion
|
|
4313
|
+
export { acceptProjectTransferRequest, addBranchNeonAuthOauthProvider, addBranchNeonAuthTrustedDomain, addNeonAuthDomainToRedirectUriWhitelist, addNeonAuthOauthProvider, addProjectJwks, assignOrganizationVpcEndpoint, assignProjectVpcEndpoint, countProjectBranches, createApiKey, createBranchNeonAuthNewUser, createNeonAuth, createNeonAuthIntegration, createNeonAuthNewUser, createNeonAuthProviderSdkKeys, createOrgApiKey, createOrganizationInvitations, createProject, createProjectBranch, createProjectBranchAnonymized, createProjectBranchDataApi, createProjectBranchDatabase, createProjectBranchRole, createProjectEndpoint, createProjectTransferRequest, createSnapshot, deleteBranchNeonAuthOauthProvider, deleteBranchNeonAuthTrustedDomain, deleteBranchNeonAuthUser, deleteNeonAuthDomainFromRedirectUriWhitelist, deleteNeonAuthIntegration, deleteNeonAuthOauthProvider, deleteNeonAuthUser, deleteOrganizationSpendingLimit, deleteOrganizationVpcEndpoint, deleteProject, deleteProjectBranch, deleteProjectBranchDataApi, deleteProjectBranchDatabase, deleteProjectBranchRole, deleteProjectEndpoint, deleteProjectJwks, deleteProjectVpcEndpoint, deleteSnapshot, disableNeonAuth, finalizeRestoreBranch, getActiveRegions, getAnonymizedBranchStatus, getAuthDetails, getAvailablePreloadLibraries, getConnectionUri, getConsumptionHistoryPerBranchV2, getConsumptionHistoryPerProject, getConsumptionHistoryPerProjectV2, getCurrentUserInfo, getCurrentUserOrganizations, getMaskingRules, getNeonAuth, getNeonAuthAllowLocalhost, getNeonAuthEmailAndPasswordConfig, getNeonAuthEmailProvider, getNeonAuthEmailServer, getNeonAuthPhoneNumberPlugin, getNeonAuthPluginConfigs, getNeonAuthWebhookConfig, getOrganization, getOrganizationInvitations, getOrganizationMember, getOrganizationMembers, getOrganizationSpendingLimit, getOrganizationVpcEndpointDetails, getProject, getProjectAdvisorSecurityIssues, getProjectBranch, getProjectBranchDataApi, getProjectBranchDatabase, getProjectBranchRole, getProjectBranchRolePassword, getProjectBranchSchema, getProjectBranchSchemaComparison, getProjectEndpoint, getProjectJwks, getProjectOperation, getSnapshotSchedule, grantPermissionToProject, listApiKeys, listBranchNeonAuthOauthProviders, listBranchNeonAuthTrustedDomains, listNeonAuthIntegrations, listNeonAuthOauthProviders, listNeonAuthRedirectUriWhitelistDomains, listOrgApiKeys, listOrganizationVpcEndpoints, listOrganizationVpcEndpointsAllRegions, listProjectBranchDatabases, listProjectBranchEndpoints, listProjectBranchRoles, listProjectBranches, listProjectEndpoints, listProjectOperations, listProjectPermissions, listProjectVpcEndpoints, listProjects, listSharedProjects, listSnapshots, recoverProject, removeOrganizationMember, resetProjectBranchRolePassword, restartProjectEndpoint, restoreProjectBranch, restoreSnapshot, revokeApiKey, revokeOrgApiKey, revokePermissionFromProject, sendNeonAuthTestEmail, setDefaultProjectBranch, setOrganizationSpendingLimit, setSnapshotSchedule, startAnonymization, startProjectEndpoint, suspendProjectEndpoint, transferNeonAuthProviderProject, transferProjectsFromOrgToOrg, transferProjectsFromUserToOrg, updateBranchNeonAuthOauthProvider, updateMaskingRules, updateNeonAuthAllowLocalhost, updateNeonAuthConfig, updateNeonAuthEmailAndPasswordConfig, updateNeonAuthEmailProvider, updateNeonAuthEmailServer, updateNeonAuthMagicLinkPlugin, updateNeonAuthOauthProvider, updateNeonAuthOrganizationPlugin, updateNeonAuthPhoneNumberPlugin, updateNeonAuthUserRole, updateNeonAuthWebhookConfig, updateOrganizationMember, updateProject, updateProjectBranch, updateProjectBranchDataApi, updateProjectBranchDatabase, updateProjectEndpoint, updateSnapshot };
|
|
4314
|
+
|
|
4315
|
+
//# sourceMappingURL=sdk.gen.js.map
|