@things-factory/tax-invoice 10.1.228 → 10.1.232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/entity360/tax-invoice-360.js +1 -0
- package/dist-client/entity360/tax-invoice-360.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/index.js +2 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/service/tax-invoice/tax-invoice-subject.d.ts +9 -0
- package/dist-server/service/tax-invoice/tax-invoice-subject.js +27 -0
- package/dist-server/service/tax-invoice/tax-invoice-subject.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
package/dist-server/index.js
CHANGED
|
@@ -5,6 +5,8 @@ require("./routes");
|
|
|
5
5
|
tslib_1.__exportStar(require("./service"), exports);
|
|
6
6
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
7
7
|
const role_tasks_1 = require("./role-tasks");
|
|
8
|
+
const tax_invoice_subject_1 = require("./service/tax-invoice/tax-invoice-subject");
|
|
8
9
|
for (const task of role_tasks_1.ROLE_TASKS)
|
|
9
10
|
(0, auth_base_1.registerRoleTask)(task);
|
|
11
|
+
(0, tax_invoice_subject_1.registerTaxInvoiceSubject)();
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
package/dist-server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,oBAAiB;AACjB,oDAAyB;AAEzB,yDAA4D;AAC5D,6CAAyC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,oBAAiB;AACjB,oDAAyB;AAEzB,yDAA4D;AAC5D,6CAAyC;AACzC,mFAAqF;AAErF,KAAK,MAAM,IAAI,IAAI,uBAAU;IAAE,IAAA,4BAAgB,EAAC,IAAI,CAAC,CAAA;AACrD,IAAA,+CAAyB,GAAE,CAAA","sourcesContent":["import './routes'\nexport * from './service'\n\nimport { registerRoleTask } from '@things-factory/auth-base'\nimport { ROLE_TASKS } from './role-tasks'\nimport { registerTaxInvoiceSubject } from './service/tax-invoice/tax-invoice-subject'\n\nfor (const task of ROLE_TASKS) registerRoleTask(task)\nregisterTaxInvoiceSubject()\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tax invoice whose 360 is open, named for the AI each turn (operato-application design/ai/screen-pattern.md §2-1).
|
|
3
|
+
*
|
|
4
|
+
* The 360 kind `tax-invoice` anchors its conversation to `tax-invoice:<uuid>`; the record is named only for someone the
|
|
5
|
+
* 360's own read (`Query.taxInvoice`) lets through.
|
|
6
|
+
*/
|
|
7
|
+
import { type RecordSubject } from '@things-factory/ai-assistant';
|
|
8
|
+
export declare const TAX_INVOICE_SUBJECT: RecordSubject;
|
|
9
|
+
export declare function registerTaxInvoiceSubject(): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TAX_INVOICE_SUBJECT = void 0;
|
|
4
|
+
exports.registerTaxInvoiceSubject = registerTaxInvoiceSubject;
|
|
5
|
+
/**
|
|
6
|
+
* The tax invoice whose 360 is open, named for the AI each turn (operato-application design/ai/screen-pattern.md §2-1).
|
|
7
|
+
*
|
|
8
|
+
* The 360 kind `tax-invoice` anchors its conversation to `tax-invoice:<uuid>`; the record is named only for someone the
|
|
9
|
+
* 360's own read (`Query.taxInvoice`) lets through.
|
|
10
|
+
*/
|
|
11
|
+
const ai_assistant_1 = require("@things-factory/ai-assistant");
|
|
12
|
+
const shell_1 = require("@things-factory/shell");
|
|
13
|
+
const tax_invoice_codes_1 = require("./tax-invoice-codes");
|
|
14
|
+
/** The other party as the 360 titles it: the buyer of a sale, the supplier of a purchase. */
|
|
15
|
+
const counterpartOf = (row) => (row.category === tax_invoice_codes_1.Category.EXPORT ? row.buyerBusinessName : row.supplierBusinessName) || '';
|
|
16
|
+
/* By entity name - the entity's decorators stay out of what a test of this has to load. */
|
|
17
|
+
exports.TAX_INVOICE_SUBJECT = {
|
|
18
|
+
axis: 'tax-invoice',
|
|
19
|
+
noun: 'tax invoice',
|
|
20
|
+
door: 'Query.taxInvoice',
|
|
21
|
+
read: (rowId, domainId) => (0, shell_1.getRepository)('TaxInvoice').findOne({ where: { id: rowId, domain: { id: domainId } } }),
|
|
22
|
+
nameOf: row => [row.issueDate, counterpartOf(row) || row.name, row.approvalNo].filter(Boolean).join(' ')
|
|
23
|
+
};
|
|
24
|
+
function registerTaxInvoiceSubject() {
|
|
25
|
+
(0, ai_assistant_1.registerRecordSubject)(exports.TAX_INVOICE_SUBJECT);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=tax-invoice-subject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tax-invoice-subject.js","sourceRoot":"","sources":["../../../server/service/tax-invoice/tax-invoice-subject.ts"],"names":[],"mappings":";;;AAuBA,8DAEC;AAzBD;;;;;GAKG;AACH,+DAAwF;AACxF,iDAAqD;AAErD,2DAA8C;AAE9C,6FAA6F;AAC7F,MAAM,aAAa,GAAG,CAAC,GAAQ,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,KAAK,4BAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAA;AAE/H,2FAA2F;AAC9E,QAAA,mBAAmB,GAAkB;IAChD,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,IAAA,qBAAa,EAAC,YAAY,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAS,EAAE,CAAC;IACzH,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;CACzG,CAAA;AAED,SAAgB,yBAAyB;IACvC,IAAA,oCAAqB,EAAC,2BAAmB,CAAC,CAAA;AAC5C,CAAC","sourcesContent":["/**\n * The tax invoice whose 360 is open, named for the AI each turn (operato-application design/ai/screen-pattern.md §2-1).\n *\n * The 360 kind `tax-invoice` anchors its conversation to `tax-invoice:<uuid>`; the record is named only for someone the\n * 360's own read (`Query.taxInvoice`) lets through.\n */\nimport { registerRecordSubject, type RecordSubject } from '@things-factory/ai-assistant'\nimport { getRepository } from '@things-factory/shell'\n\nimport { Category } from './tax-invoice-codes'\n\n/** The other party as the 360 titles it: the buyer of a sale, the supplier of a purchase. */\nconst counterpartOf = (row: any) => (row.category === Category.EXPORT ? row.buyerBusinessName : row.supplierBusinessName) || ''\n\n/* By entity name - the entity's decorators stay out of what a test of this has to load. */\nexport const TAX_INVOICE_SUBJECT: RecordSubject = {\n axis: 'tax-invoice',\n noun: 'tax invoice',\n door: 'Query.taxInvoice',\n read: (rowId, domainId) => getRepository('TaxInvoice').findOne({ where: { id: rowId, domain: { id: domainId } } as any }),\n nameOf: row => [row.issueDate, counterpartOf(row) || row.name, row.approvalNo].filter(Boolean).join(' ')\n}\n\nexport function registerTaxInvoiceSubject(): void {\n registerRecordSubject(TAX_INVOICE_SUBJECT)\n}\n"]}
|