HoneyHive TypeScript API SDK
    Preparing search index...

    Interface ClientConfig

    Configuration options for the HoneyHive API client. They extend the options from openapi-fetch, but replace 'baseUrl' with 'serverUrl' for consistency with our other SDKs.

    interface ClientConfig {
        apiKey?: string;
        body?: BodyInit | null;
        bodySerializer?: BodySerializer<unknown>;
        cache?: RequestCache;
        credentials?: RequestCredentials;
        fetch?: (input: Request) => Promise<Response>;
        headers?: Record<string, string>;
        integrity?: string;
        keepalive?: boolean;
        method?: string;
        middleware?: Middleware[];
        mode?: RequestMode;
        pathSerializer?: PathSerializer;
        priority?: RequestPriority;
        querySerializer?: QuerySerializer<unknown> | QuerySerializerOptions;
        redirect?: RequestRedirect;
        referrer?: string;
        referrerPolicy?: ReferrerPolicy;
        Request?: {
            prototype: Request;
            new (input: RequestInfo | URL, init?: RequestInit): Request;
        };
        requestInitExt?: Record<string, unknown>;
        serverUrl?: string;
        signal?: AbortSignal | null;
        window?: null;
    }

    Hierarchy

    • Omit<ClientOptions, "baseUrl" | "headers">
      • ClientConfig
    Index

    Properties

    apiKey?: string
    body?: BodyInit | null

    A BodyInit object or null to set request's body.

    bodySerializer?: BodySerializer<unknown>

    global bodySerializer

    cache?: RequestCache

    A string indicating how the request will interact with the browser's cache to set request's cache.

    credentials?: RequestCredentials

    A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.

    fetch?: (input: Request) => Promise<Response>

    custom fetch (defaults to globalThis.fetch)

    headers?: Record<string, string>
    integrity?: string

    A cryptographic hash of the resource to be fetched by request. Sets request's integrity.

    keepalive?: boolean

    A boolean to set request's keepalive.

    method?: string

    A string to set request's method.

    middleware?: Middleware[]
    mode?: RequestMode

    A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.

    pathSerializer?: PathSerializer

    global pathSerializer

    priority?: RequestPriority
    querySerializer?: QuerySerializer<unknown> | QuerySerializerOptions

    global querySerializer

    redirect?: RequestRedirect

    A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.

    referrer?: string

    A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.

    referrerPolicy?: ReferrerPolicy

    A referrer policy to set request's referrerPolicy.

    Request?: {
        prototype: Request;
        new (input: RequestInfo | URL, init?: RequestInit): Request;
    }

    custom Request (defaults to globalThis.Request)

    requestInitExt?: Record<string, unknown>

    RequestInit extension object to pass as 2nd argument to fetch when supported (defaults to undefined)

    serverUrl?: string
    signal?: AbortSignal | null

    An AbortSignal to set request's signal.

    window?: null

    Can only be null. Used to disassociate request from any Window.