Files
ng-helpers/src/vocabulary.ts
T

25 lines
1.0 KiB
TypeScript

/**
* The IRIs an index document is written with — published because a reader needs
* them to make sense of one.
*
* `urn:ng-eventually:` is RESERVED by the polyfill — triples whose subject falls
* under it are dropped on read. This layer stays out of it entirely and uses its
* own `urn:ng-helpers:` namespace, for PREDICATES only. Subjects in an index
* document are always `did:ng:` NURIs, so nothing here is ever filtered away.
*/
/**
* On the index document's own subject: the predicate an indexed object must
* carry, declared once by whoever creates the index. `create` writes it.
*/
export const INDEX_FIELD = "urn:ng-helpers:index:field";
/**
* On an entry (subject = the indexed object's NURI): the value of that field.
*
* This package never writes one — an entry is made by the layer that processes the
* index's inbox. It is published because reading an index means recognising this
* predicate on the subjects that come back.
*/
export const ENTRY_VALUE = "urn:ng-helpers:index:value";