Update new-frontend client (#625)

This commit is contained in:
Alejandra
2024-03-01 12:12:55 -05:00
committed by GitHub
parent 1893602d61
commit a22da4b1b5
25 changed files with 188 additions and 47 deletions

View File

@@ -11,6 +11,7 @@ export type { Body_login_login_access_token } from './models/Body_login_login_ac
export type { HTTPValidationError } from './models/HTTPValidationError'; export type { HTTPValidationError } from './models/HTTPValidationError';
export type { ItemCreate } from './models/ItemCreate'; export type { ItemCreate } from './models/ItemCreate';
export type { ItemOut } from './models/ItemOut'; export type { ItemOut } from './models/ItemOut';
export type { ItemsOut } from './models/ItemsOut';
export type { ItemUpdate } from './models/ItemUpdate'; export type { ItemUpdate } from './models/ItemUpdate';
export type { Message } from './models/Message'; export type { Message } from './models/Message';
export type { NewPassword } from './models/NewPassword'; export type { NewPassword } from './models/NewPassword';
@@ -19,6 +20,7 @@ export type { UpdatePassword } from './models/UpdatePassword';
export type { UserCreate } from './models/UserCreate'; export type { UserCreate } from './models/UserCreate';
export type { UserCreateOpen } from './models/UserCreateOpen'; export type { UserCreateOpen } from './models/UserCreateOpen';
export type { UserOut } from './models/UserOut'; export type { UserOut } from './models/UserOut';
export type { UsersOut } from './models/UsersOut';
export type { UserUpdate } from './models/UserUpdate'; export type { UserUpdate } from './models/UserUpdate';
export type { UserUpdateMe } from './models/UserUpdateMe'; export type { UserUpdateMe } from './models/UserUpdateMe';
export type { ValidationError } from './models/ValidationError'; export type { ValidationError } from './models/ValidationError';
@@ -27,6 +29,7 @@ export { $Body_login_login_access_token } from './schemas/$Body_login_login_acce
export { $HTTPValidationError } from './schemas/$HTTPValidationError'; export { $HTTPValidationError } from './schemas/$HTTPValidationError';
export { $ItemCreate } from './schemas/$ItemCreate'; export { $ItemCreate } from './schemas/$ItemCreate';
export { $ItemOut } from './schemas/$ItemOut'; export { $ItemOut } from './schemas/$ItemOut';
export { $ItemsOut } from './schemas/$ItemsOut';
export { $ItemUpdate } from './schemas/$ItemUpdate'; export { $ItemUpdate } from './schemas/$ItemUpdate';
export { $Message } from './schemas/$Message'; export { $Message } from './schemas/$Message';
export { $NewPassword } from './schemas/$NewPassword'; export { $NewPassword } from './schemas/$NewPassword';
@@ -35,6 +38,7 @@ export { $UpdatePassword } from './schemas/$UpdatePassword';
export { $UserCreate } from './schemas/$UserCreate'; export { $UserCreate } from './schemas/$UserCreate';
export { $UserCreateOpen } from './schemas/$UserCreateOpen'; export { $UserCreateOpen } from './schemas/$UserCreateOpen';
export { $UserOut } from './schemas/$UserOut'; export { $UserOut } from './schemas/$UserOut';
export { $UsersOut } from './schemas/$UsersOut';
export { $UserUpdate } from './schemas/$UserUpdate'; export { $UserUpdate } from './schemas/$UserUpdate';
export { $UserUpdateMe } from './schemas/$UserUpdateMe'; export { $UserUpdateMe } from './schemas/$UserUpdateMe';
export { $ValidationError } from './schemas/$ValidationError'; export { $ValidationError } from './schemas/$ValidationError';

View File

@@ -4,10 +4,10 @@
/* eslint-disable */ /* eslint-disable */
export type Body_login_login_access_token = { export type Body_login_login_access_token = {
grant_type?: string; grant_type?: (string | null);
username: string; username: string;
password: string; password: string;
scope?: string; scope?: string;
client_id?: string; client_id?: (string | null);
client_secret?: string; client_secret?: (string | null);
}; };

View File

@@ -5,5 +5,5 @@
export type ItemCreate = { export type ItemCreate = {
title: string; title: string;
description?: string; description?: (string | null);
}; };

View File

@@ -5,6 +5,7 @@
export type ItemOut = { export type ItemOut = {
title: string; title: string;
description?: string; description?: (string | null);
id: number; id: number;
owner_id: number;
}; };

View File

@@ -4,6 +4,6 @@
/* eslint-disable */ /* eslint-disable */
export type ItemUpdate = { export type ItemUpdate = {
title?: string; title?: (string | null);
description?: string; description?: (string | null);
}; };

View File

@@ -0,0 +1,11 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ItemOut } from './ItemOut';
export type ItemsOut = {
data: Array<ItemOut>;
count: number;
};

