@neon/tools 1.0.0 → 1.1.1

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.
@@ -5,99 +5,99 @@ const zProvisioner = z.string();
5
5
  /**
6
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
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." });
8
+ const zPagination = z.strictObject({ cursor: z.string().min(1) });
9
9
  const zPaginationResponse = z.strictObject({ pagination: zPagination.optional() });
10
10
  /**
11
11
  * Empty response.
12
12
  */
13
- const zEmptyResponse = z.record(z.string(), z.unknown()).register(z.globalRegistry, { description: "Empty response." });
13
+ const zEmptyResponse = z.record(z.string(), z.unknown());
14
14
  const zPlanVersion = z.strictObject({
15
15
  major: z.int(),
16
16
  minor: z.int()
17
17
  });
18
18
  const zPlanDetails = z.strictObject({
19
- name: z.string().register(z.globalRegistry, { description: "Plan name, for example `free`, `launch`, or `scale`." }),
19
+ name: z.string(),
20
20
  version: zPlanVersion.optional()
21
21
  });
22
22
  /**
23
23
  * Add a new JWKS to a specific endpoint of a project
24
24
  */
25
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" });
26
+ jwks_url: z.string(),
27
+ provider_name: z.string(),
28
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
29
+ jwt_audience: z.string().optional(),
30
+ role_names: z.array(z.string()).min(0).max(10).optional(),
31
+ skip_role_creation: z.boolean().optional()
32
+ });
33
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()
34
+ id: z.string(),
35
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
36
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
37
+ jwks_url: z.string(),
38
+ provider_name: z.string(),
39
+ created_at: z.iso.datetime(),
40
+ updated_at: z.iso.datetime(),
41
+ jwt_audience: z.string().optional(),
42
+ role_names: z.array(z.string()).optional()
43
43
  });
44
44
  /**
45
45
  * The list of configured JWKS definitions for a project
46
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" });
47
+ const zProjectJwksResponse = z.strictObject({ jwks: z.array(zJwks) });
48
48
  /**
49
49
  * Category of an advisor issue
50
50
  */
51
- const zAdvisorCategory = z.enum(["SECURITY", "PERFORMANCE"]).register(z.globalRegistry, { description: "Category of an advisor issue" });
51
+ const zAdvisorCategory = z.enum(["SECURITY", "PERFORMANCE"]);
52
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() }));
53
+ name: z.string(),
54
+ title: z.string(),
55
+ level: z.string(),
56
+ facing: z.enum(["EXTERNAL", "INTERNAL"]),
57
+ categories: z.array(zAdvisorCategory),
58
+ description: z.string(),
59
+ detail: z.string(),
60
+ remediation: z.string(),
61
+ metadata: z.record(z.string(), z.unknown()),
62
+ cache_key: z.string()
63
+ });
64
+ const zApiKeyCreateRequest = z.strictObject({ key_name: z.string().max(64) });
65
+ const zOrgApiKeyCreateRequest = zApiKeyCreateRequest.merge(z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional() }));
66
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" })
67
+ id: z.int(),
68
+ key: z.string(),
69
+ name: z.string(),
70
+ created_at: z.iso.datetime(),
71
+ created_by: z.uuid()
72
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() }));
73
+ const zOrgApiKeyCreateResponse = zApiKeyCreateResponse.merge(z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional() }));
74
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" }),
75
+ id: z.int(),
76
+ name: z.string(),
77
+ created_at: z.iso.datetime(),
78
+ created_by: z.uuid(),
79
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" })
80
+ last_used_from_addr: z.string(),
81
+ revoked: z.boolean()
82
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() }));
83
+ const zOrgApiKeyRevokeResponse = zApiKeyRevokeResponse.merge(z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional() }));
84
84
  /**
85
85
  * The user data of the user that created this API key.
86
86
  */
87
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." });
88
+ id: z.uuid(),
89
+ name: z.string(),
90
+ image: z.string()
91
+ });
92
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" }),
93
+ id: z.int(),
94
+ name: z.string(),
95
+ created_at: z.iso.datetime(),
96
96
  created_by: zApiKeyCreatorData,
97
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" })
98
+ last_used_from_addr: z.string()
99
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() }));
100
+ const zOrgApiKeysListResponseItem = zApiKeysListResponseItem.merge(z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional() }));
101
101
  /**
102
102
  * The action performed by the operation
103
103
  */
@@ -138,7 +138,7 @@ const zOperationAction = z.enum([
138
138
  "mark_migration_prepared",
139
139
  "update_catalog",
140
140
  "epc_sync"
141
- ]).register(z.globalRegistry, { description: "The action performed by the operation" });
141
+ ]);
142
142
  /**
143
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
144
  */
@@ -151,44 +151,44 @@ const zOperationStatus = z.enum([
151
151
  "cancelling",
152
152
  "cancelled",
153
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." });
154
+ ]);
155
155
  /**
156
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
157
  */
158
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(),
159
+ id: z.uuid(),
160
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
161
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
162
+ endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
163
163
  action: zOperationAction,
164
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." });
165
+ error: z.string().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" }),
167
+ retry_at: z.iso.datetime().optional(),
168
+ created_at: z.iso.datetime(),
169
+ updated_at: z.iso.datetime(),
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" })
171
+ });
172
172
  const zOperationResponse = z.strictObject({ operation: zOperation });
173
173
  const zOperationsResponse = z.strictObject({ operations: z.array(zOperation) });
174
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" })
175
+ id: z.uuid(),
176
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
177
+ created_at: z.iso.datetime(),
178
+ expires_at: z.iso.datetime()
179
179
  });
180
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." }) });
181
+ message: z.string(),
182
+ code: z.string()
183
+ })) });
184
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()
185
+ id: z.string(),
186
+ granted_to_email: z.email().min(1).max(256),
187
+ granted_at: z.iso.datetime(),
188
+ revoked_at: z.iso.datetime().optional()
189
189
  });
190
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." }) });
191
+ const zGrantPermissionToProjectRequest = z.strictObject({ email: z.email().min(1).max(256) });
192
192
  /**
193
193
  * Per-project role. `viewer` maps to `VIEWER`, `editor` maps to `EDITOR`,
194
194
  * and `admin` maps to `ADMIN`.
@@ -198,7 +198,7 @@ const zProjectRole = z.enum([
198
198
  "viewer",
199
199
  "editor",
200
200
  "admin"
201
- ]).register(z.globalRegistry, { description: "Per-project role. `viewer` maps to `VIEWER`, `editor` maps to `EDITOR`,\nand `admin` maps to `ADMIN`.\n" });
201
+ ]);
202
202
  /**
203
203
  * The caller's effective permission for a project when
204
204
  * per-project permissions are enabled. `VIEWER` grants read access,
@@ -211,7 +211,7 @@ const zProjectPermissionLevel = z.enum([
211
211
  "VIEWER",
212
212
  "EDITOR",
213
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" });
214
+ ]);
215
215
  /**
216
216
  * How a member's project access is granted.
217
217
  *
@@ -221,7 +221,7 @@ const zProjectMemberGrantSource = z.enum([
221
221
  "org_role_default",
222
222
  "org_admin_override",
223
223
  "unassigned"
224
- ]).register(z.globalRegistry, { description: "How a member's project access is granted.\n" });
224
+ ]);
225
225
  /**
226
226
  * Organization-level role used by project member role management.
227
227
  *
@@ -232,12 +232,12 @@ const zProjectMemberOrgRole = z.enum([
232
232
  "editor",
233
233
  "viewer",
234
234
  "collaborator"
235
- ]).register(z.globalRegistry, { description: "Organization-level role used by project member role management.\n" });
235
+ ]);
236
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(),
237
+ member_id: z.uuid(),
238
+ user_id: z.uuid(),
239
+ email: z.email().min(1).max(256).optional(),
240
+ name: z.string().optional(),
241
241
  org_role: zProjectMemberOrgRole,
242
242
  project_role: zProjectRole.optional(),
243
243
  org_default_project_permission: zProjectPermissionLevel.optional(),
@@ -250,66 +250,66 @@ const zProjectMemberRoleResponse = z.strictObject({
250
250
  project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
251
251
  member_id: z.uuid(),
252
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(),
253
+ email: z.email().min(1).max(256).optional(),
254
+ name: z.string().optional(),
255
255
  org_role: zProjectMemberOrgRole,
256
256
  project_role: zProjectRole.optional(),
257
257
  org_default_project_permission: zProjectPermissionLevel.optional(),
258
258
  explicit_project_permission: zProjectPermissionLevel.optional(),
259
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()
260
+ credential_rotation_recommended: z.boolean().optional(),
261
+ org_api_key_rotation_recommended: z.boolean().optional()
262
262
  });
263
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()
264
+ timeframe_start: z.iso.datetime(),
265
+ timeframe_end: z.iso.datetime(),
266
+ active_time_seconds: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }),
267
+ compute_time_seconds: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }),
268
+ written_data_bytes: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }),
269
+ synthetic_storage_size_bytes: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }),
270
+ data_storage_bytes_hour: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }).optional(),
271
+ logical_size_bytes: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }).optional(),
272
+ logical_size_bytes_hour: z.int().min(0, { error: "Invalid value: Expected uint64 to be >= 0" }).optional()
273
273
  });
274
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." })
275
+ period_id: z.uuid(),
276
+ period_plan: z.string(),
277
+ period_start: z.iso.datetime(),
278
+ period_end: z.iso.datetime().optional(),
279
+ consumption: z.array(zConsumptionHistoryPerTimeframe)
280
280
  });
281
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." })
282
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
283
+ periods: z.array(zConsumptionHistoryPerPeriod)
284
284
  });
285
- const zConsumptionHistoryPerProjectResponse = z.strictObject({ projects: z.array(zConsumptionHistoryPerProject).register(z.globalRegistry, { description: "Per-project consumption history records included in the response." }) });
285
+ const zConsumptionHistoryPerProjectResponse = z.strictObject({ projects: z.array(zConsumptionHistoryPerProject) });
286
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`." })
287
+ metric_name: z.string(),
288
+ value: z.int()
289
289
  });
290
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()
291
+ timeframe_start: z.iso.datetime().optional(),
292
+ timeframe_end: z.iso.datetime().optional(),
293
+ metrics: z.array(zConsumptionMetricValue).optional()
294
294
  });
295
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." })
296
+ period_id: z.uuid(),
297
+ period_plan: z.string(),
298
+ period_start: z.iso.datetime(),
299
+ period_end: z.iso.datetime().optional(),
300
+ consumption: z.array(zConsumptionHistoryPerTimeframeV2)
301
301
  });
302
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." })
303
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
304
+ periods: z.array(zConsumptionHistoryPerPeriodV2)
305
305
  });
306
- const zConsumptionHistoryPerProjectV2Response = z.strictObject({ projects: z.array(zConsumptionHistoryPerProjectV2).register(z.globalRegistry, { description: "Per-project consumption history entries for the requested time range." }) });
306
+ const zConsumptionHistoryPerProjectV2Response = z.strictObject({ projects: z.array(zConsumptionHistoryPerProjectV2) });
307
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." })
308
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
309
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
310
+ periods: z.array(zConsumptionHistoryPerPeriodV2)
311
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." }) });
312
+ const zConsumptionHistoryPerBranchV2Response = z.strictObject({ branches: z.array(zConsumptionHistoryPerBranchV2) });
313
313
  const zConsumptionHistoryGranularity = z.enum([
314
314
  "hourly",
315
315
  "daily",
@@ -322,13 +322,13 @@ const zProjectAuditLogLevel = z.enum([
322
322
  "full"
323
323
  ]);
324
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." })
325
+ library_name: z.string(),
326
+ description: z.string(),
327
+ is_default: z.boolean(),
328
+ is_experimental: z.boolean(),
329
+ version: z.string()
330
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() });
331
+ const zAvailablePreloadLibraries = z.strictObject({ libraries: z.array(zAvailablePreloadLibrary).optional() });
332
332
  /**
333
333
  * The branch’s state, indicating if it is initializing, ready for use, or archived.
334
334
  * * 'init' - the branch is being created but is not available for querying.
@@ -337,22 +337,22 @@ const zAvailablePreloadLibraries = z.strictObject({ libraries: z.array(zAvailabl
337
337
  * * 'archived' - the branch is stored in cost-effective archival Postgres storage. Expect slow query response times.
338
338
  *
339
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" });
340
+ const zBranchState = z.string();
341
341
  /**
342
342
  * Could be `restored`, `finalized` or `detaching`.
343
343
  * A `restored` branch becomes permanently `finalized` when you call `finalizeRestoreBranch`
344
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
345
  *
346
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" });
347
+ const zBranchRestoreStatus = z.string();
348
348
  /**
349
349
  * An action that is currently restricted for the branch and the reason why.
350
350
  *
351
351
  */
352
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" });
353
+ name: z.string(),
354
+ reason: z.string()
355
+ });
356
356
  /**
357
357
  * Recovery information for a deleted branch. Only present when listing deleted branches
358
358
  * with `include_deleted=true`.
@@ -361,103 +361,103 @@ const zBranchRestrictedAction = z.strictObject({
361
361
  *
362
362
  */
363
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" });
364
+ deleted_at: z.iso.datetime(),
365
+ recoverable_until: z.iso.datetime(),
366
+ deletion_method: z.enum(["user", "ttl"])
367
+ });
368
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" }),
369
+ id: z.string().regex(/^[a-z0-9-]{1,60}$/),
370
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
371
+ parent_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
372
+ parent_lsn: z.string().optional(),
373
+ parent_timestamp: z.iso.datetime().optional(),
374
+ name: z.string(),
375
375
  current_state: zBranchState,
376
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(),
377
+ state_changed_at: z.iso.datetime(),
378
+ logical_size: z.int().optional(),
379
+ creation_source: z.string(),
380
+ primary: z.boolean().optional(),
381
+ default: z.boolean(),
382
+ protected: z.boolean(),
383
+ cpu_used_sec: z.int(),
384
+ compute_time_seconds: z.int(),
385
+ active_time_seconds: z.int(),
386
+ written_data_bytes: z.int(),
387
+ data_transfer_bytes: z.int(),
388
+ created_at: z.iso.datetime(),
389
+ updated_at: z.iso.datetime(),
390
+ ttl_interval_seconds: z.int().optional(),
391
+ expires_at: z.iso.datetime().optional(),
392
+ last_reset_at: z.iso.datetime().optional(),
393
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(),
394
+ name: z.string().optional(),
395
+ image: z.string().optional()
396
+ }).optional(),
397
+ init_source: z.string().optional(),
398
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(),
399
+ restored_from: z.string().optional(),
400
+ restored_as: z.string().optional(),
401
+ restricted_actions: z.array(zBranchRestrictedAction).optional(),
402
402
  recovery: zBranchRecoveryInfo.optional()
403
403
  });
