@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 data operation round-trips to the service over the configured fetch transport. The module description details the request and response contract, the validation rules and the 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

      • options: {
            trusted?: boolean;
            fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
        } = {}

        Optional proxy options

        • Optional Readonlytrusted?: boolean

          Whether to accept lookup responses without validating them against the shape narrowed by the caller's model.

          Enabling it suits only a service trusted to deliver shape-conforming data, as responses then reach the caller unchecked.

          false, treating the remote endpoint as untrusted

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

          fetch-compatible transport used for every HTTP request.

          A configured client adds authentication, custom headers, or other cross-cutting request handling.

          The global fetch

      Returns Store

      An immutable Store proxying the remote REST service