import { type ApiErrorItem, WorkOSApiError } from '../core/index.js'; /** * Production's password policy (`api-services/src/password-validator/password-validator.ts`), * at the settings a new environment is born with: at least 10 characters, at most 72 bytes * (bcrypt's limit), not containing the account's email address, and a zxcvbn score of 3 or * more — scored by the same library, dictionaries and keyboard graphs production configures, so * the same passwords pass and fail. The breached-password lookup is off by default in * production and needs the network, and the password-history and compromised-password checks * read tables the emulator has no counterpart for, so none of those run here. */ export declare const MINIMUM_PASSWORD_LENGTH = 10; /** bcrypt ignores everything past 72 bytes, so production refuses longer passwords outright. */ export declare const MAXIMUM_PASSWORD_LENGTH_IN_BYTES = 72; /** * Every rule `password` breaks, as the items production puts in the `errors` array of a * `password_strength_error` or `password_reset_error` body, in production's order. Empty when * the password is acceptable. A password over the byte limit is reported for that alone, as * production short-circuits there before scoring. */ export declare function passwordPolicyErrors(password: string, associatedEmail?: string): ApiErrorItem[]; /** * The 400 `POST` and `PUT /user_management/users` answer a password that breaks the policy * with. Returns nothing when the password is acceptable, so a caller can write `if (error) * throw error` beside its other checks. */ export declare function passwordStrengthError(password: string, associatedEmail?: string): WorkOSApiError | undefined;