404
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(),
405
+ name: z.string().min(1).max(256).optional(),
406
+ protected: z.boolean().optional(),
407
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`." }) });
408
+ }) });
409
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()
410
+ source_branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
411
+ source_lsn: z.string().optional(),
412
+ source_timestamp: z.iso.datetime().optional(),
413
+ preserve_under_name: z.string().optional()
414
414
  });
415
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." }) });
416
+ const zBranchSchemaCompareResponse = z.strictObject({ diff: z.string().optional() });
417
+ const zBranchesResponse = z.strictObject({ branches: z.array(zBranch) });
418
+ const zBranchesCountResponse = z.strictObject({ count: z.int() });
419
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" }) });
420
+ database_name: z.string(),
421
+ schema_name: z.string(),
422
+ table_name: z.string(),
423
+ column_name: z.string(),
424
+ masking_function: z.string().optional(),
425
+ masking_value: z.string().optional()
426
+ });
427
+ const zMaskingRulesResponse = z.strictObject({ masking_rules: z.array(zMaskingRule) });
428
+ const zMaskingRulesUpdateRequest = z.strictObject({ masking_rules: z.array(zMaskingRule) });
429
429
  /**
430
430
  * Metadata about the most recent anonymization attempt for the branch.
431
431
  */
432
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." });
433
+ started_at: z.iso.datetime().optional(),
434
+ completed_at: z.iso.datetime().optional(),
435
+ triggered_by: z.uuid().optional(),
436
+ triggered_by_username: z.string().optional(),
437
+ masked_columns: z.int().optional()
438
+ });
439
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(),
440
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
441
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
442
+ state: z.string(),
443
+ status_message: z.string().optional(),
444
+ created_at: z.iso.datetime(),
445
+ updated_at: z.iso.datetime(),
446
+ failed_at: z.iso.datetime().optional(),
447
447
  last_run: zAnonymizationRunMetadata.optional()
448
448
  });
449
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" })
450
+ database: z.string(),
451
+ password: z.string(),
452
+ role: z.string(),
453
+ host: z.string(),
454
+ pooler_host: z.string()
455
455
  });
456
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" }),
457
+ connection_uri: z.string(),
458
458
  connection_parameters: zConnectionParameters
459
459
  });
460
- const zConnectionUriResponse = z.strictObject({ uri: z.string().register(z.globalRegistry, { description: "The connection URI.\n" }) });
460
+ const zConnectionUriResponse = z.strictObject({ uri: z.string() });
461
461
  /**
462
462
  * Lifecycle state of the compute endpoint. `init`: being initialized. `active`: running and accepting connections. `idle`: suspended (scaled to zero).
463
463
  */
@@ -465,18 +465,18 @@ const zEndpointState = z.enum([
465
465
  "init",
466
466
  "active",
467
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)." });
468
+ ]);
469
469
  /**
470
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
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)." });
472
+ const zEndpointType = z.enum(["read_only", "read_write"]);
473
473
  /**
474
474
  * Deprecated. The connection pooler mode. Neon supports PgBouncer in `transaction` mode only. Removal scheduled for June 20, 2026.
475
475
  *
476
476
  *
477
477
  * @deprecated
478
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" });
479
+ const zEndpointPoolerMode = z.enum(["transaction"]);
480
480
  /**
481
481
  * Duration of inactivity in seconds after which the compute endpoint is
482
482
  * automatically suspended. The value `0` means use the default value.
@@ -486,7 +486,7 @@ const zEndpointPoolerMode = z.enum(["transaction"]).register(z.globalRegistry, {
486
486
  * [Scale to zero configuration](https://neon.com/docs/manage/endpoints#scale-to-zero-configuration).
487
487
  *
488
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" });
489
+ const zSuspendTimeoutSeconds = z.int().gte(-1).lte(604800);
490
490
  /**
491
491
  * A list of IP addresses that are allowed to connect to the compute endpoint.
492
492
  * If the list is empty or not set, all IP addresses are allowed.
@@ -494,9 +494,9 @@ const zSuspendTimeoutSeconds = z.int().gte(-1).lte(604800).register(z.globalRegi
494
494
  *
495
495
  */
496
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" });
497
+ ips: z.array(z.string()).optional(),
498
+ protected_branches_only: z.boolean().optional()
499
+ });
500
500
  /**
501
501
  * A maintenance window is a time period during which Neon may perform maintenance on the project's infrastructure.
502
502
  * During this time, the project's compute endpoints may be unavailable and existing connections can be
@@ -504,54 +504,54 @@ const zAllowedIps = z.strictObject({
504
504
  *
505
505
  */
506
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" });
507
+ weekdays: z.array(z.int()),
508
+ start_time: z.string(),
509
+ end_time: z.string()
510
+ });
511
511
  /**
512
512
  * The shared libraries to preload into the project's compute instances.
513
513
  *
514
514
  */
515
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() });
516
+ use_defaults: z.boolean().optional(),
517
+ enabled_libraries: z.array(z.string()).optional()
518
+ });
519
+ const zConnectionUrisResponse = z.strictObject({ connection_uris: z.array(zConnectionDetails) });
520
+ const zConnectionUrisOptionalResponse = z.strictObject({ connection_uris: z.array(zConnectionDetails).optional() });
521
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" })
522
+ vpc_endpoint_id: z.string(),
523
+ label: z.string()
524
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." }) });
525
+ const zVpcEndpointsResponse = z.strictObject({ endpoints: z.array(zVpcEndpoint) });
526
+ const zVpcEndpointWithRegion = zVpcEndpoint.merge(z.strictObject({ region_id: z.string() }));
527
+ const zVpcEndpointsWithRegionResponse = z.strictObject({ endpoints: z.array(zVpcEndpointWithRegion) });
528
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" })
529
+ vpc_endpoint_id: z.string(),
530
+ label: z.string(),
531
+ state: z.string(),
532
+ num_restricted_projects: z.int(),
533
+ example_restricted_projects: z.array(z.string())
534
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." }) });
535
+ const zVpcEndpointAssignment = z.strictObject({ label: z.string() });
536
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" })
537
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
538
+ name: z.string(),
539
+ password: z.string().optional(),
540
+ protected: z.boolean().optional(),
541
+ authentication_method: z.string().optional(),
542
+ created_at: z.iso.datetime(),
543
+ updated_at: z.iso.datetime()
544
544
  });
545
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." }) });
546
+ name: z.string(),
547
+ no_login: z.boolean().optional()
548
+ }) });
549
549
  const zRoleResponse = z.strictObject({ role: zRole });
550
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" }) });
551
+ const zRolesResponse = z.strictObject({ roles: z.array(zRole) });
552
+ const zRolePasswordResponse = z.strictObject({ password: z.string() });
553
553
  const zPaymentSourceBankCard = z.strictObject({
554
- last4: z.string().register(z.globalRegistry, { description: "Last 4 digits of the card.\n" }),
554
+ last4: z.string(),
555
555
  brand: z.enum([
556
556
  "amex",
557
557
  "diners",
@@ -561,15 +561,15 @@ const zPaymentSourceBankCard = z.strictObject({
561
561
  "unionpay",
562
562
  "unknown",
563
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()
564
+ ]).optional(),
565
+ exp_month: z.int().optional(),
566
+ exp_year: z.int().optional()
567
567
  });
568
568
  const zPaymentSource = z.strictObject({
569
- type: z.string().register(z.globalRegistry, { description: "Type of payment source. E.g. \"card\".\n" }),
569
+ type: z.string(),
570
570
  card: zPaymentSourceBankCard.optional()
571
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" }) });
572
+ const zSpendingLimitUpdateRequest = z.strictObject({ spending_limit_cents: z.int().gte(1) });
573
573
  const zSpendingLimitResponse = z.strictObject({ spending_limit_cents: z.int().nullable() });
574
574
  /**
575
575
  * State of the billing account.
@@ -581,7 +581,7 @@ const zBillingAccountState = z.enum([
581
581
  "suspended",
582
582
  "deactivated",
583
583
  "deleted"
584
- ]).register(z.globalRegistry, { description: "State of the billing account.\n" });
584
+ ]);
585
585
  /**
586
586
  * Type of subscription to Neon Cloud.
587
587
  * Notice that for users without billing account this will be "UNKNOWN"
@@ -600,7 +600,7 @@ const zBillingSubscriptionType = z.enum([
600
600
  "scale_v3",
601
601
  "business",
602
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" });
603
+ ]);
604
604
  /**
605
605
  * Indicates whether and how an account makes payments.
606
606
  *
@@ -617,46 +617,46 @@ const zBillingPaymentMethod = z.enum([
617
617
  "trial",
618
618
  "sponsorship",
619
619
  "shared_payment_token"
620
- ]).register(z.globalRegistry, { description: "Indicates whether and how an account makes payments.\n" });
620
+ ]);
621
621
  const zBillingAccount = z.strictObject({
622
622
  state: zBillingAccountState,
623
623
  payment_source: zPaymentSource,
624
624
  subscription_type: zBillingSubscriptionType,
625
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(),
626
+ quota_reset_at_last: z.iso.datetime(),
627
+ name: z.string(),
628
+ email: z.email().min(1).max(256),
629
+ address_city: z.string(),
630
+ address_country: z.string(),
631
+ address_country_name: z.string().optional(),
632
+ address_line1: z.string(),
633
+ address_line2: z.string(),
634
+ address_postal_code: z.string(),
635
+ address_state: z.string(),
636
+ orb_portal_url: z.string().optional(),
637
+ tax_id: z.string().optional(),
638
+ tax_id_type: z.string().optional(),
639
639
  plan_details: zPlanDetails.optional(),
640
640
  spending_limit_cents: z.int().nullish()
641
641
  });
642
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" })
643
+ id: z.int(),
644
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
645
+ name: z.string(),
646
+ owner_name: z.string(),
647
+ created_at: z.iso.datetime(),
648
+ updated_at: z.iso.datetime()
649
649
  });
650
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." }) });
651
+ name: z.string(),
652
+ owner_name: z.string()
653
+ }) });
654
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." }) });
655
+ name: z.string().optional(),
656
+ owner_name: z.string().optional()
657
+ }) });
658
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`." }) });
659
+ const zDatabasesResponse = z.strictObject({ databases: z.array(zDatabase) });
660
660
  /**
661
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
662
  */
@@ -666,73 +666,73 @@ const zMemberRole = z.enum([
666
666
  "editor",
667
667
  "viewer",
668
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." });
669
+ ]);
670
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" }),
671
+ id: z.uuid(),
672
+ email: z.email().min(1).max(256),
673
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
674
+ invited_by: z.uuid(),
675
+ invited_at: z.iso.datetime(),
676
676
  role: zMemberRole
677
677
  });
