import type { ValidationIssue } from '../services/validate/types.ts'; /** @internal English defaults of the password messages, shared with the `Auth` controller. */ export declare const PASSWORD_EN: { readonly 'auth.passwordProvided': 'Password must be provided'; readonly 'auth.passwordTooShort': 'Password must be at least {{min}} characters'; readonly 'auth.passwordTooLong': 'Password must be at most {{max}} characters'; }; /** @internal {@link passwordPolicyIssues} against the given `auth` config. */ export declare const passwordPolicyIssuesFor: (authConfig: Record, password: unknown, field?: string) => ValidationIssue[]; /** * Check a new password against `auth.passwordPolicy` (`minLength`..`maxLength` * Unicode code points). Returns `[]` when it passes, otherwise one issue at * `field` whose message is an i18n key with an English default; a thrown * `HttpError` translates it. Throws when the policy config is invalid. * * ```ts * const issues = passwordPolicyIssues(req.appInfo.request.newPassword, 'newPassword'); * if (issues.length) { * throw new BadRequestError({ code: 'VALIDATION_FAILED', message: 'Validation failed', errors: issues }); * } * ``` */ export declare const passwordPolicyIssues: (password: unknown, field?: string) => ValidationIssue[];