UNPKG

@daveyplate/better-auth-ui

Version:

Plug & play shadcn/ui components for better-auth

930 lines (926 loc) 348 kB
import * as _better_fetch_fetch from '@better-fetch/fetch'; import { BetterFetchError } from '@better-fetch/fetch'; import * as better_auth_plugins_organization from 'better-auth/plugins/organization'; import { Invitation } from 'better-auth/plugins/organization'; import * as better_auth_react from 'better-auth/react'; import { createAuthClient } from 'better-auth/react'; import * as better_auth_client_plugins from 'better-auth/client/plugins'; import * as better_auth from 'better-auth'; import * as better_auth_plugins_passkey from 'better-auth/plugins/passkey'; type Refetch = () => Promise<unknown> | unknown; type AnyAuthClient = Omit<ReturnType<typeof createAuthClient>, "signUp" | "getSession">; declare const authClient: { useListPasskeys: () => { data: better_auth_plugins_passkey.Passkey[] | null; error: null | _better_fetch_fetch.BetterFetchError; isPending: boolean; isRefetching: boolean; refetch: () => void; }; } & {} & { useActiveOrganization: () => { data: better_auth.Prettify<{ id: string; name: string; createdAt: Date; slug: string; metadata?: any; logo?: string | null | undefined; } & { members: (better_auth_plugins_organization.Member & { user: { id: string; name: string; email: string; image: string | undefined; }; })[]; invitations: better_auth_plugins_organization.Invitation[]; }> | null; error: null | _better_fetch_fetch.BetterFetchError; isPending: boolean; isRefetching: boolean; refetch: () => void; }; useListOrganizations: () => { data: { id: string; name: string; createdAt: Date; slug: string; metadata?: any; logo?: string | null | undefined; }[] | null; error: null | _better_fetch_fetch.BetterFetchError; isPending: boolean; isRefetching: boolean; refetch: () => void; }; useActiveMember: () => { data: { id: string; userId: string; createdAt: Date; organizationId: string; role: string; teamId?: string | undefined; } | null; error: null | _better_fetch_fetch.BetterFetchError; isPending: boolean; isRefetching: boolean; refetch: () => void; }; } & { apiKey: { create: <FetchOptions extends { cache?: RequestCache | undefined; credentials?: RequestCredentials | undefined; headers?: (HeadersInit & (HeadersInit | { accept: "application/json" | "text/plain" | "application/octet-stream"; "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream"; authorization: "Bearer" | "Basic"; })) | undefined; integrity?: string | undefined; keepalive?: boolean | undefined; method?: string | undefined; mode?: RequestMode | undefined; priority?: RequestPriority | undefined; redirect?: RequestRedirect | undefined; referrer?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; signal?: (AbortSignal | null) | undefined; window?: null | undefined; onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined; onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined; onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined; onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined; onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined; hookOptions?: { cloneResponse?: boolean; } | undefined; timeout?: number | undefined; customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined; plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined; baseURL?: string | undefined; throw?: boolean | undefined; auth?: ({ type: "Bearer"; token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined; } | { type: "Basic"; username: string | (() => string | undefined) | undefined; password: string | (() => string | undefined) | undefined; } | { type: "Custom"; prefix: string | (() => string | undefined) | undefined; value: string | (() => string | undefined) | undefined; }) | undefined; body?: (Partial<{ name?: string | undefined; prefix?: string | undefined; userId?: string | undefined; metadata?: any; rateLimitMax?: number | undefined; refillInterval?: number | undefined; refillAmount?: number | undefined; rateLimitEnabled?: boolean | undefined; rateLimitTimeWindow?: number | undefined; remaining?: number | null | undefined; permissions?: Record<string, string[]> | undefined; expiresIn?: number | null | undefined; }> & Record<string, any>) | undefined; query?: (Partial<Record<string, any>> & Record<string, any>) | undefined; params?: Record<string, any> | undefined; duplex?: "full" | "half" | undefined; jsonParser?: ((text: string) => Promise<any> | any) | undefined; retry?: _better_fetch_fetch.RetryOptions | undefined; retryAttempt?: number | undefined; output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined; errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined; disableValidation?: boolean | undefined; }>(data_0?: better_auth.Prettify<{ name?: string | undefined; prefix?: string | undefined; userId?: string | undefined; metadata?: any; rateLimitMax?: number | undefined; refillInterval?: number | undefined; refillAmount?: number | undefined; rateLimitEnabled?: boolean | undefined; rateLimitTimeWindow?: number | undefined; remaining?: number | null | undefined; permissions?: Record<string, string[]> | undefined; expiresIn?: number | null | undefined; } & { fetchOptions?: FetchOptions | undefined; }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{ key: string; metadata: any; permissions: any; id: string; name: string | null; start: string | null; prefix: string | null; userId: string; refillInterval: number | null; refillAmount: number | null; lastRefillAt: Date | null; enabled: boolean; rateLimitEnabled: boolean; rateLimitTimeWindow: number | null; rateLimitMax: number | null; requestCount: number; remaining: number | null; lastRequest: Date | null; expiresAt: Date | null; createdAt: Date; updatedAt: Date; }, { code?: string; message?: string; }, FetchOptions["throw"] extends true ? true : false>>; }; } & { apiKey: { get: <FetchOptions extends { cache?: RequestCache | undefined; credentials?: RequestCredentials | undefined; headers?: (HeadersInit & (HeadersInit | { accept: "application/json" | "text/plain" | "application/octet-stream"; "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream"; authorization: "Bearer" | "Basic"; })) | undefined; integrity?: string | undefined; keepalive?: boolean | undefined; method?: string | undefined; mode?: RequestMode | undefined; priority?: RequestPriority | undefined; redirect?: RequestRedirect | undefined; referrer?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; signal?: (AbortSignal | null) | undefined; window?: null | undefined; onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined; onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined; onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined; onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined; onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined; hookOptions?: { cloneResponse?: boolean; } | undefined; timeout?: number | undefined; customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined; plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined; baseURL?: string | undefined; throw?: boolean | undefined; auth?: ({ type: "Bearer"; token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined; } | { type: "Basic"; username: string | (() => string | undefined) | undefined; password: string | (() => string | undefined) | undefined; } | { type: "Custom"; prefix: string | (() => string | undefined) | undefined; value: string | (() => string | undefined) | undefined; }) | undefined; body?: undefined; query?: (Partial<{ id: string; }> & Record<string, any>) | undefined; params?: Record<string, any> | undefined; duplex?: "full" | "half" | undefined; jsonParser?: ((text: string) => Promise<any> | any) | undefined; retry?: _better_fetch_fetch.RetryOptions | undefined; retryAttempt?: number | undefined; output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined; errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined; disableValidation?: boolean | undefined; }>(data_0: better_auth.Prettify<{ query: { id: string; }; fetchOptions?: FetchOptions | undefined; }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{ permissions: { [key: string]: string[]; } | null; id: string; name: string | null; start: string | null; prefix: string | null; userId: string; refillInterval: number | null; refillAmount: number | null; lastRefillAt: Date | null; enabled: boolean; rateLimitEnabled: boolean; rateLimitTimeWindow: number | null; rateLimitMax: number | null; requestCount: number; remaining: number | null; lastRequest: Date | null; expiresAt: Date | null; createdAt: Date; updatedAt: Date; metadata: Record<string, any> | null; }, { code?: string; message?: string; }, FetchOptions["throw"] extends true ? true : false>>; }; } & { apiKey: { update: <FetchOptions extends { cache?: RequestCache | undefined; credentials?: RequestCredentials | undefined; headers?: (HeadersInit & (HeadersInit | { accept: "application/json" | "text/plain" | "application/octet-stream"; "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream"; authorization: "Bearer" | "Basic"; })) | undefined; integrity?: string | undefined; keepalive?: boolean | undefined; method?: string | undefined; mode?: RequestMode | undefined; priority?: RequestPriority | undefined; redirect?: RequestRedirect | undefined; referrer?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; signal?: (AbortSignal | null) | undefined; window?: null | undefined; onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined; onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined; onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined; onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined; onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined; hookOptions?: { cloneResponse?: boolean; } | undefined; timeout?: number | undefined; customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined; plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined; baseURL?: string | undefined; throw?: boolean | undefined; auth?: ({ type: "Bearer"; token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined; } | { type: "Basic"; username: string | (() => string | undefined) | undefined; password: string | (() => string | undefined) | undefined; } | { type: "Custom"; prefix: string | (() => string | undefined) | undefined; value: string | (() => string | undefined) | undefined; }) | undefined; body?: (Partial<{ keyId: string; name?: string | undefined; userId?: string | undefined; metadata?: any; rateLimitMax?: number | undefined; refillInterval?: number | undefined; refillAmount?: number | undefined; enabled?: boolean | undefined; rateLimitEnabled?: boolean | undefined; rateLimitTimeWindow?: number | undefined; remaining?: number | undefined; permissions?: Record<string, string[]> | null | undefined; expiresIn?: number | null | undefined; }> & Record<string, any>) | undefined; query?: (Partial<Record<string, any>> & Record<string, any>) | undefined; params?: Record<string, any> | undefined; duplex?: "full" | "half" | undefined; jsonParser?: ((text: string) => Promise<any> | any) | undefined; retry?: _better_fetch_fetch.RetryOptions | undefined; retryAttempt?: number | undefined; output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined; errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined; disableValidation?: boolean | undefined; }>(data_0: better_auth.Prettify<{ keyId: string; name?: string | undefined; userId?: string | undefined; metadata?: any; rateLimitMax?: number | undefined; refillInterval?: number | undefined; refillAmount?: number | undefined; enabled?: boolean | undefined; rateLimitEnabled?: boolean | undefined; rateLimitTimeWindow?: number | undefined; remaining?: number | undefined; permissions?: Record<string, string[]> | null | undefined; expiresIn?: number | null | undefined; } & { fetchOptions?: FetchOptions | undefined; }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{ permissions: { [key: string]: string[]; } | null; id: string; name: string | null; start: string | null; prefix: string | null; userId: string; refillInterval: number | null; refillAmount: number | null; lastRefillAt: Date | null; enabled: boolean; rateLimitEnabled: boolean; rateLimitTimeWindow: number | null; rateLimitMax: number | null; requestCount: number; remaining: number | null; lastRequest: Date | null; expiresAt: Date | null; createdAt: Date; updatedAt: Date; metadata: Record<string, any> | null; }, { code?: string; message?: string; }, FetchOptions["throw"] extends true ? true : false>>; }; } & { apiKey: { delete: <FetchOptions extends { cache?: RequestCache | undefined; credentials?: RequestCredentials | undefined; headers?: (HeadersInit & (HeadersInit | { accept: "application/json" | "text/plain" | "application/octet-stream"; "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream"; authorization: "Bearer" | "Basic"; })) | undefined; integrity?: string | undefined; keepalive?: boolean | undefined; method?: string | undefined; mode?: RequestMode | undefined; priority?: RequestPriority | undefined; redirect?: RequestRedirect | undefined; referrer?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; signal?: (AbortSignal | null) | undefined; window?: null | undefined; onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined; onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined; onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined; onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined; onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined; hookOptions?: { cloneResponse?: boolean; } | undefined; timeout?: number | undefined; customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined; plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined; baseURL?: string | undefined; throw?: boolean | undefined; auth?: ({ type: "Bearer"; token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined; } | { type: "Basic"; username: string | (() => string | undefined) | undefined; password: string | (() => string | undefined) | undefined; } | { type: "Custom"; prefix: string | (() => string | undefined) | undefined; value: string | (() => string | undefined) | undefined; }) | undefined; body?: (Partial<{ keyId: string; }> & Record<string, any>) | undefined; query?: (Partial<Record<string, any>> & Record<string, any>) | undefined; params?: Record<string, any> | undefined; duplex?: "full" | "half" | undefined; jsonParser?: ((text: string) => Promise<any> | any) | undefined; retry?: _better_fetch_fetch.RetryOptions | undefined; retryAttempt?: number | undefined; output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined; errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined; disableValidation?: boolean | undefined; }>(data_0: better_auth.Prettify<{ keyId: string; } & { fetchOptions?: FetchOptions | undefined; }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{ success: boolean; }, { code?: string; message?: string; }, FetchOptions["throw"] extends true ? true : false>>; }; } & { apiKey: { list: <FetchOptions extends { cache?: RequestCache | undefined; credentials?: RequestCredentials | undefined; headers?: (HeadersInit & (HeadersInit | { accept: "application/json" | "text/plain" | "application/octet-stream"; "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream"; authorization: "Bearer" | "Basic"; })) | undefined; integrity?: string | undefined; keepalive?: boolean | undefined; method?: string | undefined; mode?: RequestMode | undefined; priority?: RequestPriority | undefined; redirect?: RequestRedirect | undefined; referrer?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; signal?: (AbortSignal | null) | undefined; window?: null | undefined; onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined; onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined; onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined; onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined; onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined; hookOptions?: { cloneResponse?: boolean; } | undefined; timeout?: number | undefined; customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined; plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined; baseURL?: string | undefined; throw?: boolean | undefined; auth?: ({ type: "Bearer"; token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined; } | { type: "Basic"; username: string | (() => string | undefined) | undefined; password: string | (() => string | undefined) | undefined; } | { type: "Custom"; prefix: string | (() => string | undefined) | undefined; value: string | (() => string | undefined) | undefined; }) | undefined; body?: undefined; query?: (Partial<Record<string, any>> & Record<string, any>) | undefined; params?: Record<string, any> | undefined; duplex?: "full" | "half" | undefined; jsonParser?: ((text: string) => Promise<any> | any) | undefined; retry?: _better_fetch_fetch.RetryOptions | undefined; retryAttempt?: number | undefined; output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined; errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined; disableValidation?: boolean | undefined; }>(data_0?: better_auth.Prettify<{ query?: Record<string, any> | undefined; fetchOptions?: FetchOptions | undefined; }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{ permissions: { [key: string]: string[]; } | null; id: string; name: string | null; start: string | null; prefix: string | null; userId: string; refillInterval: number | null; refillAmount: number | null; lastRefillAt: Date | null; enabled: boolean; rateLimitEnabled: boolean; rateLimitTimeWindow: number | null; rateLimitMax: number | null; requestCount: number; remaining: number | null; lastRequest: Date | null; expiresAt: Date | null; createdAt: Date; updatedAt: Date; metadata: Record<string, any> | null; }[], { code?: string; message?: string; }, FetchOptions["throw"] extends true ? true : false>>; }; } & { multiSession: { listDeviceSessions: <FetchOptions extends { cache?: RequestCache | undefined; credentials?: RequestCredentials | undefined; headers?: (HeadersInit & (HeadersInit | { accept: "application/json" | "text/plain" | "application/octet-stream"; "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream"; authorization: "Bearer" | "Basic"; })) | undefined; integrity?: string | undefined; keepalive?: boolean | undefined; method?: string | undefined; mode?: RequestMode | undefined; priority?: RequestPriority | undefined; redirect?: RequestRedirect | undefined; referrer?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; signal?: (AbortSignal | null) | undefined; window?: null | undefined; onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined; onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined; onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined; onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined; onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined; hookOptions?: { cloneResponse?: boolean; } | undefined; timeout?: number | undefined; customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined; plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined; baseURL?: string | undefined; throw?: boolean | undefined; auth?: ({ type: "Bearer"; token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined; } | { type: "Basic"; username: string | (() => string | undefined) | undefined; password: string | (() => string | undefined) | undefined; } | { type: "Custom"; prefix: string | (() => string | undefined) | undefined; value: string | (() => string | undefined) | undefined; }) | undefined; body?: undefined; query?: (Partial<Record<string, any>> & Record<string, any>) | undefined; params?: Record<string, any> | undefined; duplex?: "full" | "half" | undefined; jsonParser?: ((text: string) => Promise<any> | any) | undefined; retry?: _better_fetch_fetch.RetryOptions | undefined; retryAttempt?: number | undefined; output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined; errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined; disableValidation?: boolean | undefined; }>(data_0?: better_auth.Prettify<{ query?: Record<string, any> | undefined; fetchOptions?: FetchOptions | undefined; }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{ session: better_auth.Session; user: better_auth.User; }[], { code?: string; message?: string; }, FetchOptions["throw"] extends true ? true : false>>; }; } & { multiSession: { setActive: <FetchOptions extends { cache?: RequestCache | undefined; credentials?: RequestCredentials | undefined; headers?: (HeadersInit & (HeadersInit | { accept: "application/json" | "text/plain" | "application/octet-stream"; "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream"; authorization: "Bearer" | "Basic"; })) | undefined; integrity?: string | undefined; keepalive?: boolean | undefined; method?: string | undefined; mode?: RequestMode | undefined; priority?: RequestPriority | undefined; redirect?: RequestRedirect | undefined; referrer?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; signal?: (AbortSignal | null) | undefined; window?: null | undefined; onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined; onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined; onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined; onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined; onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined; hookOptions?: { cloneResponse?: boolean; } | undefined; timeout?: number | undefined; customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined; plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined; baseURL?: string | undefined; throw?: boolean | undefined; auth?: ({ type: "Bearer"; token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined; } | { type: "Basic"; username: string | (() => string | undefined) | undefined; password: string | (() => string | undefined) | undefined; } | { type: "Custom"; prefix: string | (() => string | undefined) | undefined; value: string | (() => string | undefined) | undefined; }) | undefined; body?: (Partial<{ sessionToken: string; }> & Record<string, any>) | undefined; query?: (Partial<Record<string, any>> & Record<string, any>) | undefined; params?: Record<string, any> | undefined; duplex?: "full" | "half" | undefined; jsonParser?: ((text: string) => Promise<any> | any) | undefined; retry?: _better_fetch_fetch.RetryOptions | undefined; retryAttempt?: number | undefined; output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined; errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined; disableValidation?: boolean | undefined; }>(data_0: better_auth.Prettify<{ sessionToken: string; } & { fetchOptions?: FetchOptions | undefined; }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{ session: better_auth.Session & Record<string, any>; user: better_auth.User & Record<string, any>; }, { code?: string; message?: string; }, FetchOptions["throw"] extends true ? true : false>>; }; } & { multiSession: { revoke: <FetchOptions extends { cache?: RequestCache | undefined; credentials?: RequestCredentials | undefined; headers?: (HeadersInit & (HeadersInit | { accept: "application/json" | "text/plain" | "application/octet-stream"; "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream"; authorization: "Bearer" | "Basic"; })) | undefined; integrity?: string | undefined; keepalive?: boolean | undefined; method?: string | undefined; mode?: RequestMode | undefined; priority?: RequestPriority | undefined; redirect?: RequestRedirect | undefined; referrer?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; signal?: (AbortSignal | null) | undefined; window?: null | undefined; onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined; onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined; onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined; onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined; onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined; hookOptions?: { cloneResponse?: boolean; } | undefined; timeout?: number | undefined; customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined; plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined; baseURL?: string | undefined; throw?: boolean | undefined; auth?: ({ type: "Bearer"; token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined; } | { type: "Basic"; username: string | (() => string | undefined) | undefined; password: string | (() => string | undefined) | undefined; } | { type: "Custom"; prefix: string | (() => string | undefined) | undefined; value: string | (() => string | undefined) | undefined; }) | undefined; body?: (Partial<{ sessionToken: string; }> & Record<string, any>) | undefined; query?: (Partial<Record<string, any>> & Record<string, any>) | undefined; params?: Record<string, any> | undefined; duplex?: "full" | "half" | undefined; jsonParser?: ((text: string) => Promise<any> | any) | undefined; retry?: _better_fetch_fetch.RetryOptions | undefined; retryAttempt?: number | undefined; output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined; errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined; disableValidation?: boolean | undefined; }>(data_0: better_auth.Prettify<{ sessionToken: string; } & { fetchOptions?: FetchOptions | undefined; }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{ status: boolean; }, { code?: string; message?: string; }, FetchOptions["throw"] extends true ? true : false>>; }; } & { passkey: { generateRegisterOptions: <FetchOptions extends { cache?: RequestCache | undefined; credentials?: RequestCredentials | undefined; headers?: (HeadersInit & (HeadersInit | { accept: "application/json" | "text/plain" | "application/octet-stream"; "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream"; authorization: "Bearer" | "Basic"; })) | undefined; integrity?: string | undefined; keepalive?: boolean | undefined; method?: string | undefined; mode?: RequestMode | undefined; priority?: RequestPriority | undefined; redirect?: RequestRedirect | undefined; referrer?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; signal?: (AbortSignal | null) | undefined; window?: null | undefined; onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined; onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined; onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined; onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined; onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined; hookOptions?: { cloneResponse?: boolean; } | undefined; timeout?: number | undefined; customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined; plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined; baseURL?: string | undefined; throw?: boolean | undefined; auth?: ({ type: "Bearer"; token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined; } | { type: "Basic"; username: string | (() => string | undefined) | undefined; password: string | (() => string | undefined) | undefined; } | { type: "Custom"; prefix: string | (() => string | undefined) | undefined; value: string | (() => string | undefined) | undefined; }) | undefined; body?: undefined; query?: (Partial<{ authenticatorAttachment?: "platform" | "cross-platform" | undefined; }> & Record<string, any>) | undefined; params?: Record<string, any> | undefined; duplex?: "full" | "half" | undefined; jsonParser?: ((text: string) => Promise<any> | any) | undefined; retry?: _better_fetch_fetch.RetryOptions | undefined; retryAttempt?: number | undefined; output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined; errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined; disableValidation?: boolean | undefined; }>(data_0?: better_auth.Prettify<{ query?: { authenticatorAttachment?: "platform" | "cross-platform" | undefined; } | undefined; fetchOptions?: FetchOptions | undefined; }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth_client_plugins.PublicKeyCredentialCreationOptionsJSON, { code?: string; message?: string; }, FetchOptions["throw"] extends true ? true : false>>; }; } & { passkey: { generateAuthenticateOptions: <FetchOptions extends { cache?: RequestCache | undefined; credentials?: RequestCredentials | undefined; headers?: (HeadersInit & (HeadersInit | { accept: "application/json" | "text/plain" | "application/octet-stream"; "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream"; authorization: "Bearer" | "Basic"; })) | undefined; integrity?: string | undefined; keepalive?: boolean | undefined; method?: string | undefined; mode?: RequestMode | undefined; priority?: RequestPriority | undefined; redirect?: RequestRedirect | undefined; referrer?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; signal?: (AbortSignal | null) | undefined; window?: null | undefined; onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined; onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined; onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined; onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined; onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined; hookOptions?: { cloneResponse?: boolean; } | undefined; timeout?: number | undefined; customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined; plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined; baseURL?: string | undefined; throw?: boolean | undefined; auth?: ({ type: "Bearer"; token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined; } | { type: "Basic"; username: string | (() => string | undefined) | undefined; password: string | (() => string | undefined) | undefined; } | { type: "Custom"; prefix: string | (() => string | undefined) | undefined; value: string | (() => string | undefined) | undefined; }) | undefined; body?: (Partial<{ email?: string | undefined; }> & Record<string, any>) | undefined; query?: (Partial<Record<string, any>> & Record<string, any>) | undefined; params?: Record<string, any> | undefined; duplex?: "full" | "half" | undefined; jsonParser?: ((text: string) => Promise<any> | any) | undefined; retry?: _better_fetch_fetch.RetryOptions | undefined; retryAttempt?: number | undefined; output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined; errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined; disableValidation?: boolean | undefined; }>(data_0?: better_auth.Prettify<{ query?: Record<string, any> | undefined; fetchOptions?: FetchOptions | undefined; }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth_client_plugins.PublicKeyCredentialRequestOptionsJSON, { code?: string; message?: string; }, FetchOptions["throw"] extends true ? true : false>>; }; } & { passkey: { verifyRegistration: <FetchOptions extends { cache?: RequestCache | undefined; credentials?: RequestCredentials | undefined; headers?: (HeadersInit & (HeadersInit | { accept: "application/json" | "text/plain" | "application/octet-stream"; "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream"; authorization: "Bearer" | "Basic"; })) | undefined; integrity?: string | undefined; keepalive?: boolean | undefined; method?: string | undefined; mode?: RequestMode | undefined; priority?: RequestPriority | undefined; redirect?: RequestRedirect | undefined; referrer?: string | undefined; referrerPolicy?: ReferrerPolicy | undefined; signal?: (AbortSignal | null) | undefined; window?: null | undefined; onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined; onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined; onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined; onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined; onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined; hookOptions?: { cloneResponse?: boolean; } | undefined; timeout?: number | undefined; customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined; plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined; baseURL?: string | undefined; throw?: boolean | undefined; auth?: ({ type: "Bearer"; token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined; } | { type: "Basic"; username: string | (() => string | undefined) | undefined; password: string | (() => string | undefined) | undefined; } | { type: "Custom"; prefix: string | (() => string | undefined) | undefined; value: string | (() => string | undefined) | undefined; }) | undefined; body?: (Partial<{ name?: string | undefined; response?: any; }> & Record<string, any>) | undefined; query?: (Partial<Record<string, any>> & Record<string, any>) | undefined; params?: Record<string, any> | undefined; duplex?: "full" | "half" | undefined;