View File

@@ -7,6 +7,6 @@ export type UserCreate = {
email: string; email: string;
is_active?: boolean; is_active?: boolean;
is_superuser?: boolean; is_superuser?: boolean;
full_name?: string; full_name?: (string | null);
password: string; password: string;
}; };

View File

@@ -6,5 +6,5 @@
export type UserCreateOpen = { export type UserCreateOpen = {
email: string; email: string;
password: string; password: string;
full_name?: string; full_name?: (string | null);
}; };

View File

@@ -7,6 +7,6 @@ export type UserOut = {
email: string; email: string;
is_active?: boolean; is_active?: boolean;
is_superuser?: boolean; is_superuser?: boolean;
full_name?: string; full_name?: (string | null);
id: number; id: number;
}; };

View File

@@ -4,9 +4,9 @@
/* eslint-disable */ /* eslint-disable */
export type UserUpdate = { export type UserUpdate = {
email?: string; email?: (string | null);
is_active?: boolean; is_active?: boolean;
is_superuser?: boolean; is_superuser?: boolean;
full_name?: string; full_name?: (string | null);
password?: string; password?: (string | null);
}; };

View File

@@ -4,6 +4,6 @@
/* eslint-disable */ /* eslint-disable */
export type UserUpdateMe = { export type UserUpdateMe = {
full_name?: string; full_name?: (string | null);
email?: string; email?: (string | null);
}; };

View File

@@ -0,0 +1,11 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { UserOut } from './UserOut';
export type UsersOut = {
data: Array<UserOut>;
count: number;
};

View File

@@ -5,8 +5,13 @@
export const $Body_login_login_access_token = { export const $Body_login_login_access_token = {
properties: { properties: {
grant_type: { grant_type: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
pattern: 'password', pattern: 'password',
}, {
type: 'null',
}],
}, },
username: { username: {
type: 'string', type: 'string',
@@ -20,10 +25,20 @@ export const $Body_login_login_access_token = {
type: 'string', type: 'string',
}, },
client_id: { client_id: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
client_secret: { client_secret: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
}, },
} as const; } as const;

View File

@@ -9,7 +9,12 @@ export const $ItemCreate = {
isRequired: true, isRequired: true,
}, },
description: { description: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
}, },
} as const; } as const;

View File

@@ -9,11 +9,20 @@ export const $ItemOut = {
isRequired: true, isRequired: true,
}, },
description: { description: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
id: { id: {
type: 'number', type: 'number',
isRequired: true, isRequired: true,
},
owner_id: {
type: 'number',
isRequired: true,
}, },
}, },
} as const; } as const;

View File

