import * as better_call from 'better-call'; import { z } from 'zod'; interface MagicLinkOptions { /** * Time in seconds until the magic link expires. * @default (60 * 5) // 5 minutes */ expiresIn?: number; /** * Send magic link implementation. */ sendMagicLink: (data: { email: string; url: string; token: string; }, request?: Request) => Promise | void; /** * Disable sign up if user is not found. * * @default false */ disableSignUp?: boolean; /** * Rate limit configuration. * * @default { * window: 60, * max: 5, * } */ rateLimit?: { window: number; max: number; }; /** * Custom function to generate a token */ generateToken?: (email: string) => Promise | string; } declare const magicLink: (options: MagicLinkOptions) => { id: "magic-link"; endpoints: { signInMagicLink: { ; callbackURL: z.ZodOptional; }, "strip", z.ZodTypeAny, { email: string; name?: string | undefined; callbackURL?: string | undefined; }, { email: string; name?: string | undefined; callbackURL?: string | undefined; }>; metadata: { openapi: { description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { status: { type: string; }; }; }; }; }; }; }; }; }; } & { use: any[]; }>]>(...inputCtx: C): Promise; options: { method: "POST"; requireHeaders: true; body: z.ZodObject<{ email: z.ZodString; name: z.ZodOptional; callbackURL: z.ZodOptional; }, "strip", z.ZodTypeAny, { email: string; name?: string | undefined; callbackURL?: string | undefined; }, { email: string; name?: string | undefined; callbackURL?: string | undefined; }>; metadata: { openapi: { description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { status: { type: string; }; }; }; }; }; }; }; }; }; } & { use: any[]; }; path: "/sign-in/magic-link"; }; magicLinkVerify: { ; }, "strip", z.ZodTypeAny, { token: string; callbackURL?: string | undefined; }, { token: string; callbackURL?: string | undefined; }>; use: ((inputContext: better_call.MiddlewareInputContext) => Promise)[]; requireHeaders: true; metadata: { openapi: { description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { session: { $ref: string; }; user: { $ref: string; }; }; }; }; }; }; }; }; }; } & { use: any[]; }>]>(...inputCtx: C): Promise; options: { method: "GET"; query: z.ZodObject<{ token: z.ZodString; callbackURL: z.ZodOptional; }, "strip", z.ZodTypeAny, { token: string; callbackURL?: string | undefined; }, { token: string; callbackURL?: string | undefined; }>; use: ((inputContext: better_call.MiddlewareInputContext) => Promise)[]; requireHeaders: true; metadata: { openapi: { description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { session: { $ref: string; }; user: { $ref: string; }; }; }; }; }; }; }; }; }; } & { use: any[]; }; path: "/magic-link/verify"; }; }; rateLimit: { pathMatcher(path: string): boolean; window: number; max: number; }[]; }; export { magicLink };