@suluk/nano-stores - v0.1.3
    Preparing search index...

    Interface CreateApiStoresOptions

    interface CreateApiStoresOptions {
        baseUrl?: string;
        fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
        action?: string | (() => string | undefined);
    }
    Index

    Properties

    baseUrl?: string

    Prepended to every built URL (e.g. "https://api.example.com").

    fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>

    Injected fetch — defaults to the global. Tests pass a recording mock.

    Type Declaration

      • (input: RequestInfo | URL, init?: RequestInit): Promise<Response>
      • Parameters

        • input: RequestInfo | URL
        • Optionalinit: RequestInit

        Returns Promise<Response>

    action?: string | (() => string | undefined)

    The current frontend ACTION (a button-click id), sent as x-suluk-action on every request so the server's cost meter (@suluk/cost) can attribute cost back to the UI action. A function lets it reflect the live action. A per-call action on .mutate({ action }) overrides it.