AniLink - v3.0.0
    Preparing search index...

    Interface SendRequestOptions

    Trailing options for sendRequest, replacing the former positional rest tuple so call sites name their arguments and new options can be added without reordering.

    interface SendRequestOptions {
        contentType?: string;
        operation?: string;
        options?: RequestOptions;
        protocol?: "graphql" | "rest";
        requiresAuth?: boolean;
        stateOwner?: object;
    }
    Index
    contentType?: string

    Optional Content-Type header override for non-GraphQL endpoints. Use it for form-urlencoded OAuth token requests or application/json for REST calls. This is purely a header concern; response interpretation and error classification are controlled by protocol.

    operation?: string

    Optional operation name included in missing-token auth errors.

    options?: RequestOptions

    Per-request RequestOptions; when omitted, library defaults apply (30 second timeout, automatic retries under the default policy, proactive rate-limit pacing, no hooks).

    protocol?: "graphql" | "rest"

    The wire protocol of the request, which selects response interpretation and error classification explicitly instead of inferring it from contentType. "graphql" (the default) unwraps the GraphQL response envelope and classifies HTTP failures as AniLinkApiError; "rest" returns the parsed body verbatim and classifies HTTP failures as AniLinkRestError. When omitted, the protocol is inferred from contentType for backwards compatibility: a set contentType implies "rest", an unset one implies "graphql".

    requiresAuth?: boolean

    Whether the operation requires an authentication token; the request fails fast with an AniLinkAuthError when set and no auth material is configured. The response cache is not consulted, so an auth-required read is never served an anonymous-namespace cache hit.

    stateOwner?: object

    Stable per-client object used to key cross-request transport state (the circuit breaker, retry budget, and rate-limit pacing deadlines). Operation dispatch passes a per-client shared state owner threaded through the provider wiring, so breaker, budget, and pacing state span every operation of one client; direct callers that reuse one transport-settings object can omit this, in which case the circuitBreaker/retryBudget configuration object itself keys the state. Passing a fresh object per request prevents breaker state from ever accumulating.