678
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`." }),
679
+ id: z.uuid(),
680
+ user_id: z.uuid(),
681
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
682
682
  role: zMemberRole,
683
- joined_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp when the user joined the organization." }).optional()
683
+ joined_at: z.iso.datetime().optional()
684
684
  });
685
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()
686
+ email: z.email().min(1).max(256),
687
+ has_mfa: z.boolean().optional(),
688
+ deactivated_at: z.iso.datetime().optional()
689
689
  });
690
690
  const zMemberWithUser = z.strictObject({
691
691
  member: zMember,
692
692
  user: zMemberUserInfo
693
693
  });
694
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." }) });
695
+ id: z.string().regex(/^[a-z0-9-]{1,60}$/),
696
+ name: z.string(),
697
+ handle: z.string(),
698
+ plan: z.string(),
699
+ created_at: z.iso.datetime(),
700
+ managed_by: z.string(),
701
+ updated_at: z.iso.datetime(),
702
+ allow_hipaa_projects: z.boolean().optional(),
703
+ require_mfa: z.boolean().optional()
704
+ });
705
+ const zOrganizationsResponse = z.strictObject({ organizations: z.array(zOrganization) });
706
+ const zOrganizationInvitationsResponse = z.strictObject({ invitations: z.array(zInvitation) });
707
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." }),
708
+ email: z.email().min(1).max(256),
709
709
  role: zMemberRole
710
710
  });
711
- const zOrganizationInvitesCreateRequest = z.strictObject({ invitations: z.array(zOrganizationInviteCreateRequest).register(z.globalRegistry, { description: "Invitations to create for the organization." }) });
711
+ const zOrganizationInvitesCreateRequest = z.strictObject({ invitations: z.array(zOrganizationInviteCreateRequest) });
712
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." }) });
713
+ const zOrganizationMembersResponse = z.strictObject({ members: z.array(zMemberWithUser) });
714
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." })
715
+ region_id: z.string(),
716
+ name: z.string(),
717
+ default: z.boolean(),
718
+ geo_lat: z.string(),
719
+ geo_long: z.string()
720
720
  });
721
- const zActiveRegionsResponse = z.strictObject({ regions: z.array(zRegionResponse).register(z.globalRegistry, { description: "The list of active regions" }) });
721
+ const zActiveRegionsResponse = z.strictObject({ regions: z.array(zRegionResponse) });
722
722
  const zAuthDetailsResponse = z.strictObject({
723
- account_id: z.string().register(z.globalRegistry, { description: "The ID of the account associated with this authentication record." }),
723
+ account_id: z.string(),
724
724
  auth_method: z.enum([
725
725
  "keycloak",
726
726
  "session_cookie",
727
727
  "api_key_user",
728
728
  "api_key_org",
729
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" }),
730
+ ]),
731
731
  auth_data: z.string().optional()
732
732
  });
733
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" })
734
+ destination_org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
735
+ project_ids: z.array(z.string().regex(/^[a-z0-9-]{1,60}$/)).min(1).max(400)
736
736
  });
737
737
  /**
738
738
  * Identity provider id from keycloak
@@ -745,29 +745,29 @@ const zIdentityProviderId = z.enum([
745
745
  "microsoftv2",
746
746
  "vercelmp",
747
747
  "keycloak"
748
- ]).register(z.globalRegistry, { description: "Identity provider id from keycloak" });
748
+ ]);
749
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." }),
750
+ email: z.email().min(1).max(256),
751
+ image: z.string(),
752
+ login: z.string(),
753
+ name: z.string(),
754
754
  provider: zIdentityProviderId
755
755
  });
756
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" }),
757
+ active_seconds_limit: z.int(),
758
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." })
759
+ auth_accounts: z.array(zCurrentUserAuthAccount),
760
+ email: z.email().min(1).max(256),
761
+ id: z.string(),
762
+ image: z.string(),
763
+ login: z.string(),
764
+ name: z.string(),
765
+ last_name: z.string(),
766
+ projects_limit: z.int(),
767
+ branches_limit: z.int(),
768
+ max_autoscaling_limit: z.number(),
769
+ compute_seconds_limit: z.int().optional(),
770
+ plan: z.string()
771
771
  });
772
772
  /**
773
773
  * Per-project consumption quotas. If a quota is exceeded, all active computes
@@ -788,34 +788,34 @@ const zCurrentUserInfoResponse = z.strictObject({
788
788
  *
789
789
  */
790
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" });
791
+ active_time_seconds: z.int().gte(0).optional(),
792
+ compute_time_seconds: z.int().gte(0).optional(),
793
+ written_data_bytes: z.int().gte(0).optional(),
794
+ data_transfer_bytes: z.int().gte(0).optional(),
795
+ logical_size_bytes: z.int().gte(0).optional()
796
+ });
797
797
  const zProjectSettingsData = z.strictObject({
798
798
  quota: zProjectQuota.optional(),
799
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(),
800
+ enable_logical_replication: z.boolean().optional(),
801
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(),
802
+ block_public_connections: z.boolean().optional(),
803
+ block_vpc_connections: z.boolean().optional(),
804
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(),
805
+ hipaa: z.boolean().optional(),
806
806
  preload_libraries: zPreloadLibraries.optional()
807
807
  });
808
808
  /**
809
809
  * A raw representation of Postgres settings
810
810
  */
811
- const zPgSettingsData = z.record(z.string(), z.string()).register(z.globalRegistry, { description: "A raw representation of Postgres settings" });
811
+ const zPgSettingsData = z.record(z.string(), z.string());
812
812
  /**
813
813
  * Deprecated. A raw representation of PgBouncer settings. Removal scheduled for June 20, 2026.
814
814
  *
815
815
  *
816
816
  * @deprecated
817
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" });
818
+ const zPgbouncerSettingsData = z.record(z.string(), z.string());
819
819
  /**
820
820
  * A collection of settings for a compute endpoint
821
821
  */
@@ -823,7 +823,7 @@ const zEndpointSettingsData = z.strictObject({
823
823
  pg_settings: zPgSettingsData.optional(),
824
824
  pgbouncer_settings: zPgbouncerSettingsData.optional(),
825
825
  preload_libraries: zPreloadLibraries.optional()
826
- }).register(z.globalRegistry, { description: "A collection of settings for a compute endpoint" });
826
+ });
827
827
  const zBranchCreateRequestEndpointOptions = z.strictObject({
828
828
  type: zEndpointType,
829
829
  settings: zEndpointSettingsData.optional(),
@@ -833,77 +833,77 @@ const zBranchCreateRequestEndpointOptions = z.strictObject({
833
833
  suspend_timeout_seconds: zSuspendTimeoutSeconds.optional()
834
834
  });
835
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(),
836
+ endpoints: z.array(zBranchCreateRequestEndpointOptions).optional(),
837
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()
838
+ parent_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
839
+ name: z.string().min(1).max(256).optional(),
840
+ parent_lsn: z.string().optional(),
841
+ parent_timestamp: z.iso.datetime().optional(),
842
+ protected: z.boolean().optional(),
843
+ archived: z.boolean().optional(),
844
+ init_source: z.string().optional(),
845
+ expires_at: z.iso.datetime().optional()
846
+ }).optional()
847
847
  });
848
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." }),
849
+ host: z.string(),
850
+ id: z.string().regex(/^[a-z0-9-]{1,60}$/),
851
+ name: z.string().optional(),
852
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
853
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
854
854
  autoscaling_limit_min_cu: zComputeUnit,
855
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" }),
856
+ region_id: z.string(),
857
857
  type: zEndpointType,
858
858
  current_state: zEndpointState,
859
859
  pending_state: zEndpointState.optional(),
860
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" }),
861
+ pooler_enabled: z.boolean(),
862
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" }),
863
+ disabled: z.boolean(),
864
+ passwordless_access: z.boolean(),
865
+ last_active: z.iso.datetime().optional(),
866
+ creation_source: z.string(),
867
+ created_at: z.iso.datetime(),
868
+ updated_at: z.iso.datetime(),
869
+ started_at: z.iso.datetime().optional(),
870
+ suspended_at: z.iso.datetime().optional(),
871
+ proxy_host: z.string(),
872
872
  suspend_timeout_seconds: zSuspendTimeoutSeconds,
873
873
  provisioner: zProvisioner,
874
- compute_release_version: z.string().register(z.globalRegistry, { description: "Attached compute's release version number.\n" }).optional()
874
+ compute_release_version: z.string().optional()
875
875
  });
876
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(),
877
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
878
+ region_id: z.string().optional(),
879
879
  type: zEndpointType,
880
880
  settings: zEndpointSettingsData.optional(),
881
881
  autoscaling_limit_min_cu: zComputeUnit.optional(),
882
882
  autoscaling_limit_max_cu: zComputeUnit.optional(),
883
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(),
884
+ pooler_enabled: z.boolean().optional(),
885
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(),
886
+ disabled: z.boolean().optional(),
887
+ passwordless_access: z.boolean().optional(),
888
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." }) });
889
+ name: z.string().min(1).max(64).optional()
890
+ }) });
891
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(),
892
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
893
893
  autoscaling_limit_min_cu: zComputeUnit.optional(),
894
894
  autoscaling_limit_max_cu: zComputeUnit.optional(),
895
895
  provisioner: zProvisioner.optional(),
896
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(),
897
+ pooler_enabled: z.boolean().optional(),
898
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(),
899
+ disabled: z.boolean().optional(),
900
+ passwordless_access: z.boolean().optional(),
901
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." }) });
902
+ name: z.string().min(1).max(64).optional()
903
+ }) });
904
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() });
905
+ const zEndpointsResponse = z.strictObject({ endpoints: z.array(zEndpoint) });
906
+ const zEndpointsOptionalResponse = z.strictObject({ endpoints: z.array(zEndpoint).optional() });
907
907
  /**
908
908
  * A collection of settings for a Neon endpoint
909
909
  */
@@ -913,153 +913,153 @@ const zDefaultEndpointSettings = z.strictObject({
913
913
  autoscaling_limit_min_cu: zComputeUnit.optional(),
914
914
  autoscaling_limit_max_cu: zComputeUnit.optional(),
915
915
  suspend_timeout_seconds: zSuspendTimeoutSeconds.optional()
916
- }).register(z.globalRegistry, { description: "A collection of settings for a Neon endpoint" });
916
+ });
917
917
  const zProjectUpdateRequest = z.strictObject({ project: z.strictObject({
918
918
  settings: zProjectSettingsData.optional(),
919
- name: z.string().min(1).max(256).register(z.globalRegistry, { description: "The project name" }).optional(),
919
+ name: z.string().min(1).max(256).optional(),
920
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()
921
+ history_retention_seconds: z.int().gte(0).lte(2592e3).optional()
922
922
  }) });
923
923
  /**
924
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
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." });
926
+ const zPgVersion = z.int().gte(14).lte(19);
927
927
  /**
928
928
  * Essential data about the project. Full data is available at `GET /projects/{project_id}`.
929
929
  *
930
930
  */
931
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" }),
932
+ id: z.string().regex(/^[a-z0-9-]{1,60}$/),
933
+ platform_id: z.string(),
934
+ region_id: z.string(),
935
+ name: z.string(),
936
936
  provisioner: zProvisioner,
937
937
  default_endpoint_settings: zDefaultEndpointSettings.optional(),
938
938
  settings: zProjectSettingsData.optional(),
939
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(),
940
+ proxy_host: z.string(),
941
+ branch_logical_size_limit: z.int(),
942
+ branch_logical_size_limit_bytes: z.int(),
943
+ store_passwords: z.boolean(),
944
+ active_time: z.int().gte(0),
945
+ cpu_used_sec: z.int(),
946
+ maintenance_starts_at: z.iso.datetime().optional(),
947
+ creation_source: z.string(),
948
+ created_at: z.iso.datetime(),
949
+ updated_at: z.iso.datetime(),
950
+ synthetic_storage_size: z.int().optional(),
951
+ quota_reset_at: z.iso.datetime().optional(),
952
+ owner_id: z.string(),
953
+ compute_last_active_at: z.iso.datetime().optional(),
954
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
955
+ org_name: z.string().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" }).optional(),
957
+ hipaa_enabled_at: z.iso.datetime().optional(),
958
+ deleted_at: z.iso.datetime().optional(),
959
+ recoverable_until: z.iso.datetime().optional(),
960
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" });
961
+ });
962
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()
963
+ projects: z.array(zProjectListItem),
964
+ unavailable_project_ids: z.array(z.string().regex(/^[a-z0-9-]{1,60}$/)).optional()
965
965
  });
966
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." }),
967
+ email: z.email().min(1).max(256),
968
+ name: z.string(),
969
+ branches_limit: z.int(),
970
970
  subscription_type: zBillingSubscriptionType
971
971
  });
972
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" }),
973
+ data_storage_bytes_hour: z.int().gte(0),
974
+ data_transfer_bytes: z.int().gte(0),
975
+ written_data_bytes: z.int().gte(0),
976
+ compute_time_seconds: z.int().gte(0),
977
+ active_time_seconds: z.int().gte(0),
978
+ cpu_used_sec: z.int(),
979
+ id: z.string().regex(/^[a-z0-9-]{1,60}$/),
980
+ platform_id: z.string(),
981
+ region_id: z.string(),
982
+ name: z.string(),
983
983
  provisioner: zProvisioner,
984
984
  default_endpoint_settings: zDefaultEndpointSettings.optional(),
985
985
  settings: zProjectSettingsData.optional(),
986
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." }),
987
+ proxy_host: z.string(),
988
+ branch_logical_size_limit: z.int(),
989
+ branch_logical_size_limit_bytes: z.int(),
990
+ store_passwords: z.boolean(),
991
+ maintenance_starts_at: z.iso.datetime().optional(),
992
+ creation_source: z.string(),
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" }),
994
+ created_at: z.iso.datetime(),
995
+ updated_at: z.iso.datetime(),
996
+ synthetic_storage_size: z.int().optional(),
997
+ consumption_period_start: z.iso.datetime(),
998
+ consumption_period_end: z.iso.datetime(),
999
+ quota_reset_at: z.iso.datetime().optional(),
1000
+ owner_id: z.string(),
1001
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(),
1002
+ compute_last_active_at: z.iso.datetime().optional(),
1003
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
1004
+ maintenance_scheduled_for: z.iso.datetime().optional(),
1005
+ hipaa_enabled_at: z.iso.datetime().optional(),
1006
1006
  effective_project_permission: zProjectPermissionLevel.nullish()
1007
1007
  });
1008
1008
  const zProjectResponse = z.strictObject({ project: zProject });
1009
1009
  const zProjectRecoverResponse = zProjectResponse.merge(zBranchesResponse);
1010
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." }) });
1011
+ name: z.string(),
1012
+ expected: z.string(),
1013
+ actual: z.string()
1014
+ })) });
1015
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." }) });
1016
+ id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1017
+ integration: z.string()
1018
+ })) });
1019
1019
  /**
1020
1020
  * Configuration settings for the Neon Data API
1021
1021
  */
1022
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" });
1023
+ db_aggregates_enabled: z.boolean().optional(),
1024
+ db_anon_role: z.string().optional(),
1025
+ db_extra_search_path: z.string().optional(),
1026
+ db_max_rows: z.int().optional(),
1027
+ db_schemas: z.array(z.string()).optional(),
1028
+ jwt_role_claim_key: z.string().optional(),
1029
+ jwt_cache_max_lifetime: z.int().optional(),
1030
+ openapi_mode: z.string().optional(),
1031
+ server_cors_allowed_origins: z.string().optional(),
1032
+ server_timing_enabled: z.boolean().optional()
1033
+ });
1034
1034
  /**
1035
1035
  * Create Neon Data API
1036
1036
  */
1037
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(),
1038
+ auth_provider: z.enum(["neon_auth", "external"]).optional(),
1039
+ jwks_url: z.url().optional(),
1040
+ provider_name: z.string().optional(),
1041
+ jwt_audience: z.string().optional(),
1042
+ add_default_grants: z.boolean().optional(),
1043
+ skip_auth_schema: z.boolean().optional(),
1044
1044
  settings: zDataApiSettings.optional()
1045
- }).register(z.globalRegistry, { description: "Create Neon Data API" });
1045
+ });
1046
1046
  /**
1047
1047
  * Neon Data API created successfully
1048
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" });
1049
+ const zDataApiCreateResponse = z.strictObject({ url: z.url() });
1050
1050
  /**
1051
1051
  * Neon Data API response
1052
1052
  */
1053
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" }),
1054
+ url: z.url(),
1055
+ status: z.string(),
1056
1056
  settings: zDataApiSettings.nullish(),
1057
1057
  available_schemas: z.array(z.string()).nullish()
1058
- }).register(z.globalRegistry, { description: "Neon Data API response" });
1058
+ });
1059
1059
  /**
1060
1060
  * Update Neon Data API
1061
1061
  */
1062
- const zDataApiUpdateRequest = z.strictObject({ settings: zDataApiSettings.optional() }).register(z.globalRegistry, { description: "Update Neon Data API" });
1062
+ const zDataApiUpdateRequest = z.strictObject({ settings: zDataApiSettings.optional() });
1063
1063
  /**
1064
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
1065
  */
@@ -1067,103 +1067,103 @@ const zNeonAuthSupportedAuthProvider = z.enum([
1067
1067
  "mock",
1068
1068
  "stack",
1069
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." });
1070
+ ]);
1071
1071
  const zNeonAuthProviderProjectOwnedBy = z.enum(["user", "neon"]);
1072
1072
  const zNeonAuthProviderProjectTransferStatus = z.enum(["initiated", "finished"]);
1073
1073
  const zNeonAuthRedirectUriWhitelistDomain = z.strictObject({
1074
- domain: z.string().register(z.globalRegistry, { description: "Allowed redirect URI domain for the auth provider." }),
1074
+ domain: z.string(),
1075
1075
  auth_provider: zNeonAuthSupportedAuthProvider
1076
1076
  });
1077
- const zNeonAuthRedirectUriWhitelistResponse = z.strictObject({ domains: z.array(zNeonAuthRedirectUriWhitelistDomain).register(z.globalRegistry, { description: "Domains permitted as redirect URI targets in the whitelist." }) });
1077
+ const zNeonAuthRedirectUriWhitelistResponse = z.strictObject({ domains: z.array(zNeonAuthRedirectUriWhitelistDomain) });
1078
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." }),
1079
+ domain: z.url(),
1080
1080
  auth_provider: zNeonAuthSupportedAuthProvider
1081
1081
  });
1082
- const zNeonAuthDeleteDomainFromRedirectUriWhitelistItem = z.strictObject({ domain: z.url().register(z.globalRegistry, { description: "URI to remove from the redirect URI whitelist." }) });
1082
+ const zNeonAuthDeleteDomainFromRedirectUriWhitelistItem = z.strictObject({ domain: z.url() });
1083
1083
  const zNeonAuthDeleteDomainFromRedirectUriWhitelistRequest = z.strictObject({
1084
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." })
1085
+ domains: z.array(zNeonAuthDeleteDomainFromRedirectUriWhitelistItem)
1086
1086
  });
1087
1087
  const zNeonAuthCreateIntegrationRequest = z.strictObject({
1088
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()
1089
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1090
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1091
+ database_name: z.string().optional(),
1092
+ role_name: z.string().optional()
1093
1093
  });
1094
1094
  const zEnableNeonAuthIntegrationRequest = z.strictObject({
1095
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()
1096
+ database_name: z.string().optional()
1097
1097
  });
1098
1098
  const zNeonAuthCreateIntegrationResponse = z.strictObject({
1099
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()
1100
+ auth_provider_project_id: z.string(),
1101
+ pub_client_key: z.string(),
1102
+ secret_server_key: z.string(),
1103
+ jwks_url: z.string(),
1104
+ schema_name: z.string(),
1105
+ table_name: z.string(),
1106
+ base_url: z.string().optional()
1107
1107
  });
1108
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`." }),
1109
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1110
1110
  auth_provider: zNeonAuthSupportedAuthProvider
1111
1111
  });
1112
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`." }),
1113
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1114
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()
1115
+ email: z.email().min(1).max(256),
1116
+ name: z.string().min(1).max(255).optional()
1117
1117
  });
1118
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" }) });
1119
+ email: z.email().min(1).max(256),
1120
+ name: z.string().min(1).max(255).optional()
1121
+ });
1122
+ const zNeonAuthCreateNewUserResponse = z.strictObject({ id: z.string() });
1123
+ const zUpdateNeonAuthUserRoleRequest = z.strictObject({ roles: z.array(z.string()).min(1) });
1124
+ const zUpdateNeonAuthUserRoleResponse = z.strictObject({ id: z.string() });
1125
+ const zNeonAuthAllowLocalhostResponse = z.strictObject({ allow_localhost: z.boolean() });
1126
+ const zUpdateNeonAuthAllowLocalhostRequest = z.strictObject({ allow_localhost: z.boolean() });
1127
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." })
1128
+ enabled: z.boolean(),
1129
+ organization_limit: z.int().gte(1).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1130
+ membership_limit: z.int().gte(1).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1131
+ creator_role: z.enum(["admin", "owner"]),
1132
+ send_invitation_email: z.boolean()
1133
1133
  });
1134
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()
1135
+ enabled: z.boolean().optional(),
1136
+ organization_limit: z.int().gte(1).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
1137
+ membership_limit: z.int().gte(1).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
1138
+ creator_role: z.enum(["admin", "owner"]).optional(),
1139
+ send_invitation_email: z.boolean().optional()
1140
1140
  });
1141
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." })
1142
+ enabled: z.boolean(),
1143
+ expires_in: z.int().gte(5).lte(1440),
1144
+ disable_sign_up: z.boolean()
1145
1145
  });
1146
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()
1147
+ enabled: z.boolean().optional(),
1148
+ expires_in: z.int().gte(5).lte(1440).optional(),
1149
+ disable_sign_up: z.boolean().optional()
1150
1150
  });
1151
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()
1152
+ enabled: z.boolean(),
1153
+ otp_expires_in: z.int().gte(60).lte(600).optional()
1154
1154
  });
1155
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()
1156
+ enabled: z.boolean().optional(),
1157
+ otp_expires_in: z.int().gte(60).lte(600).optional()
1158
1158
  });
1159
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`." }),
1160
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1161
1161
  auth_provider: zNeonAuthSupportedAuthProvider
1162
1162
  });
1163
- const zNeonAuthTransferAuthProviderProjectResponse = z.strictObject({ url: z.string().register(z.globalRegistry, { description: "URL for completing the process of ownership transfer" }) });
1163
+ const zNeonAuthTransferAuthProviderProjectResponse = z.strictObject({ url: z.string() });
1164
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(),
1165
+ enabled: z.boolean(),
1166
+ webhook_url: z.string().optional(),
1167
1167
  enabled_events: z.array(z.enum([
1168
1168
  "user.before_create",
1169
1169
  "user.created",
@@ -1172,8 +1172,8 @@ const zNeonAuthWebhookConfig = z.strictObject({
1172
1172
  "organization.invitation.created",
1173
1173
  "organization.invitation.accepted",
1174
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()
1175
+ ])).optional(),
1176
+ timeout_seconds: z.int().gte(1).lte(10).optional()
1177
1177
  });
1178
1178
  const zNeonAuthOauthProviderId = z.enum([
1179
1179
  "google",
@@ -1185,61 +1185,61 @@ const zNeonAuthOauthProviderType = z.enum(["standard", "shared"]);
1185
1185
  const zNeonAuthOauthProvider = z.strictObject({
1186
1186
  id: zNeonAuthOauthProviderId,
1187
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()
1188
+ client_id: z.string().optional(),
1189
+ client_secret: z.string().optional()
1190
1190
  });
1191
- const zListNeonAuthOauthProvidersResponse = z.strictObject({ providers: z.array(zNeonAuthOauthProvider).register(z.globalRegistry, { description: "OAuth providers configured for Neon Auth on the project." }) });
1191
+ const zListNeonAuthOauthProvidersResponse = z.strictObject({ providers: z.array(zNeonAuthOauthProvider) });
1192
1192
  const zNeonAuthAddOAuthProviderRequest = z.strictObject({
1193
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()
1194
+ client_id: z.string().optional(),
1195
+ client_secret: z.string().optional(),
1196
+ microsoft_tenant_id: z.string().optional()
1197
1197
  });
1198
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()
1199
+ client_id: z.string().optional(),
1200
+ client_secret: z.string().optional(),
1201
+ microsoft_tenant_id: z.string().optional()
1202
1202
  });
1203
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()
1204
+ sender_email: z.string().optional(),
1205
+ sender_name: z.string().optional()
1206
1206
  });
1207
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()
1208
+ host: z.string().optional(),
1209
+ port: z.int().optional(),
1210
+ username: z.string().optional(),
1211
+ password: z.string().optional(),
1212
+ sender_email: z.string().optional(),
1213
+ sender_name: z.string().optional()
1214
1214
  });
