Skip to content

Commit

Permalink
✨ Autogenerate frontend client
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Nov 22, 2024
1 parent 122496a commit e534171
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontend/src/client/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ export type NewPassword = {
new_password: string
}

export type PrivateCreateUser = {
email: string
password: string
full_name: string
is_verified?: boolean
}

export type Token = {
access_token: string
token_type?: string
Expand Down
21 changes: 21 additions & 0 deletions frontend/src/client/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,27 @@ export const $NewPassword = {
},
} as const

export const $PrivateCreateUser = {
properties: {
email: {
type: "string",
isRequired: true,
},
password: {
type: "string",
isRequired: true,
},
full_name: {
type: "string",
isRequired: true,
},
is_verified: {
type: "boolean",
default: false,
},
},
} as const

export const $Token = {
properties: {
access_token: {
Expand Down
28 changes: 28 additions & 0 deletions frontend/src/client/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type {
ItemPublic,
ItemsPublic,
ItemUpdate,
PrivateCreateUser,
} from "./models"

export type TDataLoginAccessToken = {
Expand Down Expand Up @@ -527,3 +528,30 @@ export class ItemsService {
})
}
}

export type TDataCreateUser = {
requestBody: PrivateCreateUser
}

export class PrivateService {
/**
* Create User
* Create a new user.
* @returns UserPublic Successful Response
* @throws ApiError
*/
public static createUser(
data: TDataCreateUser,
): CancelablePromise<UserPublic> {
const { requestBody } = data
return __request(OpenAPI, {
method: "POST",
url: "/api/v1/private/users/",
body: requestBody,
mediaType: "application/json",
errors: {
422: `Validation Error`,
},
})
}
}

0 comments on commit e534171

Please sign in to comment.