Datalynk Client
    Preparing search index...

    Type Alias ApiOptions

    Api connection options

    type ApiOptions = {
        bundleTime?: number;
        chat?: boolean;
        chatModule?: string;
        gps?: GpsOptions;
        legacyDates?: boolean;
        manageSession?: boolean;
        manifest?: any;
        name?: string;
        offline?: number[];
        offlineBanner?: boolean | "top" | "bottom";
        origin?: string;
        pwaSettings?: {
            dismissExpiry?: number;
            hidePWAPrompt?: boolean;
            icon?: string;
            loginLink?: boolean;
            timeout?: number;
        };
        replayOfflineQueue?: boolean;
        saveSession?: boolean;
        serviceWorker?: string;
        socket?: false
        | string;
        socketAuthentication?: "token" | "ticket";
        socketRealm?: string;
        watchTokenExpiry?: boolean;
        webrtc?: {
            ice?: RTCIceServer[];
            password?: string;
            url: string;
            username?: string;
        };
    }
    Index

    Properties

    bundleTime?: number

    Bundle requests together that happen in quick succession

    chat?: boolean

    Show an opt-in floating chat launcher. Chat code and network activity remain lazy until it is opened.

    chatModule?: string

    Lazy chat module URL. Defaults to the adjacent chat.mjs package artifact.

    GPS live tracking over socket-server/Redis

    legacyDates?: boolean

    Use legacy dates by default

    manageSession?: boolean

    Manage token expiry, session cleanup, and page reloads. Disable when a host application owns authentication.

    manifest?: any

    PWA manifest overrides

    name?: string

    Name of application

    offline?: number[]

    Slice IDs to persist in the local IndexedDB cache for offline use.

    These slices can fall back to local data when the browser loses network connectivity or when Datalynk enters an unavailable recovery state.

    offlineBanner?: boolean | "top" | "bottom"

    Connectivity banners are no longer rendered by the SDK. Retained as a no-op for compatibility.

    origin?: string

    Website hostname

    pwaSettings?: {
        dismissExpiry?: number;
        hidePWAPrompt?: boolean;
        icon?: string;
        loginLink?: boolean;
        timeout?: number;
    }

    Progressive Web App settings

    Type declaration

    • OptionaldismissExpiry?: number

      Days until the dismissed prompt can show again. If set to 0 it will trigger every refresh. (Default is 7 days)

    • OptionalhidePWAPrompt?: boolean

      Hide/disable the in-app PWA install popup entirely

    • Optionalicon?: string

      Optional: override the installed-app icon (should be a PNG, ideally 512x512)

    • OptionalloginLink?: boolean

      Show PWA install link on login screen. Default is False

    • Optionaltimeout?: number

      How long to wait before showing the installation prompt (seconds). Default is 30 seconds

    replayOfflineQueue?: boolean

    Replay the IndexedDB pending queue when authenticated connectivity returns. Disable in service-worker helper instances.

    saveSession?: boolean

    Save session token to localStorage to persist logins

    serviceWorker?: string

    Service worker URL

    socket?: false | string

    Disable sockets with false or override socket URL

    socketAuthentication?: "token" | "ticket"

    Socket authentication mode. Existing clients use token authentication unless ticket mode is explicitly enabled.

    socketRealm?: string

    Optional realm for legacy socket authentication.

    watchTokenExpiry?: boolean

    Watch JWT expiry. This is always disabled on development hosts.

    webrtc?: {
        ice?: RTCIceServer[];
        password?: string;
        url: string;
        username?: string;
    }

    WebRTC TURN server URL

    Type declaration

    • Optionalice?: RTCIceServer[]

      Additional ICE servers

    • Optionalpassword?: string

      TURN server password

    • url: string

      Auxilium WebRTC STUN/TURN server URL override

    • Optionalusername?: string

      TURN server username