import { type mongodb } from '@unchainedshop/mongodb'; import type { User } from './db/UsersCollection.ts'; export interface UserRegistrationData extends Partial { email?: string; password: string | null; webAuthnPublicKeyCredentials?: any; } export declare const UserAccountAction: { readonly RESET_PASSWORD: "reset-password"; readonly VERIFY_EMAIL: "verify-email"; readonly ENROLL_ACCOUNT: "enroll-account"; readonly PASSWORD_RESETTED: "password-resetted"; readonly EMAIL_VERIFIED: "email-verified"; }; export type UserAccountAction = (typeof UserAccountAction)[keyof typeof UserAccountAction]; export interface UserSettings { mergeUserCartsOnLogin: boolean; autoMessagingAfterUserCreation: boolean; guestUserMaxAgeInDays: number; earliestValidTokenDate: (type: typeof UserAccountAction.VERIFY_EMAIL | typeof UserAccountAction.RESET_PASSWORD) => Date; validateEmail: (email: string) => Promise; validateUsername: (username: string) => Promise; validateNewUser: (user: UserRegistrationData) => Promise; validatePassword: (password: string) => Promise; configureSettings: (options: UserSettingsOptions, db: mongodb.Db) => void; } export type UserSettingsOptions = Omit, 'configureSettings'>; export declare const userSettings: UserSettings;