sense-js-sdk
    Preparing search index...

    Interface SenseApiClientOptions

    Configuration options for the Sense API client.

    interface SenseApiClientOptions {
        apiUrl?: string;
        autoReconnectRealtimeUpdates?: boolean;
        fetcher?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        logger?: Logger;
        wssUrl?: string;
    }
    Index

    Properties

    apiUrl?: string

    Base URL for the Sense REST API endpoints.

    Overriding this value should never be necessary.

    https://api.sense.com/apiservice/api/v1

    autoReconnectRealtimeUpdates?: boolean

    Whether to automatically reconnect to the real-time WebSocket API when the connection is lost.

    true

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

    Optional fetch function to use for HTTP requests.

    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>

    The global fetch function.

    logger?: Logger

    Optional logger instance for client logging.

    A _void_ logger instance that does nothing.
    
    wssUrl?: string

    Base URL for the Sense real-time WebSocket API endpoints.

    Overriding this value should never be necessary.

    wss://clientrt.sense.com