ores.ts.convention-registry.registry_module
Table of Contents
Every convention family the conventions document carries, as a TypeScript constant: the family key, the entity model that serves it, the protocol subject stem, whether the family's table is party-scoped, and how the document writes it. The rows and their order are those of the C++ registry header, because both come from one derivation.
The module lives beside the generated domain interfaces and is committed, as they are, so a regeneration cannot delete a file the web layer imports. It names no C++ type. The field names are camelCase, because the module is not a wire shape.
The output path is literal because the facet renders from a component model.
See the Template variable reference for the complete list of available variables and their semantics.
1. Template
The full template source. Edit here and re-tangle with
compass build --direct tangle_codegen_templates to regenerate
library/templates/ts_convention_family_registry.ts.mustache.
{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/ores.ts.convention-registry.registry_module.org. Edit the org source. }}
{{{ts_license}}}
{{#convention_registry}}
export type ConventionWriteMode = 'party' | 'by_id' | 'world';
/**
* One convention family the conventions document carries.
*
* key is the family's field name in the document, entity is the entity model
* that serves it, subjectStem is the protocol prefix every verb of that entity
* shares, partyScoped is true when the family's table carries a party_id
* column, and writeMode is how the document writes the family.
*/
export interface ConventionFamilyEntry {
readonly key: string;
readonly entity: string;
readonly subjectStem: string;
readonly partyScoped: boolean;
readonly writeMode: ConventionWriteMode;
}
/** Every convention family, ordered by family key. */
export const CONVENTION_FAMILY_ENTRIES: readonly ConventionFamilyEntry[] = [
{{#families}}
{
key: '{{key}}',
entity: '{{entity}}',
subjectStem: '{{subject_stem}}',
partyScoped: {{#party_scoped}}true{{/party_scoped}}{{^party_scoped}}false{{/party_scoped}},
writeMode: '{{write_mode}}',
},
{{/families}}
];
{{/convention_registry}}
2. See also
- Parent facet: ores.ts.convention-registry
- Template variable reference