import './assert_dev_env.js';
import type { SessionOptions } from '../auth/session_cookie.js';
import { type RpcEndpointsSuiteOption } from './rpc_helpers.js';
import type { AppSurfaceSpec } from '../http/surface.js';
import { type BackendCapabilities } from './cross_backend/capabilities.js';
import type { SetupTest } from './cross_backend/setup.js';
/**
 * Configuration for `describe_standard_integration_tests`.
 */
export interface StandardIntegrationTestOptions {
    /**
     * Per-test fixture-producing function. The integration suite calls
     * this in every `test()` body — auth_integration_truncate_tables
     * clears `account`, so each test re-bootstraps the keeper.
     */
    setup_test: SetupTest;
    /**
     * App surface (with route specs + middleware specs) for route iteration
     * and error-coverage scoping. The same shape feeds both in-process and
     * cross-process tests — the test process always constructs the spec in
     * TS (via `create_test_app_surface_spec` or a consumer's equivalent);
     * cross-process-ness is a property of the transport + per-test fixture,
     * not the schema source. The on-disk `auth_attack_surface.json` is an
     * observability artifact for human inspection + gen-time drift gating,
     * not the source the test runtime reads from.
     */
    surface_source: AppSurfaceSpec;
    /** Backend capability declarations for capability-gated cases. */
    capabilities: BackendCapabilities;
    /**
     * Session config — needed to resolve factory-form `rpc_endpoints`
     * against a stub `AppServerContext` at setup time and to read
     * `cookie_name` for manual cookie composition in the session cases.
     */
    session_options: SessionOptions<string>;
    /**
     * RPC endpoint specs — required. This suite dispatches
     * `account_verify`, `account_session_*`, and `account_token_*` via
     * `rpc_call_for_spec` (the `/api/account/verify` REST route is a
     * status-only nginx shim with no payload). Hard-fails via
     * `require_rpc_endpoint_path` on setup so consumer projects see a
     * clear setup error instead of confusing test failures.
     *
     * Accepts either an array (eager) or a factory — see `rpc_helpers.ts`
     * for the union semantics. The factory must return the same endpoint
     * `path` regardless of ctx — invoked once at setup with a stub ctx
     * for path lookup; the running backend handles live dispatch.
     */
    rpc_endpoints: RpcEndpointsSuiteOption;
    /**
     * Minimum error-coverage ratio to enforce on the scoped REST surface
     * (login / logout / password / signup + the shared RPC endpoint).
     * Default `DEFAULT_INTEGRATION_ERROR_COVERAGE` (0.2). Set to `0` to
     * skip the assertion entirely — useful for consumers with minimal
     * route sets whose declared error codes outpace the suite's
     * denial-path drivers.
     */
    error_coverage_min?: number;
}
/**
 * Standard integration test suite for fuz_app auth routes.
 *
 * Exercises login/logout, cookie attributes, session security, session
 * revocation, password change (incl. API token revocation), origin
 * verification, bearer auth (incl. browser context discard on mutations),
 * token revocation, cross-account isolation, expired credential rejection,
 * signup invite edge cases, and response body validation.
 *
 * Each test group asserts that required routes exist, failing with a descriptive
 * message if the consumer's route specs are misconfigured.
 *
 * The two signup-invite-edge-case tests call `invite_create_action_spec`
 * (admin-gated) over the fixture's session, so consumers wiring signup +
 * admin actions must thread `extra_keeper_roles: [ROLE_ADMIN]` through
 * either `default_in_process_suite_options` or
 * `default_cross_process_setup(handle, {extra_keeper_roles:
 * [ROLE_ADMIN]})`. In both modes the fixture's `fixture.account` is the
 * fresh keeper, and the extra-keeper-roles list grants the bootstrapped
 * keeper additional roles inline (cross-process via `_testing_reset`'s
 * bootstrap-time seeding; in-process via `bootstrap_test_keeper`) — no
 * per-role RPC cost, no offer/accept round-trip. The tests run against
 * the production `open_signup: false` default — the cross-process
 * per-test secondary mint via `fixture.create_account()` is
 * invite-gated (keeper drives `invite_create` before signup) so the
 * harness doesn't need to flip the setting. Consumers that don't wire
 * signup or `invite_create` silently skip these two tests.
 *
 * @throws Error at setup time when `options.rpc_endpoints` is empty — the
 *   suite hard-fails via `require_rpc_endpoint_path` rather than running
 *   tests that would crash mid-suite trying to dispatch
 *   `account_verify` / `account_session_*` / `account_token_*`.
 */
export declare const describe_standard_integration_tests: (options: StandardIntegrationTestOptions) => void;
//# sourceMappingURL=integration.d.ts.map