/**
 * Account RPC action handlers — self-service operations for the authenticated
 * account.
 *
 * Seven `request_response` actions bound to handlers:
 *
 * - Session reads: `account_verify`, `account_session_list`.
 * - Session mutations: `account_session_revoke`, `account_session_revoke_all`.
 * - API token management: `account_token_create`, `account_token_list`,
 *   `account_token_revoke`.
 *
 * The action specs themselves live in `auth/account_action_specs.ts`. Every spec
 * declares `auth: {account: 'required', actor: 'none'}` so the dispatcher
 * enforces account-grain auth before the handler runs. Revoke operations are
 * account-scoped (via
 * `query_session_revoke_for_account` / `query_revoke_api_token_for_account`)
 * so passing another account's session or token id returns `revoked: false`
 * rather than revealing whether the id exists.
 *
 * Counterpart to `auth/account_routes.ts`, which keeps the cookie-lifecycle flows
 * (`login`, `logout`, `password`, `signup`, `bootstrap`) on REST.
 *
 * @module
 */
import { type RpcAction } from '../actions/action_rpc.js';
import type { ConnectionCloser } from '../actions/connection_closer.js';
import type { RouteFactoryDeps } from './deps.js';
/** Options for `create_account_actions`. */
export interface AccountActionOptions {
    /**
     * Max API tokens per account. When set, `account_token_create` enforces the
     * cap via `query_api_token_enforce_limit` inside the same transaction —
     * oldest tokens are evicted once the cap is exceeded. Default
     * `DEFAULT_MAX_TOKENS`; pass `null` to disable the cap.
     */
    max_tokens?: number | null;
    /**
     * Live-connection closer — when set, `account_session_revoke` /
     * `_session_revoke_all` / `account_token_revoke` handlers eagerly close
     * affected WebSocket sockets BEFORE emitting the corresponding audit
     * event. Closes the audit-failure-leaks-WS surface: the listener-based
     * close (`transports_ws_auth_guard`) only fires after the audit INSERT
     * succeeds, so a DB error would leave live sockets stale. `BackendWebsocketTransport`
     * satisfies this interface structurally; consumers pass their transport
     * instance directly. When absent, only the listener-based close runs.
     * Mirrors `zzz_server`'s handler-side `close_sockets_for_*` calls.
     */
    connection_closer?: ConnectionCloser | null;
}
/**
 * Create the self-service account RPC actions.
 *
 * @param deps - `RouteFactoryDeps` (`log`, `audit`, …). `audit.emit` writes
 *   audit rows via the captured pool; the bound emitter encapsulates
 *   `on_audit_event` fan-out and the optional `AuditLogConfig`.
 * @param options - per-factory configuration
 * @returns the `RpcAction` array to spread into a `create_rpc_endpoint` call
 */
export declare const create_account_actions: (deps: Pick<RouteFactoryDeps, "log" | "audit">, options?: AccountActionOptions) => Array<RpcAction>;
//# sourceMappingURL=account_actions.d.ts.map