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 5f438c9 commit b21dbcf
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 @@ -7,6 +7,13 @@ export type Body_login_login_access_token = {
client_secret?: string | null
}

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

export type HTTPValidationError = {
detail?: Array<ValidationError>
}
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 @@ -49,6 +49,27 @@ export const $Body_login_login_access_token = {
},
} as const

export const $CreateUser = {
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 $HTTPValidationError = {
properties: {
detail: {
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,
CreateUser,
} from "./models"

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

export type TDataCreateUser = {
requestBody: CreateUser
}

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 b21dbcf

Please sign in to comment.