import { AuthConfig, customFetch as _customFetch } from '@auth/core'; import { Session } from '@auth/core/types'; import { z, RequestEventCommon } from '@builder.io/qwik-city'; import { EnvGetter } from '@builder.io/qwik-city/middleware/request-handler'; export declare const customFetch: typeof _customFetch | undefined; export { AuthError, CredentialsSignin } from '@auth/core/errors'; export type { Account, DefaultSession, Profile, Session, User, } from '@auth/core/types'; /** Configure the {@link QwikAuth$} method. */ export interface QwikAuthConfig extends Omit { } export type GetSessionResult = Promise<{ data: Session | null; cookie: any; }>; /** * Initialize Qwik Auth. * * @example * ```ts title="plugin@auth.ts" * import { QwikAuth } from "@auth/qwik" * import GitHub from "@auth/qwik/providers/github" * * export const { * onRequest, useSession, useSignIn, useSignOut * } = QwikAuth$(() => ({ providers: [GitHub] })) * ``` */ export declare const QwikAuth$: (qrl: (ev: RequestEventCommon) => QwikAuthConfig) => { useSignIn: import('@builder.io/qwik-city').Action<{ formErrors?: undefined; fieldErrors?: undefined; failed?: undefined; } | { formErrors: string[]; fieldErrors: Partial<{ options: string; providerId: string; redirectTo: string; authorizationParams: string; }>; failed: true; }, { options?: z.objectInputType<{ redirectTo: z.ZodOptional; }, z.ZodTypeAny, "passthrough"> | undefined; providerId?: string | undefined; redirectTo?: string | undefined; authorizationParams?: string | URLSearchParams | Record | undefined; }, false>; useSignOut: import('@builder.io/qwik-city').Action<{ formErrors?: undefined; fieldErrors?: undefined; failed?: undefined; } | { formErrors: string[]; fieldErrors: Partial<{ redirectTo: string; }>; failed: true; }, { redirectTo?: string | undefined; }, false>; useSession: import('@builder.io/qwik-city').Loader; onRequest: (req: RequestEventCommon) => Promise; }; export declare const setEnvDefaults: (env: EnvGetter, config: AuthConfig) => void; //# sourceMappingURL=index.d.ts.map