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— Nodehttps-based implementation. Sendsstoreandaccess-tokenheaders. Throws on status >= 400.DropCoreRepo— convenience wrapper that joins a base path with an action name and delegates to aRequestClient. 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 aDropCorereference. Base for any module.DropClientModule— extendsDropCoreModulewith a path-scopedRequestClientand acall(action, data)helper. Base for theprocess,promo, andpublicmodules.
The admin facade has a richer base (src/admin/base/):
DropCoreAdminRepo— extendsDropCoreRepowith the typed CRUD verbs listed above; routed atadmin/.DropCoreAdminModule— base for any admin model; carries the repo.DropDocument<T>— single-document handle (load,get,set,update,delete,collection(name)). Mirrors local state indataso 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), anddocument(id)/doc<U>(id)for nested access.