@things-factory/accounting 10.1.193 → 10.1.202

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.
@@ -8,4 +8,8 @@ tslib_1.__exportStar(require("./activities"), exports);
8
8
  require("./routes");
9
9
  /* Who opens a receipt by its path - the requester, the approvers, finance (ADR-0139). */
10
10
  require("./service/expenditure-request/receipt-reader");
11
+ const auth_base_1 = require("@things-factory/auth-base");
12
+ const role_tasks_1 = require("./role-tasks");
13
+ for (const task of role_tasks_1.ROLE_TASKS)
14
+ (0, auth_base_1.registerRoleTask)(task);
11
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,wDAA6B;AAC7B,oDAAyB;AACzB,uDAA4B;AAE5B,oBAAiB;AACjB,yFAAyF;AACzF,wDAAqD","sourcesContent":["export * from './migrations'\nexport * from './middlewares'\nexport * from './service'\nexport * from './activities'\n\nimport './routes'\n/* Who opens a receipt by its path - the requester, the approvers, finance (ADR-0139). */\nimport './service/expenditure-request/receipt-reader'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,wDAA6B;AAC7B,oDAAyB;AACzB,uDAA4B;AAE5B,oBAAiB;AACjB,yFAAyF;AACzF,wDAAqD;AAErD,yDAA4D;AAC5D,6CAAyC;AAEzC,KAAK,MAAM,IAAI,IAAI,uBAAU;IAAE,IAAA,4BAAgB,EAAC,IAAI,CAAC,CAAA","sourcesContent":["export * from './migrations'\nexport * from './middlewares'\nexport * from './service'\nexport * from './activities'\n\nimport './routes'\n/* Who opens a receipt by its path - the requester, the approvers, finance (ADR-0139). */\nimport './service/expenditure-request/receipt-reader'\n\nimport { registerRoleTask } from '@things-factory/auth-base'\nimport { ROLE_TASKS } from './role-tasks'\n\nfor (const task of ROLE_TASKS) registerRoleTask(task)\n"]}
@@ -0,0 +1,2 @@
1
+ import type { RoleTask } from '@things-factory/auth-base';
2
+ export declare const ROLE_TASKS: RoleTask[];
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * The work this module names, for the seats applications build (ADR-0139 decision 11).
4
+ *
5
+ * A task holds whole privileges: each opens everything its doors open, and the words under `task.<id>` in this
6
+ * module's translations say what that is. Seats are put together by applications (`RoleTemplate.tasks`).
7
+ *
8
+ * Data only - `server/index.ts` registers it - so an application's tests read it without starting the framework.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.ROLE_TASKS = void 0;
12
+ exports.ROLE_TASKS = [
13
+ { id: 'accounting.expense-authoring', grants: [{ category: 'accounting-self', axes: ['query', 'mutation'] }, { category: 'accounting-published', axes: ['query'] }, { category: 'counterparty-published', axes: ['query'] }] },
14
+ { id: 'accounting.books-reading', grants: [{ category: 'accounting', axes: ['query'] }] },
15
+ { id: 'accounting.books-keeping', grants: [{ category: 'accounting', axes: ['query', 'mutation'] }] },
16
+ { id: 'accounting.expenditure-paying', grants: [{ category: 'expenditure', axes: ['query', 'mutation'] }] },
17
+ { id: 'accounting.bank', grants: [{ category: 'bank', axes: ['query', 'mutation'] }] },
18
+ { id: 'accounting.master-keeping', grants: [{ category: 'accounting-master', axes: ['query', 'mutation'] }] }
19
+ ];
20
+ //# sourceMappingURL=role-tasks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"role-tasks.js","sourceRoot":"","sources":["../server/role-tasks.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAIU,QAAA,UAAU,GAAe;IACpC,EAAE,EAAE,EAAE,8BAA8B,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,sBAAsB,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,wBAAwB,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;IAC9N,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;IACzF,EAAE,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE;IACrG,EAAE,EAAE,EAAE,+BAA+B,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE;IAC3G,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE;IACtF,EAAE,EAAE,EAAE,2BAA2B,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE;CAC9G,CAAA","sourcesContent":["/*\n * The work this module names, for the seats applications build (ADR-0139 decision 11).\n *\n * A task holds whole privileges: each opens everything its doors open, and the words under `task.<id>` in this\n * module's translations say what that is. Seats are put together by applications (`RoleTemplate.tasks`).\n *\n * Data only - `server/index.ts` registers it - so an application's tests read it without starting the framework.\n */\n\nimport type { RoleTask } from '@things-factory/auth-base'\n\nexport const ROLE_TASKS: RoleTask[] = [\n { id: 'accounting.expense-authoring', grants: [{ category: 'accounting-self', axes: ['query', 'mutation'] }, { category: 'accounting-published', axes: ['query'] }, { category: 'counterparty-published', axes: ['query'] }] },\n { id: 'accounting.books-reading', grants: [{ category: 'accounting', axes: ['query'] }] },\n { id: 'accounting.books-keeping', grants: [{ category: 'accounting', axes: ['query', 'mutation'] }] },\n { id: 'accounting.expenditure-paying', grants: [{ category: 'expenditure', axes: ['query', 'mutation'] }] },\n { id: 'accounting.bank', grants: [{ category: 'bank', axes: ['query', 'mutation'] }] },\n { id: 'accounting.master-keeping', grants: [{ category: 'accounting-master', axes: ['query', 'mutation'] }] }\n]\n"]}