Files
template-app/modules/branding/module.ts
T

25 lines
938 B
TypeScript

// The branding module's manifest (plan item AT2.6). It owns no table: the brand is a column of the
// tenancy module's `organizations`, written through that module's entity.
import { defineModule } from "@conusai-kit/core"
import { BRANDING_PROCEDURES } from "./adapters/procedures.js"
import { BRAND_CHANGED } from "./contract/index.js"
import { en, lt } from "./i18n/index.js"
export const brandingModule = defineModule({
id: "branding",
version: "0.1.0",
kit: "^0.1.0",
requires: ["tenancy"],
permissions: {
// Every member sees the brand: it is what the product looks like to them.
"branding.brand.read": "viewer",
// Changing it changes the product for every member, so it is an administrator's act.
"branding.brand.write": "admin",
},
procedures: BRANDING_PROCEDURES,
audit: [BRAND_CHANGED],
// Both languages, as objects: kit-i18n merges them from the registry (AT-D23).
i18n: { en, lt },
})