import * as qs from 'qs'; import * as express_serve_static_core from 'express-serve-static-core'; import * as express from 'express'; import { Request, RequestHandler, Express } from 'express'; import * as _auth_core_adapters from '@auth/core/adapters'; type CredentialUser = { id: string; name: string | null; email: string | null; image?: string | null; passwordHash: string | null; }; type CreateAuthModuleOptions = { prisma: any; clientUrl: string; sessionCookieName: string; sessionCookieSecure: boolean; authUrl?: string; authDebug?: boolean; authSecret?: string; trustHost?: boolean; extraSessionCookieNames?: string[]; signInPath?: string; authenticatedRedirectPath?: string; googleClientId?: string; googleClientSecret?: string; slackClientId?: string; slackClientSecret?: string; findCredentialsUserByEmail: (email: string) => Promise; comparePassword: (password: string, passwordHash: string) => Promise; sessionUserSelect: Record; mapSessionUser: (user: any) => TAuthUser; onSessionValidated?: (user: TAuthUser) => Promise | void; }; declare function createAuthModule(options: CreateAuthModuleOptions): { authConfig: { adapter: _auth_core_adapters.Adapter; trustHost: boolean; debug: boolean; logger: { error(error: Error): void; warn(code: string): void; debug(message: string, metadata?: unknown): void; } | undefined; session: { strategy: "database"; }; secret: string | undefined; cookies: { sessionToken: { name: string; options: { httpOnly: boolean; sameSite: "lax"; path: string; secure: boolean; }; }; }; providers: any[]; pages: { signIn: string; }; callbacks: { redirect: ({ url, baseUrl }: { url: string; baseUrl: string; }) => Promise; }; }; authHandler: (req: Request, res: express.Response, next: express.NextFunction) => Promise; requireSession: RequestHandler>; extractSessionToken: (cookieHeader: string | undefined) => string | null; googleAuthEnabled: boolean; slackAuthEnabled: boolean; }; type RegisterAuthApiRoutesOptions = { app: Express; prisma: any; authHandler: RequestHandler; requireSession: RequestHandler; extractSessionToken: (cookieHeader: string | undefined) => string | null; providersAvailability: Record; sessionCookieName: string; sessionCookieSecure: boolean; extraCookieNamesToClear?: string[]; messages?: Partial; authBasePath?: string; authApiBasePath?: string; mePath?: string; normalizeEmail?: (email: string) => string; passwordHasher?: (password: string) => Promise; passwordComparator?: (password: string, passwordHash: string) => Promise; passwordReset?: { enabled: boolean; tokenTtlMs?: number; identifierPrefix?: string; buildResetUrl: (token: string) => string; sendMessage: (input: { user: { id: string; email: string; name: string | null; passwordHash: string | null; }; resetUrl: string; isPasswordCreation: boolean; expiresAt: Date; }) => Promise; }; onUserRegistered?: (user: { id: string; email: string | null; name: string | null; }) => Promise | void; onPasswordResetConfirmed?: (user: { id: string; email: string | null; name: string | null; }) => Promise | void; }; type AuthRouteMessages = { invalidPayload: string; emailAlreadyUsed: string; accountNotFound: string; externalAccountOnly: string; invalidPassword: string; passwordResetUnavailable: string; invalidResetLink: string; expiredResetLink: string; }; declare function registerAuthApiRoutes(options: RegisterAuthApiRoutesOptions): void; export { createAuthModule, registerAuthApiRoutes };