1215
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." })
1216
+ host: z.string(),
1217
+ port: z.int(),
1218
+ username: z.string(),
1219
+ password: z.string(),
1220
+ sender_email: z.string(),
1221
+ sender_name: z.string()
1222
1222
  });
1223
1223
  const zNeonAuthEmailServerConfig = z.discriminatedUnion("type", [zStandardEmailServer.extend({ type: z.literal("standard") }), zSharedEmailServer.extend({ type: z.literal("shared") })]);
1224
1224
  const zNeonAuthEmailServerConfigResponse = z.discriminatedUnion("type", [zStandardEmailServerResponse.extend({ type: z.literal("standard") }), zSharedEmailServer.extend({ type: z.literal("shared") })]);
1225
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." })
1226
+ host: z.string(),
1227
+ port: z.int(),
1228
+ username: z.string(),
1229
+ password: z.string(),
1230
+ sender_email: z.string(),
1231
+ sender_name: z.string(),
1232
+ recipient_email: z.email().min(1).max(256)
1233
1233
  });
1234
1234
  /**
1235
1235
  * Request to test the branch's saved email provider. Only the recipient is supplied; the stored
1236
1236
  * SMTP settings and password are used server-side.
1237
1237
  *
1238
1238
  */
1239
- const zSendNeonAuthEmailProviderTestRequest = z.strictObject({ recipient_email: z.email().min(1).max(256).register(z.globalRegistry, { description: "The email address to send the test email to." }) }).register(z.globalRegistry, { description: "Request to test the branch's saved email provider. Only the recipient is supplied; the stored\nSMTP settings and password are used server-side.\n" });
1239
+ const zSendNeonAuthEmailProviderTestRequest = z.strictObject({ recipient_email: z.email().min(1).max(256) });
1240
1240
  const zSendNeonAuthTestEmailResponse = z.strictObject({
1241
- success: z.boolean().register(z.globalRegistry, { description: "Whether the test email was sent successfully." }),
1242
- error_message: z.string().register(z.globalRegistry, { description: "The error message from the email server." }).optional()
1241
+ success: z.boolean(),
1242
+ error_message: z.string().optional()
1243
1243
  });
1244
1244
  /**
1245
1245
  * The email verification method to use.
@@ -1247,15 +1247,15 @@ const zSendNeonAuthTestEmailResponse = z.strictObject({
1247
1247
  * - `otp`: Sends a one-time password (OTP) via email
1248
1248
  *
1249
1249
  */
1250
- 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" });
1250
+ const zNeonAuthEmailVerificationMethod = z.enum(["link", "otp"]);
1251
1251
  const zNeonAuthEmailAndPasswordConfig = z.strictObject({
1252
- enabled: z.boolean().register(z.globalRegistry, { description: "Whether email and password authentication is enabled" }),
1252
+ enabled: z.boolean(),
1253
1253
  email_verification_method: zNeonAuthEmailVerificationMethod,
1254
- require_email_verification: z.boolean().register(z.globalRegistry, { description: "Whether email verification is required before users can sign in" }),
1255
- auto_sign_in_after_verification: z.boolean().register(z.globalRegistry, { description: "Whether users are automatically signed in after verifying their email" }),
1256
- send_verification_email_on_sign_up: z.boolean().register(z.globalRegistry, { description: "Whether to send a verification email when users sign up" }),
1257
- send_verification_email_on_sign_in: z.boolean().register(z.globalRegistry, { description: "Whether to send a verification email when users sign in" }),
1258
- disable_sign_up: z.boolean().register(z.globalRegistry, { description: "Whether to disable new user sign ups" })
1254
+ require_email_verification: z.boolean(),
1255
+ auto_sign_in_after_verification: z.boolean(),
1256
+ send_verification_email_on_sign_up: z.boolean(),
1257
+ send_verification_email_on_sign_in: z.boolean(),
1258
+ disable_sign_up: z.boolean()
1259
1259
  });
1260
1260
  /**
1261
1261
  * Aggregated plugin configurations for Neon Auth
@@ -1266,38 +1266,38 @@ const zNeonAuthPluginConfigs = z.strictObject({
1266
1266
  phone_number: zNeonAuthPhoneNumberConfig.optional(),
1267
1267
  email_provider: zNeonAuthEmailServerConfigResponse.optional(),
1268
1268
  email_and_password: zNeonAuthEmailAndPasswordConfig.optional(),
1269
- oauth_providers: z.array(zNeonAuthOauthProvider).register(z.globalRegistry, { description: "OAuth provider configurations enabled for this auth setup." }).optional(),
1270
- 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()
1271
- }).register(z.globalRegistry, { description: "Aggregated plugin configurations for Neon Auth" });
1269
+ oauth_providers: z.array(zNeonAuthOauthProvider).optional(),
1270
+ allow_localhost: z.boolean().optional()
1271
+ });
1272
1272
  const zNeonAuthEmailAndPasswordConfigUpdate = z.strictObject({
1273
- 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(),
1273
+ enabled: z.boolean().optional(),
1274
1274
  email_verification_method: zNeonAuthEmailVerificationMethod.optional(),
1275
- 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(),
1276
- auto_sign_in_after_verification: z.boolean().register(z.globalRegistry, { description: "Whether users are automatically signed in after verifying their email" }).optional(),
1277
- send_verification_email_on_sign_up: z.boolean().register(z.globalRegistry, { description: "Whether to send a verification email when users sign up." }).optional(),
1278
- 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(),
1279
- 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()
1275
+ require_email_verification: z.boolean().optional(),
1276
+ auto_sign_in_after_verification: z.boolean().optional(),
1277
+ send_verification_email_on_sign_up: z.boolean().optional(),
1278
+ send_verification_email_on_sign_in: z.boolean().optional(),
1279
+ disable_sign_up: z.boolean().optional()
1280
1280
  });
1281
1281
  const zNeonAuthIntegration = z.strictObject({
1282
1282
  auth_provider: zNeonAuthSupportedAuthProvider,
1283
- auth_provider_project_id: z.string().register(z.globalRegistry, { description: "Project identifier assigned by the auth provider for this integration." }),
1284
- 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`." }),
1285
- db_name: z.string().register(z.globalRegistry, { description: "Name of the database used by the Neon Auth integration." }),
1286
- created_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp when the Neon Auth integration was created, in RFC 3339 format (UTC)." }),
1283
+ auth_provider_project_id: z.string(),
1284
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1285
+ db_name: z.string(),
1286
+ created_at: z.iso.datetime(),
1287
1287
  owned_by: zNeonAuthProviderProjectOwnedBy,
1288
1288
  transfer_status: zNeonAuthProviderProjectTransferStatus.optional(),
1289
- jwks_url: z.string().register(z.globalRegistry, { description: "URL of the provider's JWKS endpoint used to verify JWTs." }),
1290
- 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(),
1291
- 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()
1289
+ jwks_url: z.string(),
1290
+ base_url: z.string().optional(),
1291
+ name: z.string().min(1).max(256).optional()
1292
1292
  });
1293
- const zListNeonAuthIntegrationsResponse = z.strictObject({ data: z.array(zNeonAuthIntegration).register(z.globalRegistry, { description: "Neon Auth integrations configured for the project." }) });
1294
- const zNeonAuthConfigUpdate = z.strictObject({ name: z.string().min(1).max(256).register(z.globalRegistry, { description: "The application name used in auth emails and communications." }) });
1295
- const zNeonAuthConfigResponse = z.strictObject({ name: z.string().register(z.globalRegistry, { description: "The application name used in auth emails and communications." }) });
1293
+ const zListNeonAuthIntegrationsResponse = z.strictObject({ data: z.array(zNeonAuthIntegration) });
1294
+ const zNeonAuthConfigUpdate = z.strictObject({ name: z.string().min(1).max(256) });
1295
+ const zNeonAuthConfigResponse = z.strictObject({ name: z.string() });
1296
1296
  const zErrorCode = z.string();
1297
1297
  const zGeneralError = z.strictObject({
1298
- 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(),
1298
+ request_id: z.string().optional(),
1299
1299
  code: zErrorCode,
1300
- message: z.string().register(z.globalRegistry, { description: "Error message" })
1300
+ message: z.string()
1301
1301
  });
1302
1302
  const zBranchOperations = zBranchResponse.merge(zOperationsResponse);
1303
1303
  const zBranchRecoverResponse = zBranchResponse.merge(zEndpointsOptionalResponse);
@@ -1308,44 +1308,44 @@ const zJwksCreationOperation = zJwksResponse.merge(zOperationsResponse);
1308
1308
  /**
1309
1309
  * A free-form map of string key-value pairs for attaching metadata to a resource (for example, a git commit reference). Maximum 50 entries.
1310
1310
  */
1311
- 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." });
1311
+ const zAnnotationValueData = z.record(z.string(), z.string());
1312
1312
  const zProjectCreateRequest = z.strictObject({ project: z.strictObject({
1313
1313
  settings: zProjectSettingsData.optional(),
1314
- 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(),
1314
+ name: z.string().min(1).max(256).optional(),
1315
1315
  branch: z.strictObject({
1316
- 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(),
1317
- 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(),
1318
- database_name: z.string().register(z.globalRegistry, { description: "The database name. If not specified, the default database name, `neondb`, will be used.\n" }).optional(),
1316
+ name: z.string().min(1).max(256).optional(),
1317
+ role_name: z.string().optional(),
1318
+ database_name: z.string().optional(),
1319
1319
  annotations: zAnnotationValueData.optional()
1320
- }).register(z.globalRegistry, { description: "Configuration for the initial branch created with the project." }).optional(),
1320
+ }).optional(),
1321
1321
  autoscaling_limit_min_cu: zComputeUnit.optional(),
1322
1322
  autoscaling_limit_max_cu: zComputeUnit.optional(),
1323
1323
  provisioner: zProvisioner.optional(),
1324
- 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(),
1324
+ region_id: z.string().optional(),
1325
1325
  default_endpoint_settings: zDefaultEndpointSettings.optional(),
1326
1326
  pg_version: zPgVersion.optional(),
1327
- 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(),
1328
- 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(),
1329
- 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()
1330
- }).register(z.globalRegistry, { description: "Configuration for the new project, including name, region, and Postgres compute and storage settings." }) });
1327
+ store_passwords: z.boolean().optional(),
1328
+ history_retention_seconds: z.int().gte(0).lte(2592e3).optional(),
1329
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional()
1330
+ }) });
1331
1331
  const zAnnotationObjectData = z.strictObject({
1332
- type: z.string().register(z.globalRegistry, { description: "Kind of resource the annotation is attached to, for example \"branch\" or \"endpoint\"." }),
1333
- id: z.string().register(z.globalRegistry, { description: "The annotated object's ID." })
1332
+ type: z.string(),
1333
+ id: z.string()
1334
1334
  });
1335
1335
  const zAnnotationData = z.strictObject({
1336
1336
  object: zAnnotationObjectData,
1337
1337
  value: zAnnotationValueData,
1338
- created_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp when the annotation was created, in RFC 3339 format (UTC)." }).optional(),
1339
- updated_at: z.iso.datetime().register(z.globalRegistry, { description: "Timestamp of the most recent update to the annotation, in RFC 3339 format (UTC)." }).optional()
1338
+ created_at: z.iso.datetime().optional(),
1339
+ updated_at: z.iso.datetime().optional()
1340
1340
  });
1341
1341
  const zAnnotationCreateValueRequest = z.strictObject({ annotation_value: zAnnotationValueData.optional() });
1342
1342
  const zBranchAnonymizedCreateRequest = zAnnotationCreateValueRequest.merge(z.strictObject({
1343
1343
  branch_create: zBranchCreateRequest.optional(),
1344
- masking_rules: z.array(zMaskingRule).register(z.globalRegistry, { description: "List of masking rules to apply to the branch.\n" }).optional(),
1345
- start_anonymization: z.boolean().register(z.globalRegistry, { description: "If true, automatically start anonymization after the branch is created.\nDefaults to false.\n" }).optional()
1344
+ masking_rules: z.array(zMaskingRule).optional(),
1345
+ start_anonymization: z.boolean().optional()
1346
1346
  }));
1347
1347
  const zAnnotationResponse = z.strictObject({ annotation: zAnnotationData });
1348
- 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." }) });
1348
+ const zAnnotationsMapResponse = z.strictObject({ annotations: z.record(z.string(), zAnnotationData) });
1349
1349
  /**
1350
1350
  * Type of application integration
1351
1351
  */
@@ -1354,76 +1354,76 @@ const zApplicationType = z.enum([
1354
1354
  "github",
1355
1355
  "datadog",
1356
1356
  "opentelemetry"
1357
- ]).register(z.globalRegistry, { description: "Type of application integration" });
1357
+ ]);
1358
1358
  /**
1359
1359
  * A map where key is a project ID and a value is a list of installed applications.
1360
1360
  *
1361
1361
  */
1362
- 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" });
1362
+ const zProjectsApplicationsMapResponse = z.strictObject({ applications: z.record(z.string(), z.array(zApplicationType)) });
1363
1363
  /**
1364
1364
  * A map where key is a project ID and a value is a list of installed integrations.
1365
1365
  *
1366
1366
  */
1367
- 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" });
1367
+ const zProjectsIntegrationsMapResponse = z.strictObject({ integrations: z.record(z.string(), z.array(zApplicationType)) });
1368
1368
  /**
1369
1369
  * 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
1370
  */
1371
1371
  const zCursorPagination = z.strictObject({
1372
- 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(),
1373
- sort_by: z.string().register(z.globalRegistry, { description: "Field by which the results were sorted, echoing the request's sort_by parameter." }).optional(),
1374
- 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()
1375
- }).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." });
1372
+ next: z.string().optional(),
1373
+ sort_by: z.string().optional(),
1374
+ sort_order: z.string().optional()
1375
+ });
1376
1376
  const zProjectMembers = z.strictObject({
1377
1377
  project_members: z.array(zProjectMember),
1378
1378
  pagination: zCursorPagination.optional()
1379
1379
  });
1380
1380
  const zCursorPaginationResponse = z.strictObject({ pagination: zCursorPagination.optional() });
1381
1381
  const zSnapshot = z.strictObject({
1382
- id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The snapshot ID." }),
1383
- name: z.string().register(z.globalRegistry, { description: "Human-readable label for the snapshot." }),
1384
- 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(),
1385
- timestamp: z.string().register(z.globalRegistry, { description: "Point in time captured by the snapshot, in RFC 3339 format (UTC)." }).optional(),
1386
- source_branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Branch from which this snapshot was created." }).optional(),
1387
- created_at: z.string().register(z.globalRegistry, { description: "Timestamp when the snapshot was created, in RFC 3339 format (UTC)." }),
1388
- 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(),
1389
- manual: z.boolean().register(z.globalRegistry, { description: "True if the snapshot was created manually rather than by a schedule." }).optional(),
1390
- 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(),
1391
- 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()
1382
+ id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1383
+ name: z.string(),
1384
+ lsn: z.string().optional(),
1385
+ timestamp: z.string().optional(),
1386
+ source_branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
1387
+ created_at: z.string(),
1388
+ expires_at: z.string().optional(),
1389
+ manual: z.boolean().optional(),
1390
+ full_size: z.int().optional(),
1391
+ diff_size: z.int().optional()
1392
1392
  });
1393
1393
  const zSnapshotUpdateRequest = z.strictObject({ snapshot: z.strictObject({
1394
- name: z.string().register(z.globalRegistry, { description: "Human-readable label for the snapshot." }).optional(),
1394
+ name: z.string().optional(),
1395
1395
  expires_at: z.iso.datetime().nullish()
1396
- }).register(z.globalRegistry, { description: "Fields to update on the snapshot. Updatable fields include `name` and `expires_at`." }) });
1396
+ }) });
1397
1397
  const zBackupScheduleItem = z.strictObject({
1398
- frequency: z.string().register(z.globalRegistry, { description: "How often to take snapshots. Known values: `daily`, `weekly`, `monthly`.\n" }),
1399
- hour: z.int().gte(0).lte(23).register(z.globalRegistry, { description: "The hour of the day to take the snapshot (if applicable).\n" }).optional(),
1400
- 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(),
1401
- month: z.int().gte(1).lte(12).register(z.globalRegistry, { description: "The month of the year to take the snapshot (if applicable).\n" }).optional(),
1402
- 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()
1398
+ frequency: z.string(),
1399
+ hour: z.int().gte(0).lte(23).optional(),
1400
+ day: z.int().gte(1).lte(31).optional(),
1401
+ month: z.int().gte(1).lte(12).optional(),
1402
+ retention_seconds: z.int().gte(3600).lte(3024e3).optional()
1403
1403
  });
