truegrain - v1.1.0
    Preparing search index...

    Interface ClientOptions

    Options for the Client constructor.

    interface ClientOptions {
        fetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        timeoutMs?: number;
        token?: string;
        userAgent?: string;
    }
    Index
    fetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Injected for tests, and for a runtime whose global fetch you must wrap.

    Type Declaration

      • (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>

    timeoutMs?: number

    Milliseconds to wait for a response.

    token?: string

    Bearer token identifying the workload. Read it from the environment; never hard-code one. Omit it only against a local engine running without authentication.

    userAgent?: string

    Overrides the identifying header, which is useful when you want the audit log to distinguish one agent from another.