@taxdao/fintax-mcp 0.2.0
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/README.md +220 -0
- package/dist/app/create-server.d.ts +18 -0
- package/dist/app/create-server.js +80 -0
- package/dist/app/create-server.js.map +1 -0
- package/dist/app/register-tools.d.ts +4 -0
- package/dist/app/register-tools.js +18 -0
- package/dist/app/register-tools.js.map +1 -0
- package/dist/audit/audit-context.d.ts +38 -0
- package/dist/audit/audit-context.js +167 -0
- package/dist/audit/audit-context.js.map +1 -0
- package/dist/audit/audit-sink.d.ts +20 -0
- package/dist/audit/audit-sink.js +6 -0
- package/dist/audit/audit-sink.js.map +1 -0
- package/dist/audit/file-audit-sink.d.ts +6 -0
- package/dist/audit/file-audit-sink.js +18 -0
- package/dist/audit/file-audit-sink.js.map +1 -0
- package/dist/auth/auth-session.d.ts +63 -0
- package/dist/auth/auth-session.js +226 -0
- package/dist/auth/auth-session.js.map +1 -0
- package/dist/auth/credentials.d.ts +6 -0
- package/dist/auth/credentials.js +12 -0
- package/dist/auth/credentials.js.map +1 -0
- package/dist/auth/org-token-provider.d.ts +15 -0
- package/dist/auth/org-token-provider.js +62 -0
- package/dist/auth/org-token-provider.js.map +1 -0
- package/dist/capabilities/capability.d.ts +100 -0
- package/dist/capabilities/capability.js +26 -0
- package/dist/capabilities/capability.js.map +1 -0
- package/dist/capabilities/create-capabilities.d.ts +2 -0
- package/dist/capabilities/create-capabilities.js +37 -0
- package/dist/capabilities/create-capabilities.js.map +1 -0
- package/dist/capabilities/define-capability.d.ts +39 -0
- package/dist/capabilities/define-capability.js +64 -0
- package/dist/capabilities/define-capability.js.map +1 -0
- package/dist/capabilities/definitions/accounting-balances.d.ts +4 -0
- package/dist/capabilities/definitions/accounting-balances.js +98 -0
- package/dist/capabilities/definitions/accounting-balances.js.map +1 -0
- package/dist/capabilities/definitions/accounting-context.d.ts +2 -0
- package/dist/capabilities/definitions/accounting-context.js +17 -0
- package/dist/capabilities/definitions/accounting-context.js.map +1 -0
- package/dist/capabilities/definitions/assets.d.ts +2 -0
- package/dist/capabilities/definitions/assets.js +367 -0
- package/dist/capabilities/definitions/assets.js.map +1 -0
- package/dist/capabilities/definitions/business-documents.d.ts +9 -0
- package/dist/capabilities/definitions/business-documents.js +386 -0
- package/dist/capabilities/definitions/business-documents.js.map +1 -0
- package/dist/capabilities/definitions/dashboard.d.ts +2 -0
- package/dist/capabilities/definitions/dashboard.js +153 -0
- package/dist/capabilities/definitions/dashboard.js.map +1 -0
- package/dist/capabilities/definitions/extended-operation-contracts.d.ts +597 -0
- package/dist/capabilities/definitions/extended-operation-contracts.js +1180 -0
- package/dist/capabilities/definitions/extended-operation-contracts.js.map +1 -0
- package/dist/capabilities/definitions/extended-operations.d.ts +2 -0
- package/dist/capabilities/definitions/extended-operations.js +699 -0
- package/dist/capabilities/definitions/extended-operations.js.map +1 -0
- package/dist/capabilities/definitions/financial-reports.d.ts +2 -0
- package/dist/capabilities/definitions/financial-reports.js +100 -0
- package/dist/capabilities/definitions/financial-reports.js.map +1 -0
- package/dist/capabilities/definitions/fnd-import.d.ts +34 -0
- package/dist/capabilities/definitions/fnd-import.js +282 -0
- package/dist/capabilities/definitions/fnd-import.js.map +1 -0
- package/dist/capabilities/definitions/fund-accounts.d.ts +2 -0
- package/dist/capabilities/definitions/fund-accounts.js +188 -0
- package/dist/capabilities/definitions/fund-accounts.js.map +1 -0
- package/dist/capabilities/definitions/fund-balances.d.ts +2 -0
- package/dist/capabilities/definitions/fund-balances.js +84 -0
- package/dist/capabilities/definitions/fund-balances.js.map +1 -0
- package/dist/capabilities/definitions/journals.d.ts +10 -0
- package/dist/capabilities/definitions/journals.js +224 -0
- package/dist/capabilities/definitions/journals.js.map +1 -0
- package/dist/capabilities/definitions/master-data.d.ts +2 -0
- package/dist/capabilities/definitions/master-data.js +451 -0
- package/dist/capabilities/definitions/master-data.js.map +1 -0
- package/dist/capabilities/definitions/pnl.d.ts +2 -0
- package/dist/capabilities/definitions/pnl.js +139 -0
- package/dist/capabilities/definitions/pnl.js.map +1 -0
- package/dist/capabilities/definitions/reference-data.d.ts +2 -0
- package/dist/capabilities/definitions/reference-data.js +169 -0
- package/dist/capabilities/definitions/reference-data.js.map +1 -0
- package/dist/capabilities/definitions/transaction-drafts.d.ts +2 -0
- package/dist/capabilities/definitions/transaction-drafts.js +157 -0
- package/dist/capabilities/definitions/transaction-drafts.js.map +1 -0
- package/dist/capabilities/definitions/transactions.d.ts +168 -0
- package/dist/capabilities/definitions/transactions.js +79 -0
- package/dist/capabilities/definitions/transactions.js.map +1 -0
- package/dist/capabilities/executor.d.ts +19 -0
- package/dist/capabilities/executor.js +134 -0
- package/dist/capabilities/executor.js.map +1 -0
- package/dist/capabilities/registry.d.ts +7 -0
- package/dist/capabilities/registry.js +51 -0
- package/dist/capabilities/registry.js.map +1 -0
- package/dist/clients/base-client.d.ts +5 -0
- package/dist/clients/base-client.js +13 -0
- package/dist/clients/base-client.js.map +1 -0
- package/dist/clients/http-client.d.ts +29 -0
- package/dist/clients/http-client.js +167 -0
- package/dist/clients/http-client.js.map +1 -0
- package/dist/clients/suite-client.d.ts +5 -0
- package/dist/clients/suite-client.js +5 -0
- package/dist/clients/suite-client.js.map +1 -0
- package/dist/concurrency/lock-manager.d.ts +4 -0
- package/dist/concurrency/lock-manager.js +23 -0
- package/dist/concurrency/lock-manager.js.map +1 -0
- package/dist/config/load-config.d.ts +2 -0
- package/dist/config/load-config.js +18 -0
- package/dist/config/load-config.js.map +1 -0
- package/dist/config/schema.d.ts +24 -0
- package/dist/config/schema.js +85 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/errors/fintax-error.d.ts +24 -0
- package/dist/errors/fintax-error.js +21 -0
- package/dist/errors/fintax-error.js.map +1 -0
- package/dist/errors/normalize-error.d.ts +3 -0
- package/dist/errors/normalize-error.js +67 -0
- package/dist/errors/normalize-error.js.map +1 -0
- package/dist/files/artifact-store.d.ts +17 -0
- package/dist/files/artifact-store.js +74 -0
- package/dist/files/artifact-store.js.map +1 -0
- package/dist/files/input-policy.d.ts +28 -0
- package/dist/files/input-policy.js +109 -0
- package/dist/files/input-policy.js.map +1 -0
- package/dist/files/roots-provider.d.ts +14 -0
- package/dist/files/roots-provider.js +47 -0
- package/dist/files/roots-provider.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/logger.d.ts +3 -0
- package/dist/logging/logger.js +13 -0
- package/dist/logging/logger.js.map +1 -0
- package/dist/policies/idempotency.d.ts +32 -0
- package/dist/policies/idempotency.js +155 -0
- package/dist/policies/idempotency.js.map +1 -0
- package/dist/policies/job-reference.d.ts +16 -0
- package/dist/policies/job-reference.js +62 -0
- package/dist/policies/job-reference.js.map +1 -0
- package/dist/policies/operation-plan.d.ts +27 -0
- package/dist/policies/operation-plan.js +99 -0
- package/dist/policies/operation-plan.js.map +1 -0
- package/dist/policies/redaction.d.ts +2 -0
- package/dist/policies/redaction.js +29 -0
- package/dist/policies/redaction.js.map +1 -0
- package/dist/policies/retry.d.ts +8 -0
- package/dist/policies/retry.js +19 -0
- package/dist/policies/retry.js.map +1 -0
- package/dist/responses/tool-response.d.ts +4 -0
- package/dist/responses/tool-response.js +24 -0
- package/dist/responses/tool-response.js.map +1 -0
- package/dist/schemas/common.d.ts +226 -0
- package/dist/schemas/common.js +133 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/domains/accounting-balances.d.ts +497 -0
- package/dist/schemas/domains/accounting-balances.js +226 -0
- package/dist/schemas/domains/accounting-balances.js.map +1 -0
- package/dist/schemas/domains/accounting-context.d.ts +118 -0
- package/dist/schemas/domains/accounting-context.js +54 -0
- package/dist/schemas/domains/accounting-context.js.map +1 -0
- package/dist/schemas/domains/assets.d.ts +2508 -0
- package/dist/schemas/domains/assets.js +960 -0
- package/dist/schemas/domains/assets.js.map +1 -0
- package/dist/schemas/domains/business-documents.d.ts +4406 -0
- package/dist/schemas/domains/business-documents.js +1153 -0
- package/dist/schemas/domains/business-documents.js.map +1 -0
- package/dist/schemas/domains/configuration.d.ts +518 -0
- package/dist/schemas/domains/configuration.js +504 -0
- package/dist/schemas/domains/configuration.js.map +1 -0
- package/dist/schemas/domains/dashboard.d.ts +339 -0
- package/dist/schemas/domains/dashboard.js +211 -0
- package/dist/schemas/domains/dashboard.js.map +1 -0
- package/dist/schemas/domains/extended-operation-results.d.ts +1588 -0
- package/dist/schemas/domains/extended-operation-results.js +275 -0
- package/dist/schemas/domains/extended-operation-results.js.map +1 -0
- package/dist/schemas/domains/extended-operations.d.ts +1061 -0
- package/dist/schemas/domains/extended-operations.js +567 -0
- package/dist/schemas/domains/extended-operations.js.map +1 -0
- package/dist/schemas/domains/extended-query-results.d.ts +1688 -0
- package/dist/schemas/domains/extended-query-results.js +337 -0
- package/dist/schemas/domains/extended-query-results.js.map +1 -0
- package/dist/schemas/domains/financial-reports.d.ts +540 -0
- package/dist/schemas/domains/financial-reports.js +206 -0
- package/dist/schemas/domains/financial-reports.js.map +1 -0
- package/dist/schemas/domains/fnd-import.d.ts +912 -0
- package/dist/schemas/domains/fnd-import.js +396 -0
- package/dist/schemas/domains/fnd-import.js.map +1 -0
- package/dist/schemas/domains/fund-accounts.d.ts +1092 -0
- package/dist/schemas/domains/fund-accounts.js +410 -0
- package/dist/schemas/domains/fund-accounts.js.map +1 -0
- package/dist/schemas/domains/fund-balances.d.ts +476 -0
- package/dist/schemas/domains/fund-balances.js +233 -0
- package/dist/schemas/domains/fund-balances.js.map +1 -0
- package/dist/schemas/domains/journals.d.ts +1619 -0
- package/dist/schemas/domains/journals.js +615 -0
- package/dist/schemas/domains/journals.js.map +1 -0
- package/dist/schemas/domains/master-data.d.ts +2010 -0
- package/dist/schemas/domains/master-data.js +799 -0
- package/dist/schemas/domains/master-data.js.map +1 -0
- package/dist/schemas/domains/pnl.d.ts +837 -0
- package/dist/schemas/domains/pnl.js +469 -0
- package/dist/schemas/domains/pnl.js.map +1 -0
- package/dist/schemas/domains/reference-data.d.ts +227 -0
- package/dist/schemas/domains/reference-data.js +144 -0
- package/dist/schemas/domains/reference-data.js.map +1 -0
- package/dist/schemas/domains/transaction-drafts.d.ts +903 -0
- package/dist/schemas/domains/transaction-drafts.js +242 -0
- package/dist/schemas/domains/transaction-drafts.js.map +1 -0
- package/dist/schemas/domains/transactions.d.ts +910 -0
- package/dist/schemas/domains/transactions.js +266 -0
- package/dist/schemas/domains/transactions.js.map +1 -0
- package/dist/schemas/primitives.d.ts +6 -0
- package/dist/schemas/primitives.js +11 -0
- package/dist/schemas/primitives.js.map +1 -0
- package/dist/schemas/public-input.d.ts +3 -0
- package/dist/schemas/public-input.js +524 -0
- package/dist/schemas/public-input.js.map +1 -0
- package/dist/tools/core-edit/idempotent-write.d.ts +23 -0
- package/dist/tools/core-edit/idempotent-write.js +58 -0
- package/dist/tools/core-edit/idempotent-write.js.map +1 -0
- package/dist/tools/core-edit/save-asset.d.ts +5 -0
- package/dist/tools/core-edit/save-asset.js +334 -0
- package/dist/tools/core-edit/save-asset.js.map +1 -0
- package/dist/tools/core-edit/save-business-document-draft.d.ts +2 -0
- package/dist/tools/core-edit/save-business-document-draft.js +128 -0
- package/dist/tools/core-edit/save-business-document-draft.js.map +1 -0
- package/dist/tools/core-edit/save-fund-account.d.ts +2 -0
- package/dist/tools/core-edit/save-fund-account.js +138 -0
- package/dist/tools/core-edit/save-fund-account.js.map +1 -0
- package/dist/tools/core-edit/save-journal-draft.d.ts +2 -0
- package/dist/tools/core-edit/save-journal-draft.js +122 -0
- package/dist/tools/core-edit/save-journal-draft.js.map +1 -0
- package/dist/tools/core-edit/save-master-data.d.ts +2 -0
- package/dist/tools/core-edit/save-master-data.js +153 -0
- package/dist/tools/core-edit/save-master-data.js.map +1 -0
- package/dist/tools/core-edit/save-transaction-draft.d.ts +2 -0
- package/dist/tools/core-edit/save-transaction-draft.js +128 -0
- package/dist/tools/core-edit/save-transaction-draft.js.map +1 -0
- package/dist/tools/core-read/export-business-documents.d.ts +2 -0
- package/dist/tools/core-read/export-business-documents.js +67 -0
- package/dist/tools/core-read/export-business-documents.js.map +1 -0
- package/dist/tools/core-read/export-journals.d.ts +2 -0
- package/dist/tools/core-read/export-journals.js +56 -0
- package/dist/tools/core-read/export-journals.js.map +1 -0
- package/dist/tools/core-read/export-transactions.d.ts +2 -0
- package/dist/tools/core-read/export-transactions.js +67 -0
- package/dist/tools/core-read/export-transactions.js.map +1 -0
- package/dist/tools/core-read/query-accounting-balances.d.ts +2 -0
- package/dist/tools/core-read/query-accounting-balances.js +135 -0
- package/dist/tools/core-read/query-accounting-balances.js.map +1 -0
- package/dist/tools/core-read/query-accounting-context.d.ts +2 -0
- package/dist/tools/core-read/query-accounting-context.js +76 -0
- package/dist/tools/core-read/query-accounting-context.js.map +1 -0
- package/dist/tools/core-read/query-assets.d.ts +2 -0
- package/dist/tools/core-read/query-assets.js +425 -0
- package/dist/tools/core-read/query-assets.js.map +1 -0
- package/dist/tools/core-read/query-business-documents.d.ts +9 -0
- package/dist/tools/core-read/query-business-documents.js +620 -0
- package/dist/tools/core-read/query-business-documents.js.map +1 -0
- package/dist/tools/core-read/query-dashboard.d.ts +2 -0
- package/dist/tools/core-read/query-dashboard.js +144 -0
- package/dist/tools/core-read/query-dashboard.js.map +1 -0
- package/dist/tools/core-read/query-financial-reports.d.ts +2 -0
- package/dist/tools/core-read/query-financial-reports.js +171 -0
- package/dist/tools/core-read/query-financial-reports.js.map +1 -0
- package/dist/tools/core-read/query-fund-accounts.d.ts +2 -0
- package/dist/tools/core-read/query-fund-accounts.js +140 -0
- package/dist/tools/core-read/query-fund-accounts.js.map +1 -0
- package/dist/tools/core-read/query-fund-balances.d.ts +2 -0
- package/dist/tools/core-read/query-fund-balances.js +150 -0
- package/dist/tools/core-read/query-fund-balances.js.map +1 -0
- package/dist/tools/core-read/query-journals.d.ts +2 -0
- package/dist/tools/core-read/query-journals.js +277 -0
- package/dist/tools/core-read/query-journals.js.map +1 -0
- package/dist/tools/core-read/query-master-data.d.ts +2 -0
- package/dist/tools/core-read/query-master-data.js +363 -0
- package/dist/tools/core-read/query-master-data.js.map +1 -0
- package/dist/tools/core-read/query-pnl.d.ts +2 -0
- package/dist/tools/core-read/query-pnl.js +244 -0
- package/dist/tools/core-read/query-pnl.js.map +1 -0
- package/dist/tools/core-read/query-reference-data.d.ts +2 -0
- package/dist/tools/core-read/query-reference-data.js +293 -0
- package/dist/tools/core-read/query-reference-data.js.map +1 -0
- package/dist/tools/core-read/query-transactions.d.ts +2 -0
- package/dist/tools/core-read/query-transactions.js +58 -0
- package/dist/tools/core-read/query-transactions.js.map +1 -0
- package/dist/tools/create-tools.d.ts +3 -0
- package/dist/tools/create-tools.js +88 -0
- package/dist/tools/create-tools.js.map +1 -0
- package/dist/tools/extended/asset-operation-tools.d.ts +9 -0
- package/dist/tools/extended/asset-operation-tools.js +419 -0
- package/dist/tools/extended/asset-operation-tools.js.map +1 -0
- package/dist/tools/extended/automation-tools.d.ts +7 -0
- package/dist/tools/extended/automation-tools.js +333 -0
- package/dist/tools/extended/automation-tools.js.map +1 -0
- package/dist/tools/extended/configuration-tools.d.ts +14 -0
- package/dist/tools/extended/configuration-tools.js +871 -0
- package/dist/tools/extended/configuration-tools.js.map +1 -0
- package/dist/tools/extended/period-end-tools.d.ts +11 -0
- package/dist/tools/extended/period-end-tools.js +480 -0
- package/dist/tools/extended/period-end-tools.js.map +1 -0
- package/dist/tools/extended/query-output.d.ts +2589 -0
- package/dist/tools/extended/query-output.js +610 -0
- package/dist/tools/extended/query-output.js.map +1 -0
- package/dist/tools/extended/tool-support.d.ts +56 -0
- package/dist/tools/extended/tool-support.js +198 -0
- package/dist/tools/extended/tool-support.js.map +1 -0
- package/dist/tools/extended/workflow-tools.d.ts +10 -0
- package/dist/tools/extended/workflow-tools.js +678 -0
- package/dist/tools/extended/workflow-tools.js.map +1 -0
- package/dist/tools/fnd-import/execute-import.d.ts +2 -0
- package/dist/tools/fnd-import/execute-import.js +201 -0
- package/dist/tools/fnd-import/execute-import.js.map +1 -0
- package/dist/tools/fnd-import/get-import-template.d.ts +2 -0
- package/dist/tools/fnd-import/get-import-template.js +66 -0
- package/dist/tools/fnd-import/get-import-template.js.map +1 -0
- package/dist/tools/fnd-import/get-job-status.d.ts +8 -0
- package/dist/tools/fnd-import/get-job-status.js +201 -0
- package/dist/tools/fnd-import/get-job-status.js.map +1 -0
- package/dist/tools/fnd-import/prepare-import.d.ts +31 -0
- package/dist/tools/fnd-import/prepare-import.js +214 -0
- package/dist/tools/fnd-import/prepare-import.js.map +1 -0
- package/dist/tools/fnd-import/public-import-result.d.ts +18 -0
- package/dist/tools/fnd-import/public-import-result.js +35 -0
- package/dist/tools/fnd-import/public-import-result.js.map +1 -0
- package/dist/tools/tool-definition.d.ts +45 -0
- package/dist/tools/tool-definition.js +11 -0
- package/dist/tools/tool-definition.js.map +1 -0
- package/dist/tools/tool-handler.d.ts +27 -0
- package/dist/tools/tool-handler.js +196 -0
- package/dist/tools/tool-handler.js.map +1 -0
- package/dist/tools/transaction-item.d.ts +225 -0
- package/dist/tools/transaction-item.js +109 -0
- package/dist/tools/transaction-item.js.map +1 -0
- package/dist/transport/draining-transport.d.ts +14 -0
- package/dist/transport/draining-transport.js +36 -0
- package/dist/transport/draining-transport.js.map +1 -0
- package/dist/transport/stdio.d.ts +2 -0
- package/dist/transport/stdio.js +5 -0
- package/dist/transport/stdio.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
import { defineSuiteReadCapability, defineSuiteWriteCapability, } from '../define-capability.js';
|
|
2
|
+
import { getExtendedOperationContract } from './extended-operation-contracts.js';
|
|
3
|
+
function read(spec) {
|
|
4
|
+
const contract = getExtendedOperationContract(spec.id);
|
|
5
|
+
return defineSuiteReadCapability({
|
|
6
|
+
capabilityId: spec.id,
|
|
7
|
+
module: spec.module,
|
|
8
|
+
object: spec.object,
|
|
9
|
+
operation: spec.operation,
|
|
10
|
+
path: spec.path,
|
|
11
|
+
permissionAny: spec.permissions,
|
|
12
|
+
exposurePack: spec.pack,
|
|
13
|
+
requestSchema: contract.request,
|
|
14
|
+
responseSchema: contract.response,
|
|
15
|
+
requestAdapter: (input) => spec.adapt(input),
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function write(spec) {
|
|
19
|
+
const contract = getExtendedOperationContract(spec.id);
|
|
20
|
+
return defineSuiteWriteCapability({
|
|
21
|
+
capabilityId: spec.id,
|
|
22
|
+
module: spec.module,
|
|
23
|
+
object: spec.object,
|
|
24
|
+
operation: spec.operation,
|
|
25
|
+
method: spec.method ?? 'POST',
|
|
26
|
+
path: spec.path,
|
|
27
|
+
permissionAny: spec.permissions,
|
|
28
|
+
exposurePack: spec.pack,
|
|
29
|
+
risk: spec.risk ?? 'R2',
|
|
30
|
+
sideEffect: spec.sideEffect ?? 'state_change',
|
|
31
|
+
idempotency: spec.idempotency ?? 'upstream-state',
|
|
32
|
+
requestSchema: contract.request,
|
|
33
|
+
responseSchema: contract.response,
|
|
34
|
+
requestAdapter: (input) => spec.adapt(input),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function path(key, parameter) {
|
|
38
|
+
return (input) => ({
|
|
39
|
+
pathParams: { [parameter]: String(input[key]) },
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function bodyPath(key, parameter, body = (input) => input.body) {
|
|
43
|
+
return (input) => ({
|
|
44
|
+
pathParams: { [parameter]: String(input[key]) },
|
|
45
|
+
body: body(input),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
const workflowCapabilities = [
|
|
49
|
+
write({
|
|
50
|
+
id: 'suite.acct.journal.verify_submit',
|
|
51
|
+
module: 'ACCT',
|
|
52
|
+
object: 'journal',
|
|
53
|
+
operation: 'verifyAndSubmit',
|
|
54
|
+
path: '/api/v1/accounting/journals/{id}/verify-and-submit',
|
|
55
|
+
permissions: ['accounting:journal:submit-approval'],
|
|
56
|
+
pack: 'workflow',
|
|
57
|
+
adapt: bodyPath('journal_id', 'id', (input) => ({
|
|
58
|
+
version: input.version,
|
|
59
|
+
})),
|
|
60
|
+
}),
|
|
61
|
+
write({
|
|
62
|
+
id: 'suite.acct.journal.batch_submit',
|
|
63
|
+
module: 'ACCT',
|
|
64
|
+
object: 'journal',
|
|
65
|
+
operation: 'submitApprovalBatch',
|
|
66
|
+
path: '/api/v1/accounting/journals/submit-approval:batch',
|
|
67
|
+
permissions: ['accounting:journal:submit-approval'],
|
|
68
|
+
pack: 'workflow',
|
|
69
|
+
adapt: (input) => ({ body: { journal_ids: input.journal_ids } }),
|
|
70
|
+
}),
|
|
71
|
+
...['ap', 'ar'].flatMap((documentType) => {
|
|
72
|
+
const payable = documentType === 'ap';
|
|
73
|
+
const root = payable ? '/api/v1/ap/payable' : '/api/v1/ar/receivable';
|
|
74
|
+
const object = payable ? 'payable' : 'receivable';
|
|
75
|
+
const permission = payable ? 'ap:payable' : 'ar:receivable';
|
|
76
|
+
const idParameter = payable ? 'apHId' : 'arHId';
|
|
77
|
+
const idBodyKey = payable ? 'ap_h_ids' : 'ar_h_ids';
|
|
78
|
+
return [
|
|
79
|
+
write({
|
|
80
|
+
id: `suite.${documentType}.${object}.verify_submit`,
|
|
81
|
+
module: documentType.toUpperCase(),
|
|
82
|
+
object,
|
|
83
|
+
operation: 'verifyAndSubmit',
|
|
84
|
+
path: `${root}/{id}/verify-and-submit`,
|
|
85
|
+
permissions: [`${permission}:submit-approval`],
|
|
86
|
+
pack: 'workflow',
|
|
87
|
+
adapt: bodyPath('document_id', 'id', (input) => ({
|
|
88
|
+
version: input.version,
|
|
89
|
+
})),
|
|
90
|
+
}),
|
|
91
|
+
write({
|
|
92
|
+
id: `suite.${documentType}.${object}.post`,
|
|
93
|
+
module: documentType.toUpperCase(),
|
|
94
|
+
object,
|
|
95
|
+
operation: 'post',
|
|
96
|
+
path: `${root}/post`,
|
|
97
|
+
permissions: [`${permission}:post`],
|
|
98
|
+
pack: 'workflow',
|
|
99
|
+
risk: 'R3',
|
|
100
|
+
adapt: (input) => ({ body: { [idBodyKey]: [input.document_id] } }),
|
|
101
|
+
}),
|
|
102
|
+
read({
|
|
103
|
+
id: `suite.${documentType}.${object}.offset_candidates`,
|
|
104
|
+
module: documentType.toUpperCase(),
|
|
105
|
+
object: `${object}_offset`,
|
|
106
|
+
operation: 'candidates',
|
|
107
|
+
path: `${root}/{${idParameter}}/offset-transactions/candidates`,
|
|
108
|
+
permissions: [`${permission}:offset:list`],
|
|
109
|
+
pack: 'workflow',
|
|
110
|
+
adapt: path('document_id', idParameter),
|
|
111
|
+
}),
|
|
112
|
+
read({
|
|
113
|
+
id: `suite.${documentType}.${object}.internal_offset_candidates`,
|
|
114
|
+
module: documentType.toUpperCase(),
|
|
115
|
+
object: `${object}_offset`,
|
|
116
|
+
operation: 'internalCandidates',
|
|
117
|
+
path: `${root}/{${idParameter}}/offset-transactions/internal-candidates`,
|
|
118
|
+
permissions: [`${permission}:offset:list`],
|
|
119
|
+
pack: 'workflow',
|
|
120
|
+
adapt: path('document_id', idParameter),
|
|
121
|
+
}),
|
|
122
|
+
write({
|
|
123
|
+
id: `suite.${documentType}.${object}.offset_apply`,
|
|
124
|
+
module: documentType.toUpperCase(),
|
|
125
|
+
object: `${object}_offset`,
|
|
126
|
+
operation: 'apply',
|
|
127
|
+
path: `${root}/{${idParameter}}/offset-transactions`,
|
|
128
|
+
permissions: [`${permission}:offset:apply`],
|
|
129
|
+
pack: 'workflow',
|
|
130
|
+
adapt: bodyPath('document_id', idParameter),
|
|
131
|
+
}),
|
|
132
|
+
];
|
|
133
|
+
}),
|
|
134
|
+
];
|
|
135
|
+
const periodCapabilities = [
|
|
136
|
+
read({
|
|
137
|
+
id: 'suite.acct.closing.list',
|
|
138
|
+
module: 'ACCT',
|
|
139
|
+
object: 'closing',
|
|
140
|
+
operation: 'list',
|
|
141
|
+
path: '/api/v1/accounting/closing',
|
|
142
|
+
permissions: ['accounting:closing:list'],
|
|
143
|
+
pack: 'period-end',
|
|
144
|
+
adapt: (input) => ({
|
|
145
|
+
query: input.query,
|
|
146
|
+
}),
|
|
147
|
+
}),
|
|
148
|
+
read({
|
|
149
|
+
id: 'suite.acct.closing.detail',
|
|
150
|
+
module: 'ACCT',
|
|
151
|
+
object: 'closing',
|
|
152
|
+
operation: 'detail',
|
|
153
|
+
path: '/api/v1/accounting/closing/{id}',
|
|
154
|
+
permissions: ['accounting:closing:list'],
|
|
155
|
+
pack: 'period-end',
|
|
156
|
+
adapt: path('closing_id', 'id'),
|
|
157
|
+
}),
|
|
158
|
+
write({
|
|
159
|
+
id: 'suite.acct.closing.revaluation_preview',
|
|
160
|
+
module: 'ACCT',
|
|
161
|
+
object: 'closing',
|
|
162
|
+
operation: 'previewRevaluation',
|
|
163
|
+
path: '/api/v1/accounting/closing/{id}/revaluation/preview',
|
|
164
|
+
permissions: ['accounting:closing:revaluation'],
|
|
165
|
+
pack: 'period-end',
|
|
166
|
+
risk: 'R0',
|
|
167
|
+
sideEffect: 'none',
|
|
168
|
+
idempotency: 'http',
|
|
169
|
+
adapt: bodyPath('closing_id', 'id', (input) => ({
|
|
170
|
+
version: input.version,
|
|
171
|
+
})),
|
|
172
|
+
}),
|
|
173
|
+
write({
|
|
174
|
+
id: 'suite.acct.closing.revaluation_confirm',
|
|
175
|
+
module: 'ACCT',
|
|
176
|
+
object: 'closing',
|
|
177
|
+
operation: 'confirmRevaluation',
|
|
178
|
+
path: '/api/v1/accounting/closing/{id}/revaluation/confirm',
|
|
179
|
+
permissions: ['accounting:closing:revaluation'],
|
|
180
|
+
pack: 'period-end',
|
|
181
|
+
risk: 'R3',
|
|
182
|
+
adapt: bodyPath('closing_id', 'id', (input) => ({
|
|
183
|
+
version: input.version,
|
|
184
|
+
})),
|
|
185
|
+
}),
|
|
186
|
+
write({
|
|
187
|
+
id: 'suite.acct.closing.close_check',
|
|
188
|
+
module: 'ACCT',
|
|
189
|
+
object: 'closing',
|
|
190
|
+
operation: 'closeCheck',
|
|
191
|
+
path: '/api/v1/accounting/closing/{id}/close-check',
|
|
192
|
+
permissions: ['accounting:closing:close'],
|
|
193
|
+
pack: 'period-end',
|
|
194
|
+
risk: 'R0',
|
|
195
|
+
sideEffect: 'none',
|
|
196
|
+
idempotency: 'http',
|
|
197
|
+
adapt: bodyPath('closing_id', 'id', (input) => ({
|
|
198
|
+
version: input.version,
|
|
199
|
+
})),
|
|
200
|
+
}),
|
|
201
|
+
write({
|
|
202
|
+
id: 'suite.acct.closing.close_book',
|
|
203
|
+
module: 'ACCT',
|
|
204
|
+
object: 'closing',
|
|
205
|
+
operation: 'closeBook',
|
|
206
|
+
path: '/api/v1/accounting/closing/{id}/close-book',
|
|
207
|
+
permissions: ['accounting:closing:close'],
|
|
208
|
+
pack: 'period-end',
|
|
209
|
+
risk: 'R3',
|
|
210
|
+
adapt: bodyPath('closing_id', 'id', (input) => ({
|
|
211
|
+
version: input.version,
|
|
212
|
+
check_token: input.check_token,
|
|
213
|
+
close_reason: input.close_reason,
|
|
214
|
+
})),
|
|
215
|
+
}),
|
|
216
|
+
write({
|
|
217
|
+
id: 'suite.acct.closing.reconcile',
|
|
218
|
+
module: 'ACCT',
|
|
219
|
+
object: 'closing',
|
|
220
|
+
operation: 'reconcile',
|
|
221
|
+
path: '/api/v1/accounting/closing/{id}/reconcile',
|
|
222
|
+
permissions: ['accounting:closing:reconcile'],
|
|
223
|
+
pack: 'period-end',
|
|
224
|
+
adapt: bodyPath('closing_id', 'id', (input) => ({
|
|
225
|
+
version: input.version,
|
|
226
|
+
note: input.note,
|
|
227
|
+
})),
|
|
228
|
+
}),
|
|
229
|
+
write({
|
|
230
|
+
id: 'suite.acct.closing.reverse',
|
|
231
|
+
module: 'ACCT',
|
|
232
|
+
object: 'closing',
|
|
233
|
+
operation: 'reverseClose',
|
|
234
|
+
path: '/api/v1/accounting/closing/{id}/reverse-close',
|
|
235
|
+
permissions: ['accounting:closing:reverse'],
|
|
236
|
+
pack: 'period-end',
|
|
237
|
+
risk: 'R3',
|
|
238
|
+
adapt: bodyPath('closing_id', 'id', (input) => ({
|
|
239
|
+
version: input.version,
|
|
240
|
+
reason: input.reason,
|
|
241
|
+
})),
|
|
242
|
+
}),
|
|
243
|
+
];
|
|
244
|
+
const assetOperationCapabilities = [
|
|
245
|
+
write({
|
|
246
|
+
id: 'suite.fa.depreciation.preview',
|
|
247
|
+
module: 'FA',
|
|
248
|
+
object: 'depreciation',
|
|
249
|
+
operation: 'preview',
|
|
250
|
+
path: '/api/v1/fa/depr-run/preview',
|
|
251
|
+
permissions: ['fa:depr-run:preview'],
|
|
252
|
+
pack: 'asset-ops',
|
|
253
|
+
risk: 'R0',
|
|
254
|
+
sideEffect: 'none',
|
|
255
|
+
idempotency: 'http',
|
|
256
|
+
adapt: (input) => ({ body: input.body }),
|
|
257
|
+
}),
|
|
258
|
+
write({
|
|
259
|
+
id: 'suite.fa.depreciation.run',
|
|
260
|
+
module: 'FA',
|
|
261
|
+
object: 'depreciation',
|
|
262
|
+
operation: 'run',
|
|
263
|
+
path: '/api/v1/fa/depr-run/run',
|
|
264
|
+
permissions: ['fa:depr-run:run'],
|
|
265
|
+
pack: 'asset-ops',
|
|
266
|
+
risk: 'R3',
|
|
267
|
+
adapt: (input) => ({ body: input.body }),
|
|
268
|
+
}),
|
|
269
|
+
read({
|
|
270
|
+
id: 'suite.fa.cost_adjust.context',
|
|
271
|
+
module: 'FA',
|
|
272
|
+
object: 'cost_adjustment',
|
|
273
|
+
operation: 'context',
|
|
274
|
+
path: '/api/v1/fa/workbench/finances/{financeId}/cost-adjust/context',
|
|
275
|
+
permissions: ['fa:workbench:list'],
|
|
276
|
+
pack: 'asset-ops',
|
|
277
|
+
adapt: path('finance_id', 'financeId'),
|
|
278
|
+
}),
|
|
279
|
+
write({
|
|
280
|
+
id: 'suite.fa.cost_adjust.submit',
|
|
281
|
+
module: 'FA',
|
|
282
|
+
object: 'cost_adjustment',
|
|
283
|
+
operation: 'submit',
|
|
284
|
+
path: '/api/v1/fa/workbench/finances/{financeId}/cost-adjust',
|
|
285
|
+
permissions: ['fa:cost-adjust:create'],
|
|
286
|
+
pack: 'asset-ops',
|
|
287
|
+
adapt: bodyPath('finance_id', 'financeId'),
|
|
288
|
+
}),
|
|
289
|
+
read({
|
|
290
|
+
id: 'suite.fa.impair_retire.context',
|
|
291
|
+
module: 'FA',
|
|
292
|
+
object: 'impair_retire',
|
|
293
|
+
operation: 'context',
|
|
294
|
+
path: '/api/v1/fa/workbench/finances/{financeId}/context',
|
|
295
|
+
permissions: ['fa:impair-retire:list'],
|
|
296
|
+
pack: 'asset-ops',
|
|
297
|
+
adapt: path('finance_id', 'financeId'),
|
|
298
|
+
}),
|
|
299
|
+
write({
|
|
300
|
+
id: 'suite.fa.impair.submit',
|
|
301
|
+
module: 'FA',
|
|
302
|
+
object: 'impairment',
|
|
303
|
+
operation: 'impair',
|
|
304
|
+
path: '/api/v1/fa/workbench/finances/{financeId}/impair',
|
|
305
|
+
permissions: ['fa:impair-retire:impair'],
|
|
306
|
+
pack: 'asset-ops',
|
|
307
|
+
risk: 'R3',
|
|
308
|
+
adapt: bodyPath('finance_id', 'financeId'),
|
|
309
|
+
}),
|
|
310
|
+
write({
|
|
311
|
+
id: 'suite.fa.retire.submit',
|
|
312
|
+
module: 'FA',
|
|
313
|
+
object: 'retirement',
|
|
314
|
+
operation: 'retire',
|
|
315
|
+
path: '/api/v1/fa/workbench/finances/{financeId}/retire',
|
|
316
|
+
permissions: ['fa:impair-retire:retire'],
|
|
317
|
+
pack: 'asset-ops',
|
|
318
|
+
risk: 'R3',
|
|
319
|
+
adapt: bodyPath('finance_id', 'financeId'),
|
|
320
|
+
}),
|
|
321
|
+
];
|
|
322
|
+
const automationCapabilities = [
|
|
323
|
+
read({
|
|
324
|
+
id: 'suite.rul.events.list',
|
|
325
|
+
module: 'RUL',
|
|
326
|
+
object: 'event',
|
|
327
|
+
operation: 'list',
|
|
328
|
+
path: '/api/v1/rule/event-review',
|
|
329
|
+
permissions: ['rule:event-review:list'],
|
|
330
|
+
pack: 'automation',
|
|
331
|
+
adapt: (input) => ({
|
|
332
|
+
query: input.query,
|
|
333
|
+
}),
|
|
334
|
+
}),
|
|
335
|
+
read({
|
|
336
|
+
id: 'suite.rul.events.lines',
|
|
337
|
+
module: 'RUL',
|
|
338
|
+
object: 'event',
|
|
339
|
+
operation: 'lines',
|
|
340
|
+
path: '/api/v1/rule/event-review/{event_id}/lines',
|
|
341
|
+
permissions: ['rule:event-review:list'],
|
|
342
|
+
pack: 'automation',
|
|
343
|
+
adapt: path('event_id', 'event_id'),
|
|
344
|
+
}),
|
|
345
|
+
read({
|
|
346
|
+
id: 'suite.rul.events.check',
|
|
347
|
+
module: 'RUL',
|
|
348
|
+
object: 'event',
|
|
349
|
+
operation: 'eventCheck',
|
|
350
|
+
path: '/api/v1/rule/event-review/event-check',
|
|
351
|
+
permissions: ['rule:event-review:check'],
|
|
352
|
+
pack: 'automation',
|
|
353
|
+
adapt: (input) => ({
|
|
354
|
+
query: input.query,
|
|
355
|
+
}),
|
|
356
|
+
}),
|
|
357
|
+
read({
|
|
358
|
+
id: 'suite.rul.events.source_types',
|
|
359
|
+
module: 'RUL',
|
|
360
|
+
object: 'event',
|
|
361
|
+
operation: 'sourceTypes',
|
|
362
|
+
path: '/api/v1/rule/event-collect/source-types',
|
|
363
|
+
permissions: ['rule:event-collect:by-ids'],
|
|
364
|
+
pack: 'automation',
|
|
365
|
+
adapt: () => ({}),
|
|
366
|
+
}),
|
|
367
|
+
write({
|
|
368
|
+
id: 'suite.rul.events.collect_by_ids',
|
|
369
|
+
module: 'RUL',
|
|
370
|
+
object: 'event',
|
|
371
|
+
operation: 'collectByIds',
|
|
372
|
+
path: '/api/v1/rule/event-collect:by-ids',
|
|
373
|
+
permissions: ['rule:event-collect:by-ids'],
|
|
374
|
+
pack: 'automation',
|
|
375
|
+
adapt: (input) => ({ body: input.body }),
|
|
376
|
+
}),
|
|
377
|
+
read({
|
|
378
|
+
id: 'suite.rul.auto_flow.detail',
|
|
379
|
+
module: 'RUL',
|
|
380
|
+
object: 'auto_flow',
|
|
381
|
+
operation: 'detail',
|
|
382
|
+
path: '/api/v1/rule/auto-flow/{id}',
|
|
383
|
+
permissions: ['rule:auto-flow:list'],
|
|
384
|
+
pack: 'automation',
|
|
385
|
+
adapt: (input) => ({
|
|
386
|
+
pathParams: { id: String(input.flow_id) },
|
|
387
|
+
query: input.loop_seq === undefined
|
|
388
|
+
? {}
|
|
389
|
+
: { loop_seq: Number(input.loop_seq) },
|
|
390
|
+
}),
|
|
391
|
+
}),
|
|
392
|
+
write({
|
|
393
|
+
id: 'suite.rul.auto_flow.run',
|
|
394
|
+
module: 'RUL',
|
|
395
|
+
object: 'auto_flow',
|
|
396
|
+
operation: 'runLoop',
|
|
397
|
+
path: '/api/v1/rule/auto-flow/{id}/runLoop',
|
|
398
|
+
permissions: ['rule:auto-flow:run'],
|
|
399
|
+
pack: 'automation',
|
|
400
|
+
risk: 'R3',
|
|
401
|
+
adapt: bodyPath('flow_id', 'id', () => undefined),
|
|
402
|
+
}),
|
|
403
|
+
];
|
|
404
|
+
const configurationCapabilities = [];
|
|
405
|
+
const crudSpecs = [
|
|
406
|
+
{
|
|
407
|
+
key: 'map_attr_definition',
|
|
408
|
+
module: 'MAP',
|
|
409
|
+
object: 'attribute_definition',
|
|
410
|
+
root: '/api/v1/mapping/ext-attr-defs',
|
|
411
|
+
listPermission: 'mapping:attr-def:list',
|
|
412
|
+
createPermission: 'mapping:attr-def:create',
|
|
413
|
+
updatePermission: 'mapping:attr-def:update',
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
key: 'map_attribute_fill',
|
|
417
|
+
module: 'MAP',
|
|
418
|
+
object: 'attribute_fill',
|
|
419
|
+
root: '/api/v1/mapping/attr-fills',
|
|
420
|
+
listPermission: 'mapping:attr-fill:list',
|
|
421
|
+
createPermission: 'mapping:attr-fill:manage',
|
|
422
|
+
updatePermission: 'mapping:attr-fill:manage',
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
key: 'map_source_handler',
|
|
426
|
+
module: 'MAP',
|
|
427
|
+
object: 'source_handler',
|
|
428
|
+
root: '/api/v1/mapping/src-handlers',
|
|
429
|
+
listPermission: 'mapping:src-handler:list',
|
|
430
|
+
createPermission: 'mapping:src-handler:manage',
|
|
431
|
+
updatePermission: 'mapping:src-handler:manage',
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
key: 'accounting_rule',
|
|
435
|
+
module: 'RUL',
|
|
436
|
+
object: 'accounting_rule',
|
|
437
|
+
root: '/api/v1/rule/rules',
|
|
438
|
+
listPermission: 'rule:rules:list',
|
|
439
|
+
createPermission: 'rule:rules:create',
|
|
440
|
+
updatePermission: 'rule:rules:update',
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
key: 'allocation_config',
|
|
444
|
+
module: 'ALOC',
|
|
445
|
+
object: 'allocation_config',
|
|
446
|
+
root: '/api/v1/aloc/config',
|
|
447
|
+
listPermission: 'aloc:config:list',
|
|
448
|
+
createPermission: 'aloc:config:create',
|
|
449
|
+
updatePermission: 'aloc:config:update',
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
key: 'pnl_bucket',
|
|
453
|
+
module: 'PNL',
|
|
454
|
+
object: 'pnl_bucket',
|
|
455
|
+
root: '/api/v1/pnl/buckets',
|
|
456
|
+
listPermission: 'pnl:bucket:list',
|
|
457
|
+
createPermission: 'pnl:bucket:create',
|
|
458
|
+
updatePermission: 'pnl:bucket:update',
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
key: 'generator_parameter',
|
|
462
|
+
module: 'PGEN',
|
|
463
|
+
object: 'parameter',
|
|
464
|
+
root: '/api/v1/pgen/params',
|
|
465
|
+
listPermission: 'pgen:param:list',
|
|
466
|
+
createPermission: 'pgen:param:create',
|
|
467
|
+
updatePermission: 'pgen:param:update',
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
key: 'generator_rule',
|
|
471
|
+
module: 'PGEN',
|
|
472
|
+
object: 'generator_rule',
|
|
473
|
+
root: '/api/v1/pgen/rules',
|
|
474
|
+
listPermission: 'pgen:rule:list',
|
|
475
|
+
createPermission: 'pgen:rule:create',
|
|
476
|
+
updatePermission: 'pgen:rule:update',
|
|
477
|
+
},
|
|
478
|
+
];
|
|
479
|
+
for (const spec of crudSpecs) {
|
|
480
|
+
configurationCapabilities.push(read({
|
|
481
|
+
id: `suite.config.${spec.key}.list`,
|
|
482
|
+
module: spec.module,
|
|
483
|
+
object: spec.object,
|
|
484
|
+
operation: 'list',
|
|
485
|
+
path: spec.root,
|
|
486
|
+
permissions: [spec.listPermission],
|
|
487
|
+
pack: 'configuration',
|
|
488
|
+
adapt: (input) => ({
|
|
489
|
+
query: input.query,
|
|
490
|
+
}),
|
|
491
|
+
}), read({
|
|
492
|
+
id: `suite.config.${spec.key}.detail`,
|
|
493
|
+
module: spec.module,
|
|
494
|
+
object: spec.object,
|
|
495
|
+
operation: 'detail',
|
|
496
|
+
path: `${spec.root}/{id}`,
|
|
497
|
+
permissions: [spec.listPermission],
|
|
498
|
+
pack: 'configuration',
|
|
499
|
+
adapt: path('object_id', 'id'),
|
|
500
|
+
}), write({
|
|
501
|
+
id: `suite.config.${spec.key}.create`,
|
|
502
|
+
module: spec.module,
|
|
503
|
+
object: spec.object,
|
|
504
|
+
operation: 'create',
|
|
505
|
+
path: spec.root,
|
|
506
|
+
permissions: [spec.createPermission],
|
|
507
|
+
pack: 'configuration',
|
|
508
|
+
risk: [
|
|
509
|
+
'accounting_rule',
|
|
510
|
+
'generator_parameter',
|
|
511
|
+
'generator_rule',
|
|
512
|
+
].includes(spec.key)
|
|
513
|
+
? 'R2'
|
|
514
|
+
: 'R1',
|
|
515
|
+
adapt: (input) => ({ body: input.values }),
|
|
516
|
+
}), write({
|
|
517
|
+
id: `suite.config.${spec.key}.update`,
|
|
518
|
+
module: spec.module,
|
|
519
|
+
object: spec.object,
|
|
520
|
+
operation: 'update',
|
|
521
|
+
method: 'PUT',
|
|
522
|
+
path: `${spec.root}/{id}`,
|
|
523
|
+
permissions: [spec.updatePermission],
|
|
524
|
+
pack: 'configuration',
|
|
525
|
+
risk: [
|
|
526
|
+
'accounting_rule',
|
|
527
|
+
'generator_parameter',
|
|
528
|
+
'generator_rule',
|
|
529
|
+
].includes(spec.key)
|
|
530
|
+
? 'R2'
|
|
531
|
+
: 'R1',
|
|
532
|
+
adapt: bodyPath('object_id', 'id', (input) => ({
|
|
533
|
+
...input.values,
|
|
534
|
+
version: input.version,
|
|
535
|
+
})),
|
|
536
|
+
}));
|
|
537
|
+
}
|
|
538
|
+
configurationCapabilities.push(read({
|
|
539
|
+
id: 'suite.config.precheck_rule.tree',
|
|
540
|
+
module: 'RUL',
|
|
541
|
+
object: 'precheck_rule',
|
|
542
|
+
operation: 'tree',
|
|
543
|
+
path: '/api/v1/rule/pre-check/tree',
|
|
544
|
+
permissions: ['rule:precheck:list'],
|
|
545
|
+
pack: 'configuration',
|
|
546
|
+
adapt: (input) => ({
|
|
547
|
+
query: input.query,
|
|
548
|
+
}),
|
|
549
|
+
}), read({
|
|
550
|
+
id: 'suite.config.precheck_rule.detail',
|
|
551
|
+
module: 'RUL',
|
|
552
|
+
object: 'precheck_rule',
|
|
553
|
+
operation: 'detail',
|
|
554
|
+
path: '/api/v1/rule/pre-check/{id}',
|
|
555
|
+
permissions: ['rule:precheck:list'],
|
|
556
|
+
pack: 'configuration',
|
|
557
|
+
adapt: path('object_id', 'id'),
|
|
558
|
+
}), write({
|
|
559
|
+
id: 'suite.config.precheck_rule.create',
|
|
560
|
+
module: 'RUL',
|
|
561
|
+
object: 'precheck_rule',
|
|
562
|
+
operation: 'create',
|
|
563
|
+
path: '/api/v1/rule/pre-check',
|
|
564
|
+
permissions: ['rule:precheck:create'],
|
|
565
|
+
pack: 'configuration',
|
|
566
|
+
risk: 'R2',
|
|
567
|
+
adapt: (input) => ({ body: input.values }),
|
|
568
|
+
}), write({
|
|
569
|
+
id: 'suite.config.precheck_rule.update',
|
|
570
|
+
module: 'RUL',
|
|
571
|
+
object: 'precheck_rule',
|
|
572
|
+
operation: 'update',
|
|
573
|
+
method: 'PUT',
|
|
574
|
+
path: '/api/v1/rule/pre-check/{id}',
|
|
575
|
+
permissions: ['rule:precheck:update'],
|
|
576
|
+
pack: 'configuration',
|
|
577
|
+
risk: 'R2',
|
|
578
|
+
adapt: bodyPath('object_id', 'id', (input) => ({
|
|
579
|
+
...input.values,
|
|
580
|
+
version: input.version,
|
|
581
|
+
})),
|
|
582
|
+
}), read({
|
|
583
|
+
id: 'suite.aloc.detail.list',
|
|
584
|
+
module: 'ALOC',
|
|
585
|
+
object: 'allocation_detail',
|
|
586
|
+
operation: 'list',
|
|
587
|
+
path: '/api/v1/aloc/detail',
|
|
588
|
+
permissions: ['aloc:detail:list'],
|
|
589
|
+
pack: 'configuration',
|
|
590
|
+
adapt: (input) => ({
|
|
591
|
+
query: input.query,
|
|
592
|
+
}),
|
|
593
|
+
}), read({
|
|
594
|
+
id: 'suite.aloc.detail.detail',
|
|
595
|
+
module: 'ALOC',
|
|
596
|
+
object: 'allocation_detail',
|
|
597
|
+
operation: 'detail',
|
|
598
|
+
path: '/api/v1/aloc/detail/{id}',
|
|
599
|
+
permissions: ['aloc:detail:list'],
|
|
600
|
+
pack: 'configuration',
|
|
601
|
+
adapt: path('object_id', 'id'),
|
|
602
|
+
}), read({
|
|
603
|
+
id: 'suite.aloc.detail.summary',
|
|
604
|
+
module: 'ALOC',
|
|
605
|
+
object: 'allocation_detail',
|
|
606
|
+
operation: 'summary',
|
|
607
|
+
path: '/api/v1/aloc/detail/summary',
|
|
608
|
+
permissions: ['aloc:detail:list'],
|
|
609
|
+
pack: 'configuration',
|
|
610
|
+
adapt: (input) => ({
|
|
611
|
+
query: input.query,
|
|
612
|
+
}),
|
|
613
|
+
}), write({
|
|
614
|
+
id: 'suite.config.allocation_config.lines',
|
|
615
|
+
module: 'ALOC',
|
|
616
|
+
object: 'allocation_config',
|
|
617
|
+
operation: 'replaceLines',
|
|
618
|
+
method: 'PUT',
|
|
619
|
+
path: '/api/v1/aloc/config/{id}/lines',
|
|
620
|
+
permissions: ['aloc:config:update'],
|
|
621
|
+
pack: 'configuration',
|
|
622
|
+
risk: 'R1',
|
|
623
|
+
adapt: bodyPath('object_id', 'id', (input) => ({
|
|
624
|
+
version: input.version,
|
|
625
|
+
lines: input.lines,
|
|
626
|
+
})),
|
|
627
|
+
}), read({
|
|
628
|
+
id: 'suite.aloc.generate.preview',
|
|
629
|
+
module: 'ALOC',
|
|
630
|
+
object: 'allocation',
|
|
631
|
+
operation: 'preview',
|
|
632
|
+
path: '/api/v1/aloc/generate/preview/{journalId}',
|
|
633
|
+
permissions: ['aloc:generate:manual'],
|
|
634
|
+
pack: 'configuration',
|
|
635
|
+
adapt: path('journal_id', 'journalId'),
|
|
636
|
+
}), write({
|
|
637
|
+
id: 'suite.aloc.generate.execute',
|
|
638
|
+
module: 'ALOC',
|
|
639
|
+
object: 'allocation',
|
|
640
|
+
operation: 'generate',
|
|
641
|
+
path: '/api/v1/aloc/generate/journal/{journalId}',
|
|
642
|
+
permissions: ['aloc:generate:manual'],
|
|
643
|
+
pack: 'configuration',
|
|
644
|
+
risk: 'R3',
|
|
645
|
+
adapt: bodyPath('journal_id', 'journalId', () => undefined),
|
|
646
|
+
}), write({
|
|
647
|
+
id: 'suite.pnl.calculation.run',
|
|
648
|
+
module: 'PNL',
|
|
649
|
+
object: 'calculation',
|
|
650
|
+
operation: 'submitRun',
|
|
651
|
+
path: '/api/v1/pnl/calculations',
|
|
652
|
+
permissions: ['pnl:calculation:create'],
|
|
653
|
+
pack: 'configuration',
|
|
654
|
+
adapt: (input) => ({ body: input.body }),
|
|
655
|
+
}), read({
|
|
656
|
+
id: 'suite.pnl.calculation.status',
|
|
657
|
+
module: 'PNL',
|
|
658
|
+
object: 'calculation',
|
|
659
|
+
operation: 'getRun',
|
|
660
|
+
path: '/api/v1/pnl/calculations/{runId}',
|
|
661
|
+
permissions: ['pnl:calculation:list', 'pnl:calculation:create'],
|
|
662
|
+
pack: 'configuration',
|
|
663
|
+
adapt: path('run_id', 'runId'),
|
|
664
|
+
}), write({
|
|
665
|
+
id: 'suite.config.pnl_bucket.member_add',
|
|
666
|
+
module: 'PNL',
|
|
667
|
+
object: 'pnl_bucket_member',
|
|
668
|
+
operation: 'add',
|
|
669
|
+
path: '/api/v1/pnl/buckets/{bucketId}/members',
|
|
670
|
+
permissions: ['pnl:bucket:update'],
|
|
671
|
+
pack: 'configuration',
|
|
672
|
+
risk: 'R1',
|
|
673
|
+
adapt: bodyPath('bucket_id', 'bucketId', (input) => input.values),
|
|
674
|
+
}), write({
|
|
675
|
+
id: 'suite.pgen.rule.run',
|
|
676
|
+
module: 'PGEN',
|
|
677
|
+
object: 'generator_rule',
|
|
678
|
+
operation: 'run',
|
|
679
|
+
path: '/api/v1/pgen/rules/{id}/run',
|
|
680
|
+
permissions: ['pgen:rule:run'],
|
|
681
|
+
pack: 'configuration',
|
|
682
|
+
adapt: (input) => {
|
|
683
|
+
const businessDate = input.business_date;
|
|
684
|
+
return {
|
|
685
|
+
pathParams: { id: String(input.rule_id) },
|
|
686
|
+
query: typeof businessDate === 'string'
|
|
687
|
+
? { business_date: businessDate }
|
|
688
|
+
: {},
|
|
689
|
+
};
|
|
690
|
+
},
|
|
691
|
+
}));
|
|
692
|
+
export const extendedOperationCapabilities = [
|
|
693
|
+
...workflowCapabilities,
|
|
694
|
+
...periodCapabilities,
|
|
695
|
+
...assetOperationCapabilities,
|
|
696
|
+
...automationCapabilities,
|
|
697
|
+
...configurationCapabilities,
|
|
698
|
+
];
|
|
699
|
+
//# sourceMappingURL=extended-operations.js.map
|