diff --git a/generated/NeonClient.ts b/generated/NeonClient.ts index f828157..6f29981 100644 --- a/generated/NeonClient.ts +++ b/generated/NeonClient.ts @@ -10,7 +10,9 @@ import { BranchService } from './services/BranchService'; import { ConsumptionService } from './services/ConsumptionService'; import { EndpointService } from './services/EndpointService'; import { OperationService } from './services/OperationService'; +import { OrganizationsService } from './services/OrganizationsService'; import { ProjectService } from './services/ProjectService'; +import { RegionService } from './services/RegionService'; import { UsersService } from './services/UsersService'; type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; export class NeonClient { @@ -19,7 +21,9 @@ export class NeonClient { public readonly consumption: ConsumptionService; public readonly endpoint: EndpointService; public readonly operation: OperationService; + public readonly organizations: OrganizationsService; public readonly project: ProjectService; + public readonly region: RegionService; public readonly users: UsersService; public readonly request: BaseHttpRequest; constructor(config?: Partial, HttpRequest: HttpRequestConstructor = FetchHttpRequest) { @@ -39,7 +43,9 @@ export class NeonClient { this.consumption = new ConsumptionService(this.request); this.endpoint = new EndpointService(this.request); this.operation = new OperationService(this.request); + this.organizations = new OrganizationsService(this.request); this.project = new ProjectService(this.request); + this.region = new RegionService(this.request); this.users = new UsersService(this.request); } } diff --git a/generated/index.ts b/generated/index.ts index 0e1c20d..9039e3f 100644 --- a/generated/index.ts +++ b/generated/index.ts @@ -10,6 +10,7 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise'; export { OpenAPI } from './core/OpenAPI'; export type { OpenAPIConfig } from './core/OpenAPI'; +export type { ActiveRegionsResponse } from './models/ActiveRegionsResponse'; export type { AddProjectJWKSRequest } from './models/AddProjectJWKSRequest'; export type { AllowedIps } from './models/AllowedIps'; export type { AnnotationCreateValueRequest } from './models/AnnotationCreateValueRequest'; @@ -20,9 +21,11 @@ export type { AnnotationsMapResponse } from './models/AnnotationsMapResponse'; export type { AnnotationValueData } from './models/AnnotationValueData'; export type { ApiKeyCreateRequest } from './models/ApiKeyCreateRequest'; export type { ApiKeyCreateResponse } from './models/ApiKeyCreateResponse'; +export type { ApiKeyCreatorData } from './models/ApiKeyCreatorData'; export type { ApiKeyRevokeResponse } from './models/ApiKeyRevokeResponse'; export type { ApiKeysListResponseItem } from './models/ApiKeysListResponseItem'; export type { BillingAccount } from './models/BillingAccount'; +export type { BillingAccountState } from './models/BillingAccountState'; export type { BillingPaymentMethod } from './models/BillingPaymentMethod'; export type { BillingSubscriptionType } from './models/BillingSubscriptionType'; export type { Branch } from './models/Branch'; @@ -47,6 +50,7 @@ export type { ConsumptionHistoryPerPeriod } from './models/ConsumptionHistoryPer export type { ConsumptionHistoryPerProject } from './models/ConsumptionHistoryPerProject'; export type { ConsumptionHistoryPerProjectResponse } from './models/ConsumptionHistoryPerProjectResponse'; export type { ConsumptionHistoryPerTimeframe } from './models/ConsumptionHistoryPerTimeframe'; +export type { ConvertUserToOrgRequest } from './models/ConvertUserToOrgRequest'; export type { CurrentUserAuthAccount } from './models/CurrentUserAuthAccount'; export type { CurrentUserInfoAuthResponse } from './models/CurrentUserInfoAuthResponse'; export type { CurrentUserInfoResponse } from './models/CurrentUserInfoResponse'; @@ -89,10 +93,6 @@ export type { Member } from './models/Member'; export type { MemberRole } from './models/MemberRole'; export type { MemberUserInfo } from './models/MemberUserInfo'; export type { MemberWithUser } from './models/MemberWithUser'; -export type { NotificationActionType } from './models/NotificationActionType'; -export type { NotificationCategoryType } from './models/NotificationCategoryType'; -export type { NotificationMetricType } from './models/NotificationMetricType'; -export type { NotificationType } from './models/NotificationType'; export type { Operation } from './models/Operation'; export type { OperationAction } from './models/OperationAction'; export type { OperationResponse } from './models/OperationResponse'; @@ -120,7 +120,6 @@ export type { PgbouncerSettingsData } from './models/PgbouncerSettingsData'; export type { PgSettingsData } from './models/PgSettingsData'; export type { PgVersion } from './models/PgVersion'; export type { Project } from './models/Project'; -export type { ProjectConsumption } from './models/ProjectConsumption'; export type { ProjectCreateRequest } from './models/ProjectCreateRequest'; export type { ProjectJWKSResponse } from './models/ProjectJWKSResponse'; export type { ProjectLimits } from './models/ProjectLimits'; @@ -130,12 +129,14 @@ export type { ProjectPermission } from './models/ProjectPermission'; export type { ProjectPermissions } from './models/ProjectPermissions'; export type { ProjectQuota } from './models/ProjectQuota'; export type { ProjectResponse } from './models/ProjectResponse'; -export type { ProjectsConsumptionResponse } from './models/ProjectsConsumptionResponse'; +export type { ProjectsApplicationsMapResponse } from './models/ProjectsApplicationsMapResponse'; export type { ProjectSettingsData } from './models/ProjectSettingsData'; +export type { ProjectsIntegrationsMapResponse } from './models/ProjectsIntegrationsMapResponse'; export type { ProjectsResponse } from './models/ProjectsResponse'; export type { ProjectsWithIntegrationResponse } from './models/ProjectsWithIntegrationResponse'; export type { ProjectUpdateRequest } from './models/ProjectUpdateRequest'; export type { Provisioner } from './models/Provisioner'; +export type { RegionResponse } from './models/RegionResponse'; export type { Role } from './models/Role'; export type { RoleCreateRequest } from './models/RoleCreateRequest'; export type { RoleOperations } from './models/RoleOperations'; @@ -156,5 +157,7 @@ export { BranchService } from './services/BranchService'; export { ConsumptionService } from './services/ConsumptionService'; export { EndpointService } from './services/EndpointService'; export { OperationService } from './services/OperationService'; +export { OrganizationsService } from './services/OrganizationsService'; export { ProjectService } from './services/ProjectService'; +export { RegionService } from './services/RegionService'; export { UsersService } from './services/UsersService'; diff --git a/generated/models/ActiveRegionsResponse.ts b/generated/models/ActiveRegionsResponse.ts new file mode 100644 index 0000000..5fadcba --- /dev/null +++ b/generated/models/ActiveRegionsResponse.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { RegionResponse } from './RegionResponse'; +export type ActiveRegionsResponse = { + /** + * The list of active regions + */ + regions: Array; +}; + diff --git a/generated/models/ApiKeyCreateResponse.ts b/generated/models/ApiKeyCreateResponse.ts index 189f446..dce46ca 100644 --- a/generated/models/ApiKeyCreateResponse.ts +++ b/generated/models/ApiKeyCreateResponse.ts @@ -19,5 +19,9 @@ export type ApiKeyCreateResponse = { * A timestamp indicating when the API key was created */ created_at: string; + /** + * ID of the user who created this API key + */ + created_by: string; }; diff --git a/generated/models/ApiKeyCreatorData.ts b/generated/models/ApiKeyCreatorData.ts new file mode 100644 index 0000000..bd9ede8 --- /dev/null +++ b/generated/models/ApiKeyCreatorData.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * 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; + /** + * The name of the user. + */ + name: string; + /** + * The URL to the user's avatar image. + */ + image: string; +}; + diff --git a/generated/models/ApiKeyRevokeResponse.ts b/generated/models/ApiKeyRevokeResponse.ts index f372957..412654d 100644 --- a/generated/models/ApiKeyRevokeResponse.ts +++ b/generated/models/ApiKeyRevokeResponse.ts @@ -12,9 +12,13 @@ export type ApiKeyRevokeResponse = { */ name: string; /** - * A `true` or `false` value indicating whether the API key is revoked + * A timestamp indicating when the API key was created */ - revoked: boolean; + created_at: string; + /** + * ID of the user who created this API key + */ + created_by: string; /** * A timestamp indicating when the API was last used */ @@ -23,5 +27,9 @@ export type ApiKeyRevokeResponse = { * 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; }; diff --git a/generated/models/ApiKeysListResponseItem.ts b/generated/models/ApiKeysListResponseItem.ts index f62b619..64e0f02 100644 --- a/generated/models/ApiKeysListResponseItem.ts +++ b/generated/models/ApiKeysListResponseItem.ts @@ -2,6 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { ApiKeyCreatorData } from './ApiKeyCreatorData'; export type ApiKeysListResponseItem = { /** * The API key ID @@ -15,6 +16,7 @@ export type ApiKeysListResponseItem = { * A timestamp indicating when the API key was created */ created_at: string; + created_by: ApiKeyCreatorData; /** * A timestamp indicating when the API was last used */ diff --git a/generated/models/BillingAccount.ts b/generated/models/BillingAccount.ts index 8c4fb06..e0370e7 100644 --- a/generated/models/BillingAccount.ts +++ b/generated/models/BillingAccount.ts @@ -2,10 +2,12 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { BillingAccountState } from './BillingAccountState'; import type { BillingPaymentMethod } from './BillingPaymentMethod'; import type { BillingSubscriptionType } from './BillingSubscriptionType'; import type { PaymentSource } from './PaymentSource'; export type BillingAccount = { + state: BillingAccountState; payment_source: PaymentSource; subscription_type: BillingSubscriptionType; payment_method: BillingPaymentMethod; diff --git a/generated/models/NotificationActionType.ts b/generated/models/BillingAccountState.ts similarity index 52% rename from generated/models/NotificationActionType.ts rename to generated/models/BillingAccountState.ts index e68b547..c7206e4 100644 --- a/generated/models/NotificationActionType.ts +++ b/generated/models/BillingAccountState.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ /** - * The action type for a given notification + * State of the billing account. * */ -export type NotificationActionType = 'upgrade_plan' | 'upgrade_cu'; +export type BillingAccountState = 'UNKNOWN' | 'active' | 'suspended' | 'deactivated' | 'deleted'; diff --git a/generated/models/BillingPaymentMethod.ts b/generated/models/BillingPaymentMethod.ts index 02b20c1..f40007b 100644 --- a/generated/models/BillingPaymentMethod.ts +++ b/generated/models/BillingPaymentMethod.ts @@ -6,4 +6,4 @@ * Indicates whether and how an account makes payments. * */ -export type BillingPaymentMethod = 'UNKNOWN' | 'none' | 'stripe' | 'direct_payment' | 'aws_mp' | 'vercel_mp' | 'staff' | 'trial' | 'sponsorship'; +export type BillingPaymentMethod = 'UNKNOWN' | 'none' | 'stripe' | 'direct_payment' | 'aws_mp' | 'azure_mp' | 'vercel_mp' | 'staff' | 'trial' | 'sponsorship'; diff --git a/generated/models/Branch.ts b/generated/models/Branch.ts index 851c571..9488da0 100644 --- a/generated/models/Branch.ts +++ b/generated/models/Branch.ts @@ -36,6 +36,11 @@ export type Branch = { 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 * @@ -52,7 +57,7 @@ export type Branch = { * * @deprecated */ - primary: boolean; + primary?: boolean; /** * Whether the branch is the project's default branch * diff --git a/generated/models/BranchState.ts b/generated/models/BranchState.ts index 7b3e090..4feffea 100644 --- a/generated/models/BranchState.ts +++ b/generated/models/BranchState.ts @@ -3,6 +3,10 @@ /* tslint:disable */ /* eslint-disable */ /** - * The branch state + * 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. + * * 'ready' - the branch is fully operational and ready for querying. Expect normal query response times. + * * 'archived' - the branch is stored in cost-effective archival storage. Expect slow query response times. + * */ -export type BranchState = 'init' | 'ready'; +export type BranchState = string; diff --git a/generated/models/ConnectionDetails.ts b/generated/models/ConnectionDetails.ts index 56abab8..52c035a 100644 --- a/generated/models/ConnectionDetails.ts +++ b/generated/models/ConnectionDetails.ts @@ -7,6 +7,7 @@ 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; diff --git a/generated/models/ConsumptionHistoryPerPeriod.ts b/generated/models/ConsumptionHistoryPerPeriod.ts index 10e1a1c..dcda2c1 100644 --- a/generated/models/ConsumptionHistoryPerPeriod.ts +++ b/generated/models/ConsumptionHistoryPerPeriod.ts @@ -4,6 +4,9 @@ /* eslint-disable */ import type { ConsumptionHistoryPerTimeframe } from './ConsumptionHistoryPerTimeframe'; export type ConsumptionHistoryPerPeriod = { + /** + * The ID assigned to the specified period. + */ period_id: string; consumption: Array; }; diff --git a/generated/models/ConsumptionHistoryPerProject.ts b/generated/models/ConsumptionHistoryPerProject.ts index f3c7ab6..24a08d2 100644 --- a/generated/models/ConsumptionHistoryPerProject.ts +++ b/generated/models/ConsumptionHistoryPerProject.ts @@ -4,6 +4,9 @@ /* eslint-disable */ import type { ConsumptionHistoryPerPeriod } from './ConsumptionHistoryPerPeriod'; export type ConsumptionHistoryPerProject = { + /** + * The project ID + */ project_id: string; periods: Array; }; diff --git a/generated/models/ConsumptionHistoryPerTimeframe.ts b/generated/models/ConsumptionHistoryPerTimeframe.ts index 8bdd798..97fe96f 100644 --- a/generated/models/ConsumptionHistoryPerTimeframe.ts +++ b/generated/models/ConsumptionHistoryPerTimeframe.ts @@ -3,12 +3,40 @@ /* tslint:disable */ /* eslint-disable */ 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; + /** + * Bytes. The space occupied in storage. Synthetic storage size combines the logical data size and Write-Ahead Log (WAL) size for all branches. + * + */ synthetic_storage_size_bytes: number; + /** + * Bytes-Hour. The amount of storage consumed hourly. + * + */ data_storage_bytes_hour?: number; }; diff --git a/generated/models/NotificationType.ts b/generated/models/ConvertUserToOrgRequest.ts similarity index 58% rename from generated/models/NotificationType.ts rename to generated/models/ConvertUserToOrgRequest.ts index 0ee0662..f2697f8 100644 --- a/generated/models/NotificationType.ts +++ b/generated/models/ConvertUserToOrgRequest.ts @@ -2,8 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -/** - * The type of the notification - * - */ -export type NotificationType = 'info' | 'warning'; +export type ConvertUserToOrgRequest = { + name: string; +}; + diff --git a/generated/models/CurrentUserAuthAccount.ts b/generated/models/CurrentUserAuthAccount.ts index 242e879..0d731a9 100644 --- a/generated/models/CurrentUserAuthAccount.ts +++ b/generated/models/CurrentUserAuthAccount.ts @@ -6,6 +6,11 @@ import type { IdentityProviderId } from './IdentityProviderId'; export type CurrentUserAuthAccount = { email: string; image: string; + /** + * DEPRECATED. Use `email` field. + * + * @deprecated + */ login: string; name: string; provider: IdentityProviderId; diff --git a/generated/models/CurrentUserInfoResponse.ts b/generated/models/CurrentUserInfoResponse.ts index f128e55..3b099cd 100644 --- a/generated/models/CurrentUserInfoResponse.ts +++ b/generated/models/CurrentUserInfoResponse.ts @@ -16,6 +16,11 @@ export type CurrentUserInfoResponse = { email: string; id: string; image: string; + /** + * DEPRECATED. Use `email` field. + * + * @deprecated + */ login: string; name: string; last_name: string; diff --git a/generated/models/IdentityProviderId.ts b/generated/models/IdentityProviderId.ts index 4063346..35afd15 100644 --- a/generated/models/IdentityProviderId.ts +++ b/generated/models/IdentityProviderId.ts @@ -5,4 +5,4 @@ /** * Identity provider id from keycloak */ -export type IdentityProviderId = 'github' | 'google' | 'hasura' | 'microsoft' | 'keycloak' | 'test'; +export type IdentityProviderId = 'github' | 'google' | 'hasura' | 'microsoft' | 'vercelmp' | 'keycloak' | 'test'; diff --git a/generated/models/NotificationCategoryType.ts b/generated/models/NotificationCategoryType.ts deleted file mode 100644 index 7ec0575..0000000 --- a/generated/models/NotificationCategoryType.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * The category type for a given notification - * - */ -export type NotificationCategoryType = 'usage' | 'performance'; diff --git a/generated/models/NotificationMetricType.ts b/generated/models/NotificationMetricType.ts deleted file mode 100644 index fcfbd79..0000000 --- a/generated/models/NotificationMetricType.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * The metric type for a given notification - * - */ -export type NotificationMetricType = 'database_size' | 'connections' | 'cpu' | 'ram' | 'compute_over_limit'; diff --git a/generated/models/OperationAction.ts b/generated/models/OperationAction.ts index 6399d4d..cec28ee 100644 --- a/generated/models/OperationAction.ts +++ b/generated/models/OperationAction.ts @@ -5,4 +5,4 @@ /** * 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' | 'tenant_ignore' | 'tenant_attach' | 'tenant_detach' | 'tenant_reattach' | 'replace_safekeeper' | 'disable_maintenance' | 'apply_storage_config' | 'prepare_secondary_pageserver' | 'switch_pageserver' | 'detach_parent_branch'; +export type OperationAction = 'create_compute' | 'create_timeline' | 'start_compute' | 'suspend_compute' | 'apply_config' | 'check_availability' | 'delete_timeline' | 'create_branch' | 'tenant_ignore' | 'tenant_attach' | 'tenant_detach' | 'tenant_reattach' | 'replace_safekeeper' | 'disable_maintenance' | 'apply_storage_config' | 'prepare_secondary_pageserver' | 'switch_pageserver' | 'detach_parent_branch' | 'timeline_archive' | 'timeline_unarchive' | 'start_reserved_compute'; diff --git a/generated/models/OrganizationGuest.ts b/generated/models/OrganizationGuest.ts index b88a102..9474f13 100644 --- a/generated/models/OrganizationGuest.ts +++ b/generated/models/OrganizationGuest.ts @@ -3,8 +3,8 @@ /* tslint:disable */ /* eslint-disable */ /** - * Details of an organisation guest, who is not directly a member of - * an organisation but has been shared one of the projects it owns + * Details of an organization guest, who is not directly a member of + * an organization but has been shared one of the projects it owns * */ export type OrganizationGuest = { diff --git a/generated/models/OrganizationGuestsResponse.ts b/generated/models/OrganizationGuestsResponse.ts index cd01748..b157758 100644 --- a/generated/models/OrganizationGuestsResponse.ts +++ b/generated/models/OrganizationGuestsResponse.ts @@ -4,7 +4,7 @@ /* eslint-disable */ import type { OrganizationGuest } from './OrganizationGuest'; /** - * A list of details for guests of an organisation + * A list of details for guests of an organization * */ export type OrganizationGuestsResponse = Array; diff --git a/generated/models/OrganizationLimits.ts b/generated/models/OrganizationLimits.ts index ee872a2..242cd24 100644 --- a/generated/models/OrganizationLimits.ts +++ b/generated/models/OrganizationLimits.ts @@ -9,6 +9,7 @@ export type OrganizationLimits = { max_projects: number; max_branches: number; max_autoscaling_cu: number; + max_fixed_size_cu: number; cpu_seconds: number; max_active_endpoints: number; max_read_only_endpoints: number; diff --git a/generated/models/PgVersion.ts b/generated/models/PgVersion.ts index af0a2a6..2c9b223 100644 --- a/generated/models/PgVersion.ts +++ b/generated/models/PgVersion.ts @@ -3,6 +3,6 @@ /* tslint:disable */ /* eslint-disable */ /** - * The major Postgres version number. Currently supported versions are `14`, `15`, and `16`. version `17` is coming soon. + * The major Postgres version number. Currently supported versions are `14`, `15`, `16`, and `17`. */ export type PgVersion = number; diff --git a/generated/models/ProjectConsumption.ts b/generated/models/ProjectConsumption.ts deleted file mode 100644 index 406ca34..0000000 --- a/generated/models/ProjectConsumption.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type ProjectConsumption = { - /** - * The project ID - */ - project_id: string; - /** - * The Id of the consumption period, used to reference the `previous_period_id` field. - * - */ - period_id: string; - /** - * Bytes-Hour. The amount of storage the project consumed during the billing period. Expect some lag in the reported value. - * The value is reset at the beginning of each billing period. - * - */ - data_storage_bytes_hour: number; - /** - * The timestamp of the last update of the `data_storage_bytes_hour` field. - * - */ - data_storage_bytes_hour_updated_at?: string; - /** - * Bytes. The current space occupied by project in storage. Expect some lag in the reported value. - * - */ - synthetic_storage_size: number; - /** - * The timestamp of the last update of the `synthetic_storage_size` field. - * - */ - synthetic_storage_size_updated_at?: string; - /** - * Bytes. The egress traffic from the Neon cloud to the client for the project over the billing period. - * Includes egress traffic for deleted endpoints. Expect some lag in the reported value. The value is reset at the beginning of each billing period. - * - */ - data_transfer_bytes: number; - /** - * Timestamp of the last update of `data_transfer_bytes` field - * - */ - data_transfer_bytes_updated_at?: string; - /** - * Bytes. The Amount of WAL that travelled through storage for given project for all branches. - * Expect some lag in the reported value. The value is reset at the beginning of each billing period. - * - */ - written_data_bytes: number; - /** - * The timestamp of the last update of `written_data_bytes` field. - * - */ - written_data_bytes_updated_at?: string; - /** - * Seconds. The number of CPU seconds used by the project's compute endpoints, including compute endpoints that have been deleted. - * Expect some lag in the reported value. 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`. - * - */ - compute_time_seconds: number; - /** - * The timestamp of the last update of `compute_time_seconds` field. - * - */ - compute_time_seconds_updated_at?: string; - /** - * Seconds. The amount of time that compute endpoints in this project have been active. - * Expect some lag in the reported value. - * - * The value is reset at the beginning of each billing period. - * - */ - active_time_seconds: number; - /** - * The timestamp of the last update of the `active_time_seconds` field. - * - */ - active_time_seconds_updated_at?: string; - /** - * A timestamp indicating when the period was last updated. - * - */ - updated_at: string; - /** - * The start of the consumption period. - * - */ - period_start: string; - /** - * The end of the consumption period. - * - */ - period_end: string | null; - /** - * The `period_id` of the previous consumption period. - * - */ - previous_period_id: string | null; -}; - diff --git a/generated/models/ProjectLimits.ts b/generated/models/ProjectLimits.ts index 3b116c3..33852ec 100644 --- a/generated/models/ProjectLimits.ts +++ b/generated/models/ProjectLimits.ts @@ -10,6 +10,7 @@ export type ProjectLimits = { max_branches: number; max_protected_branches: number; max_autoscaling_cu: number; + max_fixed_size_cu: number; cpu_seconds: number; max_compute_time_non_primary: number; max_active_endpoints: number; @@ -19,6 +20,7 @@ export type ProjectLimits = { max_history_retention_seconds: number; min_autosuspend_seconds: number; max_data_transfer: number; + min_idle_seconds_to_autoarchive: number; }; features: Features; }; diff --git a/generated/models/ProjectOwnerData.ts b/generated/models/ProjectOwnerData.ts index 778ba69..d976b4c 100644 --- a/generated/models/ProjectOwnerData.ts +++ b/generated/models/ProjectOwnerData.ts @@ -5,6 +5,7 @@ import type { BillingSubscriptionType } from './BillingSubscriptionType'; export type ProjectOwnerData = { email: string; + name: string; branches_limit: number; subscription_type: BillingSubscriptionType; }; diff --git a/generated/models/ProjectsApplicationsMapResponse.ts b/generated/models/ProjectsApplicationsMapResponse.ts new file mode 100644 index 0000000..c00b3db --- /dev/null +++ b/generated/models/ProjectsApplicationsMapResponse.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A map where key is a project ID and a value is a list of installed applications. + * + */ +export type ProjectsApplicationsMapResponse = { + applications: Record>; +}; + diff --git a/generated/models/ProjectsConsumptionResponse.ts b/generated/models/ProjectsConsumptionResponse.ts deleted file mode 100644 index 411fa87..0000000 --- a/generated/models/ProjectsConsumptionResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ProjectConsumption } from './ProjectConsumption'; -export type ProjectsConsumptionResponse = { - projects: Array; - periods_in_response: number; -}; - diff --git a/generated/models/ProjectsIntegrationsMapResponse.ts b/generated/models/ProjectsIntegrationsMapResponse.ts new file mode 100644 index 0000000..ed835cd --- /dev/null +++ b/generated/models/ProjectsIntegrationsMapResponse.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +/** + * A map where key is a project ID and a value is a list of installed integrations. + * + */ +export type ProjectsIntegrationsMapResponse = { + integrations: Record>; +}; + diff --git a/generated/models/Provisioner.ts b/generated/models/Provisioner.ts index 8c6b930..3e80b1e 100644 --- a/generated/models/Provisioner.ts +++ b/generated/models/Provisioner.ts @@ -6,5 +6,11 @@ * The Neon compute provisioner. * Specify the `k8s-neonvm` provisioner to create a compute endpoint that supports Autoscaling. * + * Provisioner can be one of the following values: + * * k8s-pod + * * k8s-neonvm + * + * Clients must expect, that any string value that is not documented in the description above should be treated as a error. UNKNOWN value if safe to treat as an error too. + * */ -export type Provisioner = 'k8s-pod' | 'k8s-neonvm'; +export type Provisioner = string; diff --git a/generated/models/RegionResponse.ts b/generated/models/RegionResponse.ts new file mode 100644 index 0000000..02f72a7 --- /dev/null +++ b/generated/models/RegionResponse.ts @@ -0,0 +1,27 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type RegionResponse = { + /** + * The region ID as used in other API endpoints + */ + region_id: string; + /** + * A short description of the region. + */ + name: string; + /** + * Whether this region is used by default in new projects. + */ + 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; +}; + diff --git a/generated/models/UpdateUserInfoRequest.ts b/generated/models/UpdateUserInfoRequest.ts index 1d597b4..6f51a10 100644 --- a/generated/models/UpdateUserInfoRequest.ts +++ b/generated/models/UpdateUserInfoRequest.ts @@ -5,6 +5,11 @@ export type UpdateUserInfoRequest = { email?: string; id: string; + /** + * DEPRECATED. This field is ignored. + * + * @deprecated + */ image?: string; first_name?: string; last_name?: string; diff --git a/generated/services/BranchService.ts b/generated/services/BranchService.ts index a7ea30e..cc62278 100644 --- a/generated/services/BranchService.ts +++ b/generated/services/BranchService.ts @@ -73,12 +73,14 @@ export class BranchService { * For related information, see [Manage branches](https://neon.tech/docs/manage/branches/). * * @param projectId The Neon project ID + * @param search Search by branch `name` or `id`. You can specify partial `name` or `id` values to filter results. * @returns any Returned a list of branches for the specified project * @returns GeneralError General Error * @throws ApiError */ public listProjectBranches( projectId: string, + search?: string, ): CancelablePromise<(BranchesResponse & AnnotationsMapResponse) | GeneralError> { return this.httpRequest.request({ method: 'GET', @@ -86,6 +88,9 @@ export class BranchService { path: { 'project_id': projectId, }, + query: { + 'search': search, + }, }); } /** @@ -213,7 +218,6 @@ export class BranchService { * Retrieves the schema from the specified database. The `lsn` and `timestamp` values cannot be specified at the same time. If both are omitted, the database schema is retrieved from database's head . * @param projectId The Neon project ID * @param branchId The branch ID - * @param role The role on whose behalf the schema is retrieved * @param dbName Name of the database for which the schema is retrieved * @param lsn The Log Sequence Number (LSN) for which the schema is retrieved * @@ -226,7 +230,6 @@ export class BranchService { public getProjectBranchSchema( projectId: string, branchId: string, - role: string, dbName: string, lsn?: string, timestamp?: string, @@ -239,7 +242,6 @@ export class BranchService { 'branch_id': branchId, }, query: { - 'role': role, 'db_name': dbName, 'lsn': lsn, 'timestamp': timestamp, diff --git a/generated/services/ConsumptionService.ts b/generated/services/ConsumptionService.ts index c2b4c8a..377d30a 100644 --- a/generated/services/ConsumptionService.ts +++ b/generated/services/ConsumptionService.ts @@ -7,7 +7,6 @@ import type { ConsumptionHistoryPerAccountResponse } from '../models/Consumption import type { ConsumptionHistoryPerProjectResponse } from '../models/ConsumptionHistoryPerProjectResponse'; import type { GeneralError } from '../models/GeneralError'; import type { PaginationResponse } from '../models/PaginationResponse'; -import type { ProjectsConsumptionResponse } from '../models/ProjectsConsumptionResponse'; import type { CancelablePromise } from '../core/CancelablePromise'; import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class ConsumptionService { @@ -82,6 +81,7 @@ export class ConsumptionService { * Get consumption metrics for each project * Retrieves consumption metrics for Scale and Business plan projects. History begins at the time of upgrade. * Available for Scale and Business plan users only. + * Issuing a call to this API does not wake a project's compute endpoint. * * @param from Specify the start `date-time` for the consumption period. * The `date-time` value is rounded according to the specified `granularity`. @@ -109,6 +109,9 @@ export class ConsumptionService { * @param limit Specify a value from 1 to 100 to limit number of projects in the response. * @param projectIds 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` * * @param orgId 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 @@ -155,50 +158,4 @@ export class ConsumptionService { }, }); } - /** - * @deprecated - * Get project consumption metrics - * Retrieves consumption metrics for each project for the current billing period. - * For usage information, see [Retrieving metrics for all projects](https://neon.tech/docs/guides/partner-billing#retrieving-metrics-for-all-projects). - * - * @param cursor Specify the cursor value from the previous response to get the next batch of projects - * @param limit Specify a value from 1 to 1000 to limit number of projects in the response - * @param from Specify the start date-time for the consumption period. - * The time value must be provided in ISO 8601 format. - * If `from` or `to` is not specified, we return only current consumption period. - * - * @param to Specify the end date-time period for the consumption period. - * The time value must be provided in ISO 8601 format. - * If `from` or `to` is not specified, only the current consumption period is returned. - * - * @param orgId 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. - * - * @returns any Returned a list of project consumption metrics for the Neon account - * @returns GeneralError General Error - * @throws ApiError - */ - public listProjectsConsumption( - cursor?: string, - limit: number = 10, - from?: string, - to?: string, - orgId?: string, - ): CancelablePromise<(ProjectsConsumptionResponse & PaginationResponse) | GeneralError> { - return this.httpRequest.request({ - method: 'GET', - url: '/consumption/projects', - query: { - 'cursor': cursor, - 'limit': limit, - 'from': from, - 'to': to, - 'org_id': orgId, - }, - errors: { - 404: `Account is not a member of the organization specified by \`org_id\`.`, - }, - }); - } } diff --git a/generated/services/OrganizationsService.ts b/generated/services/OrganizationsService.ts new file mode 100644 index 0000000..649bac0 --- /dev/null +++ b/generated/services/OrganizationsService.ts @@ -0,0 +1,141 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { GeneralError } from '../models/GeneralError'; +import type { Member } from '../models/Member'; +import type { Organization } from '../models/Organization'; +import type { OrganizationInvitationsResponse } from '../models/OrganizationInvitationsResponse'; +import type { OrganizationInvitesCreateRequest } from '../models/OrganizationInvitesCreateRequest'; +import type { OrganizationMembersResponse } from '../models/OrganizationMembersResponse'; +import type { OrganizationsResponse } from '../models/OrganizationsResponse'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +export class OrganizationsService { + constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get organization details + * Retrieves information about the specified organization. + * + * @param orgId The Neon organization ID + * @returns Organization Returned information about the organization + * @returns GeneralError General Error + * @throws ApiError + */ + public getOrganization( + orgId: string, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/organizations/{org_id}', + path: { + 'org_id': orgId, + }, + }); + } + /** + * Get organization members details + * Retrieves information about the specified organization members. + * + * @param orgId The Neon organization ID + * @returns OrganizationMembersResponse Returned information about organization members + * @returns GeneralError General Error + * @throws ApiError + */ + public getOrganizationMembers( + orgId: string, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/organizations/{org_id}/members', + path: { + 'org_id': orgId, + }, + }); + } + /** + * Get organization member details + * Retrieves information about the specified organization member. + * + * @param orgId The Neon organization ID + * @param memberId The Neon organization member ID + * @returns Member Returned information about the organization member + * @returns GeneralError General Error + * @throws ApiError + */ + public getOrganizationMember( + orgId: string, + memberId: string, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/organizations/{org_id}/members/{member_id}', + path: { + 'org_id': orgId, + 'member_id': memberId, + }, + }); + } + /** + * Get organization invitation details + * Retrieves information about extended invitations for the specified organization + * + * @param orgId The Neon organization ID + * @returns OrganizationInvitationsResponse Returned information about the organization invitations + * @returns GeneralError General Error + * @throws ApiError + */ + public getOrganizationInvitations( + orgId: string, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/organizations/{org_id}/invitations', + path: { + 'org_id': orgId, + }, + }); + } + /** + * Create organization invitations + * Creates invitations for a specific organization. + * If the invited user has an existing account, they automatically join as a member. + * If they don't yet have an account, they are invited to create one, after which they become a member. + * Each invited user receives an email notification. + * + * @param orgId The Neon organization ID + * @param requestBody + * @returns OrganizationInvitationsResponse The created organization invitation + * @returns GeneralError General Error + * @throws ApiError + */ + public createOrganizationInvitations( + orgId: string, + requestBody: OrganizationInvitesCreateRequest, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'POST', + url: '/organizations/{org_id}/invitations', + path: { + 'org_id': orgId, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + /** + * Get current user organizations list + * Retrieves information about the current Neon user's organizations + * + * @returns OrganizationsResponse Returned information about the current user organizations + * + * @returns GeneralError General Error + * @throws ApiError + */ + public getCurrentUserOrganizations(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/users/me/organizations', + }); + } +} diff --git a/generated/services/ProjectService.ts b/generated/services/ProjectService.ts index b14d895..446fd9e 100644 --- a/generated/services/ProjectService.ts +++ b/generated/services/ProjectService.ts @@ -2,6 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { AddProjectJWKSRequest } from '../models/AddProjectJWKSRequest'; import type { BranchResponse } from '../models/BranchResponse'; import type { ConnectionURIResponse } from '../models/ConnectionURIResponse'; import type { ConnectionURIsResponse } from '../models/ConnectionURIsResponse'; @@ -9,12 +10,17 @@ import type { DatabasesResponse } from '../models/DatabasesResponse'; import type { EndpointsResponse } from '../models/EndpointsResponse'; import type { GeneralError } from '../models/GeneralError'; import type { GrantPermissionToProjectRequest } from '../models/GrantPermissionToProjectRequest'; +import type { JWKS } from '../models/JWKS'; +import type { JWKSCreationOperation } from '../models/JWKSCreationOperation'; import type { OperationsResponse } from '../models/OperationsResponse'; import type { PaginationResponse } from '../models/PaginationResponse'; import type { ProjectCreateRequest } from '../models/ProjectCreateRequest'; +import type { ProjectJWKSResponse } from '../models/ProjectJWKSResponse'; import type { ProjectPermission } from '../models/ProjectPermission'; import type { ProjectPermissions } from '../models/ProjectPermissions'; import type { ProjectResponse } from '../models/ProjectResponse'; +import type { ProjectsApplicationsMapResponse } from '../models/ProjectsApplicationsMapResponse'; +import type { ProjectsIntegrationsMapResponse } from '../models/ProjectsIntegrationsMapResponse'; import type { ProjectsResponse } from '../models/ProjectsResponse'; import type { ProjectUpdateRequest } from '../models/ProjectUpdateRequest'; import type { RolesResponse } from '../models/RolesResponse'; @@ -41,7 +47,7 @@ export class ProjectService { limit: number = 10, search?: string, orgId?: string, - ): CancelablePromise<(ProjectsResponse & PaginationResponse) | GeneralError> { + ): CancelablePromise<(ProjectsResponse & PaginationResponse & ProjectsApplicationsMapResponse & ProjectsIntegrationsMapResponse) | GeneralError> { return this.httpRequest.request({ method: 'GET', url: '/projects', @@ -58,11 +64,10 @@ export class ProjectService { * Creates a Neon project. * A project is the top-level object in the Neon object hierarchy. * Plan limits define how many projects you can create. - * Neon's Free plan permits one project per Neon account. * For more information, see [Manage projects](https://neon.tech/docs/manage/projects/). * * You can specify a region and Postgres version in the request body. - * Neon currently supports PostgreSQL 14, 15 and 16. version 17 is coming soon. + * Neon currently supports PostgreSQL 14, 15, 16, and 17. * For supported regions and `region_id` values, see [Regions](https://neon.tech/docs/introduction/regions/). * * @param requestBody @@ -247,6 +252,82 @@ export class ProjectService { }, }); } + /** + * Returns all available JWKS URLs for a project + * Returns all the available JWKS URLs that can be used for verifying JWTs used as the authentication mechanism for the specified project. + * + * @param projectId The Neon project ID + * @returns ProjectJWKSResponse The JWKS URLs available for the project + * @returns GeneralError General Error + * @throws ApiError + */ + public getProjectJwks( + projectId: string, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/projects/{project_id}/jwks', + path: { + 'project_id': projectId, + }, + }); + } + /** + * Adds a JWKS URL to a project + * Add a new JWKS URL to a project, such that it can be used for verifying JWTs used as the authentication mechanism for the specified project. + * + * The URL must be a valid HTTPS URL that returns a JSON Web Key Set. + * + * The `provider_name` field allows you to specify which authentication provider you're using (e.g., Clerk, Auth0, AWS Cognito, etc.). + * + * The `branch_id` can be used to specify on which branches the JWKS URL will be accepted. If not specified, then it will work on any branch. + * + * The `role_names` can be used to specify for which roles the JWKS URL will be accepted. + * + * The `jwt_audience` can be used to specify which "aud" values should be accepted by Neon in the JWTs that are used for authentication. + * + * @param projectId The Neon project ID + * @param requestBody + * @returns GeneralError General Error + * @returns JWKSCreationOperation The JWKS URL was added to the project's authentication connections + * @throws ApiError + */ + public addProjectJwks( + projectId: string, + requestBody: AddProjectJWKSRequest, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'POST', + url: '/projects/{project_id}/jwks', + path: { + 'project_id': projectId, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + /** + * Delete a JWKS URL + * Deletes a JWKS URL from the specified project + * @param projectId The Neon project ID + * @param jwksId The JWKS ID + * @returns JWKS Deleted a JWKS URL from the project + * @returns GeneralError General Error + * @throws ApiError + */ + public deleteProjectJwks( + projectId: string, + jwksId: string, + ): CancelablePromise { + return this.httpRequest.request({ + method: 'DELETE', + url: '/projects/{project_id}/jwks/{jwks_id}', + path: { + 'project_id': projectId, + 'jwks_id': jwksId, + }, + }); + } /** * Get a connection URI * Retrieves a connection URI for the specified database. diff --git a/generated/services/RegionService.ts b/generated/services/RegionService.ts new file mode 100644 index 0000000..7cbe45f --- /dev/null +++ b/generated/services/RegionService.ts @@ -0,0 +1,25 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ActiveRegionsResponse } from '../models/ActiveRegionsResponse'; +import type { GeneralError } from '../models/GeneralError'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +export class RegionService { + constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get current active regions + * Retrieves the list of supported Neon regions + * + * @returns ActiveRegionsResponse The list of active regions + * @returns GeneralError General Error + * @throws ApiError + */ + public getActiveRegions(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/regions', + }); + } +} diff --git a/generated/services/UsersService.ts b/generated/services/UsersService.ts index 6252225..f480153 100644 --- a/generated/services/UsersService.ts +++ b/generated/services/UsersService.ts @@ -44,7 +44,6 @@ export class UsersService { /** * Transfer projects from your personal account to a specified destination account * Transfers selected projects, identified by their IDs, from your personal account to a specified organization. - * This API is only available for early access users. * * @param requestBody * @returns EmptyResponse Projects successfully transferred from personal account to organization