1404
- 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." }) });
1404
+ const zBackupSchedule = z.strictObject({ schedule: z.array(zBackupScheduleItem) });
1405
1405
  const zBranchSchemaJson = z.strictObject({ tables: z.array(z.strictObject({
1406
- schema: z.string().register(z.globalRegistry, { description: "Postgres schema (namespace) that contains the table, for example `public`." }),
1407
- name: z.string().register(z.globalRegistry, { description: "Name of the table within the schema." }),
1406
+ schema: z.string(),
1407
+ name: z.string(),
1408
1408
  columns: z.array(z.strictObject({
1409
- name: z.string().register(z.globalRegistry, { description: "Name of the column." }),
1410
- type: z.string().register(z.globalRegistry, { description: "Postgres data type of the column, for example \"integer\" or \"text\"." }),
1411
- nullable: z.boolean().register(z.globalRegistry, { description: "Whether the column allows NULL values" }).optional(),
1412
- generated: z.boolean().register(z.globalRegistry, { description: "Whether the column is a generated (computed) column" }).optional()
1413
- })).register(z.globalRegistry, { description: "Columns belonging to this table, each describing a column's name and attributes." }),
1409
+ name: z.string(),
1410
+ type: z.string(),
1411
+ nullable: z.boolean().optional(),
1412
+ generated: z.boolean().optional()
1413
+ })),
1414
1414
  constraints: z.array(z.strictObject({
1415
- type: z.string().register(z.globalRegistry, { description: "Type of constraint. Possible values: `primary_key`, `unique`, `foreign_key`\n" }),
1416
- columns: z.array(z.string()).min(1).register(z.globalRegistry, { description: "Column names participating in this constraint" }),
1417
- name: z.string().register(z.globalRegistry, { description: "Optional name of the constraint" }).optional(),
1415
+ type: z.string(),
1416
+ columns: z.array(z.string()).min(1),
1417
+ name: z.string().optional(),
1418
1418
  referenced_table: z.strictObject({
1419
- schema: z.string().register(z.globalRegistry, { description: "Schema of the referenced table" }),
1420
- table: z.string().register(z.globalRegistry, { description: "Name of the referenced table" }),
1421
- columns: z.array(z.string()).register(z.globalRegistry, { description: "Names of the referenced columns" })
1422
- }).register(z.globalRegistry, { description: "For foreign keys - the referenced table information" }).optional()
1423
- })).register(z.globalRegistry, { description: "Table constraints defined in the branch schema, such as primary key, foreign key, unique, and check constraints." }).optional()
1424
- })).register(z.globalRegistry, { description: "Tables present in the branch schema." }) });
1419
+ schema: z.string(),
1420
+ table: z.string(),
1421
+ columns: z.array(z.string())
1422
+ }).optional()
1423
+ })).optional()
1424
+ })) });
1425
1425
  const zBranchSchemaResponse = z.strictObject({
1426
- sql: z.string().register(z.globalRegistry, { description: "Branch schema expressed as SQL DDL statements." }).optional(),
1426
+ sql: z.string().optional(),
1427
1427
  json: zBranchSchemaJson.optional()
1428
1428
  });
1429
1429
  /**
@@ -1433,23 +1433,23 @@ const zBranchSchemaResponse = z.strictObject({
1433
1433
  * writes, and deletes still require authenticated requests.
1434
1434
  *
1435
1435
  */
1436
- 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" });
1436
+ const zBucketAccessLevel = z.enum(["private", "public_read"]);
1437
1437
  const zBucket = z.strictObject({
1438
- name: z.string().register(z.globalRegistry, { description: "The bucket name (unique within a branch)." }),
1438
+ name: z.string(),
1439
1439
  access_level: zBucketAccessLevel,
1440
- 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" })
1440
+ created_at: z.iso.datetime()
1441
1441
  });
1442
1442
  const zBucketCreateRequest = z.strictObject({
1443
- name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name." }),
1444
- 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()
1443
+ name: z.string().min(1).max(255),
1444
+ access_level: z.enum(["private", "public_read"]).optional()
1445
1445
  });
1446
1446
  const zBucketResponse = z.strictObject({ bucket: zBucket });
1447
1447
  const zBucketsListResponse = z.strictObject({ buckets: z.array(zBucket) });
1448
1448
  const zBranchStorage = z.strictObject({
1449
- 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" }),
1450
- s3_endpoint: z.url().register(z.globalRegistry, { description: "The S3-compatible endpoint URL for this branch." }),
1451
- 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" }),
1452
- 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" })
1449
+ enabled: z.boolean(),
1450
+ s3_endpoint: z.url(),
1451
+ region: z.string(),
1452
+ force_path_style: z.boolean()
1453
1453
  });
1454
1454
  const zBranchStorageNotEnabled = z.strictObject({
1455
1455
  code: z.string(),
@@ -1459,7 +1459,7 @@ const zBranchStorageNotEnabled = z.strictObject({
1459
1459
  "region_unavailable",
1460
1460
  "branch_directory_missing",
1461
1461
  "branch_not_found"
1462
- ]).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" })
1462
+ ])
1463
1463
  });
1464
1464
  /**
1465
1465
  * The Neon service that emitted the log record.
@@ -1468,7 +1468,7 @@ const zProjectBranchLogSource = z.enum([
1468
1468
  "function",
1469
1469
  "storage",
1470
1470
  "pg_endpoint"
1471
- ]).register(z.globalRegistry, { description: "The Neon service that emitted the log record." });
1471
+ ]);
1472
1472
  /**
1473
1473
  * An OpenTelemetry severity level. A minimum severity includes every
1474
1474
  * higher level in this order: `trace`, `debug`, `info`, `warn`, `error`,
@@ -1482,17 +1482,17 @@ const zProjectBranchLogSeverity = z.enum([
1482
1482
  "warn",
1483
1483
  "error",
1484
1484
  "fatal"
1485
- ]).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" });
1485
+ ]);
1486
1486
  /**
1487
1487
  * A length of time as a count and a unit, for example `30m`, `6h`, or
1488
1488
  * `7d`. Valid units are `ms`, `s`, `m`, `h`, and `d`.
1489
1489
  *
1490
1490
  */
1491
- 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" });
1491
+ const zProjectBranchLogDuration = z.string().regex(/^[0-9]{1,6}(ms|s|m|h|d)$/);
1492
1492
  const zProjectBranchLogsNotAvailable = z.strictObject({
1493
1493
  code: z.string(),
1494
1494
  message: z.string(),
1495
- 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" })
1495
+ reason: z.enum(["branch_not_found", "telemetry_not_enabled"])
1496
1496
  });
1497
1497
  const zProjectBranchLogsInvalidQuery = z.strictObject({
1498
1498
  code: z.string(),
@@ -1505,85 +1505,85 @@ const zProjectBranchLogsInvalidQuery = z.strictObject({
1505
1505
  "unknown_field",
1506
1506
  "invalid_logql",
1507
1507
  "conflicting_filters"
1508
- ]).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" })
1508
+ ])
1509
1509
  });
1510
1510
  const zProjectBranchLogsQueryRequest = z.strictObject({
1511
1511
  since: zProjectBranchLogDuration.optional(),
1512
- 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(),
1513
- end_time: z.iso.datetime().register(z.globalRegistry, { description: "Exclusive end of the query window. Defaults to the current time." }).optional(),
1514
- limit: z.int().gte(1).lte(1e3).register(z.globalRegistry, { description: "Maximum number of log records to return per page." }).optional(),
1515
- 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(),
1516
- 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(),
1512
+ start_time: z.iso.datetime().optional(),
1513
+ end_time: z.iso.datetime().optional(),
1514
+ limit: z.int().gte(1).lte(1e3).optional(),
1515
+ cursor: z.string().optional(),
1516
+ sort_order: z.enum(["asc", "desc"]).optional(),
1517
1517
  source: zProjectBranchLogSource.optional(),
1518
- service_name: z.string().min(1).register(z.globalRegistry, { description: "Match the OpenTelemetry `service.name` resource attribute exactly." }).optional(),
1519
- scope_name: z.string().min(1).register(z.globalRegistry, { description: "Match the OpenTelemetry instrumentation scope name exactly." }).optional(),
1518
+ service_name: z.string().min(1).optional(),
1519
+ scope_name: z.string().min(1).optional(),
1520
1520
  minimum_severity: zProjectBranchLogSeverity.optional(),
1521
- severity_text: z.string().min(1).register(z.globalRegistry, { description: "Match the OpenTelemetry severity text exactly." }).optional(),
1522
- 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(),
1523
- 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(),
1524
- 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()
1521
+ severity_text: z.string().min(1).optional(),
1522
+ body_contains: z.string().min(1).optional(),
1523
+ trace_id: z.string().regex(/^[0-9a-f]{32}$/).optional(),
1524
+ logql: z.string().min(1).optional()
1525
1525
  });
1526
1526
  const zProjectBranchLogRecord = z.strictObject({
1527
- timestamp: z.iso.datetime().register(z.globalRegistry, { description: "The OpenTelemetry record timestamp in UTC." }),
1528
- 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" }),
1527
+ timestamp: z.iso.datetime(),
1528
+ message: z.string(),
1529
1529
  source: zProjectBranchLogSource.optional(),
1530
- entity_id: z.string().register(z.globalRegistry, { description: "The Neon identifier of the service instance that emitted the record." }).optional(),
1531
- service_name: z.string().register(z.globalRegistry, { description: "The OpenTelemetry `service.name` resource attribute." }).optional(),
1532
- scope_name: z.string().register(z.globalRegistry, { description: "The OpenTelemetry instrumentation scope name." }).optional(),
1533
- severity_number: z.int().gte(0).lte(24).register(z.globalRegistry, { description: "The numeric OpenTelemetry severity." }).optional(),
1534
- severity_text: z.string().register(z.globalRegistry, { description: "The original OpenTelemetry severity text." }).optional(),
1535
- trace_id: z.string().register(z.globalRegistry, { description: "The OpenTelemetry trace ID, when the record belongs to a trace." }).optional(),
1536
- span_id: z.string().register(z.globalRegistry, { description: "The OpenTelemetry span ID, when the record belongs to a span." }).optional(),
1537
- attributes: z.record(z.string(), z.unknown()).register(z.globalRegistry, { description: "Customer-defined OpenTelemetry log and resource attributes." })
1530
+ entity_id: z.string().optional(),
1531
+ service_name: z.string().optional(),
1532
+ scope_name: z.string().optional(),
1533
+ severity_number: z.int().gte(0).lte(24).optional(),
1534
+ severity_text: z.string().optional(),
1535
+ trace_id: z.string().optional(),
1536
+ span_id: z.string().optional(),
1537
+ attributes: z.record(z.string(), z.unknown())
1538
1538
  });
1539
1539
  const zProjectBranchLogsQueryResponse = z.strictObject({
1540
1540
  logs: z.array(zProjectBranchLogRecord),
1541
- 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(),
1542
- is_truncated: z.boolean().register(z.globalRegistry, { description: "True when more records matched than were returned." })
1541
+ next_cursor: z.string().optional(),
1542
+ is_truncated: z.boolean()
1543
1543
  });
1544
- 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" }) });
1544
+ const zProjectBranchLogFieldsResponse = z.strictObject({ fields: z.array(z.string()) });
1545
1545
  const zProjectBranchLogFieldValuesResponse = z.strictObject({
1546
1546
  values: z.array(z.string()),
1547
- 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" })
1547
+ is_truncated: z.boolean()
1548
1548
  });
1549
1549
  const zBranchAiGateway = z.strictObject({
1550
- enabled: z.boolean().register(z.globalRegistry, { description: "Always `true` in 200 responses. Present for forward compatibility,\nmirroring BranchStorage.enabled.\n" }),
1551
- 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" })
1550
+ enabled: z.boolean(),
1551
+ base_url: z.url()
1552
1552
  });
1553
1553
  const zBranchAiGatewayNotEnabled = z.strictObject({
1554
1554
  code: z.string(),
1555
1555
  message: z.string(),
1556
- 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" })
1556
+ reason: z.enum(["ai_gateway_unavailable", "branch_not_found"])
1557
1557
  });
1558
1558
  const zBucketObject = z.strictObject({
1559
- key: z.string().register(z.globalRegistry, { description: "The full object key." }),
1560
- size: z.int().register(z.globalRegistry, { description: "The object size in bytes." }),
1561
- last_modified: z.iso.datetime().register(z.globalRegistry, { description: "The time the object was last modified." }),
1562
- etag: z.string().register(z.globalRegistry, { description: "The object's entity tag (content hash)." })
1559
+ key: z.string(),
1560
+ size: z.int(),
1561
+ last_modified: z.iso.datetime(),
1562
+ etag: z.string()
1563
1563
  });
1564
1564
  const zBucketObjectsListResponse = z.strictObject({
1565
- 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" }),
1566
- objects: z.array(zBucketObject).register(z.globalRegistry, { description: "Objects whose keys did not collapse into a folder." }),
1567
- prefix: z.string().register(z.globalRegistry, { description: "The prefix that was applied to this listing (echoed back)." }),
1568
- 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(),
1569
- is_truncated: z.boolean().register(z.globalRegistry, { description: "True when more results exist beyond this page." })
1565
+ folders: z.array(z.string()),
1566
+ objects: z.array(zBucketObject),
1567
+ prefix: z.string(),
1568
+ next_cursor: z.string().optional(),
1569
+ is_truncated: z.boolean()
1570
1570
  });
1571
- 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" }) });
1571
+ const zBucketObjectsDeletePrefixResponse = z.strictObject({ deleted: z.int() });
1572
1572
  /**
1573
1573
  * Options for the presigned URL. The `operation` selects upload (`PUT`)
1574
1574
  * or download (`GET`); the remaining fields are optional.
1575
1575
  *
1576
1576
  */
1577
1577
  const zPresignRequest = z.strictObject({
1578
- 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" }),
1579
- 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(),
1580
- 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()
1581
- }).register(z.globalRegistry, { description: "Options for the presigned URL. The `operation` selects upload (`PUT`)\nor download (`GET`); the remaining fields are optional.\n" });
1578
+ operation: z.enum(["upload", "download"]),
1579
+ content_type: z.string().optional(),
1580
+ expires_in_seconds: z.int().gte(1).lte(604800).optional()
1581
+ });
1582
1582
  const zPresignResponse = z.strictObject({
1583
- url: z.string().register(z.globalRegistry, { description: "The presigned URL. Transfer the object bytes by issuing\n`method url` with the returned `headers`.\n" }),
1584
- method: z.string().register(z.globalRegistry, { description: "The HTTP method to use against `url`: `PUT` for an upload,\n`GET` for a download.\n" }),
1585
- 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" }),
1586
- expires_at: z.iso.datetime().register(z.globalRegistry, { description: "When the presigned URL stops being valid." })
1583
+ url: z.string(),
1584
+ method: z.string(),
1585
+ headers: z.record(z.string(), z.string()),
1586
+ expires_at: z.iso.datetime()
1587
1587
  });
