@@ -0,0 +1,49 @@
|
||||
// The catalog module's manifest: a client of the platform's Catalog business service (B-wave contract
|
||||
// §3.14, docs/business-services.md). It keeps no table of its own -- products and their imports are the
|
||||
// service's, in the deployment's organization -- so it has procedures, permissions, pages and messages,
|
||||
// and no repository, migration, job or event.
|
||||
//
|
||||
// The template ships it off: `kit module:on catalog` adds it to the list in modules/index.ts and asks the
|
||||
// deployment token for the service scopes it needs (`catalog.products:read`,
|
||||
// `catalog.imports:read|write`) in conusai.json.
|
||||
|
||||
import { defineModule } from "@conusai-kit/core"
|
||||
import { CATALOG_PROCEDURES } from "./adapters/procedures.js"
|
||||
import { en, lt } from "./i18n/index.js"
|
||||
|
||||
export const catalogModule = defineModule({
|
||||
id: "catalog",
|
||||
// A business module is its service, which this app reaches on these profiles (test/module-profiles.test.ts).
|
||||
profiles: ["postgres", "mariadb", "mongodb"],
|
||||
version: "0.1.0",
|
||||
kit: "^0.1.0",
|
||||
requires: ["tenancy"],
|
||||
permissions: {
|
||||
"catalog.product.read": "viewer",
|
||||
"catalog.product.write": "editor",
|
||||
},
|
||||
procedures: CATALOG_PROCEDURES,
|
||||
serviceRequirements: [
|
||||
{
|
||||
transport: "business",
|
||||
service: "catalog",
|
||||
apiRange: "^1.1.0",
|
||||
profiles: ["postgres", "mariadb", "mongodb"],
|
||||
operations: {
|
||||
"catalog.product.list": ["catalog.products:read"],
|
||||
"catalog.product.search": ["catalog.products:read"],
|
||||
"catalog.product.get": ["catalog.products:read"],
|
||||
"catalog.import.list": ["catalog.imports:read"],
|
||||
"catalog.import.apply": ["catalog.imports:write"],
|
||||
},
|
||||
configuration: [],
|
||||
dependencies: [],
|
||||
dataClasses: ["operational"],
|
||||
partitionRequired: true,
|
||||
remediation: "/docs/business-services.md",
|
||||
},
|
||||
],
|
||||
// `catalog` is the segment the web shell's module mount routes to `catalogPage` (ui/pages.tsx).
|
||||
ui: { nav: [{ scope: "project", label: "catalog.title", href: "catalog", permission: "catalog.product.read" }] },
|
||||
i18n: { en, lt },
|
||||
})
|
||||
Reference in New Issue
Block a user