Skip to content

Commit

Permalink
feat: track latest spec changes
Browse files Browse the repository at this point in the history
  • Loading branch information
paambaati committed Oct 1, 2023
2 parents 6f959bf + 052eb15 commit f1e842d
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 18 deletions.
3 changes: 3 additions & 0 deletions generated/NeonClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { EndpointService } from './services/EndpointService';
import { OperationService } from './services/OperationService';
import { PreviewService } from './services/PreviewService';
import { ProjectService } from './services/ProjectService';
import { UsersService } from './services/UsersService';

type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;

Expand All @@ -23,6 +24,7 @@ export class NeonClient {
public readonly operation: OperationService;
public readonly preview: PreviewService;
public readonly project: ProjectService;
public readonly users: UsersService;

public readonly request: BaseHttpRequest;

Expand All @@ -45,6 +47,7 @@ export class NeonClient {
this.operation = new OperationService(this.request);
this.preview = new PreviewService(this.request);
this.project = new ProjectService(this.request);
this.users = new UsersService(this.request);
}
}

4 changes: 3 additions & 1 deletion generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export type { ProjectConsumptionNew } from './models/ProjectConsumptionNew';
export type { ProjectCreateRequest } from './models/ProjectCreateRequest';
export type { ProjectLimits } from './models/ProjectLimits';
export type { ProjectListItem } from './models/ProjectListItem';
export type { ProjectOperations } from './models/ProjectOperations';
export type { ProjectOwnerData } from './models/ProjectOwnerData';
export type { ProjectQuota } from './models/ProjectQuota';
export type { ProjectResponse } from './models/ProjectResponse';
Expand All @@ -91,11 +90,14 @@ export type { RoleResponse } from './models/RoleResponse';
export type { RolesResponse } from './models/RolesResponse';
export type { StatementData } from './models/StatementData';
export type { StatementResult } from './models/StatementResult';
export type { SupportTicketSeverity } from './models/SupportTicketSeverity';
export type { SuspendTimeoutSeconds } from './models/SuspendTimeoutSeconds';
export type { UpdateUserInfoRequest } from './models/UpdateUserInfoRequest';

export { ApiKeyService } from './services/ApiKeyService';
export { BranchService } from './services/BranchService';
export { EndpointService } from './services/EndpointService';
export { OperationService } from './services/OperationService';
export { PreviewService } from './services/PreviewService';
export { ProjectService } from './services/ProjectService';
export { UsersService } from './services/UsersService';
5 changes: 5 additions & 0 deletions generated/models/BillingAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,10 @@ export type BillingAccount = {
*
*/
address_state: string;
/**
* Orb user portal url
*
*/
orb_portal_url?: string;
};

2 changes: 1 addition & 1 deletion generated/models/BillingSubscriptionType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
* Notice that for users without billing account this will be "UNKNOWN"
*
*/
export type BillingSubscriptionType = 'UNKNOWN' | 'free' | 'pro' | 'platform_partnership' | 'enterprise';
export type BillingSubscriptionType = 'UNKNOWN' | 'free' | 'pro' | 'direct_sales';
1 change: 1 addition & 0 deletions generated/models/CurrentUserInfoResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type CurrentUserInfoResponse = {
image: string;
login: string;
name: string;
last_name: string;
projects_limit: number;
branches_limit: number;
max_autoscaling_limit: ComputeUnit;
Expand Down
15 changes: 15 additions & 0 deletions generated/models/PaymentSourceBankCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,20 @@ export type PaymentSourceBankCard = {
*
*/
last4: string;
/**
* Brand of credit card.
*
*/
brand?: 'amex' | 'diners' | 'discover' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa';
/**
* Credit card expiration month
*
*/
exp_month?: number;
/**
* Credit card expiration year
*
*/
exp_year?: number;
};

2 changes: 1 addition & 1 deletion generated/models/PgVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
/* eslint-disable */

/**
* The major PostgreSQL version number. Currently supported version are `14` and `15`.
* The major PostgreSQL version number. Currently supported versions are `14`, `15` and `16`.
*/
export type PgVersion = number;
10 changes: 0 additions & 10 deletions generated/models/ProjectOperations.ts

This file was deleted.

6 changes: 6 additions & 0 deletions generated/models/SupportTicketSeverity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

export type SupportTicketSeverity = 'low' | 'normal' | 'high' | 'critical';
2 changes: 1 addition & 1 deletion generated/models/SuspendTimeoutSeconds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* eslint-disable */

/**
* Duration of inactivity in seconds after which the cimpute endpoint is
* Duration of inactivity in seconds after which the compute endpoint is
* automatically suspended. The value `0` means use the global default.
* The value `-1` means never suspend. The default value is `300` seconds (5 minutes).
* The maximum value is `604800` seconds (1 week). For more information, see
Expand Down
13 changes: 13 additions & 0 deletions generated/models/UpdateUserInfoRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

export type UpdateUserInfoRequest = {
email: string;
id: string;
image?: string;
first_name?: string;
last_name?: string;
};

7 changes: 3 additions & 4 deletions generated/services/ProjectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type { GeneralError } from '../models/GeneralError';
import type { OperationsResponse } from '../models/OperationsResponse';
import type { PaginationResponse } from '../models/PaginationResponse';
import type { ProjectCreateRequest } from '../models/ProjectCreateRequest';
import type { ProjectOperations } from '../models/ProjectOperations';
import type { ProjectResponse } from '../models/ProjectResponse';
import type { ProjectsResponse } from '../models/ProjectsResponse';
import type { ProjectUpdateRequest } from '../models/ProjectUpdateRequest';
Expand All @@ -30,7 +29,7 @@ export class ProjectService {
* For more information, see [Manage projects](https://neon.tech/docs/manage/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 100 to limit number of projects in the response.
* @param limit Specify a value from 1 to 400 to limit number of projects in the response.
* @returns any Returned a list of projects for the Neon account
* @returns GeneralError General Error
* @throws ApiError
Expand Down Expand Up @@ -112,14 +111,14 @@ export class ProjectService {
*
* @param projectId The Neon project ID
* @param requestBody
* @returns ProjectOperations Updated the specified project
* @returns ProjectResponse Updated the specified project
* @returns GeneralError General Error
* @throws ApiError
*/
public updateProject(
projectId: string,
requestBody: ProjectUpdateRequest,
): CancelablePromise<ProjectOperations | GeneralError> {
): CancelablePromise<ProjectResponse | GeneralError> {
return this.httpRequest.request({
method: 'PATCH',
url: '/projects/{project_id}',
Expand Down
31 changes: 31 additions & 0 deletions generated/services/UsersService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CurrentUserInfoResponse } from '../models/CurrentUserInfoResponse';
import type { GeneralError } from '../models/GeneralError';

import type { CancelablePromise } from '../core/CancelablePromise';
import type { BaseHttpRequest } from '../core/BaseHttpRequest';

export class UsersService {

constructor(public readonly httpRequest: BaseHttpRequest) {}

/**
* Get current user details
* Retrieves information about the current user
* @returns CurrentUserInfoResponse Returned information about the current user
* Warning! This api is unstable and susceptible to changes
*
* @returns GeneralError General Error
* @throws ApiError
*/
public getCurrentUserInfo(): CancelablePromise<CurrentUserInfoResponse | GeneralError> {
return this.httpRequest.request({
method: 'GET',
url: '/users/me',
});
}

}

0 comments on commit f1e842d

Please sign in to comment.