@@ -0,0 +1,51 @@
|
||||
// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0
|
||||
import { defineModule } from "@conusai-kit/core"
|
||||
import { INVOICING_PROCEDURES } from "./adapters/procedures.js"
|
||||
import { en, lt } from "./i18n/index.js"
|
||||
export const invoicingModule = defineModule({
|
||||
id: "invoicing",
|
||||
// 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: {
|
||||
"invoicing.invoice.read": "viewer",
|
||||
"invoicing.series.read": "viewer",
|
||||
"invoicing.invoice.write": "editor",
|
||||
"invoicing.invoice.issue": "admin",
|
||||
"invoicing.invoice.credit": "admin",
|
||||
"invoicing.invoice.void": "admin",
|
||||
"invoicing.series.manage": "admin",
|
||||
},
|
||||
procedures: INVOICING_PROCEDURES,
|
||||
serviceRequirements: [
|
||||
{
|
||||
transport: "business",
|
||||
service: "invoicing",
|
||||
apiRange: "^1.1.0",
|
||||
profiles: ["postgres", "mariadb", "mongodb"],
|
||||
operations: {
|
||||
"invoicing.invoice.list": ["invoicing.invoices:read"],
|
||||
"invoicing.invoice.get": ["invoicing.invoices:read"],
|
||||
"invoicing.invoice.ubl": ["invoicing.invoices:read"],
|
||||
"invoicing.series.list": ["invoicing.series:read"],
|
||||
"invoicing.invoice.draft": ["invoicing.invoices:write"],
|
||||
"invoicing.invoice.update": ["invoicing.invoices:read", "invoicing.invoices:write"],
|
||||
"invoicing.invoice.issue": ["invoicing.invoices:issue"],
|
||||
"invoicing.invoice.credit": ["invoicing.invoices:write"],
|
||||
"invoicing.invoice.void": ["invoicing.invoices:void"],
|
||||
"invoicing.series.create": ["invoicing.series:write"],
|
||||
},
|
||||
configuration: [],
|
||||
dependencies: [],
|
||||
dataClasses: ["personal", "financial"],
|
||||
partitionRequired: true,
|
||||
remediation: "/docs/business-services.md",
|
||||
},
|
||||
],
|
||||
ui: {
|
||||
nav: [{ scope: "project", label: "invoicing.title", href: "invoicing", permission: "invoicing.invoice.read" }],
|
||||
},
|
||||
i18n: { en, lt },
|
||||
})
|
||||
Reference in New Issue
Block a user