Metreeca Keep
    Preparing search index...

    Function createRESTStore

    • Creates a REST proxy store backed by a remote REST service.

      Exposes a remote REST service through the standard Store API, so an application drives it with the same calls as any local backend. Each operation round-trips to the service over fetch; observers see only mutations issued through this store, and the module description carries the full request/response contract, validation rules, and miss-code handling.

      Important

      Transaction Isolation — None. REST has no native transaction support; operations apply eagerly with no cross-call isolation, and a execute task that throws after partial server-side mutations does not roll them back.

      Important

      Mutation Events — Limited to mutations issued through this store; mutations from other clients sharing the remote service are not observed.

      Parameters

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

        Fetch-compatible transport used for every HTTP request; defaults to the global fetch

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

            • input: RequestInfo | URL
            • Optionalinit: RequestInit

            Returns Promise<Response>

      • options: { trusted?: boolean } = {}

        Optional proxy options

        • Optional Readonlytrusted?: boolean

          When true, skips re-validation of lookup responses against the projected shape; defaults to false, treating the remote endpoint as untrusted

      Returns Store

      An immutable Store whose methods round-trip every call to the remote REST service