Skip to content

Commit fb8f363

Browse files
author
github-actions
committed
✨ Autogenerate frontend client
1 parent 5dd00b0 commit fb8f363

File tree

2 files changed

+48
-9
lines changed

2 files changed

+48
-9
lines changed

frontend/src/client/sdk.gen.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import type {
2323
LoginResetPasswordResponse,
2424
LoginRecoverPasswordHtmlContentData,
2525
LoginRecoverPasswordHtmlContentResponse,
26+
PrivateCreateUserData,
27+
PrivateCreateUserResponse,
2628
UsersReadUsersData,
2729
UsersReadUsersResponse,
2830
UsersCreateUserData,
@@ -272,6 +274,30 @@ export class LoginService {
272274
}
273275
}
274276

277+
export class PrivateService {
278+
/**
279+
* Create User
280+
* Create a new user.
281+
* @param data The data for the request.
282+
* @param data.requestBody
283+
* @returns UserPublic Successful Response
284+
* @throws ApiError
285+
*/
286+
public static createUser(
287+
data: PrivateCreateUserData,
288+
): CancelablePromise<PrivateCreateUserResponse> {
289+
return __request(OpenAPI, {
290+
method: "POST",
291+
url: "/api/v1/private/users/",
292+
body: data.requestBody,
293+
mediaType: "application/json",
294+
errors: {
295+
422: "Validation Error",
296+
},
297+
})
298+
}
299+
}
300+
275301
export class UsersService {
276302
/**
277303
* Read Users

frontend/src/client/types.gen.ts

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

3+
export type app__api__routes__private__UserCreate = {
4+
email: string
5+
password: string
6+
full_name: string
7+
is_verified?: boolean
8+
}
9+
10+
export type app__models__UserCreate = {
11+
email: string
12+
is_active?: boolean
13+
is_superuser?: boolean
14+
full_name?: string | null
15+
password: string
16+
}
17+
318
export type Body_login_login_access_token = {
419
grant_type?: string | null
520
username: string
@@ -54,14 +69,6 @@ export type UpdatePassword = {
5469
new_password: string
5570
}
5671

57-
export type UserCreate = {
58-
email: string
59-
is_active?: boolean
60-
is_superuser?: boolean
61-
full_name?: string | null
62-
password: string
63-
}
64-
6572
export type UserPublic = {
6673
email: string
6774
is_active?: boolean
@@ -158,6 +165,12 @@ export type LoginRecoverPasswordHtmlContentData = {
158165

159166
export type LoginRecoverPasswordHtmlContentResponse = string
160167

168+
export type PrivateCreateUserData = {
169+
requestBody: app__api__routes__private__UserCreate
170+
}
171+
172+
export type PrivateCreateUserResponse = UserPublic
173+
161174
export type UsersReadUsersData = {
162175
limit?: number
163176
skip?: number
@@ -166,7 +179,7 @@ export type UsersReadUsersData = {
166179
export type UsersReadUsersResponse = UsersPublic
167180

168181
export type UsersCreateUserData = {
169-
requestBody: UserCreate
182+
requestBody: app__models__UserCreate
170183
}
171184

172185
export type UsersCreateUserResponse = UserPublic

0 commit comments

Comments
 (0)