rmapi-js
    Preparing search index...

    Interface ClientOptions

    where the core reaches the account, and how it caches and retries

    interface ClientOptions {
        authHost?: string;
        concurrency?: number;
        connect?: (
            request: PlatformRequest,
        ) => Promise<PlatformSocket | PlatformResponse>;
        fetch?: FetchFunction;
        maxBatch?: number;
        maxCacheChars?: number;
        maxGenerationRetries?: number;
        maxSessionRenewals?: number;
        maxTransientRetries?: number;
        name?: string;
        platform?: Platform;
        rawHost?: string;
        requestTimeoutMs?: number;
        state?: StateStore;
        store?: Store;
        uploadHost?: string;
    }

    Hierarchy (View Summary)

    Index
    authHost?: string

    the host that issues tokens

    "https://webapp-prod.cloud.remarkable.engineering"
    
    concurrency?: number

    how many requests of a batch are in flight at once

    32
    
    connect?: (
        request: PlatformRequest,
    ) => Promise<PlatformSocket | PlatformResponse>

    opens the notification socket

    Type Declaration

    connectWebSocket, asking through fetch whether a handshake that failed was refused

    the function requests go through

    the global fetch, looked up on every request

    maxBatch?: number

    the most requests one batch carries, and the most blobs one has or put of the store

    1024
    
    maxCacheChars?: number

    how large the cache of indexes and small files may grow, in characters

    8388608
    
    maxGenerationRetries?: number

    how many times an edit re-reads the root and tries again after another client wrote it first

    10
    
    maxSessionRenewals?: number

    how many times in a row a refused session is renewed before the refusal is thrown

    1
    
    maxTransientRetries?: number

    how many times to retry a request after a network failure, a 5xx or a 429

    Only requests the core marks as safe to repeat are retried: never a root write, a registration, or an upload to the ingestion endpoint.

    3
    
    name?: string

    the client's name, part of the id it edits pages as; two programs sharing one device token need different names

    ""
    
    platform?: Platform

    everything the core needs from where it runs, in place of the fetchPlatform the other platform options would build

    rawHost?: string

    the host of blobs and the root

    "https://eu.tectonic.remarkable.com"
    
    requestTimeoutMs?: number

    how long a request may wait for its answer, or for the next piece of the answer's body, before it is given up as unanswered, in milliseconds; Infinity, or anything above 2^31 - 1, for no limit

    A body sent is not timed: how long one takes depends on its size.

    60000
    
    state?: StateStore

    where a library keeps its saved state

    a MemoryState

    store?: Store

    where blobs are kept: document bodies, and the pages and copies the offline library works on

    a MemoryStore

    uploadHost?: string

    the host documents are uploaded through

    "https://internal.cloud.remarkable.com"