✨ Update new-frontend client (#625)
This commit is contained in:
@@ -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 { ItemCreate } from './models/ItemCreate';
|
||||
export type { ItemOut } from './models/ItemOut';
|
||||
export type { ItemsOut } from './models/ItemsOut';
|
||||
export type { ItemUpdate } from './models/ItemUpdate';
|
||||
export type { Message } from './models/Message';
|
||||
export type { NewPassword } from './models/NewPassword';
|
||||
@@ -19,6 +20,7 @@ export type { UpdatePassword } from './models/UpdatePassword';
|
||||
export type { UserCreate } from './models/UserCreate';
|
||||
export type { UserCreateOpen } from './models/UserCreateOpen';
|
||||
export type { UserOut } from './models/UserOut';
|
||||
export type { UsersOut } from './models/UsersOut';
|
||||
export type { UserUpdate } from './models/UserUpdate';
|
||||
export type { UserUpdateMe } from './models/UserUpdateMe';
|
||||
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 { $ItemCreate } from './schemas/$ItemCreate';
|
||||
export { $ItemOut } from './schemas/$ItemOut';
|
||||
export { $ItemsOut } from './schemas/$ItemsOut';
|
||||
export { $ItemUpdate } from './schemas/$ItemUpdate';
|
||||
export { $Message } from './schemas/$Message';
|
||||
export { $NewPassword } from './schemas/$NewPassword';
|
||||
@@ -35,6 +38,7 @@ export { $UpdatePassword } from './schemas/$UpdatePassword';
|
||||
export { $UserCreate } from './schemas/$UserCreate';
|
||||
export { $UserCreateOpen } from './schemas/$UserCreateOpen';
|
||||
export { $UserOut } from './schemas/$UserOut';
|
||||
export { $UsersOut } from './schemas/$UsersOut';
|
||||
export { $UserUpdate } from './schemas/$UserUpdate';
|
||||
export { $UserUpdateMe } from './schemas/$UserUpdateMe';
|
||||
export { $ValidationError } from './schemas/$ValidationError';
|
||||
|
@@ -4,10 +4,10 @@
|
||||
/* eslint-disable */
|
||||
|
||||
export type Body_login_login_access_token = {
|
||||
grant_type?: string;
|
||||
grant_type?: (string | null);
|
||||
username: string;
|
||||
password: string;
|
||||
scope?: string;
|
||||
client_id?: string;
|
||||
client_secret?: string;
|
||||
client_id?: (string | null);
|
||||
client_secret?: (string | null);
|
||||
};
|
||||
|
@@ -5,5 +5,5 @@
|
||||
|
||||
export type ItemCreate = {
|
||||
title: string;
|
||||
description?: string;
|
||||
description?: (string | null);
|
||||
};
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
export type ItemOut = {
|
||||
title: string;
|
||||
description?: string;
|
||||
description?: (string | null);
|
||||
id: number;
|
||||
owner_id: number;
|
||||
};
|
||||
|
@@ -4,6 +4,6 @@
|
||||
/* eslint-disable */
|
||||
|
||||
export type ItemUpdate = {
|
||||
title?: string;
|
||||
description?: string;
|
||||
title?: (string | null);
|
||||
description?: (string | null);
|
||||
};
|
||||
|
11
src/new-frontend/src/client/models/ItemsOut.ts
Normal file
11
src/new-frontend/src/client/models/ItemsOut.ts
Normal 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;
|
||||
};
|
@@ -7,6 +7,6 @@ export type UserCreate = {
|
||||
email: string;
|
||||
is_active?: boolean;
|
||||
is_superuser?: boolean;
|
||||
full_name?: string;
|
||||
full_name?: (string | null);
|
||||
password: string;
|
||||
};
|
||||
|
@@ -6,5 +6,5 @@
|
||||
export type UserCreateOpen = {
|
||||
email: string;
|
||||
password: string;
|
||||
full_name?: string;
|
||||
full_name?: (string | null);
|
||||
};
|
||||
|
@@ -7,6 +7,6 @@ export type UserOut = {
|
||||
email: string;
|
||||
is_active?: boolean;
|
||||
is_superuser?: boolean;
|
||||
full_name?: string;
|
||||
full_name?: (string | null);
|
||||
id: number;
|
||||
};
|
||||
|
@@ -4,9 +4,9 @@
|
||||
/* eslint-disable */
|
||||
|
||||
export type UserUpdate = {
|
||||
email?: string;
|
||||
email?: (string | null);
|
||||
is_active?: boolean;
|
||||
is_superuser?: boolean;
|
||||
full_name?: string;
|
||||
password?: string;
|
||||
full_name?: (string | null);
|
||||
password?: (string | null);
|
||||
};
|
||||
|
@@ -4,6 +4,6 @@
|
||||
/* eslint-disable */
|
||||
|
||||
export type UserUpdateMe = {
|
||||
full_name?: string;
|
||||
email?: string;
|
||||
full_name?: (string | null);
|
||||
email?: (string | null);
|
||||
};
|
||||
|
11
src/new-frontend/src/client/models/UsersOut.ts
Normal file
11
src/new-frontend/src/client/models/UsersOut.ts
Normal 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;
|
||||
};
|
@@ -5,8 +5,13 @@
|
||||
export const $Body_login_login_access_token = {
|
||||
properties: {
|
||||
grant_type: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
pattern: 'password',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
username: {
|
||||
type: 'string',
|
||||
@@ -20,10 +25,20 @@ export const $Body_login_login_access_token = {
|
||||
type: 'string',
|
||||
},
|
||||
client_id: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
client_secret: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
@@ -9,7 +9,12 @@ export const $ItemCreate = {
|
||||
isRequired: true,
|
||||
},
|
||||
description: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
@@ -9,11 +9,20 @@ export const $ItemOut = {
|
||||
isRequired: true,
|
||||
},
|
||||
description: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
id: {
|
||||
type: 'number',
|
||||
isRequired: true,
|
||||
},
|
||||
owner_id: {
|
||||
type: 'number',
|
||||
isRequired: true,
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
@@ -5,10 +5,20 @@
|
||||
export const $ItemUpdate = {
|
||||
properties: {
|
||||
title: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
description: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
19
src/new-frontend/src/client/schemas/$ItemsOut.ts
Normal file
19
src/new-frontend/src/client/schemas/$ItemsOut.ts
Normal 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;
|
@@ -7,7 +7,6 @@ export const $UserCreate = {
|
||||
email: {
|
||||
type: 'string',
|
||||
isRequired: true,
|
||||
format: 'email',
|
||||
},
|
||||
is_active: {
|
||||
type: 'boolean',
|
||||
@@ -16,7 +15,12 @@ export const $UserCreate = {
|
||||
type: 'boolean',
|
||||
},
|
||||
full_name: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
password: {
|
||||
type: 'string',
|
||||
|
@@ -7,14 +7,18 @@ export const $UserCreateOpen = {
|
||||
email: {
|
||||
type: 'string',
|
||||
isRequired: true,
|
||||
format: 'email',
|
||||
},
|
||||
password: {
|
||||
type: 'string',
|
||||
isRequired: true,
|
||||
},
|
||||
full_name: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
@@ -7,7 +7,6 @@ export const $UserOut = {
|
||||
email: {
|
||||
type: 'string',
|
||||
isRequired: true,
|
||||
format: 'email',
|
||||
},
|
||||
is_active: {
|
||||
type: 'boolean',
|
||||
@@ -16,7 +15,12 @@ export const $UserOut = {
|
||||
type: 'boolean',
|
||||
},
|
||||
full_name: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
id: {
|
||||
type: 'number',
|
||||
|
@@ -5,8 +5,12 @@
|
||||
export const $UserUpdate = {
|
||||
properties: {
|
||||
email: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
format: 'email',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
is_active: {
|
||||
type: 'boolean',
|
||||
@@ -15,10 +19,20 @@ export const $UserUpdate = {
|
||||
type: 'boolean',
|
||||
},
|
||||
full_name: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
password: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
@@ -5,11 +5,20 @@
|
||||
export const $UserUpdateMe = {
|
||||
properties: {
|
||||
full_name: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
email: {
|
||||
type: 'any-of',
|
||||
contains: [{
|
||||
type: 'string',
|
||||
format: 'email',
|
||||
}, {
|
||||
type: 'null',
|
||||
}],
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
19
src/new-frontend/src/client/schemas/$UsersOut.ts
Normal file
19
src/new-frontend/src/client/schemas/$UsersOut.ts
Normal 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;
|
@@ -4,6 +4,7 @@
|
||||
/* eslint-disable */
|
||||
import type { ItemCreate } from '../models/ItemCreate';
|
||||
import type { ItemOut } from '../models/ItemOut';
|
||||
import type { ItemsOut } from '../models/ItemsOut';
|
||||
import type { ItemUpdate } from '../models/ItemUpdate';
|
||||
import type { Message } from '../models/Message';
|
||||
|
||||
@@ -16,7 +17,7 @@ export class ItemsService {
|
||||
/**
|
||||
* Read Items
|
||||
* Retrieve items.
|
||||
* @returns ItemOut Successful Response
|
||||
* @returns ItemsOut Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static readItems({
|
||||
@@ -25,7 +26,7 @@ limit = 100,
|
||||
}: {
|
||||
skip?: number,
|
||||
limit?: number,
|
||||
}): CancelablePromise<Array<ItemOut>> {
|
||||
}): CancelablePromise<ItemsOut> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/api/v1/items/',
|
||||
|
@@ -7,6 +7,7 @@ import type { UpdatePassword } from '../models/UpdatePassword';
|
||||
import type { UserCreate } from '../models/UserCreate';
|
||||
import type { UserCreateOpen } from '../models/UserCreateOpen';
|
||||
import type { UserOut } from '../models/UserOut';
|
||||
import type { UsersOut } from '../models/UsersOut';
|
||||
import type { UserUpdate } from '../models/UserUpdate';
|
||||
import type { UserUpdateMe } from '../models/UserUpdateMe';
|
||||
|
||||
@@ -19,7 +20,7 @@ export class UsersService {
|
||||
/**
|
||||
* Read Users
|
||||
* Retrieve users.
|
||||
* @returns UserOut Successful Response
|
||||
* @returns UsersOut Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static readUsers({
|
||||
@@ -28,7 +29,7 @@ limit = 100,
|
||||
}: {
|
||||
skip?: number,
|
||||
limit?: number,
|
||||
}): CancelablePromise<Array<UserOut>> {
|
||||
}): CancelablePromise<UsersOut> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
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 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`,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user