interface AuthUser { id: string; email: string; role: string | null; } type AuthMode = 'signin' | 'signup' | 'forgot' | 'reset' | 'verify' | 'verify-sent'; type AuthErrorCode = 'wrong_credentials' | 'email_exists' | 'invalid_email' | 'weak_password' | 'invalid_token' | 'registration_disabled' | 'signup_disabled' | 'network' | 'unknown'; interface AuthError { code: AuthErrorCode; message: string; } interface SignInResult { user: AuthUser; } interface SignUpResult { user: AuthUser; emailVerificationRequired: boolean; } interface ResetPasswordResult { user: AuthUser | null; } interface VerifyEmailResult { user: AuthUser | null; } interface SessionResult { user: AuthUser | null; } interface LoginMethods { /** @deprecated Use `workspace.hasPassword`. Kept for older AuthDialog versions and older CE backends that returned only the flat shape. */ hasPassword: boolean; /** @deprecated Use `workspace.hasGoogle`. Kept for older AuthDialog versions and older CE backends that returned only the flat shape. */ hasGoogle: boolean; /** * Workspace-level auth capabilities. Always present on responses from CE * backends >= the namespaced rollout. Falls back to defaults derived from * top-level fields when the response predates that change. */ workspace: { hasPassword: boolean; hasGoogle: boolean; /** Workspace's master public-signup gate (admin kill switch). */ allowSignup: boolean; }; /** * Per-project signup gate. Present only when the workspace has * REQUIRE_PROJECT_MEMBERSHIP enabled AND the request hostname maps to a * project. Absent on the admin domain or when the master switch is off. */ project?: { allowSignup: boolean; }; } /** * Effective signup permission for the current site. AuthDialog hides the * Sign up tab when this is false. Computed as * `workspace.allowSignup && (project?.allowSignup ?? true)`. */ declare function canSignup(methods: LoginMethods | null): boolean; export { type AuthError, type AuthErrorCode, type AuthMode, type AuthUser, type LoginMethods, type ResetPasswordResult, type SessionResult, type SignInResult, type SignUpResult, type VerifyEmailResult, canSignup };