/** * Standalone admin endpoint for resetting a user's password. * * Hook resolution order: * 1. Collection-level hook (`auth.onResetPassword` on the collection) * 2. Backend-level hook (`AuthHooks.onAdminResetPassword`) * 3. Built-in default (send reset email, or generate temp password) */ import { Hono } from "hono"; import type { AuthRepository } from "./interfaces"; import type { AuthHooks } from "./auth-hooks"; import type { EmailService, EmailConfig } from "../email"; import type { HonoEnv } from "../api/types"; import type { AuthCollectionConfig } from "@rebasepro/types"; export interface ResetPasswordRouteConfig { authRepo: AuthRepository; emailService?: EmailService; emailConfig?: EmailConfig; serviceKey?: string; authHooks?: AuthHooks; /** The parsed auth config from the collection, if available. */ collectionAuthConfig?: AuthCollectionConfig; } /** * Create a standalone admin route for resetting user passwords. * * Mounts: POST /users/:userId/reset-password */ export declare function createResetPasswordRoute(config: ResetPasswordRouteConfig): Hono;