1588
1588
  /**
1589
1589
  * A single capability a credential may exercise. A credential is granted
@@ -1596,27 +1596,27 @@ const zCredentialScope = z.enum([
1596
1596
  "storage:write",
1597
1597
  "ai_gateway:invoke",
1598
1598
  "functions:invoke"
1599
- ]).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" });
1599
+ ]);
1600
1600
  const zCreateCredentialRequest = z.strictObject({
1601
- name: z.string().max(256).register(z.globalRegistry, { description: "Free-form customer label for the credential." }).optional(),
1601
+ name: z.string().max(256).optional(),
1602
1602
  scopes: z.array(zCredentialScope).min(1).max(16),
1603
- 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" })
1603
+ principal_type: z.enum(["user"])
1604
1604
  });
1605
1605
  const zCreateCredentialResponse = z.strictObject({
1606
- token_id: z.string().register(z.globalRegistry, { description: "Opaque credential id (e.g. nak_live_<32hex>)." }),
1607
- token_id_short: z.string().register(z.globalRegistry, { description: "First 12 hex chars of token_id; safe to log." }),
1608
- name: z.string().register(z.globalRegistry, { description: "Customer-supplied label, echoed back from the request. Absent when not provided." }).optional(),
1609
- api_token: z.string().register(z.globalRegistry, { description: "Bearer token; returned exactly once." }),
1610
- s3_secret_access_key: z.string().register(z.globalRegistry, { description: "nsk_live_<64 hex>; the AWS_SECRET_ACCESS_KEY, returned exactly once." }),
1606
+ token_id: z.string(),
1607
+ token_id_short: z.string(),
1608
+ name: z.string().optional(),
1609
+ api_token: z.string(),
1610
+ s3_secret_access_key: z.string(),
1611
1611
  scopes: z.array(zCredentialScope),
1612
1612
  branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1613
1613
  created_at: z.iso.datetime(),
1614
- expires_at: z.iso.datetime().register(z.globalRegistry, { description: "When the credential expires; absent means never expires.\n" }).optional()
1614
+ expires_at: z.iso.datetime().optional()
1615
1615
  });
1616
1616
  const zCredentialMeta = z.strictObject({
1617
- token_id: z.string().register(z.globalRegistry, { description: "Opaque credential id (e.g. nak_live_<32hex>)." }),
1617
+ token_id: z.string(),
1618
1618
  token_id_short: z.string(),
1619
- name: z.string().register(z.globalRegistry, { description: "Customer-supplied label; absent when not provided at issuance." }).optional(),
1619
+ name: z.string().optional(),
1620
1620
  scopes: z.array(zCredentialScope),
1621
1621
  branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
1622
1622
  principal_type: z.string(),
@@ -1624,28 +1624,28 @@ const zCredentialMeta = z.strictObject({
1624
1624
  created_at: z.iso.datetime(),
1625
1625
  last_used_at: z.iso.datetime().optional(),
1626
1626
  revoked_at: z.iso.datetime().optional(),
1627
- 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()
1627
+ expires_at: z.iso.datetime().optional()
1628
1628
  });
1629
1629
  const zListCredentialsResponse = z.strictObject({ credentials: z.array(zCredentialMeta) });
1630
1630
  const zNeonFunctionDeployment = z.strictObject({
1631
- 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)." }),
1631
+ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1632
1632
  status: z.enum([
1633
1633
  "pending",
1634
1634
  "building",
1635
1635
  "completed",
1636
1636
  "failed"
1637
- ]).register(z.globalRegistry, { description: "Build lifecycle status of the deployment." }),
1637
+ ]),
1638
1638
  memory_mib: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1639
1639
  runtime: z.string(),
1640
1640
  created_at: z.string(),
1641
- 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(),
1642
- error: z.string().register(z.globalRegistry, { description: "Human-readable reason the deployment build failed. Present only\nwhen `status` is `failed`.\n" }).optional()
1641
+ environment: z.array(z.string()).optional(),
1642
+ error: z.string().optional()
1643
1643
  });
1644
1644
  const zNeonFunction = z.strictObject({
1645
- id: z.string().register(z.globalRegistry, { description: "Opaque, stable function identifier." }),
1646
- slug: z.string().register(z.globalRegistry, { description: "Branch-unique, lowercase DNS-label. Forms the invocation URL's host together with the branch id. Immutable." }),
1647
- name: z.string().register(z.globalRegistry, { description: "Free-form display name." }),
1648
- 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)." }),
1645
+ id: z.string(),
1646
+ slug: z.string(),
1647
+ name: z.string(),
1648
+ invocation_url: z.string(),
1649
1649
  current_deployment: zNeonFunctionDeployment.optional(),
1650
1650
  active_deployment: zNeonFunctionDeployment.optional(),
1651
1651
  created_at: z.string()
@@ -1655,22 +1655,22 @@ const zNeonFunctionsListResponse = z.strictObject({ functions: z.array(zNeonFunc
1655
1655
  const zNeonFunctionUpdateRequest = z.strictObject({ name: z.string().min(1).max(256).nullable() });
1656
1656
  const zNeonFunctionDeploymentResponse = z.strictObject({ deployment: zNeonFunctionDeployment });
1657
1657
  const zFunctionDeployRequest = z.strictObject({
1658
- 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(),
1658
+ zip: z.string().optional(),
1659
1659
  runtime: z.enum(["nodejs24"]).optional(),
1660
- 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()
1660
+ environment: z.string().optional()
1661
1661
  });
1662
1662
  /**
1663
1663
  * 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.
1664
1664
  */
1665
- 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." });
1665
+ const zCursorParam = z.string();
1666
1666
  /**
1667
1667
  * The maximum number of records to be returned in the response
1668
1668
  */
1669
- const zLimitParam = z.int().gte(1).lte(1e4).register(z.globalRegistry, { description: "The maximum number of records to be returned in the response" });
1669
+ const zLimitParam = z.int().gte(1).lte(1e4);
1670
1670
  /**
1671
1671
  * Defines the sorting order of entities.
1672
1672
  */
1673
- const zSortOrderParam = z.enum(["asc", "desc"]).register(z.globalRegistry, { description: "Defines the sorting order of entities." });
1673
+ const zSortOrderParam = z.enum(["asc", "desc"]);
1674
1674
  /**
1675
1675
  * Specify an explicit timeout in milliseconds to limit response delay.
1676
1676
  * After timing out, the incomplete list of project data fetched so far will be returned.
@@ -1678,56 +1678,56 @@ const zSortOrderParam = z.enum(["asc", "desc"]).register(z.globalRegistry, { des
1678
1678
  * If not specified, an implicit implementation defined timeout is chosen with the same behaviour as above
1679
1679
  *
1680
1680
  */
1681
- 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" });
1682
- const zGetProjectAdvisorSecurityIssuesPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Neon project ID" }) });
1681
+ const zTimeoutParam = z.int().gte(100).lte(3e4);
1682
+ const zGetProjectAdvisorSecurityIssuesPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1683
1683
  const zGetProjectAdvisorSecurityIssuesQuery = z.strictObject({
1684
- 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(),
1685
- database_name: z.string().register(z.globalRegistry, { description: "Database name to analyze. Required if branch has multiple databases." }).optional(),
1684
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
1685
+ database_name: z.string().optional(),
1686
1686
  category: zAdvisorCategory.optional(),
1687
1687
  min_severity: z.enum([
1688
1688
  "INFO",
1689
1689
  "WARN",
1690
1690
  "ERROR"
1691
- ]).register(z.globalRegistry, { description: "Minimum severity level to include. For example, WARN returns WARN and ERROR issues, excluding INFO." }).optional()
1691
+ ]).optional()
1692
1692
  });
1693
1693
  const zCreateApiKeyBody = zApiKeyCreateRequest;
1694
- const zRevokeApiKeyPath = z.strictObject({ key_id: z.int().register(z.globalRegistry, { description: "The API key ID" }) });
1694
+ const zRevokeApiKeyPath = z.strictObject({ key_id: z.int() });
1695
1695
  const zGetProjectOperationPath = z.strictObject({
1696
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1697
- operation_id: z.uuid().register(z.globalRegistry, { description: "The operation ID" })
1696
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1697
+ operation_id: z.uuid()
1698
1698
  });
1699
1699
  const zListProjectsQuery = z.strictObject({
1700
- cursor: z.string().register(z.globalRegistry, { description: "Specify the cursor value from the previous response to retrieve the next batch of projects." }).optional(),
1701
- 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(),
1702
- 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(),
1703
- org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "Search for projects by `org_id`." }).optional(),
1704
- 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(),
1705
- recoverable: z.boolean().register(z.globalRegistry, { description: "Show only deleted projects within the recovery window.\n" }).optional()
1700
+ cursor: z.string().optional(),
1701
+ limit: z.int().gte(1).lte(400).optional(),
1702
+ search: z.string().optional(),
1703
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
1704
+ timeout: z.int().gte(100).lte(3e4).optional(),
1705
+ recoverable: z.boolean().optional()
1706
1706
  });
1707
1707
  const zCreateProjectBody = zProjectCreateRequest;
1708
1708
  const zListSharedProjectsQuery = z.strictObject({
1709
- cursor: z.string().register(z.globalRegistry, { description: "Specify the cursor value from the previous response to get the next batch of projects." }).optional(),
1710
- 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(),
1711
- search: z.string().register(z.globalRegistry, { description: "Search query by name or id." }).optional(),
1712
- 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()
1709
+ cursor: z.string().optional(),
1710
+ limit: z.int().gte(1).lte(400).optional(),
1711
+ search: z.string().optional(),
1712
+ timeout: z.int().gte(100).lte(3e4).optional()
1713
1713
  });
1714
- const zDeleteProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1715
- const zGetProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1714
+ const zDeleteProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1715
+ const zGetProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1716
1716
  const zUpdateProjectBody = zProjectUpdateRequest;
1717
- const zUpdateProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1718
- const zRecoverProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1719
- const zListProjectOperationsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1717
+ const zUpdateProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1718
+ const zRecoverProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1719
+ const zListProjectOperationsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1720
1720
  const zListProjectOperationsQuery = z.strictObject({
1721
- cursor: z.string().register(z.globalRegistry, { description: "Specify the cursor value from the previous response to get the next batch of operations" }).optional(),
1722
- 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()
1721
+ cursor: z.string().optional(),
1722
+ limit: z.int().gte(1).lte(1e3).optional()
1723
1723
  });
1724
1724
  const zListProjectPermissionsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1725
1725
  const zGrantPermissionToProjectBody = zGrantPermissionToProjectRequest;
1726
1726
  const zGrantPermissionToProjectPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1727
1727
  const zListProjectMembersPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1728
1728
  const zListProjectMembersQuery = z.strictObject({
1729
- 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(),
1730
- limit: z.int().gte(1).lte(500).register(z.globalRegistry, { description: "The maximum number of members to return in the response" }).optional()
1729
+ cursor: z.string().optional(),
1730
+ limit: z.int().gte(1).lte(500).optional()
1731
1731
  });
1732
1732
  const zRemoveProjectMemberRolePath = z.strictObject({
1733
1733
  project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
@@ -1745,661 +1745,661 @@ const zRevokePermissionFromProjectPath = z.strictObject({
1745
1745
  permission_id: z.string()
1746
1746
  });
1747
1747
  const zGetAvailablePreloadLibrariesPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1748
- 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() });
1749
- const zCreateProjectTransferRequestPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1750
- 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() });
1748
+ const zCreateProjectTransferRequestBody = z.strictObject({ ttl_seconds: z.int().optional() });
1749
+ const zCreateProjectTransferRequestPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1750
+ const zAcceptProjectTransferRequestBody = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional() });
1751
1751
  const zAcceptProjectTransferRequestPath = z.strictObject({
1752
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1753
- request_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project transfer request ID" })
1752
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1753
+ request_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1754
1754
  });
1755
- const zGetProjectJwksPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1755
+ const zGetProjectJwksPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1756
1756
  const zAddProjectJwksBody = zAddProjectJwksRequest;
1757
- const zAddProjectJwksPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1757
+ const zAddProjectJwksPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1758
1758
  const zDeleteProjectJwksPath = z.strictObject({
1759
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1760
- jwks_id: z.string().register(z.globalRegistry, { description: "The JWKS ID" })
1759
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1760
+ jwks_id: z.string()
1761
1761
  });
1762
1762
  const zDeleteProjectBranchDataApiPath = z.strictObject({
1763
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1764
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
1765
- database_name: z.string().register(z.globalRegistry, { description: "The database name" })
1763
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1764
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1765
+ database_name: z.string()
1766
1766
  });
1767
1767
  const zGetProjectBranchDataApiPath = 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" })
1768
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1769
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1770
+ database_name: z.string()
1771
1771
  });
1772
1772
  const zUpdateProjectBranchDataApiBody = zDataApiUpdateRequest;
1773
1773
  const zUpdateProjectBranchDataApiPath = 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" })
1774
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1775
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1776
+ database_name: z.string()
1777
1777
  });
1778
1778
  const zCreateProjectBranchDataApiBody = zDataApiCreateRequest;
1779
1779
  const zCreateProjectBranchDataApiPath = z.strictObject({
1780
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1781
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
1782
- database_name: z.string().register(z.globalRegistry, { description: "The database name" })
1780
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1781
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1782
+ database_name: z.string()
1783
1783
  });
1784
1784
  const zCreateNeonAuthIntegrationBody = zNeonAuthCreateIntegrationRequest;
1785
- const zDisableNeonAuthBody = z.strictObject({ delete_data: z.boolean().register(z.globalRegistry, { description: "If true, deletes the `neon_auth` schema from the database" }).optional() });
1785
+ const zDisableNeonAuthBody = z.strictObject({ delete_data: z.boolean().optional() });
1786
1786
  const zDisableNeonAuthPath = z.strictObject({
1787
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1788
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1787
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1788
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1789
1789
  });
1790
1790
  const zGetNeonAuthPath = z.strictObject({
1791
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1792
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1791
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1792
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1793
1793
  });
1794
1794
  const zCreateNeonAuthBody = zEnableNeonAuthIntegrationRequest;
1795
1795
  const zCreateNeonAuthPath = z.strictObject({
1796
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1797
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1796
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1797
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1798
1798
  });
1799
1799
  const zDeleteNeonAuthDomainFromRedirectUriWhitelistBody = zNeonAuthDeleteDomainFromRedirectUriWhitelistRequest;
1800
- const zDeleteNeonAuthDomainFromRedirectUriWhitelistPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1801
- const zListNeonAuthRedirectUriWhitelistDomainsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1800
+ const zDeleteNeonAuthDomainFromRedirectUriWhitelistPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1801
+ const zListNeonAuthRedirectUriWhitelistDomainsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1802
1802
  const zAddNeonAuthDomainToRedirectUriWhitelistBody = zNeonAuthAddDomainToRedirectUriWhitelistRequest;
1803
- const zAddNeonAuthDomainToRedirectUriWhitelistPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1803
+ const zAddNeonAuthDomainToRedirectUriWhitelistPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1804
1804
  const zDeleteBranchNeonAuthTrustedDomainBody = zNeonAuthDeleteDomainFromRedirectUriWhitelistRequest;
1805
1805
  const zDeleteBranchNeonAuthTrustedDomainPath = z.strictObject({
1806
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1807
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1806
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1807
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1808
1808
  });
1809
1809
  const zListBranchNeonAuthTrustedDomainsPath = z.strictObject({
1810
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1811
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1810
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1811
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1812
1812
  });
1813
1813
  const zAddBranchNeonAuthTrustedDomainBody = zNeonAuthAddDomainToRedirectUriWhitelistRequest;
1814
1814
  const zAddBranchNeonAuthTrustedDomainPath = z.strictObject({
1815
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1816
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1815
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1816
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1817
1817
  });
1818
1818
  const zCreateNeonAuthProviderSdkKeysBody = zNeonAuthCreateAuthProviderSdkKeysRequest;
1819
1819
  const zCreateNeonAuthNewUserBody = zNeonAuthCreateNewUserRequest;
1820
1820
  const zCreateBranchNeonAuthNewUserBody = zCreateBranchNeonAuthNewUserRequest;
1821
1821
  const zCreateBranchNeonAuthNewUserPath = z.strictObject({
1822
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1823
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1822
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1823
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1824
1824
  });
1825
1825
  const zDeleteBranchNeonAuthUserPath = 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" })
1826
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1827
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1828
+ auth_user_id: z.string()
1829
1829
  });
1830
1830
  const zUpdateNeonAuthUserRoleBody = zUpdateNeonAuthUserRoleRequest;
1831
1831
  const zUpdateNeonAuthUserRolePath = z.strictObject({
1832
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1833
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
1834
- auth_user_id: z.string().register(z.globalRegistry, { description: "The Neon user ID" })
1832
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1833
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1834
+ auth_user_id: z.string()
1835
1835
  });
1836
1836
  const zDeleteNeonAuthUserPath = z.strictObject({
1837
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1838
- auth_user_id: z.string().register(z.globalRegistry, { description: "The Neon user ID" })
1837
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1838
+ auth_user_id: z.string()
1839
1839
  });
1840
1840
  const zTransferNeonAuthProviderProjectBody = zNeonAuthTransferAuthProviderProjectRequest;
1841
- const zListNeonAuthIntegrationsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1842
- const zListNeonAuthOauthProvidersPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1841
+ const zListNeonAuthIntegrationsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1842
+ const zListNeonAuthOauthProvidersPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1843
1843
  const zAddNeonAuthOauthProviderBody = zNeonAuthAddOAuthProviderRequest;
1844
- const zAddNeonAuthOauthProviderPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1844
+ const zAddNeonAuthOauthProviderPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1845
1845
  const zListBranchNeonAuthOauthProvidersPath = z.strictObject({
1846
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1847
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1846
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1847
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1848
1848
  });
1849
1849
  const zAddBranchNeonAuthOauthProviderBody = zNeonAuthAddOAuthProviderRequest;
1850
1850
  const zAddBranchNeonAuthOauthProviderPath = z.strictObject({
1851
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1852
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1851
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1852
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1853
1853
  });
1854
1854
  const zDeleteNeonAuthOauthProviderPath = z.strictObject({
1855
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1855
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1856
1856
  oauth_provider_id: zNeonAuthOauthProviderId
1857
1857
  });
1858
1858
  const zUpdateNeonAuthOauthProviderBody = zNeonAuthUpdateOAuthProviderRequest;
1859
1859
  const zUpdateNeonAuthOauthProviderPath = z.strictObject({
1860
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1860
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1861
1861
  oauth_provider_id: zNeonAuthOauthProviderId
1862
1862
  });
1863
1863
  const zDeleteBranchNeonAuthOauthProviderPath = 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" }),
1864
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1865
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1866
1866
  oauth_provider_id: zNeonAuthOauthProviderId
1867
1867
  });
1868
1868
  const zUpdateBranchNeonAuthOauthProviderBody = zNeonAuthUpdateOAuthProviderRequest;
