/**
 * Signup route spec for account creation.
 *
 * Public endpoint that creates an account. When `open_signup` is disabled
 * (default), a matching unclaimed invite is required. When enabled, anyone
 * can sign up without an invite. Follows the `auth/bootstrap_routes.ts` pattern.
 *
 * @module
 */
import { z } from 'zod';
import { type RouteSpec } from '../http/route_spec.js';
import { type RateLimiter } from '../rate_limiter.js';
import type { RouteFactoryDeps } from './deps.js';
import type { AuthSessionRouteOptions } from './account_routes.js';
/**
 * Default minimum wall-clock time (ms) for a signup denial (403 / 409) response.
 *
 * Parallel to login's `DEFAULT_LOGIN_FAIL_FLOOR_MS`. Without a floor, an
 * attacker can distinguish `ERROR_NO_MATCHING_INVITE` (cheap — bails before
 * Argon2 + tx) from `ERROR_SIGNUP_CONFLICT` (Argon2 + tx + rollback) via
 * response time and use the gap as a username-enumeration oracle. Picked
 * to exceed the p99 of every denial code path (Argon2id dominates at
 * ~100ms, plus DB + overhead). 429 stays fast by design (same precedent
 * as login) so rate-limit DoS handling stays cheap.
 */
export declare const DEFAULT_SIGNUP_FAIL_FLOOR_MS = 250;
/**
 * Default uniform jitter window (±ms) layered on the floor.
 *
 * Random jitter prevents a stable clamp point from leaking whenever a
 * path occasionally exceeds the floor. `Math.random` is sufficient —
 * we only need unpredictability of the exact delay, not cryptographic
 * guarantees.
 */
export declare const DEFAULT_SIGNUP_FAIL_JITTER_MS = 25;
/**
 * Per-factory configuration for signup route specs.
 */
export interface SignupRouteOptions extends AuthSessionRouteOptions {
    /** Rate limiter for signup attempts, keyed by submitted username. Pass `null` to disable. */
    signup_account_rate_limiter: RateLimiter | null;
    /**
     * Minimum wall-clock time (ms) for signup denial responses (403 / 409).
     * Set to `0` or a negative number to disable (e.g., in tests). Default
     * `DEFAULT_SIGNUP_FAIL_FLOOR_MS`. 429 responses are not floored.
     */
    signup_fail_floor_ms?: number;
    /**
     * Uniform jitter window (±ms) layered on the floor. Set to `0` to
     * disable jitter while keeping the floor. Default
     * `DEFAULT_SIGNUP_FAIL_JITTER_MS`.
     */
    signup_fail_jitter_ms?: number;
}
/** Input for `POST /signup`. `email` is optional and must match any referenced invite. */
export declare const SignupInput: z.ZodObject<{
    username: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
    password: z.ZodString;
    email: z.ZodOptional<z.ZodEmail>;
}, z.core.$strict>;
export type SignupInput = z.infer<typeof SignupInput>;
/**
 * Output for `POST /signup`.
 *
 * Session cookie is the operative side effect. The returned `account` and
 * `actor` mirror `BootstrapOutput` so cross-process per-test setup can read
 * the per-test identity straight off the signup response.
 */
export declare const SignupOutput: z.ZodObject<{
    ok: z.ZodLiteral<true>;
    account: z.ZodObject<{
        id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
        username: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
    }, z.core.$strict>;
    actor: z.ZodObject<{
        id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
    }, z.core.$strict>;
}, z.core.$strict>;
export type SignupOutput = z.infer<typeof SignupOutput>;
/**
 * Create signup route specs for account creation.
 *
 * @param deps - stateless capabilities
 * @param options - per-factory configuration
 * @returns route specs (not yet applied to Hono)
 */
export declare const create_signup_route_specs: (deps: RouteFactoryDeps, options: SignupRouteOptions) => Array<RouteSpec>;
//# sourceMappingURL=signup_routes.d.ts.map