@@ -5,10 +5,20 @@
export const $ItemUpdate = { export const $ItemUpdate = {
properties: { properties: {
title: { title: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
description: { description: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
}, },
} as const; } as const;

View File

@@ -0,0 +1,19 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export const $ItemsOut = {
properties: {
data: {
type: 'array',
contains: {
type: 'ItemOut',
},
isRequired: true,
},
count: {
type: 'number',
isRequired: true,
},
},
} as const;

View File

@@ -7,7 +7,6 @@ export const $UserCreate = {
email: { email: {
type: 'string', type: 'string',
isRequired: true, isRequired: true,
format: 'email',
}, },
is_active: { is_active: {
type: 'boolean', type: 'boolean',
@@ -16,7 +15,12 @@ export const $UserCreate = {
type: 'boolean', type: 'boolean',
}, },
full_name: { full_name: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
password: { password: {
type: 'string', type: 'string',

View File

@@ -7,14 +7,18 @@ export const $UserCreateOpen = {
email: { email: {
type: 'string', type: 'string',
isRequired: true, isRequired: true,
format: 'email',
}, },
password: { password: {
type: 'string', type: 'string',
isRequired: true, isRequired: true,
}, },
full_name: { full_name: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
}, },
} as const; } as const;

View File

@@ -7,7 +7,6 @@ export const $UserOut = {
email: { email: {
type: 'string', type: 'string',
isRequired: true, isRequired: true,
format: 'email',
}, },
is_active: { is_active: {
type: 'boolean', type: 'boolean',
@@ -16,7 +15,12 @@ export const $UserOut = {
type: 'boolean', type: 'boolean',
}, },
full_name: { full_name: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
id: { id: {
type: 'number', type: 'number',

View File

@@ -5,8 +5,12 @@
export const $UserUpdate = { export const $UserUpdate = {
properties: { properties: {
email: { email: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
format: 'email', }, {
type: 'null',
}],
}, },
is_active: { is_active: {
type: 'boolean', type: 'boolean',
@@ -15,10 +19,20 @@ export const $UserUpdate = {
type: 'boolean', type: 'boolean',
}, },
full_name: { full_name: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
password: { password: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
}, },
} as const; } as const;

View File

@@ -5,11 +5,20 @@
export const $UserUpdateMe = { export const $UserUpdateMe = {
properties: { properties: {
full_name: { full_name: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
}, {
type: 'null',
}],
}, },
email: { email: {
type: 'any-of',
contains: [{
type: 'string', type: 'string',
format: 'email', }, {
type: 'null',
}],
}, },
}, },
} as const; } as const;

View File

@@ -0,0 +1,19 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export const $UsersOut = {
properties: {
data: {
type: 'array',
contains: {
type: 'UserOut',
},
isRequired: true,
},
count: {
type: 'number',
isRequired: true,
},
},
} as const;

View File

@@ -4,6 +4,7 @@
/* eslint-disable */ /* eslint-disable */
import type { ItemCreate } from '../models/ItemCreate'; import type { ItemCreate } from '../models/ItemCreate';
import type { ItemOut } from '../models/ItemOut'; import type { ItemOut } from '../models/ItemOut';
import type { ItemsOut } from '../models/ItemsOut';
import type { ItemUpdate } from '../models/ItemUpdate'; import type { ItemUpdate } from '../models/ItemUpdate';
import type { Message } from '../models/Message'; import type { Message } from '../models/Message';
@@ -16,7 +17,7 @@ export class ItemsService {
/** /**
* Read Items * Read Items
* Retrieve items. * Retrieve items.
* @returns ItemOut Successful Response * @returns ItemsOut Successful Response
* @throws ApiError * @throws ApiError
*/ */
public static readItems({ public static readItems({
@@ -25,7 +26,7 @@ limit = 100,
}: { }: {
skip?: number, skip?: number,
limit?: number, limit?: number,
}): CancelablePromise<Array<ItemOut>> { }): CancelablePromise<ItemsOut> {
return __request(OpenAPI, { return __request(OpenAPI, {
method: 'GET', method: 'GET',
url: '/api/v1/items/', url: '/api/v1/items/',

View File

@@ -7,6 +7,7 @@ import type { UpdatePassword } from '../models/UpdatePassword';
import type { UserCreate } from '../models/UserCreate'; import type { UserCreate } from '../models/UserCreate';
import type { UserCreateOpen } from '../models/UserCreateOpen'; import type { UserCreateOpen } from '../models/UserCreateOpen';
import type { UserOut } from '../models/UserOut'; import type { UserOut } from '../models/UserOut';
import type { UsersOut } from '../models/UsersOut';
import type { UserUpdate } from '../models/UserUpdate'; import type { UserUpdate } from '../models/UserUpdate';
import type { UserUpdateMe } from '../models/UserUpdateMe'; import type { UserUpdateMe } from '../models/UserUpdateMe';
@@ -19,7 +20,7 @@ export class UsersService {
/** /**
* Read Users * Read Users
* Retrieve users. * Retrieve users.
* @returns UserOut Successful Response * @returns UsersOut Successful Response
* @throws ApiError * @throws ApiError
*/ */
public static readUsers({ public static readUsers({
@@ -28,7 +29,7 @@ limit = 100,
}: { }: {
skip?: number, skip?: number,
limit?: number, limit?: number,
}): CancelablePromise<Array<UserOut>> { }): CancelablePromise<UsersOut> {
return __request(OpenAPI, { return __request(OpenAPI, {
method: 'GET', method: 'GET',
url: '/api/v1/users/', url: '/api/v1/users/',
@@ -166,29 +167,6 @@ userId: number,
}); });
} }
/**
* Delete User
* Delete a user.
* @returns Message Successful Response
* @throws ApiError
*/
public static deleteUser({
userId,
}: {
userId: number,
}): CancelablePromise<Message> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/users/{user_id}',
path: {
'user_id': userId,
},
errors: {
422: `Validation Error`,
},
});
}
/** /**
* Update User * Update User
* Update a user. * Update a user.
@@ -216,4 +194,27 @@ requestBody: UserUpdate,
}); });
} }
/**
* Delete User
* Delete a user.
* @returns Message Successful Response
* @throws ApiError
*/
public static deleteUser({
userId,
}: {
userId: number,
}): CancelablePromise<Message> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/v1/users/{user_id}',
path: {
'user_id': userId,
},
errors: {
422: `Validation Error`,
},
});
}
} }