1869
1869
  const zUpdateBranchNeonAuthOauthProviderPath = z.strictObject({
1870
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1871
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
1870
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1871
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1872
1872
  oauth_provider_id: zNeonAuthOauthProviderId
1873
1873
  });
1874
- const zGetNeonAuthEmailServerPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1874
+ const zGetNeonAuthEmailServerPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1875
1875
  const zUpdateNeonAuthEmailServerBody = zNeonAuthEmailServerConfig;
1876
- const zUpdateNeonAuthEmailServerPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1876
+ const zUpdateNeonAuthEmailServerPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1877
1877
  const zSendNeonAuthTestEmailBody = zSendNeonAuthTestEmailRequest;
1878
1878
  const zSendNeonAuthTestEmailPath = z.strictObject({
1879
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1880
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1879
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1880
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1881
1881
  });
1882
1882
  const zSendNeonAuthEmailProviderTestBody = zSendNeonAuthEmailProviderTestRequest;
1883
1883
  const zSendNeonAuthEmailProviderTestPath = z.strictObject({
1884
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1885
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1884
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1885
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1886
1886
  });
1887
1887
  const zGetNeonAuthEmailAndPasswordConfigPath = z.strictObject({
1888
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1889
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1888
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1889
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1890
1890
  });
1891
1891
  const zUpdateNeonAuthEmailAndPasswordConfigBody = zNeonAuthEmailAndPasswordConfigUpdate;
1892
1892
  const zUpdateNeonAuthEmailAndPasswordConfigPath = z.strictObject({
1893
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1894
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1893
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1894
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1895
1895
  });
1896
1896
  const zGetNeonAuthEmailProviderPath = z.strictObject({
1897
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1898
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1897
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1898
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1899
1899
  });
1900
1900
  const zUpdateNeonAuthEmailProviderBody = zNeonAuthEmailServerConfig;
1901
1901
  const zUpdateNeonAuthEmailProviderPath = z.strictObject({
1902
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1903
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1902
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1903
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1904
1904
  });
1905
- const zDeleteNeonAuthIntegrationBody = z.strictObject({ delete_data: z.boolean().register(z.globalRegistry, { description: "If true, deletes the `neon_auth` schema from the database" }).optional() });
1905
+ const zDeleteNeonAuthIntegrationBody = z.strictObject({ delete_data: z.boolean().optional() });
1906
1906
  const zDeleteNeonAuthIntegrationPath = z.strictObject({
1907
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1907
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1908
1908
  auth_provider: zNeonAuthSupportedAuthProvider
1909
1909
  });
1910
- const zGetConnectionUriPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1910
+ const zGetConnectionUriPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1911
1911
  const zGetConnectionUriQuery = z.strictObject({
1912
- 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(),
1913
- 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(),
1914
- database_name: z.string().register(z.globalRegistry, { description: "The database name" }),
1915
- role_name: z.string().register(z.globalRegistry, { description: "The role name" }),
1916
- 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()
1912
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
1913
+ endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
1914
+ database_name: z.string(),
1915
+ role_name: z.string(),
1916
+ pooled: z.boolean().optional()
1917
1917
  });
1918
1918
  const zGetNeonAuthAllowLocalhostPath = z.strictObject({
1919
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1920
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1919
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1920
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1921
1921
  });
1922
1922
  const zUpdateNeonAuthAllowLocalhostBody = zUpdateNeonAuthAllowLocalhostRequest;
1923
1923
  const zUpdateNeonAuthAllowLocalhostPath = z.strictObject({
1924
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1925
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1924
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1925
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1926
1926
  });
1927
1927
  const zGetNeonAuthPluginConfigsPath = z.strictObject({
1928
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1929
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1928
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1929
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1930
1930
  });
1931
1931
  const zUpdateNeonAuthOrganizationPluginBody = zNeonAuthOrganizationConfigUpdate;
1932
1932
  const zUpdateNeonAuthOrganizationPluginPath = z.strictObject({
1933
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1934
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1933
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1934
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1935
1935
  });
1936
1936
  const zUpdateNeonAuthConfigBody = zNeonAuthConfigUpdate;
1937
1937
  const zUpdateNeonAuthConfigPath = z.strictObject({
1938
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1939
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1938
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1939
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1940
1940
  });
1941
1941
  const zUpdateNeonAuthMagicLinkPluginBody = zNeonAuthMagicLinkConfigUpdate;
1942
1942
  const zUpdateNeonAuthMagicLinkPluginPath = z.strictObject({
1943
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1944
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1943
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1944
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1945
1945
  });
1946
1946
  const zGetNeonAuthPhoneNumberPluginPath = z.strictObject({
1947
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1948
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1947
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1948
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1949
1949
  });
1950
1950
  const zUpdateNeonAuthPhoneNumberPluginBody = zNeonAuthPhoneNumberConfigUpdate;
1951
1951
  const zUpdateNeonAuthPhoneNumberPluginPath = z.strictObject({
1952
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1953
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1952
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1953
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1954
1954
  });
1955
1955
  const zGetNeonAuthWebhookConfigPath = z.strictObject({
1956
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1957
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1956
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1957
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1958
1958
  });
1959
1959
  const zUpdateNeonAuthWebhookConfigBody = zNeonAuthWebhookConfig;
1960
1960
  const zUpdateNeonAuthWebhookConfigPath = z.strictObject({
1961
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1962
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
1961
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1962
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1963
1963
  });
1964
- const zListProjectBranchesPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1964
+ const zListProjectBranchesPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1965
1965
  const zListProjectBranchesQuery = z.strictObject({
1966
- 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(),
1966
+ search: z.string().optional(),
1967
1967
  sort_by: z.enum([
1968
1968
  "name",
1969
1969
  "created_at",
1970
1970
  "updated_at"
1971
- ]).register(z.globalRegistry, { description: "Sort the branches by sort_field. If not provided, branches will be sorted by updated_at descending order" }).optional(),
1972
- 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(),
1973
- sort_order: z.enum(["asc", "desc"]).register(z.globalRegistry, { description: "Defines the sorting order of entities." }).optional(),
1974
- limit: z.int().gte(1).lte(1e4).register(z.globalRegistry, { description: "The maximum number of records to be returned in the response" }).optional(),
1975
- 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()
1971
+ ]).optional(),
1972
+ cursor: z.string().optional(),
1973
+ sort_order: z.enum(["asc", "desc"]).optional(),
1974
+ limit: z.int().gte(1).lte(1e4).optional(),
1975
+ include_deleted: z.boolean().optional()
1976
1976
  });
1977
1977
  const zCreateProjectBranchBody = zBranchCreateRequest.merge(zAnnotationCreateValueRequest);
1978
- const zCreateProjectBranchPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1978
+ const zCreateProjectBranchPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1979
1979
  const zCreateProjectBranchAnonymizedBody = zBranchAnonymizedCreateRequest;
1980
- const zCreateProjectBranchAnonymizedPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1981
- const zCountProjectBranchesPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
1982
- const zCountProjectBranchesQuery = z.strictObject({ search: z.string().register(z.globalRegistry, { description: "Count branches matching the `name` in search query" }).optional() });
1980
+ const zCreateProjectBranchAnonymizedPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1981
+ const zCountProjectBranchesPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
1982
+ const zCountProjectBranchesQuery = z.strictObject({ search: z.string().optional() });
1983
1983
  const zDeleteProjectBranchPath = z.strictObject({
1984
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1985
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
1984
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1985
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1986
1986
  });
1987
- 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() });
1987
+ const zDeleteProjectBranchQuery = z.strictObject({ hard_delete: z.boolean().optional() });
1988
1988
  const zGetProjectBranchPath = z.strictObject({
1989
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1990
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
1989
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1990
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1991
1991
  });
1992
1992
  const zUpdateProjectBranchBody = zBranchUpdateRequest;
1993
1993
  const zUpdateProjectBranchPath = z.strictObject({
1994
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
1995
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
1994
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
1995
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
1996
1996
  });
1997
1997
  const zRestoreProjectBranchBody = zBranchRestoreRequest;
1998
1998
  const zRestoreProjectBranchPath = z.strictObject({
1999
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2000
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
1999
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2000
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2001
2001
  });
2002
2002
  const zGetProjectBranchSchemaPath = z.strictObject({
2003
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2004
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2003
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2004
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2005
2005
  });
2006
2006
  const zGetProjectBranchSchemaQuery = z.strictObject({
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
- format: z.string().register(z.globalRegistry, { description: "The format of the schema to retrieve. Possible values:\n- `sql` (default)\n- `json`\n" }).optional()
2007
+ db_name: z.string(),
2008
+ lsn: z.string().optional(),
2009
+ timestamp: z.iso.datetime().optional(),
2010
+ format: z.string().optional()
2011
2011
  });
2012
2012
  const zGetProjectBranchSchemaComparisonPath = z.strictObject({
2013
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2014
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2013
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2014
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2015
2015
  });
2016
2016
  const zGetProjectBranchSchemaComparisonQuery = z.strictObject({
2017
- base_branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID to compare the schema with" }).optional(),
2018
- db_name: z.string().register(z.globalRegistry, { description: "Name of the database for which the schema is retrieved" }),
2019
- lsn: z.string().register(z.globalRegistry, { description: "The Log Sequence Number (LSN) for which the schema is retrieved\n" }).optional(),
2020
- timestamp: z.iso.datetime().register(z.globalRegistry, { description: "The point in time for which the schema is retrieved\n" }).optional(),
2021
- base_lsn: z.string().register(z.globalRegistry, { description: "The Log Sequence Number (LSN) for the base branch schema\n" }).optional(),
2022
- base_timestamp: z.iso.datetime().register(z.globalRegistry, { description: "The point in time for the base branch schema\n" }).optional()
2017
+ base_branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
2018
+ db_name: z.string(),
2019
+ lsn: z.string().optional(),
2020
+ timestamp: z.iso.datetime().optional(),
2021
+ base_lsn: z.string().optional(),
2022
+ base_timestamp: z.iso.datetime().optional()
2023
2023
  });
2024
2024
  const zGetMaskingRulesPath = z.strictObject({
2025
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2026
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2025
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2026
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2027
2027
  });
2028
2028
  const zUpdateMaskingRulesBody = zMaskingRulesUpdateRequest;
2029
2029
  const zUpdateMaskingRulesPath = z.strictObject({
2030
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2031
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2030
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2031
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2032
2032
  });
2033
2033
  const zGetAnonymizedBranchStatusPath = z.strictObject({
2034
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2035
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2034
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2035
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2036
2036
  });
2037
2037
  const zStartAnonymizationPath = z.strictObject({
2038
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2039
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2038
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2039
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2040
2040
  });
2041
2041
  const zSetDefaultProjectBranchPath = z.strictObject({
2042
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2043
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2042
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2043
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2044
2044
  });
2045
- const zFinalizeRestoreBranchBody = z.strictObject({ name: z.string().register(z.globalRegistry, { description: "Name for the replaced branch. If omitted, a unique name is generated." }).optional() });
2045
+ const zFinalizeRestoreBranchBody = z.strictObject({ name: z.string().optional() });
2046
2046
  const zFinalizeRestoreBranchPath = z.strictObject({
2047
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2048
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2047
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2048
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2049
2049
  });
2050
2050
  const zListProjectBranchEndpointsPath = z.strictObject({
2051
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2052
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2051
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2052
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2053
2053
  });
2054
2054
  const zListProjectBranchDatabasesPath = z.strictObject({
2055
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2056
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2055
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2056
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2057
2057
  });
2058
2058
  const zCreateProjectBranchDatabaseBody = zDatabaseCreateRequest;
2059
2059
  const zCreateProjectBranchDatabasePath = z.strictObject({
2060
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2061
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2060
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2061
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2062
2062
  });
2063
2063
  const zDeleteProjectBranchDatabasePath = 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" })
2064
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2065
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2066
+ database_name: z.string()
2067
2067
  });
2068
2068
  const zGetProjectBranchDatabasePath = 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
- database_name: z.string().register(z.globalRegistry, { description: "The database name" })
2069
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2070
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2071
+ database_name: z.string()
2072
2072
  });
2073
2073
  const zUpdateProjectBranchDatabaseBody = zDatabaseUpdateRequest;
2074
2074
  const zUpdateProjectBranchDatabasePath = z.strictObject({
2075
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2076
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
2077
- database_name: z.string().register(z.globalRegistry, { description: "The database name" })
2075
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2076
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2077
+ database_name: z.string()
2078
2078
  });
2079
2079
  const zListProjectBranchRolesPath = z.strictObject({
2080
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2081
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2080
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2081
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2082
2082
  });
2083
2083
  const zCreateProjectBranchRoleBody = zRoleCreateRequest;
2084
2084
  const zCreateProjectBranchRolePath = z.strictObject({
2085
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2086
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2085
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2086
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2087
2087
  });
2088
2088
  const zDeleteProjectBranchRolePath = z.strictObject({
2089
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2090
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
2091
- role_name: z.string().register(z.globalRegistry, { description: "The role name" })
2089
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2090
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2091
+ role_name: z.string()
2092
2092
  });
2093
2093
  const zGetProjectBranchRolePath = z.strictObject({
2094
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2095
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
2096
- role_name: z.string().register(z.globalRegistry, { description: "The role name" })
2094
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2095
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2096
+ role_name: z.string()
2097
2097
  });
2098
2098
  const zGetProjectBranchRolePasswordPath = z.strictObject({
2099
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2100
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
2101
- role_name: z.string().register(z.globalRegistry, { description: "The role name" })
2099
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2100
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2101
+ role_name: z.string()
2102
2102
  });
2103
2103
  const zResetProjectBranchRolePasswordPath = z.strictObject({
2104
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2105
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" }),
2106
- role_name: z.string().register(z.globalRegistry, { description: "The role name" })
2104
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2105
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2106
+ role_name: z.string()
2107
2107
  });
2108
- const zListProjectVpcEndpointsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
2108
+ const zListProjectVpcEndpointsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2109
2109
  const zDeleteProjectVpcEndpointPath = z.strictObject({
2110
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2111
- vpc_endpoint_id: z.string().register(z.globalRegistry, { description: "The VPC endpoint ID" })
2110
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2111
+ vpc_endpoint_id: z.string()
2112
2112
  });
2113
2113
  const zAssignProjectVpcEndpointBody = zVpcEndpointAssignment;
2114
2114
  const zAssignProjectVpcEndpointPath = z.strictObject({
2115
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2116
- vpc_endpoint_id: z.string().register(z.globalRegistry, { description: "The VPC endpoint ID" })
2115
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2116
+ vpc_endpoint_id: z.string()
2117
2117
  });
2118
- const zListProjectEndpointsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
2118
+ const zListProjectEndpointsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2119
2119
  const zCreateProjectEndpointBody = zEndpointCreateRequest;
2120
- const zCreateProjectEndpointPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
2120
+ const zCreateProjectEndpointPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2121
2121
  const zDeleteProjectEndpointPath = z.strictObject({
2122
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2123
- endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
2122
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2123
+ endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2124
2124
  });
2125
2125
  const zGetProjectEndpointPath = z.strictObject({
2126
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2127
- endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
2126
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2127
+ endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2128
2128
  });
2129
2129
  const zUpdateProjectEndpointBody = zEndpointUpdateRequest;
2130
2130
  const zUpdateProjectEndpointPath = z.strictObject({
2131
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2132
- endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
2131
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2132
+ endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2133
2133
  });
2134
2134
  const zStartProjectEndpointPath = z.strictObject({
2135
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2136
- endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
2135
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2136
+ endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2137
2137
  });
2138
2138
  const zSuspendProjectEndpointPath = z.strictObject({
2139
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2140
- endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
2139
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2140
+ endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2141
2141
  });
2142
2142
  const zRestartProjectEndpointPath = z.strictObject({
2143
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2144
- endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The endpoint ID" })
2143
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2144
+ endpoint_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2145
2145
  });
2146
2146
  const zGetConsumptionHistoryPerProjectQuery = z.strictObject({
2147
- cursor: z.string().register(z.globalRegistry, { description: "Specify the cursor value from the previous response to get the next batch of projects." }).optional(),
2148
- 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(),
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: "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(),
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 consumption history is available starting from `March 1, 2024, at 00:00:00 UTC`.\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" }),
2147
+ cursor: z.string().optional(),
2148
+ limit: z.int().gte(1).lte(100).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).optional(),
2150
+ from: z.iso.datetime(),
2151
+ to: z.iso.datetime(),
2152
2152
  granularity: zConsumptionHistoryGranularity,
2153
- 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(),
2154
- 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(),
2153
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional(),
2154
+ include_v1_metrics: z.boolean().optional(),
2155
2155
  metrics: zConsumptionHistoryQueryMetrics.optional()
2156
2156
  });
