Add private, local only, API for usage in E2E tests (#1429)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Patrick Arminio
2024-12-02 12:57:53 +01:00
committed by GitHub
parent 414864d848
commit 14129f7a50
9 changed files with 127 additions and 31 deletions

View File

@@ -0,0 +1,22 @@
// Note: the `PrivateService` is only available when generating the client
// for local environments
import { OpenAPI, PrivateService } from "../../src/client"
OpenAPI.BASE = `${process.env.VITE_API_URL}`
export const createUser = async ({
email,
password,
}: {
email: string
password: string
}) => {
return await PrivateService.createUser({
requestBody: {
email,
password,
is_verified: true,
full_name: "Test User",
},
})
}