@neon/tools 0.0.0 → 0.3.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 +202 -0
- package/README.md +306 -1
- package/dist/eve.d.ts +19 -0
- package/dist/eve.d.ts.map +1 -0
- package/dist/eve.js +9 -0
- package/dist/generated/zod.gen.d.ts +6018 -0
- package/dist/generated/zod.gen.d.ts.map +1 -0
- package/dist/generated/zod.gen.js +2394 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +62 -0
- package/dist/lib/auth.d.ts +5 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +15 -0
- package/dist/lib/binary.d.ts +7 -0
- package/dist/lib/binary.d.ts.map +1 -0
- package/dist/lib/binary.js +19 -0
- package/dist/lib/customize.d.ts +52 -0
- package/dist/lib/customize.d.ts.map +1 -0
- package/dist/lib/customize.js +158 -0
- package/dist/lib/envelope.d.ts +5 -0
- package/dist/lib/envelope.d.ts.map +1 -0
- package/dist/lib/envelope.js +22 -0
- package/dist/lib/operation.d.ts +56 -0
- package/dist/lib/operation.d.ts.map +1 -0
- package/dist/lib/operation.js +30 -0
- package/dist/lib/result.d.ts +3 -0
- package/dist/lib/result.d.ts.map +1 -0
- package/dist/lib/result.js +18 -0
- package/dist/mastra.d.ts +32 -0
- package/dist/mastra.d.ts.map +1 -0
- package/dist/mastra.js +19 -0
- package/dist/mcp-v1.d.ts +3 -0
- package/dist/mcp-v1.d.ts.map +1 -0
- package/dist/mcp-v1.js +2 -0
- package/dist/mcp.d.ts +14 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +60 -0
- package/dist/operations.gen.d.ts +4437 -0
- package/dist/operations.gen.d.ts.map +1 -0
- package/dist/operations.gen.js +5951 -0
- package/dist/schemas.d.ts +2 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +2 -0
- package/package.json +100 -3
|
@@ -0,0 +1,2394 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
//#region src/generated/zod.gen.ts
|
|
3
|
+
const zComputeUnit = z.number().gte(.25);
|
|
4
|
+
const zProvisioner = z.string();
|
|
5
|
+
/**
|
|
6
|
+
* Cursor-based pagination. The `cursor` value reflects the endpoint's sort field (for example, an ID or timestamp), so pass it back unchanged.
|
|
7
|
+
*/
|
|
8
|
+
const zPagination = z.strictObject({ cursor: z.string().min(1).register(z.globalRegistry, { description: "Cursor marking the last item in this response. Pass it unchanged as the `cursor` query parameter to fetch the next page." }) }).register(z.globalRegistry, { description: "Cursor-based pagination. The `cursor` value reflects the endpoint's sort field (for example, an ID or timestamp), so pass it back unchanged." });
|
|
9
|
+
const zPaginationResponse = z.strictObject({ pagination: zPagination.optional() });
|
|
10
|
+
/**
|
|
11
|
+
* Empty response.
|
|
12
|
+
*/
|
|
13
|
+
const zEmptyResponse = z.record(z.string(), z.unknown()).register(z.globalRegistry, { description: "Empty response." });
|
|
14
|
+
const zPlanVersion = z.strictObject({
|
|
15
|
+
major: z.int(),
|
|
16
|
+
minor: z.int()
|
|
17
|
+
});
|
|
18
|
+
const zPlanDetails = z.strictObject({
|
|
19
|
+
name: z.string().register(z.globalRegistry, { description: "Plan name, for example `free`, `launch`, or `scale`." }),
|
|
20
|
+
version: zPlanVersion.optional()
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Add a new JWKS to a specific endpoint of a project
|
|
24
|
+
*/
|
|
25
|
+
const zAddProjectJwksRequest = z.strictObject({
|
|
26
|
+
jwks_url: z.string().register(z.globalRegistry, { description: "URL of the provider's JWKS endpoint used to verify JWTs." }),
|
|
27
|
+
provider_name: z.string().register(z.globalRegistry, { description: "The name of the authentication provider (e.g., Clerk, Stytch, Auth0)" }),
|
|
28
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`." }).optional(),
|
|
29
|
+
jwt_audience: z.string().register(z.globalRegistry, { description: "Expected `aud` claim in incoming JWTs. When set, tokens with a different audience are rejected; tokens with no audience are still accepted. Omit to skip audience validation." }).optional(),
|
|
30
|
+
role_names: z.array(z.string()).min(0).max(10).register(z.globalRegistry, { description: "Deprecated. The roles the JWKS should be mapped to. By default, the JWKS is mapped to the `authenticator`, `authenticated`, and `anonymous` roles." }).optional(),
|
|
31
|
+
skip_role_creation: z.boolean().register(z.globalRegistry, { description: "Deprecated. Only used with Neon RLS. If true, role creation is skipped." }).optional()
|
|
32
|
+
}).register(z.globalRegistry, { description: "Add a new JWKS to a specific endpoint of a project" });
|
|
33
|
+
const zJwks = z.strictObject({
|
|
34
|
+
id: z.string().register(z.globalRegistry, { description: "The JWKS configuration's ID." }),
|
|
35
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID. Returned as `id` from `GET /projects`." }),
|
|
36
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`." }).optional(),
|
|
37
|
+
jwks_url: z.string().register(z.globalRegistry, { description: "URL of the provider's JWKS endpoint used to verify JWTs." }),
|
|
38
|
+
provider_name: z.string().register(z.globalRegistry, { description: "The name of the authentication provider (e.g., Clerk, Stytch, Auth0)" }),
|
|
39
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "The date and time when the JWKS was created" }),
|
|
40
|
+
updated_at: z.iso.datetime().register(z.globalRegistry, { description: "The date and time when the JWKS was last modified" }),
|
|
41
|
+
jwt_audience: z.string().register(z.globalRegistry, { description: "Expected JWT `aud` claim value configured for this JWKS." }).optional(),
|
|
42
|
+
role_names: z.array(z.string()).register(z.globalRegistry, { description: "Database role names that are permitted to authenticate using this JWKS configuration." }).optional()
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* The list of configured JWKS definitions for a project
|
|
46
|
+
*/
|
|
47
|
+
const zProjectJwksResponse = z.strictObject({ jwks: z.array(zJwks).register(z.globalRegistry, { description: "JWKS configurations associated with the project." }) }).register(z.globalRegistry, { description: "The list of configured JWKS definitions for a project" });
|
|
48
|
+
/**
|
|
49
|
+
* Category of an advisor issue
|
|
50
|
+
*/
|
|
51
|
+
const zAdvisorCategory = z.enum(["SECURITY", "PERFORMANCE"]).register(z.globalRegistry, { description: "Category of an advisor issue" });
|
|
52
|
+
const zAdvisorIssue = z.strictObject({
|
|
53
|
+
name: z.string().register(z.globalRegistry, { description: "Unique identifier for the issue type" }),
|
|
54
|
+
title: z.string().register(z.globalRegistry, { description: "Human-readable title" }),
|
|
55
|
+
level: z.string().register(z.globalRegistry, { description: "Severity level of the issue" }),
|
|
56
|
+
facing: z.enum(["EXTERNAL", "INTERNAL"]).register(z.globalRegistry, { description: "Whether this issue affects external API exposure or is internal only" }),
|
|
57
|
+
categories: z.array(zAdvisorCategory).register(z.globalRegistry, { description: "Categories this issue belongs to" }),
|
|
58
|
+
description: z.string().register(z.globalRegistry, { description: "Detailed description of what this check detects" }),
|
|
59
|
+
detail: z.string().register(z.globalRegistry, { description: "Specific details about this instance of the issue" }),
|
|
60
|
+
remediation: z.string().register(z.globalRegistry, { description: "URL to documentation on how to fix this issue" }),
|
|
61
|
+
metadata: z.record(z.string(), z.unknown()).register(z.globalRegistry, { description: "Additional context-specific metadata" }),
|
|
62
|
+
cache_key: z.string().register(z.globalRegistry, { description: "Unique key for caching this issue result" })
|
|
63
|
+
});
|
|
64
|
+
const zApiKeyCreateRequest = z.strictObject({ key_name: z.string().max(64).register(z.globalRegistry, { description: "A user-specified API key name. This value is required when creating an API key." }) });
|
|
65
|
+
const zOrgApiKeyCreateRequest = zApiKeyCreateRequest.merge(z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "If set, the API key can access only this project" }).optional() }));
|
|
66
|
+
const zApiKeyCreateResponse = z.strictObject({
|
|
67
|
+
id: z.int().register(z.globalRegistry, { description: "The API key's unique numeric ID. Distinct from the API key token (`key`)." }),
|
|
68
|
+
key: z.string().register(z.globalRegistry, { description: "The generated 64-bit token required to access the Neon API" }),
|
|
69
|
+
name: z.string().register(z.globalRegistry, { description: "The user-specified API key name" }),
|
|
70
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the API key was created" }),
|
|
71
|
+
created_by: z.uuid().register(z.globalRegistry, { description: "ID of the user who created this API key" })
|
|
72
|
+
});
|
|
73
|
+
const zOrgApiKeyCreateResponse = zApiKeyCreateResponse.merge(z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "If set, the API key can access only this project" }).optional() }));
|
|
74
|
+
const zApiKeyRevokeResponse = z.strictObject({
|
|
75
|
+
id: z.int().register(z.globalRegistry, { description: "The API key's unique numeric ID. Distinct from the API key token (`key`)." }),
|
|
76
|
+
name: z.string().register(z.globalRegistry, { description: "The user-specified API key name" }),
|
|
77
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the API key was created" }),
|
|
78
|
+
created_by: z.uuid().register(z.globalRegistry, { description: "ID of the user who created this API key" }),
|
|
79
|
+
last_used_at: z.iso.datetime().nullish(),
|
|
80
|
+
last_used_from_addr: z.string().register(z.globalRegistry, { description: "The IP address from which the API key was last used" }),
|
|
81
|
+
revoked: z.boolean().register(z.globalRegistry, { description: "A `true` or `false` value indicating whether the API key is revoked" })
|
|
82
|
+
});
|
|
83
|
+
const zOrgApiKeyRevokeResponse = zApiKeyRevokeResponse.merge(z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "If set, the API key can access only this project" }).optional() }));
|
|
84
|
+
/**
|
|
85
|
+
* The user data of the user that created this API key.
|
|
86
|
+
*/
|
|
87
|
+
const zApiKeyCreatorData = z.strictObject({
|
|
88
|
+
id: z.uuid().register(z.globalRegistry, { description: "ID of the user who created this API key" }),
|
|
89
|
+
name: z.string().register(z.globalRegistry, { description: "Display name of the user who created the API key." }),
|
|
90
|
+
image: z.string().register(z.globalRegistry, { description: "The URL to the user's avatar image." })
|
|
91
|
+
}).register(z.globalRegistry, { description: "The user data of the user that created this API key." });
|
|
92
|
+
const zApiKeysListResponseItem = z.strictObject({
|
|
93
|
+
id: z.int().register(z.globalRegistry, { description: "The API key's unique numeric ID. Distinct from the API key token (`key`)." }),
|
|
94
|
+
name: z.string().register(z.globalRegistry, { description: "The user-specified API key name" }),
|
|
95
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the API key was created" }),
|
|
96
|
+
created_by: zApiKeyCreatorData,
|
|
97
|
+
last_used_at: z.iso.datetime().nullish(),
|
|
98
|
+
last_used_from_addr: z.string().register(z.globalRegistry, { description: "The IP address from which the API key was last used" })
|
|
99
|
+
});
|
|
100
|
+
const zOrgApiKeysListResponseItem = zApiKeysListResponseItem.merge(z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "If set, the API key can access only this project" }).optional() }));
|
|
101
|
+
/**
|
|
102
|
+
* The action performed by the operation
|
|
103
|
+
*/
|
|
104
|
+
const zOperationAction = z.enum([
|
|
105
|
+
"create_compute",
|
|
106
|
+
"create_timeline",
|
|
107
|
+
"start_compute",
|
|
108
|
+
"suspend_compute",
|
|
109
|
+
"apply_config",
|
|
110
|
+
"check_availability",
|
|
111
|
+
"delete_timeline",
|
|
112
|
+
"create_branch",
|
|
113
|
+
"import_data",
|
|
114
|
+
"tenant_ignore",
|
|
115
|
+
"tenant_attach",
|
|
116
|
+
"tenant_detach",
|
|
117
|
+
"tenant_detach_safekeepers",
|
|
118
|
+
"tenant_attach_safekeepers",
|
|
119
|
+
"tenant_reattach",
|
|
120
|
+
"replace_safekeeper",
|
|
121
|
+
"disable_maintenance",
|
|
122
|
+
"apply_storage_config",
|
|
123
|
+
"prepare_secondary_pageserver",
|
|
124
|
+
"switch_pageserver",
|
|
125
|
+
"detach_parent_branch",
|
|
126
|
+
"timeline_archive",
|
|
127
|
+
"timeline_unarchive",
|
|
128
|
+
"start_reserved_compute",
|
|
129
|
+
"sync_dbs_and_roles_from_compute",
|
|
130
|
+
"apply_schema_from_branch",
|
|
131
|
+
"timeline_mark_invisible",
|
|
132
|
+
"timeline_update_protected_config",
|
|
133
|
+
"prewarm_replica",
|
|
134
|
+
"promote_replica",
|
|
135
|
+
"set_storage_non_dirty",
|
|
136
|
+
"swap_binding_id",
|
|
137
|
+
"finalize_migration",
|
|
138
|
+
"mark_migration_prepared",
|
|
139
|
+
"update_catalog",
|
|
140
|
+
"epc_sync"
|
|
141
|
+
]).register(z.globalRegistry, { description: "The action performed by the operation" });
|
|
142
|
+
/**
|
|
143
|
+
* Lifecycle state of the operation. `scheduling`: queued, not yet started. `running`: actively executing. `finished`: completed successfully. `failed`: ended with a failure. `error`: ended with a terminal error. `cancelling`: cancellation requested but not yet complete. `cancelled`: stopped before completion. `skipped`: bypassed without executing.
|
|
144
|
+
*/
|
|
145
|
+
const zOperationStatus = z.enum([
|
|
146
|
+
"scheduling",
|
|
147
|
+
"running",
|
|
148
|
+
"finished",
|
|
149
|
+
"failed",
|
|
150
|
+
"error",
|
|
151
|
+
"cancelling",
|
|
152
|
+
"cancelled",
|
|
153
|
+
"skipped"
|
|
154
|
+
]).register(z.globalRegistry, { description: "Lifecycle state of the operation. `scheduling`: queued, not yet started. `running`: actively executing. `finished`: completed successfully. `failed`: ended with a failure. `error`: ended with a terminal error. `cancelling`: cancellation requested but not yet complete. `cancelled`: stopped before completion. `skipped`: bypassed without executing." });
|
|
155
|
+
/**
|
|
156
|
+
* An asynchronous action Neon performs on your resources (for example, starting a compute or creating a branch). Fields such as `action`, `status`, and `total_duration_ms` describe the operation and its progress.
|
|
157
|
+
*/
|
|
158
|
+
const zOperation = z.strictObject({
|
|
159
|
+
id: z.uuid().register(z.globalRegistry, { description: "The operation ID" }),
|
|
160
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the project this operation ran on." }),
|
|
161
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the branch this operation ran on." }).optional(),
|
|
162
|
+
endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the compute endpoint this operation ran on." }).optional(),
|
|
163
|
+
action: zOperationAction,
|
|
164
|
+
status: zOperationStatus,
|
|
165
|
+
error: z.string().register(z.globalRegistry, { description: "Human-readable message describing why the operation failed." }).optional(),
|
|
166
|
+
failures_count: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).register(z.globalRegistry, { description: "The number of times the operation failed" }),
|
|
167
|
+
retry_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the operation was last retried" }).optional(),
|
|
168
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the operation was created" }),
|
|
169
|
+
updated_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the operation status was last updated" }),
|
|
170
|
+
total_duration_ms: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).register(z.globalRegistry, { description: "The total duration of the operation in milliseconds" })
|
|
171
|
+
}).register(z.globalRegistry, { description: "An asynchronous action Neon performs on your resources (for example, starting a compute or creating a branch). Fields such as `action`, `status`, and `total_duration_ms` describe the operation and its progress." });
|
|
172
|
+
const zOperationResponse = z.strictObject({ operation: zOperation });
|
|
173
|
+
const zOperationsResponse = z.strictObject({ operations: z.array(zOperation) });
|
|
174
|
+
const zProjectTransferRequestResponse = z.strictObject({
|
|
175
|
+
id: z.uuid().register(z.globalRegistry, { description: "The unique identifier for the transfer request" }),
|
|
176
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the project that is being transferred" }),
|
|
177
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "The timestamp when the transfer request was created" }),
|
|
178
|
+
expires_at: z.iso.datetime().register(z.globalRegistry, { description: "The timestamp when the transfer request will expire" })
|
|
179
|
+
});
|
|
180
|
+
const zAcceptProjectTransferRequestSatisfiesPlanError = z.strictObject({ reasons: z.array(z.strictObject({
|
|
181
|
+
message: z.string().register(z.globalRegistry, { description: "Description of why the plan is not satisfied" }),
|
|
182
|
+
code: z.string().register(z.globalRegistry, { description: "A short code identifying the reason" })
|
|
183
|
+
})).register(z.globalRegistry, { description: "List of reasons why the target account's plan cannot satisfy the transfer requirements. Each item contains a `code` identifying the constraint and a `message` with a human-readable explanation." }) });
|
|
184
|
+
const zProjectPermission = z.strictObject({
|
|
185
|
+
id: z.string().register(z.globalRegistry, { description: "The project permission's ID." }),
|
|
186
|
+
granted_to_email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email address of the user who has been granted access to the project." }),
|
|
187
|
+
granted_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp when the permission was granted." }),
|
|
188
|
+
revoked_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp when the permission was revoked. Null if the permission is still active." }).optional()
|
|
189
|
+
});
|
|
190
|
+
const zProjectPermissions = z.strictObject({ project_permissions: z.array(zProjectPermission) });
|
|
191
|
+
const zGrantPermissionToProjectRequest = z.strictObject({ email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email address of the user to grant project access to." }) });
|
|
192
|
+
/**
|
|
193
|
+
* Per-project role. `viewer` maps to `VIEWER`, `editor` maps to `EDITOR`,
|
|
194
|
+
* and `admin` maps to `ADMIN`.
|
|
195
|
+
*
|
|
196
|
+
*/
|
|
197
|
+
const zProjectRole = z.enum([
|
|
198
|
+
"viewer",
|
|
199
|
+
"editor",
|
|
200
|
+
"admin"
|
|
201
|
+
]).register(z.globalRegistry, { description: "Per-project role. `viewer` maps to `VIEWER`, `editor` maps to `EDITOR`,\nand `admin` maps to `ADMIN`.\n" });
|
|
202
|
+
/**
|
|
203
|
+
* The caller's effective permission for a project when
|
|
204
|
+
* per-project permissions are enabled. `VIEWER` grants read access,
|
|
205
|
+
* `EDITOR` adds update access, and `ADMIN` grants full management.
|
|
206
|
+
* Omitted for personal projects, flag-off organizations, and non-user
|
|
207
|
+
* subjects.
|
|
208
|
+
*
|
|
209
|
+
*/
|
|
210
|
+
const zProjectPermissionLevel = z.enum([
|
|
211
|
+
"VIEWER",
|
|
212
|
+
"EDITOR",
|
|
213
|
+
"ADMIN"
|
|
214
|
+
]).register(z.globalRegistry, { description: "The caller's effective permission for a project when\nper-project permissions are enabled. `VIEWER` grants read access,\n`EDITOR` adds update access, and `ADMIN` grants full management.\nOmitted for personal projects, flag-off organizations, and non-user\nsubjects.\n" });
|
|
215
|
+
/**
|
|
216
|
+
* How a member's project access is granted.
|
|
217
|
+
*
|
|
218
|
+
*/
|
|
219
|
+
const zProjectMemberGrantSource = z.enum([
|
|
220
|
+
"explicit",
|
|
221
|
+
"org_role_default",
|
|
222
|
+
"org_admin_override",
|
|
223
|
+
"unassigned"
|
|
224
|
+
]).register(z.globalRegistry, { description: "How a member's project access is granted.\n" });
|
|
225
|
+
/**
|
|
226
|
+
* Organization-level role used by project member role management.
|
|
227
|
+
*
|
|
228
|
+
*/
|
|
229
|
+
const zProjectMemberOrgRole = z.enum([
|
|
230
|
+
"admin",
|
|
231
|
+
"member",
|
|
232
|
+
"editor",
|
|
233
|
+
"viewer",
|
|
234
|
+
"collaborator"
|
|
235
|
+
]).register(z.globalRegistry, { description: "Organization-level role used by project member role management.\n" });
|
|
236
|
+
const zProjectMember = z.strictObject({
|
|
237
|
+
member_id: z.uuid().register(z.globalRegistry, { description: "The organization member ID." }),
|
|
238
|
+
user_id: z.uuid().register(z.globalRegistry, { description: "The user ID for the organization member." }),
|
|
239
|
+
email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email address of the user who has been granted access to the project." }).optional(),
|
|
240
|
+
name: z.string().register(z.globalRegistry, { description: "The user's display name." }).optional(),
|
|
241
|
+
org_role: zProjectMemberOrgRole,
|
|
242
|
+
project_role: zProjectRole.optional(),
|
|
243
|
+
org_default_project_permission: zProjectPermissionLevel.optional(),
|
|
244
|
+
explicit_project_permission: zProjectPermissionLevel.optional(),
|
|
245
|
+
effective_project_permission: zProjectPermissionLevel.optional(),
|
|
246
|
+
grant_source: zProjectMemberGrantSource.optional()
|
|
247
|
+
});
|
|
248
|
+
const zSetProjectMemberRoleRequest = z.strictObject({ role: zProjectRole });
|
|
249
|
+
const zProjectMemberRoleResponse = z.strictObject({
|
|
250
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
|
|
251
|
+
member_id: z.uuid(),
|
|
252
|
+
user_id: z.uuid(),
|
|
253
|
+
email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email address of the user who has been granted access to the project." }).optional(),
|
|
254
|
+
name: z.string().register(z.globalRegistry, { description: "The user's display name." }).optional(),
|
|
255
|
+
org_role: zProjectMemberOrgRole,
|
|
256
|
+
project_role: zProjectRole.optional(),
|
|
257
|
+
org_default_project_permission: zProjectPermissionLevel.optional(),
|
|
258
|
+
explicit_project_permission: zProjectPermissionLevel.optional(),
|
|
259
|
+
effective_project_permission: zProjectPermissionLevel.optional(),
|
|
260
|
+
credential_rotation_recommended: z.boolean().register(z.globalRegistry, { description: "Hint that database credentials may need rotation after the role change.\n" }).optional(),
|
|
261
|
+
org_api_key_rotation_recommended: z.boolean().register(z.globalRegistry, { description: "Hint that project-scoped org API keys created by the target user may need rotation.\n" }).optional()
|
|
262
|
+
});
|
|
263
|
+
const zConsumptionHistoryPerTimeframe = z.strictObject({
|
|
264
|
+
timeframe_start: z.iso.datetime().register(z.globalRegistry, { description: "The specified start date-time for the reported consumption.\n" }),
|
|
265
|
+
timeframe_end: z.iso.datetime().register(z.globalRegistry, { description: "The specified end date-time for the reported consumption.\n" }),
|
|
266
|
+
active_time_seconds: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }).register(z.globalRegistry, { description: "Seconds. The amount of time the compute endpoints have been active.\n" }),
|
|
267
|
+
compute_time_seconds: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }).register(z.globalRegistry, { description: "Seconds. The number of CPU seconds used by compute endpoints, including compute endpoints that have been deleted.\n" }),
|
|
268
|
+
written_data_bytes: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }).register(z.globalRegistry, { description: "Bytes. The amount of written data for all branches.\n" }),
|
|
269
|
+
synthetic_storage_size_bytes: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }).register(z.globalRegistry, { description: "Bytes. The space occupied in Postgres storage. Synthetic Postgres storage size combines the logical data size and Write-Ahead Log (WAL) size for all branches.\n" }),
|
|
270
|
+
data_storage_bytes_hour: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }).register(z.globalRegistry, { description: "Bytes-Hour. The amount of Postgres storage consumed hourly.\n" }).optional(),
|
|
271
|
+
logical_size_bytes: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }).register(z.globalRegistry, { description: "Bytes. The amount of logical size consumed.\n" }).optional(),
|
|
272
|
+
logical_size_bytes_hour: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }).register(z.globalRegistry, { description: "Bytes-Hour. The amount of logical size consumed hourly.\n" }).optional()
|
|
273
|
+
});
|
|
274
|
+
const zConsumptionHistoryPerPeriod = z.strictObject({
|
|
275
|
+
period_id: z.uuid().register(z.globalRegistry, { description: "The ID assigned to the specified billing period." }),
|
|
276
|
+
period_plan: z.string().register(z.globalRegistry, { description: "The billing plan applicable during the billing period." }),
|
|
277
|
+
period_start: z.iso.datetime().register(z.globalRegistry, { description: "The start date-time of the billing period.\n" }),
|
|
278
|
+
period_end: z.iso.datetime().register(z.globalRegistry, { description: "The end date-time of the billing period, available for the past periods only.\n" }).optional(),
|
|
279
|
+
consumption: z.array(zConsumptionHistoryPerTimeframe).register(z.globalRegistry, { description: "Consumption metric records for the billing period." })
|
|
280
|
+
});
|
|
281
|
+
const zConsumptionHistoryPerProject = z.strictObject({
|
|
282
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID. Returned as `id` from `GET /projects`." }),
|
|
283
|
+
periods: z.array(zConsumptionHistoryPerPeriod).register(z.globalRegistry, { description: "Consumption periods for the project, each covering a discrete billing interval." })
|
|
284
|
+
});
|
|
285
|
+
const zConsumptionHistoryPerProjectResponse = z.strictObject({ projects: z.array(zConsumptionHistoryPerProject).register(z.globalRegistry, { description: "Per-project consumption history records included in the response." }) });
|
|
286
|
+
const zConsumptionMetricValue = z.strictObject({
|
|
287
|
+
metric_name: z.string().register(z.globalRegistry, { description: "Name of the consumption metric, such as compute_time or data_storage_bytes_hour." }),
|
|
288
|
+
value: z.int().register(z.globalRegistry, { description: "Measured quantity for the metric named by `metric_name`." })
|
|
289
|
+
});
|
|
290
|
+
const zConsumptionHistoryPerTimeframeV2 = z.strictObject({
|
|
291
|
+
timeframe_start: z.iso.datetime().register(z.globalRegistry, { description: "The specified start date-time for the reported consumption.\n" }).optional(),
|
|
292
|
+
timeframe_end: z.iso.datetime().register(z.globalRegistry, { description: "The specified end date-time for the reported consumption.\n" }).optional(),
|
|
293
|
+
metrics: z.array(zConsumptionMetricValue).register(z.globalRegistry, { description: "Consumption metric values recorded for the timeframe." }).optional()
|
|
294
|
+
});
|
|
295
|
+
const zConsumptionHistoryPerPeriodV2 = z.strictObject({
|
|
296
|
+
period_id: z.uuid().register(z.globalRegistry, { description: "The ID assigned to the specified billing period." }),
|
|
297
|
+
period_plan: z.string().register(z.globalRegistry, { description: "The billing plan applicable during the billing period." }),
|
|
298
|
+
period_start: z.iso.datetime().register(z.globalRegistry, { description: "The start date-time of the billing period.\n" }),
|
|
299
|
+
period_end: z.iso.datetime().register(z.globalRegistry, { description: "The end date-time of the billing period, available for the past periods only.\n" }).optional(),
|
|
300
|
+
consumption: z.array(zConsumptionHistoryPerTimeframeV2).register(z.globalRegistry, { description: "Consumption metric records for the billing period." })
|
|
301
|
+
});
|
|
302
|
+
const zConsumptionHistoryPerProjectV2 = z.strictObject({
|
|
303
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID. Returned as `id` from `GET /projects`." }),
|
|
304
|
+
periods: z.array(zConsumptionHistoryPerPeriodV2).register(z.globalRegistry, { description: "Consumption periods recorded for this project." })
|
|
305
|
+
});
|
|
306
|
+
const zConsumptionHistoryPerProjectV2Response = z.strictObject({ projects: z.array(zConsumptionHistoryPerProjectV2).register(z.globalRegistry, { description: "Per-project consumption history entries for the requested time range." }) });
|
|
307
|
+
const zConsumptionHistoryPerBranchV2 = z.strictObject({
|
|
308
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the project that owns this branch." }),
|
|
309
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`." }),
|
|
310
|
+
periods: z.array(zConsumptionHistoryPerPeriodV2).register(z.globalRegistry, { description: "Consumption history records for the branch, grouped by billing period." })
|
|
311
|
+
});
|
|
312
|
+
const zConsumptionHistoryPerBranchV2Response = z.strictObject({ branches: z.array(zConsumptionHistoryPerBranchV2).register(z.globalRegistry, { description: "Per-branch consumption history records returned for the requested time range." }) });
|
|
313
|
+
const zConsumptionHistoryGranularity = z.enum([
|
|
314
|
+
"hourly",
|
|
315
|
+
"daily",
|
|
316
|
+
"monthly"
|
|
317
|
+
]);
|
|
318
|
+
const zConsumptionHistoryQueryMetrics = z.array(z.string());
|
|
319
|
+
const zProjectAuditLogLevel = z.enum([
|
|
320
|
+
"base",
|
|
321
|
+
"extended",
|
|
322
|
+
"full"
|
|
323
|
+
]);
|
|
324
|
+
const zAvailablePreloadLibrary = z.strictObject({
|
|
325
|
+
library_name: z.string().register(z.globalRegistry, { description: "Name of the Postgres shared preload library as it appears in the `shared_preload_libraries` parameter (for example, `pg_stat_statements`)." }),
|
|
326
|
+
description: z.string().register(z.globalRegistry, { description: "Human-readable explanation of the library's purpose and behavior." }),
|
|
327
|
+
is_default: z.boolean().register(z.globalRegistry, { description: "Whether this library is loaded by default in the `shared_preload_libraries` configuration for new compute endpoints." }),
|
|
328
|
+
is_experimental: z.boolean().register(z.globalRegistry, { description: "Marks the library as experimental. Experimental libraries may be unstable, subject to breaking changes, or not recommended for production use." }),
|
|
329
|
+
version: z.string().register(z.globalRegistry, { description: "Version of the preload library." })
|
|
330
|
+
});
|
|
331
|
+
const zAvailablePreloadLibraries = z.strictObject({ libraries: z.array(zAvailablePreloadLibrary).register(z.globalRegistry, { description: "Preload libraries available for the project's Postgres version. Each entry includes `library_name`, `description`, `is_default`, `is_experimental`, and `version`." }).optional() });
|
|
332
|
+
/**
|
|
333
|
+
* The branch’s state, indicating if it is initializing, ready for use, or archived.
|
|
334
|
+
* * 'init' - the branch is being created but is not available for querying.
|
|
335
|
+
* * 'resetting' - the branch is being reset to a specific point in time or LSN and is not yet available for querying.
|
|
336
|
+
* * 'ready' - the branch is fully operational and ready for querying. Expect normal query response times.
|
|
337
|
+
* * 'archived' - the branch is stored in cost-effective archival Postgres storage. Expect slow query response times.
|
|
338
|
+
*
|
|
339
|
+
*/
|
|
340
|
+
const zBranchState = z.string().register(z.globalRegistry, { description: "The branch’s state, indicating if it is initializing, ready for use, or archived.\n * 'init' - the branch is being created but is not available for querying.\n * 'resetting' - the branch is being reset to a specific point in time or LSN and is not yet available for querying.\n * 'ready' - the branch is fully operational and ready for querying. Expect normal query response times.\n * 'archived' - the branch is stored in cost-effective archival Postgres storage. Expect slow query response times.\n" });
|
|
341
|
+
/**
|
|
342
|
+
* Could be `restored`, `finalized` or `detaching`.
|
|
343
|
+
* A `restored` branch becomes permanently `finalized` when you call `finalizeRestoreBranch`
|
|
344
|
+
* A `restored` or `finalized` branch may begin `detaching` as a one-time performance optimisation, after which it will continue in its original state
|
|
345
|
+
*
|
|
346
|
+
*/
|
|
347
|
+
const zBranchRestoreStatus = z.string().register(z.globalRegistry, { description: "Could be `restored`, `finalized` or `detaching`.\nA `restored` branch becomes permanently `finalized` when you call `finalizeRestoreBranch`\nA `restored` or `finalized` branch may begin `detaching` as a one-time performance optimisation, after which it will continue in its original state\n" });
|
|
348
|
+
/**
|
|
349
|
+
* An action that is currently restricted for the branch and the reason why.
|
|
350
|
+
*
|
|
351
|
+
*/
|
|
352
|
+
const zBranchRestrictedAction = z.strictObject({
|
|
353
|
+
name: z.string().register(z.globalRegistry, { description: "The name of a restricted action on a branch. `restore`: the branch cannot be used as a restore target. `delete-rw-endpoint`: the read-write endpoint for the branch cannot be deleted.\n" }),
|
|
354
|
+
reason: z.string().register(z.globalRegistry, { description: "A human-readable explanation of why the action is restricted.\n" })
|
|
355
|
+
}).register(z.globalRegistry, { description: "An action that is currently restricted for the branch and the reason why.\n" });
|
|
356
|
+
/**
|
|
357
|
+
* Recovery information for a deleted branch. Only present when listing deleted branches
|
|
358
|
+
* with `include_deleted=true`.
|
|
359
|
+
*
|
|
360
|
+
* This is part of the Branch Recovery feature, which is in preview and not available to all users.
|
|
361
|
+
*
|
|
362
|
+
*/
|
|
363
|
+
const zBranchRecoveryInfo = z.strictObject({
|
|
364
|
+
deleted_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp when the branch was deleted\n" }),
|
|
365
|
+
recoverable_until: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp when the recovery window expires and the branch will be permanently deleted\n" }),
|
|
366
|
+
deletion_method: z.enum(["user", "ttl"]).register(z.globalRegistry, { description: "How the branch was deleted: 'user' for manual deletion, 'ttl' for TTL expiration\n" })
|
|
367
|
+
}).register(z.globalRegistry, { description: "Recovery information for a deleted branch. Only present when listing deleted branches\nwith `include_deleted=true`.\n\nThis is part of the Branch Recovery feature, which is in preview and not available to all users.\n" });
|
|
368
|
+
const zBranch = z.strictObject({
|
|
369
|
+
id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID. This value is generated when a branch is created. A `branch_id` value has a `br` prefix. For example: `br-small-term-683261`.\n" }),
|
|
370
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the project this branch belongs to." }),
|
|
371
|
+
parent_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The `branch_id` of the parent branch\n" }).optional(),
|
|
372
|
+
parent_lsn: z.string().register(z.globalRegistry, { description: "The Log Sequence Number (LSN) on the parent branch from which this branch was created.\nWhen restoring a branch using the `POST /projects/{project_id}/branches/{branch_id}/restore` endpoint,\nthis value isn’t finalized until all operations related to the restore have completed successfully.\n" }).optional(),
|
|
373
|
+
parent_timestamp: z.iso.datetime().register(z.globalRegistry, { description: "The point in time on the parent branch from which this branch was created.\nWhen restoring a branch using the `POST /projects/{project_id}/branches/{branch_id}/restore` endpoint,\nthis value isn’t finalized until all operations related to the restore have completed successfully.\nAfter all the operations completed, this value might stay empty.\n" }).optional(),
|
|
374
|
+
name: z.string().register(z.globalRegistry, { description: "The branch name\n" }),
|
|
375
|
+
current_state: zBranchState,
|
|
376
|
+
pending_state: zBranchState.optional(),
|
|
377
|
+
state_changed_at: z.iso.datetime().register(z.globalRegistry, { description: "A UTC timestamp indicating when the `current_state` began\n" }),
|
|
378
|
+
logical_size: z.int().register(z.globalRegistry, { description: "The logical size of the branch, in bytes\n" }).optional(),
|
|
379
|
+
creation_source: z.string().register(z.globalRegistry, { description: "The branch creation source\n" }),
|
|
380
|
+
primary: z.boolean().register(z.globalRegistry, { description: "Deprecated. Use the `default` field. Whether the branch is the project's primary branch.\n" }).optional(),
|
|
381
|
+
default: z.boolean().register(z.globalRegistry, { description: "Whether the branch is the project's default branch\n" }),
|
|
382
|
+
protected: z.boolean().register(z.globalRegistry, { description: "Whether the branch is protected. Protected branches (and their computes) cannot be deleted, archived, or reset, and block deletion of the project.\n" }),
|
|
383
|
+
cpu_used_sec: z.int().register(z.globalRegistry, { description: "Deprecated. Use `compute_time_seconds` instead. CPU seconds used by all of the branch's compute endpoints, including deleted ones. This value is reset at the beginning of each billing period.\n" }),
|
|
384
|
+
compute_time_seconds: z.int().register(z.globalRegistry, { description: "Total Postgres compute time consumed by this branch during the current billing period, in CU-seconds (weighted by compute size). Divide by 3600 for CU-hours." }),
|
|
385
|
+
active_time_seconds: z.int().register(z.globalRegistry, { description: "Total time this branch's compute has been active during the current billing period, in seconds (not weighted by compute size). Distinct from `compute_time_seconds`, which is CU-weighted." }),
|
|
386
|
+
written_data_bytes: z.int().register(z.globalRegistry, { description: "Data written by this branch during the current billing period, in bytes." }),
|
|
387
|
+
data_transfer_bytes: z.int().register(z.globalRegistry, { description: "Total data transferred out of the branch, in bytes. Used as a consumption metric." }),
|
|
388
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the branch was created\n" }),
|
|
389
|
+
updated_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the branch was last updated\n" }),
|
|
390
|
+
ttl_interval_seconds: z.int().register(z.globalRegistry, { description: "The time-to-live (TTL) duration originally configured for the branch, in seconds. This read-only value represents the interval between the time `expires_at` was set and the expiration timestamp itself. It is preserved to ensure the same TTL duration is reapplied when resetting the branch from its parent, and only updates when a new `expires_at` value is set.\n\nAccess to this feature is currently limited to participants in the Early Access Program.\n" }).optional(),
|
|
391
|
+
expires_at: z.iso.datetime().register(z.globalRegistry, { description: "The timestamp when the branch is scheduled to expire and be automatically deleted. Must be set by the client following the [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6) format with precision up to seconds (such as 2025-06-09T18:02:16Z). Deletion is performed by a background job and may not occur exactly at the specified time.\n\nAccess to this feature is currently limited to participants in the Early Access Program.\n" }).optional(),
|
|
392
|
+
last_reset_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the branch was last reset\n" }).optional(),
|
|
393
|
+
created_by: z.strictObject({
|
|
394
|
+
name: z.string().register(z.globalRegistry, { description: "Display name of the user who created the branch." }).optional(),
|
|
395
|
+
image: z.string().register(z.globalRegistry, { description: "The URL to the user's avatar image." }).optional()
|
|
396
|
+
}).register(z.globalRegistry, { description: "The resolved user model that contains details of the user/org/integration/api_key used for branch creation. This field is filled only in listing/get/create/get/update/delete methods, if it is empty when calling other handlers, it does not mean that it is empty in the system.\n" }).optional(),
|
|
397
|
+
init_source: z.string().register(z.globalRegistry, { description: "Source of initialization for the branch. `parent-data` (default) copies schema and data from the parent. `parent-schema` copies schema only from the parent. `schema-only` creates a root branch with schema only. `import` initializes from an external import.\n" }).optional(),
|
|
398
|
+
restore_status: zBranchRestoreStatus.optional(),
|
|
399
|
+
restored_from: z.string().register(z.globalRegistry, { description: "ID of the snapshot that was the restore source for this branch\n" }).optional(),
|
|
400
|
+
restored_as: z.string().register(z.globalRegistry, { description: "ID of the target branch which was replaced when this branch was restored\n" }).optional(),
|
|
401
|
+
restricted_actions: z.array(zBranchRestrictedAction).register(z.globalRegistry, { description: "A list of actions that are currently restricted for this branch and the reason why.\n" }).optional(),
|
|
402
|
+
recovery: zBranchRecoveryInfo.optional()
|
|
403
|
+
});
|
|
404
|
+
const zBranchUpdateRequest = z.strictObject({ branch: z.strictObject({
|
|
405
|
+
name: z.string().min(1).max(256).register(z.globalRegistry, { description: "New display name for the branch." }).optional(),
|
|
406
|
+
protected: z.boolean().register(z.globalRegistry, { description: "Whether the branch is protected. Protected branches (and their computes) cannot be deleted, archived, or reset, and block deletion of the project. Can be gated by `protected_branches_only` in the IP allowlist. Paid plans only.\n" }).optional(),
|
|
407
|
+
expires_at: z.iso.datetime().nullish()
|
|
408
|
+
}).register(z.globalRegistry, { description: "Branch attributes to update. Supply only the fields you want to change, for example `name` or `protected`." }) });
|
|
409
|
+
const zBranchRestoreRequest = z.strictObject({
|
|
410
|
+
source_branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The `branch_id` of the restore source branch.\nIf `source_timestamp` and `source_lsn` are omitted, the branch will be restored to head.\nIf `source_branch_id` is equal to the branch's id, `source_timestamp` or `source_lsn` is required.\n" }),
|
|
411
|
+
source_lsn: z.string().register(z.globalRegistry, { description: "A Postgres LSN (for example, `0/1A2B3C4`) on the source branch to restore from.\nMutually exclusive with `source_timestamp`. Omit both to restore to head.\n" }).optional(),
|
|
412
|
+
source_timestamp: z.iso.datetime().register(z.globalRegistry, { description: "A point in time on the source branch to restore from, in RFC 3339 format. When omitted alongside `source_lsn`, the branch is restored to the latest available state of the source branch.\n" }).optional(),
|
|
413
|
+
preserve_under_name: z.string().register(z.globalRegistry, { description: "Name under which to save the current branch state before restoring. Required when the branch has children or when `source_branch_id` equals the branch being restored; in those cases all existing child branches are moved to the newly created branch. If omitted and not required, the previous state is not preserved.\n" }).optional()
|
|
414
|
+
});
|
|
415
|
+
const zBranchResponse = z.strictObject({ branch: zBranch });
|
|
416
|
+
const zBranchSchemaCompareResponse = z.strictObject({ diff: z.string().register(z.globalRegistry, { description: "Unified diff of the SQL schema changes between the compared branches." }).optional() });
|
|
417
|
+
const zBranchesResponse = z.strictObject({ branches: z.array(zBranch).register(z.globalRegistry, { description: "Branches in the project. Each includes `id`, `name`, `current_state`, and `created_at`." }) });
|
|
418
|
+
const zBranchesCountResponse = z.strictObject({ count: z.int().register(z.globalRegistry, { description: "Total number of branches in the project." }) });
|
|
419
|
+
const zMaskingRule = z.strictObject({
|
|
420
|
+
database_name: z.string().register(z.globalRegistry, { description: "The name of the database containing the table to be masked\n" }),
|
|
421
|
+
schema_name: z.string().register(z.globalRegistry, { description: "The name of the schema containing the table to be masked\n" }),
|
|
422
|
+
table_name: z.string().register(z.globalRegistry, { description: "The name of the table containing the column to be masked\n" }),
|
|
423
|
+
column_name: z.string().register(z.globalRegistry, { description: "The name of the column to be masked\n" }),
|
|
424
|
+
masking_function: z.string().register(z.globalRegistry, { description: "The PostgreSQL Anonymizer masking function to apply.\nCan be a predefined function (e.g., 'anon.random_string(10)', 'anon.fake_email()')\nor a custom function definition (e.g., 'anon.hash(column_name)')\n" }).optional(),
|
|
425
|
+
masking_value: z.string().register(z.globalRegistry, { description: "A literal value to set on the column when masking.\n" }).optional()
|
|
426
|
+
});
|
|
427
|
+
const zMaskingRulesResponse = z.strictObject({ masking_rules: z.array(zMaskingRule).register(z.globalRegistry, { description: "List of masking rules for the branch\n" }) });
|
|
428
|
+
const zMaskingRulesUpdateRequest = z.strictObject({ masking_rules: z.array(zMaskingRule).register(z.globalRegistry, { description: "List of masking rules to apply to the branch.\nThis will replace all existing masking rules for the branch.\n" }) });
|
|
429
|
+
/**
|
|
430
|
+
* Metadata about the most recent anonymization attempt for the branch.
|
|
431
|
+
*/
|
|
432
|
+
const zAnonymizationRunMetadata = z.strictObject({
|
|
433
|
+
started_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp indicating when the latest anonymization attempt started.\n" }).optional(),
|
|
434
|
+
completed_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp indicating when the latest anonymization attempt completed.\nPopulated even if the attempt failed.\n" }).optional(),
|
|
435
|
+
triggered_by: z.uuid().register(z.globalRegistry, { description: "UUID of the user who triggered the latest anonymization attempt.\n" }).optional(),
|
|
436
|
+
triggered_by_username: z.string().register(z.globalRegistry, { description: "Username of the user who triggered the latest anonymization attempt.\n" }).optional(),
|
|
437
|
+
masked_columns: z.int().register(z.globalRegistry, { description: "Number of columns that had masking rules applied during the attempt.\n" }).optional()
|
|
438
|
+
}).register(z.globalRegistry, { description: "Metadata about the most recent anonymization attempt for the branch." });
|
|
439
|
+
const zAnonymizedBranchStatusResponse = z.strictObject({
|
|
440
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the project this branch belongs to." }),
|
|
441
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the anonymized branch." }),
|
|
442
|
+
state: z.string().register(z.globalRegistry, { description: "The current state of the anonymized branch. `created`: branch record exists but setup has not started. `initialized`: setup is complete and the branch is ready for anonymization. `initialization_error`: an error occurred during setup. `anonymizing`: the anonymization process is currently running. `anonymized`: anonymization completed successfully. `error`: an error occurred during anonymization.\n" }),
|
|
443
|
+
status_message: z.string().register(z.globalRegistry, { description: "A descriptive message about the current status or any errors\n" }).optional(),
|
|
444
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the anonymized branch was created\n" }),
|
|
445
|
+
updated_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the anonymized branch status was last updated\n" }),
|
|
446
|
+
failed_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the anonymized branch operation failed (if applicable)\n" }).optional(),
|
|
447
|
+
last_run: zAnonymizationRunMetadata.optional()
|
|
448
|
+
});
|
|
449
|
+
const zConnectionParameters = z.strictObject({
|
|
450
|
+
database: z.string().register(z.globalRegistry, { description: "Name of the Postgres database used in the connection URI.\n" }),
|
|
451
|
+
password: z.string().register(z.globalRegistry, { description: "Authentication password for the role, used in the connection URI.\n" }),
|
|
452
|
+
role: z.string().register(z.globalRegistry, { description: "Postgres role used to authenticate the database connection.\n" }),
|
|
453
|
+
host: z.string().register(z.globalRegistry, { description: "Hostname of the compute endpoint. Use `pooler_host` for the pooled connection hostname.\n" }),
|
|
454
|
+
pooler_host: z.string().register(z.globalRegistry, { description: "PgBouncer (transaction mode) pooled host, the `-pooler` variant of `host`. Connect through it to work around the Postgres `max_connections` limit for serverless or connection-per-request workloads.\n" })
|
|
455
|
+
});
|
|
456
|
+
const zConnectionDetails = z.strictObject({
|
|
457
|
+
connection_uri: z.string().register(z.globalRegistry, { description: "The connection URI is defined as specified here: [Connection URIs](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS)\nThe connection URI can be used to connect to a Postgres database with psql or defined in a DATABASE_URL environment variable.\nWhen creating a branch from a parent with more than one role or database, the response body does not include a connection URI.\n" }),
|
|
458
|
+
connection_parameters: zConnectionParameters
|
|
459
|
+
});
|
|
460
|
+
const zConnectionUriResponse = z.strictObject({ uri: z.string().register(z.globalRegistry, { description: "The connection URI.\n" }) });
|
|
461
|
+
/**
|
|
462
|
+
* Lifecycle state of the compute endpoint. `init`: being initialized. `active`: running and accepting connections. `idle`: suspended (scaled to zero).
|
|
463
|
+
*/
|
|
464
|
+
const zEndpointState = z.enum([
|
|
465
|
+
"init",
|
|
466
|
+
"active",
|
|
467
|
+
"idle"
|
|
468
|
+
]).register(z.globalRegistry, { description: "Lifecycle state of the compute endpoint. `init`: being initialized. `active`: running and accepting connections. `idle`: suspended (scaled to zero)." });
|
|
469
|
+
/**
|
|
470
|
+
* Compute endpoint type. `read_write`: the primary read-write endpoint (one per branch). `read_only`: a read replica endpoint (multiple allowed per branch).
|
|
471
|
+
*/
|
|
472
|
+
const zEndpointType = z.enum(["read_only", "read_write"]).register(z.globalRegistry, { description: "Compute endpoint type. `read_write`: the primary read-write endpoint (one per branch). `read_only`: a read replica endpoint (multiple allowed per branch)." });
|
|
473
|
+
/**
|
|
474
|
+
* Deprecated. The connection pooler mode. Neon supports PgBouncer in `transaction` mode only. Removal scheduled for June 20, 2026.
|
|
475
|
+
*
|
|
476
|
+
*
|
|
477
|
+
* @deprecated
|
|
478
|
+
*/
|
|
479
|
+
const zEndpointPoolerMode = z.enum(["transaction"]).register(z.globalRegistry, { description: "Deprecated. The connection pooler mode. Neon supports PgBouncer in `transaction` mode only. Removal scheduled for June 20, 2026.\n" });
|
|
480
|
+
/**
|
|
481
|
+
* Duration of inactivity in seconds after which the compute endpoint is
|
|
482
|
+
* automatically suspended. The value `0` means use the default value.
|
|
483
|
+
* The value `-1` means never suspend. The default value is `300` seconds (5 minutes).
|
|
484
|
+
* The minimum value is `60` seconds (1 minute).
|
|
485
|
+
* The maximum value is `604800` seconds (1 week). For more information, see
|
|
486
|
+
* [Scale to zero configuration](https://neon.com/docs/manage/endpoints#scale-to-zero-configuration).
|
|
487
|
+
*
|
|
488
|
+
*/
|
|
489
|
+
const zSuspendTimeoutSeconds = z.int().gte(-1).lte(604800).register(z.globalRegistry, { description: "Duration of inactivity in seconds after which the compute endpoint is\nautomatically suspended. The value `0` means use the default value.\nThe value `-1` means never suspend. The default value is `300` seconds (5 minutes).\nThe minimum value is `60` seconds (1 minute).\nThe maximum value is `604800` seconds (1 week). For more information, see\n[Scale to zero configuration](https://neon.com/docs/manage/endpoints#scale-to-zero-configuration).\n" });
|
|
490
|
+
/**
|
|
491
|
+
* A list of IP addresses that are allowed to connect to the compute endpoint.
|
|
492
|
+
* If the list is empty or not set, all IP addresses are allowed.
|
|
493
|
+
* If protected_branches_only is true, the list will be applied only to protected branches.
|
|
494
|
+
*
|
|
495
|
+
*/
|
|
496
|
+
const zAllowedIps = z.strictObject({
|
|
497
|
+
ips: z.array(z.string()).register(z.globalRegistry, { description: "A list of IP addresses that are allowed to connect to the endpoint." }).optional(),
|
|
498
|
+
protected_branches_only: z.boolean().register(z.globalRegistry, { description: "If true, the list will be applied only to protected branches." }).optional()
|
|
499
|
+
}).register(z.globalRegistry, { description: "A list of IP addresses that are allowed to connect to the compute endpoint.\nIf the list is empty or not set, all IP addresses are allowed.\nIf protected_branches_only is true, the list will be applied only to protected branches.\n" });
|
|
500
|
+
/**
|
|
501
|
+
* A maintenance window is a time period during which Neon may perform maintenance on the project's infrastructure.
|
|
502
|
+
* During this time, the project's compute endpoints may be unavailable and existing connections can be
|
|
503
|
+
* interrupted.
|
|
504
|
+
*
|
|
505
|
+
*/
|
|
506
|
+
const zMaintenanceWindow = z.strictObject({
|
|
507
|
+
weekdays: z.array(z.int()).register(z.globalRegistry, { description: "A list of weekdays when the maintenance window is active.\nEncoded as ints, where 1 - Monday, and 7 - Sunday.\n" }),
|
|
508
|
+
start_time: z.string().register(z.globalRegistry, { description: "Start time of the maintenance window, in the format of \"HH:MM\". Uses UTC.\n" }),
|
|
509
|
+
end_time: z.string().register(z.globalRegistry, { description: "End time of the maintenance window, in the format of \"HH:MM\". Uses UTC.\n" })
|
|
510
|
+
}).register(z.globalRegistry, { description: "A maintenance window is a time period during which Neon may perform maintenance on the project's infrastructure.\nDuring this time, the project's compute endpoints may be unavailable and existing connections can be\ninterrupted.\n" });
|
|
511
|
+
/**
|
|
512
|
+
* The shared libraries to preload into the project's compute instances.
|
|
513
|
+
*
|
|
514
|
+
*/
|
|
515
|
+
const zPreloadLibraries = z.strictObject({
|
|
516
|
+
use_defaults: z.boolean().register(z.globalRegistry, { description: "When true, the project's preload libraries include the platform default set in addition to any libraries listed in `enabled_libraries`." }).optional(),
|
|
517
|
+
enabled_libraries: z.array(z.string()).register(z.globalRegistry, { description: "Names of shared preload libraries to enable for the project." }).optional()
|
|
518
|
+
}).register(z.globalRegistry, { description: "The shared libraries to preload into the project's compute instances.\n" });
|
|
519
|
+
const zConnectionUrisResponse = z.strictObject({ connection_uris: z.array(zConnectionDetails).register(z.globalRegistry, { description: "Connection URIs for the project. Each entry contains credentials and should be treated as sensitive." }) });
|
|
520
|
+
const zConnectionUrisOptionalResponse = z.strictObject({ connection_uris: z.array(zConnectionDetails).register(z.globalRegistry, { description: "Connection URIs for the compute endpoint, including credentials." }).optional() });
|
|
521
|
+
const zVpcEndpoint = z.strictObject({
|
|
522
|
+
vpc_endpoint_id: z.string().register(z.globalRegistry, { description: "Cloud provider identifier for the VPC endpoint." }),
|
|
523
|
+
label: z.string().register(z.globalRegistry, { description: "A descriptive label for the VPC endpoint" })
|
|
524
|
+
});
|
|
525
|
+
const zVpcEndpointsResponse = z.strictObject({ endpoints: z.array(zVpcEndpoint).register(z.globalRegistry, { description: "List of VPC endpoints returned by the request." }) });
|
|
526
|
+
const zVpcEndpointWithRegion = zVpcEndpoint.merge(z.strictObject({ region_id: z.string().register(z.globalRegistry, { description: "The region where the VPC endpoint is located" }) }));
|
|
527
|
+
const zVpcEndpointsWithRegionResponse = z.strictObject({ endpoints: z.array(zVpcEndpointWithRegion).register(z.globalRegistry, { description: "VPC endpoints associated with the region." }) });
|
|
528
|
+
const zVpcEndpointDetails = z.strictObject({
|
|
529
|
+
vpc_endpoint_id: z.string().register(z.globalRegistry, { description: "Cloud provider identifier for the VPC endpoint." }),
|
|
530
|
+
label: z.string().register(z.globalRegistry, { description: "A descriptive label for the VPC endpoint" }),
|
|
531
|
+
state: z.string().register(z.globalRegistry, { description: "The current state of the VPC endpoint. `new` means the endpoint has just been configured and is pending acceptance by Neon. `accepted` means the VPC connection has been accepted by Neon.\n" }),
|
|
532
|
+
num_restricted_projects: z.int().register(z.globalRegistry, { description: "The number of projects that are restricted to use this VPC endpoint.\n" }),
|
|
533
|
+
example_restricted_projects: z.array(z.string()).register(z.globalRegistry, { description: "A list of example projects that are restricted to use this VPC endpoint.\nThere are at most 3 projects in the list, even if more projects are restricted.\n" })
|
|
534
|
+
});
|
|
535
|
+
const zVpcEndpointAssignment = z.strictObject({ label: z.string().register(z.globalRegistry, { description: "Human-readable name for the VPC endpoint assignment, used to identify it within the organization." }) });
|
|
536
|
+
const zRole = z.strictObject({
|
|
537
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the branch this role belongs to." }),
|
|
538
|
+
name: z.string().register(z.globalRegistry, { description: "Postgres role name within the branch.\n" }),
|
|
539
|
+
password: z.string().register(z.globalRegistry, { description: "The role password\n" }).optional(),
|
|
540
|
+
protected: z.boolean().register(z.globalRegistry, { description: "Whether or not the role is system-protected\n" }).optional(),
|
|
541
|
+
authentication_method: z.string().register(z.globalRegistry, { description: "Authentication method configured for this role: `password`, `oauth`, or `no_login`.\n" }).optional(),
|
|
542
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the role was created\n" }),
|
|
543
|
+
updated_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the role was last updated\n" })
|
|
544
|
+
});
|
|
545
|
+
const zRoleCreateRequest = z.strictObject({ role: z.strictObject({
|
|
546
|
+
name: z.string().register(z.globalRegistry, { description: "The role name. Cannot exceed 63 bytes in length.\n" }),
|
|
547
|
+
no_login: z.boolean().register(z.globalRegistry, { description: "Whether to create a role that cannot login.\n" }).optional()
|
|
548
|
+
}).register(z.globalRegistry, { description: "Properties of the role to create." }) });
|
|
549
|
+
const zRoleResponse = z.strictObject({ role: zRole });
|
|
550
|
+
const zJwksResponse = z.strictObject({ jwks: zJwks });
|
|
551
|
+
const zRolesResponse = z.strictObject({ roles: z.array(zRole).register(z.globalRegistry, { description: "Roles belonging to the branch. Each role includes fields such as `branch_id`, `name`, `protected`, `created_at`, and `updated_at`.\n" }) });
|
|
552
|
+
const zRolePasswordResponse = z.strictObject({ password: z.string().register(z.globalRegistry, { description: "The role password\n" }) });
|
|
553
|
+
const zPaymentSourceBankCard = z.strictObject({
|
|
554
|
+
last4: z.string().register(z.globalRegistry, { description: "Last 4 digits of the card.\n" }),
|
|
555
|
+
brand: z.enum([
|
|
556
|
+
"amex",
|
|
557
|
+
"diners",
|
|
558
|
+
"discover",
|
|
559
|
+
"jcb",
|
|
560
|
+
"mastercard",
|
|
561
|
+
"unionpay",
|
|
562
|
+
"unknown",
|
|
563
|
+
"visa"
|
|
564
|
+
]).register(z.globalRegistry, { description: "Card network reported by the payment processor. Set to `unknown` when the network cannot be determined.\n" }).optional(),
|
|
565
|
+
exp_month: z.int().register(z.globalRegistry, { description: "Credit card expiration month\n" }).optional(),
|
|
566
|
+
exp_year: z.int().register(z.globalRegistry, { description: "Credit card expiration year\n" }).optional()
|
|
567
|
+
});
|
|
568
|
+
const zPaymentSource = z.strictObject({
|
|
569
|
+
type: z.string().register(z.globalRegistry, { description: "Type of payment source. E.g. \"card\".\n" }),
|
|
570
|
+
card: zPaymentSourceBankCard.optional()
|
|
571
|
+
});
|
|
572
|
+
const zSpendingLimitUpdateRequest = z.strictObject({ spending_limit_cents: z.int().gte(1).register(z.globalRegistry, { description: "Monthly spending cap in cents. Must be positive. To remove a\npreviously configured limit, send a DELETE request to the\nspending_limit endpoint — `0` and `null` are rejected here.\nThe cap is alert-only: notifications fire at 80% and 100%, but\ncomputes are not suspended. Setting a cap below the period's\nalready-accrued spend is permitted and will trigger the\nover-limit notification on the next worker run.\n" }) });
|
|
573
|
+
const zSpendingLimitResponse = z.strictObject({ spending_limit_cents: z.int().nullable() });
|
|
574
|
+
/**
|
|
575
|
+
* State of the billing account.
|
|
576
|
+
*
|
|
577
|
+
*/
|
|
578
|
+
const zBillingAccountState = z.enum([
|
|
579
|
+
"UNKNOWN",
|
|
580
|
+
"active",
|
|
581
|
+
"suspended",
|
|
582
|
+
"deactivated",
|
|
583
|
+
"deleted"
|
|
584
|
+
]).register(z.globalRegistry, { description: "State of the billing account.\n" });
|
|
585
|
+
/**
|
|
586
|
+
* Type of subscription to Neon Cloud.
|
|
587
|
+
* Notice that for users without billing account this will be "UNKNOWN"
|
|
588
|
+
*
|
|
589
|
+
*/
|
|
590
|
+
const zBillingSubscriptionType = z.enum([
|
|
591
|
+
"UNKNOWN",
|
|
592
|
+
"direct_sales",
|
|
593
|
+
"direct_sales_v3",
|
|
594
|
+
"aws_marketplace",
|
|
595
|
+
"free_v2",
|
|
596
|
+
"free_v3",
|
|
597
|
+
"launch",
|
|
598
|
+
"launch_v3",
|
|
599
|
+
"scale",
|
|
600
|
+
"scale_v3",
|
|
601
|
+
"business",
|
|
602
|
+
"vercel_pg_legacy"
|
|
603
|
+
]).register(z.globalRegistry, { description: "Type of subscription to Neon Cloud.\nNotice that for users without billing account this will be \"UNKNOWN\"\n" });
|
|
604
|
+
/**
|
|
605
|
+
* Indicates whether and how an account makes payments.
|
|
606
|
+
*
|
|
607
|
+
*/
|
|
608
|
+
const zBillingPaymentMethod = z.enum([
|
|
609
|
+
"UNKNOWN",
|
|
610
|
+
"none",
|
|
611
|
+
"stripe",
|
|
612
|
+
"direct_payment",
|
|
613
|
+
"aws_mp",
|
|
614
|
+
"azure_mp",
|
|
615
|
+
"vercel_mp",
|
|
616
|
+
"staff",
|
|
617
|
+
"trial",
|
|
618
|
+
"sponsorship",
|
|
619
|
+
"shared_payment_token"
|
|
620
|
+
]).register(z.globalRegistry, { description: "Indicates whether and how an account makes payments.\n" });
|
|
621
|
+
const zBillingAccount = z.strictObject({
|
|
622
|
+
state: zBillingAccountState,
|
|
623
|
+
payment_source: zPaymentSource,
|
|
624
|
+
subscription_type: zBillingSubscriptionType,
|
|
625
|
+
payment_method: zBillingPaymentMethod,
|
|
626
|
+
quota_reset_at_last: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp of the last quota reset. Set to the account creation time when the account is first created.\n" }),
|
|
627
|
+
name: z.string().register(z.globalRegistry, { description: "The full name of the individual or entity that owns the billing account. This name appears on invoices." }),
|
|
628
|
+
email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Billing email, to receive emails related to invoices and subscriptions.\n" }),
|
|
629
|
+
address_city: z.string().register(z.globalRegistry, { description: "Billing address city.\n" }),
|
|
630
|
+
address_country: z.string().register(z.globalRegistry, { description: "Billing address country code defined by ISO 3166-1 alpha-2.\n" }),
|
|
631
|
+
address_country_name: z.string().register(z.globalRegistry, { description: "Billing address country name.\n" }).optional(),
|
|
632
|
+
address_line1: z.string().register(z.globalRegistry, { description: "Billing address line 1.\n" }),
|
|
633
|
+
address_line2: z.string().register(z.globalRegistry, { description: "Billing address line 2.\n" }),
|
|
634
|
+
address_postal_code: z.string().register(z.globalRegistry, { description: "Billing address postal code.\n" }),
|
|
635
|
+
address_state: z.string().register(z.globalRegistry, { description: "Billing address state or region.\n" }),
|
|
636
|
+
orb_portal_url: z.string().register(z.globalRegistry, { description: "Orb user portal url\n" }).optional(),
|
|
637
|
+
tax_id: z.string().register(z.globalRegistry, { description: "The tax identification number for the billing account, displayed on invoices.\n" }).optional(),
|
|
638
|
+
tax_id_type: z.string().register(z.globalRegistry, { description: "The type of the tax identification number based on the country.\n" }).optional(),
|
|
639
|
+
plan_details: zPlanDetails.optional(),
|
|
640
|
+
spending_limit_cents: z.int().nullish()
|
|
641
|
+
});
|
|
642
|
+
const zDatabase = z.strictObject({
|
|
643
|
+
id: z.int().register(z.globalRegistry, { description: "The database ID\n" }),
|
|
644
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the branch this database belongs to." }),
|
|
645
|
+
name: z.string().register(z.globalRegistry, { description: "The database name\n" }),
|
|
646
|
+
owner_name: z.string().register(z.globalRegistry, { description: "The name of role that owns the database\n" }),
|
|
647
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the database was created\n" }),
|
|
648
|
+
updated_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the database was last updated\n" })
|
|
649
|
+
});
|
|
650
|
+
const zDatabaseCreateRequest = z.strictObject({ database: z.strictObject({
|
|
651
|
+
name: z.string().register(z.globalRegistry, { description: "Name of the database to create.\n" }),
|
|
652
|
+
owner_name: z.string().register(z.globalRegistry, { description: "The name of the role that owns the database\n" })
|
|
653
|
+
}).register(z.globalRegistry, { description: "Configuration for the new Postgres database." }) });
|
|
654
|
+
const zDatabaseUpdateRequest = z.strictObject({ database: z.strictObject({
|
|
655
|
+
name: z.string().register(z.globalRegistry, { description: "Name of the database to update.\n" }).optional(),
|
|
656
|
+
owner_name: z.string().register(z.globalRegistry, { description: "The name of the role that owns the database\n" }).optional()
|
|
657
|
+
}).register(z.globalRegistry, { description: "Properties to update on the database." }) });
|
|
658
|
+
const zDatabaseResponse = z.strictObject({ database: zDatabase });
|
|
659
|
+
const zDatabasesResponse = z.strictObject({ databases: z.array(zDatabase).register(z.globalRegistry, { description: "Databases on the branch. Each includes `id`, `name`, `owner_name`, and `created_at`." }) });
|
|
660
|
+
/**
|
|
661
|
+
* Organization member's role. `admin`: full administrative access. `editor` (and its legacy alias `member`): standard access governed by project permissions. `viewer` and `collaborator`: additional scoped project roles. Some values may not be available for all organizations.
|
|
662
|
+
*/
|
|
663
|
+
const zMemberRole = z.enum([
|
|
664
|
+
"admin",
|
|
665
|
+
"member",
|
|
666
|
+
"editor",
|
|
667
|
+
"viewer",
|
|
668
|
+
"collaborator"
|
|
669
|
+
]).register(z.globalRegistry, { description: "Organization member's role. `admin`: full administrative access. `editor` (and its legacy alias `member`): standard access governed by project permissions. `viewer` and `collaborator`: additional scoped project roles. Some values may not be available for all organizations." });
|
|
670
|
+
const zInvitation = z.strictObject({
|
|
671
|
+
id: z.uuid().register(z.globalRegistry, { description: "The invitation ID." }),
|
|
672
|
+
email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email of the invited user" }),
|
|
673
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Organization id as it is stored in Neon" }),
|
|
674
|
+
invited_by: z.uuid().register(z.globalRegistry, { description: "UUID for the user_id who extended the invitation" }),
|
|
675
|
+
invited_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp when the invitation was created" }),
|
|
676
|
+
role: zMemberRole
|
|
677
|
+
});
|
|
678
|
+
const zMember = z.strictObject({
|
|
679
|
+
id: z.uuid().register(z.globalRegistry, { description: "The organization member's ID." }),
|
|
680
|
+
user_id: z.uuid().register(z.globalRegistry, { description: "The Neon user ID." }),
|
|
681
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID. Returned as `id` from `GET /users/me/organizations`." }),
|
|
682
|
+
role: zMemberRole,
|
|
683
|
+
joined_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp when the user joined the organization." }).optional()
|
|
684
|
+
});
|
|
685
|
+
const zMemberUserInfo = z.strictObject({
|
|
686
|
+
email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email address of the organization member's user account." }),
|
|
687
|
+
has_mfa: z.boolean().register(z.globalRegistry, { description: "Whether the member has MFA (TOTP) enabled" }).optional(),
|
|
688
|
+
deactivated_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp of when the user account was deactivated.\nAbsent for active users. When present, the UI should render a\n\"Deactivated\" badge inline next to the member.\n" }).optional()
|
|
689
|
+
});
|
|
690
|
+
const zMemberWithUser = z.strictObject({
|
|
691
|
+
member: zMember,
|
|
692
|
+
user: zMemberUserInfo
|
|
693
|
+
});
|
|
694
|
+
const zOrganization = z.strictObject({
|
|
695
|
+
id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID. Use as the `org_id` path parameter in other endpoints." }),
|
|
696
|
+
name: z.string().register(z.globalRegistry, { description: "Human-readable display name of the organization." }),
|
|
697
|
+
handle: z.string().register(z.globalRegistry, { description: "URL-safe identifier for the organization, used in API paths. Distinct from the display name." }),
|
|
698
|
+
plan: z.string().register(z.globalRegistry, { description: "Billing plan for the organization, for example `free`, `launch`, or `scale`." }),
|
|
699
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicting when the organization was created\n" }),
|
|
700
|
+
managed_by: z.string().register(z.globalRegistry, { description: "Organizations created via the Console or the API are managed by `console`.\nOrganizations created by other methods can't be deleted via the Console or the API.\n" }),
|
|
701
|
+
updated_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the organization was updated\n" }),
|
|
702
|
+
allow_hipaa_projects: z.boolean().register(z.globalRegistry, { description: "If true, allow account to mark projects as HIPAA" }).optional(),
|
|
703
|
+
require_mfa: z.boolean().register(z.globalRegistry, { description: "If true, all members must have MFA enabled to access this organization" }).optional()
|
|
704
|
+
});
|
|
705
|
+
const zOrganizationsResponse = z.strictObject({ organizations: z.array(zOrganization).register(z.globalRegistry, { description: "Organizations returned by the request. Each includes `id`, `name`, `handle`, and `plan`." }) });
|
|
706
|
+
const zOrganizationInvitationsResponse = z.strictObject({ invitations: z.array(zInvitation).register(z.globalRegistry, { description: "List of pending invitations for the organization." }) });
|
|
707
|
+
const zOrganizationInviteCreateRequest = z.strictObject({
|
|
708
|
+
email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email address of the person to invite to the organization." }),
|
|
709
|
+
role: zMemberRole
|
|
710
|
+
});
|
|
711
|
+
const zOrganizationInvitesCreateRequest = z.strictObject({ invitations: z.array(zOrganizationInviteCreateRequest).register(z.globalRegistry, { description: "Invitations to create for the organization." }) });
|
|
712
|
+
const zOrganizationMemberUpdateRequest = z.strictObject({ role: zMemberRole });
|
|
713
|
+
const zOrganizationMembersResponse = z.strictObject({ members: z.array(zMemberWithUser).register(z.globalRegistry, { description: "Members of the organization, each combining membership details (role, status) with the associated user's identity." }) });
|
|
714
|
+
const zRegionResponse = z.strictObject({
|
|
715
|
+
region_id: z.string().register(z.globalRegistry, { description: "Cloud region where the resource's Postgres compute and storage reside (for example, `aws-us-east-1`). Valid values are returned by `GET /regions`." }),
|
|
716
|
+
name: z.string().register(z.globalRegistry, { description: "A short description of the region." }),
|
|
717
|
+
default: z.boolean().register(z.globalRegistry, { description: "True if this region is selected by default when no region is specified during project creation." }),
|
|
718
|
+
geo_lat: z.string().register(z.globalRegistry, { description: "The geographical latitude (approximate) for the region. Empty if unknown." }),
|
|
719
|
+
geo_long: z.string().register(z.globalRegistry, { description: "The geographical longitude (approximate) for the region. Empty if unknown." })
|
|
720
|
+
});
|
|
721
|
+
const zActiveRegionsResponse = z.strictObject({ regions: z.array(zRegionResponse).register(z.globalRegistry, { description: "The list of active regions" }) });
|
|
722
|
+
const zAuthDetailsResponse = z.strictObject({
|
|
723
|
+
account_id: z.string().register(z.globalRegistry, { description: "The ID of the account associated with this authentication record." }),
|
|
724
|
+
auth_method: z.enum([
|
|
725
|
+
"keycloak",
|
|
726
|
+
"session_cookie",
|
|
727
|
+
"api_key_user",
|
|
728
|
+
"api_key_org",
|
|
729
|
+
"oauth"
|
|
730
|
+
]).register(z.globalRegistry, { description: "Authentication method used for the request:\n- `keycloak`: Keycloak identity provider authentication.\n- `session_cookie`: Browser session cookie authentication.\n- `api_key_user`: API key scoped to a user account.\n- `api_key_org`: API key scoped to an organization.\n- `oauth`: OAuth-based authentication.\n" }),
|
|
731
|
+
auth_data: z.string().optional()
|
|
732
|
+
});
|
|
733
|
+
const zTransferProjectsToOrganizationRequest = z.strictObject({
|
|
734
|
+
destination_org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The destination organization identifier" }),
|
|
735
|
+
project_ids: z.array(z.string().regex(/^[a-z0-9-]{1,60}$/)).min(1).max(400).register(z.globalRegistry, { description: "The list of projects ids to transfer. Maximum of 400 project ids" })
|
|
736
|
+
});
|
|
737
|
+
/**
|
|
738
|
+
* Identity provider id from keycloak
|
|
739
|
+
*/
|
|
740
|
+
const zIdentityProviderId = z.enum([
|
|
741
|
+
"github",
|
|
742
|
+
"google",
|
|
743
|
+
"hasura",
|
|
744
|
+
"microsoft",
|
|
745
|
+
"microsoftv2",
|
|
746
|
+
"vercelmp",
|
|
747
|
+
"keycloak"
|
|
748
|
+
]).register(z.globalRegistry, { description: "Identity provider id from keycloak" });
|
|
749
|
+
const zCurrentUserAuthAccount = z.strictObject({
|
|
750
|
+
email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email address associated with this auth account." }),
|
|
751
|
+
image: z.string().register(z.globalRegistry, { description: "URL of the user's profile picture as provided by the identity provider." }),
|
|
752
|
+
login: z.string().register(z.globalRegistry, { description: "Deprecated. Use the `email` field.\n" }),
|
|
753
|
+
name: z.string().register(z.globalRegistry, { description: "Display name of the account as provided by the identity provider." }),
|
|
754
|
+
provider: zIdentityProviderId
|
|
755
|
+
});
|
|
756
|
+
const zCurrentUserInfoResponse = z.strictObject({
|
|
757
|
+
active_seconds_limit: z.int().register(z.globalRegistry, { description: "Control plane observes active endpoints of a user this amount of wall-clock time.\n" }),
|
|
758
|
+
billing_account: zBillingAccount.optional(),
|
|
759
|
+
auth_accounts: z.array(zCurrentUserAuthAccount).register(z.globalRegistry, { description: "Authentication provider accounts linked to the current user." }),
|
|
760
|
+
email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email address of the authenticated user." }),
|
|
761
|
+
id: z.string().register(z.globalRegistry, { description: "The Neon user ID." }),
|
|
762
|
+
image: z.string().register(z.globalRegistry, { description: "URL of the user's profile avatar image." }),
|
|
763
|
+
login: z.string().register(z.globalRegistry, { description: "Deprecated. Use the `email` field.\n" }),
|
|
764
|
+
name: z.string().register(z.globalRegistry, { description: "First name of the current user." }),
|
|
765
|
+
last_name: z.string().register(z.globalRegistry, { description: "Last name of the current user." }),
|
|
766
|
+
projects_limit: z.int().register(z.globalRegistry, { description: "Maximum number of projects the account is allowed to create under the current plan." }),
|
|
767
|
+
branches_limit: z.int().register(z.globalRegistry, { description: "Maximum number of branches allowed for the account under the current plan." }),
|
|
768
|
+
max_autoscaling_limit: z.number().register(z.globalRegistry, { description: "The maximum autoscaling limit in Compute Units.\nA value of 0 indicates no limit is configured.\n" }),
|
|
769
|
+
compute_seconds_limit: z.int().register(z.globalRegistry, { description: "Maximum Postgres compute time, in seconds, allowed under the account's current plan." }).optional(),
|
|
770
|
+
plan: z.string().register(z.globalRegistry, { description: "Current billing plan for the user's account." })
|
|
771
|
+
});
|
|
772
|
+
/**
|
|
773
|
+
* Per-project consumption quotas. If a quota is exceeded, all active computes
|
|
774
|
+
* are automatically suspended and cannot be started via API calls or incoming connections.
|
|
775
|
+
*
|
|
776
|
+
* The exception is `logical_size_bytes`, which is enforced per branch.
|
|
777
|
+
* If a branch exceeds its `logical_size_bytes` quota, computes can still be started,
|
|
778
|
+
* but write operations will fail—allowing data to be deleted to free up space.
|
|
779
|
+
* Computes on other branches are not affected.
|
|
780
|
+
*
|
|
781
|
+
* Setting `logical_size_bytes` overrides any lower value set by the `neon.max_cluster_size` Postgres setting.
|
|
782
|
+
*
|
|
783
|
+
* Quotas are enforced using per-project consumption metrics with the same names.
|
|
784
|
+
* These metrics reset at the start of each billing period. `logical_size_bytes`
|
|
785
|
+
* is also an exception—it reflects the total data stored in a branch and does not reset.
|
|
786
|
+
*
|
|
787
|
+
* A zero or empty quota value means “unlimited.”
|
|
788
|
+
*
|
|
789
|
+
*/
|
|
790
|
+
const zProjectQuota = z.strictObject({
|
|
791
|
+
active_time_seconds: z.int().gte(0).register(z.globalRegistry, { description: "The total amount of wall-clock time allowed to be spent by the project's compute endpoints.\n" }).optional(),
|
|
792
|
+
compute_time_seconds: z.int().gte(0).register(z.globalRegistry, { description: "The total amount of CPU seconds allowed to be spent by the project's compute endpoints.\n" }).optional(),
|
|
793
|
+
written_data_bytes: z.int().gte(0).register(z.globalRegistry, { description: "Total amount of data written to all of a project's branches.\n" }).optional(),
|
|
794
|
+
data_transfer_bytes: z.int().gte(0).register(z.globalRegistry, { description: "Total amount of data transferred from all of a project's branches using the proxy.\n" }).optional(),
|
|
795
|
+
logical_size_bytes: z.int().gte(0).register(z.globalRegistry, { description: "Limit on the logical size of every project's branch.\n\nIf a branch exceeds its `logical_size_bytes` quota, computes can still be started,\nbut write operations will fail—allowing data to be deleted to free up space.\nComputes on other branches are not affected.\n\nSetting `logical_size_bytes` overrides any lower value set by the `neon.max_cluster_size` Postgres setting.\n" }).optional()
|
|
796
|
+
}).register(z.globalRegistry, { description: "Per-project consumption quotas. If a quota is exceeded, all active computes\nare automatically suspended and cannot be started via API calls or incoming connections.\n\nThe exception is `logical_size_bytes`, which is enforced per branch.\nIf a branch exceeds its `logical_size_bytes` quota, computes can still be started,\nbut write operations will fail—allowing data to be deleted to free up space.\nComputes on other branches are not affected.\n\nSetting `logical_size_bytes` overrides any lower value set by the `neon.max_cluster_size` Postgres setting.\n\nQuotas are enforced using per-project consumption metrics with the same names.\nThese metrics reset at the start of each billing period. `logical_size_bytes`\nis also an exception—it reflects the total data stored in a branch and does not reset.\n\nA zero or empty quota value means “unlimited.”\n" });
|
|
797
|
+
const zProjectSettingsData = z.strictObject({
|
|
798
|
+
quota: zProjectQuota.optional(),
|
|
799
|
+
allowed_ips: zAllowedIps.optional(),
|
|
800
|
+
enable_logical_replication: z.boolean().register(z.globalRegistry, { description: "Sets wal_level=logical for all compute endpoints in this project.\nAll active endpoints will be suspended.\nOnce enabled, logical replication cannot be disabled.\n" }).optional(),
|
|
801
|
+
maintenance_window: zMaintenanceWindow.optional(),
|
|
802
|
+
block_public_connections: z.boolean().register(z.globalRegistry, { description: "When set, connections from the public internet\nare disallowed. This supersedes the AllowedIPs list.\nThis parameter is under active development and its semantics may change in the future.\n" }).optional(),
|
|
803
|
+
block_vpc_connections: z.boolean().register(z.globalRegistry, { description: "When set, connections using VPC endpoints are disallowed.\nThis parameter is under active development and its semantics may change in the future.\n" }).optional(),
|
|
804
|
+
audit_log_level: zProjectAuditLogLevel.optional(),
|
|
805
|
+
hipaa: z.boolean().register(z.globalRegistry, { description: "Enables HIPAA compliance mode for the project, including audit logging." }).optional(),
|
|
806
|
+
preload_libraries: zPreloadLibraries.optional()
|
|
807
|
+
});
|
|
808
|
+
/**
|
|
809
|
+
* A raw representation of Postgres settings
|
|
810
|
+
*/
|
|
811
|
+
const zPgSettingsData = z.record(z.string(), z.string()).register(z.globalRegistry, { description: "A raw representation of Postgres settings" });
|
|
812
|
+
/**
|
|
813
|
+
* Deprecated. A raw representation of PgBouncer settings. Removal scheduled for June 20, 2026.
|
|
814
|
+
*
|
|
815
|
+
*
|
|
816
|
+
* @deprecated
|
|
817
|
+
*/
|
|
818
|
+
const zPgbouncerSettingsData = z.record(z.string(), z.string()).register(z.globalRegistry, { description: "Deprecated. A raw representation of PgBouncer settings. Removal scheduled for June 20, 2026.\n" });
|
|
819
|
+
/**
|
|
820
|
+
* A collection of settings for a compute endpoint
|
|
821
|
+
*/
|
|
822
|
+
const zEndpointSettingsData = z.strictObject({
|
|
823
|
+
pg_settings: zPgSettingsData.optional(),
|
|
824
|
+
pgbouncer_settings: zPgbouncerSettingsData.optional(),
|
|
825
|
+
preload_libraries: zPreloadLibraries.optional()
|
|
826
|
+
}).register(z.globalRegistry, { description: "A collection of settings for a compute endpoint" });
|
|
827
|
+
const zBranchCreateRequestEndpointOptions = z.strictObject({
|
|
828
|
+
type: zEndpointType,
|
|
829
|
+
settings: zEndpointSettingsData.optional(),
|
|
830
|
+
autoscaling_limit_min_cu: zComputeUnit.optional(),
|
|
831
|
+
autoscaling_limit_max_cu: zComputeUnit.optional(),
|
|
832
|
+
provisioner: zProvisioner.optional(),
|
|
833
|
+
suspend_timeout_seconds: zSuspendTimeoutSeconds.optional()
|
|
834
|
+
});
|
|
835
|
+
const zBranchCreateRequest = z.strictObject({
|
|
836
|
+
endpoints: z.array(zBranchCreateRequestEndpointOptions).register(z.globalRegistry, { description: "Compute endpoints to create together with the branch. If omitted, the branch is created without any compute endpoint. Endpoints can be added to the branch separately after creation." }).optional(),
|
|
837
|
+
branch: z.strictObject({
|
|
838
|
+
parent_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The `branch_id` of the parent branch. If omitted or empty, the branch will be created from the project's default branch.\n" }).optional(),
|
|
839
|
+
name: z.string().min(1).max(256).register(z.globalRegistry, { description: "The branch name\n" }).optional(),
|
|
840
|
+
parent_lsn: z.string().register(z.globalRegistry, { description: "A Log Sequence Number (LSN) on the parent branch. The branch will be created with data from this LSN.\n" }).optional(),
|
|
841
|
+
parent_timestamp: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp identifying a point in time on the parent branch. The branch will be created with data starting from this point in time. RFC 3339 format.\n" }).optional(),
|
|
842
|
+
protected: z.boolean().register(z.globalRegistry, { description: "Whether the branch is protected. Protected branches (and their computes) cannot be deleted, archived, or reset, and block deletion of the project. Can be gated by `protected_branches_only` in the IP allowlist. Paid plans only.\n" }).optional(),
|
|
843
|
+
archived: z.boolean().register(z.globalRegistry, { description: "Whether to create the branch in the archived state. When omitted, the branch is created as a normal (non-archived) branch.\n" }).optional(),
|
|
844
|
+
init_source: z.string().register(z.globalRegistry, { description: "Source of initialization for the branch. `parent-data` copies schema and data from the parent branch. `parent-schema` copies schema only from the parent branch. `schema-only` creates a new root branch containing schema only, using `parent_id` as the source; optionally, `parent_lsn` or `parent_timestamp` can narrow the source point. `import` initializes the branch from an external import." }).optional(),
|
|
845
|
+
expires_at: z.iso.datetime().register(z.globalRegistry, { description: "The timestamp when the branch is scheduled to expire and be automatically deleted. Must be set by the client following the [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6) format with precision up to seconds (such as 2025-06-09T18:02:16Z). Deletion is performed by a background job and may not occur exactly at the specified time.\n\nAccess to this feature is currently limited to participants in the Early Access Program.\n" }).optional()
|
|
846
|
+
}).register(z.globalRegistry, { description: "Optional configuration for the new branch, for example `name`, `parent_id` (fork from a branch), `parent_lsn` or `parent_timestamp` (point-in-time branching), and `protected`." }).optional()
|
|
847
|
+
});
|
|
848
|
+
const zEndpoint = z.strictObject({
|
|
849
|
+
host: z.string().register(z.globalRegistry, { description: "The hostname of the compute endpoint. This is the hostname specified when connecting to a Neon database.\n" }),
|
|
850
|
+
id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The compute endpoint ID. Compute endpoint IDs have an `ep-` prefix. For example: `ep-little-smoke-851426`\n" }),
|
|
851
|
+
name: z.string().register(z.globalRegistry, { description: "Optional name of the compute endpoint\n" }).optional(),
|
|
852
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the project this compute endpoint belongs to." }),
|
|
853
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the branch this compute endpoint belongs to." }),
|
|
854
|
+
autoscaling_limit_min_cu: zComputeUnit,
|
|
855
|
+
autoscaling_limit_max_cu: zComputeUnit,
|
|
856
|
+
region_id: z.string().register(z.globalRegistry, { description: "Cloud region where the resource's Postgres compute and storage reside (for example, `aws-us-east-1`). Valid values are returned by `GET /regions`.\n" }),
|
|
857
|
+
type: zEndpointType,
|
|
858
|
+
current_state: zEndpointState,
|
|
859
|
+
pending_state: zEndpointState.optional(),
|
|
860
|
+
settings: zEndpointSettingsData,
|
|
861
|
+
pooler_enabled: z.boolean().register(z.globalRegistry, { description: "Deprecated. To use connection pooling, append `-pooler` to the endpoint ID in the connection string.\n" }),
|
|
862
|
+
pooler_mode: zEndpointPoolerMode,
|
|
863
|
+
disabled: z.boolean().register(z.globalRegistry, { description: "Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action.\n" }),
|
|
864
|
+
passwordless_access: z.boolean().register(z.globalRegistry, { description: "Whether to permit passwordless access to the compute endpoint\n" }),
|
|
865
|
+
last_active: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the compute endpoint was last active\n" }).optional(),
|
|
866
|
+
creation_source: z.string().register(z.globalRegistry, { description: "The compute endpoint creation source\n" }),
|
|
867
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the compute endpoint was created\n" }),
|
|
868
|
+
updated_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the compute endpoint was last updated\n" }),
|
|
869
|
+
started_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the compute endpoint was last started\n" }).optional(),
|
|
870
|
+
suspended_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the compute endpoint was last suspended\n" }).optional(),
|
|
871
|
+
proxy_host: z.string().register(z.globalRegistry, { description: "Deprecated. Use the `host` property instead.\n" }),
|
|
872
|
+
suspend_timeout_seconds: zSuspendTimeoutSeconds,
|
|
873
|
+
provisioner: zProvisioner,
|
|
874
|
+
compute_release_version: z.string().register(z.globalRegistry, { description: "Attached compute's release version number.\n" }).optional()
|
|
875
|
+
});
|
|
876
|
+
const zEndpointCreateRequest = z.strictObject({ endpoint: z.strictObject({
|
|
877
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The ID of the branch the compute endpoint will be associated with\n" }),
|
|
878
|
+
region_id: z.string().register(z.globalRegistry, { description: "The region where the compute endpoint will be created. Only the project's `region_id` is permitted.\n" }).optional(),
|
|
879
|
+
type: zEndpointType,
|
|
880
|
+
settings: zEndpointSettingsData.optional(),
|
|
881
|
+
autoscaling_limit_min_cu: zComputeUnit.optional(),
|
|
882
|
+
autoscaling_limit_max_cu: zComputeUnit.optional(),
|
|
883
|
+
provisioner: zProvisioner.optional(),
|
|
884
|
+
pooler_enabled: z.boolean().register(z.globalRegistry, { description: "Deprecated. To enable connection pooling, append `-pooler` to the endpoint ID in the connection string.\nSee [How to use connection pooling](https://neon.com/docs/connect/connection-pooling#how-to-use-connection-pooling)\n" }).optional(),
|
|
885
|
+
pooler_mode: zEndpointPoolerMode.optional(),
|
|
886
|
+
disabled: z.boolean().register(z.globalRegistry, { description: "Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action. However, the compute endpoint is periodically\nenabled by check_availability operations.\n" }).optional(),
|
|
887
|
+
passwordless_access: z.boolean().register(z.globalRegistry, { description: "NOT YET IMPLEMENTED. Whether to permit passwordless access to the compute endpoint.\n" }).optional(),
|
|
888
|
+
suspend_timeout_seconds: zSuspendTimeoutSeconds.optional(),
|
|
889
|
+
name: z.string().min(1).max(64).register(z.globalRegistry, { description: "Optional name of the compute endpoint\n" }).optional()
|
|
890
|
+
}).register(z.globalRegistry, { description: "Configuration for the compute endpoint to create." }) });
|
|
891
|
+
const zEndpointUpdateRequest = z.strictObject({ endpoint: z.strictObject({
|
|
892
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Deprecated. The destination branch ID; must not have an existing read-write endpoint.\n" }).optional(),
|
|
893
|
+
autoscaling_limit_min_cu: zComputeUnit.optional(),
|
|
894
|
+
autoscaling_limit_max_cu: zComputeUnit.optional(),
|
|
895
|
+
provisioner: zProvisioner.optional(),
|
|
896
|
+
settings: zEndpointSettingsData.optional(),
|
|
897
|
+
pooler_enabled: z.boolean().register(z.globalRegistry, { description: "Deprecated. To enable connection pooling, append `-pooler` to the endpoint ID in the connection string.\nSee [How to use connection pooling](https://neon.com/docs/connect/connection-pooling#how-to-use-connection-pooling)\n" }).optional(),
|
|
898
|
+
pooler_mode: zEndpointPoolerMode.optional(),
|
|
899
|
+
disabled: z.boolean().register(z.globalRegistry, { description: "Whether to restrict connections to the compute endpoint.\nEnabling this option schedules a suspend compute operation.\nA disabled compute endpoint cannot be enabled by a connection or\nconsole action. However, the compute endpoint is periodically\nenabled by check_availability operations.\n" }).optional(),
|
|
900
|
+
passwordless_access: z.boolean().register(z.globalRegistry, { description: "NOT YET IMPLEMENTED. Whether to permit passwordless access to the compute endpoint.\n" }).optional(),
|
|
901
|
+
suspend_timeout_seconds: zSuspendTimeoutSeconds.optional(),
|
|
902
|
+
name: z.string().min(1).max(64).register(z.globalRegistry, { description: "Optional name of the compute endpoint\n" }).optional()
|
|
903
|
+
}).register(z.globalRegistry, { description: "Parameters for the compute endpoint update." }) });
|
|
904
|
+
const zEndpointResponse = z.strictObject({ endpoint: zEndpoint });
|
|
905
|
+
const zEndpointsResponse = z.strictObject({ endpoints: z.array(zEndpoint).register(z.globalRegistry, { description: "Compute endpoints in the project. Each includes `id`, `branch_id`, `host`, and `type`." }) });
|
|
906
|
+
const zEndpointsOptionalResponse = z.strictObject({ endpoints: z.array(zEndpoint).register(z.globalRegistry, { description: "Compute endpoints associated with the project." }).optional() });
|
|
907
|
+
/**
|
|
908
|
+
* A collection of settings for a Neon endpoint
|
|
909
|
+
*/
|
|
910
|
+
const zDefaultEndpointSettings = z.strictObject({
|
|
911
|
+
pg_settings: zPgSettingsData.optional(),
|
|
912
|
+
pgbouncer_settings: zPgbouncerSettingsData.optional(),
|
|
913
|
+
autoscaling_limit_min_cu: zComputeUnit.optional(),
|
|
914
|
+
autoscaling_limit_max_cu: zComputeUnit.optional(),
|
|
915
|
+
suspend_timeout_seconds: zSuspendTimeoutSeconds.optional()
|
|
916
|
+
}).register(z.globalRegistry, { description: "A collection of settings for a Neon endpoint" });
|
|
917
|
+
const zProjectUpdateRequest = z.strictObject({ project: z.strictObject({
|
|
918
|
+
settings: zProjectSettingsData.optional(),
|
|
919
|
+
name: z.string().min(1).max(256).register(z.globalRegistry, { description: "The project name" }).optional(),
|
|
920
|
+
default_endpoint_settings: zDefaultEndpointSettings.optional(),
|
|
921
|
+
history_retention_seconds: z.int().gte(0).lte(2592e3).register(z.globalRegistry, { description: "History window (point-in-time restore range) for all branches, in seconds. `0` disables it. Default 1 day (Free: 6 hours). Maximum depends on plan: Free 6 hours (21600), Launch 7 days (604800), Scale 30 days (2592000).\n" }).optional()
|
|
922
|
+
}) });
|
|
923
|
+
/**
|
|
924
|
+
* The major Postgres version number. Supported versions are `14`, `15`, `16`, `17`, and `18`. `19` is rolling out and is accepted only in regions where it is enabled; requesting it elsewhere returns an error.
|
|
925
|
+
*/
|
|
926
|
+
const zPgVersion = z.int().gte(14).lte(19).register(z.globalRegistry, { description: "The major Postgres version number. Supported versions are `14`, `15`, `16`, `17`, and `18`. `19` is rolling out and is accepted only in regions where it is enabled; requesting it elsewhere returns an error." });
|
|
927
|
+
/**
|
|
928
|
+
* Essential data about the project. Full data is available at `GET /projects/{project_id}`.
|
|
929
|
+
*
|
|
930
|
+
*/
|
|
931
|
+
const zProjectListItem = z.strictObject({
|
|
932
|
+
id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID. Use as the `project_id` path parameter in other endpoints." }),
|
|
933
|
+
platform_id: z.string().register(z.globalRegistry, { description: "The cloud platform identifier. Currently, only AWS is supported, for which the identifier is `aws`.\n" }),
|
|
934
|
+
region_id: z.string().register(z.globalRegistry, { description: "Cloud region where the project's Postgres compute and storage reside (for example, `aws-us-east-2`). Valid values are returned by `GET /regions`.\n" }),
|
|
935
|
+
name: z.string().register(z.globalRegistry, { description: "The project name\n" }),
|
|
936
|
+
provisioner: zProvisioner,
|
|
937
|
+
default_endpoint_settings: zDefaultEndpointSettings.optional(),
|
|
938
|
+
settings: zProjectSettingsData.optional(),
|
|
939
|
+
pg_version: zPgVersion,
|
|
940
|
+
proxy_host: z.string().register(z.globalRegistry, { description: "The proxy host for the project. This value combines the `region_id`, the `platform_id`, and the Neon domain (`neon.tech`).\n" }),
|
|
941
|
+
branch_logical_size_limit: z.int().register(z.globalRegistry, { description: "The logical size limit for a branch. The value is in MiB.\n" }),
|
|
942
|
+
branch_logical_size_limit_bytes: z.int().register(z.globalRegistry, { description: "The logical size limit for a branch. The value is in B.\n" }),
|
|
943
|
+
store_passwords: z.boolean().register(z.globalRegistry, { description: "Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization.\n" }),
|
|
944
|
+
active_time: z.int().gte(0).register(z.globalRegistry, { description: "Control plane observed endpoints of this project being active this amount of wall-clock time.\n" }),
|
|
945
|
+
cpu_used_sec: z.int().register(z.globalRegistry, { description: "Deprecated. Use `compute_time_seconds` from `GET /projects/{project_id}` instead.\n" }),
|
|
946
|
+
maintenance_starts_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when project maintenance begins. If set, the project is placed into maintenance mode at this time.\n" }).optional(),
|
|
947
|
+
creation_source: z.string().register(z.globalRegistry, { description: "The project creation source\n" }),
|
|
948
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the project was created\n" }),
|
|
949
|
+
updated_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the project was last updated\n" }),
|
|
950
|
+
synthetic_storage_size: z.int().register(z.globalRegistry, { description: "The current space occupied by the project in Postgres storage, in bytes. Synthetic Postgres storage size combines the logical data size and Write-Ahead Log (WAL) size for all branches in a project.\n" }).optional(),
|
|
951
|
+
quota_reset_at: z.iso.datetime().register(z.globalRegistry, { description: "Deprecated. Use `consumption_period_end` from `GET /projects/{project_id}` instead. A timestamp indicating when the project quota resets.\n" }).optional(),
|
|
952
|
+
owner_id: z.string().register(z.globalRegistry, { description: "ID of the organization that owns the project." }),
|
|
953
|
+
compute_last_active_at: z.iso.datetime().register(z.globalRegistry, { description: "The most recent time when any endpoint of this project was active.\n\nOmitted when observed no activity for endpoints of this project.\n" }).optional(),
|
|
954
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "ID of the organization that owns the project. Project permissions are granted to organization members as configured by the organization's admins, independent of which member created the project.\n" }).optional(),
|
|
955
|
+
org_name: z.string().register(z.globalRegistry, { description: "Name of the organization that owns the project.\n" }).optional(),
|
|
956
|
+
history_retention_seconds: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).register(z.globalRegistry, { description: "The number of seconds to retain the shared history for all branches in this project.\n" }).optional(),
|
|
957
|
+
hipaa_enabled_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when HIPAA was enabled for this project" }).optional(),
|
|
958
|
+
deleted_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the project was deleted" }).optional(),
|
|
959
|
+
recoverable_until: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating the project will be recoverable until this date and time." }).optional(),
|
|
960
|
+
effective_project_permission: zProjectPermissionLevel.nullish()
|
|
961
|
+
}).register(z.globalRegistry, { description: "Essential data about the project. Full data is available at `GET /projects/{project_id}`.\n" });
|
|
962
|
+
const zProjectsResponse = z.strictObject({
|
|
963
|
+
projects: z.array(zProjectListItem).register(z.globalRegistry, { description: "List of projects accessible to the caller. Projects that exist but could not be retrieved are identified in `unavailable_project_ids`." }),
|
|
964
|
+
unavailable_project_ids: z.array(z.string().regex(/^[a-z0-9-]{1,60}$/)).register(z.globalRegistry, { description: "A list of project IDs indicating which projects are known to exist, but whose details could not\nbe fetched within the requested (or implicit) time limit\n" }).optional()
|
|
965
|
+
});
|
|
966
|
+
const zProjectOwnerData = z.strictObject({
|
|
967
|
+
email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email address of the project owner." }),
|
|
968
|
+
name: z.string().register(z.globalRegistry, { description: "Display name of the project owner." }),
|
|
969
|
+
branches_limit: z.int().register(z.globalRegistry, { description: "Maximum number of branches the owner is allowed to create across their projects." }),
|
|
970
|
+
subscription_type: zBillingSubscriptionType
|
|
971
|
+
});
|
|
972
|
+
const zProject = z.strictObject({
|
|
973
|
+
data_storage_bytes_hour: z.int().gte(0).register(z.globalRegistry, { description: "Bytes-Hour. Project consumed that much Postgres storage hourly during the billing period. The value has some lag.\nThe value is reset at the beginning of each billing period.\n" }),
|
|
974
|
+
data_transfer_bytes: z.int().gte(0).register(z.globalRegistry, { description: "Bytes. Egress traffic from the Neon cloud to the client for given project over the billing period.\nIncludes deleted endpoints. The value has some lag. The value is reset at the beginning of each billing period.\n" }),
|
|
975
|
+
written_data_bytes: z.int().gte(0).register(z.globalRegistry, { description: "Bytes. Amount of WAL that travelled through Postgres storage for given project across all branches.\nThe value has some lag. The value is reset at the beginning of each billing period.\n" }),
|
|
976
|
+
compute_time_seconds: z.int().gte(0).register(z.globalRegistry, { description: "Seconds. The number of CPU seconds used by the project's compute endpoints, including compute endpoints that have been deleted.\nThe value has some lag. The value is reset at the beginning of each billing period.\nExamples:\n1. An endpoint that uses 1 CPU for 1 second is equal to `compute_time=1`.\n2. An endpoint that uses 2 CPUs simultaneously for 1 second is equal to `compute_time=2`.\n" }),
|
|
977
|
+
active_time_seconds: z.int().gte(0).register(z.globalRegistry, { description: "Seconds. Control plane observed endpoints of this project being active this amount of wall-clock time.\nThe value has some lag.\nThe value is reset at the beginning of each billing period.\n" }),
|
|
978
|
+
cpu_used_sec: z.int().register(z.globalRegistry, { description: "Deprecated. Use `compute_time_seconds` instead.\n" }),
|
|
979
|
+
id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID. Use as the `project_id` path parameter in other endpoints." }),
|
|
980
|
+
platform_id: z.string().register(z.globalRegistry, { description: "The cloud platform identifier. Currently, only AWS is supported, for which the identifier is `aws`.\n" }),
|
|
981
|
+
region_id: z.string().register(z.globalRegistry, { description: "Cloud region where the resource's Postgres compute and storage reside (for example, `aws-us-east-1`). Valid values are returned by `GET /regions`.\n" }),
|
|
982
|
+
name: z.string().register(z.globalRegistry, { description: "The project name\n" }),
|
|
983
|
+
provisioner: zProvisioner,
|
|
984
|
+
default_endpoint_settings: zDefaultEndpointSettings.optional(),
|
|
985
|
+
settings: zProjectSettingsData.optional(),
|
|
986
|
+
pg_version: zPgVersion,
|
|
987
|
+
proxy_host: z.string().register(z.globalRegistry, { description: "The proxy host for the project. This value combines the `region_id`, the `platform_id`, and the Neon domain (`neon.tech`).\n" }),
|
|
988
|
+
branch_logical_size_limit: z.int().register(z.globalRegistry, { description: "The logical size limit for a branch. The value is in MiB.\n" }),
|
|
989
|
+
branch_logical_size_limit_bytes: z.int().register(z.globalRegistry, { description: "The logical size limit for a branch. The value is in B.\n" }),
|
|
990
|
+
store_passwords: z.boolean().register(z.globalRegistry, { description: "Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization.\n" }),
|
|
991
|
+
maintenance_starts_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when project maintenance begins. If set, the project is placed into maintenance mode at this time.\n" }).optional(),
|
|
992
|
+
creation_source: z.string().register(z.globalRegistry, { description: "The project creation source\n" }),
|
|
993
|
+
history_retention_seconds: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).register(z.globalRegistry, { description: "The number of seconds to retain the shared history for all branches in this project.\n" }),
|
|
994
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the project was created\n" }),
|
|
995
|
+
updated_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when the project was last updated\n" }),
|
|
996
|
+
synthetic_storage_size: z.int().register(z.globalRegistry, { description: "The current space occupied by the project in Postgres storage, in bytes. Synthetic Postgres storage size combines the logical data size and Write-Ahead Log (WAL) size for all branches in a project.\n" }).optional(),
|
|
997
|
+
consumption_period_start: z.iso.datetime().register(z.globalRegistry, { description: "A date-time indicating when Neon Cloud started measuring consumption for current consumption period.\n" }),
|
|
998
|
+
consumption_period_end: z.iso.datetime().register(z.globalRegistry, { description: "A date-time indicating when Neon Cloud plans to stop measuring consumption for current consumption period.\n" }),
|
|
999
|
+
quota_reset_at: z.iso.datetime().register(z.globalRegistry, { description: "Deprecated. Use the `consumption_period_end` field instead. A timestamp indicating when the project quota resets.\n" }).optional(),
|
|
1000
|
+
owner_id: z.string().register(z.globalRegistry, { description: "ID of the organization that owns the project." }),
|
|
1001
|
+
owner: zProjectOwnerData.optional(),
|
|
1002
|
+
compute_last_active_at: z.iso.datetime().register(z.globalRegistry, { description: "The most recent time when any endpoint of this project was active.\n\nOmitted when observed no activity for endpoints of this project.\n" }).optional(),
|
|
1003
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID. Returned as `id` from `GET /users/me/organizations`." }).optional(),
|
|
1004
|
+
maintenance_scheduled_for: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when project update begins. If set, computes might experience a brief restart around this time.\n" }).optional(),
|
|
1005
|
+
hipaa_enabled_at: z.iso.datetime().register(z.globalRegistry, { description: "A timestamp indicating when HIPAA was enabled for this project" }).optional(),
|
|
1006
|
+
effective_project_permission: zProjectPermissionLevel.nullish()
|
|
1007
|
+
});
|
|
1008
|
+
const zProjectResponse = z.strictObject({ project: zProject });
|
|
1009
|
+
const zProjectRecoverResponse = zProjectResponse.merge(zBranchesResponse);
|
|
1010
|
+
const zLimitsUnsatisfiedResponse = z.strictObject({ limits: z.array(z.strictObject({
|
|
1011
|
+
name: z.string().register(z.globalRegistry, { description: "Identifier of the unsatisfied limit. Possible values are:\n- subscription_type\n- projects_count\n- project_region\n" }),
|
|
1012
|
+
expected: z.string().register(z.globalRegistry, { description: "Required value for the limit named by `name`. Compare with `actual` to determine the shortfall." }),
|
|
1013
|
+
actual: z.string().register(z.globalRegistry, { description: "Current value of the named limit, which does not satisfy the required `expected` value." })
|
|
1014
|
+
})).register(z.globalRegistry, { description: "Plan limits that were not satisfied by the request." }) });
|
|
1015
|
+
const zProjectsWithIntegrationResponse = z.strictObject({ projects: z.array(z.strictObject({
|
|
1016
|
+
id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID. Use as the `project_id` path parameter in other endpoints." }),
|
|
1017
|
+
integration: z.string().register(z.globalRegistry, { description: "Name of the external integration associated with the project." })
|
|
1018
|
+
})).register(z.globalRegistry, { description: "Projects that have the requested integration, each including the project details and associated integration metadata." }) });
|
|
1019
|
+
/**
|
|
1020
|
+
* Configuration settings for the Neon Data API
|
|
1021
|
+
*/
|
|
1022
|
+
const zDataApiSettings = z.strictObject({
|
|
1023
|
+
db_aggregates_enabled: z.boolean().register(z.globalRegistry, { description: "Enable aggregates feature" }).optional(),
|
|
1024
|
+
db_anon_role: z.string().register(z.globalRegistry, { description: "Database role to use for anonymous requests" }).optional(),
|
|
1025
|
+
db_extra_search_path: z.string().register(z.globalRegistry, { description: "Extra schemas to add to the search path" }).optional(),
|
|
1026
|
+
db_max_rows: z.int().register(z.globalRegistry, { description: "Hard limit on the number of rows returned in a single Data API response. No limit when unset." }).optional(),
|
|
1027
|
+
db_schemas: z.array(z.string()).register(z.globalRegistry, { description: "List of schemas to expose via the API. Default: [\"public\"]" }).optional(),
|
|
1028
|
+
jwt_role_claim_key: z.string().register(z.globalRegistry, { description: "JWT claim key to use for role extraction" }).optional(),
|
|
1029
|
+
jwt_cache_max_lifetime: z.int().register(z.globalRegistry, { description: "Maximum lifetime of the Data API's JWT cache, in seconds." }).optional(),
|
|
1030
|
+
openapi_mode: z.string().register(z.globalRegistry, { description: "OpenAPI specification mode (ignore-privileges, disabled)" }).optional(),
|
|
1031
|
+
server_cors_allowed_origins: z.string().register(z.globalRegistry, { description: "CORS allowed origins" }).optional(),
|
|
1032
|
+
server_timing_enabled: z.boolean().register(z.globalRegistry, { description: "When enabled, the Data API adds `Server-Timing` headers to each response showing database execution and internal processing time. Default: disabled." }).optional()
|
|
1033
|
+
}).register(z.globalRegistry, { description: "Configuration settings for the Neon Data API" });
|
|
1034
|
+
/**
|
|
1035
|
+
* Create Neon Data API
|
|
1036
|
+
*/
|
|
1037
|
+
const zDataApiCreateRequest = z.strictObject({
|
|
1038
|
+
auth_provider: z.enum(["neon_auth", "external"]).register(z.globalRegistry, { description: "Authentication provider for the Neon Data API. `neon_auth`: use Neon's built-in managed authentication (no JWKS configuration required). `external`: use an external JWT provider, which requires `jwks_url`. When omitted, no auth provider is configured (existing setup is kept)." }).optional(),
|
|
1039
|
+
jwks_url: z.url().register(z.globalRegistry, { description: "URL of the JWKS endpoint used to verify JWTs for this Data API. Required when configuring JWT-based authentication; omit when using a non-JWT auth provider." }).optional(),
|
|
1040
|
+
provider_name: z.string().register(z.globalRegistry, { description: "Display name for the authentication provider. Accepted values include \"Clerk\", \"Stytch\", and \"Auth0\", but any non-empty string is valid. Optional field." }).optional(),
|
|
1041
|
+
jwt_audience: z.string().register(z.globalRegistry, { description: "Expected `aud` claim in incoming JWTs. When set, tokens with a different audience are rejected; tokens with no audience are still accepted. Omit to skip audience validation.\n" }).optional(),
|
|
1042
|
+
add_default_grants: z.boolean().register(z.globalRegistry, { description: "Grant all permissions to the tables in the public schema to authenticated users" }).optional(),
|
|
1043
|
+
skip_auth_schema: z.boolean().register(z.globalRegistry, { description: "Skip creating the auth schema and RLS functions" }).optional(),
|
|
1044
|
+
settings: zDataApiSettings.optional()
|
|
1045
|
+
}).register(z.globalRegistry, { description: "Create Neon Data API" });
|
|
1046
|
+
/**
|
|
1047
|
+
* Neon Data API created successfully
|
|
1048
|
+
*/
|
|
1049
|
+
const zDataApiCreateResponse = z.strictObject({ url: z.url().register(z.globalRegistry, { description: "URL of the created Data API endpoint." }) }).register(z.globalRegistry, { description: "Neon Data API created successfully" });
|
|
1050
|
+
/**
|
|
1051
|
+
* Neon Data API response
|
|
1052
|
+
*/
|
|
1053
|
+
const zDataApiReponse = z.strictObject({
|
|
1054
|
+
url: z.url().register(z.globalRegistry, { description: "The URL of the Neon Data API" }),
|
|
1055
|
+
status: z.string().register(z.globalRegistry, { description: "The status of the Neon Data API deployment" }),
|
|
1056
|
+
settings: zDataApiSettings.nullish(),
|
|
1057
|
+
available_schemas: z.array(z.string()).nullish()
|
|
1058
|
+
}).register(z.globalRegistry, { description: "Neon Data API response" });
|
|
1059
|
+
/**
|
|
1060
|
+
* Update Neon Data API
|
|
1061
|
+
*/
|
|
1062
|
+
const zDataApiUpdateRequest = z.strictObject({ settings: zDataApiSettings.optional() }).register(z.globalRegistry, { description: "Update Neon Data API" });
|
|
1063
|
+
/**
|
|
1064
|
+
* Authentication provider integrated with this Neon Auth configuration. `better_auth` integrates with Better Auth (the current, recommended provider). `stack` integrates with Stack Auth (deprecated). `mock` is a simulated provider for local development and testing only.
|
|
1065
|
+
*/
|
|
1066
|
+
const zNeonAuthSupportedAuthProvider = z.enum([
|
|
1067
|
+
"mock",
|
|
1068
|
+
"stack",
|
|
1069
|
+
"better_auth"
|
|
1070
|
+
]).register(z.globalRegistry, { description: "Authentication provider integrated with this Neon Auth configuration. `better_auth` integrates with Better Auth (the current, recommended provider). `stack` integrates with Stack Auth (deprecated). `mock` is a simulated provider for local development and testing only." });
|
|
1071
|
+
const zNeonAuthProviderProjectOwnedBy = z.enum(["user", "neon"]);
|
|
1072
|
+
const zNeonAuthProviderProjectTransferStatus = z.enum(["initiated", "finished"]);
|
|
1073
|
+
const zNeonAuthRedirectUriWhitelistDomain = z.strictObject({
|
|
1074
|
+
domain: z.string().register(z.globalRegistry, { description: "Allowed redirect URI domain for the auth provider." }),
|
|
1075
|
+
auth_provider: zNeonAuthSupportedAuthProvider
|
|
1076
|
+
});
|
|
1077
|
+
const zNeonAuthRedirectUriWhitelistResponse = z.strictObject({ domains: z.array(zNeonAuthRedirectUriWhitelistDomain).register(z.globalRegistry, { description: "Domains permitted as redirect URI targets in the whitelist." }) });
|
|
1078
|
+
const zNeonAuthAddDomainToRedirectUriWhitelistRequest = z.strictObject({
|
|
1079
|
+
domain: z.url().register(z.globalRegistry, { description: "URI to add to the redirect URI allowlist for the auth provider." }),
|
|
1080
|
+
auth_provider: zNeonAuthSupportedAuthProvider
|
|
1081
|
+
});
|
|
1082
|
+
const zNeonAuthDeleteDomainFromRedirectUriWhitelistItem = z.strictObject({ domain: z.url().register(z.globalRegistry, { description: "URI to remove from the redirect URI whitelist." }) });
|
|
1083
|
+
const zNeonAuthDeleteDomainFromRedirectUriWhitelistRequest = z.strictObject({
|
|
1084
|
+
auth_provider: zNeonAuthSupportedAuthProvider,
|
|
1085
|
+
domains: z.array(zNeonAuthDeleteDomainFromRedirectUriWhitelistItem).register(z.globalRegistry, { description: "Domain names to remove from the redirect URI whitelist for the specified auth provider." })
|
|
1086
|
+
});
|
|
1087
|
+
const zNeonAuthCreateIntegrationRequest = z.strictObject({
|
|
1088
|
+
auth_provider: zNeonAuthSupportedAuthProvider,
|
|
1089
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID. Returned as `id` from `GET /projects`." }),
|
|
1090
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`." }),
|
|
1091
|
+
database_name: z.string().register(z.globalRegistry, { description: "Name of the database to associate with the Neon Auth integration. When omitted, the integration uses the project's default database." }).optional(),
|
|
1092
|
+
role_name: z.string().register(z.globalRegistry, { description: "Deprecated. The database role for the auth integration. Omit this field; it is ignored." }).optional()
|
|
1093
|
+
});
|
|
1094
|
+
const zEnableNeonAuthIntegrationRequest = z.strictObject({
|
|
1095
|
+
auth_provider: zNeonAuthSupportedAuthProvider,
|
|
1096
|
+
database_name: z.string().register(z.globalRegistry, { description: "Name of the database to enable Neon Auth on. When omitted, the integration uses the project's default database." }).optional()
|
|
1097
|
+
});
|
|
1098
|
+
const zNeonAuthCreateIntegrationResponse = z.strictObject({
|
|
1099
|
+
auth_provider: zNeonAuthSupportedAuthProvider,
|
|
1100
|
+
auth_provider_project_id: z.string().register(z.globalRegistry, { description: "Project ID assigned by the auth provider for this integration." }),
|
|
1101
|
+
pub_client_key: z.string().register(z.globalRegistry, { description: "Publishable SDK key from the auth provider. Populated only for Stack Auth (deprecated); empty for Better Auth." }),
|
|
1102
|
+
secret_server_key: z.string().register(z.globalRegistry, { description: "Secret server-side SDK key from the auth provider. Populated only for Stack Auth (deprecated); empty for Better Auth. Treat as a credential." }),
|
|
1103
|
+
jwks_url: z.string().register(z.globalRegistry, { description: "URL of the provider's JWKS endpoint used to verify JWTs." }),
|
|
1104
|
+
schema_name: z.string().register(z.globalRegistry, { description: "Postgres schema containing the auth integration tables. Defaults to `neon_auth`." }),
|
|
1105
|
+
table_name: z.string().register(z.globalRegistry, { description: "Postgres table in the integration schema where synced user records are stored." }),
|
|
1106
|
+
base_url: z.string().register(z.globalRegistry, { description: "Base URL of the Neon Auth service for this integration. Set as the NEON_AUTH_BASE_URL environment variable in your application." }).optional()
|
|
1107
|
+
});
|
|
1108
|
+
const zNeonAuthCreateAuthProviderSdkKeysRequest = z.strictObject({
|
|
1109
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID. Returned as `id` from `GET /projects`." }),
|
|
1110
|
+
auth_provider: zNeonAuthSupportedAuthProvider
|
|
1111
|
+
});
|
|
1112
|
+
const zNeonAuthCreateNewUserRequest = z.strictObject({
|
|
1113
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID. Returned as `id` from `GET /projects`." }),
|
|
1114
|
+
auth_provider: zNeonAuthSupportedAuthProvider,
|
|
1115
|
+
email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email address of the new user." }),
|
|
1116
|
+
name: z.string().min(1).max(255).register(z.globalRegistry, { description: "Display name for the new user. When omitted, the created user has no display name." }).optional()
|
|
1117
|
+
});
|
|
1118
|
+
const zCreateBranchNeonAuthNewUserRequest = z.strictObject({
|
|
1119
|
+
email: z.email().min(1).max(256).register(z.globalRegistry, { description: "Email address of the new Neon Auth user to create." }),
|
|
1120
|
+
name: z.string().min(1).max(255).register(z.globalRegistry, { description: "Display name for the new user. Optional. Pair with the required email field when creating a new user." }).optional()
|
|
1121
|
+
});
|
|
1122
|
+
const zNeonAuthCreateNewUserResponse = z.strictObject({ id: z.string().register(z.globalRegistry, { description: "ID of newly created user" }) });
|
|
1123
|
+
const zUpdateNeonAuthUserRoleRequest = z.strictObject({ roles: z.array(z.string()).min(1).register(z.globalRegistry, { description: "Roles to assign to the user in the Neon Auth (Better Auth) directory. `user` and `admin` are the built-in roles; custom role strings are also supported." }) });
|
|
1124
|
+
const zUpdateNeonAuthUserRoleResponse = z.strictObject({ id: z.string().register(z.globalRegistry, { description: "ID of the updated user" }) });
|
|
1125
|
+
const zNeonAuthAllowLocalhostResponse = z.strictObject({ allow_localhost: z.boolean().register(z.globalRegistry, { description: "Whether to allow localhost connections" }) });
|
|
1126
|
+
const zUpdateNeonAuthAllowLocalhostRequest = z.strictObject({ allow_localhost: z.boolean().register(z.globalRegistry, { description: "Whether to allow localhost connections" }) });
|
|
1127
|
+
const zNeonAuthOrganizationConfig = z.strictObject({
|
|
1128
|
+
enabled: z.boolean().register(z.globalRegistry, { description: "Whether the organization plugin is enabled." }),
|
|
1129
|
+
organization_limit: z.int().gte(1).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).register(z.globalRegistry, { description: "Maximum organizations a user can belong to (created or joined). At the limit, the user cannot create or join more." }),
|
|
1130
|
+
membership_limit: z.int().gte(1).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).register(z.globalRegistry, { description: "Maximum number of members per organization." }),
|
|
1131
|
+
creator_role: z.enum(["admin", "owner"]).register(z.globalRegistry, { description: "Role of the organization's creator. `owner`: full control, including deleting the org and transferring ownership. `admin`: manage members and settings only." }),
|
|
1132
|
+
send_invitation_email: z.boolean().register(z.globalRegistry, { description: "Whether to send invitation emails when inviting members to an organization." })
|
|
1133
|
+
});
|
|
1134
|
+
const zNeonAuthOrganizationConfigUpdate = z.strictObject({
|
|
1135
|
+
enabled: z.boolean().register(z.globalRegistry, { description: "Controls whether the organization plugin is active for the organization." }).optional(),
|
|
1136
|
+
organization_limit: z.int().gte(1).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).register(z.globalRegistry, { description: "Maximum organizations a user can belong to (created or joined). At the limit, the user cannot create or join more." }).optional(),
|
|
1137
|
+
membership_limit: z.int().gte(1).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).register(z.globalRegistry, { description: "Maximum members per organization." }).optional(),
|
|
1138
|
+
creator_role: z.enum(["admin", "owner"]).register(z.globalRegistry, { description: "Role of the organization's creator. `owner`: full control, including deleting the org and transferring ownership. `admin`: manage members and settings only." }).optional(),
|
|
1139
|
+
send_invitation_email: z.boolean().register(z.globalRegistry, { description: "When true, invited users receive an email containing an accept link. Requires that the invited user has a verified email address." }).optional()
|
|
1140
|
+
});
|
|
1141
|
+
const zNeonAuthMagicLinkConfig = z.strictObject({
|
|
1142
|
+
enabled: z.boolean().register(z.globalRegistry, { description: "Whether the magic link plugin is enabled." }),
|
|
1143
|
+
expires_in: z.int().gte(5).lte(1440).register(z.globalRegistry, { description: "Minutes until the magic link expires." }),
|
|
1144
|
+
disable_sign_up: z.boolean().register(z.globalRegistry, { description: "Whether to disable sign-up via magic link." })
|
|
1145
|
+
});
|
|
1146
|
+
const zNeonAuthMagicLinkConfigUpdate = z.strictObject({
|
|
1147
|
+
enabled: z.boolean().register(z.globalRegistry, { description: "Whether to enable the magic link plugin." }).optional(),
|
|
1148
|
+
expires_in: z.int().gte(5).lte(1440).register(z.globalRegistry, { description: "Minutes until the magic link expires." }).optional(),
|
|
1149
|
+
disable_sign_up: z.boolean().register(z.globalRegistry, { description: "When true, sign-up via magic link is disabled." }).optional()
|
|
1150
|
+
});
|
|
1151
|
+
const zNeonAuthPhoneNumberConfig = z.strictObject({
|
|
1152
|
+
enabled: z.boolean().register(z.globalRegistry, { description: "Whether the phone number plugin is enabled." }),
|
|
1153
|
+
otp_expires_in: z.int().gte(60).lte(600).register(z.globalRegistry, { description: "Time in seconds before the OTP expires" }).optional()
|
|
1154
|
+
});
|
|
1155
|
+
const zNeonAuthPhoneNumberConfigUpdate = z.strictObject({
|
|
1156
|
+
enabled: z.boolean().register(z.globalRegistry, { description: "Whether the phone number plugin is enabled." }).optional(),
|
|
1157
|
+
otp_expires_in: z.int().gte(60).lte(600).register(z.globalRegistry, { description: "Time in seconds before the OTP expires" }).optional()
|
|
1158
|
+
});
|
|
1159
|
+
const zNeonAuthTransferAuthProviderProjectRequest = z.strictObject({
|
|
1160
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID. Returned as `id` from `GET /projects`." }),
|
|
1161
|
+
auth_provider: zNeonAuthSupportedAuthProvider
|
|
1162
|
+
});
|
|
1163
|
+
const zNeonAuthTransferAuthProviderProjectResponse = z.strictObject({ url: z.string().register(z.globalRegistry, { description: "URL for completing the process of ownership transfer" }) });
|
|
1164
|
+
const zNeonAuthWebhookConfig = z.strictObject({
|
|
1165
|
+
enabled: z.boolean().register(z.globalRegistry, { description: "Whether the webhook is active." }),
|
|
1166
|
+
webhook_url: z.string().register(z.globalRegistry, { description: "Destination URL that receives webhook event payloads." }).optional(),
|
|
1167
|
+
enabled_events: z.array(z.enum([
|
|
1168
|
+
"user.before_create",
|
|
1169
|
+
"user.created",
|
|
1170
|
+
"send.otp",
|
|
1171
|
+
"send.magic_link",
|
|
1172
|
+
"organization.invitation.created",
|
|
1173
|
+
"organization.invitation.accepted",
|
|
1174
|
+
"phone_number.verified"
|
|
1175
|
+
])).register(z.globalRegistry, { description: "Event types that trigger this webhook. Covers user lifecycle, email/OTP delivery, organization invitations, and phone verification events; see the enum for exact values." }).optional(),
|
|
1176
|
+
timeout_seconds: z.int().gte(1).lte(10).register(z.globalRegistry, { description: "Maximum time, in seconds, to wait for a response from the webhook endpoint." }).optional()
|
|
1177
|
+
});
|
|
1178
|
+
const zNeonAuthOauthProviderId = z.enum([
|
|
1179
|
+
"google",
|
|
1180
|
+
"github",
|
|
1181
|
+
"microsoft",
|
|
1182
|
+
"vercel"
|
|
1183
|
+
]);
|
|
1184
|
+
const zNeonAuthOauthProviderType = z.enum(["standard", "shared"]);
|
|
1185
|
+
const zNeonAuthOauthProvider = z.strictObject({
|
|
1186
|
+
id: zNeonAuthOauthProviderId,
|
|
1187
|
+
type: zNeonAuthOauthProviderType,
|
|
1188
|
+
client_id: z.string().register(z.globalRegistry, { description: "Public identifier for the OAuth application, issued by the provider when the application is registered." }).optional(),
|
|
1189
|
+
client_secret: z.string().register(z.globalRegistry, { description: "OAuth client secret for the provider." }).optional()
|
|
1190
|
+
});
|
|
1191
|
+
const zListNeonAuthOauthProvidersResponse = z.strictObject({ providers: z.array(zNeonAuthOauthProvider).register(z.globalRegistry, { description: "OAuth providers configured for Neon Auth on the project." }) });
|
|
1192
|
+
const zNeonAuthAddOAuthProviderRequest = z.strictObject({
|
|
1193
|
+
id: zNeonAuthOauthProviderId,
|
|
1194
|
+
client_id: z.string().register(z.globalRegistry, { description: "The client ID issued by the OAuth provider for your application. Used to identify the application during the OAuth flow." }).optional(),
|
|
1195
|
+
client_secret: z.string().register(z.globalRegistry, { description: "OAuth client secret for the provider." }).optional(),
|
|
1196
|
+
microsoft_tenant_id: z.string().register(z.globalRegistry, { description: "Tenant ID for the Microsoft OAuth provider. Only relevant when the OAuth provider is Microsoft; omit or leave blank for other providers." }).optional()
|
|
1197
|
+
});
|
|
1198
|
+
const zNeonAuthUpdateOAuthProviderRequest = z.strictObject({
|
|
1199
|
+
client_id: z.string().register(z.globalRegistry, { description: "The OAuth client ID registered with the provider. Omit to keep the currently configured value." }).optional(),
|
|
1200
|
+
client_secret: z.string().register(z.globalRegistry, { description: "OAuth client secret for the provider. Omit to leave the existing secret unchanged." }).optional(),
|
|
1201
|
+
microsoft_tenant_id: z.string().register(z.globalRegistry, { description: "The tenant ID scoping the Microsoft OAuth provider. Supply this field when the provider type is microsoft; it has no effect for other provider types." }).optional()
|
|
1202
|
+
});
|
|
1203
|
+
const zSharedEmailServer = z.strictObject({
|
|
1204
|
+
sender_email: z.string().register(z.globalRegistry, { description: "Email address used as the sender for outgoing messages from this shared email server." }).optional(),
|
|
1205
|
+
sender_name: z.string().register(z.globalRegistry, { description: "Display name shown as the sender in outgoing emails." }).optional()
|
|
1206
|
+
});
|
|
1207
|
+
const zStandardEmailServer = z.strictObject({
|
|
1208
|
+
host: z.string().register(z.globalRegistry, { description: "Hostname of the email server." }).optional(),
|
|
1209
|
+
port: z.int().register(z.globalRegistry, { description: "TCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission)." }).optional(),
|
|
1210
|
+
username: z.string().register(z.globalRegistry, { description: "Username for authenticating with the SMTP server." }).optional(),
|
|
1211
|
+
password: z.string().register(z.globalRegistry, { description: "Password for authenticating with the SMTP server." }).optional(),
|
|
1212
|
+
sender_email: z.string().register(z.globalRegistry, { description: "Email address used as the From address on outgoing auth emails." }).optional(),
|
|
1213
|
+
sender_name: z.string().register(z.globalRegistry, { description: "Display name shown as the sender in outgoing emails." }).optional()
|
|
1214
|
+
});
|
|
1215
|
+
const zStandardEmailServerResponse = z.strictObject({
|
|
1216
|
+
host: z.string().register(z.globalRegistry, { description: "Hostname of the email server." }),
|
|
1217
|
+
port: z.int().register(z.globalRegistry, { description: "TCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission)." }),
|
|
1218
|
+
username: z.string().register(z.globalRegistry, { description: "Username for authenticating with the SMTP server." }),
|
|
1219
|
+
password: z.string().register(z.globalRegistry, { description: "On GET, returned redacted (empty) for ordinary callers, while callers with project-credential read permission receive the stored password — do not assume this field is empty. Update (PATCH) responses always return it redacted (empty) regardless of permission. Provide a value on update to set or rotate the password." }),
|
|
1220
|
+
sender_email: z.string().register(z.globalRegistry, { description: "Email address used as the From address on outgoing auth emails." }),
|
|
1221
|
+
sender_name: z.string().register(z.globalRegistry, { description: "Display name shown as the sender in outgoing emails." })
|
|
1222
|
+
});
|
|
1223
|
+
const zNeonAuthEmailServerConfig = z.discriminatedUnion("type", [zStandardEmailServer.extend({ type: z.literal("standard") }), zSharedEmailServer.extend({ type: z.literal("shared") })]);
|
|
1224
|
+
const zNeonAuthEmailServerConfigResponse = z.discriminatedUnion("type", [zStandardEmailServerResponse.extend({ type: z.literal("standard") }), zSharedEmailServer.extend({ type: z.literal("shared") })]);
|
|
1225
|
+
const zSendNeonAuthTestEmailRequest = z.strictObject({
|
|
1226
|
+
host: z.string().register(z.globalRegistry, { description: "Hostname of the email server." }),
|
|
1227
|
+
port: z.int().register(z.globalRegistry, { description: "TCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission)." }),
|
|
1228
|
+
username: z.string().register(z.globalRegistry, { description: "Username for authenticating with the SMTP server." }),
|
|
1229
|
+
password: z.string().register(z.globalRegistry, { description: "Password for authenticating with the SMTP server." }),
|
|
1230
|
+
sender_email: z.string().register(z.globalRegistry, { description: "Email address used as the From address on outgoing auth emails." }),
|
|
1231
|
+
sender_name: z.string().register(z.globalRegistry, { description: "Display name shown as the sender in outgoing emails." }),
|
|
1232
|
+
recipient_email: z.email().min(1).max(256).register(z.globalRegistry, { description: "The email address to send the test email to." })
|
|
1233
|
+
});
|
|
1234
|
+
const zSendNeonAuthTestEmailResponse = z.strictObject({
|
|
1235
|
+
success: z.boolean().register(z.globalRegistry, { description: "Whether the test email was sent successfully." }),
|
|
1236
|
+
error_message: z.string().register(z.globalRegistry, { description: "The error message from the email server." }).optional()
|
|
1237
|
+
});
|
|
1238
|
+
/**
|
|
1239
|
+
* The email verification method to use.
|
|
1240
|
+
* - `link`: Sends a verification link via email
|
|
1241
|
+
* - `otp`: Sends a one-time password (OTP) via email
|
|
1242
|
+
*
|
|
1243
|
+
*/
|
|
1244
|
+
const zNeonAuthEmailVerificationMethod = z.enum(["link", "otp"]).register(z.globalRegistry, { description: "The email verification method to use.\n- `link`: Sends a verification link via email\n- `otp`: Sends a one-time password (OTP) via email\n" });
|
|
1245
|
+
const zNeonAuthEmailAndPasswordConfig = z.strictObject({
|
|
1246
|
+
enabled: z.boolean().register(z.globalRegistry, { description: "Whether email and password authentication is enabled" }),
|
|
1247
|
+
email_verification_method: zNeonAuthEmailVerificationMethod,
|
|
1248
|
+
require_email_verification: z.boolean().register(z.globalRegistry, { description: "Whether email verification is required before users can sign in" }),
|
|
1249
|
+
auto_sign_in_after_verification: z.boolean().register(z.globalRegistry, { description: "Whether users are automatically signed in after verifying their email" }),
|
|
1250
|
+
send_verification_email_on_sign_up: z.boolean().register(z.globalRegistry, { description: "Whether to send a verification email when users sign up" }),
|
|
1251
|
+
send_verification_email_on_sign_in: z.boolean().register(z.globalRegistry, { description: "Whether to send a verification email when users sign in" }),
|
|
1252
|
+
disable_sign_up: z.boolean().register(z.globalRegistry, { description: "Whether to disable new user sign ups" })
|
|
1253
|
+
});
|
|
1254
|
+
/**
|
|
1255
|
+
* Aggregated plugin configurations for Neon Auth
|
|
1256
|
+
*/
|
|
1257
|
+
const zNeonAuthPluginConfigs = z.strictObject({
|
|
1258
|
+
organization: zNeonAuthOrganizationConfig.optional(),
|
|
1259
|
+
magic_link: zNeonAuthMagicLinkConfig.optional(),
|
|
1260
|
+
phone_number: zNeonAuthPhoneNumberConfig.optional(),
|
|
1261
|
+
email_provider: zNeonAuthEmailServerConfigResponse.optional(),
|
|
1262
|
+
email_and_password: zNeonAuthEmailAndPasswordConfig.optional(),
|
|
1263
|
+
oauth_providers: z.array(zNeonAuthOauthProvider).register(z.globalRegistry, { description: "OAuth provider configurations enabled for this auth setup." }).optional(),
|
|
1264
|
+
allow_localhost: z.boolean().register(z.globalRegistry, { description: "Permits authentication requests from localhost origins when true. Intended for local development; disable in production environments." }).optional()
|
|
1265
|
+
}).register(z.globalRegistry, { description: "Aggregated plugin configurations for Neon Auth" });
|
|
1266
|
+
const zNeonAuthEmailAndPasswordConfigUpdate = z.strictObject({
|
|
1267
|
+
enabled: z.boolean().register(z.globalRegistry, { description: "Controls whether email and password authentication is enabled for this project. When omitted from an update request, the current value is unchanged." }).optional(),
|
|
1268
|
+
email_verification_method: zNeonAuthEmailVerificationMethod.optional(),
|
|
1269
|
+
require_email_verification: z.boolean().register(z.globalRegistry, { description: "When true, users must verify their email address before they can sign in. Omitting this field from an update request leaves the current value unchanged." }).optional(),
|
|
1270
|
+
auto_sign_in_after_verification: z.boolean().register(z.globalRegistry, { description: "Whether users are automatically signed in after verifying their email" }).optional(),
|
|
1271
|
+
send_verification_email_on_sign_up: z.boolean().register(z.globalRegistry, { description: "Whether to send a verification email when users sign up." }).optional(),
|
|
1272
|
+
send_verification_email_on_sign_in: z.boolean().register(z.globalRegistry, { description: "Whether to send a verification email when a user with an unverified email signs in." }).optional(),
|
|
1273
|
+
disable_sign_up: z.boolean().register(z.globalRegistry, { description: "Whether to disable new user sign ups. When omitted, the current setting is not changed." }).optional()
|
|
1274
|
+
});
|
|
1275
|
+
const zNeonAuthIntegration = z.strictObject({
|
|
1276
|
+
auth_provider: zNeonAuthSupportedAuthProvider,
|
|
1277
|
+
auth_provider_project_id: z.string().register(z.globalRegistry, { description: "Project identifier assigned by the auth provider for this integration." }),
|
|
1278
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`." }),
|
|
1279
|
+
db_name: z.string().register(z.globalRegistry, { description: "Name of the database used by the Neon Auth integration." }),
|
|
1280
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp when the Neon Auth integration was created, in RFC 3339 format (UTC)." }),
|
|
1281
|
+
owned_by: zNeonAuthProviderProjectOwnedBy,
|
|
1282
|
+
transfer_status: zNeonAuthProviderProjectTransferStatus.optional(),
|
|
1283
|
+
jwks_url: z.string().register(z.globalRegistry, { description: "URL of the provider's JWKS endpoint used to verify JWTs." }),
|
|
1284
|
+
base_url: z.string().register(z.globalRegistry, { description: "Base URL of the Neon Auth service endpoint for this integration. Injected into the project environment as `NEON_AUTH_BASE_URL`." }).optional(),
|
|
1285
|
+
name: z.string().min(1).max(256).register(z.globalRegistry, { description: "Application name shown in auth emails and communications. Defaults to the project name." }).optional()
|
|
1286
|
+
});
|
|
1287
|
+
const zListNeonAuthIntegrationsResponse = z.strictObject({ data: z.array(zNeonAuthIntegration).register(z.globalRegistry, { description: "Neon Auth integrations configured for the project." }) });
|
|
1288
|
+
const zNeonAuthConfigUpdate = z.strictObject({ name: z.string().min(1).max(256).register(z.globalRegistry, { description: "The application name used in auth emails and communications." }) });
|
|
1289
|
+
const zNeonAuthConfigResponse = z.strictObject({ name: z.string().register(z.globalRegistry, { description: "The application name used in auth emails and communications." }) });
|
|
1290
|
+
const zErrorCode = z.string();
|
|
1291
|
+
const zGeneralError = z.strictObject({
|
|
1292
|
+
request_id: z.string().register(z.globalRegistry, { description: "Unique identifier for the request, useful for debugging.\nYou can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.\n" }).optional(),
|
|
1293
|
+
code: zErrorCode,
|
|
1294
|
+
message: z.string().register(z.globalRegistry, { description: "Error message" })
|
|
1295
|
+
});
|
|
1296
|
+
const zBranchOperations = zBranchResponse.merge(zOperationsResponse);
|
|
1297
|
+
const zBranchRecoverResponse = zBranchResponse.merge(zEndpointsOptionalResponse);
|
|
1298
|
+
const zEndpointOperations = zEndpointResponse.merge(zOperationsResponse);
|
|
1299
|
+
const zDatabaseOperations = zDatabaseResponse.merge(zOperationsResponse);
|
|
1300
|
+
const zRoleOperations = zRoleResponse.merge(zOperationsResponse);
|
|
1301
|
+
const zJwksCreationOperation = zJwksResponse.merge(zOperationsResponse);
|
|
1302
|
+
/**
|
|
1303
|
+
* A free-form map of string key-value pairs for attaching metadata to a resource (for example, a git commit reference). Maximum 50 entries.
|
|
1304
|
+
*/
|
|
1305
|
+
const zAnnotationValueData = z.record(z.string(), z.string()).register(z.globalRegistry, { description: "A free-form map of string key-value pairs for attaching metadata to a resource (for example, a git commit reference). Maximum 50 entries." });
|
|
1306
|
+
const zProjectCreateRequest = z.strictObject({ project: z.strictObject({
|
|
1307
|
+
settings: zProjectSettingsData.optional(),
|
|
1308
|
+
name: z.string().min(1).max(256).register(z.globalRegistry, { description: "The project name. If not specified, the name will be identical to the generated project ID" }).optional(),
|
|
1309
|
+
branch: z.strictObject({
|
|
1310
|
+
name: z.string().min(1).max(256).register(z.globalRegistry, { description: "The default branch name. If not specified, the default branch name, `main`, will be used.\n" }).optional(),
|
|
1311
|
+
role_name: z.string().register(z.globalRegistry, { description: "The role name. If not specified, the default role name, `{database_name}_owner`, will be used.\n" }).optional(),
|
|
1312
|
+
database_name: z.string().register(z.globalRegistry, { description: "The database name. If not specified, the default database name, `neondb`, will be used.\n" }).optional(),
|
|
1313
|
+
annotations: zAnnotationValueData.optional()
|
|
1314
|
+
}).register(z.globalRegistry, { description: "Configuration for the initial branch created with the project." }).optional(),
|
|
1315
|
+
autoscaling_limit_min_cu: zComputeUnit.optional(),
|
|
1316
|
+
autoscaling_limit_max_cu: zComputeUnit.optional(),
|
|
1317
|
+
provisioner: zProvisioner.optional(),
|
|
1318
|
+
region_id: z.string().register(z.globalRegistry, { description: "The region identifier. Refer to our [Regions](https://neon.com/docs/introduction/regions) documentation for supported regions. Values are specified in this format: `aws-us-east-1`\n" }).optional(),
|
|
1319
|
+
default_endpoint_settings: zDefaultEndpointSettings.optional(),
|
|
1320
|
+
pg_version: zPgVersion.optional(),
|
|
1321
|
+
store_passwords: z.boolean().register(z.globalRegistry, { description: "Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization.\n" }).optional(),
|
|
1322
|
+
history_retention_seconds: z.int().gte(0).lte(2592e3).register(z.globalRegistry, { description: "History window (point-in-time restore range) for all branches, in seconds. `0` disables it. Default 1 day (Free: 6 hours). Maximum depends on plan: Free 6 hours (21600), Launch 7 days (604800), Scale 30 days (2592000).\n" }).optional(),
|
|
1323
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "ID of the organization that will own the project. If omitted when using an organization API key, it is inferred from the key.\n" }).optional()
|
|
1324
|
+
}).register(z.globalRegistry, { description: "Configuration for the new project, including name, region, and Postgres compute and storage settings." }) });
|
|
1325
|
+
const zAnnotationObjectData = z.strictObject({
|
|
1326
|
+
type: z.string().register(z.globalRegistry, { description: "Kind of resource the annotation is attached to, for example \"branch\" or \"endpoint\"." }),
|
|
1327
|
+
id: z.string().register(z.globalRegistry, { description: "The annotated object's ID." })
|
|
1328
|
+
});
|
|
1329
|
+
const zAnnotationData = z.strictObject({
|
|
1330
|
+
object: zAnnotationObjectData,
|
|
1331
|
+
value: zAnnotationValueData,
|
|
1332
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp when the annotation was created, in RFC 3339 format (UTC)." }).optional(),
|
|
1333
|
+
updated_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp of the most recent update to the annotation, in RFC 3339 format (UTC)." }).optional()
|
|
1334
|
+
});
|
|
1335
|
+
const zAnnotationCreateValueRequest = z.strictObject({ annotation_value: zAnnotationValueData.optional() });
|
|
1336
|
+
const zBranchAnonymizedCreateRequest = zAnnotationCreateValueRequest.merge(z.strictObject({
|
|
1337
|
+
branch_create: zBranchCreateRequest.optional(),
|
|
1338
|
+
masking_rules: z.array(zMaskingRule).register(z.globalRegistry, { description: "List of masking rules to apply to the branch.\n" }).optional(),
|
|
1339
|
+
start_anonymization: z.boolean().register(z.globalRegistry, { description: "If true, automatically start anonymization after the branch is created.\nDefaults to false.\n" }).optional()
|
|
1340
|
+
}));
|
|
1341
|
+
const zAnnotationResponse = z.strictObject({ annotation: zAnnotationData });
|
|
1342
|
+
const zAnnotationsMapResponse = z.strictObject({ annotations: z.record(z.string(), zAnnotationData).register(z.globalRegistry, { description: "Map of annotations keyed by resource identifier, where each value contains the annotation data for that resource." }) });
|
|
1343
|
+
/**
|
|
1344
|
+
* Type of application integration
|
|
1345
|
+
*/
|
|
1346
|
+
const zApplicationType = z.enum([
|
|
1347
|
+
"vercel",
|
|
1348
|
+
"github",
|
|
1349
|
+
"datadog",
|
|
1350
|
+
"opentelemetry"
|
|
1351
|
+
]).register(z.globalRegistry, { description: "Type of application integration" });
|
|
1352
|
+
/**
|
|
1353
|
+
* A map where key is a project ID and a value is a list of installed applications.
|
|
1354
|
+
*
|
|
1355
|
+
*/
|
|
1356
|
+
const zProjectsApplicationsMapResponse = z.strictObject({ applications: z.record(z.string(), z.array(zApplicationType)).register(z.globalRegistry, { description: "Map of project IDs to their installed applications. Each key is a project ID; each value is an array of application types (for example, `vercel`, `github`)." }) }).register(z.globalRegistry, { description: "A map where key is a project ID and a value is a list of installed applications.\n" });
|
|
1357
|
+
/**
|
|
1358
|
+
* A map where key is a project ID and a value is a list of installed integrations.
|
|
1359
|
+
*
|
|
1360
|
+
*/
|
|
1361
|
+
const zProjectsIntegrationsMapResponse = z.strictObject({ integrations: z.record(z.string(), z.array(zApplicationType)).register(z.globalRegistry, { description: "Map of project IDs to their associated integration details." }) }).register(z.globalRegistry, { description: "A map where key is a project ID and a value is a list of installed integrations.\n" });
|
|
1362
|
+
/**
|
|
1363
|
+
* To paginate the response, issue an initial request with `limit` value. Then, add the value returned in the response `.pagination.next` attribute into the request under the `cursor` query parameter to the subsequent request to retrieve next page in pagination. The contents on cursor `next` are opaque, clients are not expected to make any assumptions on the format of the data inside the cursor.
|
|
1364
|
+
*/
|
|
1365
|
+
const zCursorPagination = z.strictObject({
|
|
1366
|
+
next: z.string().register(z.globalRegistry, { description: "Cursor for the next page of results. Pass it as the `cursor` query parameter on the next request. Absent on the last page." }).optional(),
|
|
1367
|
+
sort_by: z.string().register(z.globalRegistry, { description: "Field by which the results were sorted, echoing the request's sort_by parameter." }).optional(),
|
|
1368
|
+
sort_order: z.string().register(z.globalRegistry, { description: "Sort order active for this page. Pass back as `sort_order` in the next request to maintain consistent ordering. Valid values are `asc` and `desc`." }).optional()
|
|
1369
|
+
}).register(z.globalRegistry, { description: "To paginate the response, issue an initial request with `limit` value. Then, add the value returned in the response `.pagination.next` attribute into the request under the `cursor` query parameter to the subsequent request to retrieve next page in pagination. The contents on cursor `next` are opaque, clients are not expected to make any assumptions on the format of the data inside the cursor." });
|
|
1370
|
+
const zProjectMembers = z.strictObject({
|
|
1371
|
+
project_members: z.array(zProjectMember),
|
|
1372
|
+
pagination: zCursorPagination.optional()
|
|
1373
|
+
});
|
|
1374
|
+
const zCursorPaginationResponse = z.strictObject({ pagination: zCursorPagination.optional() });
|
|
1375
|
+
const zSnapshot = z.strictObject({
|
|
1376
|
+
id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The snapshot ID." }),
|
|
1377
|
+
name: z.string().register(z.globalRegistry, { description: "Human-readable label for the snapshot." }),
|
|
1378
|
+
lsn: z.string().register(z.globalRegistry, { description: "WAL position (Log Sequence Number) at which the snapshot was captured, in Postgres LSN format (for example, `0/3000000`)." }).optional(),
|
|
1379
|
+
timestamp: z.string().register(z.globalRegistry, { description: "Point in time captured by the snapshot, in RFC 3339 format (UTC)." }).optional(),
|
|
1380
|
+
source_branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Branch from which this snapshot was created." }).optional(),
|
|
1381
|
+
created_at: z.string().register(z.globalRegistry, { description: "Timestamp when the snapshot was created, in RFC 3339 format (UTC)." }),
|
|
1382
|
+
expires_at: z.string().register(z.globalRegistry, { description: "RFC 3339 timestamp when the snapshot expires and is eligible for deletion. Null if the snapshot does not have an expiry." }).optional(),
|
|
1383
|
+
manual: z.boolean().register(z.globalRegistry, { description: "True if the snapshot was created manually rather than by a schedule." }).optional(),
|
|
1384
|
+
full_size: z.int().register(z.globalRegistry, { description: "Full logical size of the snapshot in bytes at the time it was taken.\n\nWhen absent, the logical size has not been calculated yet and the snapshot is not being charged.\n\nWhen present, a value of 0 means the snapshot is not being charged.\n" }).optional(),
|
|
1385
|
+
diff_size: z.int().register(z.globalRegistry, { description: "Incremental Postgres storage size in bytes since the previous scheduled snapshot, when the snapshot is billed on incremental (diff) usage.\n\nWhen absent, either the incremental size has not been calculated yet and the snapshot is not being charged, or the snapshot is charged at full logical size (in that case `full_size` is set).\n" }).optional()
|
|
1386
|
+
});
|
|
1387
|
+
const zSnapshotUpdateRequest = z.strictObject({ snapshot: z.strictObject({
|
|
1388
|
+
name: z.string().register(z.globalRegistry, { description: "Human-readable label for the snapshot." }).optional(),
|
|
1389
|
+
expires_at: z.iso.datetime().nullish()
|
|
1390
|
+
}).register(z.globalRegistry, { description: "Fields to update on the snapshot. Updatable fields include `name` and `expires_at`." }) });
|
|
1391
|
+
const zBackupScheduleItem = z.strictObject({
|
|
1392
|
+
frequency: z.string().register(z.globalRegistry, { description: "How often to take snapshots. Known values: `daily`, `weekly`, `monthly`.\n" }),
|
|
1393
|
+
hour: z.int().gte(0).lte(23).register(z.globalRegistry, { description: "The hour of the day to take the snapshot (if applicable).\n" }).optional(),
|
|
1394
|
+
day: z.int().gte(1).lte(31).register(z.globalRegistry, { description: "The day of the week or month to take the snapshot (if applicable).\n" }).optional(),
|
|
1395
|
+
month: z.int().gte(1).lte(12).register(z.globalRegistry, { description: "The month of the year to take the snapshot (if applicable).\n" }).optional(),
|
|
1396
|
+
retention_seconds: z.int().gte(3600).lte(3024e3).register(z.globalRegistry, { description: "How long to keep a scheduled snapshot (in seconds) before it's automatically deleted.\nThe default is 3024000 seconds (35 days), which is also the maximum.\nManually created snapshots have no maximum retention: set their `expires_at` instead.\n" }).optional()
|
|
1397
|
+
});
|
|
1398
|
+
const zBackupSchedule = z.strictObject({ schedule: z.array(zBackupScheduleItem).register(z.globalRegistry, { description: "List of schedule entries defining the backup frequency. At least one entry is required." }) });
|
|
1399
|
+
const zBranchSchemaJson = z.strictObject({ tables: z.array(z.strictObject({
|
|
1400
|
+
schema: z.string().register(z.globalRegistry, { description: "Postgres schema (namespace) that contains the table, for example `public`." }),
|
|
1401
|
+
name: z.string().register(z.globalRegistry, { description: "Name of the table within the schema." }),
|
|
1402
|
+
columns: z.array(z.strictObject({
|
|
1403
|
+
name: z.string().register(z.globalRegistry, { description: "Name of the column." }),
|
|
1404
|
+
type: z.string().register(z.globalRegistry, { description: "Postgres data type of the column, for example \"integer\" or \"text\"." }),
|
|
1405
|
+
nullable: z.boolean().register(z.globalRegistry, { description: "Whether the column allows NULL values" }).optional(),
|
|
1406
|
+
generated: z.boolean().register(z.globalRegistry, { description: "Whether the column is a generated (computed) column" }).optional()
|
|
1407
|
+
})).register(z.globalRegistry, { description: "Columns belonging to this table, each describing a column's name and attributes." }),
|
|
1408
|
+
constraints: z.array(z.strictObject({
|
|
1409
|
+
type: z.string().register(z.globalRegistry, { description: "Type of constraint. Possible values: `primary_key`, `unique`, `foreign_key`\n" }),
|
|
1410
|
+
columns: z.array(z.string()).min(1).register(z.globalRegistry, { description: "Column names participating in this constraint" }),
|
|
1411
|
+
name: z.string().register(z.globalRegistry, { description: "Optional name of the constraint" }).optional(),
|
|
1412
|
+
referenced_table: z.strictObject({
|
|
1413
|
+
schema: z.string().register(z.globalRegistry, { description: "Schema of the referenced table" }),
|
|
1414
|
+
table: z.string().register(z.globalRegistry, { description: "Name of the referenced table" }),
|
|
1415
|
+
columns: z.array(z.string()).register(z.globalRegistry, { description: "Names of the referenced columns" })
|
|
1416
|
+
}).register(z.globalRegistry, { description: "For foreign keys - the referenced table information" }).optional()
|
|
1417
|
+
})).register(z.globalRegistry, { description: "Table constraints defined in the branch schema, such as primary key, foreign key, unique, and check constraints." }).optional()
|
|
1418
|
+
})).register(z.globalRegistry, { description: "Tables present in the branch schema." }) });
|
|
1419
|
+
const zBranchSchemaResponse = z.strictObject({
|
|
1420
|
+
sql: z.string().register(z.globalRegistry, { description: "Branch schema expressed as SQL DDL statements." }).optional(),
|
|
1421
|
+
json: zBranchSchemaJson.optional()
|
|
1422
|
+
});
|
|
1423
|
+
/**
|
|
1424
|
+
* Controls anonymous access to objects in the bucket.
|
|
1425
|
+
* - `private`: all reads and writes require authenticated requests (default).
|
|
1426
|
+
* - `public_read`: anonymous `GetObject`/`HeadObject` requests succeed; listing,
|
|
1427
|
+
* writes, and deletes still require authenticated requests.
|
|
1428
|
+
*
|
|
1429
|
+
*/
|
|
1430
|
+
const zBucketAccessLevel = z.enum(["private", "public_read"]).register(z.globalRegistry, { description: "Controls anonymous access to objects in the bucket.\n- `private`: all reads and writes require authenticated requests (default).\n- `public_read`: anonymous `GetObject`/`HeadObject` requests succeed; listing,\n writes, and deletes still require authenticated requests.\n" });
|
|
1431
|
+
const zBucket = z.strictObject({
|
|
1432
|
+
name: z.string().register(z.globalRegistry, { description: "The bucket name (unique within a branch)." }),
|
|
1433
|
+
access_level: zBucketAccessLevel,
|
|
1434
|
+
created_at: z.iso.datetime().register(z.globalRegistry, { description: "When the bucket was created. For a bucket inherited from an\nancestor branch this is the ancestor's creation time (the branch\nfork never re-creates the bucket).\n" })
|
|
1435
|
+
});
|
|
1436
|
+
const zBucketCreateRequest = z.strictObject({
|
|
1437
|
+
name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name." }),
|
|
1438
|
+
access_level: z.enum(["private", "public_read"]).register(z.globalRegistry, { description: "Access level for the bucket. Defaults to `private`. Set to `public_read`\nto allow anonymous `GetObject`/`HeadObject` on objects in this bucket.\n" }).optional()
|
|
1439
|
+
});
|
|
1440
|
+
const zBucketResponse = z.strictObject({ bucket: zBucket });
|
|
1441
|
+
const zBucketsListResponse = z.strictObject({ buckets: z.array(zBucket) });
|
|
1442
|
+
const zBranchStorage = z.strictObject({
|
|
1443
|
+
enabled: z.boolean().register(z.globalRegistry, { description: "Always `true` in 200 responses. Present for forward compatibility: a\nfuture version may add intermediate states; callers should treat `true`\nas \"object storage is usable for this branch right now.\"\n" }),
|
|
1444
|
+
s3_endpoint: z.url().register(z.globalRegistry, { description: "The S3-compatible endpoint URL for this branch." }),
|
|
1445
|
+
region: z.string().register(z.globalRegistry, { description: "The AWS region for this branch's object storage. The platform normalizes\nthe us-east-1 convention server-side: a non-empty region string is\nalways returned in 200 responses (e.g. `\"us-east-1\"` for the S3\ndefault region).\n" }),
|
|
1446
|
+
force_path_style: z.boolean().register(z.globalRegistry, { description: "Whether the S3 client must use path-style addressing\n(bucket-in-path rather than virtual-hosted subdomain).\nAlways true: the wildcard TLS cert covers one level of subdomain\n(*.storage.<suffix>), so the branch ID occupies that label and the\nbucket name must travel in the request path, not as a further\nsubdomain. Callers must set the S3 SDK's ForcePathStyle (or\nequivalent) to true.\n" })
|
|
1447
|
+
});
|
|
1448
|
+
const zBranchStorageNotEnabled = z.strictObject({
|
|
1449
|
+
code: z.string(),
|
|
1450
|
+
message: z.string(),
|
|
1451
|
+
reason: z.enum([
|
|
1452
|
+
"org_not_entitled",
|
|
1453
|
+
"region_unavailable",
|
|
1454
|
+
"branch_directory_missing",
|
|
1455
|
+
"branch_not_found"
|
|
1456
|
+
]).register(z.globalRegistry, { description: "Machine-readable reason why object storage is unavailable:\n- `org_not_entitled`: the org's `PlatformBranchableStorage` feature flag is off.\n- `region_unavailable`: the project's region has no object storage admin service wired.\n- `branch_directory_missing`: the branch is not registered in the object storage service.\n- `branch_not_found`: the project or branch does not exist, or the caller does not\n have access to it.\n" })
|
|
1457
|
+
});
|
|
1458
|
+
/**
|
|
1459
|
+
* The Neon service that emitted the log record.
|
|
1460
|
+
*/
|
|
1461
|
+
const zProjectBranchLogSource = z.enum([
|
|
1462
|
+
"function",
|
|
1463
|
+
"storage",
|
|
1464
|
+
"pg_endpoint"
|
|
1465
|
+
]).register(z.globalRegistry, { description: "The Neon service that emitted the log record." });
|
|
1466
|
+
/**
|
|
1467
|
+
* An OpenTelemetry severity level. A minimum severity includes every
|
|
1468
|
+
* higher level in this order: `trace`, `debug`, `info`, `warn`, `error`,
|
|
1469
|
+
* `fatal`.
|
|
1470
|
+
*
|
|
1471
|
+
*/
|
|
1472
|
+
const zProjectBranchLogSeverity = z.enum([
|
|
1473
|
+
"trace",
|
|
1474
|
+
"debug",
|
|
1475
|
+
"info",
|
|
1476
|
+
"warn",
|
|
1477
|
+
"error",
|
|
1478
|
+
"fatal"
|
|
1479
|
+
]).register(z.globalRegistry, { description: "An OpenTelemetry severity level. A minimum severity includes every\nhigher level in this order: `trace`, `debug`, `info`, `warn`, `error`,\n`fatal`.\n" });
|
|
1480
|
+
/**
|
|
1481
|
+
* A length of time as a count and a unit, for example `30m`, `6h`, or
|
|
1482
|
+
* `7d`. Valid units are `ms`, `s`, `m`, `h`, and `d`.
|
|
1483
|
+
*
|
|
1484
|
+
*/
|
|
1485
|
+
const zProjectBranchLogDuration = z.string().regex(/^[0-9]{1,6}(ms|s|m|h|d)$/).register(z.globalRegistry, { description: "A length of time as a count and a unit, for example `30m`, `6h`, or\n`7d`. Valid units are `ms`, `s`, `m`, `h`, and `d`.\n" });
|
|
1486
|
+
const zProjectBranchLogsNotAvailable = z.strictObject({
|
|
1487
|
+
code: z.string(),
|
|
1488
|
+
message: z.string(),
|
|
1489
|
+
reason: z.enum(["branch_not_found", "telemetry_not_enabled"]).register(z.globalRegistry, { description: "Machine-readable reason why logs cannot be read:\n- `branch_not_found`: the project or branch does not exist, or the caller does not\n have access to it.\n- `telemetry_not_enabled`: the branch exists but is not collecting telemetry, so it\n has no logs to serve.\n" })
|
|
1490
|
+
});
|
|
1491
|
+
const zProjectBranchLogsInvalidQuery = z.strictObject({
|
|
1492
|
+
code: z.string(),
|
|
1493
|
+
message: z.string(),
|
|
1494
|
+
reason: z.enum([
|
|
1495
|
+
"time_range_too_large",
|
|
1496
|
+
"invalid_time_range",
|
|
1497
|
+
"conflicting_time_range",
|
|
1498
|
+
"invalid_cursor",
|
|
1499
|
+
"unknown_field",
|
|
1500
|
+
"invalid_logql",
|
|
1501
|
+
"conflicting_filters"
|
|
1502
|
+
]).register(z.globalRegistry, { description: "Machine-readable reason why the request was rejected:\n- `time_range_too_large`: the requested window spans more than seven days.\n- `invalid_time_range`: `end_time` is not after `start_time`.\n- `conflicting_time_range`: both `since` and `start_time` were supplied.\n- `invalid_cursor`: the supplied `cursor` is malformed, expired, or was issued for a\n different query.\n- `unknown_field`: the requested `field_name` is not one of the fields the log fields\n endpoint reports for this branch.\n- `invalid_logql`: the supplied `logql` expression does not parse, or uses a\n construct this endpoint does not accept.\n- `conflicting_filters`: `logql` was supplied alongside one or more structured\n filters. Use one or the other.\n" })
|
|
1503
|
+
});
|
|
1504
|
+
const zProjectBranchLogsQueryRequest = z.strictObject({
|
|
1505
|
+
since: zProjectBranchLogDuration.optional(),
|
|
1506
|
+
start_time: z.iso.datetime().register(z.globalRegistry, { description: "Inclusive beginning of the query window. Mutually exclusive with\n`since`. Defaults to one hour before `end_time`, or one hour before\nthe current time when both bounds are omitted.\n" }).optional(),
|
|
1507
|
+
end_time: z.iso.datetime().register(z.globalRegistry, { description: "Exclusive end of the query window. Defaults to the current time." }).optional(),
|
|
1508
|
+
limit: z.int().gte(1).lte(1e3).register(z.globalRegistry, { description: "Maximum number of log records to return per page." }).optional(),
|
|
1509
|
+
cursor: z.string().register(z.globalRegistry, { description: "Opaque pagination cursor returned as `next_cursor` by a previous\ncall. Resume the query after the last record of the previous page,\nrepeating the time range and every filter unchanged.\n" }).optional(),
|
|
1510
|
+
sort_order: z.enum(["asc", "desc"]).register(z.globalRegistry, { description: "Order matching records by timestamp. `desc`, the default, returns\nthe newest records first.\n" }).optional(),
|
|
1511
|
+
source: zProjectBranchLogSource.optional(),
|
|
1512
|
+
service_name: z.string().min(1).register(z.globalRegistry, { description: "Match the OpenTelemetry `service.name` resource attribute exactly." }).optional(),
|
|
1513
|
+
scope_name: z.string().min(1).register(z.globalRegistry, { description: "Match the OpenTelemetry instrumentation scope name exactly." }).optional(),
|
|
1514
|
+
minimum_severity: zProjectBranchLogSeverity.optional(),
|
|
1515
|
+
severity_text: z.string().min(1).register(z.globalRegistry, { description: "Match the OpenTelemetry severity text exactly." }).optional(),
|
|
1516
|
+
body_contains: z.string().min(1).register(z.globalRegistry, { description: "Match records whose rendered `message` contains this case-sensitive\nsubstring.\n\nRecords with a structured body are matched against their JSON\nrendering, so the substring meets JSON syntax rather than prose: a\nbare key name such as `operation` matches every record carrying that\nkey, and `http_status: 200` matches none, because the rendering\ncontains `\"http_status\":200` with no space.\n" }).optional(),
|
|
1517
|
+
trace_id: z.string().regex(/^[0-9a-f]{32}$/).register(z.globalRegistry, { description: "Match records associated with this OpenTelemetry trace ID. W3C Trace\nContext defines a trace ID as 32 lowercase hex digits, and that is\nwhat is stored, so an uppercase value is rejected rather than\nsilently matching nothing.\n" }).optional(),
|
|
1518
|
+
logql: z.string().min(1).register(z.globalRegistry, { description: "Escape hatch for selections the structured filters cannot express: a\nraw LogQL expression, evaluated against this branch's log stream.\n\nOnly stream selectors and line filters are accepted — no\naggregations and no parser stages. Supplying this alongside any\nstructured filter is rejected with `conflicting_filters` rather than\nsilently ignoring one of them. `limit`, `sort_order`, and the time\nwindow still apply.\n\nThis field passes the underlying query language through to the\ncaller, so unlike the rest of this contract it may change as that\nbackend changes. Prefer the structured filters where they suffice.\n" }).optional()
|
|
1519
|
+
});
|
|
1520
|
+
const zProjectBranchLogRecord = z.strictObject({
|
|
1521
|
+
timestamp: z.iso.datetime().register(z.globalRegistry, { description: "The OpenTelemetry record timestamp in UTC." }),
|
|
1522
|
+
message: z.string().register(z.globalRegistry, { description: "The OpenTelemetry log body rendered as text. A body that is already a\nstring is returned verbatim. Any other OpenTelemetry `AnyValue` body\n— notably the structured key/value body that `storage` records always\ncarry — is rendered as compact JSON with its keys sorted\nalphabetically, for example\n`{\"bytes\":1024,\"operation\":\"GET\",\"object_key\":\"a/b.png\"}`.\n" }),
|
|
1523
|
+
source: zProjectBranchLogSource.optional(),
|
|
1524
|
+
entity_id: z.string().register(z.globalRegistry, { description: "The Neon identifier of the service instance that emitted the record." }).optional(),
|
|
1525
|
+
service_name: z.string().register(z.globalRegistry, { description: "The OpenTelemetry `service.name` resource attribute." }).optional(),
|
|
1526
|
+
scope_name: z.string().register(z.globalRegistry, { description: "The OpenTelemetry instrumentation scope name." }).optional(),
|
|
1527
|
+
severity_number: z.int().gte(0).lte(24).register(z.globalRegistry, { description: "The numeric OpenTelemetry severity." }).optional(),
|
|
1528
|
+
severity_text: z.string().register(z.globalRegistry, { description: "The original OpenTelemetry severity text." }).optional(),
|
|
1529
|
+
trace_id: z.string().register(z.globalRegistry, { description: "The OpenTelemetry trace ID, when the record belongs to a trace." }).optional(),
|
|
1530
|
+
span_id: z.string().register(z.globalRegistry, { description: "The OpenTelemetry span ID, when the record belongs to a span." }).optional(),
|
|
1531
|
+
attributes: z.record(z.string(), z.unknown()).register(z.globalRegistry, { description: "Customer-defined OpenTelemetry log and resource attributes." })
|
|
1532
|
+
});
|
|
1533
|
+
const zProjectBranchLogsQueryResponse = z.strictObject({
|
|
1534
|
+
logs: z.array(zProjectBranchLogRecord),
|
|
1535
|
+
next_cursor: z.string().register(z.globalRegistry, { description: "Pagination cursor to pass as `cursor` on the next request. Empty\nwhen the response is not truncated.\n" }).optional(),
|
|
1536
|
+
is_truncated: z.boolean().register(z.globalRegistry, { description: "True when more records matched than were returned." })
|
|
1537
|
+
});
|
|
1538
|
+
const zProjectBranchLogFieldsResponse = z.strictObject({ fields: z.array(z.string()).register(z.globalRegistry, { description: "Log field names observed on this branch, each usable as `field_name`\non the log field-values endpoint. Computed per branch rather than\nfixed by this specification, so clients should not assume a\nparticular set.\n" }) });
|
|
1539
|
+
const zProjectBranchLogFieldValuesResponse = z.strictObject({
|
|
1540
|
+
values: z.array(z.string()),
|
|
1541
|
+
is_truncated: z.boolean().register(z.globalRegistry, { description: "True when more distinct values exist than were returned, because\neither the requested `limit` or the server's own scan cap was\nreached. A caller that filters on a partial list is choosing from an\narbitrary subset, so narrow `since` or `source` and ask again when\nthis is `true`.\n" })
|
|
1542
|
+
});
|
|
1543
|
+
const zBranchAiGateway = z.strictObject({
|
|
1544
|
+
enabled: z.boolean().register(z.globalRegistry, { description: "Always `true` in 200 responses. Present for forward compatibility,\nmirroring BranchStorage.enabled.\n" }),
|
|
1545
|
+
base_url: z.url().register(z.globalRegistry, { description: "The AI-gateway endpoint root for this branch — an OpenAI-compatible\nbase URL. No dialect path is included; clients append the route\n(e.g. `/ai-gateway/openai/v1/responses`) themselves.\n" })
|
|
1546
|
+
});
|
|
1547
|
+
const zBranchAiGatewayNotEnabled = z.strictObject({
|
|
1548
|
+
code: z.string(),
|
|
1549
|
+
message: z.string(),
|
|
1550
|
+
reason: z.enum(["ai_gateway_unavailable", "branch_not_found"]).register(z.globalRegistry, { description: "Machine-readable reason why the AI gateway is unavailable:\n- `ai_gateway_unavailable`: the project's region/cell has no AI gateway configured.\n- `branch_not_found`: the project or branch does not exist, or the caller does not\n have access to it.\n" })
|
|
1551
|
+
});
|
|
1552
|
+
const zBucketObject = z.strictObject({
|
|
1553
|
+
key: z.string().register(z.globalRegistry, { description: "The full object key." }),
|
|
1554
|
+
size: z.int().register(z.globalRegistry, { description: "The object size in bytes." }),
|
|
1555
|
+
last_modified: z.iso.datetime().register(z.globalRegistry, { description: "The time the object was last modified." }),
|
|
1556
|
+
etag: z.string().register(z.globalRegistry, { description: "The object's entity tag (content hash)." })
|
|
1557
|
+
});
|
|
1558
|
+
const zBucketObjectsListResponse = z.strictObject({
|
|
1559
|
+
folders: z.array(z.string()).register(z.globalRegistry, { description: "Common prefixes (folder names) collapsed under the requested\n`delimiter`. Empty when no `delimiter` was supplied.\n" }),
|
|
1560
|
+
objects: z.array(zBucketObject).register(z.globalRegistry, { description: "Objects whose keys did not collapse into a folder." }),
|
|
1561
|
+
prefix: z.string().register(z.globalRegistry, { description: "The prefix that was applied to this listing (echoed back)." }),
|
|
1562
|
+
next_cursor: z.string().register(z.globalRegistry, { description: "Pagination cursor to pass as `cursor` on the next request. Empty\nwhen the listing is not truncated.\n" }).optional(),
|
|
1563
|
+
is_truncated: z.boolean().register(z.globalRegistry, { description: "True when more results exist beyond this page." })
|
|
1564
|
+
});
|
|
1565
|
+
const zBucketObjectsDeletePrefixResponse = z.strictObject({ deleted: z.int().register(z.globalRegistry, { description: "The number of objects soft-deleted under the prefix. 0 when no live\nobject matched the prefix on this branch.\n" }) });
|
|
1566
|
+
/**
|
|
1567
|
+
* Options for the presigned URL. The `operation` selects upload (`PUT`)
|
|
1568
|
+
* or download (`GET`); the remaining fields are optional.
|
|
1569
|
+
*
|
|
1570
|
+
*/
|
|
1571
|
+
const zPresignRequest = z.strictObject({
|
|
1572
|
+
operation: z.enum(["upload", "download"]).register(z.globalRegistry, { description: "The transfer direction. `upload` returns a presigned `PUT` URL;\n`download` returns a presigned `GET` URL.\n" }),
|
|
1573
|
+
content_type: z.string().register(z.globalRegistry, { description: "The `Content-Type` to bind into the signed request. Only meaningful\nfor `upload`: when set, the caller MUST send the same `Content-Type`\nheader on the `PUT`, and the value is echoed back in the response\n`headers`. Ignored for `download`.\n" }).optional(),
|
|
1574
|
+
expires_in_seconds: z.int().gte(1).lte(604800).register(z.globalRegistry, { description: "How long the presigned URL stays valid, in seconds. Defaults to 900\n(15 minutes); capped at 604800 (7 days).\n" }).optional()
|
|
1575
|
+
}).register(z.globalRegistry, { description: "Options for the presigned URL. The `operation` selects upload (`PUT`)\nor download (`GET`); the remaining fields are optional.\n" });
|
|
1576
|
+
const zPresignResponse = z.strictObject({
|
|
1577
|
+
url: z.string().register(z.globalRegistry, { description: "The presigned URL. Transfer the object bytes by issuing\n`method url` with the returned `headers`.\n" }),
|
|
1578
|
+
method: z.string().register(z.globalRegistry, { description: "The HTTP method to use against `url`: `PUT` for an upload,\n`GET` for a download.\n" }),
|
|
1579
|
+
headers: z.record(z.string(), z.string()).register(z.globalRegistry, { description: "Headers the caller MUST send verbatim on the request (e.g.\n`Content-Type` when it was signed on an upload). May be empty.\n" }),
|
|
1580
|
+
expires_at: z.iso.datetime().register(z.globalRegistry, { description: "When the presigned URL stops being valid." })
|
|
1581
|
+
});
|
|
1582
|
+
/**
|
|
1583
|
+
* A single capability a credential may exercise. A credential is granted
|
|
1584
|
+
* a set of these; it may only perform actions explicitly listed in its
|
|
1585
|
+
* scopes.
|
|
1586
|
+
*
|
|
1587
|
+
*/
|
|
1588
|
+
const zCredentialScope = z.enum([
|
|
1589
|
+
"storage:read",
|
|
1590
|
+
"storage:write",
|
|
1591
|
+
"ai_gateway:invoke",
|
|
1592
|
+
"functions:invoke"
|
|
1593
|
+
]).register(z.globalRegistry, { description: "A single capability a credential may exercise. A credential is granted\na set of these; it may only perform actions explicitly listed in its\nscopes.\n" });
|
|
1594
|
+
const zCreateCredentialRequest = z.strictObject({
|
|
1595
|
+
name: z.string().max(256).register(z.globalRegistry, { description: "Free-form customer label for the credential." }).optional(),
|
|
1596
|
+
scopes: z.array(zCredentialScope).min(1).max(16),
|
|
1597
|
+
principal_type: z.enum(["user"]).register(z.globalRegistry, { description: "Principal type for the credential. Only `user` is customer-managed\nand accepted here. `function` and `system` credentials are\nplatform-internal (e.g. function-serve auto-mint, presign signer)\nand are never issued through the customer-facing API.\n" })
|
|
1598
|
+
});
|
|
1599
|
+
const zCreateCredentialResponse = z.strictObject({
|
|
1600
|
+
token_id: z.string().register(z.globalRegistry, { description: "Opaque credential id (e.g. nak_live_<32hex>)." }),
|
|
1601
|
+
token_id_short: z.string().register(z.globalRegistry, { description: "First 12 hex chars of token_id; safe to log." }),
|
|
1602
|
+
name: z.string().register(z.globalRegistry, { description: "Customer-supplied label, echoed back from the request. Absent when not provided." }).optional(),
|
|
1603
|
+
api_token: z.string().register(z.globalRegistry, { description: "Bearer token; returned exactly once." }),
|
|
1604
|
+
s3_secret_access_key: z.string().register(z.globalRegistry, { description: "nsk_live_<64 hex>; the AWS_SECRET_ACCESS_KEY, returned exactly once." }),
|
|
1605
|
+
scopes: z.array(zCredentialScope),
|
|
1606
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
|
|
1607
|
+
created_at: z.iso.datetime(),
|
|
1608
|
+
expires_at: z.iso.datetime().register(z.globalRegistry, { description: "When the credential expires; absent means never expires.\n" }).optional()
|
|
1609
|
+
});
|
|
1610
|
+
const zCredentialMeta = z.strictObject({
|
|
1611
|
+
token_id: z.string().register(z.globalRegistry, { description: "Opaque credential id (e.g. nak_live_<32hex>)." }),
|
|
1612
|
+
token_id_short: z.string(),
|
|
1613
|
+
name: z.string().register(z.globalRegistry, { description: "Customer-supplied label; absent when not provided at issuance." }).optional(),
|
|
1614
|
+
scopes: z.array(zCredentialScope),
|
|
1615
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
|
|
1616
|
+
principal_type: z.string(),
|
|
1617
|
+
function_id: z.string().optional(),
|
|
1618
|
+
created_at: z.iso.datetime(),
|
|
1619
|
+
last_used_at: z.iso.datetime().optional(),
|
|
1620
|
+
revoked_at: z.iso.datetime().optional(),
|
|
1621
|
+
expires_at: z.iso.datetime().register(z.globalRegistry, { description: "When the credential expires; absent means never expires. The\nverifier refuses to authenticate after `expires_at <= now()`.\n" }).optional()
|
|
1622
|
+
});
|
|
1623
|
+
const zListCredentialsResponse = z.strictObject({ credentials: z.array(zCredentialMeta) });
|
|
1624
|
+
const zNeonFunctionDeployment = z.strictObject({
|
|
1625
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).register(z.globalRegistry, { description: "The deployment id, which is the platform version number (monotonic per function)." }),
|
|
1626
|
+
status: z.enum([
|
|
1627
|
+
"pending",
|
|
1628
|
+
"building",
|
|
1629
|
+
"completed",
|
|
1630
|
+
"failed"
|
|
1631
|
+
]).register(z.globalRegistry, { description: "Build lifecycle status of the deployment." }),
|
|
1632
|
+
memory_mib: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1633
|
+
runtime: z.string(),
|
|
1634
|
+
created_at: z.string(),
|
|
1635
|
+
environment: z.array(z.string()).register(z.globalRegistry, { description: "The NAMES of the deployment's environment variables, sorted.\nValues are encrypted at rest and are never returned — they are\nwrite-only. To change a value, deploy the variable with the new\nvalue; to remove a variable, deploy it with an empty value.\n" }).optional(),
|
|
1636
|
+
error: z.string().register(z.globalRegistry, { description: "Human-readable reason the deployment build failed. Present only\nwhen `status` is `failed`.\n" }).optional()
|
|
1637
|
+
});
|
|
1638
|
+
const zNeonFunction = z.strictObject({
|
|
1639
|
+
id: z.string().register(z.globalRegistry, { description: "Opaque, stable function identifier." }),
|
|
1640
|
+
slug: z.string().register(z.globalRegistry, { description: "Branch-unique, lowercase DNS-label. Forms the invocation URL's host together with the branch id. Immutable." }),
|
|
1641
|
+
name: z.string().register(z.globalRegistry, { description: "Free-form display name." }),
|
|
1642
|
+
invocation_url: z.string().register(z.globalRegistry, { description: "URL at which the function is invoked. The host carries `<branch_id>-<slug>` as its first DNS label under a Neon-managed functions domain, and the URL ends with a trailing slash so paths concatenate onto it. Empty string when the function has no servable invoke host (e.g. a deployment without an invocation front-door)." }),
|
|
1643
|
+
current_deployment: zNeonFunctionDeployment.optional(),
|
|
1644
|
+
active_deployment: zNeonFunctionDeployment.optional(),
|
|
1645
|
+
created_at: z.string()
|
|
1646
|
+
});
|
|
1647
|
+
const zNeonFunctionResponse = z.strictObject({ function: zNeonFunction });
|
|
1648
|
+
const zNeonFunctionsListResponse = z.strictObject({ functions: z.array(zNeonFunction) });
|
|
1649
|
+
const zNeonFunctionUpdateRequest = z.strictObject({ name: z.string().min(1).max(256).nullable() });
|
|
1650
|
+
const zNeonFunctionDeploymentResponse = z.strictObject({ deployment: zNeonFunctionDeployment });
|
|
1651
|
+
const zFunctionDeployRequest = z.strictObject({
|
|
1652
|
+
zip: z.string().register(z.globalRegistry, { description: "Optional ZIP archive of the function source code. Omit to reuse the\nlatest version's bundle (a config-only change). Required for the\nfirst deployment of a function.\n" }).optional(),
|
|
1653
|
+
runtime: z.enum(["nodejs24"]).optional(),
|
|
1654
|
+
environment: z.string().register(z.globalRegistry, { description: "Optional JSON object (a string-to-string map) of environment\nvariables for the deployment, e.g. {\"KEY\":\"VALUE\"}. Carried as a\nJSON-encoded string because multipart form data does not support\ntyped object parts.\n\nValues are write-only: they are encrypted at rest, and responses\ncarry only the variable names (the `environment` array), never the\nvalues.\n" }).optional()
|
|
1655
|
+
});
|
|
1656
|
+
/**
|
|
1657
|
+
* A cursor to use in pagination. A cursor defines your place in the data list. Include `response.pagination.next` in subsequent API calls to fetch next page of the list.
|
|
1658
|
+
*/
|
|
1659
|
+
const zCursorParam = z.string().register(z.globalRegistry, { description: "A cursor to use in pagination. A cursor defines your place in the data list. Include `response.pagination.next` in subsequent API calls to fetch next page of the list." });
|
|
1660
|
+
/**
|
|
1661
|
+
* The maximum number of records to be returned in the response
|
|
1662
|
+
*/
|
|
1663
|
+
const zLimitParam = z.int().gte(1).lte(1e4).register(z.globalRegistry, { description: "The maximum number of records to be returned in the response" });
|
|
1664
|
+
/**
|
|
1665
|
+
* Defines the sorting order of entities.
|
|
1666
|
+
*/
|
|
1667
|
+
const zSortOrderParam = z.enum(["asc", "desc"]).register(z.globalRegistry, { description: "Defines the sorting order of entities." });
|
|
1668
|
+
/**
|
|
1669
|
+
* Specify an explicit timeout in milliseconds to limit response delay.
|
|
1670
|
+
* After timing out, the incomplete list of project data fetched so far will be returned.
|
|
1671
|
+
* Projects still being fetched when the timeout occurred are listed in the "unavailable" attribute of the response.
|
|
1672
|
+
* If not specified, an implicit implementation defined timeout is chosen with the same behaviour as above
|
|
1673
|
+
*
|
|
1674
|
+
*/
|
|
1675
|
+
const zTimeoutParam = z.int().gte(100).lte(3e4).register(z.globalRegistry, { description: "Specify an explicit timeout in milliseconds to limit response delay.\nAfter timing out, the incomplete list of project data fetched so far will be returned.\nProjects still being fetched when the timeout occurred are listed in the \"unavailable\" attribute of the response.\nIf not specified, an implicit implementation defined timeout is chosen with the same behaviour as above\n" });
|
|
1676
|
+
const zGetProjectAdvisorSecurityIssuesPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Neon project ID" }) });
|
|
1677
|
+
const zGetProjectAdvisorSecurityIssuesQuery = z.strictObject({
|
|
1678
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Branch ID to analyze. If not specified, the project's default branch is used." }).optional(),
|
|
1679
|
+
database_name: z.string().register(z.globalRegistry, { description: "Database name to analyze. Required if branch has multiple databases." }).optional(),
|
|
1680
|
+
category: zAdvisorCategory.optional(),
|
|
1681
|
+
min_severity: z.enum([
|
|
1682
|
+
"INFO",
|
|
1683
|
+
"WARN",
|
|
1684
|
+
"ERROR"
|
|
1685
|
+
]).register(z.globalRegistry, { description: "Minimum severity level to include. For example, WARN returns WARN and ERROR issues, excluding INFO." }).optional()
|
|
1686
|
+
});
|
|
1687
|
+
const zCreateApiKeyBody = zApiKeyCreateRequest;
|
|
1688
|
+
const zRevokeApiKeyPath = z.strictObject({ key_id: z.int().register(z.globalRegistry, { description: "The API key ID" }) });
|
|
1689
|
+
const zGetProjectOperationPath = z.strictObject({
|
|
1690
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1691
|
+
operation_id: z.uuid().register(z.globalRegistry, { description: "The operation ID" })
|
|
1692
|
+
});
|
|
1693
|
+
const zListProjectsQuery = z.strictObject({
|
|
1694
|
+
cursor: z.string().register(z.globalRegistry, { description: "Specify the cursor value from the previous response to retrieve the next batch of projects." }).optional(),
|
|
1695
|
+
limit: z.int().gte(1).lte(400).register(z.globalRegistry, { description: "Specify a value from 1 to 400 to limit number of projects in the response." }).optional(),
|
|
1696
|
+
search: z.string().register(z.globalRegistry, { description: "Search by project `name` or `id`. You can specify partial `name` or `id` values to filter results." }).optional(),
|
|
1697
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Search for projects by `org_id`." }).optional(),
|
|
1698
|
+
timeout: z.int().gte(100).lte(3e4).register(z.globalRegistry, { description: "Specify an explicit timeout in milliseconds to limit response delay.\nAfter timing out, the incomplete list of project data fetched so far will be returned.\nProjects still being fetched when the timeout occurred are listed in the \"unavailable\" attribute of the response.\nIf not specified, an implicit implementation defined timeout is chosen with the same behaviour as above\n" }).optional(),
|
|
1699
|
+
recoverable: z.boolean().register(z.globalRegistry, { description: "Show only deleted projects within the recovery window.\n" }).optional()
|
|
1700
|
+
});
|
|
1701
|
+
const zCreateProjectBody = zProjectCreateRequest;
|
|
1702
|
+
const zListSharedProjectsQuery = z.strictObject({
|
|
1703
|
+
cursor: z.string().register(z.globalRegistry, { description: "Specify the cursor value from the previous response to get the next batch of projects." }).optional(),
|
|
1704
|
+
limit: z.int().gte(1).lte(400).register(z.globalRegistry, { description: "Specify a value from 1 to 400 to limit number of projects in the response." }).optional(),
|
|
1705
|
+
search: z.string().register(z.globalRegistry, { description: "Search query by name or id." }).optional(),
|
|
1706
|
+
timeout: z.int().gte(100).lte(3e4).register(z.globalRegistry, { description: "Specify an explicit timeout in milliseconds to limit response delay.\nAfter timing out, the incomplete list of project data fetched so far will be returned.\nProjects still being fetched when the timeout occurred are listed in the \"unavailable\" attribute of the response.\nIf not specified, an implicit implementation defined timeout is chosen with the same behaviour as above\n" }).optional()
|
|
1707
|
+
});
|
|
1708
|
+
const zDeleteProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1709
|
+
const zGetProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1710
|
+
const zUpdateProjectBody = zProjectUpdateRequest;
|
|
1711
|
+
const zUpdateProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1712
|
+
const zRecoverProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1713
|
+
const zListProjectOperationsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1714
|
+
const zListProjectOperationsQuery = z.strictObject({
|
|
1715
|
+
cursor: z.string().register(z.globalRegistry, { description: "Specify the cursor value from the previous response to get the next batch of operations" }).optional(),
|
|
1716
|
+
limit: z.int().gte(1).lte(1e3).register(z.globalRegistry, { description: "Specify a value from 1 to 1000 to limit number of operations in the response" }).optional()
|
|
1717
|
+
});
|
|
1718
|
+
const zListProjectPermissionsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
|
|
1719
|
+
const zGrantPermissionToProjectBody = zGrantPermissionToProjectRequest;
|
|
1720
|
+
const zGrantPermissionToProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
|
|
1721
|
+
const zListProjectMembersPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
|
|
1722
|
+
const zListProjectMembersQuery = z.strictObject({
|
|
1723
|
+
cursor: z.string().register(z.globalRegistry, { description: "A cursor to use in pagination. A cursor defines your place in the data list. Include `response.pagination.next` in subsequent API calls to fetch next page of the list." }).optional(),
|
|
1724
|
+
limit: z.int().gte(1).lte(500).register(z.globalRegistry, { description: "The maximum number of members to return in the response" }).optional()
|
|
1725
|
+
});
|
|
1726
|
+
const zRemoveProjectMemberRolePath = z.strictObject({
|
|
1727
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
|
|
1728
|
+
member_id: z.uuid()
|
|
1729
|
+
});
|
|
1730
|
+
const zRemoveProjectMemberRoleQuery = z.strictObject({ confirm_self_lockout: z.boolean().optional() });
|
|
1731
|
+
const zSetProjectMemberRoleBody = zSetProjectMemberRoleRequest;
|
|
1732
|
+
const zSetProjectMemberRolePath = z.strictObject({
|
|
1733
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
|
|
1734
|
+
member_id: z.uuid()
|
|
1735
|
+
});
|
|
1736
|
+
const zSetProjectMemberRoleQuery = z.strictObject({ confirm_self_demotion: z.boolean().optional() });
|
|
1737
|
+
const zRevokePermissionFromProjectPath = z.strictObject({
|
|
1738
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
|
|
1739
|
+
permission_id: z.string()
|
|
1740
|
+
});
|
|
1741
|
+
const zGetAvailablePreloadLibrariesPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
|
|
1742
|
+
const zCreateProjectTransferRequestBody = z.strictObject({ ttl_seconds: z.int().register(z.globalRegistry, { description: "Number of seconds the transfer request stays valid before it expires. Defaults to 86400 (24 hours).\n" }).optional() });
|
|
1743
|
+
const zCreateProjectTransferRequestPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1744
|
+
const zAcceptProjectTransferRequestBody = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID to transfer the project to. If not provided, the project will be\ntransferred to the current user or organization account.\n" }).optional() });
|
|
1745
|
+
const zAcceptProjectTransferRequestPath = z.strictObject({
|
|
1746
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1747
|
+
request_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project transfer request ID" })
|
|
1748
|
+
});
|
|
1749
|
+
const zGetProjectJwksPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1750
|
+
const zAddProjectJwksBody = zAddProjectJwksRequest;
|
|
1751
|
+
const zAddProjectJwksPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1752
|
+
const zDeleteProjectJwksPath = z.strictObject({
|
|
1753
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1754
|
+
jwks_id: z.string().register(z.globalRegistry, { description: "The JWKS ID" })
|
|
1755
|
+
});
|
|
1756
|
+
const zDeleteProjectBranchDataApiPath = z.strictObject({
|
|
1757
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1758
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
1759
|
+
database_name: z.string().register(z.globalRegistry, { description: "The database name" })
|
|
1760
|
+
});
|
|
1761
|
+
const zGetProjectBranchDataApiPath = z.strictObject({
|
|
1762
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1763
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
1764
|
+
database_name: z.string().register(z.globalRegistry, { description: "The database name" })
|
|
1765
|
+
});
|
|
1766
|
+
const zUpdateProjectBranchDataApiBody = zDataApiUpdateRequest;
|
|
1767
|
+
const zUpdateProjectBranchDataApiPath = z.strictObject({
|
|
1768
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1769
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
1770
|
+
database_name: z.string().register(z.globalRegistry, { description: "The database name" })
|
|
1771
|
+
});
|
|
1772
|
+
const zCreateProjectBranchDataApiBody = zDataApiCreateRequest;
|
|
1773
|
+
const zCreateProjectBranchDataApiPath = z.strictObject({
|
|
1774
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1775
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
1776
|
+
database_name: z.string().register(z.globalRegistry, { description: "The database name" })
|
|
1777
|
+
});
|
|
1778
|
+
const zCreateNeonAuthIntegrationBody = zNeonAuthCreateIntegrationRequest;
|
|
1779
|
+
const zDisableNeonAuthBody = z.strictObject({ delete_data: z.boolean().register(z.globalRegistry, { description: "If true, deletes the `neon_auth` schema from the database" }).optional() });
|
|
1780
|
+
const zDisableNeonAuthPath = z.strictObject({
|
|
1781
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1782
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1783
|
+
});
|
|
1784
|
+
const zGetNeonAuthPath = z.strictObject({
|
|
1785
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1786
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1787
|
+
});
|
|
1788
|
+
const zCreateNeonAuthBody = zEnableNeonAuthIntegrationRequest;
|
|
1789
|
+
const zCreateNeonAuthPath = z.strictObject({
|
|
1790
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1791
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1792
|
+
});
|
|
1793
|
+
const zDeleteNeonAuthDomainFromRedirectUriWhitelistBody = zNeonAuthDeleteDomainFromRedirectUriWhitelistRequest;
|
|
1794
|
+
const zDeleteNeonAuthDomainFromRedirectUriWhitelistPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1795
|
+
const zListNeonAuthRedirectUriWhitelistDomainsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1796
|
+
const zAddNeonAuthDomainToRedirectUriWhitelistBody = zNeonAuthAddDomainToRedirectUriWhitelistRequest;
|
|
1797
|
+
const zAddNeonAuthDomainToRedirectUriWhitelistPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1798
|
+
const zDeleteBranchNeonAuthTrustedDomainBody = zNeonAuthDeleteDomainFromRedirectUriWhitelistRequest;
|
|
1799
|
+
const zDeleteBranchNeonAuthTrustedDomainPath = z.strictObject({
|
|
1800
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1801
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1802
|
+
});
|
|
1803
|
+
const zListBranchNeonAuthTrustedDomainsPath = z.strictObject({
|
|
1804
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1805
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1806
|
+
});
|
|
1807
|
+
const zAddBranchNeonAuthTrustedDomainBody = zNeonAuthAddDomainToRedirectUriWhitelistRequest;
|
|
1808
|
+
const zAddBranchNeonAuthTrustedDomainPath = z.strictObject({
|
|
1809
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1810
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1811
|
+
});
|
|
1812
|
+
const zCreateNeonAuthProviderSdkKeysBody = zNeonAuthCreateAuthProviderSdkKeysRequest;
|
|
1813
|
+
const zCreateNeonAuthNewUserBody = zNeonAuthCreateNewUserRequest;
|
|
1814
|
+
const zCreateBranchNeonAuthNewUserBody = zCreateBranchNeonAuthNewUserRequest;
|
|
1815
|
+
const zCreateBranchNeonAuthNewUserPath = z.strictObject({
|
|
1816
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1817
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1818
|
+
});
|
|
1819
|
+
const zDeleteBranchNeonAuthUserPath = z.strictObject({
|
|
1820
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1821
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
1822
|
+
auth_user_id: z.string().register(z.globalRegistry, { description: "The Neon user ID" })
|
|
1823
|
+
});
|
|
1824
|
+
const zUpdateNeonAuthUserRoleBody = zUpdateNeonAuthUserRoleRequest;
|
|
1825
|
+
const zUpdateNeonAuthUserRolePath = z.strictObject({
|
|
1826
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1827
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
1828
|
+
auth_user_id: z.string().register(z.globalRegistry, { description: "The Neon user ID" })
|
|
1829
|
+
});
|
|
1830
|
+
const zDeleteNeonAuthUserPath = z.strictObject({
|
|
1831
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1832
|
+
auth_user_id: z.string().register(z.globalRegistry, { description: "The Neon user ID" })
|
|
1833
|
+
});
|
|
1834
|
+
const zTransferNeonAuthProviderProjectBody = zNeonAuthTransferAuthProviderProjectRequest;
|
|
1835
|
+
const zListNeonAuthIntegrationsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1836
|
+
const zListNeonAuthOauthProvidersPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1837
|
+
const zAddNeonAuthOauthProviderBody = zNeonAuthAddOAuthProviderRequest;
|
|
1838
|
+
const zAddNeonAuthOauthProviderPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1839
|
+
const zListBranchNeonAuthOauthProvidersPath = z.strictObject({
|
|
1840
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1841
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1842
|
+
});
|
|
1843
|
+
const zAddBranchNeonAuthOauthProviderBody = zNeonAuthAddOAuthProviderRequest;
|
|
1844
|
+
const zAddBranchNeonAuthOauthProviderPath = z.strictObject({
|
|
1845
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1846
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1847
|
+
});
|
|
1848
|
+
const zDeleteNeonAuthOauthProviderPath = z.strictObject({
|
|
1849
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1850
|
+
oauth_provider_id: zNeonAuthOauthProviderId
|
|
1851
|
+
});
|
|
1852
|
+
const zUpdateNeonAuthOauthProviderBody = zNeonAuthUpdateOAuthProviderRequest;
|
|
1853
|
+
const zUpdateNeonAuthOauthProviderPath = z.strictObject({
|
|
1854
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1855
|
+
oauth_provider_id: zNeonAuthOauthProviderId
|
|
1856
|
+
});
|
|
1857
|
+
const zDeleteBranchNeonAuthOauthProviderPath = z.strictObject({
|
|
1858
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1859
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
1860
|
+
oauth_provider_id: zNeonAuthOauthProviderId
|
|
1861
|
+
});
|
|
1862
|
+
const zUpdateBranchNeonAuthOauthProviderBody = zNeonAuthUpdateOAuthProviderRequest;
|
|
1863
|
+
const zUpdateBranchNeonAuthOauthProviderPath = z.strictObject({
|
|
1864
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1865
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
1866
|
+
oauth_provider_id: zNeonAuthOauthProviderId
|
|
1867
|
+
});
|
|
1868
|
+
const zGetNeonAuthEmailServerPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1869
|
+
const zUpdateNeonAuthEmailServerBody = zNeonAuthEmailServerConfig;
|
|
1870
|
+
const zUpdateNeonAuthEmailServerPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1871
|
+
const zSendNeonAuthTestEmailBody = zSendNeonAuthTestEmailRequest;
|
|
1872
|
+
const zSendNeonAuthTestEmailPath = z.strictObject({
|
|
1873
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1874
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1875
|
+
});
|
|
1876
|
+
const zGetNeonAuthEmailAndPasswordConfigPath = z.strictObject({
|
|
1877
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1878
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1879
|
+
});
|
|
1880
|
+
const zUpdateNeonAuthEmailAndPasswordConfigBody = zNeonAuthEmailAndPasswordConfigUpdate;
|
|
1881
|
+
const zUpdateNeonAuthEmailAndPasswordConfigPath = z.strictObject({
|
|
1882
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1883
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1884
|
+
});
|
|
1885
|
+
const zGetNeonAuthEmailProviderPath = z.strictObject({
|
|
1886
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1887
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1888
|
+
});
|
|
1889
|
+
const zUpdateNeonAuthEmailProviderBody = zNeonAuthEmailServerConfig;
|
|
1890
|
+
const zUpdateNeonAuthEmailProviderPath = z.strictObject({
|
|
1891
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1892
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1893
|
+
});
|
|
1894
|
+
const zDeleteNeonAuthIntegrationBody = z.strictObject({ delete_data: z.boolean().register(z.globalRegistry, { description: "If true, deletes the `neon_auth` schema from the database" }).optional() });
|
|
1895
|
+
const zDeleteNeonAuthIntegrationPath = z.strictObject({
|
|
1896
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1897
|
+
auth_provider: zNeonAuthSupportedAuthProvider
|
|
1898
|
+
});
|
|
1899
|
+
const zGetConnectionUriPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1900
|
+
const zGetConnectionUriQuery = z.strictObject({
|
|
1901
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID. Defaults to your project's default `branch_id` if not specified." }).optional(),
|
|
1902
|
+
endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID. Defaults to the read-write `endpoint_id` associated with the `branch_id` if not specified." }).optional(),
|
|
1903
|
+
database_name: z.string().register(z.globalRegistry, { description: "The database name" }),
|
|
1904
|
+
role_name: z.string().register(z.globalRegistry, { description: "The role name" }),
|
|
1905
|
+
pooled: z.boolean().register(z.globalRegistry, { description: "Adds the `-pooler` option to the connection URI when set to `true`, creating a pooled connection URI." }).optional()
|
|
1906
|
+
});
|
|
1907
|
+
const zGetNeonAuthAllowLocalhostPath = z.strictObject({
|
|
1908
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1909
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1910
|
+
});
|
|
1911
|
+
const zUpdateNeonAuthAllowLocalhostBody = zUpdateNeonAuthAllowLocalhostRequest;
|
|
1912
|
+
const zUpdateNeonAuthAllowLocalhostPath = z.strictObject({
|
|
1913
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1914
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1915
|
+
});
|
|
1916
|
+
const zGetNeonAuthPluginConfigsPath = z.strictObject({
|
|
1917
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1918
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1919
|
+
});
|
|
1920
|
+
const zUpdateNeonAuthOrganizationPluginBody = zNeonAuthOrganizationConfigUpdate;
|
|
1921
|
+
const zUpdateNeonAuthOrganizationPluginPath = z.strictObject({
|
|
1922
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1923
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1924
|
+
});
|
|
1925
|
+
const zUpdateNeonAuthConfigBody = zNeonAuthConfigUpdate;
|
|
1926
|
+
const zUpdateNeonAuthConfigPath = z.strictObject({
|
|
1927
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1928
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1929
|
+
});
|
|
1930
|
+
const zUpdateNeonAuthMagicLinkPluginBody = zNeonAuthMagicLinkConfigUpdate;
|
|
1931
|
+
const zUpdateNeonAuthMagicLinkPluginPath = z.strictObject({
|
|
1932
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1933
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1934
|
+
});
|
|
1935
|
+
const zGetNeonAuthPhoneNumberPluginPath = z.strictObject({
|
|
1936
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1937
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1938
|
+
});
|
|
1939
|
+
const zUpdateNeonAuthPhoneNumberPluginBody = zNeonAuthPhoneNumberConfigUpdate;
|
|
1940
|
+
const zUpdateNeonAuthPhoneNumberPluginPath = z.strictObject({
|
|
1941
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1942
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1943
|
+
});
|
|
1944
|
+
const zGetNeonAuthWebhookConfigPath = z.strictObject({
|
|
1945
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1946
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1947
|
+
});
|
|
1948
|
+
const zUpdateNeonAuthWebhookConfigBody = zNeonAuthWebhookConfig;
|
|
1949
|
+
const zUpdateNeonAuthWebhookConfigPath = z.strictObject({
|
|
1950
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1951
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
1952
|
+
});
|
|
1953
|
+
const zListProjectBranchesPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1954
|
+
const zListProjectBranchesQuery = z.strictObject({
|
|
1955
|
+
search: z.string().register(z.globalRegistry, { description: "Search by branch `name` or `id`. You can specify partial `name` or `id` values to filter results." }).optional(),
|
|
1956
|
+
sort_by: z.enum([
|
|
1957
|
+
"name",
|
|
1958
|
+
"created_at",
|
|
1959
|
+
"updated_at"
|
|
1960
|
+
]).register(z.globalRegistry, { description: "Sort the branches by sort_field. If not provided, branches will be sorted by updated_at descending order" }).optional(),
|
|
1961
|
+
cursor: z.string().register(z.globalRegistry, { description: "A cursor to use in pagination. A cursor defines your place in the data list. Include `response.pagination.next` in subsequent API calls to fetch next page of the list." }).optional(),
|
|
1962
|
+
sort_order: z.enum(["asc", "desc"]).register(z.globalRegistry, { description: "Defines the sorting order of entities." }).optional(),
|
|
1963
|
+
limit: z.int().gte(1).lte(1e4).register(z.globalRegistry, { description: "The maximum number of records to be returned in the response" }).optional(),
|
|
1964
|
+
include_deleted: z.boolean().register(z.globalRegistry, { description: "If true, return recoverable deleted branches too (soft-deleted within the recovery window).\nIf false or not provided, return only active (non-deleted) branches.\n\nThis parameter is part of the Branch Recovery feature, which is in preview and not available to all users.\n" }).optional()
|
|
1965
|
+
});
|
|
1966
|
+
const zCreateProjectBranchBody = zBranchCreateRequest.merge(zAnnotationCreateValueRequest);
|
|
1967
|
+
const zCreateProjectBranchPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1968
|
+
const zCreateProjectBranchAnonymizedBody = zBranchAnonymizedCreateRequest;
|
|
1969
|
+
const zCreateProjectBranchAnonymizedPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1970
|
+
const zCountProjectBranchesPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
1971
|
+
const zCountProjectBranchesQuery = z.strictObject({ search: z.string().register(z.globalRegistry, { description: "Count branches matching the `name` in search query" }).optional() });
|
|
1972
|
+
const zDeleteProjectBranchPath = z.strictObject({
|
|
1973
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1974
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
1975
|
+
});
|
|
1976
|
+
const zDeleteProjectBranchQuery = z.strictObject({ hard_delete: z.boolean().register(z.globalRegistry, { description: "If true, the branch is permanently deleted immediately without a recovery window.\nIf false (default), the branch can be recovered within 7 days via the recover endpoint.\n\nThis parameter is part of the Branch Recovery feature, which is in preview and not available to all users.\n" }).optional() });
|
|
1977
|
+
const zGetProjectBranchPath = z.strictObject({
|
|
1978
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1979
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
1980
|
+
});
|
|
1981
|
+
const zUpdateProjectBranchBody = zBranchUpdateRequest;
|
|
1982
|
+
const zUpdateProjectBranchPath = z.strictObject({
|
|
1983
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1984
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
1985
|
+
});
|
|
1986
|
+
const zRestoreProjectBranchBody = zBranchRestoreRequest;
|
|
1987
|
+
const zRestoreProjectBranchPath = z.strictObject({
|
|
1988
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1989
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
1990
|
+
});
|
|
1991
|
+
const zGetProjectBranchSchemaPath = z.strictObject({
|
|
1992
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
1993
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
1994
|
+
});
|
|
1995
|
+
const zGetProjectBranchSchemaQuery = z.strictObject({
|
|
1996
|
+
db_name: z.string().register(z.globalRegistry, { description: "Name of the database for which the schema is retrieved" }),
|
|
1997
|
+
lsn: z.string().register(z.globalRegistry, { description: "The Log Sequence Number (LSN) for which the schema is retrieved\n" }).optional(),
|
|
1998
|
+
timestamp: z.iso.datetime().register(z.globalRegistry, { description: "The point in time for which the schema is retrieved\n" }).optional(),
|
|
1999
|
+
format: z.string().register(z.globalRegistry, { description: "The format of the schema to retrieve. Possible values:\n- `sql` (default)\n- `json`\n" }).optional()
|
|
2000
|
+
});
|
|
2001
|
+
const zGetProjectBranchSchemaComparisonPath = z.strictObject({
|
|
2002
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2003
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2004
|
+
});
|
|
2005
|
+
const zGetProjectBranchSchemaComparisonQuery = z.strictObject({
|
|
2006
|
+
base_branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID to compare the schema with" }).optional(),
|
|
2007
|
+
db_name: z.string().register(z.globalRegistry, { description: "Name of the database for which the schema is retrieved" }),
|
|
2008
|
+
lsn: z.string().register(z.globalRegistry, { description: "The Log Sequence Number (LSN) for which the schema is retrieved\n" }).optional(),
|
|
2009
|
+
timestamp: z.iso.datetime().register(z.globalRegistry, { description: "The point in time for which the schema is retrieved\n" }).optional(),
|
|
2010
|
+
base_lsn: z.string().register(z.globalRegistry, { description: "The Log Sequence Number (LSN) for the base branch schema\n" }).optional(),
|
|
2011
|
+
base_timestamp: z.iso.datetime().register(z.globalRegistry, { description: "The point in time for the base branch schema\n" }).optional()
|
|
2012
|
+
});
|
|
2013
|
+
const zGetMaskingRulesPath = z.strictObject({
|
|
2014
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2015
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2016
|
+
});
|
|
2017
|
+
const zUpdateMaskingRulesBody = zMaskingRulesUpdateRequest;
|
|
2018
|
+
const zUpdateMaskingRulesPath = z.strictObject({
|
|
2019
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2020
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2021
|
+
});
|
|
2022
|
+
const zGetAnonymizedBranchStatusPath = z.strictObject({
|
|
2023
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2024
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2025
|
+
});
|
|
2026
|
+
const zStartAnonymizationPath = z.strictObject({
|
|
2027
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2028
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2029
|
+
});
|
|
2030
|
+
const zSetDefaultProjectBranchPath = z.strictObject({
|
|
2031
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2032
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2033
|
+
});
|
|
2034
|
+
const zFinalizeRestoreBranchBody = z.strictObject({ name: z.string().register(z.globalRegistry, { description: "Name for the replaced branch. If omitted, a unique name is generated." }).optional() });
|
|
2035
|
+
const zFinalizeRestoreBranchPath = z.strictObject({
|
|
2036
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2037
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2038
|
+
});
|
|
2039
|
+
const zListProjectBranchEndpointsPath = z.strictObject({
|
|
2040
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2041
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2042
|
+
});
|
|
2043
|
+
const zListProjectBranchDatabasesPath = z.strictObject({
|
|
2044
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2045
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2046
|
+
});
|
|
2047
|
+
const zCreateProjectBranchDatabaseBody = zDatabaseCreateRequest;
|
|
2048
|
+
const zCreateProjectBranchDatabasePath = z.strictObject({
|
|
2049
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2050
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2051
|
+
});
|
|
2052
|
+
const zDeleteProjectBranchDatabasePath = z.strictObject({
|
|
2053
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2054
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
|
|
2055
|
+
database_name: z.string().register(z.globalRegistry, { description: "The database name" })
|
|
2056
|
+
});
|
|
2057
|
+
const zGetProjectBranchDatabasePath = z.strictObject({
|
|
2058
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2059
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
|
|
2060
|
+
database_name: z.string().register(z.globalRegistry, { description: "The database name" })
|
|
2061
|
+
});
|
|
2062
|
+
const zUpdateProjectBranchDatabaseBody = zDatabaseUpdateRequest;
|
|
2063
|
+
const zUpdateProjectBranchDatabasePath = z.strictObject({
|
|
2064
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2065
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
|
|
2066
|
+
database_name: z.string().register(z.globalRegistry, { description: "The database name" })
|
|
2067
|
+
});
|
|
2068
|
+
const zListProjectBranchRolesPath = z.strictObject({
|
|
2069
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2070
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2071
|
+
});
|
|
2072
|
+
const zCreateProjectBranchRoleBody = zRoleCreateRequest;
|
|
2073
|
+
const zCreateProjectBranchRolePath = z.strictObject({
|
|
2074
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2075
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2076
|
+
});
|
|
2077
|
+
const zDeleteProjectBranchRolePath = z.strictObject({
|
|
2078
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2079
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
|
|
2080
|
+
role_name: z.string().register(z.globalRegistry, { description: "The role name" })
|
|
2081
|
+
});
|
|
2082
|
+
const zGetProjectBranchRolePath = z.strictObject({
|
|
2083
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2084
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
|
|
2085
|
+
role_name: z.string().register(z.globalRegistry, { description: "The role name" })
|
|
2086
|
+
});
|
|
2087
|
+
const zGetProjectBranchRolePasswordPath = z.strictObject({
|
|
2088
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2089
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
|
|
2090
|
+
role_name: z.string().register(z.globalRegistry, { description: "The role name" })
|
|
2091
|
+
});
|
|
2092
|
+
const zResetProjectBranchRolePasswordPath = z.strictObject({
|
|
2093
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2094
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
|
|
2095
|
+
role_name: z.string().register(z.globalRegistry, { description: "The role name" })
|
|
2096
|
+
});
|
|
2097
|
+
const zListProjectVpcEndpointsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
2098
|
+
const zDeleteProjectVpcEndpointPath = z.strictObject({
|
|
2099
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2100
|
+
vpc_endpoint_id: z.string().register(z.globalRegistry, { description: "The VPC endpoint ID" })
|
|
2101
|
+
});
|
|
2102
|
+
const zAssignProjectVpcEndpointBody = zVpcEndpointAssignment;
|
|
2103
|
+
const zAssignProjectVpcEndpointPath = z.strictObject({
|
|
2104
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2105
|
+
vpc_endpoint_id: z.string().register(z.globalRegistry, { description: "The VPC endpoint ID" })
|
|
2106
|
+
});
|
|
2107
|
+
const zListProjectEndpointsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
2108
|
+
const zCreateProjectEndpointBody = zEndpointCreateRequest;
|
|
2109
|
+
const zCreateProjectEndpointPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
2110
|
+
const zDeleteProjectEndpointPath = z.strictObject({
|
|
2111
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2112
|
+
endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
|
|
2113
|
+
});
|
|
2114
|
+
const zGetProjectEndpointPath = z.strictObject({
|
|
2115
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2116
|
+
endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
|
|
2117
|
+
});
|
|
2118
|
+
const zUpdateProjectEndpointBody = zEndpointUpdateRequest;
|
|
2119
|
+
const zUpdateProjectEndpointPath = z.strictObject({
|
|
2120
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2121
|
+
endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
|
|
2122
|
+
});
|
|
2123
|
+
const zStartProjectEndpointPath = z.strictObject({
|
|
2124
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2125
|
+
endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
|
|
2126
|
+
});
|
|
2127
|
+
const zSuspendProjectEndpointPath = z.strictObject({
|
|
2128
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2129
|
+
endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
|
|
2130
|
+
});
|
|
2131
|
+
const zRestartProjectEndpointPath = z.strictObject({
|
|
2132
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2133
|
+
endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
|
|
2134
|
+
});
|
|
2135
|
+
const zGetConsumptionHistoryPerProjectQuery = z.strictObject({
|
|
2136
|
+
cursor: z.string().register(z.globalRegistry, { description: "Specify the cursor value from the previous response to get the next batch of projects." }).optional(),
|
|
2137
|
+
limit: z.int().gte(1).lte(100).register(z.globalRegistry, { description: "Specify a value from 1 to 100 to limit number of projects in the response." }).optional(),
|
|
2138
|
+
project_ids: z.array(z.string().regex(/^([a-z0-9-]{1,60}(,[a-z0-9-]{1,60}){0,99})?$/)).min(0).max(100).register(z.globalRegistry, { description: "Specify a list of project IDs to filter the response.\nIf omitted, the response will contain all projects.\nA list of project IDs can be specified as an array of parameter values or as a comma-separated list in a single parameter value.\n- As an array of parameter values: `project_ids=cold-poetry-09157238%20&project_ids=quiet-snow-71788278`\n- As a comma-separated list in a single parameter value: `project_ids=cold-poetry-09157238,quiet-snow-71788278`\n" }).optional(),
|
|
2139
|
+
from: z.iso.datetime().register(z.globalRegistry, { description: "Specify the start `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified `granularity`.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n\nThe consumption history is available starting from `March 1, 2024, at 00:00:00 UTC`.\n" }),
|
|
2140
|
+
to: z.iso.datetime().register(z.globalRegistry, { description: "Specify the end `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified granularity.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n" }),
|
|
2141
|
+
granularity: zConsumptionHistoryGranularity,
|
|
2142
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Specify the organization for which the project consumption metrics should be returned.\nIf this parameter is not provided, the endpoint will return the metrics for the\nauthenticated user's projects.\n" }).optional(),
|
|
2143
|
+
include_v1_metrics: z.boolean().register(z.globalRegistry, { description: "The field is deprecated. Please use `metrics` instead.\nIf `metrics` is specified, this field is ignored.\nInclude metrics utilized in previous pricing models.\n- **data_storage_bytes_hour**: The sum of the maximum observed storage values for each hour,\n which never decreases.\n" }).optional(),
|
|
2144
|
+
metrics: zConsumptionHistoryQueryMetrics.optional()
|
|
2145
|
+
});
|
|
2146
|
+
const zGetConsumptionHistoryPerProjectV2Query = z.strictObject({
|
|
2147
|
+
cursor: z.string().register(z.globalRegistry, { description: "Cursor from the previous response (`pagination.cursor`). Pass it to fetch the next page\nof projects. Pages are ordered by project creation order (newest first).\n" }).optional(),
|
|
2148
|
+
limit: z.int().gte(1).lte(100).register(z.globalRegistry, { description: "Maximum number of projects per page. Allowed range: 1 to 100. Default: 10.\n" }).optional(),
|
|
2149
|
+
project_ids: z.array(z.string().regex(/^([a-z0-9-]{1,60}(,[a-z0-9-]{1,60}){0,99})?$/)).min(0).max(100).register(z.globalRegistry, { description: "Optional project IDs to filter the response (up to 100). If omitted, projects in the\norganization are included across pages (use `cursor` and `limit`).\n\nPass multiple IDs as repeated query parameters or a comma-separated list:\n- `project_ids=cold-poetry-09157238&project_ids=quiet-snow-71788278`\n- `project_ids=cold-poetry-09157238,quiet-snow-71788278`\n" }).optional(),
|
|
2150
|
+
from: z.iso.datetime().register(z.globalRegistry, { description: "Specify the start `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified `granularity`.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n\nThe earliest allowed `from` value is `March 1, 2024, at 00:00:00 UTC`.\nMetrics are returned from when the account upgraded to an eligible plan, which may be\nlater than that date.\n" }),
|
|
2151
|
+
to: z.iso.datetime().register(z.globalRegistry, { description: "Specify the end `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified `granularity`.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n" }),
|
|
2152
|
+
granularity: zConsumptionHistoryGranularity,
|
|
2153
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Organization ID. Metrics are returned for projects in this organization.\n" }),
|
|
2154
|
+
metrics: zConsumptionHistoryQueryMetrics
|
|
2155
|
+
});
|
|
2156
|
+
const zGetConsumptionHistoryPerBranchV2Query = z.strictObject({
|
|
2157
|
+
cursor: z.string().register(z.globalRegistry, { description: "Cursor from the previous response (`pagination.cursor`). Pass it to fetch the next page\nof branches. Pages are ordered by project ID, then branch ID.\n" }).optional(),
|
|
2158
|
+
limit: z.int().gte(1).lte(1e3).register(z.globalRegistry, { description: "Maximum number of branches per page. Allowed range: 1 to 1000. Default: 100.\n" }).optional(),
|
|
2159
|
+
project_ids: z.array(z.string().regex(/^([a-z0-9-]{1,60}(,[a-z0-9-]{1,60}){0,99})?$/)).min(1).max(100).register(z.globalRegistry, { description: "Project IDs to include (required, 1 to 100). Returns metrics for branches in these projects.\n\nPass multiple IDs as repeated query parameters or a comma-separated list:\n- `project_ids=cold-poetry-09157238&project_ids=quiet-snow-71788278`\n- `project_ids=cold-poetry-09157238,quiet-snow-71788278`\n" }),
|
|
2160
|
+
branch_ids: z.array(z.string().regex(/^([a-z0-9-]{1,60}(,[a-z0-9-]{1,60}){0,99})?$/)).min(0).max(100).register(z.globalRegistry, { description: "Optional branch IDs to filter the response (up to 100). If omitted, all branches in the\nlisted projects are included.\n\nPass multiple IDs as repeated query parameters or a comma-separated list:\n- `branch_ids=br-aged-salad-637688&branch_ids=br-sweet-breeze-497520`\n- `branch_ids=br-aged-salad-637688,br-sweet-breeze-497520`\n" }).optional(),
|
|
2161
|
+
from: z.iso.datetime().register(z.globalRegistry, { description: "Specify the start `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified `granularity`.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n\nBranch-level metrics are returned from when the account first ingests branch-level\nconsumption data. Periods before that time contain no branch metrics.\n" }),
|
|
2162
|
+
to: z.iso.datetime().register(z.globalRegistry, { description: "Specify the end `date-time` for the consumption period.\nThe `date-time` value is rounded according to the specified `granularity`.\nFor example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`.\nThe specified `date-time` value must respect the specified `granularity`:\n- For `hourly`, consumption metrics are limited to the last 168 hours.\n- For `daily`, consumption metrics are limited to the last 60 days.\n- For `monthly`, consumption metrics are limited to the last year.\n" }),
|
|
2163
|
+
granularity: zConsumptionHistoryGranularity,
|
|
2164
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Organization ID. Metrics are returned for projects in this organization.\n" }),
|
|
2165
|
+
metrics: zConsumptionHistoryQueryMetrics
|
|
2166
|
+
});
|
|
2167
|
+
const zGetOrganizationPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
|
|
2168
|
+
const zListOrgApiKeysPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
|
|
2169
|
+
const zCreateOrgApiKeyBody = zOrgApiKeyCreateRequest;
|
|
2170
|
+
const zCreateOrgApiKeyPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
|
|
2171
|
+
const zRevokeOrgApiKeyPath = z.strictObject({
|
|
2172
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
|
|
2173
|
+
key_id: z.int().register(z.globalRegistry, { description: "The API key ID" })
|
|
2174
|
+
});
|
|
2175
|
+
const zDeleteOrganizationSpendingLimitPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
|
|
2176
|
+
const zGetOrganizationSpendingLimitPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
|
|
2177
|
+
const zSetOrganizationSpendingLimitBody = zSpendingLimitUpdateRequest;
|
|
2178
|
+
const zSetOrganizationSpendingLimitPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
|
|
2179
|
+
const zGetOrganizationMembersPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
|
|
2180
|
+
const zGetOrganizationMembersQuery = z.strictObject({
|
|
2181
|
+
sort_by: z.enum([
|
|
2182
|
+
"email",
|
|
2183
|
+
"role",
|
|
2184
|
+
"joined_at"
|
|
2185
|
+
]).register(z.globalRegistry, { description: "Sort the members by the specified field. Defaults to `joined_at`." }).optional(),
|
|
2186
|
+
cursor: z.string().register(z.globalRegistry, { description: "A cursor to use in pagination. A cursor defines your place in the data list. Include `response.pagination.next` in subsequent API calls to fetch next page of the list." }).optional(),
|
|
2187
|
+
sort_order: z.enum(["asc", "desc"]).register(z.globalRegistry, { description: "Defines the sorting order of entities." }).optional(),
|
|
2188
|
+
limit: z.int().gte(1).lte(500).register(z.globalRegistry, { description: "The maximum number of members to return in the response" }).optional()
|
|
2189
|
+
});
|
|
2190
|
+
const zRemoveOrganizationMemberPath = z.strictObject({
|
|
2191
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
|
|
2192
|
+
member_id: z.uuid().register(z.globalRegistry, { description: "The Neon organization member ID" })
|
|
2193
|
+
});
|
|
2194
|
+
const zGetOrganizationMemberPath = z.strictObject({
|
|
2195
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
|
|
2196
|
+
member_id: z.uuid().register(z.globalRegistry, { description: "The Neon organization member ID" })
|
|
2197
|
+
});
|
|
2198
|
+
const zUpdateOrganizationMemberBody = zOrganizationMemberUpdateRequest;
|
|
2199
|
+
const zUpdateOrganizationMemberPath = z.strictObject({
|
|
2200
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
|
|
2201
|
+
member_id: z.uuid().register(z.globalRegistry, { description: "The Neon organization member ID" })
|
|
2202
|
+
});
|
|
2203
|
+
const zGetOrganizationInvitationsPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
|
|
2204
|
+
const zCreateOrganizationInvitationsBody = zOrganizationInvitesCreateRequest;
|
|
2205
|
+
const zCreateOrganizationInvitationsPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
|
|
2206
|
+
const zTransferProjectsFromOrgToOrgBody = zTransferProjectsToOrganizationRequest;
|
|
2207
|
+
const zTransferProjectsFromOrgToOrgPath = z.strictObject({ source_org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID (source org, which currently owns the project)" }) });
|
|
2208
|
+
const zListOrganizationVpcEndpointsAllRegionsPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
|
|
2209
|
+
const zListOrganizationVpcEndpointsPath = z.strictObject({
|
|
2210
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
|
|
2211
|
+
region_id: z.string().register(z.globalRegistry, { description: "The Neon region ID" })
|
|
2212
|
+
});
|
|
2213
|
+
const zDeleteOrganizationVpcEndpointPath = z.strictObject({
|
|
2214
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
|
|
2215
|
+
region_id: z.string().register(z.globalRegistry, { description: "The Neon region ID.\nAzure regions are currently not supported.\n" }),
|
|
2216
|
+
vpc_endpoint_id: z.string().register(z.globalRegistry, { description: "The VPC endpoint ID" })
|
|
2217
|
+
});
|
|
2218
|
+
const zGetOrganizationVpcEndpointDetailsPath = z.strictObject({
|
|
2219
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
|
|
2220
|
+
region_id: z.string().register(z.globalRegistry, { description: "The Neon region ID.\nAzure regions are currently not supported.\n" }),
|
|
2221
|
+
vpc_endpoint_id: z.string().register(z.globalRegistry, { description: "The VPC endpoint ID" })
|
|
2222
|
+
});
|
|
2223
|
+
const zAssignOrganizationVpcEndpointBody = zVpcEndpointAssignment;
|
|
2224
|
+
const zAssignOrganizationVpcEndpointPath = z.strictObject({
|
|
2225
|
+
org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
|
|
2226
|
+
region_id: z.string().register(z.globalRegistry, { description: "The Neon region ID.\nAzure regions are currently not supported.\n" }),
|
|
2227
|
+
vpc_endpoint_id: z.string().register(z.globalRegistry, { description: "The VPC endpoint ID" })
|
|
2228
|
+
});
|
|
2229
|
+
const zGetActiveRegionsQuery = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Organization ID. When provided, returns only regions available to this organization.\nRecommended for accurate region availability.\n" }).optional() });
|
|
2230
|
+
const zTransferProjectsFromUserToOrgBody = zTransferProjectsToOrganizationRequest;
|
|
2231
|
+
const zCreateSnapshotPath = z.strictObject({
|
|
2232
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2233
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2234
|
+
});
|
|
2235
|
+
const zCreateSnapshotQuery = z.strictObject({
|
|
2236
|
+
lsn: z.string().register(z.globalRegistry, { description: "The target Log Sequence Number (LSN) to take the snapshot from.\nMust fall within the restore window. Cannot be used with `timestamp`\n" }).optional(),
|
|
2237
|
+
timestamp: z.string().register(z.globalRegistry, { description: "The target timestamp for the snapshot. Must fall within the restore window. RFC 3339 format. Cannot be used with `lsn`.\n" }).optional(),
|
|
2238
|
+
name: z.string().register(z.globalRegistry, { description: "A name for the snapshot." }).optional(),
|
|
2239
|
+
expires_at: z.string().register(z.globalRegistry, { description: "The time at which the snapshot will be automatically deleted. RFC 3339 format.\n" }).optional()
|
|
2240
|
+
});
|
|
2241
|
+
const zListSnapshotsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
|
|
2242
|
+
const zDeleteSnapshotPath = z.strictObject({
|
|
2243
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2244
|
+
snapshot_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The snapshot ID" })
|
|
2245
|
+
});
|
|
2246
|
+
const zUpdateSnapshotBody = zSnapshotUpdateRequest;
|
|
2247
|
+
const zUpdateSnapshotPath = z.strictObject({
|
|
2248
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2249
|
+
snapshot_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The snapshot ID" })
|
|
2250
|
+
});
|
|
2251
|
+
const zRestoreSnapshotBody = z.strictObject({
|
|
2252
|
+
name: z.string().register(z.globalRegistry, { description: "A name for the newly restored branch. If not provided, the server generates a unique name for the branch automatically.\n" }).optional(),
|
|
2253
|
+
target_branch_id: z.string().register(z.globalRegistry, { description: "ID of the branch to restore the snapshot into. Defaults to the snapshot's source branch (`snapshot.source_branch_id`); fails if that cannot be determined.\n" }).optional(),
|
|
2254
|
+
finalize_restore: z.boolean().register(z.globalRegistry, { description: "Set to `true` to finalize the restore operation immediately.\nThis will complete the restore and move any associated computes to the new branch,\nsimilar to the `finalizeRestoreBranch` operation.\nDefaults to `false` to allow previewing the restored snapshot data first.\n" }).optional()
|
|
2255
|
+
});
|
|
2256
|
+
const zRestoreSnapshotPath = z.strictObject({
|
|
2257
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2258
|
+
snapshot_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The snapshot ID" })
|
|
2259
|
+
});
|
|
2260
|
+
const zRestoreSnapshotQuery = z.strictObject({ name: z.string().register(z.globalRegistry, { description: "Deprecated. Use the `name` field in the request body instead. Removal scheduled for November 29, 2025.\nA name for the newly restored branch. If omitted, a default name will be generated.\n" }).optional() });
|
|
2261
|
+
const zGetSnapshotSchedulePath = z.strictObject({
|
|
2262
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2263
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2264
|
+
});
|
|
2265
|
+
const zSetSnapshotScheduleBody = zBackupSchedule;
|
|
2266
|
+
const zSetSnapshotSchedulePath = z.strictObject({
|
|
2267
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2268
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
|
|
2269
|
+
});
|
|
2270
|
+
const zListProjectBranchBucketsPath = z.strictObject({
|
|
2271
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2272
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
2273
|
+
});
|
|
2274
|
+
const zCreateProjectBranchBucketBody = zBucketCreateRequest;
|
|
2275
|
+
const zCreateProjectBranchBucketPath = z.strictObject({
|
|
2276
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2277
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
2278
|
+
});
|
|
2279
|
+
const zDeleteProjectBranchBucketPath = z.strictObject({
|
|
2280
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2281
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2282
|
+
bucket_name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name" })
|
|
2283
|
+
});
|
|
2284
|
+
const zGetProjectBranchStoragePath = z.strictObject({
|
|
2285
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2286
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
2287
|
+
});
|
|
2288
|
+
const zGetProjectBranchAiGatewayPath = z.strictObject({
|
|
2289
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2290
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
2291
|
+
});
|
|
2292
|
+
const zQueryProjectBranchLogsBody = zProjectBranchLogsQueryRequest;
|
|
2293
|
+
const zQueryProjectBranchLogsPath = z.strictObject({
|
|
2294
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2295
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
2296
|
+
});
|
|
2297
|
+
const zListProjectBranchLogFieldsPath = z.strictObject({
|
|
2298
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2299
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
2300
|
+
});
|
|
2301
|
+
const zListProjectBranchLogFieldValuesPath = z.strictObject({
|
|
2302
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2303
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2304
|
+
field_name: z.string().min(1).register(z.globalRegistry, { description: "The log field whose distinct values should be returned. Must be one of\nthe names returned by the log fields endpoint for this branch.\n" })
|
|
2305
|
+
});
|
|
2306
|
+
const zListProjectBranchLogFieldValuesQuery = z.strictObject({
|
|
2307
|
+
since: zProjectBranchLogDuration.optional(),
|
|
2308
|
+
start_time: z.iso.datetime().register(z.globalRegistry, { description: "Inclusive beginning of the lookup window. Mutually exclusive with\n`since`.\n" }).optional(),
|
|
2309
|
+
end_time: z.iso.datetime().register(z.globalRegistry, { description: "Exclusive end of the lookup window. Defaults to the current time." }).optional(),
|
|
2310
|
+
source: zProjectBranchLogSource.optional(),
|
|
2311
|
+
limit: z.int().gte(1).lte(1e3).register(z.globalRegistry, { description: "Maximum number of distinct values to return. The response sets\n`is_truncated` when this bound, or the server's own scan cap, cut the\nlist short.\n" }).optional()
|
|
2312
|
+
});
|
|
2313
|
+
const zListProjectBranchBucketObjectsPath = z.strictObject({
|
|
2314
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2315
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2316
|
+
bucket_name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name" })
|
|
2317
|
+
});
|
|
2318
|
+
const zListProjectBranchBucketObjectsQuery = z.strictObject({
|
|
2319
|
+
prefix: z.string().register(z.globalRegistry, { description: "Only list objects whose key starts with this prefix." }).optional(),
|
|
2320
|
+
delimiter: z.string().register(z.globalRegistry, { description: "Collapse keys sharing a common prefix up to the first occurrence of\nthis delimiter (typically `/`) into the `folders` array.\n" }).optional(),
|
|
2321
|
+
cursor: z.string().register(z.globalRegistry, { description: "Opaque pagination cursor returned as `next_cursor` by a previous\ncall. Resume listing after the last item of the previous page.\n" }).optional(),
|
|
2322
|
+
limit: z.int().gte(1).lte(1e3).register(z.globalRegistry, { description: "Maximum number of items (objects + folders) to return." }).optional()
|
|
2323
|
+
});
|
|
2324
|
+
const zDeleteProjectBranchBucketObjectPath = z.strictObject({
|
|
2325
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2326
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2327
|
+
bucket_name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name" }),
|
|
2328
|
+
object_key: z.string().min(1).max(1024).register(z.globalRegistry, { description: "The object key. Keys may contain `/`; the `/` characters of nested\nkeys must be percent-encoded (`%2F`) in the path segment.\n" })
|
|
2329
|
+
});
|
|
2330
|
+
const zGetProjectBranchBucketObjectPath = z.strictObject({
|
|
2331
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2332
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2333
|
+
bucket_name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name" }),
|
|
2334
|
+
object_key: z.string().min(1).max(1024).register(z.globalRegistry, { description: "The object key. Keys may contain `/`; the `/` characters of nested\nkeys must be percent-encoded (`%2F`) in the path segment.\n" })
|
|
2335
|
+
});
|
|
2336
|
+
const zDeleteProjectBranchBucketObjectsByPrefixPath = z.strictObject({
|
|
2337
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2338
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2339
|
+
bucket_name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name" })
|
|
2340
|
+
});
|
|
2341
|
+
const zDeleteProjectBranchBucketObjectsByPrefixQuery = z.strictObject({ prefix: z.string().min(1).max(1024).register(z.globalRegistry, { description: "The key prefix (folder) to delete. Must be non-empty and end with\n`/`. Every object on this branch whose key starts with this prefix\nis soft-deleted.\n" }) });
|
|
2342
|
+
const zPresignProjectBranchBucketObjectBody = zPresignRequest;
|
|
2343
|
+
const zPresignProjectBranchBucketObjectPath = z.strictObject({
|
|
2344
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2345
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2346
|
+
bucket_name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name" }),
|
|
2347
|
+
object_key: z.string().min(1).max(1024).register(z.globalRegistry, { description: "The object key. Keys may contain `/`; the `/` characters of nested\nkeys must be percent-encoded (`%2F`) in the path segment.\n" })
|
|
2348
|
+
});
|
|
2349
|
+
const zListCredentialsPath = z.strictObject({
|
|
2350
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2351
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
2352
|
+
});
|
|
2353
|
+
const zCreateCredentialBody = zCreateCredentialRequest;
|
|
2354
|
+
const zCreateCredentialPath = z.strictObject({
|
|
2355
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2356
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
2357
|
+
});
|
|
2358
|
+
const zRevokeCredentialPath = z.strictObject({
|
|
2359
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2360
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2361
|
+
token_id: z.string().register(z.globalRegistry, { description: "The opaque credential id (e.g. nak_live_<32hex>)." })
|
|
2362
|
+
});
|
|
2363
|
+
const zListProjectBranchFunctionsPath = z.strictObject({
|
|
2364
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2365
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
|
|
2366
|
+
});
|
|
2367
|
+
const zListProjectBranchFunctionsQuery = z.strictObject({
|
|
2368
|
+
cursor: z.string().register(z.globalRegistry, { description: "A cursor to use in pagination. A cursor defines your place in the data list. Include `response.pagination.next` in subsequent API calls to fetch next page of the list." }).optional(),
|
|
2369
|
+
limit: z.int().gte(1).lte(1e3).register(z.globalRegistry, { description: "Specify a value from 1 to 1000 to limit number of functions in the response" }).optional()
|
|
2370
|
+
});
|
|
2371
|
+
const zDeleteProjectBranchFunctionPath = z.strictObject({
|
|
2372
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2373
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2374
|
+
slug: z.string().regex(/^[a-z0-9]{1,20}$/).register(z.globalRegistry, { description: "The function slug" })
|
|
2375
|
+
});
|
|
2376
|
+
const zGetProjectBranchFunctionPath = z.strictObject({
|
|
2377
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2378
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2379
|
+
slug: z.string().regex(/^[a-z0-9]{1,20}$/).register(z.globalRegistry, { description: "The function slug" })
|
|
2380
|
+
});
|
|
2381
|
+
const zUpdateProjectBranchFunctionBody = zNeonFunctionUpdateRequest;
|
|
2382
|
+
const zUpdateProjectBranchFunctionPath = z.strictObject({
|
|
2383
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2384
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2385
|
+
slug: z.string().regex(/^[a-z0-9]{1,20}$/).register(z.globalRegistry, { description: "The function slug" })
|
|
2386
|
+
});
|
|
2387
|
+
const zCreateProjectBranchFunctionDeploymentBody = zFunctionDeployRequest;
|
|
2388
|
+
const zCreateProjectBranchFunctionDeploymentPath = z.strictObject({
|
|
2389
|
+
project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
|
|
2390
|
+
branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
|
|
2391
|
+
slug: z.string().regex(/^[a-z0-9]{1,20}$/).register(z.globalRegistry, { description: "The function slug" })
|
|
2392
|
+
});
|
|
2393
|
+
//#endregion
|
|
2394
|
+
export { zAcceptProjectTransferRequestBody, zAcceptProjectTransferRequestPath, zAcceptProjectTransferRequestSatisfiesPlanError, zActiveRegionsResponse, zAddBranchNeonAuthOauthProviderBody, zAddBranchNeonAuthOauthProviderPath, zAddBranchNeonAuthTrustedDomainBody, zAddBranchNeonAuthTrustedDomainPath, zAddNeonAuthDomainToRedirectUriWhitelistBody, zAddNeonAuthDomainToRedirectUriWhitelistPath, zAddNeonAuthOauthProviderBody, zAddNeonAuthOauthProviderPath, zAddProjectJwksBody, zAddProjectJwksPath, zAddProjectJwksRequest, zAdvisorCategory, zAdvisorIssue, zAllowedIps, zAnnotationCreateValueRequest, zAnnotationData, zAnnotationObjectData, zAnnotationResponse, zAnnotationValueData, zAnnotationsMapResponse, zAnonymizationRunMetadata, zAnonymizedBranchStatusResponse, zApiKeyCreateRequest, zApiKeyCreateResponse, zApiKeyCreatorData, zApiKeyRevokeResponse, zApiKeysListResponseItem, zApplicationType, zAssignOrganizationVpcEndpointBody, zAssignOrganizationVpcEndpointPath, zAssignProjectVpcEndpointBody, zAssignProjectVpcEndpointPath, zAuthDetailsResponse, zAvailablePreloadLibraries, zAvailablePreloadLibrary, zBackupSchedule, zBackupScheduleItem, zBillingAccount, zBillingAccountState, zBillingPaymentMethod, zBillingSubscriptionType, zBranch, zBranchAiGateway, zBranchAiGatewayNotEnabled, zBranchAnonymizedCreateRequest, zBranchCreateRequest, zBranchCreateRequestEndpointOptions, zBranchOperations, zBranchRecoverResponse, zBranchRecoveryInfo, zBranchResponse, zBranchRestoreRequest, zBranchRestoreStatus, zBranchRestrictedAction, zBranchSchemaCompareResponse, zBranchSchemaJson, zBranchSchemaResponse, zBranchState, zBranchStorage, zBranchStorageNotEnabled, zBranchUpdateRequest, zBranchesCountResponse, zBranchesResponse, zBucket, zBucketAccessLevel, zBucketCreateRequest, zBucketObject, zBucketObjectsDeletePrefixResponse, zBucketObjectsListResponse, zBucketResponse, zBucketsListResponse, zComputeUnit, zConnectionDetails, zConnectionParameters, zConnectionUriResponse, zConnectionUrisOptionalResponse, zConnectionUrisResponse, zConsumptionHistoryGranularity, zConsumptionHistoryPerBranchV2, zConsumptionHistoryPerBranchV2Response, zConsumptionHistoryPerPeriod, zConsumptionHistoryPerPeriodV2, zConsumptionHistoryPerProject, zConsumptionHistoryPerProjectResponse, zConsumptionHistoryPerProjectV2, zConsumptionHistoryPerProjectV2Response, zConsumptionHistoryPerTimeframe, zConsumptionHistoryPerTimeframeV2, zConsumptionHistoryQueryMetrics, zConsumptionMetricValue, zCountProjectBranchesPath, zCountProjectBranchesQuery, zCreateApiKeyBody, zCreateBranchNeonAuthNewUserBody, zCreateBranchNeonAuthNewUserPath, zCreateBranchNeonAuthNewUserRequest, zCreateCredentialBody, zCreateCredentialPath, zCreateCredentialRequest, zCreateCredentialResponse, zCreateNeonAuthBody, zCreateNeonAuthIntegrationBody, zCreateNeonAuthNewUserBody, zCreateNeonAuthPath, zCreateNeonAuthProviderSdkKeysBody, zCreateOrgApiKeyBody, zCreateOrgApiKeyPath, zCreateOrganizationInvitationsBody, zCreateOrganizationInvitationsPath, zCreateProjectBody, zCreateProjectBranchAnonymizedBody, zCreateProjectBranchAnonymizedPath, zCreateProjectBranchBody, zCreateProjectBranchBucketBody, zCreateProjectBranchBucketPath, zCreateProjectBranchDataApiBody, zCreateProjectBranchDataApiPath, zCreateProjectBranchDatabaseBody, zCreateProjectBranchDatabasePath, zCreateProjectBranchFunctionDeploymentBody, zCreateProjectBranchFunctionDeploymentPath, zCreateProjectBranchPath, zCreateProjectBranchRoleBody, zCreateProjectBranchRolePath, zCreateProjectEndpointBody, zCreateProjectEndpointPath, zCreateProjectTransferRequestBody, zCreateProjectTransferRequestPath, zCreateSnapshotPath, zCreateSnapshotQuery, zCredentialMeta, zCredentialScope, zCurrentUserAuthAccount, zCurrentUserInfoResponse, zCursorPagination, zCursorPaginationResponse, zCursorParam, zDataApiCreateRequest, zDataApiCreateResponse, zDataApiReponse, zDataApiSettings, zDataApiUpdateRequest, zDatabase, zDatabaseCreateRequest, zDatabaseOperations, zDatabaseResponse, zDatabaseUpdateRequest, zDatabasesResponse, zDefaultEndpointSettings, zDeleteBranchNeonAuthOauthProviderPath, zDeleteBranchNeonAuthTrustedDomainBody, zDeleteBranchNeonAuthTrustedDomainPath, zDeleteBranchNeonAuthUserPath, zDeleteNeonAuthDomainFromRedirectUriWhitelistBody, zDeleteNeonAuthDomainFromRedirectUriWhitelistPath, zDeleteNeonAuthIntegrationBody, zDeleteNeonAuthIntegrationPath, zDeleteNeonAuthOauthProviderPath, zDeleteNeonAuthUserPath, zDeleteOrganizationSpendingLimitPath, zDeleteOrganizationVpcEndpointPath, zDeleteProjectBranchBucketObjectPath, zDeleteProjectBranchBucketObjectsByPrefixPath, zDeleteProjectBranchBucketObjectsByPrefixQuery, zDeleteProjectBranchBucketPath, zDeleteProjectBranchDataApiPath, zDeleteProjectBranchDatabasePath, zDeleteProjectBranchFunctionPath, zDeleteProjectBranchPath, zDeleteProjectBranchQuery, zDeleteProjectBranchRolePath, zDeleteProjectEndpointPath, zDeleteProjectJwksPath, zDeleteProjectPath, zDeleteProjectVpcEndpointPath, zDeleteSnapshotPath, zDisableNeonAuthBody, zDisableNeonAuthPath, zEmptyResponse, zEnableNeonAuthIntegrationRequest, zEndpoint, zEndpointCreateRequest, zEndpointOperations, zEndpointPoolerMode, zEndpointResponse, zEndpointSettingsData, zEndpointState, zEndpointType, zEndpointUpdateRequest, zEndpointsOptionalResponse, zEndpointsResponse, zErrorCode, zFinalizeRestoreBranchBody, zFinalizeRestoreBranchPath, zFunctionDeployRequest, zGeneralError, zGetActiveRegionsQuery, zGetAnonymizedBranchStatusPath, zGetAvailablePreloadLibrariesPath, zGetConnectionUriPath, zGetConnectionUriQuery, zGetConsumptionHistoryPerBranchV2Query, zGetConsumptionHistoryPerProjectQuery, zGetConsumptionHistoryPerProjectV2Query, zGetMaskingRulesPath, zGetNeonAuthAllowLocalhostPath, zGetNeonAuthEmailAndPasswordConfigPath, zGetNeonAuthEmailProviderPath, zGetNeonAuthEmailServerPath, zGetNeonAuthPath, zGetNeonAuthPhoneNumberPluginPath, zGetNeonAuthPluginConfigsPath, zGetNeonAuthWebhookConfigPath, zGetOrganizationInvitationsPath, zGetOrganizationMemberPath, zGetOrganizationMembersPath, zGetOrganizationMembersQuery, zGetOrganizationPath, zGetOrganizationSpendingLimitPath, zGetOrganizationVpcEndpointDetailsPath, zGetProjectAdvisorSecurityIssuesPath, zGetProjectAdvisorSecurityIssuesQuery, zGetProjectBranchAiGatewayPath, zGetProjectBranchBucketObjectPath, zGetProjectBranchDataApiPath, zGetProjectBranchDatabasePath, zGetProjectBranchFunctionPath, zGetProjectBranchPath, zGetProjectBranchRolePasswordPath, zGetProjectBranchRolePath, zGetProjectBranchSchemaComparisonPath, zGetProjectBranchSchemaComparisonQuery, zGetProjectBranchSchemaPath, zGetProjectBranchSchemaQuery, zGetProjectBranchStoragePath, zGetProjectEndpointPath, zGetProjectJwksPath, zGetProjectOperationPath, zGetProjectPath, zGetSnapshotSchedulePath, zGrantPermissionToProjectBody, zGrantPermissionToProjectPath, zGrantPermissionToProjectRequest, zIdentityProviderId, zInvitation, zJwks, zJwksCreationOperation, zJwksResponse, zLimitParam, zLimitsUnsatisfiedResponse, zListBranchNeonAuthOauthProvidersPath, zListBranchNeonAuthTrustedDomainsPath, zListCredentialsPath, zListCredentialsResponse, zListNeonAuthIntegrationsPath, zListNeonAuthIntegrationsResponse, zListNeonAuthOauthProvidersPath, zListNeonAuthOauthProvidersResponse, zListNeonAuthRedirectUriWhitelistDomainsPath, zListOrgApiKeysPath, zListOrganizationVpcEndpointsAllRegionsPath, zListOrganizationVpcEndpointsPath, zListProjectBranchBucketObjectsPath, zListProjectBranchBucketObjectsQuery, zListProjectBranchBucketsPath, zListProjectBranchDatabasesPath, zListProjectBranchEndpointsPath, zListProjectBranchFunctionsPath, zListProjectBranchFunctionsQuery, zListProjectBranchLogFieldValuesPath, zListProjectBranchLogFieldValuesQuery, zListProjectBranchLogFieldsPath, zListProjectBranchRolesPath, zListProjectBranchesPath, zListProjectBranchesQuery, zListProjectEndpointsPath, zListProjectMembersPath, zListProjectMembersQuery, zListProjectOperationsPath, zListProjectOperationsQuery, zListProjectPermissionsPath, zListProjectVpcEndpointsPath, zListProjectsQuery, zListSharedProjectsQuery, zListSnapshotsPath, zMaintenanceWindow, zMaskingRule, zMaskingRulesResponse, zMaskingRulesUpdateRequest, zMember, zMemberRole, zMemberUserInfo, zMemberWithUser, zNeonAuthAddDomainToRedirectUriWhitelistRequest, zNeonAuthAddOAuthProviderRequest, zNeonAuthAllowLocalhostResponse, zNeonAuthConfigResponse, zNeonAuthConfigUpdate, zNeonAuthCreateAuthProviderSdkKeysRequest, zNeonAuthCreateIntegrationRequest, zNeonAuthCreateIntegrationResponse, zNeonAuthCreateNewUserRequest, zNeonAuthCreateNewUserResponse, zNeonAuthDeleteDomainFromRedirectUriWhitelistItem, zNeonAuthDeleteDomainFromRedirectUriWhitelistRequest, zNeonAuthEmailAndPasswordConfig, zNeonAuthEmailAndPasswordConfigUpdate, zNeonAuthEmailServerConfig, zNeonAuthEmailServerConfigResponse, zNeonAuthEmailVerificationMethod, zNeonAuthIntegration, zNeonAuthMagicLinkConfig, zNeonAuthMagicLinkConfigUpdate, zNeonAuthOauthProvider, zNeonAuthOauthProviderId, zNeonAuthOauthProviderType, zNeonAuthOrganizationConfig, zNeonAuthOrganizationConfigUpdate, zNeonAuthPhoneNumberConfig, zNeonAuthPhoneNumberConfigUpdate, zNeonAuthPluginConfigs, zNeonAuthProviderProjectOwnedBy, zNeonAuthProviderProjectTransferStatus, zNeonAuthRedirectUriWhitelistDomain, zNeonAuthRedirectUriWhitelistResponse, zNeonAuthSupportedAuthProvider, zNeonAuthTransferAuthProviderProjectRequest, zNeonAuthTransferAuthProviderProjectResponse, zNeonAuthUpdateOAuthProviderRequest, zNeonAuthWebhookConfig, zNeonFunction, zNeonFunctionDeployment, zNeonFunctionDeploymentResponse, zNeonFunctionResponse, zNeonFunctionUpdateRequest, zNeonFunctionsListResponse, zOperation, zOperationAction, zOperationResponse, zOperationStatus, zOperationsResponse, zOrgApiKeyCreateRequest, zOrgApiKeyCreateResponse, zOrgApiKeyRevokeResponse, zOrgApiKeysListResponseItem, zOrganization, zOrganizationInvitationsResponse, zOrganizationInviteCreateRequest, zOrganizationInvitesCreateRequest, zOrganizationMemberUpdateRequest, zOrganizationMembersResponse, zOrganizationsResponse, zPagination, zPaginationResponse, zPaymentSource, zPaymentSourceBankCard, zPgSettingsData, zPgVersion, zPgbouncerSettingsData, zPlanDetails, zPlanVersion, zPreloadLibraries, zPresignProjectBranchBucketObjectBody, zPresignProjectBranchBucketObjectPath, zPresignRequest, zPresignResponse, zProject, zProjectAuditLogLevel, zProjectBranchLogDuration, zProjectBranchLogFieldValuesResponse, zProjectBranchLogFieldsResponse, zProjectBranchLogRecord, zProjectBranchLogSeverity, zProjectBranchLogSource, zProjectBranchLogsInvalidQuery, zProjectBranchLogsNotAvailable, zProjectBranchLogsQueryRequest, zProjectBranchLogsQueryResponse, zProjectCreateRequest, zProjectJwksResponse, zProjectListItem, zProjectMember, zProjectMemberGrantSource, zProjectMemberOrgRole, zProjectMemberRoleResponse, zProjectMembers, zProjectOwnerData, zProjectPermission, zProjectPermissionLevel, zProjectPermissions, zProjectQuota, zProjectRecoverResponse, zProjectResponse, zProjectRole, zProjectSettingsData, zProjectTransferRequestResponse, zProjectUpdateRequest, zProjectsApplicationsMapResponse, zProjectsIntegrationsMapResponse, zProjectsResponse, zProjectsWithIntegrationResponse, zProvisioner, zQueryProjectBranchLogsBody, zQueryProjectBranchLogsPath, zRecoverProjectPath, zRegionResponse, zRemoveOrganizationMemberPath, zRemoveProjectMemberRolePath, zRemoveProjectMemberRoleQuery, zResetProjectBranchRolePasswordPath, zRestartProjectEndpointPath, zRestoreProjectBranchBody, zRestoreProjectBranchPath, zRestoreSnapshotBody, zRestoreSnapshotPath, zRestoreSnapshotQuery, zRevokeApiKeyPath, zRevokeCredentialPath, zRevokeOrgApiKeyPath, zRevokePermissionFromProjectPath, zRole, zRoleCreateRequest, zRoleOperations, zRolePasswordResponse, zRoleResponse, zRolesResponse, zSendNeonAuthTestEmailBody, zSendNeonAuthTestEmailPath, zSendNeonAuthTestEmailRequest, zSendNeonAuthTestEmailResponse, zSetDefaultProjectBranchPath, zSetOrganizationSpendingLimitBody, zSetOrganizationSpendingLimitPath, zSetProjectMemberRoleBody, zSetProjectMemberRolePath, zSetProjectMemberRoleQuery, zSetProjectMemberRoleRequest, zSetSnapshotScheduleBody, zSetSnapshotSchedulePath, zSharedEmailServer, zSnapshot, zSnapshotUpdateRequest, zSortOrderParam, zSpendingLimitResponse, zSpendingLimitUpdateRequest, zStandardEmailServer, zStandardEmailServerResponse, zStartAnonymizationPath, zStartProjectEndpointPath, zSuspendProjectEndpointPath, zSuspendTimeoutSeconds, zTimeoutParam, zTransferNeonAuthProviderProjectBody, zTransferProjectsFromOrgToOrgBody, zTransferProjectsFromOrgToOrgPath, zTransferProjectsFromUserToOrgBody, zTransferProjectsToOrganizationRequest, zUpdateBranchNeonAuthOauthProviderBody, zUpdateBranchNeonAuthOauthProviderPath, zUpdateMaskingRulesBody, zUpdateMaskingRulesPath, zUpdateNeonAuthAllowLocalhostBody, zUpdateNeonAuthAllowLocalhostPath, zUpdateNeonAuthAllowLocalhostRequest, zUpdateNeonAuthConfigBody, zUpdateNeonAuthConfigPath, zUpdateNeonAuthEmailAndPasswordConfigBody, zUpdateNeonAuthEmailAndPasswordConfigPath, zUpdateNeonAuthEmailProviderBody, zUpdateNeonAuthEmailProviderPath, zUpdateNeonAuthEmailServerBody, zUpdateNeonAuthEmailServerPath, zUpdateNeonAuthMagicLinkPluginBody, zUpdateNeonAuthMagicLinkPluginPath, zUpdateNeonAuthOauthProviderBody, zUpdateNeonAuthOauthProviderPath, zUpdateNeonAuthOrganizationPluginBody, zUpdateNeonAuthOrganizationPluginPath, zUpdateNeonAuthPhoneNumberPluginBody, zUpdateNeonAuthPhoneNumberPluginPath, zUpdateNeonAuthUserRoleBody, zUpdateNeonAuthUserRolePath, zUpdateNeonAuthUserRoleRequest, zUpdateNeonAuthUserRoleResponse, zUpdateNeonAuthWebhookConfigBody, zUpdateNeonAuthWebhookConfigPath, zUpdateOrganizationMemberBody, zUpdateOrganizationMemberPath, zUpdateProjectBody, zUpdateProjectBranchBody, zUpdateProjectBranchDataApiBody, zUpdateProjectBranchDataApiPath, zUpdateProjectBranchDatabaseBody, zUpdateProjectBranchDatabasePath, zUpdateProjectBranchFunctionBody, zUpdateProjectBranchFunctionPath, zUpdateProjectBranchPath, zUpdateProjectEndpointBody, zUpdateProjectEndpointPath, zUpdateProjectPath, zUpdateSnapshotBody, zUpdateSnapshotPath, zVpcEndpoint, zVpcEndpointAssignment, zVpcEndpointDetails, zVpcEndpointWithRegion, zVpcEndpointsResponse, zVpcEndpointsWithRegionResponse };
|