Capsium TypeScript API
    Preparing search index...

    Interface HandleRequestOptions

    Options for request handling (mainly test seams).

    interface HandleRequestOptions {
        deployConfig?: DeployAuthConfig;
        fetchFn?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        importSource?: SourceImporter;
        now?: () => number;
        scopePrefix?: string;
        sessionTtlSeconds?: number;
    }
    Index
    deployConfig?: DeployAuthConfig

    Deploy-time secrets (session cookie signing) — never from the package.

    fetchFn?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Fetch override for the OAuth2 token exchange (mock in tests).

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    importSource?: SourceImporter

    Module loader override for handler execution (mock in tests). Applies only the first time an executor is created for a given installed package model.

    now?: () => number

    Clock override (tests).

    scopePrefix?: string

    Registration scope pathname for non-root mounting (e.g. '/playground/~serve/'): package routes resolve relative to the prefix, requests outside it are not served, and absolute redirects the reactor emits (OAuth2) point back inside it. Default '/' (root scope).

    sessionTtlSeconds?: number

    Session cookie lifetime, seconds.