Skip to content

Commit

Permalink
feat: update to track latest spec changes
Browse files Browse the repository at this point in the history
  • Loading branch information
paambaati committed Nov 10, 2024
1 parent b260c95 commit 2cb69db
Show file tree
Hide file tree
Showing 42 changed files with 463 additions and 214 deletions.
6 changes: 6 additions & 0 deletions generated/NeonClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = FetchHttpRequest) {
Expand All @@ -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);
}
}
Expand Down
15 changes: 9 additions & 6 deletions generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand All @@ -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';
Expand All @@ -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';
12 changes: 12 additions & 0 deletions generated/models/ActiveRegionsResponse.ts
Original file line number Diff line number Diff line change
@@ -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<RegionResponse>;
};

4 changes: 4 additions & 0 deletions generated/models/ApiKeyCreateResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

22 changes: 22 additions & 0 deletions generated/models/ApiKeyCreatorData.ts
Original file line number Diff line number Diff line change
@@ -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;
};

12 changes: 10 additions & 2 deletions generated/models/ApiKeyRevokeResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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;
};

2 changes: 2 additions & 0 deletions generated/models/ApiKeysListResponseItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiKeyCreatorData } from './ApiKeyCreatorData';
export type ApiKeysListResponseItem = {
/**
* The API key ID
Expand All @@ -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
*/
Expand Down
2 changes: 2 additions & 0 deletions generated/models/BillingAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 1 addition & 1 deletion generated/models/BillingPaymentMethod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
7 changes: 6 additions & 1 deletion generated/models/Branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -52,7 +57,7 @@ export type Branch = {
*
* @deprecated
*/
primary: boolean;
primary?: boolean;
/**
* Whether the branch is the project's default branch
*
Expand Down
8 changes: 6 additions & 2 deletions generated/models/BranchState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
1 change: 1 addition & 0 deletions generated/models/ConnectionDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions generated/models/ConsumptionHistoryPerPeriod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ConsumptionHistoryPerTimeframe>;
};
Expand Down
3 changes: 3 additions & 0 deletions generated/models/ConsumptionHistoryPerProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
/* eslint-disable */
import type { ConsumptionHistoryPerPeriod } from './ConsumptionHistoryPerPeriod';
export type ConsumptionHistoryPerProject = {
/**
* The project ID
*/
project_id: string;
periods: Array<ConsumptionHistoryPerPeriod>;
};
Expand Down
28 changes: 28 additions & 0 deletions generated/models/ConsumptionHistoryPerTimeframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

5 changes: 5 additions & 0 deletions generated/models/CurrentUserAuthAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions generated/models/CurrentUserInfoResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion generated/models/IdentityProviderId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
9 changes: 0 additions & 9 deletions generated/models/NotificationCategoryType.ts

This file was deleted.

9 changes: 0 additions & 9 deletions generated/models/NotificationMetricType.ts

This file was deleted.

2 changes: 1 addition & 1 deletion generated/models/OperationAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Loading

0 comments on commit 2cb69db

Please sign in to comment.