observation-js Documentation - v1.16.0
    Preparing search index...

    Interface ObservationClientOptions

    interface ObservationClientOptions {
        clientId?: string;
        clientSecret?: string;
        redirectUri?: string;
        baseUrl?: string;
        platform?: Platform;
        test?: boolean;
        autoRefreshToken?: boolean;
        cache?: { enabled?: boolean; defaultTTL?: number; store?: CacheStore };
    }
    Index

    Properties

    clientId?: string
    clientSecret?: string
    redirectUri?: string
    baseUrl?: string
    platform?: Platform
    test?: boolean
    autoRefreshToken?: boolean

    Whether to automatically refresh access tokens when they expire. When enabled, the client will automatically attempt to use the refresh token to obtain a new access token when a request fails with a 401 status.

    true
    
    cache?: { enabled?: boolean; defaultTTL?: number; store?: CacheStore }

    Configuration for the in-memory cache.

    Type Declaration

    • Optionalenabled?: boolean

      Set to false to disable the cache entirely.

      true
      
    • OptionaldefaultTTL?: number

      The default Time-to-Live (TTL) for all cacheable requests, in seconds. This can be overridden on a per-request basis.

      3600 (1 hour)
      
    • Optionalstore?: CacheStore

      For advanced use, you can provide your own cache store. The provided object must conform to the CacheStore interface. If not provided, the client will use a default in-memory store.