inmake DOCS
Docs / SDK / Repository layer

Repository layer

The HTTP client, the repository interfaces and the module base classes every facade builds on.

Repository layer (src/repository)#

Low-level transport abstractions used by every module. Most callers should not need these directly.

  • RequestClient — interface: ref(path) to scope a sub-path, call<T>(data?) to POST and parse JSON.
  • DropHttpClient — Node https-based implementation. Sends store and access-token headers. Throws on status >= 400.
  • DropCoreRepo — convenience wrapper that joins a base path with an action name and delegates to a RequestClient. Sub-classed by the per-route repos.
  • CrudOperation, CrudValueOperation, CrudIdValueOperation, CrudMaskOperation, CrudListOperation — request-body shapes used by the admin CRUD endpoints (get, add, set, update, delete, list, count, batch).

Module base classes#

src/drop_core_module.ts

  • DropCoreModule — holds a DropCore reference. Base for any module.
  • DropClientModule — extends DropCoreModule with a path-scoped RequestClient and a call(action, data) helper. Base for the process, promo, and public modules.

The admin facade has a richer base (src/admin/base/):

  • DropCoreAdminRepo — extends DropCoreRepo with the typed CRUD verbs listed above; routed at admin/.
  • DropCoreAdminModule — base for any admin model; carries the repo.
  • DropDocument<T> — single-document handle (load, get, set, update, delete, collection(name)). Mirrors local state in data so subsequent reads can return cached values.
  • DropCollection<T> — typed collection handle with query state (where, limit, orderBy, offset), pagination (load, loadMore), CRUD (add, set, update, delete, get), and document(id) / doc<U>(id) for nested access.