better-auth
Version:
The most comprehensive authentication framework for TypeScript.
158 lines • 4.65 kB
text/typescript
import { AdditionalUserFieldsInput, User } from "../../types/models.mjs";
import "../../types/index.mjs";
import { BetterAuthOptions } from "@better-auth/core";
import * as z from "zod";
//#region src/api/routes/sign-up.d.ts
declare const signUpEmail: <O extends BetterAuthOptions>() => import("better-call").StrictEndpoint<"/sign-up/email", {
method: "POST";
operationId: string;
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
body: z.ZodIntersection<z.ZodObject<{
name: z.ZodString;
email: z.ZodEmail;
password: z.ZodString;
image: z.ZodOptional<z.ZodString>;
callbackURL: z.ZodOptional<z.ZodString>;
rememberMe: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>>;
cloneRequest: true;
metadata: {
allowedMediaTypes: string[];
$Infer: {
body: {
name: string;
email: string;
password: string;
image?: string | undefined;
callbackURL?: string | undefined;
rememberMe?: boolean | undefined;
} & AdditionalUserFieldsInput<O>;
returned: {
token: string | null;
user: User<O["user"], O["plugins"]>;
};
};
openapi: {
operationId: string;
description: string;
requestBody: {
content: {
"application/json": {
schema: {
type: "object";
properties: {
name: {
type: string;
description: string;
};
email: {
type: string;
description: string;
};
password: {
type: string;
description: string;
};
image: {
type: string;
description: string;
};
callbackURL: {
type: string;
description: string;
};
rememberMe: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
token: {
type: string;
nullable: boolean;
description: string;
};
user: {
type: string;
properties: {
id: {
type: string;
description: string;
};
email: {
type: string;
format: string;
description: string;
};
name: {
type: string;
description: string;
};
image: {
type: string;
format: string;
nullable: boolean;
description: string;
};
emailVerified: {
type: string;
description: string;
};
createdAt: {
type: string;
format: string;
description: string;
};
updatedAt: {
type: string;
format: string;
description: string;
};
};
required: string[];
};
};
required: string[];
};
};
};
};
"422": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
message: {
type: string;
};
};
};
};
};
};
};
};
};
}, {
token: null;
user: User<O["user"], O["plugins"]>;
} | {
token: string;
user: User<O["user"], O["plugins"]>;
}>;
//#endregion
export { signUpEmail };