2157
2157
  const zGetConsumptionHistoryPerProjectV2Query = z.strictObject({
2158
- 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(),
2159
- 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(),
2160
- 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(),
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\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" }),
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" }),
2158
+ cursor: z.string().optional(),
2159
+ limit: z.int().gte(1).lte(100).optional(),
2160
+ project_ids: z.array(z.string().regex(/^([a-z0-9-]{1,60}(,[a-z0-9-]{1,60}){0,99})?$/)).min(0).max(100).optional(),
2161
+ from: z.iso.datetime(),
2162
+ to: z.iso.datetime(),
2163
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" }),
2164
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2165
2165
  metrics: zConsumptionHistoryQueryMetrics
2166
2166
  });
2167
2167
  const zGetConsumptionHistoryPerBranchV2Query = z.strictObject({
2168
- 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(),
2169
- 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(),
2170
- 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" }),
2171
- 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(),
2172
- 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" }),
2173
- 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" }),
2168
+ cursor: z.string().optional(),
2169
+ limit: z.int().gte(1).lte(1e3).optional(),
2170
+ project_ids: z.array(z.string().regex(/^([a-z0-9-]{1,60}(,[a-z0-9-]{1,60}){0,99})?$/)).min(1).max(100),
2171
+ branch_ids: z.array(z.string().regex(/^([a-z0-9-]{1,60}(,[a-z0-9-]{1,60}){0,99})?$/)).min(0).max(100).optional(),
2172
+ from: z.iso.datetime(),
2173
+ to: z.iso.datetime(),
2174
2174
  granularity: zConsumptionHistoryGranularity,
2175
- 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" }),
2175
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2176
2176
  metrics: zConsumptionHistoryQueryMetrics
2177
2177
  });
2178
- const zGetOrganizationPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
2179
- const zListOrgApiKeysPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
2178
+ const zGetOrganizationPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2179
+ const zListOrgApiKeysPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2180
2180
  const zCreateOrgApiKeyBody = zOrgApiKeyCreateRequest;
2181
- const zCreateOrgApiKeyPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
2181
+ const zCreateOrgApiKeyPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2182
2182
  const zRevokeOrgApiKeyPath = z.strictObject({
2183
- org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
2184
- key_id: z.int().register(z.globalRegistry, { description: "The API key ID" })
2183
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2184
+ key_id: z.int()
2185
2185
  });
2186
- const zDeleteOrganizationSpendingLimitPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
2187
- const zGetOrganizationSpendingLimitPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
2186
+ const zDeleteOrganizationSpendingLimitPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2187
+ const zGetOrganizationSpendingLimitPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2188
2188
  const zSetOrganizationSpendingLimitBody = zSpendingLimitUpdateRequest;
2189
- const zSetOrganizationSpendingLimitPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
2190
- const zGetOrganizationMembersPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
2189
+ const zSetOrganizationSpendingLimitPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2190
+ const zGetOrganizationMembersPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2191
2191
  const zGetOrganizationMembersQuery = z.strictObject({
2192
2192
  sort_by: z.enum([
2193
2193
  "email",
2194
2194
  "role",
2195
2195
  "joined_at"
2196
- ]).register(z.globalRegistry, { description: "Sort the members by the specified field. Defaults to `joined_at`." }).optional(),
2197
- 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(),
2198
- sort_order: z.enum(["asc", "desc"]).register(z.globalRegistry, { description: "Defines the sorting order of entities." }).optional(),
2199
- limit: z.int().gte(1).lte(500).register(z.globalRegistry, { description: "The maximum number of members to return in the response" }).optional()
2196
+ ]).optional(),
2197
+ cursor: z.string().optional(),
2198
+ sort_order: z.enum(["asc", "desc"]).optional(),
2199
+ limit: z.int().gte(1).lte(500).optional()
2200
2200
  });
2201
2201
  const zRemoveOrganizationMemberPath = z.strictObject({
2202
- org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
2203
- member_id: z.uuid().register(z.globalRegistry, { description: "The Neon organization member ID" })
2202
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2203
+ member_id: z.uuid()
2204
2204
  });
2205
2205
  const zGetOrganizationMemberPath = z.strictObject({
2206
- org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
2207
- member_id: z.uuid().register(z.globalRegistry, { description: "The Neon organization member ID" })
2206
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2207
+ member_id: z.uuid()
2208
2208
  });
2209
2209
  const zUpdateOrganizationMemberBody = zOrganizationMemberUpdateRequest;
2210
2210
  const zUpdateOrganizationMemberPath = z.strictObject({
2211
- org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
2212
- member_id: z.uuid().register(z.globalRegistry, { description: "The Neon organization member ID" })
2211
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2212
+ member_id: z.uuid()
2213
2213
  });
2214
- const zGetOrganizationInvitationsPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
2214
+ const zGetOrganizationInvitationsPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2215
2215
  const zCreateOrganizationInvitationsBody = zOrganizationInvitesCreateRequest;
2216
- const zCreateOrganizationInvitationsPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
2216
+ const zCreateOrganizationInvitationsPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2217
2217
  const zTransferProjectsFromOrgToOrgBody = zTransferProjectsToOrganizationRequest;
2218
- 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)" }) });
2219
- const zListOrganizationVpcEndpointsAllRegionsPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }) });
2218
+ const zTransferProjectsFromOrgToOrgPath = z.strictObject({ source_org_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2219
+ const zListOrganizationVpcEndpointsAllRegionsPath = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2220
2220
  const zListOrganizationVpcEndpointsPath = z.strictObject({
2221
- org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
2222
- region_id: z.string().register(z.globalRegistry, { description: "The Neon region ID" })
2221
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2222
+ region_id: z.string()
2223
2223
  });
2224
2224
  const zDeleteOrganizationVpcEndpointPath = 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" })
2225
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2226
+ region_id: z.string(),
2227
+ vpc_endpoint_id: z.string()
2228
2228
  });
2229
2229
  const zGetOrganizationVpcEndpointDetailsPath = z.strictObject({
2230
- org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
2231
- region_id: z.string().register(z.globalRegistry, { description: "The Neon region ID.\nAzure regions are currently not supported.\n" }),
2232
- vpc_endpoint_id: z.string().register(z.globalRegistry, { description: "The VPC endpoint ID" })
2230
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2231
+ region_id: z.string(),
2232
+ vpc_endpoint_id: z.string()
2233
2233
  });
2234
2234
  const zAssignOrganizationVpcEndpointBody = zVpcEndpointAssignment;
2235
2235
  const zAssignOrganizationVpcEndpointPath = z.strictObject({
2236
- org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon organization ID" }),
2237
- region_id: z.string().register(z.globalRegistry, { description: "The Neon region ID.\nAzure regions are currently not supported.\n" }),
2238
- vpc_endpoint_id: z.string().register(z.globalRegistry, { description: "The VPC endpoint ID" })
2236
+ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2237
+ region_id: z.string(),
2238
+ vpc_endpoint_id: z.string()
2239
2239
  });
2240
- 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() });
2240
+ const zGetActiveRegionsQuery = z.strictObject({ org_id: z.string().regex(/^[a-z0-9-]{1,60}$/).optional() });
2241
2241
  const zTransferProjectsFromUserToOrgBody = zTransferProjectsToOrganizationRequest;
2242
2242
  const zCreateSnapshotPath = z.strictObject({
2243
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2244
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2243
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2244
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2245
2245
  });
2246
2246
  const zCreateSnapshotQuery = z.strictObject({
2247
- 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(),
2248
- 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(),
2249
- name: z.string().register(z.globalRegistry, { description: "A name for the snapshot." }).optional(),
2250
- expires_at: z.string().register(z.globalRegistry, { description: "The time at which the snapshot will be automatically deleted. RFC 3339 format.\n" }).optional()
2247
+ lsn: z.string().optional(),
2248
+ timestamp: z.string().optional(),
2249
+ name: z.string().optional(),
2250
+ expires_at: z.string().optional()
2251
2251
  });
2252
- const zListSnapshotsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }) });
2252
+ const zListSnapshotsPath = z.strictObject({ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/) });
2253
2253
  const zDeleteSnapshotPath = z.strictObject({
2254
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2255
- snapshot_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The snapshot ID" })
2254
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2255
+ snapshot_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2256
2256
  });
2257
2257
  const zUpdateSnapshotBody = zSnapshotUpdateRequest;
2258
2258
  const zUpdateSnapshotPath = z.strictObject({
2259
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2260
- snapshot_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The snapshot ID" })
2259
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2260
+ snapshot_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2261
2261
  });
2262
2262
  const zRestoreSnapshotBody = z.strictObject({
2263
- 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(),
2264
- 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(),
2265
- 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()
2263
+ name: z.string().optional(),
2264
+ target_branch_id: z.string().optional(),
2265
+ finalize_restore: z.boolean().optional()
2266
2266
  });
2267
2267
  const zRestoreSnapshotPath = z.strictObject({
2268
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2269
- snapshot_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The snapshot ID" })
2268
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2269
+ snapshot_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2270
2270
  });
2271
- 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() });
2271
+ const zRestoreSnapshotQuery = z.strictObject({ name: z.string().optional() });
2272
2272
  const zGetSnapshotSchedulePath = z.strictObject({
2273
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2274
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2273
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2274
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2275
2275
  });
2276
2276
  const zSetSnapshotScheduleBody = zBackupSchedule;
2277
2277
  const zSetSnapshotSchedulePath = z.strictObject({
2278
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2279
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The branch ID" })
2278
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2279
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2280
2280
  });
2281
2281
  const zListProjectBranchBucketsPath = z.strictObject({
2282
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2283
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
2282
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2283
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2284
2284
  });
2285
2285
  const zCreateProjectBranchBucketBody = zBucketCreateRequest;
2286
2286
  const zCreateProjectBranchBucketPath = z.strictObject({
2287
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2288
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
2287
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2288
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2289
2289
  });
2290
2290
  const zDeleteProjectBranchBucketPath = z.strictObject({
2291
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2292
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
2293
- bucket_name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name" })
2291
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2292
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2293
+ bucket_name: z.string().min(1).max(255)
2294
2294
  });
2295
2295
  const zGetProjectBranchStoragePath = z.strictObject({
2296
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2297
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
2296
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2297
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2298
2298
  });
2299
2299
  const zGetProjectBranchAiGatewayPath = z.strictObject({
2300
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2301
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
2300
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2301
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2302
2302
  });
2303
2303
  const zQueryProjectBranchLogsBody = zProjectBranchLogsQueryRequest;
2304
2304
  const zQueryProjectBranchLogsPath = z.strictObject({
2305
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2306
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
2305
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2306
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2307
2307
  });
2308
2308
  const zListProjectBranchLogFieldsPath = z.strictObject({
2309
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2310
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
2309
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2310
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2311
2311
  });
2312
2312
  const zListProjectBranchLogFieldValuesPath = z.strictObject({
2313
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2314
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
2315
- 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" })
2313
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2314
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2315
+ field_name: z.string().min(1)
2316
2316
  });
2317
2317
  const zListProjectBranchLogFieldValuesQuery = z.strictObject({
2318
2318
  since: zProjectBranchLogDuration.optional(),
2319
- start_time: z.iso.datetime().register(z.globalRegistry, { description: "Inclusive beginning of the lookup window. Mutually exclusive with\n`since`.\n" }).optional(),
2320
- end_time: z.iso.datetime().register(z.globalRegistry, { description: "Exclusive end of the lookup window. Defaults to the current time." }).optional(),
2319
+ start_time: z.iso.datetime().optional(),
2320
+ end_time: z.iso.datetime().optional(),
2321
2321
  source: zProjectBranchLogSource.optional(),
2322
- 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()
2322
+ limit: z.int().gte(1).lte(1e3).optional()
2323
2323
  });
2324
2324
  const zListProjectBranchBucketObjectsPath = 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" })
2325
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2326
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2327
+ bucket_name: z.string().min(1).max(255)
2328
2328
  });
2329
2329
  const zListProjectBranchBucketObjectsQuery = z.strictObject({
2330
- prefix: z.string().register(z.globalRegistry, { description: "Only list objects whose key starts with this prefix." }).optional(),
2331
- 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(),
2332
- 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(),
2333
- limit: z.int().gte(1).lte(1e3).register(z.globalRegistry, { description: "Maximum number of items (objects + folders) to return." }).optional()
2330
+ prefix: z.string().optional(),
2331
+ delimiter: z.string().optional(),
2332
+ cursor: z.string().optional(),
2333
+ limit: z.int().gte(1).lte(1e3).optional()
2334
2334
  });
2335
2335
  const zDeleteProjectBranchBucketObjectPath = z.strictObject({
2336
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2337
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
2338
- bucket_name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name" }),
2339
- 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" })
2336
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2337
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2338
+ bucket_name: z.string().min(1).max(255),
2339
+ object_key: z.string().min(1).max(1024)
2340
2340
  });
2341
2341
  const zGetProjectBranchBucketObjectPath = z.strictObject({
2342
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2343
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
2344
- bucket_name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name" }),
2345
- 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" })
2342
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2343
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2344
+ bucket_name: z.string().min(1).max(255),
2345
+ object_key: z.string().min(1).max(1024)
2346
2346
  });
2347
2347
  const zDeleteProjectBranchBucketObjectsByPrefixPath = z.strictObject({
2348
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2349
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
2350
- bucket_name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name" })
2348
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2349
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2350
+ bucket_name: z.string().min(1).max(255)
2351
2351
  });
2352
- 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" }) });
2352
+ const zDeleteProjectBranchBucketObjectsByPrefixQuery = z.strictObject({ prefix: z.string().min(1).max(1024) });
2353
2353
  const zPresignProjectBranchBucketObjectBody = zPresignRequest;
2354
2354
  const zPresignProjectBranchBucketObjectPath = 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
- bucket_name: z.string().min(1).max(255).register(z.globalRegistry, { description: "The bucket name" }),
2358
- 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" })
2355
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2356
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2357
+ bucket_name: z.string().min(1).max(255),
2358
+ object_key: z.string().min(1).max(1024)
2359
2359
  });
2360
2360
  const zListCredentialsPath = z.strictObject({
2361
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2362
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
2361
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2362
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2363
2363
  });
2364
2364
  const zCreateCredentialBody = zCreateCredentialRequest;
2365
2365
  const zCreateCredentialPath = z.strictObject({
2366
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2367
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
2366
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2367
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2368
2368
  });
2369
2369
  const zRevokeCredentialPath = z.strictObject({
2370
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2371
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
2372
- token_id: z.string().register(z.globalRegistry, { description: "The opaque credential id (e.g. nak_live_<32hex>)." })
2370
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2371
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2372
+ token_id: z.string()
2373
2373
  });
2374
2374
  const zListProjectBranchFunctionsPath = z.strictObject({
2375
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2376
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" })
2375
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2376
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/)
2377
2377
  });
2378
2378
  const zListProjectBranchFunctionsQuery = z.strictObject({
2379
- 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(),
2380
- 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()
2379
+ cursor: z.string().optional(),
2380
+ limit: z.int().gte(1).lte(1e3).optional()
2381
2381
  });
2382
2382
  const zDeleteProjectBranchFunctionPath = 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" })
2383
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2384
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2385
+ slug: z.string().regex(/^[a-z0-9]{1,20}$/)
2386
2386
  });
2387
2387
  const zGetProjectBranchFunctionPath = z.strictObject({
2388
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2389
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
2390
- slug: z.string().regex(/^[a-z0-9]{1,20}$/).register(z.globalRegistry, { description: "The function slug" })
2388
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2389
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2390
+ slug: z.string().regex(/^[a-z0-9]{1,20}$/)
2391
2391
  });
2392
2392
  const zUpdateProjectBranchFunctionBody = zNeonFunctionUpdateRequest;
2393
2393
  const zUpdateProjectBranchFunctionPath = z.strictObject({
2394
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2395
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
2396
- slug: z.string().regex(/^[a-z0-9]{1,20}$/).register(z.globalRegistry, { description: "The function slug" })
2394
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2395
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2396
+ slug: z.string().regex(/^[a-z0-9]{1,20}$/)
2397
2397
  });
2398
2398
  const zCreateProjectBranchFunctionDeploymentBody = zFunctionDeployRequest;
2399
2399
  const zCreateProjectBranchFunctionDeploymentPath = z.strictObject({
2400
- project_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon project ID" }),
2401
- branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/).register(z.globalRegistry, { description: "The Neon branch ID" }),
2402
- slug: z.string().regex(/^[a-z0-9]{1,20}$/).register(z.globalRegistry, { description: "The function slug" })
2400
+ project_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2401
+ branch_id: z.string().regex(/^[a-z0-9-]{1,60}$/),
2402
+ slug: z.string().regex(/^[a-z0-9]{1,20}$/)
2403
2403
  });
2404
2404
  //#endregion
2405
2405
  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, zSendNeonAuthEmailProviderTestBody, zSendNeonAuthEmailProviderTestPath, zSendNeonAuthEmailProviderTestRequest, 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 };