✨ Regenerate frontend client with recent changes (#575)
This commit is contained in:
@@ -8,17 +8,18 @@ export { OpenAPI } from './core/OpenAPI';
|
|||||||
export type { OpenAPIConfig } from './core/OpenAPI';
|
export type { OpenAPIConfig } from './core/OpenAPI';
|
||||||
|
|
||||||
export type { Body_login_login_access_token } from './models/Body_login_login_access_token';
|
export type { Body_login_login_access_token } from './models/Body_login_login_access_token';
|
||||||
export type { Body_login_reset_password } from './models/Body_login_reset_password';
|
|
||||||
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 { ItemUpdate } from './models/ItemUpdate';
|
export type { ItemUpdate } from './models/ItemUpdate';
|
||||||
export type { Msg } from './models/Msg';
|
export type { Message } from './models/Message';
|
||||||
|
export type { NewPassword } from './models/NewPassword';
|
||||||
export type { Token } from './models/Token';
|
export type { Token } from './models/Token';
|
||||||
export type { User } from './models/User';
|
|
||||||
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 { UserUpdate } from './models/UserUpdate';
|
||||||
|
export type { UserUpdateMe } from './models/UserUpdateMe';
|
||||||
export type { ValidationError } from './models/ValidationError';
|
export type { ValidationError } from './models/ValidationError';
|
||||||
|
|
||||||
export { ItemsService } from './services/ItemsService';
|
export { ItemsService } from './services/ItemsService';
|
||||||
|
@@ -3,6 +3,6 @@
|
|||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
export type Msg = {
|
export type Message = {
|
||||||
msg: string;
|
message: string;
|
||||||
};
|
};
|
@@ -3,7 +3,7 @@
|
|||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
export type Body_login_reset_password = {
|
export type NewPassword = {
|
||||||
token: string;
|
token: string;
|
||||||
new_password: string;
|
new_password: string;
|
||||||
};
|
};
|
@@ -5,5 +5,5 @@
|
|||||||
|
|
||||||
export type Token = {
|
export type Token = {
|
||||||
access_token: string;
|
access_token: string;
|
||||||
token_type: string;
|
token_type?: string;
|
||||||
};
|
};
|
||||||
|
@@ -3,10 +3,10 @@
|
|||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
export type User = {
|
export type UserUpdate = {
|
||||||
email?: string;
|
email?: string;
|
||||||
is_active?: boolean;
|
is_active?: boolean;
|
||||||
is_superuser?: boolean;
|
is_superuser?: boolean;
|
||||||
full_name?: string;
|
full_name?: string;
|
||||||
id?: number;
|
password?: string;
|
||||||
};
|
};
|
10
src/new-frontend/src/client/models/UserUpdateMe.ts
Normal file
10
src/new-frontend/src/client/models/UserUpdateMe.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
export type UserUpdateMe = {
|
||||||
|
password?: string;
|
||||||
|
full_name?: string;
|
||||||
|
email?: string;
|
||||||
|
};
|
@@ -3,10 +3,10 @@
|
|||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import type { Body_login_login_access_token } from '../models/Body_login_login_access_token';
|
import type { Body_login_login_access_token } from '../models/Body_login_login_access_token';
|
||||||
import type { Body_login_reset_password } from '../models/Body_login_reset_password';
|
import type { Message } from '../models/Message';
|
||||||
import type { Msg } from '../models/Msg';
|
import type { NewPassword } from '../models/NewPassword';
|
||||||
import type { Token } from '../models/Token';
|
import type { Token } from '../models/Token';
|
||||||
import type { User } from '../models/User';
|
import type { UserOut } from '../models/UserOut';
|
||||||
|
|
||||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||||
import { OpenAPI } from '../core/OpenAPI';
|
import { OpenAPI } from '../core/OpenAPI';
|
||||||
@@ -39,10 +39,10 @@ formData: Body_login_login_access_token,
|
|||||||
/**
|
/**
|
||||||
* Test Token
|
* Test Token
|
||||||
* Test access token
|
* Test access token
|
||||||
* @returns User Successful Response
|
* @returns UserOut Successful Response
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
public static testToken(): CancelablePromise<User> {
|
public static testToken(): CancelablePromise<UserOut> {
|
||||||
return __request(OpenAPI, {
|
return __request(OpenAPI, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/api/v1/login/test-token',
|
url: '/api/v1/login/test-token',
|
||||||
@@ -52,14 +52,14 @@ formData: Body_login_login_access_token,
|
|||||||
/**
|
/**
|
||||||
* Recover Password
|
* Recover Password
|
||||||
* Password Recovery
|
* Password Recovery
|
||||||
* @returns Msg Successful Response
|
* @returns Message Successful Response
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
public static recoverPassword({
|
public static recoverPassword({
|
||||||
email,
|
email,
|
||||||
}: {
|
}: {
|
||||||
email: string,
|
email: string,
|
||||||
}): CancelablePromise<Msg> {
|
}): CancelablePromise<Message> {
|
||||||
return __request(OpenAPI, {
|
return __request(OpenAPI, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/api/v1/password-recovery/{email}',
|
url: '/api/v1/password-recovery/{email}',
|
||||||
@@ -75,14 +75,14 @@ email: string,
|
|||||||
/**
|
/**
|
||||||
* Reset Password
|
* Reset Password
|
||||||
* Reset password
|
* Reset password
|
||||||
* @returns Msg Successful Response
|
* @returns Message Successful Response
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
public static resetPassword({
|
public static resetPassword({
|
||||||
requestBody,
|
requestBody,
|
||||||
}: {
|
}: {
|
||||||
requestBody: Body_login_reset_password,
|
requestBody: NewPassword,
|
||||||
}): CancelablePromise<Msg> {
|
}): CancelablePromise<Message> {
|
||||||
return __request(OpenAPI, {
|
return __request(OpenAPI, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/api/v1/reset-password/',
|
url: '/api/v1/reset-password/',
|
||||||
|
@@ -5,6 +5,8 @@
|
|||||||
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 { UserUpdate } from '../models/UserUpdate';
|
||||||
|
import type { UserUpdateMe } from '../models/UserUpdateMe';
|
||||||
|
|
||||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||||
import { OpenAPI } from '../core/OpenAPI';
|
import { OpenAPI } from '../core/OpenAPI';
|
||||||
@@ -73,6 +75,28 @@ requestBody: UserCreate,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update User Me
|
||||||
|
* Update own user.
|
||||||
|
* @returns UserOut Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static updateUserMe({
|
||||||
|
requestBody,
|
||||||
|
}: {
|
||||||
|
requestBody: UserUpdateMe,
|
||||||
|
}): CancelablePromise<UserOut> {
|
||||||
|
return __request(OpenAPI, {
|
||||||
|
method: 'PUT',
|
||||||
|
url: '/api/v1/users/me',
|
||||||
|
body: requestBody,
|
||||||
|
mediaType: 'application/json',
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create User Open
|
* Create User Open
|
||||||
* Create new user without the need to be logged in.
|
* Create new user without the need to be logged in.
|
||||||
@@ -118,4 +142,31 @@ userId: number,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update User
|
||||||
|
* Update a user.
|
||||||
|
* @returns UserOut Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static updateUser({
|
||||||
|
userId,
|
||||||
|
requestBody,
|
||||||
|
}: {
|
||||||
|
userId: number,
|
||||||
|
requestBody: UserUpdate,
|
||||||
|
}): CancelablePromise<UserOut> {
|
||||||
|
return __request(OpenAPI, {
|
||||||
|
method: 'PUT',
|
||||||
|
url: '/api/v1/users/{user_id}',
|
||||||
|
path: {
|
||||||
|
'user_id': userId,
|
||||||
|
},
|
||||||
|
body: requestBody,
|
||||||
|
mediaType: 'application/json',
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import type { Msg } from '../models/Msg';
|
import type { Message } from '../models/Message';
|
||||||
|
|
||||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||||
import { OpenAPI } from '../core/OpenAPI';
|
import { OpenAPI } from '../core/OpenAPI';
|
||||||
@@ -13,14 +13,14 @@ export class UtilsService {
|
|||||||
/**
|
/**
|
||||||
* Test Celery
|
* Test Celery
|
||||||
* Test Celery worker.
|
* Test Celery worker.
|
||||||
* @returns Msg Successful Response
|
* @returns Message Successful Response
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
public static testCelery({
|
public static testCelery({
|
||||||
requestBody,
|
requestBody,
|
||||||
}: {
|
}: {
|
||||||
requestBody: Msg,
|
requestBody: Message,
|
||||||
}): CancelablePromise<Msg> {
|
}): CancelablePromise<Message> {
|
||||||
return __request(OpenAPI, {
|
return __request(OpenAPI, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/api/v1/utils/test-celery/',
|
url: '/api/v1/utils/test-celery/',
|
||||||
@@ -35,14 +35,14 @@ requestBody: Msg,
|
|||||||
/**
|
/**
|
||||||
* Test Email
|
* Test Email
|
||||||
* Test emails.
|
* Test emails.
|
||||||
* @returns Msg Successful Response
|
* @returns Message Successful Response
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
public static testEmail({
|
public static testEmail({
|
||||||
emailTo,
|
emailTo,
|
||||||
}: {
|
}: {
|
||||||
emailTo: string,
|
emailTo: string,
|
||||||
}): CancelablePromise<Msg> {
|
}): CancelablePromise<Message> {
|
||||||
return __request(OpenAPI, {
|
return __request(OpenAPI, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: '/api/v1/utils/test-email/',
|
url: '/api/v1/utils/test-email/',
|
||||||
|
Reference in New Issue
Block a user