Skip to content

Commit 7966d3f

Browse files
authored
✨ Regenerate frontend client with recent changes (#575)
1 parent 5a4b0ed commit 7966d3f

File tree

9 files changed

+87
-25
lines changed

9 files changed

+87
-25
lines changed

src/new-frontend/src/client/index.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ export { OpenAPI } from './core/OpenAPI';
88
export type { OpenAPIConfig } from './core/OpenAPI';
99

1010
export type { Body_login_login_access_token } from './models/Body_login_login_access_token';
11-
export type { Body_login_reset_password } from './models/Body_login_reset_password';
1211
export type { HTTPValidationError } from './models/HTTPValidationError';
1312
export type { ItemCreate } from './models/ItemCreate';
1413
export type { ItemOut } from './models/ItemOut';
1514
export type { ItemUpdate } from './models/ItemUpdate';
16-
export type { Msg } from './models/Msg';
15+
export type { Message } from './models/Message';
16+
export type { NewPassword } from './models/NewPassword';
1717
export type { Token } from './models/Token';
18-
export type { User } from './models/User';
1918
export type { UserCreate } from './models/UserCreate';
2019
export type { UserCreateOpen } from './models/UserCreateOpen';
2120
export type { UserOut } from './models/UserOut';
21+
export type { UserUpdate } from './models/UserUpdate';
22+
export type { UserUpdateMe } from './models/UserUpdateMe';
2223
export type { ValidationError } from './models/ValidationError';
2324

2425
export { ItemsService } from './services/ItemsService';

src/new-frontend/src/client/models/Msg.ts src/new-frontend/src/client/models/Message.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
/* tslint:disable */
44
/* eslint-disable */
55

6-
export type Msg = {
7-
msg: string;
6+
export type Message = {
7+
message: string;
88
};

src/new-frontend/src/client/models/Body_login_reset_password.ts src/new-frontend/src/client/models/NewPassword.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* tslint:disable */
44
/* eslint-disable */
55

6-
export type Body_login_reset_password = {
6+
export type NewPassword = {
77
token: string;
88
new_password: string;
99
};

src/new-frontend/src/client/models/Token.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55

66
export type Token = {
77
access_token: string;
8-
token_type: string;
8+
token_type?: string;
99
};

src/new-frontend/src/client/models/User.ts src/new-frontend/src/client/models/UserUpdate.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
/* tslint:disable */
44
/* eslint-disable */
55

6-
export type User = {
6+
export type UserUpdate = {
77
email?: string;
88
is_active?: boolean;
99
is_superuser?: boolean;
1010
full_name?: string;
11-
id?: number;
11+
password?: string;
1212
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* generated using openapi-typescript-codegen -- do no edit */
2+
/* istanbul ignore file */
3+
/* tslint:disable */
4+
/* eslint-disable */
5+
6+
export type UserUpdateMe = {
7+
password?: string;
8+
full_name?: string;
9+
email?: string;
10+
};

src/new-frontend/src/client/services/LoginService.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
/* tslint:disable */
44
/* eslint-disable */
55
import type { Body_login_login_access_token } from '../models/Body_login_login_access_token';
6-
import type { Body_login_reset_password } from '../models/Body_login_reset_password';
7-
import type { Msg } from '../models/Msg';
6+
import type { Message } from '../models/Message';
7+
import type { NewPassword } from '../models/NewPassword';
88
import type { Token } from '../models/Token';
9-
import type { User } from '../models/User';
9+
import type { UserOut } from '../models/UserOut';
1010

1111
import type { CancelablePromise } from '../core/CancelablePromise';
1212
import { OpenAPI } from '../core/OpenAPI';
@@ -39,10 +39,10 @@ formData: Body_login_login_access_token,
3939
/**
4040
* Test Token
4141
* Test access token
42-
* @returns User Successful Response
42+
* @returns UserOut Successful Response
4343
* @throws ApiError
4444
*/
45-
public static testToken(): CancelablePromise<User> {
45+
public static testToken(): CancelablePromise<UserOut> {
4646
return __request(OpenAPI, {
4747
method: 'POST',
4848
url: '/api/v1/login/test-token',
@@ -52,14 +52,14 @@ formData: Body_login_login_access_token,
5252
/**
5353
* Recover Password
5454
* Password Recovery
55-
* @returns Msg Successful Response
55+
* @returns Message Successful Response
5656
* @throws ApiError
5757
*/
5858
public static recoverPassword({
5959
email,
6060
}: {
6161
email: string,
62-
}): CancelablePromise<Msg> {
62+
}): CancelablePromise<Message> {
6363
return __request(OpenAPI, {
6464
method: 'POST',
6565
url: '/api/v1/password-recovery/{email}',
@@ -75,14 +75,14 @@ email: string,
7575
/**
7676
* Reset Password
7777
* Reset password
78-
* @returns Msg Successful Response
78+
* @returns Message Successful Response
7979
* @throws ApiError
8080
*/
8181
public static resetPassword({
8282
requestBody,
8383
}: {
84-
requestBody: Body_login_reset_password,
85-
}): CancelablePromise<Msg> {
84+
requestBody: NewPassword,
85+
}): CancelablePromise<Message> {
8686
return __request(OpenAPI, {
8787
method: 'POST',
8888
url: '/api/v1/reset-password/',

src/new-frontend/src/client/services/UsersService.ts

+51
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import type { UserCreate } from '../models/UserCreate';
66
import type { UserCreateOpen } from '../models/UserCreateOpen';
77
import type { UserOut } from '../models/UserOut';
8+
import type { UserUpdate } from '../models/UserUpdate';
9+
import type { UserUpdateMe } from '../models/UserUpdateMe';
810

911
import type { CancelablePromise } from '../core/CancelablePromise';
1012
import { OpenAPI } from '../core/OpenAPI';
@@ -73,6 +75,28 @@ requestBody: UserCreate,
7375
});
7476
}
7577

78+
/**
79+
* Update User Me
80+
* Update own user.
81+
* @returns UserOut Successful Response
82+
* @throws ApiError
83+
*/
84+
public static updateUserMe({
85+
requestBody,
86+
}: {
87+
requestBody: UserUpdateMe,
88+
}): CancelablePromise<UserOut> {
89+
return __request(OpenAPI, {
90+
method: 'PUT',
91+
url: '/api/v1/users/me',
92+
body: requestBody,
93+
mediaType: 'application/json',
94+
errors: {
95+
422: `Validation Error`,
96+
},
97+
});
98+
}
99+
76100
/**
77101
* Create User Open
78102
* Create new user without the need to be logged in.
@@ -118,4 +142,31 @@ userId: number,
118142
});
119143
}
120144

145+
/**
146+
* Update User
147+
* Update a user.
148+
* @returns UserOut Successful Response
149+
* @throws ApiError
150+
*/
151+
public static updateUser({
152+
userId,
153+
requestBody,
154+
}: {
155+
userId: number,
156+
requestBody: UserUpdate,
157+
}): CancelablePromise<UserOut> {
158+
return __request(OpenAPI, {
159+
method: 'PUT',
160+
url: '/api/v1/users/{user_id}',
161+
path: {
162+
'user_id': userId,
163+
},
164+
body: requestBody,
165+
mediaType: 'application/json',
166+
errors: {
167+
422: `Validation Error`,
168+
},
169+
});
170+
}
171+
121172
}

src/new-frontend/src/client/services/UtilsService.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/* istanbul ignore file */
33
/* tslint:disable */
44
/* eslint-disable */
5-
import type { Msg } from '../models/Msg';
5+
import type { Message } from '../models/Message';
66

77
import type { CancelablePromise } from '../core/CancelablePromise';
88
import { OpenAPI } from '../core/OpenAPI';
@@ -13,14 +13,14 @@ export class UtilsService {
1313
/**
1414
* Test Celery
1515
* Test Celery worker.
16-
* @returns Msg Successful Response
16+
* @returns Message Successful Response
1717
* @throws ApiError
1818
*/
1919
public static testCelery({
2020
requestBody,
2121
}: {
22-
requestBody: Msg,
23-
}): CancelablePromise<Msg> {
22+
requestBody: Message,
23+
}): CancelablePromise<Message> {
2424
return __request(OpenAPI, {
2525
method: 'POST',
2626
url: '/api/v1/utils/test-celery/',
@@ -35,14 +35,14 @@ requestBody: Msg,
3535
/**
3636
* Test Email
3737
* Test emails.
38-
* @returns Msg Successful Response
38+
* @returns Message Successful Response
3939
* @throws ApiError
4040
*/
4141
public static testEmail({
4242
emailTo,
4343
}: {
4444
emailTo: string,
45-
}): CancelablePromise<Msg> {
45+
}): CancelablePromise<Message> {
4646
return __request(OpenAPI, {
4747
method: 'POST',
4848
url: '/api/v1/utils/test-email/',

0 commit comments

Comments
 (0)