export type ClientOptions = { baseUrl: 'https://console.neon.tech/api/v2' | (string & {}); }; export type ComputeUnit = number; export type Provisioner = string; export type PaginationResponse = { pagination?: Pagination; }; /** * Cursor-based pagination. The `cursor` value reflects the endpoint's sort field (for example, an ID or timestamp), so pass it back unchanged. */ export type Pagination = { /** * Cursor marking the last item in this response. Pass it unchanged as the `cursor` query parameter to fetch the next page. */ cursor: string; }; /** * Empty response. */ export type EmptyResponse = { [key: string]: unknown; }; export type PlanDetails = { /** * Plan name, for example `free`, `launch`, or `scale`. */ name: string; version?: PlanVersion; }; export type PlanVersion = { major: number; minor: number; }; /** * Add a new JWKS to a specific endpoint of a project */ export type AddProjectJwksRequest = { /** * URL of the provider's JWKS endpoint used to verify JWTs. */ jwks_url: string; /** * The name of the authentication provider (e.g., Clerk, Stytch, Auth0) */ provider_name: string; /** * The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`. */ branch_id?: string; /** * 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. */ jwt_audience?: string; /** * Deprecated. The roles the JWKS should be mapped to. By default, the JWKS is mapped to the `authenticator`, `authenticated`, and `anonymous` roles. * * @deprecated */ role_names?: Array; /** * Deprecated. Only used with Neon RLS. If true, role creation is skipped. */ skip_role_creation?: boolean; }; export type Jwks = { /** * The JWKS configuration's ID. */ id: string; /** * The Neon project ID. Returned as `id` from `GET /projects`. */ project_id: string; /** * The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`. */ branch_id?: string; /** * URL of the provider's JWKS endpoint used to verify JWTs. */ jwks_url: string; /** * The name of the authentication provider (e.g., Clerk, Stytch, Auth0) */ provider_name: string; /** * The date and time when the JWKS was created */ created_at: string; /** * The date and time when the JWKS was last modified */ updated_at: string; /** * Expected JWT `aud` claim value configured for this JWKS. */ jwt_audience?: string; /** * Database role names that are permitted to authenticate using this JWKS configuration. */ role_names?: Array; }; /** * The list of configured JWKS definitions for a project */ export type ProjectJwksResponse = { /** * JWKS configurations associated with the project. */ jwks: Array; }; /** * Category of an advisor issue */ export type AdvisorCategory = 'SECURITY' | 'PERFORMANCE'; export type AdvisorIssue = { /** * Unique identifier for the issue type */ name: string; /** * Human-readable title */ title: string; /** * Severity level of the issue */ level: string; /** * Whether this issue affects external API exposure or is internal only */ facing: 'EXTERNAL' | 'INTERNAL'; /** * Categories this issue belongs to */ categories: Array; /** * Detailed description of what this check detects */ description: string; /** * Specific details about this instance of the issue */ detail: string; /** * URL to documentation on how to fix this issue */ remediation: string; /** * Additional context-specific metadata */ metadata: { [key: string]: unknown; }; /** * Unique key for caching this issue result */ cache_key: string; }; export type ApiKeyCreateRequest = { /** * A user-specified API key name. This value is required when creating an API key. */ key_name: string; }; export type OrgApiKeyCreateRequest = ApiKeyCreateRequest & { /** * If set, the API key can access only this project */ project_id?: string; }; export type ApiKeyCreateResponse = { /** * The API key's unique numeric ID. Distinct from the API key token (`key`). */ id: number; /** * The generated 64-bit token required to access the Neon API */ key: string; /** * The user-specified API key name */ name: string; /** * A timestamp indicating when the API key was created */ created_at: string; /** * ID of the user who created this API key */ created_by: string; }; export type OrgApiKeyCreateResponse = ApiKeyCreateResponse & { /** * If set, the API key can access only this project */ project_id?: string; }; export type ApiKeyRevokeResponse = { /** * The API key's unique numeric ID. Distinct from the API key token (`key`). */ id: number; /** * The user-specified API key name */ name: string; /** * A timestamp indicating when the API key was created */ created_at: string; /** * ID of the user who created this API key */ created_by: string; /** * A timestamp indicating when the API was last used */ last_used_at?: string | null; /** * The IP address from which the API key was last used */ last_used_from_addr: string; /** * A `true` or `false` value indicating whether the API key is revoked */ revoked: boolean; }; export type OrgApiKeyRevokeResponse = ApiKeyRevokeResponse & { /** * If set, the API key can access only this project */ project_id?: string; }; export type ApiKeysListResponseItem = { /** * The API key's unique numeric ID. Distinct from the API key token (`key`). */ id: number; /** * The user-specified API key name */ name: string; /** * A timestamp indicating when the API key was created */ created_at: string; created_by: ApiKeyCreatorData; /** * A timestamp indicating when the API was last used */ last_used_at?: string | null; /** * The IP address from which the API key was last used */ last_used_from_addr: string; }; export type OrgApiKeysListResponseItem = ApiKeysListResponseItem & { /** * If set, the API key can access only this project */ project_id?: string; }; /** * The user data of the user that created this API key. */ export type ApiKeyCreatorData = { /** * ID of the user who created this API key */ id: string; /** * Display name of the user who created the API key. */ name: string; /** * The URL to the user's avatar image. */ image: string; }; /** * 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. */ export type Operation = { /** * The operation ID */ id: string; /** * The ID of the project this operation ran on. */ project_id: string; /** * The ID of the branch this operation ran on. */ branch_id?: string; /** * The ID of the compute endpoint this operation ran on. */ endpoint_id?: string; action: OperationAction; status: OperationStatus; /** * Human-readable message describing why the operation failed. */ error?: string; /** * The number of times the operation failed */ failures_count: number; /** * A timestamp indicating when the operation was last retried */ retry_at?: string; /** * A timestamp indicating when the operation was created */ created_at: string; /** * A timestamp indicating when the operation status was last updated */ updated_at: string; /** * The total duration of the operation in milliseconds */ total_duration_ms: number; }; export type OperationResponse = { operation: Operation; }; export type OperationsResponse = { operations: Array; }; /** * The action performed by the operation */ export type OperationAction = 'create_compute' | 'create_timeline' | 'start_compute' | 'suspend_compute' | 'apply_config' | 'check_availability' | 'delete_timeline' | 'create_branch' | 'import_data' | 'tenant_ignore' | 'tenant_attach' | 'tenant_detach' | 'tenant_detach_safekeepers' | 'tenant_attach_safekeepers' | 'tenant_reattach' | 'replace_safekeeper' | 'disable_maintenance' | 'apply_storage_config' | 'prepare_secondary_pageserver' | 'switch_pageserver' | 'detach_parent_branch' | 'timeline_archive' | 'timeline_unarchive' | 'start_reserved_compute' | 'sync_dbs_and_roles_from_compute' | 'apply_schema_from_branch' | 'timeline_mark_invisible' | 'timeline_update_protected_config' | 'prewarm_replica' | 'promote_replica' | 'set_storage_non_dirty' | 'swap_binding_id' | 'finalize_migration' | 'mark_migration_prepared' | 'update_catalog' | 'epc_sync'; /** * 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. */ export type OperationStatus = 'scheduling' | 'running' | 'finished' | 'failed' | 'error' | 'cancelling' | 'cancelled' | 'skipped'; /** * Essential data about the project. Full data is available at `GET /projects/{project_id}`. * */ export type ProjectListItem = { /** * The Neon project ID. Use as the `project_id` path parameter in other endpoints. */ id: string; /** * The cloud platform identifier. Currently, only AWS is supported, for which the identifier is `aws`. * */ platform_id: string; /** * Cloud region where the project's Postgres compute and storage reside (for example, `aws-us-east-2`). Valid values are returned by `GET /regions`. * */ region_id: string; /** * The project name * */ name: string; provisioner: Provisioner; default_endpoint_settings?: DefaultEndpointSettings; settings?: ProjectSettingsData; pg_version: PgVersion; /** * The proxy host for the project. This value combines the `region_id`, the `platform_id`, and the Neon domain (`neon.tech`). * */ proxy_host: string; /** * The logical size limit for a branch. The value is in MiB. * */ branch_logical_size_limit: number; /** * The logical size limit for a branch. The value is in B. * */ branch_logical_size_limit_bytes: number; /** * Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization. * */ store_passwords: boolean; /** * Control plane observed endpoints of this project being active this amount of wall-clock time. * Not intended for billing or metering. For billing, use `/consumption_history/v2/projects`. * */ active_time: number; /** * Deprecated. Use `compute_time_seconds` from `GET /projects/{project_id}` instead. * * * @deprecated */ cpu_used_sec: number; /** * A timestamp indicating when project maintenance begins. If set, the project is placed into maintenance mode at this time. * */ maintenance_starts_at?: string; /** * The project creation source * */ creation_source: string; /** * A timestamp indicating when the project was created * */ created_at: string; /** * A timestamp indicating when the project was last updated * */ updated_at: string; /** * Deprecated: always returns 0. Use the consumption history v2 endpoints (`/consumption_history/v2/projects`, `/consumption_history/v2/branches`) instead. * 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. * * * @deprecated */ synthetic_storage_size?: number; /** * Deprecated. Use `consumption_period_end` from `GET /projects/{project_id}` instead. A timestamp indicating when the project quota resets. * * * @deprecated */ quota_reset_at?: string; /** * ID of the organization that owns the project. */ owner_id: string; /** * The most recent time when any endpoint of this project was active. * * Omitted when observed no activity for endpoints of this project. * */ compute_last_active_at?: string; /** * 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. * */ org_id?: string; /** * Name of the organization that owns the project. * */ org_name?: string; /** * The number of seconds to retain the shared history for all branches in this project. * */ history_retention_seconds?: number; /** * A timestamp indicating when HIPAA was enabled for this project */ hipaa_enabled_at?: string; /** * A timestamp indicating when the project was deleted */ deleted_at?: string; /** * A timestamp indicating the project will be recoverable until this date and time. */ recoverable_until?: string; effective_project_permission?: ProjectPermissionLevel | null; }; export type Project = { /** * Deprecated: always returns 0. Use the consumption history v2 endpoints (`/consumption_history/v2/projects`, `/consumption_history/v2/branches`) instead. * Bytes-Hour. Project consumed that much Postgres storage hourly during the billing period. The value has some lag. * The value is reset at the beginning of each billing period. * * * @deprecated */ data_storage_bytes_hour: number; /** * Bytes. Egress traffic from the Neon cloud to the client for given project over the billing period. * Includes deleted endpoints. The value has some lag. The value is reset at the beginning of each billing period. * Not intended for billing or metering. For billing, use `/consumption_history/v2/projects`. * */ data_transfer_bytes: number; /** * Bytes. Amount of WAL that travelled through Postgres storage for given project across all branches. * The value has some lag. The value is reset at the beginning of each billing period. * Not intended for billing or metering. For billing, use `/consumption_history/v2/projects`. * */ written_data_bytes: number; /** * Seconds. The number of CPU seconds used by the project's compute endpoints, including compute endpoints that have been deleted. * The value has some lag. The value is reset at the beginning of each billing period. * Examples: * 1. An endpoint that uses 1 CPU for 1 second is equal to `compute_time=1`. * 2. An endpoint that uses 2 CPUs simultaneously for 1 second is equal to `compute_time=2`. * Not intended for billing or metering. For billing, use `/consumption_history/v2/projects`. * */ compute_time_seconds: number; /** * Seconds. Control plane observed endpoints of this project being active this amount of wall-clock time. * The value has some lag. * The value is reset at the beginning of each billing period. * Not intended for billing or metering. For billing, use `/consumption_history/v2/projects`. * */ active_time_seconds: number; /** * Deprecated. Use `compute_time_seconds` instead. * * * @deprecated */ cpu_used_sec: number; /** * The Neon project ID. Use as the `project_id` path parameter in other endpoints. */ id: string; /** * The cloud platform identifier. Currently, only AWS is supported, for which the identifier is `aws`. * */ platform_id: string; /** * Cloud region where the resource's Postgres compute and storage reside (for example, `aws-us-east-1`). Valid values are returned by `GET /regions`. * */ region_id: string; /** * The project name * */ name: string; provisioner: Provisioner; default_endpoint_settings?: DefaultEndpointSettings; settings?: ProjectSettingsData; pg_version: PgVersion; /** * The proxy host for the project. This value combines the `region_id`, the `platform_id`, and the Neon domain (`neon.tech`). * */ proxy_host: string; /** * The logical size limit for a branch. The value is in MiB. * */ branch_logical_size_limit: number; /** * The logical size limit for a branch. The value is in B. * */ branch_logical_size_limit_bytes: number; /** * Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization. * */ store_passwords: boolean; /** * A timestamp indicating when project maintenance begins. If set, the project is placed into maintenance mode at this time. * */ maintenance_starts_at?: string; /** * The project creation source * */ creation_source: string; /** * The number of seconds to retain the shared history for all branches in this project. * */ history_retention_seconds: number; /** * A timestamp indicating when the project was created * */ created_at: string; /** * A timestamp indicating when the project was last updated * */ updated_at: string; /** * Deprecated: always returns 0. Use the consumption history v2 endpoints (`/consumption_history/v2/projects`, `/consumption_history/v2/branches`) instead. * 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. * * * @deprecated */ synthetic_storage_size?: number; /** * A date-time indicating when Neon Cloud started measuring consumption for current consumption period. * */ consumption_period_start: string; /** * A date-time indicating when Neon Cloud plans to stop measuring consumption for current consumption period. * */ consumption_period_end: string; /** * Deprecated. Use the `consumption_period_end` field instead. A timestamp indicating when the project quota resets. * * * @deprecated */ quota_reset_at?: string; /** * ID of the organization that owns the project. */ owner_id: string; owner?: ProjectOwnerData; /** * The most recent time when any endpoint of this project was active. * * Omitted when observed no activity for endpoints of this project. * */ compute_last_active_at?: string; /** * The Neon organization ID. Returned as `id` from `GET /users/me/organizations`. */ org_id?: string; /** * A timestamp indicating when project update begins. If set, computes might experience a brief restart around this time. * */ maintenance_scheduled_for?: string; /** * A timestamp indicating when HIPAA was enabled for this project */ hipaa_enabled_at?: string; effective_project_permission?: ProjectPermissionLevel | null; }; export type ProjectCreateRequest = { /** * Configuration for the new project, including name, region, and Postgres compute and storage settings. */ project: { settings?: ProjectSettingsData; /** * The project name. If not specified, the name will be identical to the generated project ID */ name?: string; realtime?: RealtimeOptions; /** * Configuration for the initial branch created with the project. */ branch?: { /** * The default branch name. If not specified, the default branch name, `main`, will be used. * */ name?: string; /** * The role name. If not specified, the default role name, `{database_name}_owner`, will be used. * */ role_name?: string; /** * The database name. If not specified, the default database name, `neondb`, will be used. * */ database_name?: string; annotations?: AnnotationValueData; }; autoscaling_limit_min_cu?: ComputeUnit; autoscaling_limit_max_cu?: ComputeUnit; provisioner?: Provisioner; /** * 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` * */ region_id?: string; default_endpoint_settings?: DefaultEndpointSettings; pg_version?: PgVersion; /** * Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization. * */ store_passwords?: boolean; /** * 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). * */ history_retention_seconds?: number; /** * ID of the organization that will own the project. If omitted when using an organization API key, it is inferred from the key. * */ org_id?: string; }; }; export type ProjectUpdateRequest = { project: { settings?: ProjectSettingsData; /** * The project name */ name?: string; default_endpoint_settings?: DefaultEndpointSettings; /** * 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). * */ history_retention_seconds?: number; }; }; export type ProjectTransferRequestResponse = { /** * The unique identifier for the transfer request */ id: string; /** * The ID of the project that is being transferred */ project_id: string; /** * The timestamp when the transfer request was created */ created_at: string; /** * The timestamp when the transfer request will expire */ expires_at: string; }; export type AcceptProjectTransferRequestSatisfiesPlanError = { /** * 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. */ reasons: Array<{ /** * Description of why the plan is not satisfied */ message: string; /** * A short code identifying the reason */ code: string; }>; }; export type ProjectSettingsData = { quota?: ProjectQuota; allowed_ips?: AllowedIps; /** * Sets wal_level=logical for all compute endpoints in this project. * All active endpoints will be suspended. * Once enabled, logical replication cannot be disabled. * */ enable_logical_replication?: boolean; maintenance_window?: MaintenanceWindow; /** * When set, connections from the public internet * are disallowed. This supersedes the AllowedIPs list. * This parameter is under active development and its semantics may change in the future. * */ block_public_connections?: boolean; /** * When set, connections using VPC endpoints are disallowed. * This parameter is under active development and its semantics may change in the future. * */ block_vpc_connections?: boolean; audit_log_level?: ProjectAuditLogLevel; /** * Enables HIPAA compliance mode for the project, including audit logging. */ hipaa?: boolean; preload_libraries?: PreloadLibraries; }; export type ProjectResponse = { project: Project; }; export type ProjectRecoverResponse = ProjectResponse & BranchesResponse; export type ProjectsResponse = { /** * List of projects accessible to the caller. Projects that exist but could not be retrieved are identified in `unavailable_project_ids`. */ projects: Array; /** * A list of project IDs indicating which projects are known to exist, but whose details could not * be fetched within the requested (or implicit) time limit * */ unavailable_project_ids?: Array; }; export type ProjectsCountResponse = { /** * The total number of projects matching the query criteria. */ count: number; }; export type ProjectPermission = { /** * The project permission's ID. */ id: string; /** * Email address of the user who has been granted access to the project. */ granted_to_email: string; /** * Timestamp when the permission was granted. */ granted_at: string; /** * Timestamp when the permission was revoked. Null if the permission is still active. */ revoked_at?: string; }; export type ProjectPermissions = { project_permissions: Array; }; export type GrantPermissionToProjectRequest = { /** * Email address of the user to grant project access to. */ email: string; }; /** * Per-project role. `viewer` maps to `VIEWER`, `editor` maps to `EDITOR`, * and `admin` maps to `ADMIN`. * */ export type ProjectRole = 'viewer' | 'editor' | 'admin'; /** * The caller's effective permission for a project when * per-project permissions are enabled. `VIEWER` grants read access, * `EDITOR` adds update access, and `ADMIN` grants full management. * Omitted for personal projects, flag-off organizations, and non-user * subjects. * */ export type ProjectPermissionLevel = 'VIEWER' | 'EDITOR' | 'ADMIN'; /** * How a member's project access is granted. * */ export type ProjectMemberGrantSource = 'explicit' | 'org_role_default' | 'org_admin_override' | 'unassigned'; /** * Organization-level role used by project member role management. * */ export type ProjectMemberOrgRole = 'admin' | 'member' | 'editor' | 'viewer' | 'collaborator'; export type ProjectMember = { /** * The organization member ID. */ member_id: string; /** * The user ID for the organization member. */ user_id: string; /** * Email address of the user who has been granted access to the project. */ email?: string; /** * The user's display name. */ name?: string; org_role: ProjectMemberOrgRole; project_role?: ProjectRole; org_default_project_permission?: ProjectPermissionLevel; explicit_project_permission?: ProjectPermissionLevel; effective_project_permission?: ProjectPermissionLevel; grant_source?: ProjectMemberGrantSource; }; export type ProjectMembers = { project_members: Array; pagination?: CursorPagination; }; export type SetProjectMemberRoleRequest = { role: ProjectRole; }; export type ProjectMemberRoleResponse = { project_id: string; member_id: string; user_id: string; /** * Email address of the user who has been granted access to the project. */ email?: string; /** * The user's display name. */ name?: string; org_role: ProjectMemberOrgRole; project_role?: ProjectRole; org_default_project_permission?: ProjectPermissionLevel; explicit_project_permission?: ProjectPermissionLevel; effective_project_permission?: ProjectPermissionLevel; /** * Hint that database credentials may need rotation after the role change. * */ credential_rotation_recommended?: boolean; /** * Hint that project-scoped org API keys created by the target user may need rotation. * */ org_api_key_rotation_recommended?: boolean; }; export type ConsumptionHistoryPerProjectResponse = { /** * Per-project consumption history records included in the response. */ projects: Array; }; export type ConsumptionHistoryPerProjectV2Response = { /** * Per-project consumption history entries for the requested time range. */ projects: Array; }; export type ConsumptionHistoryPerProject = { /** * The Neon project ID. Returned as `id` from `GET /projects`. */ project_id: string; /** * Consumption periods for the project, each covering a discrete billing interval. */ periods: Array; }; export type ConsumptionHistoryPerProjectV2 = { /** * The Neon project ID. Returned as `id` from `GET /projects`. */ project_id: string; /** * Consumption periods recorded for this project. */ periods: Array; }; export type ConsumptionHistoryPerBranchV2Response = { /** * Per-branch consumption history records returned for the requested time range. */ branches: Array; }; export type ConsumptionHistoryPerBranchV2 = { /** * The ID of the project that owns this branch. */ project_id: string; /** * The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`. */ branch_id: string; /** * Consumption history records for the branch, grouped by billing period. */ periods: Array; }; export type ConsumptionHistoryPerPeriod = { /** * The ID assigned to the specified billing period. */ period_id: string; /** * The billing plan applicable during the billing period. */ period_plan: string; /** * The start date-time of the billing period. * */ period_start: string; /** * The end date-time of the billing period, available for the past periods only. * */ period_end?: string; /** * Consumption metric records for the billing period. */ consumption: Array; }; export type ConsumptionHistoryPerPeriodV2 = { /** * The ID assigned to the specified billing period. */ period_id: string; /** * The billing plan applicable during the billing period. */ period_plan: string; /** * The start date-time of the billing period. * */ period_start: string; /** * The end date-time of the billing period, available for the past periods only. * */ period_end?: string; /** * Consumption metric records for the billing period. */ consumption: Array; }; export type ConsumptionHistoryPerTimeframe = { /** * The specified start date-time for the reported consumption. * */ timeframe_start: string; /** * The specified end date-time for the reported consumption. * */ timeframe_end: string; /** * Seconds. The amount of time the compute endpoints have been active. * */ active_time_seconds: number; /** * Seconds. The number of CPU seconds used by compute endpoints, including compute endpoints that have been deleted. * */ compute_time_seconds: number; /** * Bytes. The amount of written data for all branches. * */ written_data_bytes: number; /** * Deprecated: always returns 0. Use the consumption history v2 endpoints (`/consumption_history/v2/projects`, `/consumption_history/v2/branches`) instead. * 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. * * * @deprecated */ synthetic_storage_size_bytes: number; /** * Deprecated: always returns 0. Use the consumption history v2 endpoints (`/consumption_history/v2/projects`, `/consumption_history/v2/branches`) instead. * Bytes-Hour. The amount of Postgres storage consumed hourly. * * * @deprecated */ data_storage_bytes_hour: number; /** * Bytes. The amount of logical size consumed. * */ logical_size_bytes?: number; /** * Bytes-Hour. The amount of logical size consumed hourly. * */ logical_size_bytes_hour?: number; }; export type ConsumptionHistoryPerTimeframeV2 = { /** * The specified start date-time for the reported consumption. * */ timeframe_start?: string; /** * The specified end date-time for the reported consumption. * */ timeframe_end?: string; /** * Consumption metric values recorded for the timeframe. */ metrics?: Array; }; export type ConsumptionMetricValue = { /** * Name of the consumption metric, such as compute_time or data_storage_bytes_hour. */ metric_name: string; /** * Measured quantity for the metric named by `metric_name`. */ value: number; }; export type ConsumptionHistoryGranularity = 'hourly' | 'daily' | 'monthly'; export type ConsumptionHistoryQueryMetrics = Array; export type ProjectAuditLogLevel = 'base' | 'extended' | 'full'; export type AvailablePreloadLibrary = { /** * Name of the Postgres shared preload library as it appears in the `shared_preload_libraries` parameter (for example, `pg_stat_statements`). */ library_name: string; /** * Human-readable explanation of the library's purpose and behavior. */ description: string; /** * Whether this library is loaded by default in the `shared_preload_libraries` configuration for new compute endpoints. */ is_default: boolean; /** * Marks the library as experimental. Experimental libraries may be unstable, subject to breaking changes, or not recommended for production use. */ is_experimental: boolean; /** * Version of the preload library. */ version: string; }; export type AvailablePreloadLibraries = { /** * Preload libraries available for the project's Postgres version. Each entry includes `library_name`, `description`, `is_default`, `is_experimental`, and `version`. */ libraries?: Array; }; export type Branch = { /** * 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`. * */ id: string; /** * The ID of the project this branch belongs to. */ project_id: string; /** * The `branch_id` of the parent branch * */ parent_id?: string; /** * The Log Sequence Number (LSN) on the parent branch from which this branch was created. * When restoring a branch using the `POST /projects/{project_id}/branches/{branch_id}/restore` endpoint, * this value isn’t finalized until all operations related to the restore have completed successfully. * */ parent_lsn?: string; /** * The point in time on the parent branch from which this branch was created. * When restoring a branch using the `POST /projects/{project_id}/branches/{branch_id}/restore` endpoint, * this value isn’t finalized until all operations related to the restore have completed successfully. * After all the operations completed, this value might stay empty. * */ parent_timestamp?: string; /** * The branch name * */ name: string; current_state: BranchState; pending_state?: BranchState; /** * A UTC timestamp indicating when the `current_state` began * */ state_changed_at: string; /** * The logical size of the branch, in bytes * */ logical_size?: number; /** * The branch creation source * */ creation_source: string; /** * Deprecated. Use the `default` field. Whether the branch is the project's primary branch. * * * @deprecated */ primary?: boolean; /** * Whether the branch is the project's default branch * */ default: boolean; /** * Whether the branch is protected. Protected branches (and their computes) cannot be deleted, archived, or reset, and block deletion of the project. * */ protected: boolean; /** * 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. * * * @deprecated */ cpu_used_sec: number; /** * 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. * Not intended for billing or metering. For billing, use `/consumption_history/v2/branches`. * */ compute_time_seconds: number; /** * 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. * Not intended for billing or metering. For billing, use `/consumption_history/v2/branches`. * */ active_time_seconds: number; /** * Data written by this branch during the current billing period, in bytes. * Not intended for billing or metering. For billing, use `/consumption_history/v2/branches`. * */ written_data_bytes: number; /** * Total data transferred out of the branch, in bytes. Used as a consumption metric. * Not intended for billing or metering. For billing, use `/consumption_history/v2/branches`. * */ data_transfer_bytes: number; /** * A timestamp indicating when the branch was created * */ created_at: string; /** * A timestamp indicating when the branch was last updated * */ updated_at: string; /** * 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. * * Access to this feature is currently limited to participants in the Early Access Program. * */ ttl_interval_seconds?: number; /** * 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. * * Access to this feature is currently limited to participants in the Early Access Program. * */ expires_at?: string; /** * A timestamp indicating when the branch was last reset * */ last_reset_at?: string; /** * 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. * */ created_by?: { /** * Display name of the user who created the branch. */ name?: string; /** * The URL to the user's avatar image. */ image?: string; }; /** * 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. * */ init_source?: string; restore_status?: BranchRestoreStatus; /** * ID of the snapshot that was the restore source for this branch * */ restored_from?: string; /** * ID of the target branch which was replaced when this branch was restored * */ restored_as?: string; /** * A list of actions that are currently restricted for this branch and the reason why. * */ restricted_actions?: Array; recovery?: BranchRecoveryInfo; }; /** * The branch’s state, indicating if it is initializing, ready for use, or archived. * * 'init' - the branch is being created but is not available for querying. * * 'resetting' - the branch is being reset to a specific point in time or LSN and is not yet available for querying. * * 'ready' - the branch is fully operational and ready for querying. Expect normal query response times. * * 'archived' - the branch is stored in cost-effective archival Postgres storage. Expect slow query response times. * */ export type BranchState = string; /** * Could be `restored`, `finalized` or `detaching`. * A `restored` branch becomes permanently `finalized` when you call `finalizeRestoreBranch` * A `restored` or `finalized` branch may begin `detaching` as a one-time performance optimisation, after which it will continue in its original state * */ export type BranchRestoreStatus = string; /** * An action that is currently restricted for the branch and the reason why. * */ export type BranchRestrictedAction = { /** * 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. * */ name: string; /** * A human-readable explanation of why the action is restricted. * */ reason: string; }; /** * Recovery information for a deleted branch. Only present when listing deleted branches * with `include_deleted=true`. * * This is part of the Branch Recovery feature, which is in preview and not available to all users. * */ export type BranchRecoveryInfo = { /** * Timestamp when the branch was deleted * */ deleted_at: string; /** * Timestamp when the recovery window expires and the branch will be permanently deleted * */ recoverable_until: string; /** * How the branch was deleted: 'user' for manual deletion, 'ttl' for TTL expiration * */ deletion_method: 'user' | 'ttl'; }; export type BranchCreateRequestEndpointOptions = { type: EndpointType; settings?: EndpointSettingsData; autoscaling_limit_min_cu?: ComputeUnit; autoscaling_limit_max_cu?: ComputeUnit; provisioner?: Provisioner; suspend_timeout_seconds?: SuspendTimeoutSeconds; }; export type BranchAnonymizedCreateRequest = AnnotationCreateValueRequest & { branch_create?: BranchCreateRequest; /** * List of masking rules to apply to the branch. * */ masking_rules?: Array; /** * If true, automatically start anonymization after the branch is created. * Defaults to false. * */ start_anonymization?: boolean; }; export type BranchCreateRequest = { /** * 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. */ endpoints?: Array; /** * 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`. */ branch?: { /** * The `branch_id` of the parent branch. If omitted or empty, the branch will be created from the project's default branch. * */ parent_id?: string; /** * The branch name * */ name?: string; /** * A Log Sequence Number (LSN) on the parent branch. The branch will be created with data from this LSN. * */ parent_lsn?: string; /** * 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. * */ parent_timestamp?: string; /** * 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. * */ protected?: boolean; realtime?: RealtimeOptions; /** * Whether to create the branch in the archived state. When omitted, the branch is created as a normal (non-archived) branch. * */ archived?: boolean; /** * 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. */ init_source?: string; /** * 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. * * Access to this feature is currently limited to participants in the Early Access Program. * */ expires_at?: string; }; }; export type BranchUpdateRequest = { /** * Branch attributes to update. Supply only the fields you want to change, for example `name` or `protected`. */ branch: { /** * New display name for the branch. */ name?: string; /** * 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. * */ protected?: boolean; /** * 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. If this field is set to null, the expiration timestamp is removed. * * Access to this feature is currently limited to participants in the Early Access Program. * */ expires_at?: string | null; }; }; export type BranchRestoreRequest = { /** * The `branch_id` of the restore source branch. * If `source_timestamp` and `source_lsn` are omitted, the branch will be restored to head. * If `source_branch_id` is equal to the branch's id, `source_timestamp` or `source_lsn` is required. * */ source_branch_id: string; /** * A Postgres LSN (for example, `0/1A2B3C4`) on the source branch to restore from. * Mutually exclusive with `source_timestamp`. Omit both to restore to head. * */ source_lsn?: string; /** * 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. * */ source_timestamp?: string; /** * 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. * */ preserve_under_name?: string; }; export type BranchResponse = { branch: Branch; }; export type BranchSchemaResponse = { /** * Branch schema expressed as SQL DDL statements. */ sql?: string; json?: BranchSchemaJson; }; export type BranchSchemaCompareResponse = { /** * Unified diff of the SQL schema changes between the compared branches. */ diff?: string; }; export type BranchesResponse = { /** * Branches in the project. Each includes `id`, `name`, `current_state`, and `created_at`. */ branches: Array; }; export type BranchesCountResponse = { /** * Total number of branches in the project. */ count: number; }; export type MaskingRule = { /** * The name of the database containing the table to be masked * */ database_name: string; /** * The name of the schema containing the table to be masked * */ schema_name: string; /** * The name of the table containing the column to be masked * */ table_name: string; /** * The name of the column to be masked * */ column_name: string; /** * The PostgreSQL Anonymizer masking function to apply. * Can be a predefined function (e.g., 'anon.random_string(10)', 'anon.fake_email()') * or a custom function definition (e.g., 'anon.hash(column_name)') * */ masking_function?: string; /** * A literal value to set on the column when masking. * */ masking_value?: string; }; export type MaskingRulesResponse = { /** * List of masking rules for the branch * */ masking_rules: Array; }; export type MaskingRulesUpdateRequest = { /** * List of masking rules to apply to the branch. * This will replace all existing masking rules for the branch. * */ masking_rules: Array; }; export type AnonymizedBranchStatusResponse = { /** * The ID of the project this branch belongs to. */ project_id: string; /** * The ID of the anonymized branch. */ branch_id: string; /** * 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. * */ state: string; /** * A descriptive message about the current status or any errors * */ status_message?: string; /** * A timestamp indicating when the anonymized branch was created * */ created_at: string; /** * A timestamp indicating when the anonymized branch status was last updated * */ updated_at: string; /** * A timestamp indicating when the anonymized branch operation failed (if applicable) * */ failed_at?: string; last_run?: AnonymizationRunMetadata; }; /** * Metadata about the most recent anonymization attempt for the branch. */ export type AnonymizationRunMetadata = { /** * Timestamp indicating when the latest anonymization attempt started. * */ started_at?: string; /** * Timestamp indicating when the latest anonymization attempt completed. * Populated even if the attempt failed. * */ completed_at?: string; /** * UUID of the user who triggered the latest anonymization attempt. * */ triggered_by?: string; /** * Username of the user who triggered the latest anonymization attempt. * */ triggered_by_username?: string; /** * Number of columns that had masking rules applied during the attempt. * */ masked_columns?: number; }; export type ConnectionParameters = { /** * Name of the Postgres database used in the connection URI. * */ database: string; /** * Authentication password for the role, used in the connection URI. * */ password: string; /** * Postgres role used to authenticate the database connection. * */ role: string; /** * Hostname of the compute endpoint. Use `pooler_host` for the pooled connection hostname. * */ host: string; /** * 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. * */ pooler_host: string; }; export type ConnectionDetails = { /** * The connection URI is defined as specified here: [Connection URIs](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS) * The connection URI can be used to connect to a Postgres database with psql or defined in a DATABASE_URL environment variable. * When creating a branch from a parent with more than one role or database, the response body does not include a connection URI. * */ connection_uri: string; connection_parameters: ConnectionParameters; }; export type ConnectionUriResponse = { /** * The connection URI. * */ uri: string; }; export type Endpoint = { /** * The hostname of the compute endpoint. This is the hostname specified when connecting to a Neon database. * */ host: string; /** * The compute endpoint ID. Compute endpoint IDs have an `ep-` prefix. For example: `ep-little-smoke-851426` * */ id: string; /** * Optional name of the compute endpoint * */ name?: string; /** * The ID of the project this compute endpoint belongs to. */ project_id: string; /** * The ID of the branch this compute endpoint belongs to. */ branch_id: string; autoscaling_limit_min_cu: ComputeUnit; autoscaling_limit_max_cu: ComputeUnit; /** * Cloud region where the resource's Postgres compute and storage reside (for example, `aws-us-east-1`). Valid values are returned by `GET /regions`. * */ region_id: string; type: EndpointType; current_state: EndpointState; pending_state?: EndpointState; settings: EndpointSettingsData; /** * Deprecated. To use connection pooling, append `-pooler` to the endpoint ID in the connection string. * * * @deprecated */ pooler_enabled: boolean; pooler_mode: EndpointPoolerMode; /** * Whether to restrict connections to the compute endpoint. * Enabling this option schedules a suspend compute operation. * A disabled compute endpoint cannot be enabled by a connection or * console action. * */ disabled: boolean; /** * Whether to permit passwordless access to the compute endpoint * */ passwordless_access: boolean; /** * A timestamp indicating when the compute endpoint was last active * */ last_active?: string; /** * The compute endpoint creation source * */ creation_source: string; /** * A timestamp indicating when the compute endpoint was created * */ created_at: string; /** * A timestamp indicating when the compute endpoint was last updated * */ updated_at: string; /** * A timestamp indicating when the compute endpoint was last started * */ started_at?: string; /** * A timestamp indicating when the compute endpoint was last suspended * */ suspended_at?: string; /** * Deprecated. Use the `host` property instead. * */ proxy_host: string; suspend_timeout_seconds: SuspendTimeoutSeconds; provisioner: Provisioner; /** * Attached compute's release version number. * */ compute_release_version?: string; }; /** * Lifecycle state of the compute endpoint. `init`: being initialized. `active`: running and accepting connections. `idle`: suspended (scaled to zero). */ export type EndpointState = 'init' | 'active' | 'idle'; /** * Compute endpoint type. `read_write`: the primary read-write endpoint (one per branch). `read_only`: a read replica endpoint (multiple allowed per branch). */ export type EndpointType = 'read_only' | 'read_write'; /** * Deprecated. The connection pooler mode. Neon supports PgBouncer in `transaction` mode only. Removal scheduled for June 20, 2026. * * * @deprecated */ export type EndpointPoolerMode = 'transaction'; /** * Duration of inactivity in seconds after which the compute endpoint is * automatically suspended. The value `0` means use the default value. * The value `-1` means never suspend. The default value is `300` seconds (5 minutes). * The minimum value is `60` seconds (1 minute). * The maximum value is `604800` seconds (1 week). For more information, see * [Scale to zero configuration](https://neon.com/docs/manage/endpoints#scale-to-zero-configuration). * */ export type SuspendTimeoutSeconds = number; /** * A list of IP addresses that are allowed to connect to the compute endpoint. * If the list is empty or not set, all IP addresses are allowed. * If protected_branches_only is true, the list will be applied only to protected branches. * */ export type AllowedIps = { /** * A list of IP addresses that are allowed to connect to the endpoint. */ ips?: Array; /** * If true, the list will be applied only to protected branches. */ protected_branches_only?: boolean; }; /** * A maintenance window is a time period during which Neon may perform maintenance on the project's infrastructure. * During this time, the project's compute endpoints may be unavailable and existing connections can be * interrupted. * */ export type MaintenanceWindow = { /** * A list of weekdays when the maintenance window is active. * Encoded as ints, where 1 - Monday, and 7 - Sunday. * */ weekdays: Array; /** * Start time of the maintenance window, in the format of "HH:MM". Uses UTC. * */ start_time: string; /** * End time of the maintenance window, in the format of "HH:MM". Uses UTC. * */ end_time: string; }; /** * The shared libraries to preload into the project's compute instances. * */ export type PreloadLibraries = { /** * When true, the project's preload libraries include the platform default set in addition to any libraries listed in `enabled_libraries`. */ use_defaults?: boolean; /** * Names of shared preload libraries to enable for the project. */ enabled_libraries?: Array; }; export type EndpointCreateRequest = { /** * Configuration for the compute endpoint to create. */ endpoint: { /** * The ID of the branch the compute endpoint will be associated with * */ branch_id: string; /** * The region where the compute endpoint will be created. Only the project's `region_id` is permitted. * */ region_id?: string; type: EndpointType; settings?: EndpointSettingsData; autoscaling_limit_min_cu?: ComputeUnit; autoscaling_limit_max_cu?: ComputeUnit; provisioner?: Provisioner; /** * Deprecated. To enable connection pooling, append `-pooler` to the endpoint ID in the connection string. * See [How to use connection pooling](https://neon.com/docs/connect/connection-pooling#how-to-use-connection-pooling) * * * @deprecated */ pooler_enabled?: boolean; pooler_mode?: EndpointPoolerMode; /** * Whether to restrict connections to the compute endpoint. * Enabling this option schedules a suspend compute operation. * A disabled compute endpoint cannot be enabled by a connection or * console action. However, the compute endpoint is periodically * enabled by check_availability operations. * */ disabled?: boolean; /** * NOT YET IMPLEMENTED. Whether to permit passwordless access to the compute endpoint. * */ passwordless_access?: boolean; suspend_timeout_seconds?: SuspendTimeoutSeconds; /** * Optional name of the compute endpoint * */ name?: string; }; }; export type EndpointUpdateRequest = { /** * Parameters for the compute endpoint update. */ endpoint: { /** * Deprecated. The destination branch ID; must not have an existing read-write endpoint. * * * @deprecated */ branch_id?: string; autoscaling_limit_min_cu?: ComputeUnit; autoscaling_limit_max_cu?: ComputeUnit; provisioner?: Provisioner; settings?: EndpointSettingsData; /** * Deprecated. To enable connection pooling, append `-pooler` to the endpoint ID in the connection string. * See [How to use connection pooling](https://neon.com/docs/connect/connection-pooling#how-to-use-connection-pooling) * * * @deprecated */ pooler_enabled?: boolean; pooler_mode?: EndpointPoolerMode; /** * Whether to restrict connections to the compute endpoint. * Enabling this option schedules a suspend compute operation. * A disabled compute endpoint cannot be enabled by a connection or * console action. However, the compute endpoint is periodically * enabled by check_availability operations. * */ disabled?: boolean; /** * NOT YET IMPLEMENTED. Whether to permit passwordless access to the compute endpoint. * */ passwordless_access?: boolean; suspend_timeout_seconds?: SuspendTimeoutSeconds; /** * Optional name of the compute endpoint * */ name?: string; }; }; export type EndpointResponse = { endpoint: Endpoint; }; export type ConnectionUrisResponse = { /** * Connection URIs for the project. Each entry contains credentials and should be treated as sensitive. */ connection_uris: Array; }; export type ConnectionUrisOptionalResponse = { /** * Connection URIs for the compute endpoint, including credentials. */ connection_uris?: Array; }; export type VpcEndpointsResponse = { /** * List of VPC endpoints returned by the request. */ endpoints: Array; }; export type VpcEndpointsWithRegionResponse = { /** * VPC endpoints associated with the region. */ endpoints: Array; }; export type VpcEndpoint = { /** * Cloud provider identifier for the VPC endpoint. */ vpc_endpoint_id: string; /** * A descriptive label for the VPC endpoint */ label: string; }; export type VpcEndpointWithRegion = VpcEndpoint & { /** * The region where the VPC endpoint is located */ region_id: string; }; export type VpcEndpointDetails = { /** * Cloud provider identifier for the VPC endpoint. */ vpc_endpoint_id: string; /** * A descriptive label for the VPC endpoint */ label: string; /** * 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. * */ state: string; /** * The number of projects that are restricted to use this VPC endpoint. * */ num_restricted_projects: number; /** * A list of example projects that are restricted to use this VPC endpoint. * There are at most 3 projects in the list, even if more projects are restricted. * */ example_restricted_projects: Array; }; export type VpcEndpointAssignment = { /** * Human-readable name for the VPC endpoint assignment, used to identify it within the organization. */ label: string; }; export type EndpointsResponse = { /** * Compute endpoints in the project. Each includes `id`, `branch_id`, `host`, and `type`. */ endpoints: Array; }; export type EndpointsOptionalResponse = { /** * Compute endpoints associated with the project. */ endpoints?: Array; }; export type RealtimeOptions = { /** * The browser origins allowed to connect, each `http` or `https` with a host and optional port * and no path. An empty list, or `*` alone, allows any origin. Omitted keeps the current or * inherited value. * */ allowed_origins?: Array; }; export type Realtime = { /** * Whether Realtime is enabled for the branch. */ enabled: boolean; /** * Whether a provisioning, settings, rotation or deprovisioning change is still being applied. */ pending: boolean; invocation_url?: string; revision?: number; allowed_origins?: Array; }; export type RealtimeSecret = { /** * The key the application backend issues Realtime tokens with, `nrt_live_1` followed by the unpadded base64url 32-byte AES-256-GCM key. */ secret: string; /** * Whether a change is still being applied. After a rotation, the secret changes when this becomes false. */ pending: boolean; }; export type Role = { /** * The ID of the branch this role belongs to. */ branch_id: string; /** * Postgres role name within the branch. * */ name: string; /** * The role password * */ password?: string; /** * Whether or not the role is system-protected * */ protected?: boolean; /** * Authentication method configured for this role: `password`, `oauth`, `oidc`, or `no_login`. * */ authentication_method?: string; /** * A timestamp indicating when the role was created * */ created_at: string; /** * A timestamp indicating when the role was last updated * */ updated_at: string; }; export type RoleCreateRequest = { /** * Properties of the role to create. */ role: { /** * The role name. Cannot exceed 63 bytes in length. * */ name: string; /** * Whether to create a role that cannot login. * */ no_login?: boolean; }; }; export type RoleResponse = { role: Role; }; export type JwksResponse = { jwks: Jwks; }; export type RolesResponse = { /** * Roles belonging to the branch. Each role includes fields such as `branch_id`, `name`, `protected`, `created_at`, and `updated_at`. * */ roles: Array; }; export type RolePasswordResponse = { /** * The role password * */ password: string; }; export type PaymentSourceBankCard = { /** * Last 4 digits of the card. * */ last4: string; /** * Card network reported by the payment processor. Set to `unknown` when the network cannot be determined. * */ brand?: 'amex' | 'diners' | 'discover' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa'; /** * Credit card expiration month * */ exp_month?: number; /** * Credit card expiration year * */ exp_year?: number; }; export type PaymentSource = { /** * Type of payment source. E.g. "card". * */ type: string; card?: PaymentSourceBankCard; }; export type BillingAccount = { state: BillingAccountState; payment_source: PaymentSource; subscription_type: BillingSubscriptionType; payment_method: BillingPaymentMethod; /** * Timestamp of the last quota reset. Set to the account creation time when the account is first created. * */ quota_reset_at_last: string; /** * The full name of the individual or entity that owns the billing account. This name appears on invoices. */ name: string; /** * Billing email, to receive emails related to invoices and subscriptions. * */ email: string; /** * Billing address city. * */ address_city: string; /** * Billing address country code defined by ISO 3166-1 alpha-2. * */ address_country: string; /** * Billing address country name. * */ address_country_name?: string; /** * Billing address line 1. * */ address_line1: string; /** * Billing address line 2. * */ address_line2: string; /** * Billing address postal code. * */ address_postal_code: string; /** * Billing address state or region. * */ address_state: string; /** * Orb user portal url * */ orb_portal_url?: string; /** * The tax identification number for the billing account, displayed on invoices. * */ tax_id?: string; /** * The type of the tax identification number based on the country. * */ tax_id_type?: string; plan_details?: PlanDetails; /** * Monthly spending cap in cents for V3 paid plans. When set, * notifications are sent at 80% and 100% of this limit. `null` * means no limit is configured. * */ spending_limit_cents?: number | null; }; export type SpendingLimitUpdateRequest = { /** * Monthly spending cap in cents. Must be positive. To remove a * previously configured limit, send a DELETE request to the * spending_limit endpoint — `0` and `null` are rejected here. * The cap is alert-only: notifications fire at 80% and 100%, but * computes are not suspended. Setting a cap below the period's * already-accrued spend is permitted and will trigger the * over-limit notification on the next worker run. * */ spending_limit_cents: number; }; export type SpendingLimitResponse = { /** * Monthly spending cap in cents. `null` indicates that no limit * is currently configured. * */ spending_limit_cents: number | null; }; /** * State of the billing account. * */ export type BillingAccountState = 'UNKNOWN' | 'active' | 'suspended' | 'deactivated' | 'deleted'; /** * Type of subscription to Neon Cloud. * Notice that for users without billing account this will be "UNKNOWN" * */ export type BillingSubscriptionType = 'UNKNOWN' | 'direct_sales' | 'direct_sales_v3' | 'aws_marketplace' | 'free_v2' | 'free_v3' | 'build' | 'launch' | 'launch_v3' | 'scale' | 'scale_v3' | 'business' | 'vercel_pg_legacy'; /** * Indicates whether and how an account makes payments. * */ export type BillingPaymentMethod = 'UNKNOWN' | 'none' | 'stripe' | 'direct_payment' | 'aws_mp' | 'azure_mp' | 'vercel_mp' | 'staff' | 'trial' | 'sponsorship' | 'shared_payment_token'; export type Database = { /** * The database ID * */ id: number; /** * The ID of the branch this database belongs to. */ branch_id: string; /** * The database name * */ name: string; /** * The name of role that owns the database * */ owner_name: string; /** * A timestamp indicating when the database was created * */ created_at: string; /** * A timestamp indicating when the database was last updated * */ updated_at: string; }; export type DatabaseCreateRequest = { /** * Configuration for the new Postgres database. */ database: { /** * Name of the database to create. * */ name: string; /** * The name of the role that owns the database * */ owner_name: string; }; }; export type DatabaseUpdateRequest = { /** * Properties to update on the database. */ database: { /** * Name of the database to update. * */ name?: string; /** * The name of the role that owns the database * */ owner_name?: string; }; }; export type DatabaseResponse = { database: Database; }; export type DatabasesResponse = { /** * Databases on the branch. Each includes `id`, `name`, `owner_name`, and `created_at`. */ databases: Array; }; export type Invitation = { /** * The invitation ID. */ id: string; /** * Email of the invited user */ email: string; /** * Organization id as it is stored in Neon */ org_id: string; /** * UUID for the user_id who extended the invitation */ invited_by: string; /** * Timestamp when the invitation was created */ invited_at: string; role: MemberRole; }; /** * 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. */ export type MemberRole = 'admin' | 'member' | 'editor' | 'viewer' | 'collaborator'; export type Member = { /** * The organization member's ID. */ id: string; /** * The Neon user ID. */ user_id: string; /** * The Neon organization ID. Returned as `id` from `GET /users/me/organizations`. */ org_id: string; role: MemberRole; /** * Timestamp when the user joined the organization. */ joined_at?: string; }; export type MemberUserInfo = { /** * Email address of the organization member's user account. */ email: string; /** * Whether the member has MFA (TOTP) enabled */ has_mfa?: boolean; /** * Timestamp of when the user account was deactivated. * Absent for active users. When present, the UI should render a * "Deactivated" badge inline next to the member. * */ deactivated_at?: string; }; export type MemberWithUser = { member: Member; user: MemberUserInfo; }; export type Organization = { /** * The Neon organization ID. Use as the `org_id` path parameter in other endpoints. */ id: string; /** * Human-readable display name of the organization. */ name: string; /** * URL-safe identifier for the organization, used in API paths. Distinct from the display name. */ handle: string; /** * Billing plan for the organization, for example `free`, `launch`, or `scale`. */ plan: string; /** * A timestamp indicting when the organization was created * */ created_at: string; /** * Organizations created via the Console or the API are managed by `console`. * Organizations created by other methods can't be deleted via the Console or the API. * */ managed_by: string; /** * A timestamp indicating when the organization was updated * */ updated_at: string; /** * If true, allow account to mark projects as HIPAA */ allow_hipaa_projects?: boolean; /** * If true, all members must have MFA enabled to access this organization */ require_mfa?: boolean; }; export type OrganizationsResponse = { /** * Organizations returned by the request. Each includes `id`, `name`, `handle`, and `plan`. */ organizations: Array; }; export type OrganizationInvitationsResponse = { /** * List of pending invitations for the organization. */ invitations: Array; }; export type OrganizationInviteCreateRequest = { /** * Email address of the person to invite to the organization. */ email: string; role: MemberRole; }; export type OrganizationInvitesCreateRequest = { /** * Invitations to create for the organization. */ invitations: Array; }; export type OrganizationMemberUpdateRequest = { role: MemberRole; }; export type OrganizationMembersResponse = { /** * Members of the organization, each combining membership details (role, status) with the associated user's identity. */ members: Array; }; export type ActiveRegionsResponse = { /** * The list of active regions */ regions: Array; }; export type RegionResponse = { /** * Cloud region where the resource's Postgres compute and storage reside (for example, `aws-us-east-1`). Valid values are returned by `GET /regions`. */ region_id: string; /** * A short description of the region. */ name: string; /** * True if this region is selected by default when no region is specified during project creation. */ default: boolean; /** * The geographical latitude (approximate) for the region. Empty if unknown. */ geo_lat: string; /** * The geographical longitude (approximate) for the region. Empty if unknown. */ geo_long: string; }; export type CurrentUserAuthAccount = { /** * Email address associated with this auth account. */ email: string; /** * URL of the user's profile picture as provided by the identity provider. */ image: string; /** * Deprecated. Use the `email` field. * * * @deprecated */ login: string; /** * Display name of the account as provided by the identity provider. */ name: string; provider: IdentityProviderId; }; export type CurrentUserInfoResponse = { /** * Control plane observes active endpoints of a user this amount of wall-clock time. * */ active_seconds_limit: number; billing_account?: BillingAccount; /** * Authentication provider accounts linked to the current user. */ auth_accounts: Array; /** * Email address of the authenticated user. */ email: string; /** * The Neon user ID. */ id: string; /** * URL of the user's profile avatar image. */ image: string; /** * Deprecated. Use the `email` field. * * * @deprecated */ login: string; /** * First name of the current user. */ name: string; /** * Last name of the current user. */ last_name: string; /** * Maximum number of projects the account is allowed to create under the current plan. */ projects_limit: number; /** * Maximum number of branches allowed for the account under the current plan. */ branches_limit: number; /** * The maximum autoscaling limit in Compute Units. * A value of 0 indicates no limit is configured. * */ max_autoscaling_limit: number; /** * Maximum Postgres compute time, in seconds, allowed under the account's current plan. */ compute_seconds_limit?: number; /** * Current billing plan for the user's account. */ plan: string; }; export type AuthDetailsResponse = { /** * The ID of the account associated with this authentication record. */ account_id: string; /** * Authentication method used for the request: * - `keycloak`: Keycloak identity provider authentication. * - `session_cookie`: Browser session cookie authentication. * - `api_key_user`: API key scoped to a user account. * - `api_key_org`: API key scoped to an organization. * - `oauth`: OAuth-based authentication. * */ auth_method: 'keycloak' | 'session_cookie' | 'api_key_user' | 'api_key_org' | 'oauth'; auth_data?: string; }; export type TransferProjectsToOrganizationRequest = { /** * The destination organization identifier */ destination_org_id: string; /** * The list of projects ids to transfer. Maximum of 400 project ids */ project_ids: Array; }; /** * Identity provider id from keycloak */ export type IdentityProviderId = 'github' | 'google' | 'hasura' | 'microsoft' | 'microsoftv2' | 'vercelmp' | 'keycloak'; /** * A collection of settings for a compute endpoint */ export type EndpointSettingsData = { pg_settings?: PgSettingsData; pgbouncer_settings?: PgbouncerSettingsData; preload_libraries?: PreloadLibraries; }; /** * Per-project consumption quotas. If a quota is exceeded, all active computes * are automatically suspended and cannot be started via API calls or incoming connections. * * The exception is `logical_size_bytes`, which is enforced per branch. * If a branch exceeds its `logical_size_bytes` quota, computes can still be started, * but write operations will fail—allowing data to be deleted to free up space. * Computes on other branches are not affected. * * Setting `logical_size_bytes` overrides any lower value set by the `neon.max_cluster_size` Postgres setting. * * Quotas are enforced using per-project consumption metrics with the same names. * These metrics reset at the start of each billing period. `logical_size_bytes` * is also an exception—it reflects the total data stored in a branch and does not reset. * * A zero or empty quota value means “unlimited.” * */ export type ProjectQuota = { /** * The total amount of wall-clock time allowed to be spent by the project's compute endpoints. * */ active_time_seconds?: number; /** * The total amount of CPU seconds allowed to be spent by the project's compute endpoints. * */ compute_time_seconds?: number; /** * Total amount of data written to all of a project's branches. * */ written_data_bytes?: number; /** * Total amount of data transferred from all of a project's branches using the proxy. * */ data_transfer_bytes?: number; /** * Limit on the logical size of every project's branch. * * If a branch exceeds its `logical_size_bytes` quota, computes can still be started, * but write operations will fail—allowing data to be deleted to free up space. * Computes on other branches are not affected. * * Setting `logical_size_bytes` overrides any lower value set by the `neon.max_cluster_size` Postgres setting. * */ logical_size_bytes?: number; }; /** * A collection of settings for a Neon endpoint */ export type DefaultEndpointSettings = { pg_settings?: PgSettingsData; pgbouncer_settings?: PgbouncerSettingsData; autoscaling_limit_min_cu?: ComputeUnit; autoscaling_limit_max_cu?: ComputeUnit; suspend_timeout_seconds?: SuspendTimeoutSeconds; }; /** * A raw representation of Postgres settings */ export type PgSettingsData = { [key: string]: string; }; /** * Deprecated. A raw representation of PgBouncer settings. Removal scheduled for June 20, 2026. * * * @deprecated */ export type PgbouncerSettingsData = { [key: string]: string; }; /** * 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. */ export type PgVersion = number; export type ProjectOwnerData = { /** * Email address of the project owner. */ email: string; /** * Display name of the project owner. */ name: string; /** * Maximum number of branches the owner is allowed to create across their projects. */ branches_limit: number; subscription_type: BillingSubscriptionType; }; export type LimitsUnsatisfiedResponse = { /** * Plan limits that were not satisfied by the request. */ limits: Array<{ /** * Identifier of the unsatisfied limit. Possible values are: * - subscription_type * - projects_count * - project_region * */ name: string; /** * Required value for the limit named by `name`. Compare with `actual` to determine the shortfall. */ expected: string; /** * Current value of the named limit, which does not satisfy the required `expected` value. */ actual: string; }>; }; export type ProjectsWithIntegrationResponse = { /** * Projects that have the requested integration, each including the project details and associated integration metadata. */ projects: Array<{ /** * The Neon project ID. Use as the `project_id` path parameter in other endpoints. */ id: string; /** * Name of the external integration associated with the project. */ integration: string; }>; }; /** * Configuration settings for the Neon Data API */ export type DataApiSettings = { /** * Enable aggregates feature */ db_aggregates_enabled?: boolean; /** * Database role to use for anonymous requests */ db_anon_role?: string; /** * Extra schemas to add to the search path */ db_extra_search_path?: string; /** * Hard limit on the number of rows returned in a single Data API response. No limit when unset. */ db_max_rows?: number; /** * List of schemas to expose via the API. Default: ["public"] */ db_schemas?: Array; /** * JWT claim key to use for role extraction */ jwt_role_claim_key?: string; /** * Maximum lifetime of the Data API's JWT cache, in seconds. */ jwt_cache_max_lifetime?: number; /** * OpenAPI specification mode (ignore-privileges, disabled) */ openapi_mode?: string; /** * CORS allowed origins */ server_cors_allowed_origins?: string; /** * When enabled, the Data API adds `Server-Timing` headers to each response showing database execution and internal processing time. Default: disabled. */ server_timing_enabled?: boolean; }; /** * Create Neon Data API */ export type DataApiCreateRequest = { /** * 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). */ auth_provider?: 'neon_auth' | 'external'; /** * 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. */ jwks_url?: string; /** * Display name for the authentication provider. Accepted values include "Clerk", "Stytch", and "Auth0", but any non-empty string is valid. Optional field. */ provider_name?: string; /** * 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. * */ jwt_audience?: string; /** * Grant all permissions to the tables in the public schema to authenticated users */ add_default_grants?: boolean; /** * Skip creating the auth schema and RLS functions */ skip_auth_schema?: boolean; settings?: DataApiSettings; }; /** * Neon Data API created successfully */ export type DataApiCreateResponse = { /** * URL of the created Data API endpoint. */ url: string; }; /** * Neon Data API response */ export type DataApiReponse = { /** * The URL of the Neon Data API */ url: string; /** * The status of the Neon Data API deployment */ status: string; /** * Configuration settings for the Data API (SubZero only) */ settings?: DataApiSettings | null; /** * List of available database schemas (SubZero only) */ available_schemas?: Array | null; /** * When `settings` and `available_schemas` were read from the database. While the * compute is suspended they are served from that read, so a change made directly in * the database since then shows up in the first response served while the compute is * active. * */ observed_at?: string; }; /** * Update Neon Data API */ export type DataApiUpdateRequest = { settings?: DataApiSettings; }; /** * 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. */ export type NeonAuthSupportedAuthProvider = 'mock' | 'stack' | 'better_auth'; export type NeonAuthProviderProjectOwnedBy = 'user' | 'neon'; export type NeonAuthProviderProjectTransferStatus = 'initiated' | 'finished'; export type NeonAuthRedirectUriWhitelistDomain = { /** * Allowed redirect URI domain for the auth provider. */ domain: string; auth_provider: NeonAuthSupportedAuthProvider; }; export type NeonAuthRedirectUriWhitelistResponse = { /** * Domains permitted as redirect URI targets in the whitelist. */ domains: Array; }; export type NeonAuthAddDomainToRedirectUriWhitelistRequest = { /** * URI to add to the redirect URI allowlist for the auth provider. */ domain: string; auth_provider: NeonAuthSupportedAuthProvider; }; export type NeonAuthDeleteDomainFromRedirectUriWhitelistRequest = { auth_provider: NeonAuthSupportedAuthProvider; /** * Domain names to remove from the redirect URI whitelist for the specified auth provider. */ domains: Array; }; export type NeonAuthDeleteDomainFromRedirectUriWhitelistItem = { /** * URI to remove from the redirect URI whitelist. */ domain: string; }; export type NeonAuthCreateIntegrationRequest = { auth_provider: NeonAuthSupportedAuthProvider; /** * The Neon project ID. Returned as `id` from `GET /projects`. */ project_id: string; /** * The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`. */ branch_id: string; /** * Name of the database to associate with the Neon Auth integration. When omitted, the integration uses the project's default database. */ database_name?: string; /** * Deprecated. The database role for the auth integration. Omit this field; it is ignored. * * @deprecated */ role_name?: string; }; export type EnableNeonAuthIntegrationRequest = { auth_provider: NeonAuthSupportedAuthProvider; /** * Name of the database to enable Neon Auth on. When omitted, the integration uses the project's default database. */ database_name?: string; }; export type NeonAuthCreateIntegrationResponse = { auth_provider: NeonAuthSupportedAuthProvider; /** * Project ID assigned by the auth provider for this integration. */ auth_provider_project_id: string; /** * Publishable SDK key from the auth provider. Populated only for Stack Auth (deprecated); empty for Better Auth. */ pub_client_key: string; /** * Secret server-side SDK key from the auth provider. Populated only for Stack Auth (deprecated); empty for Better Auth. Treat as a credential. */ secret_server_key: string; /** * URL of the provider's JWKS endpoint used to verify JWTs. */ jwks_url: string; /** * Postgres schema containing the auth integration tables. Defaults to `neon_auth`. */ schema_name: string; /** * Postgres table in the integration schema where synced user records are stored. */ table_name: string; /** * Base URL of the Neon Auth service for this integration. Set as the NEON_AUTH_BASE_URL environment variable in your application. */ base_url?: string; }; export type NeonAuthCreateAuthProviderSdkKeysRequest = { /** * The Neon project ID. Returned as `id` from `GET /projects`. */ project_id: string; auth_provider: NeonAuthSupportedAuthProvider; }; export type NeonAuthCreateNewUserRequest = { /** * The Neon project ID. Returned as `id` from `GET /projects`. */ project_id: string; auth_provider: NeonAuthSupportedAuthProvider; /** * Email address of the new user. */ email: string; /** * Display name for the new user. When omitted, the created user has no display name. */ name?: string; }; export type CreateBranchNeonAuthNewUserRequest = { /** * Email address of the new Neon Auth user to create. */ email: string; /** * Display name for the new user. Optional. Pair with the required email field when creating a new user. */ name?: string; }; export type NeonAuthCreateNewUserResponse = { /** * ID of newly created user */ id: string; }; export type UpdateNeonAuthUserRoleRequest = { /** * 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. */ roles: Array; }; export type UpdateNeonAuthUserRoleResponse = { /** * ID of the updated user */ id: string; }; export type NeonAuthAllowLocalhostResponse = { /** * Whether to allow localhost connections */ allow_localhost: boolean; }; export type UpdateNeonAuthAllowLocalhostRequest = { /** * Whether to allow localhost connections */ allow_localhost: boolean; }; export type NeonAuthOrganizationConfig = { /** * Whether the organization plugin is enabled. */ enabled: boolean; /** * Maximum organizations a user can belong to (created or joined). At the limit, the user cannot create or join more. */ organization_limit: number; /** * Maximum number of members per organization. */ membership_limit: number; /** * Role of the organization's creator. `owner`: full control, including deleting the org and transferring ownership. `admin`: manage members and settings only. */ creator_role: 'admin' | 'owner'; /** * Whether to send invitation emails when inviting members to an organization. */ send_invitation_email: boolean; }; export type NeonAuthOrganizationConfigUpdate = { /** * Controls whether the organization plugin is active for the organization. */ enabled?: boolean; /** * Maximum organizations a user can belong to (created or joined). At the limit, the user cannot create or join more. */ organization_limit?: number; /** * Maximum members per organization. */ membership_limit?: number; /** * Role of the organization's creator. `owner`: full control, including deleting the org and transferring ownership. `admin`: manage members and settings only. */ creator_role?: 'admin' | 'owner'; /** * When true, invited users receive an email containing an accept link. Requires that the invited user has a verified email address. */ send_invitation_email?: boolean; }; export type NeonAuthMagicLinkConfig = { /** * Whether the magic link plugin is enabled. */ enabled: boolean; /** * Minutes until the magic link expires. */ expires_in: number; /** * Whether to disable sign-up via magic link. */ disable_sign_up: boolean; }; export type NeonAuthMagicLinkConfigUpdate = { /** * Whether to enable the magic link plugin. */ enabled?: boolean; /** * Minutes until the magic link expires. */ expires_in?: number; /** * When true, sign-up via magic link is disabled. */ disable_sign_up?: boolean; }; export type NeonAuthPhoneNumberConfig = { /** * Whether the phone number plugin is enabled. */ enabled: boolean; /** * Time in seconds before the OTP expires */ otp_expires_in?: number; }; export type NeonAuthPhoneNumberConfigUpdate = { /** * Whether the phone number plugin is enabled. */ enabled?: boolean; /** * Time in seconds before the OTP expires */ otp_expires_in?: number; }; export type NeonAuthOAuthProviderResource = { /** * Absolute URL identifying a protected resource. Issued access tokens carry it as their audience. */ identifier: string; }; export type NeonAuthOAuthProviderMcp = { /** * The MCP server URL that MCP clients (Client ID Metadata Document and dynamically registered) are linked to. Required for either to be accepted. */ resource?: string; /** * Legacy: whether MCP clients may register themselves via dynamic client registration (RFC 7591). Deprecated in favor of Client ID Metadata Documents (CIMD), which are controlled by `client_id_metadata_documents`. Defaults to false, and takes effect only when an MCP resource is configured; reads report false otherwise. When false, only CIMD clients and clients created through the OAuth clients API can be used, and they can still be linked to the MCP resource. */ dynamic_registration?: boolean; /** * Whether MCP clients may identify themselves with an https Client ID Metadata Document (CIMD) URL. Recommended over dynamic registration. When false, new CIMD clients are rejected and existing CIMD clients fail closed. */ client_id_metadata_documents?: boolean; }; export type NeonAuthOAuthProviderMcpUpdate = { /** * The MCP server URL that MCP clients (Client ID Metadata Document and dynamically registered) are linked to. Required for either to be accepted. */ resource: string; /** * Whether MCP clients may register themselves via dynamic client registration (RFC 7591). When omitted, the stored value is kept. */ dynamic_registration?: boolean; /** * Whether MCP clients may identify themselves with an https Client ID Metadata Document (CIMD) URL. When omitted, the stored value is kept. */ client_id_metadata_documents?: boolean; }; export type NeonAuthOAuthProviderConfig = { /** * Whether the OAuth provider plugin is enabled. */ enabled: boolean; /** * URL of the page that authorization requests redirect to for sign-in. */ login_page?: string; /** * URL of the page that authorization requests redirect to for consent. */ consent_page?: string; mcp?: NeonAuthOAuthProviderMcp; /** * Protected resources that clients can be linked to. */ resources?: Array; }; export type NeonAuthOAuthProviderConfigUpdate = { /** * Whether the OAuth provider plugin is enabled. */ enabled?: boolean; /** * URL of the page that authorization requests redirect to for sign-in. */ login_page?: string; /** * URL of the page that authorization requests redirect to for consent. */ consent_page?: string; mcp?: NeonAuthOAuthProviderMcpUpdate; /** * Protected resources that clients can be linked to. When provided, replaces the stored list. */ resources?: Array; }; /** * Confidential clients authenticate with a client secret. Public clients have no secret. */ export type NeonAuthOAuthClientType = 'confidential' | 'public'; export type NeonAuthOAuthClient = { /** * The OAuth client ID. */ client_id: string; /** * Display name of the client. */ name: string; type: NeonAuthOAuthClientType; /** * Redirect URIs the client may use. */ redirect_uris: Array; /** * Identifiers of the protected resources the client is linked to. */ resources: Array; /** * Whether users are not asked for consent when authorizing this client. */ skip_consent: boolean; /** * Whether the client is disabled. */ disabled: boolean; /** * When the client was created. */ created_at?: string; }; export type NeonAuthOAuthClientCreated = NeonAuthOAuthClient & { /** * The client secret. Returned only for confidential clients and only in this response. */ client_secret?: string; }; export type ListNeonAuthOAuthClientsResponse = { /** * OAuth clients registered for the branch. */ clients: Array; }; export type NeonAuthOAuthClientCreateRequest = { /** * Display name of the client. */ name: string; /** * Redirect URIs the client may use. Must be https, or http on loopback hosts when localhost is allowed. */ redirect_uris: Array; type: NeonAuthOAuthClientType; /** * Identifiers of the protected resources to link the client to. Each must be configured on the OAuth provider plugin. */ resources: Array; /** * Whether to skip the consent prompt for this client. */ skip_consent?: boolean; }; /** * At least one field must be provided. */ export type NeonAuthOAuthClientUpdateRequest = { /** * Display name of the client. */ name?: string; /** * Redirect URIs the client may use. When provided, replaces the stored list. */ redirect_uris?: Array; /** * Whether to skip the consent prompt for this client. */ skip_consent?: boolean; /** * Whether the client is disabled. */ disabled?: boolean; /** * Identifiers of the protected resources to link the client to. When provided, replaces the stored list. */ resources?: Array; }; export type NeonAuthOAuthClientSecret = { /** * The OAuth client ID. */ client_id: string; /** * The new client secret. Shown only once. */ client_secret: string; }; export type NeonAuthTransferAuthProviderProjectRequest = { /** * The Neon project ID. Returned as `id` from `GET /projects`. */ project_id: string; auth_provider: NeonAuthSupportedAuthProvider; }; export type NeonAuthTransferAuthProviderProjectResponse = { /** * URL for completing the process of ownership transfer */ url: string; }; export type ListNeonAuthIntegrationsResponse = { /** * Neon Auth integrations configured for the project. */ data: Array; }; export type ListNeonAuthOauthProvidersResponse = { /** * OAuth providers configured for Neon Auth on the project. */ providers: Array; }; /** * Aggregated plugin configurations for Neon Auth */ export type NeonAuthPluginConfigs = { organization?: NeonAuthOrganizationConfig; magic_link?: NeonAuthMagicLinkConfig; phone_number?: NeonAuthPhoneNumberConfig; oauth_provider?: NeonAuthOAuthProviderConfig; email_provider?: NeonAuthEmailServerConfigResponse; email_and_password?: NeonAuthEmailAndPasswordConfig; /** * OAuth provider configurations enabled for this auth setup. */ oauth_providers?: Array; /** * Permits authentication requests from localhost origins when true. Intended for local development; disable in production environments. */ allow_localhost?: boolean; }; export type NeonAuthWebhookConfig = { /** * Whether the webhook is active. */ enabled: boolean; /** * Destination URL that receives webhook event payloads. */ webhook_url?: string; /** * Event types that trigger this webhook. Covers user lifecycle, email/OTP delivery, organization invitations, and phone verification events; see the enum for exact values. */ enabled_events?: Array<'user.before_create' | 'user.created' | 'send.otp' | 'send.magic_link' | 'organization.invitation.created' | 'organization.invitation.accepted' | 'phone_number.verified'>; /** * Maximum time, in seconds, to wait for a response from the webhook endpoint. */ timeout_seconds?: number; }; export type NeonAuthOauthProvider = { id: NeonAuthOauthProviderId; type: NeonAuthOauthProviderType; /** * Public identifier for the OAuth application, issued by the provider when the application is registered. */ client_id?: string; /** * OAuth client secret for the provider. */ client_secret?: string; }; export type NeonAuthOauthProviderId = 'google' | 'github' | 'microsoft' | 'vercel'; export type NeonAuthOauthProviderType = 'standard' | 'shared'; export type NeonAuthAddOAuthProviderRequest = { id: NeonAuthOauthProviderId; /** * The client ID issued by the OAuth provider for your application. Used to identify the application during the OAuth flow. */ client_id?: string; /** * OAuth client secret for the provider. */ client_secret?: string; /** * Tenant ID for the Microsoft OAuth provider. Only relevant when the OAuth provider is Microsoft; omit or leave blank for other providers. */ microsoft_tenant_id?: string; }; export type NeonAuthUpdateOAuthProviderRequest = { /** * The OAuth client ID registered with the provider. Omit to keep the currently configured value. */ client_id?: string; /** * OAuth client secret for the provider. Omit to leave the existing secret unchanged. */ client_secret?: string; /** * 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. */ microsoft_tenant_id?: string; }; export type SharedEmailServer = { /** * Email address used as the sender for outgoing messages from this shared email server. */ sender_email?: string; /** * Display name shown as the sender in outgoing emails. */ sender_name?: string; }; export type StandardEmailServer = { /** * Hostname of the email server. */ host?: string; /** * TCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission). */ port?: number; /** * Username for authenticating with the SMTP server. */ username?: string; /** * Password for authenticating with the SMTP server. */ password?: string; /** * Email address used as the From address on outgoing auth emails. */ sender_email?: string; /** * Display name shown as the sender in outgoing emails. */ sender_name?: string; }; export type StandardEmailServerResponse = { /** * Hostname of the email server. */ host: string; /** * TCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission). */ port: number; /** * Username for authenticating with the SMTP server. */ username: string; /** * 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. */ password: string; /** * Email address used as the From address on outgoing auth emails. */ sender_email: string; /** * Display name shown as the sender in outgoing emails. */ sender_name: string; }; export type NeonAuthEmailServerConfig = ({ type: 'standard'; } & StandardEmailServer) | ({ type: 'shared'; } & SharedEmailServer); export type NeonAuthEmailServerConfigResponse = ({ type: 'standard'; } & StandardEmailServerResponse) | ({ type: 'shared'; } & SharedEmailServer); export type SendNeonAuthTestEmailRequest = { /** * Hostname of the email server. */ host: string; /** * TCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission). */ port: number; /** * Username for authenticating with the SMTP server. */ username: string; /** * Password for authenticating with the SMTP server. */ password: string; /** * Email address used as the From address on outgoing auth emails. */ sender_email: string; /** * Display name shown as the sender in outgoing emails. */ sender_name: string; /** * The email address to send the test email to. */ recipient_email: string; }; /** * Request to test the branch's saved email provider. Only the recipient is supplied; the stored * SMTP settings and password are used server-side. * */ export type SendNeonAuthEmailProviderTestRequest = { /** * The email address to send the test email to. */ recipient_email: string; }; export type SendNeonAuthTestEmailResponse = { /** * Whether the test email was sent successfully. */ success: boolean; /** * The error message from the email server. */ error_message?: string; }; /** * The email verification method to use. * - `link`: Sends a verification link via email * - `otp`: Sends a one-time password (OTP) via email * */ export type NeonAuthEmailVerificationMethod = 'link' | 'otp'; export type NeonAuthEmailAndPasswordConfig = { /** * Whether email and password authentication is enabled */ enabled: boolean; email_verification_method: NeonAuthEmailVerificationMethod; /** * Whether email verification is required before users can sign in */ require_email_verification: boolean; /** * Whether users are automatically signed in after verifying their email */ auto_sign_in_after_verification: boolean; /** * Whether to send a verification email when users sign up */ send_verification_email_on_sign_up: boolean; /** * Whether to send a verification email when users sign in */ send_verification_email_on_sign_in: boolean; /** * Whether to disable new user sign ups */ disable_sign_up: boolean; }; export type NeonAuthEmailAndPasswordConfigUpdate = { /** * Controls whether email and password authentication is enabled for this project. When omitted from an update request, the current value is unchanged. */ enabled?: boolean; email_verification_method?: NeonAuthEmailVerificationMethod; /** * 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. */ require_email_verification?: boolean; /** * Whether users are automatically signed in after verifying their email */ auto_sign_in_after_verification?: boolean; /** * Whether to send a verification email when users sign up. */ send_verification_email_on_sign_up?: boolean; /** * Whether to send a verification email when a user with an unverified email signs in. */ send_verification_email_on_sign_in?: boolean; /** * Whether to disable new user sign ups. When omitted, the current setting is not changed. */ disable_sign_up?: boolean; }; export type NeonAuthIntegration = { auth_provider: NeonAuthSupportedAuthProvider; /** * Project identifier assigned by the auth provider for this integration. */ auth_provider_project_id: string; /** * The Neon branch ID. Returned as `id` from `GET /projects/{project_id}/branches`. */ branch_id: string; /** * Name of the database used by the Neon Auth integration. */ db_name: string; /** * Timestamp when the Neon Auth integration was created, in RFC 3339 format (UTC). */ created_at: string; owned_by: NeonAuthProviderProjectOwnedBy; transfer_status?: NeonAuthProviderProjectTransferStatus; /** * URL of the provider's JWKS endpoint used to verify JWTs. */ jwks_url: string; /** * Base URL of the Neon Auth service endpoint for this integration. Injected into the project environment as `NEON_AUTH_BASE_URL`. */ base_url?: string; /** * Application name shown in auth emails and communications. Defaults to the project name. */ name?: string; }; export type NeonAuthConfigUpdate = { /** * The application name used in auth emails and communications. */ name: string; }; export type NeonAuthConfigResponse = { /** * The application name used in auth emails and communications. */ name: string; }; export type GeneralError = { /** * Unique identifier for the request, useful for debugging. * You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically. * */ request_id?: string; code: ErrorCode; /** * Error message */ message: string; }; export type ErrorCode = string; export type BranchOperations = BranchResponse & OperationsResponse; export type BranchRecoverResponse = BranchResponse & EndpointsOptionalResponse; export type EndpointOperations = EndpointResponse & OperationsResponse; export type DatabaseOperations = DatabaseResponse & OperationsResponse; export type RoleOperations = RoleResponse & OperationsResponse; export type JwksCreationOperation = JwksResponse & OperationsResponse; export type AnnotationData = { object: AnnotationObjectData; value: AnnotationValueData; /** * Timestamp when the annotation was created, in RFC 3339 format (UTC). */ created_at?: string; /** * Timestamp of the most recent update to the annotation, in RFC 3339 format (UTC). */ updated_at?: string; }; /** * A free-form map of string key-value pairs for attaching metadata to a resource (for example, a git commit reference). Maximum 50 entries. */ export type AnnotationValueData = { [key: string]: string; }; export type AnnotationObjectData = { /** * Kind of resource the annotation is attached to, for example "branch" or "endpoint". */ type: string; /** * The annotated object's ID. */ id: string; }; export type AnnotationCreateValueRequest = { annotation_value?: AnnotationValueData; }; export type AnnotationResponse = { annotation: AnnotationData; }; export type AnnotationsMapResponse = { /** * Map of annotations keyed by resource identifier, where each value contains the annotation data for that resource. */ annotations: { [key: string]: AnnotationData; }; }; /** * Type of application integration */ export type ApplicationType = 'vercel' | 'github' | 'datadog' | 'opentelemetry'; /** * A map where key is a project ID and a value is a list of installed applications. * */ export type ProjectsApplicationsMapResponse = { /** * 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`). */ applications: { [key: string]: Array; }; }; /** * A map where key is a project ID and a value is a list of installed integrations. * */ export type ProjectsIntegrationsMapResponse = { /** * Map of project IDs to their associated integration details. */ integrations: { [key: string]: Array; }; }; export type CursorPaginationResponse = { pagination?: CursorPagination; }; /** * 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. */ export type CursorPagination = { /** * Cursor for the next page of results. Pass it as the `cursor` query parameter on the next request. Absent on the last page. */ next?: string; /** * Field by which the results were sorted, echoing the request's sort_by parameter. */ sort_by?: string; /** * 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`. */ sort_order?: string; }; export type Snapshot = { /** * The snapshot ID. */ id: string; /** * Human-readable label for the snapshot. */ name: string; /** * WAL position (Log Sequence Number) at which the snapshot was captured, in Postgres LSN format (for example, `0/3000000`). */ lsn?: string; /** * Point in time captured by the snapshot, in RFC 3339 format (UTC). */ timestamp?: string; /** * Branch from which this snapshot was created. */ source_branch_id?: string; /** * Timestamp when the snapshot was created, in RFC 3339 format (UTC). */ created_at: string; /** * RFC 3339 timestamp when the snapshot expires and is eligible for deletion. Null if the snapshot does not have an expiry. */ expires_at?: string; /** * True if the snapshot was created manually rather than by a schedule. */ manual?: boolean; /** * Full logical size of the snapshot in bytes at the time it was taken. * * When absent, the logical size has not been calculated yet and the snapshot is not being charged. * * When present, a value of 0 means the snapshot is not being charged. * */ full_size?: number; /** * Incremental Postgres storage size in bytes since the previous scheduled snapshot, when the snapshot is billed on incremental (diff) usage. * * When 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). * */ diff_size?: number; }; export type SnapshotUpdateRequest = { /** * Fields to update on the snapshot. Updatable fields include `name` and `expires_at`. */ snapshot: { /** * Human-readable label for the snapshot. */ name?: string; /** * The date and time when the snapshot will expire. * * Omit to leave the current expiration unchanged. Send `null` to * clear the expiration so the snapshot never expires. A future * timestamp sets the absolute expiration. * */ expires_at?: string | null; }; }; export type BackupScheduleItem = { /** * How often to take snapshots. Known values: `daily`, `weekly`, `monthly`. * */ frequency: string; /** * The hour of the day to take the snapshot (if applicable). * */ hour?: number; /** * The day of the week or month to take the snapshot (if applicable). * */ day?: number; /** * The month of the year to take the snapshot (if applicable). * */ month?: number; /** * How long to keep a scheduled snapshot (in seconds) before it's automatically deleted. * The default is 3024000 seconds (35 days), which is also the maximum. * Manually created snapshots have no maximum retention: set their `expires_at` instead. * */ retention_seconds?: number; }; export type BackupSchedule = { /** * List of schedule entries defining the backup frequency. At least one entry is required. */ schedule: Array; }; export type BranchSchemaJson = { /** * Tables present in the branch schema. */ tables: Array<{ /** * Postgres schema (namespace) that contains the table, for example `public`. */ schema: string; /** * Name of the table within the schema. */ name: string; /** * Columns belonging to this table, each describing a column's name and attributes. */ columns: Array<{ /** * Name of the column. */ name: string; /** * Postgres data type of the column, for example "integer" or "text". */ type: string; /** * Whether the column allows NULL values */ nullable?: boolean; /** * Whether the column is a generated (computed) column */ generated?: boolean; }>; /** * Table constraints defined in the branch schema, such as primary key, foreign key, unique, and check constraints. */ constraints?: Array<{ /** * Type of constraint. Possible values: `primary_key`, `unique`, `foreign_key` * */ type: string; /** * Column names participating in this constraint */ columns: Array; /** * Optional name of the constraint */ name?: string; /** * For foreign keys - the referenced table information */ referenced_table?: { /** * Schema of the referenced table */ schema: string; /** * Name of the referenced table */ table: string; /** * Names of the referenced columns */ columns: Array; }; }>; }>; }; /** * Controls anonymous access to objects in the bucket. * - `private`: all reads and writes require authenticated requests (default). * - `public_read`: anonymous `GetObject`/`HeadObject` requests succeed; listing, * writes, and deletes still require authenticated requests. * */ export type BucketAccessLevel = 'private' | 'public_read'; export type Bucket = { /** * The bucket name (unique within a branch). */ name: string; access_level: BucketAccessLevel; /** * When the bucket was created. For a bucket inherited from an * ancestor branch this is the ancestor's creation time (the branch * fork never re-creates the bucket). * */ created_at: string; }; export type BucketCreateRequest = { /** * The bucket name. */ name: string; /** * Access level for the bucket. Defaults to `private`. Set to `public_read` * to allow anonymous `GetObject`/`HeadObject` on objects in this bucket. * */ access_level?: 'private' | 'public_read'; }; export type BucketResponse = { bucket: Bucket; }; export type BucketsListResponse = { buckets: Array; }; export type BranchStorage = { /** * Always `true` in 200 responses. Present for forward compatibility: a * future version may add intermediate states; callers should treat `true` * as "object storage is usable for this branch right now." * */ enabled: boolean; /** * The S3-compatible endpoint URL for this branch. */ s3_endpoint: string; /** * The AWS region for this branch's object storage. The platform normalizes * the us-east-1 convention server-side: a non-empty region string is * always returned in 200 responses (e.g. `"us-east-1"` for the S3 * default region). * */ region: string; /** * Whether the S3 client must use path-style addressing * (bucket-in-path rather than virtual-hosted subdomain). * Always true: the wildcard TLS cert covers one level of subdomain * (*.storage.), so the branch ID occupies that label and the * bucket name must travel in the request path, not as a further * subdomain. Callers must set the S3 SDK's ForcePathStyle (or * equivalent) to true. * */ force_path_style: boolean; }; export type BranchStorageNotEnabled = { code: string; message: string; /** * Machine-readable reason why object storage is unavailable: * - `org_not_entitled`: the org's `PlatformBranchableStorage` feature flag is off. * - `region_unavailable`: the project's region has no object storage admin service wired. * - `branch_directory_missing`: the branch is not registered in the object storage service. * - `branch_not_found`: the project or branch does not exist, or the caller does not * have access to it. * */ reason: 'org_not_entitled' | 'region_unavailable' | 'branch_directory_missing' | 'branch_not_found'; }; /** * The Neon service that emitted the log record. */ export type ProjectBranchLogSource = 'function' | 'storage' | 'pg_endpoint'; /** * An OpenTelemetry severity level. A minimum severity includes every * higher level in this order: `trace`, `debug`, `info`, `warn`, `error`, * `fatal`. * */ export type ProjectBranchLogSeverity = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal'; /** * A length of time as a count and a unit, for example `30m`, `6h`, or * `7d`. Valid units are `ms`, `s`, `m`, `h`, and `d`. * */ export type ProjectBranchLogDuration = string; export type ProjectBranchLogsNotAvailable = { code: string; message: string; /** * Machine-readable reason why logs cannot be read: * - `branch_not_found`: the project or branch does not exist, or the caller does not * have access to it. * - `telemetry_not_enabled`: the branch exists but is not collecting telemetry, so it * has no logs to serve. * */ reason: 'branch_not_found' | 'telemetry_not_enabled'; }; export type ProjectBranchLogsInvalidQuery = { code: string; message: string; /** * Machine-readable reason why the request was rejected: * - `time_range_too_large`: the requested window spans more than seven days. * - `invalid_time_range`: `end_time` is not after `start_time`. * - `conflicting_time_range`: both `since` and `start_time` were supplied. * - `invalid_cursor`: the supplied `cursor` is malformed, expired, or was issued for a * different query. * - `unknown_field`: the requested `field_name` is not one of the fields the log fields * endpoint reports for this branch. * - `invalid_logql`: the supplied `logql` expression does not parse, or uses a * construct this endpoint does not accept. * - `conflicting_filters`: `logql` was supplied alongside one or more structured * filters. Use one or the other. * */ reason: 'time_range_too_large' | 'invalid_time_range' | 'conflicting_time_range' | 'invalid_cursor' | 'unknown_field' | 'invalid_logql' | 'conflicting_filters'; }; export type ProjectBranchLogsQueryRequest = { /** * Length of the query window, ending at `end_time` or at the current * time when `end_time` is omitted. Mutually exclusive with * `start_time`. Prefer this over computing absolute bounds when the * caller only means "the last hour". * */ since?: ProjectBranchLogDuration; /** * Inclusive beginning of the query window. Mutually exclusive with * `since`. Defaults to one hour before `end_time`, or one hour before * the current time when both bounds are omitted. * */ start_time?: string; /** * Exclusive end of the query window. Defaults to the current time. */ end_time?: string; /** * Maximum number of log records to return per page. */ limit?: number; /** * Opaque pagination cursor returned as `next_cursor` by a previous * call. Resume the query after the last record of the previous page, * repeating the time range and every filter unchanged. * */ cursor?: string; /** * Order matching records by timestamp. `desc`, the default, returns * the newest records first. * */ sort_order?: 'asc' | 'desc'; source?: ProjectBranchLogSource; /** * Match the OpenTelemetry `service.name` resource attribute exactly. */ service_name?: string; /** * Match the OpenTelemetry instrumentation scope name exactly. */ scope_name?: string; minimum_severity?: ProjectBranchLogSeverity; /** * Match the OpenTelemetry severity text exactly. */ severity_text?: string; /** * Match records whose rendered `message` contains this case-sensitive * substring. * * Records with a structured body are matched against their JSON * rendering, so the substring meets JSON syntax rather than prose: a * bare key name such as `operation` matches every record carrying that * key, and `http_status: 200` matches none, because the rendering * contains `"http_status":200` with no space. * */ body_contains?: string; /** * Match records associated with this OpenTelemetry trace ID. W3C Trace * Context defines a trace ID as 32 lowercase hex digits, and that is * what is stored, so an uppercase value is rejected rather than * silently matching nothing. * */ trace_id?: string; /** * Escape hatch for selections the structured filters cannot express: a * raw LogQL expression, evaluated against this branch's log stream. * * Only stream selectors and line filters are accepted — no * aggregations and no parser stages. Supplying this alongside any * structured filter is rejected with `conflicting_filters` rather than * silently ignoring one of them. `limit`, `sort_order`, and the time * window still apply. * * This field passes the underlying query language through to the * caller, so unlike the rest of this contract it may change as that * backend changes. Prefer the structured filters where they suffice. * */ logql?: string; }; export type ProjectBranchLogRecord = { /** * The OpenTelemetry record timestamp in UTC. */ timestamp: string; /** * The OpenTelemetry log body rendered as text. A body that is already a * string is returned verbatim. Any other OpenTelemetry `AnyValue` body * — notably the structured key/value body that `storage` records always * carry — is rendered as compact JSON with its keys sorted * alphabetically, for example * `{"bytes":1024,"operation":"GET","object_key":"a/b.png"}`. * */ message: string; source?: ProjectBranchLogSource; /** * The Neon identifier of the service instance that emitted the record. */ entity_id?: string; /** * The OpenTelemetry `service.name` resource attribute. */ service_name?: string; /** * The OpenTelemetry instrumentation scope name. */ scope_name?: string; /** * The numeric OpenTelemetry severity. */ severity_number?: number; /** * The original OpenTelemetry severity text. */ severity_text?: string; /** * The OpenTelemetry trace ID, when the record belongs to a trace. */ trace_id?: string; /** * The OpenTelemetry span ID, when the record belongs to a span. */ span_id?: string; /** * Customer-defined OpenTelemetry log and resource attributes. */ attributes: { [key: string]: unknown; }; }; export type ProjectBranchLogsQueryResponse = { logs: Array; /** * Pagination cursor to pass as `cursor` on the next request. Empty * when the response is not truncated. * */ next_cursor?: string; /** * True when more records matched than were returned. */ is_truncated: boolean; }; export type ProjectBranchLogFieldsResponse = { /** * Log field names observed on this branch, each usable as `field_name` * on the log field-values endpoint. Computed per branch rather than * fixed by this specification, so clients should not assume a * particular set. * */ fields: Array; }; export type ProjectBranchLogFieldValuesResponse = { values: Array; /** * True when more distinct values exist than were returned, because * either the requested `limit` or the server's own scan cap was * reached. A caller that filters on a partial list is choosing from an * arbitrary subset, so narrow `since` or `source` and ask again when * this is `true`. * */ is_truncated: boolean; }; export type BranchAiGateway = { /** * Always `true` in 200 responses. Present for forward compatibility, * mirroring BranchStorage.enabled. * */ enabled: boolean; /** * The AI-gateway endpoint root for this branch — an OpenAI-compatible * base URL. No dialect path is included; clients append the route * (e.g. `/ai-gateway/openai/v1/responses`) themselves. * */ base_url: string; }; export type BranchAiGatewayNotEnabled = { code: string; message: string; /** * Machine-readable reason why the AI gateway is unavailable: * - `ai_gateway_unavailable`: the project's region/cell has no AI gateway configured. * - `branch_not_found`: the project or branch does not exist, or the caller does not * have access to it. * */ reason: 'ai_gateway_unavailable' | 'branch_not_found'; }; export type BucketObject = { /** * The full object key. */ key: string; /** * The object size in bytes. */ size: number; /** * The time the object was last modified. */ last_modified: string; /** * The object's entity tag (content hash). */ etag: string; }; export type BucketObjectsListResponse = { /** * Common prefixes (folder names) collapsed under the requested * `delimiter`. Empty when no `delimiter` was supplied. * */ folders: Array; /** * Objects whose keys did not collapse into a folder. */ objects: Array; /** * The prefix that was applied to this listing (echoed back). */ prefix: string; /** * Pagination cursor to pass as `cursor` on the next request. Empty * when the listing is not truncated. * */ next_cursor?: string; /** * True when more results exist beyond this page. */ is_truncated: boolean; }; export type BucketObjectsDeletePrefixResponse = { /** * The number of objects soft-deleted under the prefix. 0 when no live * object matched the prefix on this branch. * */ deleted: number; }; /** * Options for the presigned URL. The `operation` selects upload (`PUT`) * or download (`GET`); the remaining fields are optional. * */ export type PresignRequest = { /** * The transfer direction. `upload` returns a presigned `PUT` URL; * `download` returns a presigned `GET` URL. * */ operation: 'upload' | 'download'; /** * The `Content-Type` to bind into the signed request. Only meaningful * for `upload`: when set, the caller MUST send the same `Content-Type` * header on the `PUT`, and the value is echoed back in the response * `headers`. Ignored for `download`. * */ content_type?: string; /** * How long the presigned URL stays valid, in seconds. Defaults to 900 * (15 minutes); capped at 604800 (7 days). * */ expires_in_seconds?: number; }; export type PresignResponse = { /** * The presigned URL. Transfer the object bytes by issuing * `method url` with the returned `headers`. * */ url: string; /** * The HTTP method to use against `url`: `PUT` for an upload, * `GET` for a download. * */ method: string; /** * Headers the caller MUST send verbatim on the request (e.g. * `Content-Type` when it was signed on an upload). May be empty. * */ headers: { [key: string]: string; }; /** * When the presigned URL stops being valid. */ expires_at: string; }; /** * A single capability you may request when issuing a credential. A * credential is granted a set of these; it may only perform actions * explicitly listed in its scopes. * * This is the *requestable* set. Responses describing an existing * credential use `GrantedCredentialScope`, which is deliberately wider: * a credential may have been granted a scope that this endpoint does not * offer, and a response must be able to report it. * */ export type CredentialScope = 'storage:read' | 'storage:write' | 'ai_gateway:invoke' | 'functions:invoke'; /** * A single capability a credential actually carries, as reported by * responses that describe an existing credential. * * This set is a superset of `CredentialScope` (the requestable set) * because a credential's scopes are not limited to what this API offers: * the platform accepts additional scopes for customer-managed (`user`) * credentials, so one may exist on your branch that was not issued * through this endpoint. Responses must be able to report such a * credential rather than fail to describe it — a client that rejected * the value would, on rotate, discard the replacement secret after the * rotation had already committed. Treat unknown values as opaque. * */ export type GrantedCredentialScope = 'storage:read' | 'storage:write' | 'ai_gateway:invoke' | 'telemetry:write' | 'functions:invoke'; export type CreateCredentialRequest = { /** * Free-form customer label for the credential. */ name?: string; scopes: Array; /** * Principal type for the credential. Only `user` is customer-managed * and accepted here. `function` and `system` credentials are * platform-internal (e.g. function-serve auto-mint, presign signer) * and are never issued through the customer-facing API. * */ principal_type: 'user'; }; export type CreateCredentialResponse = { /** * Opaque credential id (e.g. nak_live_<32hex>). */ token_id: string; /** * First 12 hex chars of token_id; safe to log. */ token_id_short: string; /** * Customer-supplied label, echoed back from the request. Absent when not provided. */ name?: string; /** * Bearer token; returned exactly once. */ api_token: string; /** * nsk_live_<64 hex>; the AWS_SECRET_ACCESS_KEY, returned exactly once. */ s3_secret_access_key: string; scopes: Array; branch_id: string; created_at: string; /** * When the credential expires; absent means never expires. * */ expires_at?: string; }; /** * The live secrets of an existing credential, recovered on demand by the * reveal endpoint. `api_token` and `s3_secret_access_key` are the same * values handed back once at issuance. * * The field set is deliberately narrower than `CreateCredentialResponse`: * it carries only what reveal can actually recover. `token_id_short`, * `scopes`, `principal_type`, `created_at` and `expires_at` are metadata, * not secrets — read them from the list endpoint instead. * * No `branch_id` is returned. Reveal is scoped by `(project_id, * token_id)`, so the branch in the request path authorizes the call but * is not proven to be the branch the credential was issued on. Echoing it * back would assert an anchor this endpoint never verified. For a * credential's true anchor branch, read `branch_id` from the list * endpoint, which is branch-exact. * */ export type CredentialSecret = { /** * Opaque credential id (e.g. nak_live_<32hex>). */ token_id: string; /** * Bearer token. */ api_token: string; /** * nsk_live_<64 hex>; the AWS_SECRET_ACCESS_KEY. */ s3_secret_access_key: string; }; /** * The replacement secret material for an existing credential, returned * exactly once. `token_id`, `scopes`, `branch_id` and `created_at` are * unchanged by the rotation — only `api_token` and * `s3_secret_access_key` are new. * */ export type RotateCredentialResponse = { /** * Opaque credential id (e.g. nak_live_<32hex>), unchanged by the * rotation. Doubles as the `AWS_ACCESS_KEY_ID` for SigV4. * */ token_id: string; /** * First 12 hex chars of token_id; safe to log. */ token_id_short: string; /** * Customer-supplied label carried on the credential. Absent when none was set at issuance. */ name?: string; /** * The new Bearer token; returned exactly once. */ api_token: string; /** * The new nsk_live_<64 hex> AWS_SECRET_ACCESS_KEY; returned exactly once. */ s3_secret_access_key: string; scopes: Array; branch_id: string; /** * Always `user`: only customer-managed credentials are rotatable * through this endpoint. * */ principal_type: 'user'; /** * When the credential was originally issued. Rotation replaces the * secrets in place and does not reset this. * */ created_at: string; /** * When the credential expires; absent means never expires. Rotation * does not extend it. * */ expires_at?: string; }; export type CredentialMeta = { /** * Opaque credential id (e.g. nak_live_<32hex>). */ token_id: string; token_id_short: string; /** * Customer-supplied label; absent when not provided at issuance. */ name?: string; scopes: Array; branch_id?: string; principal_type: string; function_id?: string; created_at: string; last_used_at?: string; revoked_at?: string; /** * When the credential expires; absent means never expires. The * verifier refuses to authenticate after `expires_at <= now()`. * */ expires_at?: string; }; export type ListCredentialsResponse = { credentials: Array; }; export type NeonFunction = { /** * Opaque, stable function identifier. */ id: string; /** * Branch-unique, lowercase DNS-label. Forms the invocation URL's host together with the branch id. Immutable. */ slug: string; /** * Free-form display name. */ name: string; /** * URL at which the function is invoked. The host carries `-` 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). */ invocation_url: string; /** * The most recent deployment, regardless of build status. It may * still be building or it may have failed. Omitted until the first * deployment is created. * */ current_deployment?: NeonFunctionDeployment; /** * The most recent deployment whose build completed successfully. * This is the deployment that serves invocations. Omitted until a * deployment succeeds. * */ active_deployment?: NeonFunctionDeployment; created_at: string; }; export type NeonFunctionDeployment = { /** * The deployment id, which is the platform version number (monotonic per function). */ id: number; /** * Build lifecycle status of the deployment. */ status: 'pending' | 'building' | 'completed' | 'failed'; memory_mib: number; runtime: string; created_at: string; /** * The NAMES of the deployment's environment variables, sorted. * Values are encrypted at rest and are never returned — they are * write-only. To change a value, deploy the variable with the new * value; to remove a variable, deploy it with an empty value. * */ environment?: Array; /** * Human-readable reason the deployment build failed. Present only * when `status` is `failed`. * */ error?: string; }; export type NeonFunctionResponse = { function: NeonFunction; }; export type NeonFunctionsListResponse = { functions: Array; }; /** * Opaque, server-minted project-wide trigger identifier. */ export type TriggerId = string; /** * A numeric five-field cron schedule interpreted in UTC. */ export type FunctionTriggerSchedule = { /** * Numeric five-field cron expression (minute through day-of-week), interpreted in UTC. */ cron: string; }; /** * Matches successful uploads to one exact bucket and, when configured, an * object-key prefix. The Function receives a JSON request body with * `type` set to `storage_object_created` and a `data` object containing * exactly `bucket_name` and `object_key`. * */ export type FunctionTriggerStorageObjectCreated = { /** * The exact object-storage bucket name to watch. */ bucket_name: string; /** * Optional object-key prefix of at most 1024 UTF-8 bytes. When omitted, * every key in the bucket matches. When present, the full object key * must start with these exact bytes; matching is case-sensitive and * does not normalize paths or require a path-segment boundary. * Match-all responses omit this field rather than returning an empty * string. * */ prefix?: string; }; /** * Trigger creation payload discriminated by `type`. The supported trigger * types are `schedule` and `storage_object_created`. * */ export type TriggerCreateRequest = ({ type: 'schedule'; } & ScheduleTriggerCreateRequest) | ({ type: 'storage_object_created'; } & StorageObjectCreatedTriggerCreateRequest); export type ScheduleTriggerCreateRequest = { /** * Trigger type discriminator. */ type: 'schedule'; /** * The branch-local Function slug to invoke. */ function_slug: string; /** * Human-readable name, unique among triggers visible on the branch. */ name: string; /** * Path passed to the target Function. Defaults to `/`. */ function_path?: string; schedule: FunctionTriggerSchedule; /** * Whether future occurrences should be scheduled. */ enabled?: boolean; }; export type StorageObjectCreatedTriggerCreateRequest = { /** * Trigger type discriminator. */ type: 'storage_object_created'; /** * The branch-local Function slug to invoke. */ function_slug: string; /** * Human-readable name, unique among triggers visible on the branch. */ name: string; /** * Path passed to the target Function. Defaults to `/`. */ function_path?: string; storage_object_created: FunctionTriggerStorageObjectCreated; /** * Whether successful matching uploads should invoke the Function. */ enabled?: boolean; }; /** * Partial trigger update discriminated by `type`. The supported trigger * types are `schedule` and `storage_object_created`. * */ export type TriggerUpdateRequest = ({ type: 'schedule'; } & ScheduleTriggerUpdateRequest) | ({ type: 'storage_object_created'; } & StorageObjectCreatedTriggerUpdateRequest); export type ScheduleTriggerUpdateRequest = { /** * Trigger type discriminator; it does not change the trigger type. */ type: 'schedule'; /** * Replacement branch-local Function slug. */ function_slug?: string; name?: string; function_path?: string; schedule?: FunctionTriggerSchedule; /** * True enables and false disables future scheduling. */ enabled?: boolean; }; export type StorageObjectCreatedTriggerUpdateRequest = { /** * Trigger type discriminator; it does not change the trigger type. */ type: 'storage_object_created'; /** * Replacement branch-local Function slug. */ function_slug?: string; name?: string; function_path?: string; storage_object_created?: FunctionTriggerStorageObjectCreated; /** * True enables and false disables future matching uploads. */ enabled?: boolean; }; /** * A branch-effective trigger discriminated by `type`. The supported trigger * types are `schedule` and `storage_object_created`. * */ export type Trigger = ({ type: 'schedule'; } & ScheduleTrigger) | ({ type: 'storage_object_created'; } & StorageObjectCreatedTrigger); /** * A branch-effective schedule trigger for a Function. */ export type ScheduleTrigger = { /** * Trigger type discriminator. */ type: 'schedule'; trigger_id: TriggerId; /** * The branch-local Function slug resolved when an occurrence is consumed. */ function_slug: string; /** * Human-readable trigger name. */ name: string; /** * Path passed to the target Function. */ function_path: string; schedule: FunctionTriggerSchedule; enabled: boolean; /** * Monotonic configuration version. */ version: number; /** * Next scheduled occurrence as an RFC 3339 UTC timestamp, or null * while disabled or inherited and not explicitly enabled on this branch. * */ next_run_at: string | null; /** * True when the effective configuration was authored on an ancestor branch. */ inherited: boolean; }; /** * A branch-effective trigger that invokes a Function after a successful * upload matching its exact bucket and optional object-key prefix. * */ export type StorageObjectCreatedTrigger = { /** * Trigger type discriminator. */ type: 'storage_object_created'; trigger_id: TriggerId; /** * The branch-local Function slug resolved when an invocation is consumed. */ function_slug: string; /** * Human-readable trigger name. */ name: string; /** * Path passed to the target Function. */ function_path: string; storage_object_created: FunctionTriggerStorageObjectCreated; enabled: boolean; /** * Monotonic configuration version. */ version: number; /** * True when the effective configuration was authored on an ancestor branch. */ inherited: boolean; }; export type TriggerResponse = { trigger: Trigger; }; export type TriggersListResponse = { triggers: Array; }; export type CustomDomain = { /** * The registered custom domain (normalized, lowercase). */ domain: string; /** * The kind of branch entity the domain targets. Possible values: * `function` (v1 supports only `function`). Not an `enum`: new values may * ship in later spec versions — treat any undocumented value as unknown. * */ entity_type: string; /** * The target entity's identifier within the branch. For `function` this * is the function slug. * */ entity_id: string; /** * The hostname the customer must point their custom domain at with a * CNAME record. Empty when the serving region has no custom-domains * front door configured. This is the activation input: point DNS here * and the domain goes live (see `status`) once a certificate is issued * on the first request. * */ cname_target: string; /** * The domain's current validity, computed by a background check: * `pending` (still converging — point your CNAME at `cname_target` and * wait), `active` (live: DNS resolves to the edge, the CA is authorized, * and routing is published), or `error` (a fixable problem — see * `status_reason`). Not an `enum`: treat any undocumented value as * unknown. May be absent briefly right after registration. * */ status?: string; /** * The DNS + CAA portion of the check: `pending` (no records yet), `ok` * (resolves to our edge and the CA is authorized), `misconfigured` (your * CNAME does not resolve to our edge), or `caa_blocked` (your CAA records * forbid Let's Encrypt). Not an `enum`. * */ dns_status?: string; /** * Whether Neon's internal routing for the domain is published: * `pending`, `present`, or `missing`. `missing` is an internal fault * surfaced for support. Not an `enum`. * */ binding_status?: string; /** * A short, stable machine-readable reason for a non-active `status` * (e.g. `cname-not-pointing-at-edge`, `caa-blocks-lets-encrypt`, * `binding-missing`), suitable for keying an actionable hint. Empty when * active or pending. * */ status_reason?: string; }; export type CustomDomainRegisterRequest = { /** * The custom domain to register (for example `dashboard.acme.com`). * Case-insensitive; normalized to lowercase (a trailing root dot is * stripped, so the 254-char bound admits a fully-qualified name whose * normalized form is 253 chars). Neon-managed and internal hostnames are * rejected. * */ domain: string; /** * The kind of branch entity to point the domain at. v1 supports only * `function`; any other value is rejected with `invalid_entity_type`. * */ entity_type: string; /** * The target entity's identifier within the branch. For `function` this * is the function slug (which must already exist on the branch). * */ entity_id: string; }; export type CustomDomainsListResponse = { custom_domains: Array; }; export type NeonFunctionUpdateRequest = { /** * New display name for the function. `null` clears the display * name; the function's `name` then falls back to its slug. Leading * and trailing whitespace is trimmed; a whitespace-only name is * rejected. * */ name: string | null; }; export type NeonFunctionDeploymentResponse = { deployment: NeonFunctionDeployment; }; export type FunctionDeployRequest = { /** * Optional ZIP archive of the function source code. Omit to reuse the * latest version's bundle (a config-only change). Required for the * first deployment of a function. * * Place `index.mjs` or `index.js` at the archive root, without a * containing directory. If both exist, `index.mjs` is loaded. Export a * request handler function or an object with a `fetch` method. Use * `export default` for ESM or `module.exports` for CommonJS; prefer * `index.mjs` for ESM. * * Upload JavaScript ready to run on Node.js 24. Compile TypeScript * before uploading. Bundle dependencies into the entry module, or * include the required modules and assets in the archive with their * relative paths preserved (including `node_modules` for external * packages). Node.js built-in modules do not need to be bundled. * The API does not transpile, bundle, or install dependencies. * The ZIP is limited to 32 MiB compressed and 128 MiB extracted, with * at most 32,768 entries and 64 MiB per file. Bundle large dependency * trees to keep the archive small. ZIPs larger than 32 MiB are rejected * with HTTP 413 before creating a deployment. The extracted-size, * entry-count, and per-file limits are enforced during the asynchronous * build; an accepted upload that exceeds them fails the build. * * For example, a self-contained ESM bundle needs only `index.mjs` * at the ZIP root. The Neon CLI bundles source into this layout by * default; `neon function deploy --no-bundle` packages a prebuilt * directory or an entry file named `index.mjs` or `index.js`. * */ zip?: Blob | File; runtime?: 'nodejs24'; /** * Optional JSON object (a string-to-string map) of environment * variables for the deployment, e.g. {"KEY":"VALUE"}. Carried as a * JSON-encoded string because multipart form data does not support * typed object parts. * * Values are write-only: they are encrypted at rest, and responses * carry only the variable names (the `environment` array), never the * values. * */ environment?: string; }; /** * 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. */ export type CursorParam = string; /** * The maximum number of records to be returned in the response */ export type LimitParam = number; /** * Defines the sorting order of entities. */ export type SortOrderParam = 'asc' | 'desc'; /** * Specify an explicit timeout in milliseconds to limit response delay. * After timing out, the incomplete list of project data fetched so far will be returned. * Projects still being fetched when the timeout occurred are listed in the "unavailable" attribute of the response. * If not specified, an implicit implementation defined timeout is chosen with the same behaviour as above * */ export type TimeoutParam = number; export type GetProjectAdvisorSecurityIssuesData = { body?: never; path: { /** * Neon project ID */ project_id: string; }; query?: { /** * Branch ID to analyze. If not specified, the project's default branch is used. */ branch_id?: string; /** * Database name to analyze. Required if branch has multiple databases. */ database_name?: string; /** * Filter issues by category */ category?: AdvisorCategory; /** * Minimum severity level to include. For example, WARN returns WARN and ERROR issues, excluding INFO. */ min_severity?: 'INFO' | 'WARN' | 'ERROR'; }; url: '/projects/{project_id}/advisors'; }; export type GetProjectAdvisorSecurityIssuesErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectAdvisorSecurityIssuesError = GetProjectAdvisorSecurityIssuesErrors[keyof GetProjectAdvisorSecurityIssuesErrors]; export type GetProjectAdvisorSecurityIssuesResponses = { /** * Successfully retrieved security advisor issues */ 200: { issues: Array; }; }; export type GetProjectAdvisorSecurityIssuesResponse = GetProjectAdvisorSecurityIssuesResponses[keyof GetProjectAdvisorSecurityIssuesResponses]; export type ListApiKeysData = { body?: never; path?: never; query?: never; url: '/api_keys'; }; export type ListApiKeysErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListApiKeysError = ListApiKeysErrors[keyof ListApiKeysErrors]; export type ListApiKeysResponses = { /** * Returned the API keys for the Neon account */ 200: Array; }; export type ListApiKeysResponse = ListApiKeysResponses[keyof ListApiKeysResponses]; export type CreateApiKeyData = { body: ApiKeyCreateRequest; path?: never; query?: never; url: '/api_keys'; }; export type CreateApiKeyErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateApiKeyError = CreateApiKeyErrors[keyof CreateApiKeyErrors]; export type CreateApiKeyResponses = { /** * Created an API key */ 200: ApiKeyCreateResponse; }; export type CreateApiKeyResponse = CreateApiKeyResponses[keyof CreateApiKeyResponses]; export type RevokeApiKeyData = { body?: never; path: { /** * The API key ID */ key_id: number; }; query?: never; url: '/api_keys/{key_id}'; }; export type RevokeApiKeyErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RevokeApiKeyError = RevokeApiKeyErrors[keyof RevokeApiKeyErrors]; export type RevokeApiKeyResponses = { /** * Revoked the specified API key */ 200: ApiKeyRevokeResponse; }; export type RevokeApiKeyResponse = RevokeApiKeyResponses[keyof RevokeApiKeyResponses]; export type GetProjectOperationData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The operation ID */ operation_id: string; }; query?: never; url: '/projects/{project_id}/operations/{operation_id}'; }; export type GetProjectOperationErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectOperationError = GetProjectOperationErrors[keyof GetProjectOperationErrors]; export type GetProjectOperationResponses = { /** * Returned details for the specified operation */ 200: OperationResponse; }; export type GetProjectOperationResponse = GetProjectOperationResponses[keyof GetProjectOperationResponses]; export type ListProjectsData = { body?: never; path?: never; query?: { /** * Specify the cursor value from the previous response to retrieve the next batch of projects. */ cursor?: string; /** * Specify a value from 1 to 400 to limit number of projects in the response. */ limit?: number; /** * Search by project `name` or `id`. You can specify partial `name` or `id` values to filter results. */ search?: string; /** * Search for projects by `org_id`. */ org_id?: string; /** * Specify an explicit timeout in milliseconds to limit response delay. * After timing out, the incomplete list of project data fetched so far will be returned. * Projects still being fetched when the timeout occurred are listed in the "unavailable" attribute of the response. * If not specified, an implicit implementation defined timeout is chosen with the same behaviour as above * */ timeout?: number; /** * Show only deleted projects within the recovery window. * */ recoverable?: boolean; }; url: '/projects'; }; export type ListProjectsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectsError = ListProjectsErrors[keyof ListProjectsErrors]; export type ListProjectsResponses = { /** * Returned a list of projects for the Neon account */ 200: ProjectsResponse & PaginationResponse & ProjectsApplicationsMapResponse & ProjectsIntegrationsMapResponse; }; export type ListProjectsResponse = ListProjectsResponses[keyof ListProjectsResponses]; export type CreateProjectData = { body: ProjectCreateRequest; path?: never; query?: never; url: '/projects'; }; export type CreateProjectErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateProjectError = CreateProjectErrors[keyof CreateProjectErrors]; export type CreateProjectResponses = { /** * Created a project. * The project includes a connection URI with a database, password, and role. * At least one non-protected role is created with a password. * Wait until the operations are finished before attempting to connect to a project database. * */ 201: ProjectResponse & ConnectionUrisResponse & RolesResponse & DatabasesResponse & OperationsResponse & BranchResponse & EndpointsResponse; }; export type CreateProjectResponse = CreateProjectResponses[keyof CreateProjectResponses]; export type CountProjectsData = { body?: never; path?: never; query?: { /** * Count projects in the organization with this `org_id`. */ org_id?: string; }; url: '/projects/count'; }; export type CountProjectsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CountProjectsError = CountProjectsErrors[keyof CountProjectsErrors]; export type CountProjectsResponses = { /** * Returned the number of projects in the organization */ 200: ProjectsCountResponse; }; export type CountProjectsResponse = CountProjectsResponses[keyof CountProjectsResponses]; export type ListSharedProjectsData = { body?: never; path?: never; query?: { /** * Specify the cursor value from the previous response to get the next batch of projects. */ cursor?: string; /** * Specify a value from 1 to 400 to limit number of projects in the response. */ limit?: number; /** * Search query by name or id. */ search?: string; /** * Specify an explicit timeout in milliseconds to limit response delay. * After timing out, the incomplete list of project data fetched so far will be returned. * Projects still being fetched when the timeout occurred are listed in the "unavailable" attribute of the response. * If not specified, an implicit implementation defined timeout is chosen with the same behaviour as above * */ timeout?: number; }; url: '/projects/shared'; }; export type ListSharedProjectsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListSharedProjectsError = ListSharedProjectsErrors[keyof ListSharedProjectsErrors]; export type ListSharedProjectsResponses = { /** * Returned a list of shared projects for the Neon account */ 200: ProjectsResponse & PaginationResponse; }; export type ListSharedProjectsResponse = ListSharedProjectsResponses[keyof ListSharedProjectsResponses]; export type DeleteProjectData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}'; }; export type DeleteProjectErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectError = DeleteProjectErrors[keyof DeleteProjectErrors]; export type DeleteProjectResponses = { /** * Deleted the specified project */ 200: ProjectResponse; }; export type DeleteProjectResponse = DeleteProjectResponses[keyof DeleteProjectResponses]; export type GetProjectData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}'; }; export type GetProjectErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectError = GetProjectErrors[keyof GetProjectErrors]; export type GetProjectResponses = { /** * Returned information about the specified project */ 200: ProjectResponse; }; export type GetProjectResponse = GetProjectResponses[keyof GetProjectResponses]; export type UpdateProjectData = { body: ProjectUpdateRequest; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}'; }; export type UpdateProjectErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateProjectError = UpdateProjectErrors[keyof UpdateProjectErrors]; export type UpdateProjectResponses = { /** * Updated the specified project */ 200: ProjectResponse & OperationsResponse; }; export type UpdateProjectResponse = UpdateProjectResponses[keyof UpdateProjectResponses]; export type RecoverProjectData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/recover'; }; export type RecoverProjectErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RecoverProjectError = RecoverProjectErrors[keyof RecoverProjectErrors]; export type RecoverProjectResponses = { /** * Returned the recovered project */ 200: ProjectRecoverResponse; }; export type RecoverProjectResponse = RecoverProjectResponses[keyof RecoverProjectResponses]; export type ListProjectOperationsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: { /** * Specify the cursor value from the previous response to get the next batch of operations */ cursor?: string; /** * Specify a value from 1 to 1000 to limit number of operations in the response */ limit?: number; }; url: '/projects/{project_id}/operations'; }; export type ListProjectOperationsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectOperationsError = ListProjectOperationsErrors[keyof ListProjectOperationsErrors]; export type ListProjectOperationsResponses = { /** * Returned a list of operations * */ 200: OperationsResponse & PaginationResponse; }; export type ListProjectOperationsResponse = ListProjectOperationsResponses[keyof ListProjectOperationsResponses]; export type ListProjectPermissionsData = { body?: never; path: { project_id: string; }; query?: never; url: '/projects/{project_id}/permissions'; }; export type ListProjectPermissionsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectPermissionsError = ListProjectPermissionsErrors[keyof ListProjectPermissionsErrors]; export type ListProjectPermissionsResponses = { /** * Returned project access details */ 200: ProjectPermissions; }; export type ListProjectPermissionsResponse = ListProjectPermissionsResponses[keyof ListProjectPermissionsResponses]; export type GrantPermissionToProjectData = { body: GrantPermissionToProjectRequest; path: { project_id: string; }; query?: never; url: '/projects/{project_id}/permissions'; }; export type GrantPermissionToProjectErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GrantPermissionToProjectError = GrantPermissionToProjectErrors[keyof GrantPermissionToProjectErrors]; export type GrantPermissionToProjectResponses = { /** * Granted project access */ 200: ProjectPermission; }; export type GrantPermissionToProjectResponse = GrantPermissionToProjectResponses[keyof GrantPermissionToProjectResponses]; export type ListProjectMembersData = { body?: never; path: { project_id: string; }; query?: { /** * 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. */ cursor?: string; /** * The maximum number of members to return in the response */ limit?: number; }; url: '/projects/{project_id}/members'; }; export type ListProjectMembersErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectMembersError = ListProjectMembersErrors[keyof ListProjectMembersErrors]; export type ListProjectMembersResponses = { /** * Returned the org members and their project roles */ 200: ProjectMembers; }; export type ListProjectMembersResponse = ListProjectMembersResponses[keyof ListProjectMembersResponses]; export type RemoveProjectMemberRoleData = { body?: never; path: { project_id: string; member_id: string; }; query?: { confirm_self_lockout?: boolean; }; url: '/projects/{project_id}/members/{member_id}/role'; }; export type RemoveProjectMemberRoleErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RemoveProjectMemberRoleError = RemoveProjectMemberRoleErrors[keyof RemoveProjectMemberRoleErrors]; export type RemoveProjectMemberRoleResponses = { /** * Role removed, or no-op if no explicit row existed */ 200: ProjectMemberRoleResponse; }; export type RemoveProjectMemberRoleResponse = RemoveProjectMemberRoleResponses[keyof RemoveProjectMemberRoleResponses]; export type SetProjectMemberRoleData = { body: SetProjectMemberRoleRequest; path: { project_id: string; member_id: string; }; query?: { confirm_self_demotion?: boolean; }; url: '/projects/{project_id}/members/{member_id}/role'; }; export type SetProjectMemberRoleErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type SetProjectMemberRoleError = SetProjectMemberRoleErrors[keyof SetProjectMemberRoleErrors]; export type SetProjectMemberRoleResponses = { /** * Role set or updated */ 200: ProjectMemberRoleResponse; }; export type SetProjectMemberRoleResponse = SetProjectMemberRoleResponses[keyof SetProjectMemberRoleResponses]; export type RevokePermissionFromProjectData = { body?: never; path: { project_id: string; permission_id: string; }; query?: never; url: '/projects/{project_id}/permissions/{permission_id}'; }; export type RevokePermissionFromProjectErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RevokePermissionFromProjectError = RevokePermissionFromProjectErrors[keyof RevokePermissionFromProjectErrors]; export type RevokePermissionFromProjectResponses = { /** * Revoked project access */ 200: ProjectPermission; }; export type RevokePermissionFromProjectResponse = RevokePermissionFromProjectResponses[keyof RevokePermissionFromProjectResponses]; export type GetAvailablePreloadLibrariesData = { body?: never; path: { project_id: string; }; query?: never; url: '/projects/{project_id}/available_preload_libraries'; }; export type GetAvailablePreloadLibrariesErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetAvailablePreloadLibrariesError = GetAvailablePreloadLibrariesErrors[keyof GetAvailablePreloadLibrariesErrors]; export type GetAvailablePreloadLibrariesResponses = { /** * Successfully returned available shared preload libraries */ 200: AvailablePreloadLibraries; }; export type GetAvailablePreloadLibrariesResponse = GetAvailablePreloadLibrariesResponses[keyof GetAvailablePreloadLibrariesResponses]; export type CreateProjectTransferRequestData = { body?: { /** * Number of seconds the transfer request stays valid before it expires. Defaults to 86400 (24 hours). * */ ttl_seconds?: number; }; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/transfer_requests'; }; export type CreateProjectTransferRequestErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateProjectTransferRequestError = CreateProjectTransferRequestErrors[keyof CreateProjectTransferRequestErrors]; export type CreateProjectTransferRequestResponses = { /** * Project transfer request created successfully */ 201: ProjectTransferRequestResponse; }; export type CreateProjectTransferRequestResponse = CreateProjectTransferRequestResponses[keyof CreateProjectTransferRequestResponses]; export type AcceptProjectTransferRequestData = { body?: { /** * The Neon organization ID to transfer the project to. If not provided, the project will be * transferred to the current user or organization account. * */ org_id?: string; }; path: { /** * The Neon project ID */ project_id: string; /** * The Neon project transfer request ID */ request_id: string; }; query?: never; url: '/projects/{project_id}/transfer_requests/{request_id}'; }; export type AcceptProjectTransferRequestErrors = { /** * Account doesn't satisfy the plan requirements to own the project */ 406: AcceptProjectTransferRequestSatisfiesPlanError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type AcceptProjectTransferRequestError = AcceptProjectTransferRequestErrors[keyof AcceptProjectTransferRequestErrors]; export type AcceptProjectTransferRequestResponses = { /** * Project transfer request accepted successfully */ 204: void; }; export type AcceptProjectTransferRequestResponse = AcceptProjectTransferRequestResponses[keyof AcceptProjectTransferRequestResponses]; export type GetProjectJwksData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/jwks'; }; export type GetProjectJwksErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectJwksError = GetProjectJwksErrors[keyof GetProjectJwksErrors]; export type GetProjectJwksResponses = { /** * The JWKS URLs available for the project */ 200: ProjectJwksResponse; }; export type GetProjectJwksResponse = GetProjectJwksResponses[keyof GetProjectJwksResponses]; export type AddProjectJwksData = { body: AddProjectJwksRequest; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/jwks'; }; export type AddProjectJwksErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type AddProjectJwksError = AddProjectJwksErrors[keyof AddProjectJwksErrors]; export type AddProjectJwksResponses = { /** * The JWKS URL was added to the project's authentication connections */ 201: JwksCreationOperation; }; export type AddProjectJwksResponse = AddProjectJwksResponses[keyof AddProjectJwksResponses]; export type DeleteProjectJwksData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The JWKS ID */ jwks_id: string; }; query?: never; url: '/projects/{project_id}/jwks/{jwks_id}'; }; export type DeleteProjectJwksErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectJwksError = DeleteProjectJwksErrors[keyof DeleteProjectJwksErrors]; export type DeleteProjectJwksResponses = { /** * Deleted a JWKS URL from the project */ 200: Jwks; }; export type DeleteProjectJwksResponse = DeleteProjectJwksResponses[keyof DeleteProjectJwksResponses]; export type DeleteProjectBranchDataApiData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The database name */ database_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/data-api/{database_name}'; }; export type DeleteProjectBranchDataApiErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectBranchDataApiError = DeleteProjectBranchDataApiErrors[keyof DeleteProjectBranchDataApiErrors]; export type DeleteProjectBranchDataApiResponses = { /** * Deleted the Neon Data API for the specified branch */ 200: EmptyResponse; }; export type DeleteProjectBranchDataApiResponse = DeleteProjectBranchDataApiResponses[keyof DeleteProjectBranchDataApiResponses]; export type GetProjectBranchDataApiData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The database name */ database_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/data-api/{database_name}'; }; export type GetProjectBranchDataApiErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchDataApiError = GetProjectBranchDataApiErrors[keyof GetProjectBranchDataApiErrors]; export type GetProjectBranchDataApiResponses = { /** * Returns the Neon Data API for the specified branch */ 200: DataApiReponse; }; export type GetProjectBranchDataApiResponse = GetProjectBranchDataApiResponses[keyof GetProjectBranchDataApiResponses]; export type UpdateProjectBranchDataApiData = { body?: DataApiUpdateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The database name */ database_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/data-api/{database_name}'; }; export type UpdateProjectBranchDataApiErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateProjectBranchDataApiError = UpdateProjectBranchDataApiErrors[keyof UpdateProjectBranchDataApiErrors]; export type UpdateProjectBranchDataApiResponses = { /** * Updated the Neon Data API configuration and refreshed the schema cache */ 201: EmptyResponse; }; export type UpdateProjectBranchDataApiResponse = UpdateProjectBranchDataApiResponses[keyof UpdateProjectBranchDataApiResponses]; export type CreateProjectBranchDataApiData = { body?: DataApiCreateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The database name */ database_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/data-api/{database_name}'; }; export type CreateProjectBranchDataApiErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateProjectBranchDataApiError = CreateProjectBranchDataApiErrors[keyof CreateProjectBranchDataApiErrors]; export type CreateProjectBranchDataApiResponses = { /** * Creates a new app */ 201: DataApiCreateResponse; }; export type CreateProjectBranchDataApiResponse = CreateProjectBranchDataApiResponses[keyof CreateProjectBranchDataApiResponses]; export type CreateNeonAuthIntegrationData = { body: NeonAuthCreateIntegrationRequest; path?: never; query?: never; url: '/projects/auth/create'; }; export type CreateNeonAuthIntegrationErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateNeonAuthIntegrationError = CreateNeonAuthIntegrationErrors[keyof CreateNeonAuthIntegrationErrors]; export type CreateNeonAuthIntegrationResponses = { /** * Creates Neon Auth integration */ 201: NeonAuthCreateIntegrationResponse; }; export type CreateNeonAuthIntegrationResponse = CreateNeonAuthIntegrationResponses[keyof CreateNeonAuthIntegrationResponses]; export type DisableNeonAuthData = { body?: { /** * If true, deletes the `neon_auth` schema from the database */ delete_data?: boolean; }; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth'; }; export type DisableNeonAuthErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DisableNeonAuthError = DisableNeonAuthErrors[keyof DisableNeonAuthErrors]; export type DisableNeonAuthResponses = { /** * Delete the integration with the authentication provider */ 200: unknown; }; export type GetNeonAuthData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth'; }; export type GetNeonAuthErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetNeonAuthError = GetNeonAuthErrors[keyof GetNeonAuthErrors]; export type GetNeonAuthResponses = { /** * Fetched the details of the Neon Auth integration for the specified branch */ 200: NeonAuthIntegration; }; export type GetNeonAuthResponse = GetNeonAuthResponses[keyof GetNeonAuthResponses]; export type CreateNeonAuthData = { body: EnableNeonAuthIntegrationRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth'; }; export type CreateNeonAuthErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateNeonAuthError = CreateNeonAuthErrors[keyof CreateNeonAuthErrors]; export type CreateNeonAuthResponses = { /** * Enables Neon Auth integration for the branch */ 201: NeonAuthCreateIntegrationResponse; }; export type CreateNeonAuthResponse = CreateNeonAuthResponses[keyof CreateNeonAuthResponses]; export type DeleteNeonAuthDomainFromRedirectUriWhitelistData = { body: NeonAuthDeleteDomainFromRedirectUriWhitelistRequest; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/auth/domains'; }; export type DeleteNeonAuthDomainFromRedirectUriWhitelistErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteNeonAuthDomainFromRedirectUriWhitelistError = DeleteNeonAuthDomainFromRedirectUriWhitelistErrors[keyof DeleteNeonAuthDomainFromRedirectUriWhitelistErrors]; export type DeleteNeonAuthDomainFromRedirectUriWhitelistResponses = { /** * Deleted the domain from the redirect_uri whitelist */ 200: unknown; }; export type ListNeonAuthRedirectUriWhitelistDomainsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/auth/domains'; }; export type ListNeonAuthRedirectUriWhitelistDomainsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListNeonAuthRedirectUriWhitelistDomainsError = ListNeonAuthRedirectUriWhitelistDomainsErrors[keyof ListNeonAuthRedirectUriWhitelistDomainsErrors]; export type ListNeonAuthRedirectUriWhitelistDomainsResponses = { /** * Returned the domains in the redirect_uri whitelist */ 200: NeonAuthRedirectUriWhitelistResponse; }; export type ListNeonAuthRedirectUriWhitelistDomainsResponse = ListNeonAuthRedirectUriWhitelistDomainsResponses[keyof ListNeonAuthRedirectUriWhitelistDomainsResponses]; export type AddNeonAuthDomainToRedirectUriWhitelistData = { body: NeonAuthAddDomainToRedirectUriWhitelistRequest; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/auth/domains'; }; export type AddNeonAuthDomainToRedirectUriWhitelistErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type AddNeonAuthDomainToRedirectUriWhitelistError = AddNeonAuthDomainToRedirectUriWhitelistErrors[keyof AddNeonAuthDomainToRedirectUriWhitelistErrors]; export type AddNeonAuthDomainToRedirectUriWhitelistResponses = { /** * Added the domain to the redirect_uri whitelist */ 201: unknown; }; export type DeleteBranchNeonAuthTrustedDomainData = { body: NeonAuthDeleteDomainFromRedirectUriWhitelistRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/domains'; }; export type DeleteBranchNeonAuthTrustedDomainErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteBranchNeonAuthTrustedDomainError = DeleteBranchNeonAuthTrustedDomainErrors[keyof DeleteBranchNeonAuthTrustedDomainErrors]; export type DeleteBranchNeonAuthTrustedDomainResponses = { /** * Deleted the domain from the redirect_uri whitelist */ 200: unknown; }; export type ListBranchNeonAuthTrustedDomainsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/domains'; }; export type ListBranchNeonAuthTrustedDomainsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListBranchNeonAuthTrustedDomainsError = ListBranchNeonAuthTrustedDomainsErrors[keyof ListBranchNeonAuthTrustedDomainsErrors]; export type ListBranchNeonAuthTrustedDomainsResponses = { /** * Returned the domains in the redirect_uri whitelist */ 200: NeonAuthRedirectUriWhitelistResponse; }; export type ListBranchNeonAuthTrustedDomainsResponse = ListBranchNeonAuthTrustedDomainsResponses[keyof ListBranchNeonAuthTrustedDomainsResponses]; export type AddBranchNeonAuthTrustedDomainData = { body: NeonAuthAddDomainToRedirectUriWhitelistRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/domains'; }; export type AddBranchNeonAuthTrustedDomainErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type AddBranchNeonAuthTrustedDomainError = AddBranchNeonAuthTrustedDomainErrors[keyof AddBranchNeonAuthTrustedDomainErrors]; export type AddBranchNeonAuthTrustedDomainResponses = { /** * Added the domain to the redirect_uri whitelist */ 201: unknown; }; export type CreateNeonAuthProviderSdkKeysData = { body: NeonAuthCreateAuthProviderSdkKeysRequest; path?: never; query?: never; url: '/projects/auth/keys'; }; export type CreateNeonAuthProviderSdkKeysErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateNeonAuthProviderSdkKeysError = CreateNeonAuthProviderSdkKeysErrors[keyof CreateNeonAuthProviderSdkKeysErrors]; export type CreateNeonAuthProviderSdkKeysResponses = { /** * Creates Auth Provider SDK keys */ 201: NeonAuthCreateIntegrationResponse; }; export type CreateNeonAuthProviderSdkKeysResponse = CreateNeonAuthProviderSdkKeysResponses[keyof CreateNeonAuthProviderSdkKeysResponses]; export type CreateNeonAuthNewUserData = { body: NeonAuthCreateNewUserRequest; path?: never; query?: never; url: '/projects/auth/user'; }; export type CreateNeonAuthNewUserErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateNeonAuthNewUserError = CreateNeonAuthNewUserErrors[keyof CreateNeonAuthNewUserErrors]; export type CreateNeonAuthNewUserResponses = { /** * Creates new user */ 201: NeonAuthCreateNewUserResponse; }; export type CreateNeonAuthNewUserResponse = CreateNeonAuthNewUserResponses[keyof CreateNeonAuthNewUserResponses]; export type CreateBranchNeonAuthNewUserData = { body: CreateBranchNeonAuthNewUserRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/users'; }; export type CreateBranchNeonAuthNewUserErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateBranchNeonAuthNewUserError = CreateBranchNeonAuthNewUserErrors[keyof CreateBranchNeonAuthNewUserErrors]; export type CreateBranchNeonAuthNewUserResponses = { /** * Creates new user */ 201: NeonAuthCreateNewUserResponse; }; export type CreateBranchNeonAuthNewUserResponse = CreateBranchNeonAuthNewUserResponses[keyof CreateBranchNeonAuthNewUserResponses]; export type DeleteBranchNeonAuthUserData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The Neon user ID */ auth_user_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}'; }; export type DeleteBranchNeonAuthUserErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteBranchNeonAuthUserError = DeleteBranchNeonAuthUserErrors[keyof DeleteBranchNeonAuthUserErrors]; export type DeleteBranchNeonAuthUserResponses = { /** * Deleted the auth user */ 204: void; }; export type DeleteBranchNeonAuthUserResponse = DeleteBranchNeonAuthUserResponses[keyof DeleteBranchNeonAuthUserResponses]; export type UpdateNeonAuthUserRoleData = { body: UpdateNeonAuthUserRoleRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The Neon user ID */ auth_user_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}/role'; }; export type UpdateNeonAuthUserRoleErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthUserRoleError = UpdateNeonAuthUserRoleErrors[keyof UpdateNeonAuthUserRoleErrors]; export type UpdateNeonAuthUserRoleResponses = { /** * Updated the auth user role */ 200: UpdateNeonAuthUserRoleResponse; }; export type UpdateNeonAuthUserRoleResponse2 = UpdateNeonAuthUserRoleResponses[keyof UpdateNeonAuthUserRoleResponses]; export type DeleteNeonAuthUserData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon user ID */ auth_user_id: string; }; query?: never; url: '/projects/{project_id}/auth/users/{auth_user_id}'; }; export type DeleteNeonAuthUserErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteNeonAuthUserError = DeleteNeonAuthUserErrors[keyof DeleteNeonAuthUserErrors]; export type DeleteNeonAuthUserResponses = { /** * Deleted the auth user */ 204: void; }; export type DeleteNeonAuthUserResponse = DeleteNeonAuthUserResponses[keyof DeleteNeonAuthUserResponses]; export type TransferNeonAuthProviderProjectData = { body: NeonAuthTransferAuthProviderProjectRequest; path?: never; query?: never; url: '/projects/auth/transfer_ownership'; }; export type TransferNeonAuthProviderProjectErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type TransferNeonAuthProviderProjectError = TransferNeonAuthProviderProjectErrors[keyof TransferNeonAuthProviderProjectErrors]; export type TransferNeonAuthProviderProjectResponses = { /** * Transfer initiated. Follow the URL to complete the process in your auth provider's UI. */ 200: NeonAuthTransferAuthProviderProjectResponse; }; export type TransferNeonAuthProviderProjectResponse = TransferNeonAuthProviderProjectResponses[keyof TransferNeonAuthProviderProjectResponses]; export type ListNeonAuthIntegrationsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/auth/integrations'; }; export type ListNeonAuthIntegrationsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListNeonAuthIntegrationsError = ListNeonAuthIntegrationsErrors[keyof ListNeonAuthIntegrationsErrors]; export type ListNeonAuthIntegrationsResponses = { /** * Return management API keys metadata */ 200: ListNeonAuthIntegrationsResponse; }; export type ListNeonAuthIntegrationsResponse2 = ListNeonAuthIntegrationsResponses[keyof ListNeonAuthIntegrationsResponses]; export type ListNeonAuthOauthProvidersData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/auth/oauth_providers'; }; export type ListNeonAuthOauthProvidersErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListNeonAuthOauthProvidersError = ListNeonAuthOauthProvidersErrors[keyof ListNeonAuthOauthProvidersErrors]; export type ListNeonAuthOauthProvidersResponses = { /** * Returns the OAuth providers for the Neon Auth */ 200: ListNeonAuthOauthProvidersResponse; }; export type ListNeonAuthOauthProvidersResponse2 = ListNeonAuthOauthProvidersResponses[keyof ListNeonAuthOauthProvidersResponses]; export type AddNeonAuthOauthProviderData = { body: NeonAuthAddOAuthProviderRequest; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/auth/oauth_providers'; }; export type AddNeonAuthOauthProviderErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type AddNeonAuthOauthProviderError = AddNeonAuthOauthProviderErrors[keyof AddNeonAuthOauthProviderErrors]; export type AddNeonAuthOauthProviderResponses = { /** * The OAuth provider has been added to the project */ 200: NeonAuthOauthProvider; }; export type AddNeonAuthOauthProviderResponse = AddNeonAuthOauthProviderResponses[keyof AddNeonAuthOauthProviderResponses]; export type ListBranchNeonAuthOauthProvidersData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/oauth_providers'; }; export type ListBranchNeonAuthOauthProvidersErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListBranchNeonAuthOauthProvidersError = ListBranchNeonAuthOauthProvidersErrors[keyof ListBranchNeonAuthOauthProvidersErrors]; export type ListBranchNeonAuthOauthProvidersResponses = { /** * Returns the OAuth providers for the Neon Auth */ 200: ListNeonAuthOauthProvidersResponse; }; export type ListBranchNeonAuthOauthProvidersResponse = ListBranchNeonAuthOauthProvidersResponses[keyof ListBranchNeonAuthOauthProvidersResponses]; export type AddBranchNeonAuthOauthProviderData = { body: NeonAuthAddOAuthProviderRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/oauth_providers'; }; export type AddBranchNeonAuthOauthProviderErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type AddBranchNeonAuthOauthProviderError = AddBranchNeonAuthOauthProviderErrors[keyof AddBranchNeonAuthOauthProviderErrors]; export type AddBranchNeonAuthOauthProviderResponses = { /** * The OAuth provider has been added to the project */ 200: NeonAuthOauthProvider; }; export type AddBranchNeonAuthOauthProviderResponse = AddBranchNeonAuthOauthProviderResponses[keyof AddBranchNeonAuthOauthProviderResponses]; export type DeleteNeonAuthOauthProviderData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The OAuth provider ID */ oauth_provider_id: NeonAuthOauthProviderId; }; query?: never; url: '/projects/{project_id}/auth/oauth_providers/{oauth_provider_id}'; }; export type DeleteNeonAuthOauthProviderErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteNeonAuthOauthProviderError = DeleteNeonAuthOauthProviderErrors[keyof DeleteNeonAuthOauthProviderErrors]; export type DeleteNeonAuthOauthProviderResponses = { /** * Deleted the OAuth provider from the project */ 200: unknown; }; export type UpdateNeonAuthOauthProviderData = { body: NeonAuthUpdateOAuthProviderRequest; path: { /** * The Neon project ID */ project_id: string; /** * The OAuth provider ID */ oauth_provider_id: NeonAuthOauthProviderId; }; query?: never; url: '/projects/{project_id}/auth/oauth_providers/{oauth_provider_id}'; }; export type UpdateNeonAuthOauthProviderErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthOauthProviderError = UpdateNeonAuthOauthProviderErrors[keyof UpdateNeonAuthOauthProviderErrors]; export type UpdateNeonAuthOauthProviderResponses = { /** * The OAuth provider has been added to the project */ 200: NeonAuthOauthProvider; }; export type UpdateNeonAuthOauthProviderResponse = UpdateNeonAuthOauthProviderResponses[keyof UpdateNeonAuthOauthProviderResponses]; export type DeleteBranchNeonAuthOauthProviderData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The OAuth provider ID */ oauth_provider_id: NeonAuthOauthProviderId; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}'; }; export type DeleteBranchNeonAuthOauthProviderErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteBranchNeonAuthOauthProviderError = DeleteBranchNeonAuthOauthProviderErrors[keyof DeleteBranchNeonAuthOauthProviderErrors]; export type DeleteBranchNeonAuthOauthProviderResponses = { /** * Deleted the OAuth provider from the project */ 200: unknown; }; export type UpdateBranchNeonAuthOauthProviderData = { body: NeonAuthUpdateOAuthProviderRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The OAuth provider ID */ oauth_provider_id: NeonAuthOauthProviderId; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}'; }; export type UpdateBranchNeonAuthOauthProviderErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateBranchNeonAuthOauthProviderError = UpdateBranchNeonAuthOauthProviderErrors[keyof UpdateBranchNeonAuthOauthProviderErrors]; export type UpdateBranchNeonAuthOauthProviderResponses = { /** * The OAuth provider has been added to the project */ 200: NeonAuthOauthProvider; }; export type UpdateBranchNeonAuthOauthProviderResponse = UpdateBranchNeonAuthOauthProviderResponses[keyof UpdateBranchNeonAuthOauthProviderResponses]; export type GetNeonAuthEmailServerData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/auth/email_server'; }; export type GetNeonAuthEmailServerErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetNeonAuthEmailServerError = GetNeonAuthEmailServerErrors[keyof GetNeonAuthEmailServerErrors]; export type GetNeonAuthEmailServerResponses = { /** * Returns the email server configuration for the Neon Auth */ 200: NeonAuthEmailServerConfigResponse; }; export type GetNeonAuthEmailServerResponse = GetNeonAuthEmailServerResponses[keyof GetNeonAuthEmailServerResponses]; export type UpdateNeonAuthEmailServerData = { body: NeonAuthEmailServerConfig; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/auth/email_server'; }; export type UpdateNeonAuthEmailServerErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthEmailServerError = UpdateNeonAuthEmailServerErrors[keyof UpdateNeonAuthEmailServerErrors]; export type UpdateNeonAuthEmailServerResponses = { /** * The OAuth provider has been added to the project */ 200: NeonAuthEmailServerConfigResponse; }; export type UpdateNeonAuthEmailServerResponse = UpdateNeonAuthEmailServerResponses[keyof UpdateNeonAuthEmailServerResponses]; export type SendNeonAuthTestEmailData = { body: SendNeonAuthTestEmailRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/send_test_email'; }; export type SendNeonAuthTestEmailErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type SendNeonAuthTestEmailError = SendNeonAuthTestEmailErrors[keyof SendNeonAuthTestEmailErrors]; export type SendNeonAuthTestEmailResponses = { /** * Response with the result of the test email send */ 200: SendNeonAuthTestEmailResponse; }; export type SendNeonAuthTestEmailResponse2 = SendNeonAuthTestEmailResponses[keyof SendNeonAuthTestEmailResponses]; export type SendNeonAuthEmailProviderTestData = { body: SendNeonAuthEmailProviderTestRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/email_provider/test'; }; export type SendNeonAuthEmailProviderTestErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type SendNeonAuthEmailProviderTestError = SendNeonAuthEmailProviderTestErrors[keyof SendNeonAuthEmailProviderTestErrors]; export type SendNeonAuthEmailProviderTestResponses = { /** * Response with the result of the test email send */ 200: SendNeonAuthTestEmailResponse; }; export type SendNeonAuthEmailProviderTestResponse = SendNeonAuthEmailProviderTestResponses[keyof SendNeonAuthEmailProviderTestResponses]; export type GetNeonAuthEmailAndPasswordConfigData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/email_and_password'; }; export type GetNeonAuthEmailAndPasswordConfigErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetNeonAuthEmailAndPasswordConfigError = GetNeonAuthEmailAndPasswordConfigErrors[keyof GetNeonAuthEmailAndPasswordConfigErrors]; export type GetNeonAuthEmailAndPasswordConfigResponses = { /** * Returns the email and password configuration for Neon Auth */ 200: NeonAuthEmailAndPasswordConfig; }; export type GetNeonAuthEmailAndPasswordConfigResponse = GetNeonAuthEmailAndPasswordConfigResponses[keyof GetNeonAuthEmailAndPasswordConfigResponses]; export type UpdateNeonAuthEmailAndPasswordConfigData = { body: NeonAuthEmailAndPasswordConfigUpdate; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/email_and_password'; }; export type UpdateNeonAuthEmailAndPasswordConfigErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthEmailAndPasswordConfigError = UpdateNeonAuthEmailAndPasswordConfigErrors[keyof UpdateNeonAuthEmailAndPasswordConfigErrors]; export type UpdateNeonAuthEmailAndPasswordConfigResponses = { /** * The email and password configuration has been updated */ 200: NeonAuthEmailAndPasswordConfig; }; export type UpdateNeonAuthEmailAndPasswordConfigResponse = UpdateNeonAuthEmailAndPasswordConfigResponses[keyof UpdateNeonAuthEmailAndPasswordConfigResponses]; export type GetNeonAuthEmailProviderData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/email_provider'; }; export type GetNeonAuthEmailProviderErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetNeonAuthEmailProviderError = GetNeonAuthEmailProviderErrors[keyof GetNeonAuthEmailProviderErrors]; export type GetNeonAuthEmailProviderResponses = { /** * Returns the email provider configuration for the Neon Auth */ 200: NeonAuthEmailServerConfigResponse; }; export type GetNeonAuthEmailProviderResponse = GetNeonAuthEmailProviderResponses[keyof GetNeonAuthEmailProviderResponses]; export type UpdateNeonAuthEmailProviderData = { body: NeonAuthEmailServerConfig; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/email_provider'; }; export type UpdateNeonAuthEmailProviderErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthEmailProviderError = UpdateNeonAuthEmailProviderErrors[keyof UpdateNeonAuthEmailProviderErrors]; export type UpdateNeonAuthEmailProviderResponses = { /** * The email provider configuration has been updated */ 200: NeonAuthEmailServerConfigResponse; }; export type UpdateNeonAuthEmailProviderResponse = UpdateNeonAuthEmailProviderResponses[keyof UpdateNeonAuthEmailProviderResponses]; export type DeleteNeonAuthIntegrationData = { body?: { /** * If true, deletes the `neon_auth` schema from the database */ delete_data?: boolean; }; path: { /** * The Neon project ID */ project_id: string; /** * The authentication provider name */ auth_provider: NeonAuthSupportedAuthProvider; }; query?: never; url: '/projects/{project_id}/auth/integration/{auth_provider}'; }; export type DeleteNeonAuthIntegrationErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteNeonAuthIntegrationError = DeleteNeonAuthIntegrationErrors[keyof DeleteNeonAuthIntegrationErrors]; export type DeleteNeonAuthIntegrationResponses = { /** * Delete the integration with the authentication provider */ 200: unknown; }; export type GetConnectionUriData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query: { /** * The branch ID. Defaults to your project's default `branch_id` if not specified. */ branch_id?: string; /** * The endpoint ID. Defaults to the read-write `endpoint_id` associated with the `branch_id` if not specified. */ endpoint_id?: string; /** * The database name */ database_name: string; /** * The role name */ role_name: string; /** * Adds the `-pooler` option to the connection URI when set to `true`, creating a pooled connection URI. */ pooled?: boolean; }; url: '/projects/{project_id}/connection_uri'; }; export type GetConnectionUriErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetConnectionUriError = GetConnectionUriErrors[keyof GetConnectionUriErrors]; export type GetConnectionUriResponses = { /** * Returned the connection URI */ 200: ConnectionUriResponse; }; export type GetConnectionUriResponse = GetConnectionUriResponses[keyof GetConnectionUriResponses]; export type GetNeonAuthAllowLocalhostData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/allow_localhost'; }; export type GetNeonAuthAllowLocalhostErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetNeonAuthAllowLocalhostError = GetNeonAuthAllowLocalhostErrors[keyof GetNeonAuthAllowLocalhostErrors]; export type GetNeonAuthAllowLocalhostResponses = { /** * The allow localhost configuration */ 200: NeonAuthAllowLocalhostResponse; }; export type GetNeonAuthAllowLocalhostResponse = GetNeonAuthAllowLocalhostResponses[keyof GetNeonAuthAllowLocalhostResponses]; export type UpdateNeonAuthAllowLocalhostData = { body: UpdateNeonAuthAllowLocalhostRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/allow_localhost'; }; export type UpdateNeonAuthAllowLocalhostErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthAllowLocalhostError = UpdateNeonAuthAllowLocalhostErrors[keyof UpdateNeonAuthAllowLocalhostErrors]; export type UpdateNeonAuthAllowLocalhostResponses = { /** * Updated the allow localhost configuration */ 200: NeonAuthAllowLocalhostResponse; }; export type UpdateNeonAuthAllowLocalhostResponse = UpdateNeonAuthAllowLocalhostResponses[keyof UpdateNeonAuthAllowLocalhostResponses]; export type GetNeonAuthPluginConfigsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/plugins'; }; export type GetNeonAuthPluginConfigsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetNeonAuthPluginConfigsError = GetNeonAuthPluginConfigsErrors[keyof GetNeonAuthPluginConfigsErrors]; export type GetNeonAuthPluginConfigsResponses = { /** * Returns all plugin configurations */ 200: NeonAuthPluginConfigs; }; export type GetNeonAuthPluginConfigsResponse = GetNeonAuthPluginConfigsResponses[keyof GetNeonAuthPluginConfigsResponses]; export type UpdateNeonAuthOrganizationPluginData = { body: NeonAuthOrganizationConfigUpdate; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/plugins/organization'; }; export type UpdateNeonAuthOrganizationPluginErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthOrganizationPluginError = UpdateNeonAuthOrganizationPluginErrors[keyof UpdateNeonAuthOrganizationPluginErrors]; export type UpdateNeonAuthOrganizationPluginResponses = { /** * The organization plugin configuration has been updated */ 200: NeonAuthOrganizationConfig; }; export type UpdateNeonAuthOrganizationPluginResponse = UpdateNeonAuthOrganizationPluginResponses[keyof UpdateNeonAuthOrganizationPluginResponses]; export type UpdateNeonAuthConfigData = { body: NeonAuthConfigUpdate; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/config'; }; export type UpdateNeonAuthConfigErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthConfigError = UpdateNeonAuthConfigErrors[keyof UpdateNeonAuthConfigErrors]; export type UpdateNeonAuthConfigResponses = { /** * The auth configuration has been updated */ 200: NeonAuthConfigResponse; }; export type UpdateNeonAuthConfigResponse = UpdateNeonAuthConfigResponses[keyof UpdateNeonAuthConfigResponses]; export type UpdateNeonAuthMagicLinkPluginData = { body: NeonAuthMagicLinkConfigUpdate; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/plugins/magic-link'; }; export type UpdateNeonAuthMagicLinkPluginErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthMagicLinkPluginError = UpdateNeonAuthMagicLinkPluginErrors[keyof UpdateNeonAuthMagicLinkPluginErrors]; export type UpdateNeonAuthMagicLinkPluginResponses = { /** * The magic link plugin configuration has been updated */ 200: NeonAuthMagicLinkConfig; }; export type UpdateNeonAuthMagicLinkPluginResponse = UpdateNeonAuthMagicLinkPluginResponses[keyof UpdateNeonAuthMagicLinkPluginResponses]; export type GetNeonAuthPhoneNumberPluginData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/plugins/phone-number'; }; export type GetNeonAuthPhoneNumberPluginErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetNeonAuthPhoneNumberPluginError = GetNeonAuthPhoneNumberPluginErrors[keyof GetNeonAuthPhoneNumberPluginErrors]; export type GetNeonAuthPhoneNumberPluginResponses = { /** * Returns the phone number plugin configuration */ 200: NeonAuthPhoneNumberConfig; }; export type GetNeonAuthPhoneNumberPluginResponse = GetNeonAuthPhoneNumberPluginResponses[keyof GetNeonAuthPhoneNumberPluginResponses]; export type UpdateNeonAuthPhoneNumberPluginData = { body: NeonAuthPhoneNumberConfigUpdate; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/plugins/phone-number'; }; export type UpdateNeonAuthPhoneNumberPluginErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthPhoneNumberPluginError = UpdateNeonAuthPhoneNumberPluginErrors[keyof UpdateNeonAuthPhoneNumberPluginErrors]; export type UpdateNeonAuthPhoneNumberPluginResponses = { /** * The phone number plugin configuration has been updated */ 200: NeonAuthPhoneNumberConfig; }; export type UpdateNeonAuthPhoneNumberPluginResponse = UpdateNeonAuthPhoneNumberPluginResponses[keyof UpdateNeonAuthPhoneNumberPluginResponses]; export type GetNeonAuthOAuthProviderPluginData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/plugins/oauth-provider'; }; export type GetNeonAuthOAuthProviderPluginErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetNeonAuthOAuthProviderPluginError = GetNeonAuthOAuthProviderPluginErrors[keyof GetNeonAuthOAuthProviderPluginErrors]; export type GetNeonAuthOAuthProviderPluginResponses = { /** * Returns the OAuth provider plugin configuration */ 200: NeonAuthOAuthProviderConfig; }; export type GetNeonAuthOAuthProviderPluginResponse = GetNeonAuthOAuthProviderPluginResponses[keyof GetNeonAuthOAuthProviderPluginResponses]; export type UpdateNeonAuthOAuthProviderPluginData = { body: NeonAuthOAuthProviderConfigUpdate; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/plugins/oauth-provider'; }; export type UpdateNeonAuthOAuthProviderPluginErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthOAuthProviderPluginError = UpdateNeonAuthOAuthProviderPluginErrors[keyof UpdateNeonAuthOAuthProviderPluginErrors]; export type UpdateNeonAuthOAuthProviderPluginResponses = { /** * The OAuth provider plugin configuration has been updated */ 200: NeonAuthOAuthProviderConfig; }; export type UpdateNeonAuthOAuthProviderPluginResponse = UpdateNeonAuthOAuthProviderPluginResponses[keyof UpdateNeonAuthOAuthProviderPluginResponses]; export type ListNeonAuthOAuthClientsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/oauth-provider/clients'; }; export type ListNeonAuthOAuthClientsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListNeonAuthOAuthClientsError = ListNeonAuthOAuthClientsErrors[keyof ListNeonAuthOAuthClientsErrors]; export type ListNeonAuthOAuthClientsResponses = { /** * Returns the OAuth clients */ 200: ListNeonAuthOAuthClientsResponse; }; export type ListNeonAuthOAuthClientsResponse2 = ListNeonAuthOAuthClientsResponses[keyof ListNeonAuthOAuthClientsResponses]; export type CreateNeonAuthOAuthClientData = { body: NeonAuthOAuthClientCreateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/oauth-provider/clients'; }; export type CreateNeonAuthOAuthClientErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateNeonAuthOAuthClientError = CreateNeonAuthOAuthClientErrors[keyof CreateNeonAuthOAuthClientErrors]; export type CreateNeonAuthOAuthClientResponses = { /** * The OAuth client has been created */ 201: NeonAuthOAuthClientCreated; }; export type CreateNeonAuthOAuthClientResponse = CreateNeonAuthOAuthClientResponses[keyof CreateNeonAuthOAuthClientResponses]; export type DeleteNeonAuthOAuthClientData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The OAuth client ID */ client_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/oauth-provider/clients/{client_id}'; }; export type DeleteNeonAuthOAuthClientErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteNeonAuthOAuthClientError = DeleteNeonAuthOAuthClientErrors[keyof DeleteNeonAuthOAuthClientErrors]; export type DeleteNeonAuthOAuthClientResponses = { /** * The OAuth client has been deleted */ 204: void; }; export type DeleteNeonAuthOAuthClientResponse = DeleteNeonAuthOAuthClientResponses[keyof DeleteNeonAuthOAuthClientResponses]; export type GetNeonAuthOAuthClientData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The OAuth client ID */ client_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/oauth-provider/clients/{client_id}'; }; export type GetNeonAuthOAuthClientErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetNeonAuthOAuthClientError = GetNeonAuthOAuthClientErrors[keyof GetNeonAuthOAuthClientErrors]; export type GetNeonAuthOAuthClientResponses = { /** * Returns the OAuth client */ 200: NeonAuthOAuthClient; }; export type GetNeonAuthOAuthClientResponse = GetNeonAuthOAuthClientResponses[keyof GetNeonAuthOAuthClientResponses]; export type UpdateNeonAuthOAuthClientData = { body: NeonAuthOAuthClientUpdateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The OAuth client ID */ client_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/oauth-provider/clients/{client_id}'; }; export type UpdateNeonAuthOAuthClientErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthOAuthClientError = UpdateNeonAuthOAuthClientErrors[keyof UpdateNeonAuthOAuthClientErrors]; export type UpdateNeonAuthOAuthClientResponses = { /** * The OAuth client has been updated */ 200: NeonAuthOAuthClient; }; export type UpdateNeonAuthOAuthClientResponse = UpdateNeonAuthOAuthClientResponses[keyof UpdateNeonAuthOAuthClientResponses]; export type RotateNeonAuthOAuthClientSecretData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The OAuth client ID */ client_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/oauth-provider/clients/{client_id}/rotate_secret'; }; export type RotateNeonAuthOAuthClientSecretErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RotateNeonAuthOAuthClientSecretError = RotateNeonAuthOAuthClientSecretErrors[keyof RotateNeonAuthOAuthClientSecretErrors]; export type RotateNeonAuthOAuthClientSecretResponses = { /** * The client secret has been rotated */ 200: NeonAuthOAuthClientSecret; }; export type RotateNeonAuthOAuthClientSecretResponse = RotateNeonAuthOAuthClientSecretResponses[keyof RotateNeonAuthOAuthClientSecretResponses]; export type GetNeonAuthWebhookConfigData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/webhooks'; }; export type GetNeonAuthWebhookConfigErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetNeonAuthWebhookConfigError = GetNeonAuthWebhookConfigErrors[keyof GetNeonAuthWebhookConfigErrors]; export type GetNeonAuthWebhookConfigResponses = { /** * Returns webhook configuration for Neon Auth */ 200: NeonAuthWebhookConfig; }; export type GetNeonAuthWebhookConfigResponse = GetNeonAuthWebhookConfigResponses[keyof GetNeonAuthWebhookConfigResponses]; export type UpdateNeonAuthWebhookConfigData = { body: NeonAuthWebhookConfig; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/auth/webhooks'; }; export type UpdateNeonAuthWebhookConfigErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateNeonAuthWebhookConfigError = UpdateNeonAuthWebhookConfigErrors[keyof UpdateNeonAuthWebhookConfigErrors]; export type UpdateNeonAuthWebhookConfigResponses = { /** * Returns the updated webhook configuration */ 200: NeonAuthWebhookConfig; }; export type UpdateNeonAuthWebhookConfigResponse = UpdateNeonAuthWebhookConfigResponses[keyof UpdateNeonAuthWebhookConfigResponses]; export type ListProjectBranchesData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: { /** * Search by branch `name` or `id`. You can specify partial `name` or `id` values to filter results. */ search?: string; /** * Sort the branches by sort_field. If not provided, branches will be sorted by updated_at descending order */ sort_by?: 'name' | 'created_at' | 'updated_at'; /** * 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. */ cursor?: string; /** * Defines the sorting order of entities. */ sort_order?: 'asc' | 'desc'; /** * The maximum number of records to be returned in the response */ limit?: number; /** * If true, return recoverable deleted branches too (soft-deleted within the recovery window). * If false or not provided, return only active (non-deleted) branches. * * This parameter is part of the Branch Recovery feature, which is in preview and not available to all users. * */ include_deleted?: boolean; }; url: '/projects/{project_id}/branches'; }; export type ListProjectBranchesErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectBranchesError = ListProjectBranchesErrors[keyof ListProjectBranchesErrors]; export type ListProjectBranchesResponses = { /** * Returned a list of branches for the specified project */ 200: BranchesResponse & AnnotationsMapResponse & CursorPaginationResponse; }; export type ListProjectBranchesResponse = ListProjectBranchesResponses[keyof ListProjectBranchesResponses]; export type CreateProjectBranchData = { body?: BranchCreateRequest & AnnotationCreateValueRequest; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/branches'; }; export type CreateProjectBranchErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateProjectBranchError = CreateProjectBranchErrors[keyof CreateProjectBranchErrors]; export type CreateProjectBranchResponses = { /** * Created a branch. An endpoint is only created if it was specified in the request. */ 201: BranchResponse & EndpointsResponse & OperationsResponse & RolesResponse & DatabasesResponse & ConnectionUrisOptionalResponse; }; export type CreateProjectBranchResponse = CreateProjectBranchResponses[keyof CreateProjectBranchResponses]; export type CreateProjectBranchAnonymizedData = { body: BranchAnonymizedCreateRequest; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/branch_anonymized'; }; export type CreateProjectBranchAnonymizedErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateProjectBranchAnonymizedError = CreateProjectBranchAnonymizedErrors[keyof CreateProjectBranchAnonymizedErrors]; export type CreateProjectBranchAnonymizedResponses = { /** * Created a branch. An endpoint is only created if it was specified in the request. */ 201: BranchResponse & EndpointsResponse & OperationsResponse & RolesResponse & DatabasesResponse & ConnectionUrisOptionalResponse; }; export type CreateProjectBranchAnonymizedResponse = CreateProjectBranchAnonymizedResponses[keyof CreateProjectBranchAnonymizedResponses]; export type CountProjectBranchesData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: { /** * Count branches matching the `name` in search query */ search?: string; }; url: '/projects/{project_id}/branches/count'; }; export type CountProjectBranchesErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CountProjectBranchesError = CountProjectBranchesErrors[keyof CountProjectBranchesErrors]; export type CountProjectBranchesResponses = { /** * Returned a count of branches for the specified project */ 200: BranchesCountResponse; }; export type CountProjectBranchesResponse = CountProjectBranchesResponses[keyof CountProjectBranchesResponses]; export type DeleteProjectBranchData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}'; }; export type DeleteProjectBranchErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectBranchError = DeleteProjectBranchErrors[keyof DeleteProjectBranchErrors]; export type DeleteProjectBranchResponses = { /** * Deleted the specified branch */ 200: BranchOperations; /** * Returned if the branch doesn't exist or has already been deleted */ 204: void; }; export type DeleteProjectBranchResponse = DeleteProjectBranchResponses[keyof DeleteProjectBranchResponses]; export type GetProjectBranchData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}'; }; export type GetProjectBranchErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchError = GetProjectBranchErrors[keyof GetProjectBranchErrors]; export type GetProjectBranchResponses = { /** * Returned information about the specified branch */ 200: BranchResponse & AnnotationResponse; }; export type GetProjectBranchResponse = GetProjectBranchResponses[keyof GetProjectBranchResponses]; export type UpdateProjectBranchData = { body: BranchUpdateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}'; }; export type UpdateProjectBranchErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateProjectBranchError = UpdateProjectBranchErrors[keyof UpdateProjectBranchErrors]; export type UpdateProjectBranchResponses = { /** * Updated the specified branch */ 200: BranchOperations; }; export type UpdateProjectBranchResponse = UpdateProjectBranchResponses[keyof UpdateProjectBranchResponses]; export type RestoreProjectBranchData = { body: BranchRestoreRequest; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/restore'; }; export type RestoreProjectBranchErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RestoreProjectBranchError = RestoreProjectBranchErrors[keyof RestoreProjectBranchErrors]; export type RestoreProjectBranchResponses = { /** * Updated the specified branch */ 200: BranchOperations; }; export type RestoreProjectBranchResponse = RestoreProjectBranchResponses[keyof RestoreProjectBranchResponses]; export type GetProjectBranchSchemaData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query: { /** * Name of the database for which the schema is retrieved */ db_name: string; /** * The Log Sequence Number (LSN) for which the schema is retrieved * */ lsn?: string; /** * The point in time for which the schema is retrieved * */ timestamp?: string; /** * The format of the schema to retrieve. Possible values: * - `sql` (default) * - `json` * */ format?: string; }; url: '/projects/{project_id}/branches/{branch_id}/schema'; }; export type GetProjectBranchSchemaErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchSchemaError = GetProjectBranchSchemaErrors[keyof GetProjectBranchSchemaErrors]; export type GetProjectBranchSchemaResponses = { /** * Schema definition */ 200: BranchSchemaResponse; }; export type GetProjectBranchSchemaResponse = GetProjectBranchSchemaResponses[keyof GetProjectBranchSchemaResponses]; export type GetProjectBranchSchemaComparisonData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query: { /** * The branch ID to compare the schema with */ base_branch_id?: string; /** * Name of the database for which the schema is retrieved */ db_name: string; /** * The Log Sequence Number (LSN) for which the schema is retrieved * */ lsn?: string; /** * The point in time for which the schema is retrieved * */ timestamp?: string; /** * The Log Sequence Number (LSN) for the base branch schema * */ base_lsn?: string; /** * The point in time for the base branch schema * */ base_timestamp?: string; }; url: '/projects/{project_id}/branches/{branch_id}/compare_schema'; }; export type GetProjectBranchSchemaComparisonErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchSchemaComparisonError = GetProjectBranchSchemaComparisonErrors[keyof GetProjectBranchSchemaComparisonErrors]; export type GetProjectBranchSchemaComparisonResponses = { /** * Difference between the schemas */ 200: BranchSchemaCompareResponse; }; export type GetProjectBranchSchemaComparisonResponse = GetProjectBranchSchemaComparisonResponses[keyof GetProjectBranchSchemaComparisonResponses]; export type GetMaskingRulesData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/masking_rules'; }; export type GetMaskingRulesErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetMaskingRulesError = GetMaskingRulesErrors[keyof GetMaskingRulesErrors]; export type GetMaskingRulesResponses = { /** * Masking rules retrieved successfully */ 200: MaskingRulesResponse; }; export type GetMaskingRulesResponse = GetMaskingRulesResponses[keyof GetMaskingRulesResponses]; export type UpdateMaskingRulesData = { body: MaskingRulesUpdateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/masking_rules'; }; export type UpdateMaskingRulesErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateMaskingRulesError = UpdateMaskingRulesErrors[keyof UpdateMaskingRulesErrors]; export type UpdateMaskingRulesResponses = { /** * Masking rules updated successfully */ 200: MaskingRulesResponse; }; export type UpdateMaskingRulesResponse = UpdateMaskingRulesResponses[keyof UpdateMaskingRulesResponses]; export type GetAnonymizedBranchStatusData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/anonymized_status'; }; export type GetAnonymizedBranchStatusErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetAnonymizedBranchStatusError = GetAnonymizedBranchStatusErrors[keyof GetAnonymizedBranchStatusErrors]; export type GetAnonymizedBranchStatusResponses = { /** * Anonymized branch status retrieved successfully */ 200: AnonymizedBranchStatusResponse; }; export type GetAnonymizedBranchStatusResponse = GetAnonymizedBranchStatusResponses[keyof GetAnonymizedBranchStatusResponses]; export type StartAnonymizationData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/anonymize'; }; export type StartAnonymizationErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type StartAnonymizationError = StartAnonymizationErrors[keyof StartAnonymizationErrors]; export type StartAnonymizationResponses = { /** * Anonymization started successfully */ 200: AnonymizedBranchStatusResponse; }; export type StartAnonymizationResponse = StartAnonymizationResponses[keyof StartAnonymizationResponses]; export type SetDefaultProjectBranchData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/set_as_default'; }; export type SetDefaultProjectBranchErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type SetDefaultProjectBranchError = SetDefaultProjectBranchErrors[keyof SetDefaultProjectBranchErrors]; export type SetDefaultProjectBranchResponses = { /** * Updated the specified branch */ 200: BranchOperations; }; export type SetDefaultProjectBranchResponse = SetDefaultProjectBranchResponses[keyof SetDefaultProjectBranchResponses]; export type FinalizeRestoreBranchData = { body?: { /** * Name for the replaced branch. If omitted, a unique name is generated. */ name?: string; }; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/finalize_restore'; }; export type FinalizeRestoreBranchErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type FinalizeRestoreBranchError = FinalizeRestoreBranchErrors[keyof FinalizeRestoreBranchErrors]; export type FinalizeRestoreBranchResponses = { /** * OK */ 200: OperationsResponse; }; export type FinalizeRestoreBranchResponse = FinalizeRestoreBranchResponses[keyof FinalizeRestoreBranchResponses]; export type ListProjectBranchEndpointsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/endpoints'; }; export type ListProjectBranchEndpointsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectBranchEndpointsError = ListProjectBranchEndpointsErrors[keyof ListProjectBranchEndpointsErrors]; export type ListProjectBranchEndpointsResponses = { /** * Returned a list of endpoints for the specified branch */ 200: EndpointsResponse; }; export type ListProjectBranchEndpointsResponse = ListProjectBranchEndpointsResponses[keyof ListProjectBranchEndpointsResponses]; export type ListProjectBranchDatabasesData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/databases'; }; export type ListProjectBranchDatabasesErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectBranchDatabasesError = ListProjectBranchDatabasesErrors[keyof ListProjectBranchDatabasesErrors]; export type ListProjectBranchDatabasesResponses = { /** * Returned a list of databases of the specified branch */ 200: DatabasesResponse; }; export type ListProjectBranchDatabasesResponse = ListProjectBranchDatabasesResponses[keyof ListProjectBranchDatabasesResponses]; export type CreateProjectBranchDatabaseData = { body: DatabaseCreateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/databases'; }; export type CreateProjectBranchDatabaseErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateProjectBranchDatabaseError = CreateProjectBranchDatabaseErrors[keyof CreateProjectBranchDatabaseErrors]; export type CreateProjectBranchDatabaseResponses = { /** * Created a database in the specified branch */ 201: DatabaseOperations; }; export type CreateProjectBranchDatabaseResponse = CreateProjectBranchDatabaseResponses[keyof CreateProjectBranchDatabaseResponses]; export type DeleteProjectBranchDatabaseData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; /** * The database name */ database_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/databases/{database_name}'; }; export type DeleteProjectBranchDatabaseErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectBranchDatabaseError = DeleteProjectBranchDatabaseErrors[keyof DeleteProjectBranchDatabaseErrors]; export type DeleteProjectBranchDatabaseResponses = { /** * Deleted the specified database */ 200: DatabaseOperations; /** * Returned if the database doesn't exist or has already been deleted */ 204: void; }; export type DeleteProjectBranchDatabaseResponse = DeleteProjectBranchDatabaseResponses[keyof DeleteProjectBranchDatabaseResponses]; export type GetProjectBranchDatabaseData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; /** * The database name */ database_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/databases/{database_name}'; }; export type GetProjectBranchDatabaseErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchDatabaseError = GetProjectBranchDatabaseErrors[keyof GetProjectBranchDatabaseErrors]; export type GetProjectBranchDatabaseResponses = { /** * Returned the database details */ 200: DatabaseResponse; }; export type GetProjectBranchDatabaseResponse = GetProjectBranchDatabaseResponses[keyof GetProjectBranchDatabaseResponses]; export type UpdateProjectBranchDatabaseData = { body: DatabaseUpdateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; /** * The database name */ database_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/databases/{database_name}'; }; export type UpdateProjectBranchDatabaseErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateProjectBranchDatabaseError = UpdateProjectBranchDatabaseErrors[keyof UpdateProjectBranchDatabaseErrors]; export type UpdateProjectBranchDatabaseResponses = { /** * Updated the database */ 200: DatabaseOperations; }; export type UpdateProjectBranchDatabaseResponse = UpdateProjectBranchDatabaseResponses[keyof UpdateProjectBranchDatabaseResponses]; export type ListProjectBranchRolesData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/roles'; }; export type ListProjectBranchRolesErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectBranchRolesError = ListProjectBranchRolesErrors[keyof ListProjectBranchRolesErrors]; export type ListProjectBranchRolesResponses = { /** * Returned a list of roles from the specified branch. */ 200: RolesResponse; }; export type ListProjectBranchRolesResponse = ListProjectBranchRolesResponses[keyof ListProjectBranchRolesResponses]; export type CreateProjectBranchRoleData = { body: RoleCreateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/roles'; }; export type CreateProjectBranchRoleErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateProjectBranchRoleError = CreateProjectBranchRoleErrors[keyof CreateProjectBranchRoleErrors]; export type CreateProjectBranchRoleResponses = { /** * Created a role in the specified branch */ 201: RoleOperations; }; export type CreateProjectBranchRoleResponse = CreateProjectBranchRoleResponses[keyof CreateProjectBranchRoleResponses]; export type DeleteProjectBranchRoleData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; /** * The role name */ role_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/roles/{role_name}'; }; export type DeleteProjectBranchRoleErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectBranchRoleError = DeleteProjectBranchRoleErrors[keyof DeleteProjectBranchRoleErrors]; export type DeleteProjectBranchRoleResponses = { /** * Deleted the specified role from the branch */ 200: RoleOperations; /** * Returned if the role doesn't exist or has already been deleted */ 204: void; }; export type DeleteProjectBranchRoleResponse = DeleteProjectBranchRoleResponses[keyof DeleteProjectBranchRoleResponses]; export type GetProjectBranchRoleData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; /** * The role name */ role_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/roles/{role_name}'; }; export type GetProjectBranchRoleErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchRoleError = GetProjectBranchRoleErrors[keyof GetProjectBranchRoleErrors]; export type GetProjectBranchRoleResponses = { /** * Returned details for the specified role */ 200: RoleResponse; }; export type GetProjectBranchRoleResponse = GetProjectBranchRoleResponses[keyof GetProjectBranchRoleResponses]; export type GetProjectBranchRolePasswordData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; /** * The role name */ role_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reveal_password'; }; export type GetProjectBranchRolePasswordErrors = { /** * Role not found */ 404: GeneralError; /** * Storing passwords is disabled */ 412: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchRolePasswordError = GetProjectBranchRolePasswordErrors[keyof GetProjectBranchRolePasswordErrors]; export type GetProjectBranchRolePasswordResponses = { /** * Returned password for the specified role */ 200: RolePasswordResponse; }; export type GetProjectBranchRolePasswordResponse = GetProjectBranchRolePasswordResponses[keyof GetProjectBranchRolePasswordResponses]; export type DisableProjectBranchRealtimeData = { body?: never; path: { /** * The project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/realtime'; }; export type DisableProjectBranchRealtimeErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DisableProjectBranchRealtimeError = DisableProjectBranchRealtimeErrors[keyof DisableProjectBranchRealtimeErrors]; export type DisableProjectBranchRealtimeResponses = { /** * Realtime deprovisioning is queued */ 202: unknown; }; export type GetProjectBranchRealtimeData = { body?: never; path: { /** * The project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/realtime'; }; export type GetProjectBranchRealtimeErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchRealtimeError = GetProjectBranchRealtimeErrors[keyof GetProjectBranchRealtimeErrors]; export type GetProjectBranchRealtimeResponses = { /** * Realtime state of the branch */ 200: Realtime; }; export type GetProjectBranchRealtimeResponse = GetProjectBranchRealtimeResponses[keyof GetProjectBranchRealtimeResponses]; export type EnableProjectBranchRealtimeData = { body?: RealtimeOptions; path: { /** * The project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/realtime'; }; export type EnableProjectBranchRealtimeErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type EnableProjectBranchRealtimeError = EnableProjectBranchRealtimeErrors[keyof EnableProjectBranchRealtimeErrors]; export type EnableProjectBranchRealtimeResponses = { /** * Realtime provisioning is queued */ 202: unknown; }; export type GetProjectBranchRealtimeSecretData = { body?: never; path: { /** * The project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/realtime/secret'; }; export type GetProjectBranchRealtimeSecretErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchRealtimeSecretError = GetProjectBranchRealtimeSecretErrors[keyof GetProjectBranchRealtimeSecretErrors]; export type GetProjectBranchRealtimeSecretResponses = { /** * The branch's Realtime shared secret */ 200: RealtimeSecret; }; export type GetProjectBranchRealtimeSecretResponse = GetProjectBranchRealtimeSecretResponses[keyof GetProjectBranchRealtimeSecretResponses]; export type RotateProjectBranchRealtimeSecretData = { body?: never; path: { /** * The project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/realtime/rotate_secret'; }; export type RotateProjectBranchRealtimeSecretErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RotateProjectBranchRealtimeSecretError = RotateProjectBranchRealtimeSecretErrors[keyof RotateProjectBranchRealtimeSecretErrors]; export type RotateProjectBranchRealtimeSecretResponses = { /** * Realtime secret rotation is queued */ 202: unknown; }; export type ResetProjectBranchRolePasswordData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; /** * The role name */ role_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reset_password'; }; export type ResetProjectBranchRolePasswordErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ResetProjectBranchRolePasswordError = ResetProjectBranchRolePasswordErrors[keyof ResetProjectBranchRolePasswordErrors]; export type ResetProjectBranchRolePasswordResponses = { /** * Reset the password for the specified role */ 200: RoleOperations; }; export type ResetProjectBranchRolePasswordResponse = ResetProjectBranchRolePasswordResponses[keyof ResetProjectBranchRolePasswordResponses]; export type ListProjectVpcEndpointsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/vpc_endpoints'; }; export type ListProjectVpcEndpointsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectVpcEndpointsError = ListProjectVpcEndpointsErrors[keyof ListProjectVpcEndpointsErrors]; export type ListProjectVpcEndpointsResponses = { /** * Returned VPC endpoint restrictions for the specified project */ 200: VpcEndpointsResponse; }; export type ListProjectVpcEndpointsResponse = ListProjectVpcEndpointsResponses[keyof ListProjectVpcEndpointsResponses]; export type DeleteProjectVpcEndpointData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The VPC endpoint ID */ vpc_endpoint_id: string; }; query?: never; url: '/projects/{project_id}/vpc_endpoints/{vpc_endpoint_id}'; }; export type DeleteProjectVpcEndpointErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectVpcEndpointError = DeleteProjectVpcEndpointErrors[keyof DeleteProjectVpcEndpointErrors]; export type DeleteProjectVpcEndpointResponses = { /** * Removed the VPC endpoint restriction from the specified Neon project */ 200: unknown; }; export type AssignProjectVpcEndpointData = { body: VpcEndpointAssignment; path: { /** * The Neon project ID */ project_id: string; /** * The VPC endpoint ID */ vpc_endpoint_id: string; }; query?: never; url: '/projects/{project_id}/vpc_endpoints/{vpc_endpoint_id}'; }; export type AssignProjectVpcEndpointErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type AssignProjectVpcEndpointError = AssignProjectVpcEndpointErrors[keyof AssignProjectVpcEndpointErrors]; export type AssignProjectVpcEndpointResponses = { /** * Configured the specified VPC endpoint as a restriction for the specified project. */ 200: unknown; }; export type ListProjectEndpointsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/endpoints'; }; export type ListProjectEndpointsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectEndpointsError = ListProjectEndpointsErrors[keyof ListProjectEndpointsErrors]; export type ListProjectEndpointsResponses = { /** * Returned a list of endpoints for the specified project */ 200: EndpointsResponse; }; export type ListProjectEndpointsResponse = ListProjectEndpointsResponses[keyof ListProjectEndpointsResponses]; export type CreateProjectEndpointData = { body: EndpointCreateRequest; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/endpoints'; }; export type CreateProjectEndpointErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateProjectEndpointError = CreateProjectEndpointErrors[keyof CreateProjectEndpointErrors]; export type CreateProjectEndpointResponses = { /** * Created a compute endpoint */ 201: EndpointOperations; }; export type CreateProjectEndpointResponse = CreateProjectEndpointResponses[keyof CreateProjectEndpointResponses]; export type DeleteProjectEndpointData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The endpoint ID */ endpoint_id: string; }; query?: never; url: '/projects/{project_id}/endpoints/{endpoint_id}'; }; export type DeleteProjectEndpointErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectEndpointError = DeleteProjectEndpointErrors[keyof DeleteProjectEndpointErrors]; export type DeleteProjectEndpointResponses = { /** * Deleted the specified compute endpoint */ 200: EndpointOperations; /** * Returned if the endpoint doesn't exist or has already been deleted */ 204: void; }; export type DeleteProjectEndpointResponse = DeleteProjectEndpointResponses[keyof DeleteProjectEndpointResponses]; export type GetProjectEndpointData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The endpoint ID */ endpoint_id: string; }; query?: never; url: '/projects/{project_id}/endpoints/{endpoint_id}'; }; export type GetProjectEndpointErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectEndpointError = GetProjectEndpointErrors[keyof GetProjectEndpointErrors]; export type GetProjectEndpointResponses = { /** * Returned information about the specified endpoint */ 200: EndpointResponse; }; export type GetProjectEndpointResponse = GetProjectEndpointResponses[keyof GetProjectEndpointResponses]; export type UpdateProjectEndpointData = { body: EndpointUpdateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The endpoint ID */ endpoint_id: string; }; query?: never; url: '/projects/{project_id}/endpoints/{endpoint_id}'; }; export type UpdateProjectEndpointErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateProjectEndpointError = UpdateProjectEndpointErrors[keyof UpdateProjectEndpointErrors]; export type UpdateProjectEndpointResponses = { /** * Updated the specified compute endpoint */ 200: EndpointOperations; }; export type UpdateProjectEndpointResponse = UpdateProjectEndpointResponses[keyof UpdateProjectEndpointResponses]; export type StartProjectEndpointData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The endpoint ID */ endpoint_id: string; }; query?: never; url: '/projects/{project_id}/endpoints/{endpoint_id}/start'; }; export type StartProjectEndpointErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type StartProjectEndpointError = StartProjectEndpointErrors[keyof StartProjectEndpointErrors]; export type StartProjectEndpointResponses = { /** * Started the specified compute endpoint */ 200: EndpointOperations; }; export type StartProjectEndpointResponse = StartProjectEndpointResponses[keyof StartProjectEndpointResponses]; export type SuspendProjectEndpointData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The endpoint ID */ endpoint_id: string; }; query?: never; url: '/projects/{project_id}/endpoints/{endpoint_id}/suspend'; }; export type SuspendProjectEndpointErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type SuspendProjectEndpointError = SuspendProjectEndpointErrors[keyof SuspendProjectEndpointErrors]; export type SuspendProjectEndpointResponses = { /** * Suspended the specified endpoint */ 200: EndpointOperations; }; export type SuspendProjectEndpointResponse = SuspendProjectEndpointResponses[keyof SuspendProjectEndpointResponses]; export type RestartProjectEndpointData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The endpoint ID */ endpoint_id: string; }; query?: never; url: '/projects/{project_id}/endpoints/{endpoint_id}/restart'; }; export type RestartProjectEndpointErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RestartProjectEndpointError = RestartProjectEndpointErrors[keyof RestartProjectEndpointErrors]; export type RestartProjectEndpointResponses = { /** * Restarted endpoint */ 200: EndpointOperations; }; export type RestartProjectEndpointResponse = RestartProjectEndpointResponses[keyof RestartProjectEndpointResponses]; export type GetConsumptionHistoryPerProjectData = { body?: never; path?: never; query: { /** * Specify the cursor value from the previous response to get the next batch of projects. */ cursor?: string; /** * Specify a value from 1 to 100 to limit number of projects in the response. */ limit?: number; /** * Specify a list of project IDs to filter the response. * If omitted, the response will contain all projects. * A list of project IDs can be specified as an array of parameter values or as a comma-separated list in a single parameter value. * - As an array of parameter values: `project_ids=cold-poetry-09157238%20&project_ids=quiet-snow-71788278` * - As a comma-separated list in a single parameter value: `project_ids=cold-poetry-09157238,quiet-snow-71788278` * */ project_ids?: Array; /** * Specify the start `date-time` for the consumption period. * The `date-time` value is rounded according to the specified `granularity`. * For example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`. * The specified `date-time` value must respect the specified `granularity`: * - For `hourly`, consumption metrics are limited to the last 168 hours. * - For `daily`, consumption metrics are limited to the last 60 days. * - For `monthly`, consumption metrics are limited to the last year. * * The consumption history is available starting from `March 1, 2024, at 00:00:00 UTC`. * */ from: string; /** * Specify the end `date-time` for the consumption period. * The `date-time` value is rounded according to the specified granularity. * For example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`. * The specified `date-time` value must respect the specified `granularity`: * - For `hourly`, consumption metrics are limited to the last 168 hours. * - For `daily`, consumption metrics are limited to the last 60 days. * - For `monthly`, consumption metrics are limited to the last year. * */ to: string; /** * Specify the granularity of consumption metrics. * Hourly, daily, and monthly metrics are available for the last 168 hours, 60 days, * and 1 year, respectively. * */ granularity: ConsumptionHistoryGranularity; /** * Specify the organization for which the project consumption metrics should be returned. * If this parameter is not provided, the endpoint will return the metrics for the * authenticated user's projects. * */ org_id?: string; /** * The field is deprecated and no longer has any effect: the only metric it used to add * (`data_storage_bytes_hour`) is retired and always returns 0. Please use `metrics` instead. * If `metrics` is specified, this field is ignored. * * * @deprecated */ include_v1_metrics?: boolean; /** * Specify a list of metrics to include in the response. * If omitted, active_time, compute_time, written_data are returned. * Possible values: * - `active_time_seconds` * - `compute_time_seconds` * - `written_data_bytes` * - `synthetic_storage_size_bytes` (deprecated: always returns 0; use the consumption history v2 endpoints instead) * - `data_storage_bytes_hour` (deprecated: always returns 0; use the consumption history v2 endpoints instead) * - `logical_size_bytes` * - `logical_size_bytes_hour` * * A list of metrics can be specified as an array of parameter values or as a comma-separated list in a single parameter value. * - As an array of parameter values: `metrics=cpu_seconds&metrics=ram_bytes` * - As a comma-separated list in a single parameter value: `metrics=cpu_seconds,ram_bytes` * */ metrics?: ConsumptionHistoryQueryMetrics; }; url: '/consumption_history/projects'; }; export type GetConsumptionHistoryPerProjectErrors = { /** * This endpoint is not available. It is only supported with Scale, Business, and Enterprise plan accounts. */ 403: GeneralError; /** * Account is not a member of the organization specified by `org_id`. */ 404: GeneralError; /** * The specified `date-time` range is outside the boundaries of the specified `granularity`. * Adjust your `from` and `to` values or select a different `granularity`. * */ 406: GeneralError; /** * Too many requests */ 429: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetConsumptionHistoryPerProjectError = GetConsumptionHistoryPerProjectErrors[keyof GetConsumptionHistoryPerProjectErrors]; export type GetConsumptionHistoryPerProjectResponses = { /** * Returned project consumption metrics for the Neon account */ 200: ConsumptionHistoryPerProjectResponse & PaginationResponse; }; export type GetConsumptionHistoryPerProjectResponse = GetConsumptionHistoryPerProjectResponses[keyof GetConsumptionHistoryPerProjectResponses]; export type GetConsumptionHistoryPerProjectV2Data = { body?: never; path?: never; query: { /** * Cursor from the previous response (`pagination.cursor`). Pass it to fetch the next page * of projects. Pages are ordered by project creation order (newest first). * */ cursor?: string; /** * Maximum number of projects per page. Allowed range: 1 to 100. Default: 10. * */ limit?: number; /** * Optional project IDs to filter the response (up to 100). If omitted, projects in the * organization are included across pages (use `cursor` and `limit`). * * Pass multiple IDs as repeated query parameters or a comma-separated list: * - `project_ids=cold-poetry-09157238&project_ids=quiet-snow-71788278` * - `project_ids=cold-poetry-09157238,quiet-snow-71788278` * */ project_ids?: Array; /** * Specify the start `date-time` for the consumption period. * The `date-time` value is rounded according to the specified `granularity`. * For example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`. * The specified `date-time` value must respect the specified `granularity`: * - For `hourly`, consumption metrics are limited to the last 168 hours. * - For `daily`, consumption metrics are limited to the last 60 days. * - For `monthly`, consumption metrics are limited to the last year. * * The earliest allowed `from` value is `March 1, 2024, at 00:00:00 UTC`. * Metrics are returned from when the account upgraded to an eligible plan, which may be * later than that date. * */ from: string; /** * Specify the end `date-time` for the consumption period. * The `date-time` value is rounded according to the specified `granularity`. * For example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`. * The specified `date-time` value must respect the specified `granularity`: * - For `hourly`, consumption metrics are limited to the last 168 hours. * - For `daily`, consumption metrics are limited to the last 60 days. * - For `monthly`, consumption metrics are limited to the last year. * */ to: string; /** * Specify the granularity of consumption metrics. * Hourly, daily, and monthly metrics are available for the last 168 hours, 60 days, * and 1 year, respectively. * */ granularity: ConsumptionHistoryGranularity; /** * Organization ID. Metrics are returned for projects in this organization. * */ org_id: string; /** * Required. List the metrics to return. Supported values: * - `compute_unit_seconds` * - `root_branch_bytes_month` * - `child_branch_bytes_month` * - `instant_restore_bytes_month` * - `public_network_transfer_bytes` * - `private_network_transfer_bytes` * - `extra_branches_month` * - `snapshot_storage_bytes_month` * - `functions_active_capacity_microseconds` * - `functions_waiting_capacity_microseconds` * - `functions_invocations` * - `functions_egress_bytes` * * Pass multiple values as repeated query parameters or a comma-separated list: * - `metrics=compute_unit_seconds&metrics=extra_branches_month` * - `metrics=compute_unit_seconds,extra_branches_month` * */ metrics: ConsumptionHistoryQueryMetrics; }; url: '/consumption_history/v2/projects'; }; export type GetConsumptionHistoryPerProjectV2Errors = { /** * Not available for this account. Project consumption history requires a Launch, Scale, * Agent, Business, or Enterprise plan. * */ 403: GeneralError; /** * Account is not a member of the organization specified by `org_id`. */ 404: GeneralError; /** * The `from` and `to` range is not valid for the selected `granularity`. Adjust the range or * choose a different granularity. * */ 406: GeneralError; /** * Too many requests */ 429: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetConsumptionHistoryPerProjectV2Error = GetConsumptionHistoryPerProjectV2Errors[keyof GetConsumptionHistoryPerProjectV2Errors]; export type GetConsumptionHistoryPerProjectV2Responses = { /** * Project consumption metrics for the Neon account. */ 200: ConsumptionHistoryPerProjectV2Response & PaginationResponse; }; export type GetConsumptionHistoryPerProjectV2Response = GetConsumptionHistoryPerProjectV2Responses[keyof GetConsumptionHistoryPerProjectV2Responses]; export type GetConsumptionHistoryPerBranchV2Data = { body?: never; path?: never; query: { /** * Cursor from the previous response (`pagination.cursor`). Pass it to fetch the next page * of branches. Pages are ordered by project ID, then branch ID. * */ cursor?: string; /** * Maximum number of branches per page. Allowed range: 1 to 1000. Default: 100. * */ limit?: number; /** * Project IDs to include (required, 1 to 100). Returns metrics for branches in these projects. * * Pass multiple IDs as repeated query parameters or a comma-separated list: * - `project_ids=cold-poetry-09157238&project_ids=quiet-snow-71788278` * - `project_ids=cold-poetry-09157238,quiet-snow-71788278` * */ project_ids: Array; /** * Optional branch IDs to filter the response (up to 100). If omitted, all branches in the * listed projects are included. * * Pass multiple IDs as repeated query parameters or a comma-separated list: * - `branch_ids=br-aged-salad-637688&branch_ids=br-sweet-breeze-497520` * - `branch_ids=br-aged-salad-637688,br-sweet-breeze-497520` * */ branch_ids?: Array; /** * Specify the start `date-time` for the consumption period. * The `date-time` value is rounded according to the specified `granularity`. * For example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`. * The specified `date-time` value must respect the specified `granularity`: * - For `hourly`, consumption metrics are limited to the last 168 hours. * - For `daily`, consumption metrics are limited to the last 60 days. * - For `monthly`, consumption metrics are limited to the last year. * * Branch-level metrics are returned from when the account first ingests branch-level * consumption data. Periods before that time contain no branch metrics. * */ from: string; /** * Specify the end `date-time` for the consumption period. * The `date-time` value is rounded according to the specified `granularity`. * For example, `2024-03-15T15:30:00Z` for `daily` granularity will be rounded to `2024-03-15T00:00:00Z`. * The specified `date-time` value must respect the specified `granularity`: * - For `hourly`, consumption metrics are limited to the last 168 hours. * - For `daily`, consumption metrics are limited to the last 60 days. * - For `monthly`, consumption metrics are limited to the last year. * */ to: string; /** * Specify the granularity of consumption metrics. * Hourly, daily, and monthly metrics are available for the last 168 hours, 60 days, * and 1 year, respectively. * */ granularity: ConsumptionHistoryGranularity; /** * Organization ID. Metrics are returned for projects in this organization. * */ org_id: string; /** * Required. List the metrics to return. Only these values are supported: * - `compute_unit_seconds` * - `root_branch_bytes_month` * - `child_branch_bytes_month` * - `instant_restore_bytes_month` * - `public_network_transfer_bytes` * - `private_network_transfer_bytes` * - `functions_active_capacity_microseconds` * - `functions_waiting_capacity_microseconds` * - `functions_invocations` * - `functions_egress_bytes` * * Not supported on this endpoint: `extra_branches_month`, `snapshot_storage_bytes_month`. * Use `GET /consumption_history/v2/projects` for those. * * Pass multiple values as repeated query parameters or a comma-separated list: * - `metrics=compute_unit_seconds&metrics=public_network_transfer_bytes` * - `metrics=compute_unit_seconds,public_network_transfer_bytes` * */ metrics: ConsumptionHistoryQueryMetrics; }; url: '/consumption_history/v2/branches'; }; export type GetConsumptionHistoryPerBranchV2Errors = { /** * Not available for this account. Branch consumption history requires a paid usage-based * Launch, Scale, Agent, or Enterprise plan. * */ 403: GeneralError; /** * Account is not a member of the organization specified by `org_id`. */ 404: GeneralError; /** * The `from` and `to` range is not valid for the selected `granularity`. Adjust the range or * choose a different granularity. * */ 406: GeneralError; /** * Too many requests */ 429: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetConsumptionHistoryPerBranchV2Error = GetConsumptionHistoryPerBranchV2Errors[keyof GetConsumptionHistoryPerBranchV2Errors]; export type GetConsumptionHistoryPerBranchV2Responses = { /** * Branch consumption metrics for the Neon account. */ 200: ConsumptionHistoryPerBranchV2Response & PaginationResponse; }; export type GetConsumptionHistoryPerBranchV2Response = GetConsumptionHistoryPerBranchV2Responses[keyof GetConsumptionHistoryPerBranchV2Responses]; export type GetOrganizationData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; }; query?: never; url: '/organizations/{org_id}'; }; export type GetOrganizationErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetOrganizationError = GetOrganizationErrors[keyof GetOrganizationErrors]; export type GetOrganizationResponses = { /** * Returned information about the organization */ 200: Organization; }; export type GetOrganizationResponse = GetOrganizationResponses[keyof GetOrganizationResponses]; export type ListOrgApiKeysData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; }; query?: never; url: '/organizations/{org_id}/api_keys'; }; export type ListOrgApiKeysErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListOrgApiKeysError = ListOrgApiKeysErrors[keyof ListOrgApiKeysErrors]; export type ListOrgApiKeysResponses = { /** * Returned the API keys for the specified organization */ 200: Array; }; export type ListOrgApiKeysResponse = ListOrgApiKeysResponses[keyof ListOrgApiKeysResponses]; export type CreateOrgApiKeyData = { body: OrgApiKeyCreateRequest; path: { /** * The Neon organization ID */ org_id: string; }; query?: never; url: '/organizations/{org_id}/api_keys'; }; export type CreateOrgApiKeyErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateOrgApiKeyError = CreateOrgApiKeyErrors[keyof CreateOrgApiKeyErrors]; export type CreateOrgApiKeyResponses = { /** * Created an organization API key */ 200: OrgApiKeyCreateResponse; }; export type CreateOrgApiKeyResponse = CreateOrgApiKeyResponses[keyof CreateOrgApiKeyResponses]; export type RevokeOrgApiKeyData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; /** * The API key ID */ key_id: number; }; query?: never; url: '/organizations/{org_id}/api_keys/{key_id}'; }; export type RevokeOrgApiKeyErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RevokeOrgApiKeyError = RevokeOrgApiKeyErrors[keyof RevokeOrgApiKeyErrors]; export type RevokeOrgApiKeyResponses = { /** * Revoked the specified organization API key */ 200: OrgApiKeyRevokeResponse; }; export type RevokeOrgApiKeyResponse = RevokeOrgApiKeyResponses[keyof RevokeOrgApiKeyResponses]; export type DeleteOrganizationSpendingLimitData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; }; query?: never; url: '/organizations/{org_id}/billing/spending_limit'; }; export type DeleteOrganizationSpendingLimitErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteOrganizationSpendingLimitError = DeleteOrganizationSpendingLimitErrors[keyof DeleteOrganizationSpendingLimitErrors]; export type DeleteOrganizationSpendingLimitResponses = { /** * The spending limit has been cleared. */ 200: EmptyResponse; }; export type DeleteOrganizationSpendingLimitResponse = DeleteOrganizationSpendingLimitResponses[keyof DeleteOrganizationSpendingLimitResponses]; export type GetOrganizationSpendingLimitData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; }; query?: never; url: '/organizations/{org_id}/billing/spending_limit'; }; export type GetOrganizationSpendingLimitErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetOrganizationSpendingLimitError = GetOrganizationSpendingLimitErrors[keyof GetOrganizationSpendingLimitErrors]; export type GetOrganizationSpendingLimitResponses = { /** * The organization's current spending limit. */ 200: SpendingLimitResponse; }; export type GetOrganizationSpendingLimitResponse = GetOrganizationSpendingLimitResponses[keyof GetOrganizationSpendingLimitResponses]; export type SetOrganizationSpendingLimitData = { body: SpendingLimitUpdateRequest; path: { /** * The Neon organization ID */ org_id: string; }; query?: never; url: '/organizations/{org_id}/billing/spending_limit'; }; export type SetOrganizationSpendingLimitErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type SetOrganizationSpendingLimitError = SetOrganizationSpendingLimitErrors[keyof SetOrganizationSpendingLimitErrors]; export type SetOrganizationSpendingLimitResponses = { /** * The updated spending limit value. */ 200: SpendingLimitResponse; }; export type SetOrganizationSpendingLimitResponse = SetOrganizationSpendingLimitResponses[keyof SetOrganizationSpendingLimitResponses]; export type GetOrganizationMembersData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; }; query?: { /** * Sort the members by the specified field. Defaults to `joined_at`. */ sort_by?: 'email' | 'role' | 'joined_at'; /** * 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. */ cursor?: string; /** * Defines the sorting order of entities. */ sort_order?: 'asc' | 'desc'; /** * The maximum number of members to return in the response */ limit?: number; }; url: '/organizations/{org_id}/members'; }; export type GetOrganizationMembersErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetOrganizationMembersError = GetOrganizationMembersErrors[keyof GetOrganizationMembersErrors]; export type GetOrganizationMembersResponses = { /** * Returned information about organization members */ 200: OrganizationMembersResponse & CursorPaginationResponse; }; export type GetOrganizationMembersResponse = GetOrganizationMembersResponses[keyof GetOrganizationMembersResponses]; export type RemoveOrganizationMemberData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; /** * The Neon organization member ID */ member_id: string; }; query?: never; url: '/organizations/{org_id}/members/{member_id}'; }; export type RemoveOrganizationMemberErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RemoveOrganizationMemberError = RemoveOrganizationMemberErrors[keyof RemoveOrganizationMemberErrors]; export type RemoveOrganizationMemberResponses = { /** * Removed organization member */ 200: EmptyResponse; }; export type RemoveOrganizationMemberResponse = RemoveOrganizationMemberResponses[keyof RemoveOrganizationMemberResponses]; export type GetOrganizationMemberData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; /** * The Neon organization member ID */ member_id: string; }; query?: never; url: '/organizations/{org_id}/members/{member_id}'; }; export type GetOrganizationMemberErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetOrganizationMemberError = GetOrganizationMemberErrors[keyof GetOrganizationMemberErrors]; export type GetOrganizationMemberResponses = { /** * Returned information about the organization member */ 200: Member; }; export type GetOrganizationMemberResponse = GetOrganizationMemberResponses[keyof GetOrganizationMemberResponses]; export type UpdateOrganizationMemberData = { body: OrganizationMemberUpdateRequest; path: { /** * The Neon organization ID */ org_id: string; /** * The Neon organization member ID */ member_id: string; }; query?: never; url: '/organizations/{org_id}/members/{member_id}'; }; export type UpdateOrganizationMemberErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateOrganizationMemberError = UpdateOrganizationMemberErrors[keyof UpdateOrganizationMemberErrors]; export type UpdateOrganizationMemberResponses = { /** * The updated organization member */ 200: Member; }; export type UpdateOrganizationMemberResponse = UpdateOrganizationMemberResponses[keyof UpdateOrganizationMemberResponses]; export type GetOrganizationInvitationsData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; }; query?: never; url: '/organizations/{org_id}/invitations'; }; export type GetOrganizationInvitationsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetOrganizationInvitationsError = GetOrganizationInvitationsErrors[keyof GetOrganizationInvitationsErrors]; export type GetOrganizationInvitationsResponses = { /** * Returned information about the organization invitations */ 200: OrganizationInvitationsResponse; }; export type GetOrganizationInvitationsResponse = GetOrganizationInvitationsResponses[keyof GetOrganizationInvitationsResponses]; export type CreateOrganizationInvitationsData = { body: OrganizationInvitesCreateRequest; path: { /** * The Neon organization ID */ org_id: string; }; query?: never; url: '/organizations/{org_id}/invitations'; }; export type CreateOrganizationInvitationsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateOrganizationInvitationsError = CreateOrganizationInvitationsErrors[keyof CreateOrganizationInvitationsErrors]; export type CreateOrganizationInvitationsResponses = { /** * The created organization invitation */ 200: OrganizationInvitationsResponse; }; export type CreateOrganizationInvitationsResponse = CreateOrganizationInvitationsResponses[keyof CreateOrganizationInvitationsResponses]; export type TransferProjectsFromOrgToOrgData = { body: TransferProjectsToOrganizationRequest; path: { /** * The Neon organization ID (source org, which currently owns the project) */ source_org_id: string; }; query?: never; url: '/organizations/{source_org_id}/projects/transfer'; }; export type TransferProjectsFromOrgToOrgErrors = { /** * Transfer failed. The target organization has too many projects or an incompatible plan. Reduce projects or upgrade the target organization. */ 406: LimitsUnsatisfiedResponse; /** * Transfer failed. Projects with active integrations (for example, GitHub or Vercel) cannot be transferred. */ 422: ProjectsWithIntegrationResponse; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type TransferProjectsFromOrgToOrgError = TransferProjectsFromOrgToOrgErrors[keyof TransferProjectsFromOrgToOrgErrors]; export type TransferProjectsFromOrgToOrgResponses = { /** * Projects successfully transferred from organization to organization */ 200: EmptyResponse; }; export type TransferProjectsFromOrgToOrgResponse = TransferProjectsFromOrgToOrgResponses[keyof TransferProjectsFromOrgToOrgResponses]; export type ListOrganizationVpcEndpointsAllRegionsData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; }; query?: never; url: '/organizations/{org_id}/vpc/vpc_endpoints'; }; export type ListOrganizationVpcEndpointsAllRegionsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListOrganizationVpcEndpointsAllRegionsError = ListOrganizationVpcEndpointsAllRegionsErrors[keyof ListOrganizationVpcEndpointsAllRegionsErrors]; export type ListOrganizationVpcEndpointsAllRegionsResponses = { /** * The list of configured VPC endpoint IDs for the specified organization across all regions */ 200: VpcEndpointsWithRegionResponse; }; export type ListOrganizationVpcEndpointsAllRegionsResponse = ListOrganizationVpcEndpointsAllRegionsResponses[keyof ListOrganizationVpcEndpointsAllRegionsResponses]; export type ListOrganizationVpcEndpointsData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; /** * The Neon region ID */ region_id: string; }; query?: never; url: '/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints'; }; export type ListOrganizationVpcEndpointsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListOrganizationVpcEndpointsError = ListOrganizationVpcEndpointsErrors[keyof ListOrganizationVpcEndpointsErrors]; export type ListOrganizationVpcEndpointsResponses = { /** * The list of configured VPC endpoint IDs for the specified organization */ 200: VpcEndpointsResponse; }; export type ListOrganizationVpcEndpointsResponse = ListOrganizationVpcEndpointsResponses[keyof ListOrganizationVpcEndpointsResponses]; export type DeleteOrganizationVpcEndpointData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; /** * The Neon region ID. * Azure regions are currently not supported. * */ region_id: string; /** * The VPC endpoint ID */ vpc_endpoint_id: string; }; query?: never; url: '/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}'; }; export type DeleteOrganizationVpcEndpointErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteOrganizationVpcEndpointError = DeleteOrganizationVpcEndpointErrors[keyof DeleteOrganizationVpcEndpointErrors]; export type DeleteOrganizationVpcEndpointResponses = { /** * Deleted the VPC endpoint from the specified Neon organization */ 200: unknown; }; export type GetOrganizationVpcEndpointDetailsData = { body?: never; path: { /** * The Neon organization ID */ org_id: string; /** * The Neon region ID. * Azure regions are currently not supported. * */ region_id: string; /** * The VPC endpoint ID */ vpc_endpoint_id: string; }; query?: never; url: '/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}'; }; export type GetOrganizationVpcEndpointDetailsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetOrganizationVpcEndpointDetailsError = GetOrganizationVpcEndpointDetailsErrors[keyof GetOrganizationVpcEndpointDetailsErrors]; export type GetOrganizationVpcEndpointDetailsResponses = { /** * Returned the current status and configuration details of the specified VPC endpoint. */ 200: VpcEndpointDetails; }; export type GetOrganizationVpcEndpointDetailsResponse = GetOrganizationVpcEndpointDetailsResponses[keyof GetOrganizationVpcEndpointDetailsResponses]; export type AssignOrganizationVpcEndpointData = { body: VpcEndpointAssignment; path: { /** * The Neon organization ID */ org_id: string; /** * The Neon region ID. * Azure regions are currently not supported. * */ region_id: string; /** * The VPC endpoint ID */ vpc_endpoint_id: string; }; query?: never; url: '/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}'; }; export type AssignOrganizationVpcEndpointErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type AssignOrganizationVpcEndpointError = AssignOrganizationVpcEndpointErrors[keyof AssignOrganizationVpcEndpointErrors]; export type AssignOrganizationVpcEndpointResponses = { /** * Assigned the VPC endpoint to the specified Neon organization */ 200: unknown; }; export type GetActiveRegionsData = { body?: never; path?: never; query?: { /** * Organization ID. When provided, returns only regions available to this organization. * Recommended for accurate region availability. * */ org_id?: string; }; url: '/regions'; }; export type GetActiveRegionsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetActiveRegionsError = GetActiveRegionsErrors[keyof GetActiveRegionsErrors]; export type GetActiveRegionsResponses = { /** * The list of active regions */ 200: ActiveRegionsResponse; }; export type GetActiveRegionsResponse = GetActiveRegionsResponses[keyof GetActiveRegionsResponses]; export type GetCurrentUserInfoData = { body?: never; path?: never; query?: never; url: '/users/me'; }; export type GetCurrentUserInfoErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetCurrentUserInfoError = GetCurrentUserInfoErrors[keyof GetCurrentUserInfoErrors]; export type GetCurrentUserInfoResponses = { /** * Returned information about the current user * */ 200: CurrentUserInfoResponse; }; export type GetCurrentUserInfoResponse = GetCurrentUserInfoResponses[keyof GetCurrentUserInfoResponses]; export type GetCurrentUserOrganizationsData = { body?: never; path?: never; query?: never; url: '/users/me/organizations'; }; export type GetCurrentUserOrganizationsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetCurrentUserOrganizationsError = GetCurrentUserOrganizationsErrors[keyof GetCurrentUserOrganizationsErrors]; export type GetCurrentUserOrganizationsResponses = { /** * Returned information about the current user organizations * */ 200: OrganizationsResponse; }; export type GetCurrentUserOrganizationsResponse = GetCurrentUserOrganizationsResponses[keyof GetCurrentUserOrganizationsResponses]; export type TransferProjectsFromUserToOrgData = { body: TransferProjectsToOrganizationRequest; path?: never; query?: never; url: '/users/me/projects/transfer'; }; export type TransferProjectsFromUserToOrgErrors = { /** * Transfer failed. The target organization has too many projects or an incompatible plan. Reduce projects or upgrade the target organization. */ 406: LimitsUnsatisfiedResponse; /** * Transfer failed. Projects with active integrations (for example, GitHub or Vercel) cannot be transferred. */ 422: ProjectsWithIntegrationResponse; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type TransferProjectsFromUserToOrgError = TransferProjectsFromUserToOrgErrors[keyof TransferProjectsFromUserToOrgErrors]; export type TransferProjectsFromUserToOrgResponses = { /** * Projects successfully transferred from personal account to organization */ 200: EmptyResponse; }; export type TransferProjectsFromUserToOrgResponse = TransferProjectsFromUserToOrgResponses[keyof TransferProjectsFromUserToOrgResponses]; export type GetAuthDetailsData = { body?: never; path?: never; query?: never; url: '/auth'; }; export type GetAuthDetailsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetAuthDetailsError = GetAuthDetailsErrors[keyof GetAuthDetailsErrors]; export type GetAuthDetailsResponses = { /** * Returned auth information about the current auth entity * */ 200: AuthDetailsResponse; }; export type GetAuthDetailsResponse = GetAuthDetailsResponses[keyof GetAuthDetailsResponses]; export type CreateSnapshotData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: { /** * The target Log Sequence Number (LSN) to take the snapshot from. * Must fall within the restore window. Cannot be used with `timestamp` * */ lsn?: string; /** * The target timestamp for the snapshot. Must fall within the restore window. RFC 3339 format. Cannot be used with `lsn`. * */ timestamp?: string; /** * A name for the snapshot. */ name?: string; /** * The time at which the snapshot will be automatically deleted. RFC 3339 format. * */ expires_at?: string; }; url: '/projects/{project_id}/branches/{branch_id}/snapshot'; }; export type CreateSnapshotErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateSnapshotError = CreateSnapshotErrors[keyof CreateSnapshotErrors]; export type CreateSnapshotResponses = { /** * Successfully created the snapshot */ 200: { snapshot: Snapshot; operations: Array; }; }; export type CreateSnapshotResponse = CreateSnapshotResponses[keyof CreateSnapshotResponses]; export type ListSnapshotsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; }; query?: never; url: '/projects/{project_id}/snapshots'; }; export type ListSnapshotsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListSnapshotsError = ListSnapshotsErrors[keyof ListSnapshotsErrors]; export type ListSnapshotsResponses = { /** * Projects snapshots */ 200: { snapshots: Array; }; }; export type ListSnapshotsResponse = ListSnapshotsResponses[keyof ListSnapshotsResponses]; export type DeleteSnapshotData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The snapshot ID */ snapshot_id: string; }; query?: never; url: '/projects/{project_id}/snapshots/{snapshot_id}'; }; export type DeleteSnapshotErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteSnapshotError = DeleteSnapshotErrors[keyof DeleteSnapshotErrors]; export type DeleteSnapshotResponses = { /** * OK */ 202: OperationsResponse; }; export type DeleteSnapshotResponse = DeleteSnapshotResponses[keyof DeleteSnapshotResponses]; export type UpdateSnapshotData = { body: SnapshotUpdateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The snapshot ID */ snapshot_id: string; }; query?: never; url: '/projects/{project_id}/snapshots/{snapshot_id}'; }; export type UpdateSnapshotErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateSnapshotError = UpdateSnapshotErrors[keyof UpdateSnapshotErrors]; export type UpdateSnapshotResponses = { /** * Successfully updated the snapshot */ 200: { snapshot: Snapshot; }; }; export type UpdateSnapshotResponse = UpdateSnapshotResponses[keyof UpdateSnapshotResponses]; export type RestoreSnapshotData = { body?: { /** * A name for the newly restored branch. If not provided, the server generates a unique name for the branch automatically. * */ name?: string; /** * 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. * */ target_branch_id?: string; /** * Set to `true` to finalize the restore operation immediately. * This will complete the restore and move any associated computes to the new branch, * similar to the `finalizeRestoreBranch` operation. * Defaults to `false` to allow previewing the restored snapshot data first. * */ finalize_restore?: boolean; }; path: { /** * The Neon project ID */ project_id: string; /** * The snapshot ID */ snapshot_id: string; }; query?: { /** * Deprecated. Use the `name` field in the request body instead. Removal scheduled for November 29, 2025. * A name for the newly restored branch. If omitted, a default name will be generated. * * * @deprecated */ name?: string; }; url: '/projects/{project_id}/snapshots/{snapshot_id}/restore'; }; export type RestoreSnapshotErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RestoreSnapshotError = RestoreSnapshotErrors[keyof RestoreSnapshotErrors]; export type RestoreSnapshotResponses = { /** * Branch restored from snapshot and its operations. */ 200: BranchResponse & EndpointsOptionalResponse & OperationsResponse; }; export type RestoreSnapshotResponse = RestoreSnapshotResponses[keyof RestoreSnapshotResponses]; export type GetSnapshotScheduleData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/backup_schedule'; }; export type GetSnapshotScheduleErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetSnapshotScheduleError = GetSnapshotScheduleErrors[keyof GetSnapshotScheduleErrors]; export type GetSnapshotScheduleResponses = { /** * Schedule of frequencies to create snapshots */ 200: BackupSchedule; }; export type GetSnapshotScheduleResponse = GetSnapshotScheduleResponses[keyof GetSnapshotScheduleResponses]; export type SetSnapshotScheduleData = { body: BackupSchedule; path: { /** * The Neon project ID */ project_id: string; /** * The branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/backup_schedule'; }; export type SetSnapshotScheduleErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type SetSnapshotScheduleError = SetSnapshotScheduleErrors[keyof SetSnapshotScheduleErrors]; export type SetSnapshotScheduleResponses = { /** * Empty response */ 200: EmptyResponse; }; export type SetSnapshotScheduleResponse = SetSnapshotScheduleResponses[keyof SetSnapshotScheduleResponses]; export type ListProjectBranchBucketsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/buckets'; }; export type ListProjectBranchBucketsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectBranchBucketsError = ListProjectBranchBucketsErrors[keyof ListProjectBranchBucketsErrors]; export type ListProjectBranchBucketsResponses = { /** * The list of buckets */ 200: BucketsListResponse; }; export type ListProjectBranchBucketsResponse = ListProjectBranchBucketsResponses[keyof ListProjectBranchBucketsResponses]; export type CreateProjectBranchBucketData = { body: BucketCreateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/buckets'; }; export type CreateProjectBranchBucketErrors = { /** * The project has been deleted */ 410: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateProjectBranchBucketError = CreateProjectBranchBucketErrors[keyof CreateProjectBranchBucketErrors]; export type CreateProjectBranchBucketResponses = { /** * Bucket created */ 201: BucketResponse; }; export type CreateProjectBranchBucketResponse = CreateProjectBranchBucketResponses[keyof CreateProjectBranchBucketResponses]; export type DeleteProjectBranchBucketData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The bucket name */ bucket_name: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}'; }; export type DeleteProjectBranchBucketErrors = { /** * Bucket not found */ 404: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectBranchBucketError = DeleteProjectBranchBucketErrors[keyof DeleteProjectBranchBucketErrors]; export type DeleteProjectBranchBucketResponses = { /** * Bucket deleted */ 204: void; }; export type DeleteProjectBranchBucketResponse = DeleteProjectBranchBucketResponses[keyof DeleteProjectBranchBucketResponses]; export type GetProjectBranchStorageData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/storage'; }; export type GetProjectBranchStorageErrors = { /** * Object storage is not enabled for this branch, or the project/branch was not * found. The body is always `BranchStorageNotEnabled` — see `reason` for * the exact cause. * */ 404: BranchStorageNotEnabled; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchStorageError = GetProjectBranchStorageErrors[keyof GetProjectBranchStorageErrors]; export type GetProjectBranchStorageResponses = { /** * Object storage is enabled for this branch */ 200: BranchStorage; }; export type GetProjectBranchStorageResponse = GetProjectBranchStorageResponses[keyof GetProjectBranchStorageResponses]; export type GetProjectBranchAiGatewayData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/ai_gateway'; }; export type GetProjectBranchAiGatewayErrors = { /** * AI Gateway is not available for this branch, or the project/branch * was not found. The body is always `BranchAiGatewayNotEnabled` — see * `reason` for the exact cause. * */ 404: BranchAiGatewayNotEnabled; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchAiGatewayError = GetProjectBranchAiGatewayErrors[keyof GetProjectBranchAiGatewayErrors]; export type GetProjectBranchAiGatewayResponses = { /** * AI Gateway is enabled for this branch */ 200: BranchAiGateway; }; export type GetProjectBranchAiGatewayResponse = GetProjectBranchAiGatewayResponses[keyof GetProjectBranchAiGatewayResponses]; export type QueryProjectBranchLogsData = { body: ProjectBranchLogsQueryRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/logs/query'; }; export type QueryProjectBranchLogsErrors = { /** * The query could not be served as written. The body is always * `ProjectBranchLogsInvalidQuery` — see `reason` for the exact cause. * */ 400: ProjectBranchLogsInvalidQuery; /** * Logs are not available for this branch, or the project/branch was * not found. The body is always `ProjectBranchLogsNotAvailable` — see * `reason` for the exact cause. * */ 404: ProjectBranchLogsNotAvailable; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type QueryProjectBranchLogsError = QueryProjectBranchLogsErrors[keyof QueryProjectBranchLogsErrors]; export type QueryProjectBranchLogsResponses = { /** * Logs matching the supplied filters */ 200: ProjectBranchLogsQueryResponse; }; export type QueryProjectBranchLogsResponse = QueryProjectBranchLogsResponses[keyof QueryProjectBranchLogsResponses]; export type ListProjectBranchLogFieldsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/logs/fields'; }; export type ListProjectBranchLogFieldsErrors = { /** * Logs are not available for this branch, or the project/branch was * not found. The body is always `ProjectBranchLogsNotAvailable` — see * `reason` for the exact cause. * */ 404: ProjectBranchLogsNotAvailable; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectBranchLogFieldsError = ListProjectBranchLogFieldsErrors[keyof ListProjectBranchLogFieldsErrors]; export type ListProjectBranchLogFieldsResponses = { /** * Log fields available for value discovery on this branch */ 200: ProjectBranchLogFieldsResponse; }; export type ListProjectBranchLogFieldsResponse = ListProjectBranchLogFieldsResponses[keyof ListProjectBranchLogFieldsResponses]; export type ListProjectBranchLogFieldValuesData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The log field whose distinct values should be returned. Must be one of * the names returned by the log fields endpoint for this branch. * */ field_name: string; }; query?: { /** * Length of the lookup window, ending at `end_time` or at the current * time when `end_time` is omitted. Mutually exclusive with * `start_time`. Defaults to six hours. * */ since?: ProjectBranchLogDuration; /** * Inclusive beginning of the lookup window. Mutually exclusive with * `since`. * */ start_time?: string; /** * Exclusive end of the lookup window. Defaults to the current time. */ end_time?: string; /** * Only consider records emitted by this Neon service. */ source?: ProjectBranchLogSource; /** * Maximum number of distinct values to return. The response sets * `is_truncated` when this bound, or the server's own scan cap, cut the * list short. * */ limit?: number; }; url: '/projects/{project_id}/branches/{branch_id}/logs/fields/{field_name}/values'; }; export type ListProjectBranchLogFieldValuesErrors = { /** * The lookup could not be served as written. The body is always * `ProjectBranchLogsInvalidQuery` — see `reason` for the exact cause. * */ 400: ProjectBranchLogsInvalidQuery; /** * Logs are not available for this branch, or the project/branch was * not found. The body is always `ProjectBranchLogsNotAvailable` — see * `reason` for the exact cause. * */ 404: ProjectBranchLogsNotAvailable; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectBranchLogFieldValuesError = ListProjectBranchLogFieldValuesErrors[keyof ListProjectBranchLogFieldValuesErrors]; export type ListProjectBranchLogFieldValuesResponses = { /** * Distinct values for the requested log field */ 200: ProjectBranchLogFieldValuesResponse; }; export type ListProjectBranchLogFieldValuesResponse = ListProjectBranchLogFieldValuesResponses[keyof ListProjectBranchLogFieldValuesResponses]; export type ListProjectBranchBucketObjectsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The bucket name */ bucket_name: string; }; query?: { /** * Only list objects whose key starts with this prefix. */ prefix?: string; /** * Collapse keys sharing a common prefix up to the first occurrence of * this delimiter (typically `/`) into the `folders` array. * */ delimiter?: string; /** * Opaque pagination cursor returned as `next_cursor` by a previous * call. Resume listing after the last item of the previous page. * */ cursor?: string; /** * Maximum number of items (objects + folders) to return. */ limit?: number; }; url: '/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects'; }; export type ListProjectBranchBucketObjectsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectBranchBucketObjectsError = ListProjectBranchBucketObjectsErrors[keyof ListProjectBranchBucketObjectsErrors]; export type ListProjectBranchBucketObjectsResponses = { /** * The list of objects and folders */ 200: BucketObjectsListResponse; }; export type ListProjectBranchBucketObjectsResponse = ListProjectBranchBucketObjectsResponses[keyof ListProjectBranchBucketObjectsResponses]; export type DeleteProjectBranchBucketObjectData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The bucket name */ bucket_name: string; /** * The object key. Keys may contain `/`; the `/` characters of nested * keys must be percent-encoded (`%2F`) in the path segment. * */ object_key: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}'; }; export type DeleteProjectBranchBucketObjectErrors = { /** * Object not found */ 404: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectBranchBucketObjectError = DeleteProjectBranchBucketObjectErrors[keyof DeleteProjectBranchBucketObjectErrors]; export type DeleteProjectBranchBucketObjectResponses = { /** * Object deleted */ 204: void; }; export type DeleteProjectBranchBucketObjectResponse = DeleteProjectBranchBucketObjectResponses[keyof DeleteProjectBranchBucketObjectResponses]; export type GetProjectBranchBucketObjectData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The bucket name */ bucket_name: string; /** * The object key. Keys may contain `/`; the `/` characters of nested * keys must be percent-encoded (`%2F`) in the path segment. * */ object_key: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/download'; }; export type GetProjectBranchBucketObjectErrors = { /** * Object not found */ 404: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchBucketObjectError = GetProjectBranchBucketObjectErrors[keyof GetProjectBranchBucketObjectErrors]; export type GetProjectBranchBucketObjectResponses = { /** * The object's raw bytes, streamed verbatim. `Content-Length` and * `ETag` headers are set from the stored object metadata; * `X-Content-Type-Options` and `Content-Disposition` harden the * browser against the caller-controlled bytes. * */ 200: Blob | File; }; export type GetProjectBranchBucketObjectResponse = GetProjectBranchBucketObjectResponses[keyof GetProjectBranchBucketObjectResponses]; export type DeleteProjectBranchBucketObjectsByPrefixData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The bucket name */ bucket_name: string; }; query: { /** * The key prefix (folder) to delete. Must be non-empty and end with * `/`. Every object on this branch whose key starts with this prefix * is soft-deleted. * */ prefix: string; }; url: '/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects-by-prefix'; }; export type DeleteProjectBranchBucketObjectsByPrefixErrors = { /** * Bucket not found */ 404: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectBranchBucketObjectsByPrefixError = DeleteProjectBranchBucketObjectsByPrefixErrors[keyof DeleteProjectBranchBucketObjectsByPrefixErrors]; export type DeleteProjectBranchBucketObjectsByPrefixResponses = { /** * The prefix was soft-deleted. `deleted` is the number of objects * tombstoned (may be 0 when nothing live matched on this branch). * */ 200: BucketObjectsDeletePrefixResponse; }; export type DeleteProjectBranchBucketObjectsByPrefixResponse = DeleteProjectBranchBucketObjectsByPrefixResponses[keyof DeleteProjectBranchBucketObjectsByPrefixResponses]; export type PresignProjectBranchBucketObjectData = { body: PresignRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The bucket name */ bucket_name: string; /** * The object key. Keys may contain `/`; the `/` characters of nested * keys must be percent-encoded (`%2F`) in the path segment. * */ object_key: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/presign'; }; export type PresignProjectBranchBucketObjectErrors = { /** * Bucket or branch not found */ 404: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type PresignProjectBranchBucketObjectError = PresignProjectBranchBucketObjectErrors[keyof PresignProjectBranchBucketObjectErrors]; export type PresignProjectBranchBucketObjectResponses = { /** * A presigned URL valid until `expires_at`. The caller transfers the * object bytes by issuing `method url` with the returned `headers`. * */ 200: PresignResponse; }; export type PresignProjectBranchBucketObjectResponse = PresignProjectBranchBucketObjectResponses[keyof PresignProjectBranchBucketObjectResponses]; export type ListCredentialsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/credentials'; }; export type ListCredentialsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListCredentialsError = ListCredentialsErrors[keyof ListCredentialsErrors]; export type ListCredentialsResponses = { /** * The list of credentials */ 200: ListCredentialsResponse; }; export type ListCredentialsResponse2 = ListCredentialsResponses[keyof ListCredentialsResponses]; export type CreateCredentialData = { body: CreateCredentialRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/credentials'; }; export type CreateCredentialErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateCredentialError = CreateCredentialErrors[keyof CreateCredentialErrors]; export type CreateCredentialResponses = { /** * Credential issued — secrets shown once. */ 201: CreateCredentialResponse; }; export type CreateCredentialResponse2 = CreateCredentialResponses[keyof CreateCredentialResponses]; export type RevokeCredentialData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The opaque credential id (e.g. nak_live_<32hex>). */ token_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/credentials/{token_id}'; }; export type RevokeCredentialErrors = { /** * Credential not found */ 404: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RevokeCredentialError = RevokeCredentialErrors[keyof RevokeCredentialErrors]; export type RevokeCredentialResponses = { /** * Credential revoked */ 204: void; }; export type RevokeCredentialResponse = RevokeCredentialResponses[keyof RevokeCredentialResponses]; export type RevealCredentialData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The opaque credential id (e.g. nak_live_<32hex>). */ token_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/credentials/{token_id}/reveal'; }; export type RevealCredentialErrors = { /** * Credential not found */ 404: GeneralError; /** * The credential exists but has no recoverable secret because it was * issued before secret retrieval was supported. Rotate the credential * to obtain a recoverable secret. * */ 409: GeneralError; /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RevealCredentialError = RevealCredentialErrors[keyof RevealCredentialErrors]; export type RevealCredentialResponses = { /** * The credential's live secrets. */ 200: CredentialSecret; }; export type RevealCredentialResponse = RevealCredentialResponses[keyof RevealCredentialResponses]; export type RotateCredentialData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The opaque credential id (e.g. nak_live_<32hex>). */ token_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/credentials/{token_id}/rotate'; }; export type RotateCredentialErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RotateCredentialError = RotateCredentialErrors[keyof RotateCredentialErrors]; export type RotateCredentialResponses = { /** * Credential rotated — new secrets shown once. */ 200: RotateCredentialResponse; }; export type RotateCredentialResponse2 = RotateCredentialResponses[keyof RotateCredentialResponses]; export type ListProjectBranchFunctionsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: { /** * 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. */ cursor?: string; /** * Specify a value from 1 to 1000 to limit number of functions in the response */ limit?: number; }; url: '/projects/{project_id}/branches/{branch_id}/functions'; }; export type ListProjectBranchFunctionsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectBranchFunctionsError = ListProjectBranchFunctionsErrors[keyof ListProjectBranchFunctionsErrors]; export type ListProjectBranchFunctionsResponses = { /** * The list of functions */ 200: NeonFunctionsListResponse & CursorPaginationResponse; }; export type ListProjectBranchFunctionsResponse = ListProjectBranchFunctionsResponses[keyof ListProjectBranchFunctionsResponses]; export type DeleteProjectBranchFunctionData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The function slug */ slug: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/functions/{slug}'; }; export type DeleteProjectBranchFunctionErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectBranchFunctionError = DeleteProjectBranchFunctionErrors[keyof DeleteProjectBranchFunctionErrors]; export type DeleteProjectBranchFunctionResponses = { /** * Function deleted */ 204: void; }; export type DeleteProjectBranchFunctionResponse = DeleteProjectBranchFunctionResponses[keyof DeleteProjectBranchFunctionResponses]; export type GetProjectBranchFunctionData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The function slug */ slug: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/functions/{slug}'; }; export type GetProjectBranchFunctionErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchFunctionError = GetProjectBranchFunctionErrors[keyof GetProjectBranchFunctionErrors]; export type GetProjectBranchFunctionResponses = { /** * The function details */ 200: NeonFunctionResponse; }; export type GetProjectBranchFunctionResponse = GetProjectBranchFunctionResponses[keyof GetProjectBranchFunctionResponses]; export type UpdateProjectBranchFunctionData = { body: NeonFunctionUpdateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The function slug */ slug: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/functions/{slug}'; }; export type UpdateProjectBranchFunctionErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateProjectBranchFunctionError = UpdateProjectBranchFunctionErrors[keyof UpdateProjectBranchFunctionErrors]; export type UpdateProjectBranchFunctionResponses = { /** * The updated function */ 200: NeonFunctionResponse; }; export type UpdateProjectBranchFunctionResponse = UpdateProjectBranchFunctionResponses[keyof UpdateProjectBranchFunctionResponses]; export type CreateProjectBranchFunctionDeploymentData = { body: FunctionDeployRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The function slug */ slug: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/functions/{slug}/deployments'; }; export type CreateProjectBranchFunctionDeploymentErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateProjectBranchFunctionDeploymentError = CreateProjectBranchFunctionDeploymentErrors[keyof CreateProjectBranchFunctionDeploymentErrors]; export type CreateProjectBranchFunctionDeploymentResponses = { /** * The created deployment */ 201: NeonFunctionDeploymentResponse; }; export type CreateProjectBranchFunctionDeploymentResponse = CreateProjectBranchFunctionDeploymentResponses[keyof CreateProjectBranchFunctionDeploymentResponses]; export type ListProjectBranchTriggersData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/triggers'; }; export type ListProjectBranchTriggersErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectBranchTriggersError = ListProjectBranchTriggersErrors[keyof ListProjectBranchTriggersErrors]; export type ListProjectBranchTriggersResponses = { /** * The branch-effective trigger list */ 200: TriggersListResponse; }; export type ListProjectBranchTriggersResponse = ListProjectBranchTriggersResponses[keyof ListProjectBranchTriggersResponses]; export type CreateProjectBranchTriggerData = { body: TriggerCreateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/triggers'; }; export type CreateProjectBranchTriggerErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type CreateProjectBranchTriggerError = CreateProjectBranchTriggerErrors[keyof CreateProjectBranchTriggerErrors]; export type CreateProjectBranchTriggerResponses = { /** * Trigger created */ 201: TriggerResponse; }; export type CreateProjectBranchTriggerResponse = CreateProjectBranchTriggerResponses[keyof CreateProjectBranchTriggerResponses]; export type DeleteProjectBranchTriggerData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The opaque, project-wide trigger ID */ trigger_id: TriggerId; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/triggers/{trigger_id}'; }; export type DeleteProjectBranchTriggerErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectBranchTriggerError = DeleteProjectBranchTriggerErrors[keyof DeleteProjectBranchTriggerErrors]; export type DeleteProjectBranchTriggerResponses = { /** * Trigger deleted */ 204: void; }; export type DeleteProjectBranchTriggerResponse = DeleteProjectBranchTriggerResponses[keyof DeleteProjectBranchTriggerResponses]; export type GetProjectBranchTriggerData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The opaque, project-wide trigger ID */ trigger_id: TriggerId; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/triggers/{trigger_id}'; }; export type GetProjectBranchTriggerErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type GetProjectBranchTriggerError = GetProjectBranchTriggerErrors[keyof GetProjectBranchTriggerErrors]; export type GetProjectBranchTriggerResponses = { /** * The trigger */ 200: TriggerResponse; }; export type GetProjectBranchTriggerResponse = GetProjectBranchTriggerResponses[keyof GetProjectBranchTriggerResponses]; export type UpdateProjectBranchTriggerData = { body: TriggerUpdateRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The opaque, project-wide trigger ID */ trigger_id: TriggerId; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/triggers/{trigger_id}'; }; export type UpdateProjectBranchTriggerErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type UpdateProjectBranchTriggerError = UpdateProjectBranchTriggerErrors[keyof UpdateProjectBranchTriggerErrors]; export type UpdateProjectBranchTriggerResponses = { /** * The updated trigger */ 200: TriggerResponse; }; export type UpdateProjectBranchTriggerResponse = UpdateProjectBranchTriggerResponses[keyof UpdateProjectBranchTriggerResponses]; export type ListProjectBranchCustomDomainsData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: { /** * 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. */ cursor?: string; /** * Specify a value from 1 to 1000 to limit number of domains in the response */ limit?: number; }; url: '/projects/{project_id}/branches/{branch_id}/custom-domains'; }; export type ListProjectBranchCustomDomainsErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type ListProjectBranchCustomDomainsError = ListProjectBranchCustomDomainsErrors[keyof ListProjectBranchCustomDomainsErrors]; export type ListProjectBranchCustomDomainsResponses = { /** * The list of custom domains */ 200: CustomDomainsListResponse & CursorPaginationResponse; }; export type ListProjectBranchCustomDomainsResponse = ListProjectBranchCustomDomainsResponses[keyof ListProjectBranchCustomDomainsResponses]; export type RegisterProjectBranchCustomDomainData = { body: CustomDomainRegisterRequest; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/custom-domains'; }; export type RegisterProjectBranchCustomDomainErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type RegisterProjectBranchCustomDomainError = RegisterProjectBranchCustomDomainErrors[keyof RegisterProjectBranchCustomDomainErrors]; export type RegisterProjectBranchCustomDomainResponses = { /** * The registered custom domain */ 201: CustomDomain; }; export type RegisterProjectBranchCustomDomainResponse = RegisterProjectBranchCustomDomainResponses[keyof RegisterProjectBranchCustomDomainResponses]; export type DeleteProjectBranchCustomDomainData = { body?: never; path: { /** * The Neon project ID */ project_id: string; /** * The Neon branch ID */ branch_id: string; /** * The registered custom domain (case-insensitive). */ domain: string; }; query?: never; url: '/projects/{project_id}/branches/{branch_id}/custom-domains/{domain}'; }; export type DeleteProjectBranchCustomDomainErrors = { /** * General Error. * * The request may or may not be safe to retry, depending on the HTTP method, response status code, * and whether a response was received. * * - If no response is returned from the API, a network error or timeout likely occurred. * - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. * * The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. * The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. * * Any request that returns a `503 Service Unavailable` response is always safe to retry. * * Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress. * */ '4XX': GeneralError; }; export type DeleteProjectBranchCustomDomainError = DeleteProjectBranchCustomDomainErrors[keyof DeleteProjectBranchCustomDomainErrors]; export type DeleteProjectBranchCustomDomainResponses = { /** * Custom domain deleted */ 204: void; }; export type DeleteProjectBranchCustomDomainResponse = DeleteProjectBranchCustomDomainResponses[keyof DeleteProjectBranchCustomDomainResponses]; //# sourceMappingURL=types.gen.d.ts.map