@ffschrattenecker/tm1-mcp-server 6.0.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/CHANGELOG.md +1211 -0
- package/LICENSE +21 -0
- package/NOTICE +34 -0
- package/README.md +276 -0
- package/dist/config.d.ts +35 -0
- package/dist/config.js +238 -0
- package/dist/http-transport.d.ts +8 -0
- package/dist/http-transport.js +132 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +164 -0
- package/dist/lib/callgraph/callGraph.d.ts +124 -0
- package/dist/lib/callgraph/callGraph.js +334 -0
- package/dist/lib/callgraph/choreGraph.d.ts +23 -0
- package/dist/lib/callgraph/choreGraph.js +102 -0
- package/dist/lib/callgraph/dataFlow.d.ts +74 -0
- package/dist/lib/callgraph/dataFlow.js +271 -0
- package/dist/lib/callgraph/datasourceMembership.d.ts +31 -0
- package/dist/lib/callgraph/datasourceMembership.js +142 -0
- package/dist/lib/callgraph/lintTypes.d.ts +28 -0
- package/dist/lib/callgraph/lintTypes.js +2 -0
- package/dist/lib/callgraph/mdxMembers.d.ts +29 -0
- package/dist/lib/callgraph/mdxMembers.js +97 -0
- package/dist/lib/callgraph/referenceIndex.d.ts +179 -0
- package/dist/lib/callgraph/referenceIndex.js +584 -0
- package/dist/lib/callgraph/rulesLinter.d.ts +55 -0
- package/dist/lib/callgraph/rulesLinter.js +776 -0
- package/dist/lib/callgraph/rulesParser.d.ts +26 -0
- package/dist/lib/callgraph/rulesParser.js +71 -0
- package/dist/lib/callgraph/subsetUsage.d.ts +16 -0
- package/dist/lib/callgraph/subsetUsage.js +134 -0
- package/dist/lib/callgraph/tiParser.d.ts +21 -0
- package/dist/lib/callgraph/tiParser.js +672 -0
- package/dist/lib/callgraph/tiSignatures.d.ts +32 -0
- package/dist/lib/callgraph/tiSignatures.js +6185 -0
- package/dist/lib/callgraph/tm1-adapter.d.ts +32 -0
- package/dist/lib/callgraph/tm1-adapter.js +159 -0
- package/dist/lib/callgraph/types.d.ts +53 -0
- package/dist/lib/callgraph/types.js +2 -0
- package/dist/lib/callgraph/variableEnv.d.ts +86 -0
- package/dist/lib/callgraph/variableEnv.js +214 -0
- package/dist/lib/cell-address.d.ts +12 -0
- package/dist/lib/cell-address.js +71 -0
- package/dist/lib/complexity/antipatterns.d.ts +22 -0
- package/dist/lib/complexity/antipatterns.js +302 -0
- package/dist/lib/complexity/comment-classifier.d.ts +24 -0
- package/dist/lib/complexity/comment-classifier.js +43 -0
- package/dist/lib/complexity/cross-process.d.ts +78 -0
- package/dist/lib/complexity/cross-process.js +114 -0
- package/dist/lib/complexity/process-metrics.d.ts +78 -0
- package/dist/lib/complexity/process-metrics.js +278 -0
- package/dist/lib/complexity/rules-metrics.d.ts +31 -0
- package/dist/lib/complexity/rules-metrics.js +99 -0
- package/dist/lib/concurrency.d.ts +11 -0
- package/dist/lib/concurrency.js +27 -0
- package/dist/lib/control-name.d.ts +10 -0
- package/dist/lib/control-name.js +10 -0
- package/dist/lib/coordinate-error.d.ts +3 -0
- package/dist/lib/coordinate-error.js +29 -0
- package/dist/lib/credential-format.d.ts +23 -0
- package/dist/lib/credential-format.js +25 -0
- package/dist/lib/cube-stats/fetcher.d.ts +106 -0
- package/dist/lib/cube-stats/fetcher.js +194 -0
- package/dist/lib/feeders/brackets.d.ts +47 -0
- package/dist/lib/feeders/brackets.js +195 -0
- package/dist/lib/feeders/element-type-cache.d.ts +42 -0
- package/dist/lib/feeders/element-type-cache.js +86 -0
- package/dist/lib/feeders/static-heuristics.d.ts +101 -0
- package/dist/lib/feeders/static-heuristics.js +202 -0
- package/dist/lib/git-process.d.ts +67 -0
- package/dist/lib/git-process.js +243 -0
- package/dist/lib/mask-secrets.d.ts +10 -0
- package/dist/lib/mask-secrets.js +99 -0
- package/dist/lib/mdx.d.ts +3 -0
- package/dist/lib/mdx.js +13 -0
- package/dist/lib/naming/odata-filter.d.ts +15 -0
- package/dist/lib/naming/odata-filter.js +81 -0
- package/dist/lib/naming/rules.d.ts +34 -0
- package/dist/lib/naming/rules.js +215 -0
- package/dist/lib/pro-parser.d.ts +19 -0
- package/dist/lib/pro-parser.js +260 -0
- package/dist/lib/pro-serializer.d.ts +19 -0
- package/dist/lib/pro-serializer.js +170 -0
- package/dist/lib/process-parts-schema.d.ts +45 -0
- package/dist/lib/process-parts-schema.js +46 -0
- package/dist/lib/process-refs.d.ts +88 -0
- package/dist/lib/process-refs.js +441 -0
- package/dist/lib/rules-outline.d.ts +29 -0
- package/dist/lib/rules-outline.js +68 -0
- package/dist/lib/rules-patch.d.ts +6 -0
- package/dist/lib/rules-patch.js +59 -0
- package/dist/lib/safe-regex.d.ts +15 -0
- package/dist/lib/safe-regex.js +37 -0
- package/dist/lib/sample-cells.d.ts +48 -0
- package/dist/lib/sample-cells.js +146 -0
- package/dist/lib/slim-json-schema.d.ts +20 -0
- package/dist/lib/slim-json-schema.js +68 -0
- package/dist/lib/strip-comments.d.ts +23 -0
- package/dist/lib/strip-comments.js +61 -0
- package/dist/lib/tm1-events.d.ts +16 -0
- package/dist/lib/tm1-events.js +29 -0
- package/dist/lib/v12-compat/deprecated-ti.d.ts +17 -0
- package/dist/lib/v12-compat/deprecated-ti.js +257 -0
- package/dist/lib/v12-compat/scanner.d.ts +10 -0
- package/dist/lib/v12-compat/scanner.js +43 -0
- package/dist/lib/variables-ui-data.d.ts +26 -0
- package/dist/lib/variables-ui-data.js +77 -0
- package/dist/load-env.d.ts +2 -0
- package/dist/load-env.js +29 -0
- package/dist/logger.d.ts +4 -0
- package/dist/logger.js +60 -0
- package/dist/prompts/index.d.ts +3 -0
- package/dist/prompts/index.js +141 -0
- package/dist/resources/index.d.ts +5 -0
- package/dist/resources/index.js +237 -0
- package/dist/resources/list-handler.d.ts +40 -0
- package/dist/resources/list-handler.js +86 -0
- package/dist/resources/subscriptions.d.ts +19 -0
- package/dist/resources/subscriptions.js +80 -0
- package/dist/schemas/cells.d.ts +17 -0
- package/dist/schemas/cells.js +13 -0
- package/dist/schemas/common.d.ts +16 -0
- package/dist/schemas/common.js +14 -0
- package/dist/schemas/index.d.ts +10 -0
- package/dist/schemas/index.js +23 -0
- package/dist/schemas/metadata.d.ts +70 -0
- package/dist/schemas/metadata.js +47 -0
- package/dist/schemas/monitoring.d.ts +95 -0
- package/dist/schemas/monitoring.js +69 -0
- package/dist/schemas/processes.d.ts +74 -0
- package/dist/schemas/processes.js +66 -0
- package/dist/schemas/scheduling.d.ts +13 -0
- package/dist/schemas/scheduling.js +13 -0
- package/dist/schemas/security.d.ts +19 -0
- package/dist/schemas/security.js +16 -0
- package/dist/schemas/subsets.d.ts +12 -0
- package/dist/schemas/subsets.js +12 -0
- package/dist/schemas/views.d.ts +9 -0
- package/dist/schemas/views.js +9 -0
- package/dist/session-manager.d.ts +79 -0
- package/dist/session-manager.js +281 -0
- package/dist/tm1-client/connection/profile.d.ts +13 -0
- package/dist/tm1-client/connection/profile.js +99 -0
- package/dist/tm1-client/dispatcher.d.ts +5 -0
- package/dist/tm1-client/dispatcher.js +31 -0
- package/dist/tm1-client/http.d.ts +81 -0
- package/dist/tm1-client/http.js +547 -0
- package/dist/tm1-client/services/batch-service.d.ts +123 -0
- package/dist/tm1-client/services/batch-service.js +455 -0
- package/dist/tm1-client/services/cell-service.d.ts +71 -0
- package/dist/tm1-client/services/cell-service.js +333 -0
- package/dist/tm1-client/services/cellset-transform.d.ts +26 -0
- package/dist/tm1-client/services/cellset-transform.js +80 -0
- package/dist/tm1-client/services/chore-service.d.ts +68 -0
- package/dist/tm1-client/services/chore-service.js +179 -0
- package/dist/tm1-client/services/chore-status.d.ts +11 -0
- package/dist/tm1-client/services/chore-status.js +127 -0
- package/dist/tm1-client/services/cube-service.d.ts +134 -0
- package/dist/tm1-client/services/cube-service.js +294 -0
- package/dist/tm1-client/services/dimension-service.d.ts +118 -0
- package/dist/tm1-client/services/dimension-service.js +249 -0
- package/dist/tm1-client/services/element-service.d.ts +245 -0
- package/dist/tm1-client/services/element-service.js +809 -0
- package/dist/tm1-client/services/fallback.d.ts +44 -0
- package/dist/tm1-client/services/fallback.js +72 -0
- package/dist/tm1-client/services/file-service.d.ts +53 -0
- package/dist/tm1-client/services/file-service.js +218 -0
- package/dist/tm1-client/services/hierarchy-service.d.ts +129 -0
- package/dist/tm1-client/services/hierarchy-service.js +332 -0
- package/dist/tm1-client/services/monitoring-service.d.ts +34 -0
- package/dist/tm1-client/services/monitoring-service.js +123 -0
- package/dist/tm1-client/services/odata-page.d.ts +71 -0
- package/dist/tm1-client/services/odata-page.js +87 -0
- package/dist/tm1-client/services/process-service.d.ts +278 -0
- package/dist/tm1-client/services/process-service.js +874 -0
- package/dist/tm1-client/services/process-status.d.ts +21 -0
- package/dist/tm1-client/services/process-status.js +89 -0
- package/dist/tm1-client/services/security-service.d.ts +50 -0
- package/dist/tm1-client/services/security-service.js +93 -0
- package/dist/tm1-client/services/server-service.d.ts +116 -0
- package/dist/tm1-client/services/server-service.js +504 -0
- package/dist/tm1-client/services/subset-service.d.ts +37 -0
- package/dist/tm1-client/services/subset-service.js +122 -0
- package/dist/tm1-client/services/view-service.d.ts +46 -0
- package/dist/tm1-client/services/view-service.js +287 -0
- package/dist/tm1-client.d.ts +56 -0
- package/dist/tm1-client.js +126 -0
- package/dist/tools/analysis/analyze-callgraph.d.ts +28 -0
- package/dist/tools/analysis/analyze-callgraph.js +350 -0
- package/dist/tools/analysis/analyze-chore-graph.d.ts +2 -0
- package/dist/tools/analysis/analyze-chore-graph.js +148 -0
- package/dist/tools/analysis/analyze-object-usage.d.ts +2 -0
- package/dist/tools/analysis/analyze-object-usage.js +143 -0
- package/dist/tools/analysis/audit-complexity.d.ts +2 -0
- package/dist/tools/analysis/audit-complexity.js +255 -0
- package/dist/tools/analysis/audit-feeders.d.ts +2 -0
- package/dist/tools/analysis/audit-feeders.js +417 -0
- package/dist/tools/analysis/audit-naming.d.ts +2 -0
- package/dist/tools/analysis/audit-naming.js +379 -0
- package/dist/tools/analysis/check-v12-readiness.d.ts +2 -0
- package/dist/tools/analysis/check-v12-readiness.js +136 -0
- package/dist/tools/analysis/find-orphan-dimensions.d.ts +2 -0
- package/dist/tools/analysis/find-orphan-dimensions.js +55 -0
- package/dist/tools/analysis/invalidate-callgraph-cache.d.ts +2 -0
- package/dist/tools/analysis/invalidate-callgraph-cache.js +40 -0
- package/dist/tools/analysis/trace-data-flow.d.ts +2 -0
- package/dist/tools/analysis/trace-data-flow.js +138 -0
- package/dist/tools/annotations.d.ts +12 -0
- package/dist/tools/annotations.js +61 -0
- package/dist/tools/celldata/check-feeders.d.ts +2 -0
- package/dist/tools/celldata/check-feeders.js +48 -0
- package/dist/tools/celldata/check-writable-coords.d.ts +2 -0
- package/dist/tools/celldata/check-writable-coords.js +126 -0
- package/dist/tools/celldata/execute-mdx.d.ts +17 -0
- package/dist/tools/celldata/execute-mdx.js +126 -0
- package/dist/tools/celldata/get-cell-value.d.ts +2 -0
- package/dist/tools/celldata/get-cell-value.js +30 -0
- package/dist/tools/celldata/get-view-definition.d.ts +2 -0
- package/dist/tools/celldata/get-view-definition.js +29 -0
- package/dist/tools/celldata/get-view.d.ts +2 -0
- package/dist/tools/celldata/get-view.js +55 -0
- package/dist/tools/celldata/sample-cells.d.ts +2 -0
- package/dist/tools/celldata/sample-cells.js +101 -0
- package/dist/tools/celldata/trace-cell-calculation.d.ts +2 -0
- package/dist/tools/celldata/trace-cell-calculation.js +53 -0
- package/dist/tools/celldata/trace-feeders.d.ts +2 -0
- package/dist/tools/celldata/trace-feeders.js +44 -0
- package/dist/tools/celldata/write-cells.d.ts +2 -0
- package/dist/tools/celldata/write-cells.js +65 -0
- package/dist/tools/confirm.d.ts +10 -0
- package/dist/tools/confirm.js +64 -0
- package/dist/tools/define-tool.d.ts +51 -0
- package/dist/tools/define-tool.js +49 -0
- package/dist/tools/dimension-management/bulk-upsert-elements.d.ts +2 -0
- package/dist/tools/dimension-management/bulk-upsert-elements.js +103 -0
- package/dist/tools/dimension-management/create-dimension.d.ts +2 -0
- package/dist/tools/dimension-management/create-dimension.js +22 -0
- package/dist/tools/dimension-management/create-element-attribute.d.ts +2 -0
- package/dist/tools/dimension-management/create-element-attribute.js +26 -0
- package/dist/tools/dimension-management/create-element.d.ts +2 -0
- package/dist/tools/dimension-management/create-element.js +31 -0
- package/dist/tools/dimension-management/create-hierarchy.d.ts +2 -0
- package/dist/tools/dimension-management/create-hierarchy.js +22 -0
- package/dist/tools/dimension-management/delete-dimension.d.ts +2 -0
- package/dist/tools/dimension-management/delete-dimension.js +25 -0
- package/dist/tools/dimension-management/delete-element.d.ts +2 -0
- package/dist/tools/dimension-management/delete-element.js +26 -0
- package/dist/tools/dimension-management/delete-elements.d.ts +2 -0
- package/dist/tools/dimension-management/delete-elements.js +44 -0
- package/dist/tools/dimension-management/delete-hierarchy.d.ts +2 -0
- package/dist/tools/dimension-management/delete-hierarchy.js +35 -0
- package/dist/tools/dimension-management/get-element-attribute-values.d.ts +2 -0
- package/dist/tools/dimension-management/get-element-attribute-values.js +77 -0
- package/dist/tools/dimension-management/list-element-attributes.d.ts +2 -0
- package/dist/tools/dimension-management/list-element-attributes.js +31 -0
- package/dist/tools/dimension-management/move-element.d.ts +2 -0
- package/dist/tools/dimension-management/move-element.js +28 -0
- package/dist/tools/dimension-management/update-element-attribute-value.d.ts +2 -0
- package/dist/tools/dimension-management/update-element-attribute-value.js +80 -0
- package/dist/tools/dimension-management/update-element.d.ts +2 -0
- package/dist/tools/dimension-management/update-element.js +35 -0
- package/dist/tools/error-format.d.ts +22 -0
- package/dist/tools/error-format.js +130 -0
- package/dist/tools/fileops/delete-file.d.ts +2 -0
- package/dist/tools/fileops/delete-file.js +32 -0
- package/dist/tools/fileops/get-file-content.d.ts +2 -0
- package/dist/tools/fileops/get-file-content.js +76 -0
- package/dist/tools/fileops/list-files.d.ts +2 -0
- package/dist/tools/fileops/list-files.js +43 -0
- package/dist/tools/fileops/search-files.d.ts +2 -0
- package/dist/tools/fileops/search-files.js +76 -0
- package/dist/tools/fileops/upload-file.d.ts +2 -0
- package/dist/tools/fileops/upload-file.js +69 -0
- package/dist/tools/format.d.ts +57 -0
- package/dist/tools/format.js +157 -0
- package/dist/tools/hierarchy.d.ts +6 -0
- package/dist/tools/hierarchy.js +27 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.js +263 -0
- package/dist/tools/local-file.d.ts +16 -0
- package/dist/tools/local-file.js +88 -0
- package/dist/tools/metadata/get-ancestors.d.ts +2 -0
- package/dist/tools/metadata/get-ancestors.js +36 -0
- package/dist/tools/metadata/get-descendants.d.ts +2 -0
- package/dist/tools/metadata/get-descendants.js +64 -0
- package/dist/tools/metadata/get-hierarchy.d.ts +2 -0
- package/dist/tools/metadata/get-hierarchy.js +130 -0
- package/dist/tools/metadata/list-chores.d.ts +2 -0
- package/dist/tools/metadata/list-chores.js +62 -0
- package/dist/tools/metadata/list-cubes.d.ts +2 -0
- package/dist/tools/metadata/list-cubes.js +128 -0
- package/dist/tools/metadata/list-dimensions.d.ts +2 -0
- package/dist/tools/metadata/list-dimensions.js +131 -0
- package/dist/tools/metadata/list-processes-grouped.d.ts +2 -0
- package/dist/tools/metadata/list-processes-grouped.js +96 -0
- package/dist/tools/metadata/list-processes.d.ts +2 -0
- package/dist/tools/metadata/list-processes.js +108 -0
- package/dist/tools/metadata/resolve-default-members.d.ts +2 -0
- package/dist/tools/metadata/resolve-default-members.js +46 -0
- package/dist/tools/model-building/check-cube-rule.d.ts +2 -0
- package/dist/tools/model-building/check-cube-rule.js +51 -0
- package/dist/tools/model-building/clear-cube.d.ts +2 -0
- package/dist/tools/model-building/clear-cube.js +46 -0
- package/dist/tools/model-building/create-cube.d.ts +2 -0
- package/dist/tools/model-building/create-cube.js +34 -0
- package/dist/tools/model-building/delete-cube.d.ts +2 -0
- package/dist/tools/model-building/delete-cube.js +27 -0
- package/dist/tools/model-building/get-all-cube-rules.d.ts +2 -0
- package/dist/tools/model-building/get-all-cube-rules.js +149 -0
- package/dist/tools/model-building/get-cube-rules.d.ts +2 -0
- package/dist/tools/model-building/get-cube-rules.js +69 -0
- package/dist/tools/model-building/rules-source.d.ts +21 -0
- package/dist/tools/model-building/rules-source.js +49 -0
- package/dist/tools/model-building/search-rules.d.ts +2 -0
- package/dist/tools/model-building/search-rules.js +132 -0
- package/dist/tools/model-building/set-cube-rules.d.ts +2 -0
- package/dist/tools/model-building/set-cube-rules.js +81 -0
- package/dist/tools/model-building/unload-cube.d.ts +2 -0
- package/dist/tools/model-building/unload-cube.js +23 -0
- package/dist/tools/operations/diagnose-process-error.d.ts +2 -0
- package/dist/tools/operations/diagnose-process-error.js +178 -0
- package/dist/tools/operations/error-log-helpers.d.ts +25 -0
- package/dist/tools/operations/error-log-helpers.js +57 -0
- package/dist/tools/operations/get-audit-log.d.ts +2 -0
- package/dist/tools/operations/get-audit-log.js +70 -0
- package/dist/tools/operations/get-cube-stats.d.ts +2 -0
- package/dist/tools/operations/get-cube-stats.js +107 -0
- package/dist/tools/operations/get-error-log-content.d.ts +2 -0
- package/dist/tools/operations/get-error-log-content.js +164 -0
- package/dist/tools/operations/get-jobs.d.ts +3 -0
- package/dist/tools/operations/get-jobs.js +51 -0
- package/dist/tools/operations/get-message-log.d.ts +2 -0
- package/dist/tools/operations/get-message-log.js +63 -0
- package/dist/tools/operations/get-server-info.d.ts +2 -0
- package/dist/tools/operations/get-server-info.js +180 -0
- package/dist/tools/operations/get-server-state.d.ts +2 -0
- package/dist/tools/operations/get-server-state.js +129 -0
- package/dist/tools/operations/get-sessions.d.ts +2 -0
- package/dist/tools/operations/get-sessions.js +76 -0
- package/dist/tools/operations/get-threads.d.ts +3 -0
- package/dist/tools/operations/get-threads.js +50 -0
- package/dist/tools/operations/get-transaction-log.d.ts +2 -0
- package/dist/tools/operations/get-transaction-log.js +63 -0
- package/dist/tools/operations/list-error-logs.d.ts +8 -0
- package/dist/tools/operations/list-error-logs.js +157 -0
- package/dist/tools/operations/save-data.d.ts +2 -0
- package/dist/tools/operations/save-data.js +50 -0
- package/dist/tools/pagination.d.ts +32 -0
- package/dist/tools/pagination.js +116 -0
- package/dist/tools/scheduling/create-chore.d.ts +2 -0
- package/dist/tools/scheduling/create-chore.js +93 -0
- package/dist/tools/scheduling/delete-chore.d.ts +2 -0
- package/dist/tools/scheduling/delete-chore.js +22 -0
- package/dist/tools/scheduling/execute-chore.d.ts +2 -0
- package/dist/tools/scheduling/execute-chore.js +52 -0
- package/dist/tools/scheduling/toggle-chore.d.ts +2 -0
- package/dist/tools/scheduling/toggle-chore.js +22 -0
- package/dist/tools/scheduling/update-chore.d.ts +2 -0
- package/dist/tools/scheduling/update-chore.js +71 -0
- package/dist/tools/schemas/common.d.ts +10 -0
- package/dist/tools/schemas/common.js +23 -0
- package/dist/tools/schemas/items-analysis.d.ts +394 -0
- package/dist/tools/schemas/items-analysis.js +419 -0
- package/dist/tools/schemas/items-cells.d.ts +70 -0
- package/dist/tools/schemas/items-cells.js +65 -0
- package/dist/tools/schemas/items-common.d.ts +18 -0
- package/dist/tools/schemas/items-common.js +39 -0
- package/dist/tools/schemas/items-fileops.d.ts +11 -0
- package/dist/tools/schemas/items-fileops.js +13 -0
- package/dist/tools/schemas/items-metadata.d.ts +262 -0
- package/dist/tools/schemas/items-metadata.js +184 -0
- package/dist/tools/schemas/items-monitoring.d.ts +79 -0
- package/dist/tools/schemas/items-monitoring.js +78 -0
- package/dist/tools/schemas/items-processes.d.ts +279 -0
- package/dist/tools/schemas/items-processes.js +235 -0
- package/dist/tools/schemas/items-scheduling.d.ts +25 -0
- package/dist/tools/schemas/items-scheduling.js +26 -0
- package/dist/tools/schemas/items-security.d.ts +19 -0
- package/dist/tools/schemas/items-security.js +12 -0
- package/dist/tools/schemas/items-subsets.d.ts +2 -0
- package/dist/tools/schemas/items-subsets.js +4 -0
- package/dist/tools/schemas/items-views.d.ts +38 -0
- package/dist/tools/schemas/items-views.js +26 -0
- package/dist/tools/schemas/items.d.ts +12 -0
- package/dist/tools/schemas/items.js +23 -0
- package/dist/tools/schemas/markdown-capable.d.ts +21 -0
- package/dist/tools/schemas/markdown-capable.js +58 -0
- package/dist/tools/schemas/output-schema.d.ts +24 -0
- package/dist/tools/schemas/output-schema.js +25 -0
- package/dist/tools/security/assign-client-group.d.ts +2 -0
- package/dist/tools/security/assign-client-group.js +20 -0
- package/dist/tools/security/create-client.d.ts +2 -0
- package/dist/tools/security/create-client.js +28 -0
- package/dist/tools/security/delete-client.d.ts +2 -0
- package/dist/tools/security/delete-client.js +22 -0
- package/dist/tools/security/get-client.d.ts +2 -0
- package/dist/tools/security/get-client.js +20 -0
- package/dist/tools/security/list-clients.d.ts +2 -0
- package/dist/tools/security/list-clients.js +86 -0
- package/dist/tools/security/list-groups.d.ts +2 -0
- package/dist/tools/security/list-groups.js +43 -0
- package/dist/tools/security/remove-client-group.d.ts +2 -0
- package/dist/tools/security/remove-client-group.js +27 -0
- package/dist/tools/security/update-client.d.ts +2 -0
- package/dist/tools/security/update-client.js +22 -0
- package/dist/tools/subsets/create-subset.d.ts +2 -0
- package/dist/tools/subsets/create-subset.js +44 -0
- package/dist/tools/subsets/delete-subset.d.ts +2 -0
- package/dist/tools/subsets/delete-subset.js +26 -0
- package/dist/tools/subsets/get-subset.d.ts +2 -0
- package/dist/tools/subsets/get-subset.js +29 -0
- package/dist/tools/subsets/list-subsets.d.ts +2 -0
- package/dist/tools/subsets/list-subsets.js +36 -0
- package/dist/tools/subsets/update-subset.d.ts +2 -0
- package/dist/tools/subsets/update-subset.js +33 -0
- package/dist/tools/ti-development/check-process-code.d.ts +2 -0
- package/dist/tools/ti-development/check-process-code.js +96 -0
- package/dist/tools/ti-development/compile-process.d.ts +2 -0
- package/dist/tools/ti-development/compile-process.js +32 -0
- package/dist/tools/ti-development/copy-process.d.ts +2 -0
- package/dist/tools/ti-development/copy-process.js +32 -0
- package/dist/tools/ti-development/delete-process.d.ts +2 -0
- package/dist/tools/ti-development/delete-process.js +26 -0
- package/dist/tools/ti-development/diff-process-with-file.d.ts +2 -0
- package/dist/tools/ti-development/diff-process-with-file.js +208 -0
- package/dist/tools/ti-development/diff-processes.d.ts +2 -0
- package/dist/tools/ti-development/diff-processes.js +312 -0
- package/dist/tools/ti-development/execute-process.d.ts +8 -0
- package/dist/tools/ti-development/execute-process.js +109 -0
- package/dist/tools/ti-development/export-process-to-git.d.ts +2 -0
- package/dist/tools/ti-development/export-process-to-git.js +113 -0
- package/dist/tools/ti-development/export-process-to-pro.d.ts +2 -0
- package/dist/tools/ti-development/export-process-to-pro.js +117 -0
- package/dist/tools/ti-development/get-all-processes-code.d.ts +2 -0
- package/dist/tools/ti-development/get-all-processes-code.js +131 -0
- package/dist/tools/ti-development/get-process-code.d.ts +2 -0
- package/dist/tools/ti-development/get-process-code.js +100 -0
- package/dist/tools/ti-development/get-process-datasource.d.ts +2 -0
- package/dist/tools/ti-development/get-process-datasource.js +20 -0
- package/dist/tools/ti-development/get-process-parameters.d.ts +2 -0
- package/dist/tools/ti-development/get-process-parameters.js +25 -0
- package/dist/tools/ti-development/get-process-variables.d.ts +2 -0
- package/dist/tools/ti-development/get-process-variables.js +38 -0
- package/dist/tools/ti-development/get-process.d.ts +2 -0
- package/dist/tools/ti-development/get-process.js +163 -0
- package/dist/tools/ti-development/import-pro-file.d.ts +2 -0
- package/dist/tools/ti-development/import-pro-file.js +153 -0
- package/dist/tools/ti-development/import-process-from-git.d.ts +2 -0
- package/dist/tools/ti-development/import-process-from-git.js +198 -0
- package/dist/tools/ti-development/install-pro-bundle.d.ts +2 -0
- package/dist/tools/ti-development/install-pro-bundle.js +288 -0
- package/dist/tools/ti-development/preflight.d.ts +39 -0
- package/dist/tools/ti-development/preflight.js +56 -0
- package/dist/tools/ti-development/process-backup.d.ts +29 -0
- package/dist/tools/ti-development/process-backup.js +118 -0
- package/dist/tools/ti-development/search-code.d.ts +2 -0
- package/dist/tools/ti-development/search-code.js +208 -0
- package/dist/tools/ti-development/upsert-process.d.ts +2 -0
- package/dist/tools/ti-development/upsert-process.js +167 -0
- package/dist/tools/ti-development/validate-process-refs.d.ts +2 -0
- package/dist/tools/ti-development/validate-process-refs.js +73 -0
- package/dist/tools/views/create-mdx-view.d.ts +2 -0
- package/dist/tools/views/create-mdx-view.js +21 -0
- package/dist/tools/views/create-native-view.d.ts +2 -0
- package/dist/tools/views/create-native-view.js +81 -0
- package/dist/tools/views/delete-view.d.ts +2 -0
- package/dist/tools/views/delete-view.js +23 -0
- package/dist/tools/views/list-views.d.ts +2 -0
- package/dist/tools/views/list-views.js +32 -0
- package/dist/tools/with-annotations.d.ts +6 -0
- package/dist/tools/with-annotations.js +339 -0
- package/dist/types.d.ts +409 -0
- package/dist/types.js +91 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.js +18 -0
- package/package.json +107 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// Chore domain service. Owns the OData calls under /api/v1/Chores(...) —
|
|
2
|
+
// listing, scheduling toggle, immediate execution, create/update/delete.
|
|
3
|
+
//
|
|
4
|
+
// See docs/ARCHITECTURE.md for the layering.
|
|
5
|
+
import { CHORE_STATUS_UNAVAILABLE, TM1Error, TM1ErrorCode, } from "../../types.js";
|
|
6
|
+
import { classifyChoreExecution } from "./chore-status.js";
|
|
7
|
+
import { rethrowIfSystemic } from "./fallback.js";
|
|
8
|
+
// OData key encoder: double ' per OData literal rules, then percent-encode.
|
|
9
|
+
const enc = (s) => encodeURIComponent(String(s).replace(/'/g, "''"));
|
|
10
|
+
function frequencyDuration(f) {
|
|
11
|
+
return `P${f.days}DT${String(f.hours).padStart(2, "0")}H${String(f.minutes).padStart(2, "0")}M${String(f.seconds).padStart(2, "0")}S`;
|
|
12
|
+
}
|
|
13
|
+
export class ChoreService {
|
|
14
|
+
http;
|
|
15
|
+
constructor(http) {
|
|
16
|
+
this.http = http;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Connection-scoped verdict on `tm1.ExecuteWithReturn` for chores: null until
|
|
20
|
+
* the first run has told us, then sticky. Only ever set to false by the
|
|
21
|
+
* proof described in `execute()` — never by a version guess.
|
|
22
|
+
*/
|
|
23
|
+
withReturnSupported = null;
|
|
24
|
+
/**
|
|
25
|
+
* List all chores with their tasks (process + parameters per step).
|
|
26
|
+
* GET /api/v1/Chores?$expand=Tasks($expand=Process($select=Name))
|
|
27
|
+
*/
|
|
28
|
+
async list() {
|
|
29
|
+
// Expand Process inside Tasks — without it, Task.Process is omitted and the map
|
|
30
|
+
// below sees undefined for every task.
|
|
31
|
+
const response = await this.http.request("GET", "/api/v1/Chores?$expand=Tasks($expand=Process($select=Name))");
|
|
32
|
+
return response.value.map((ch) => ({
|
|
33
|
+
name: ch.Name,
|
|
34
|
+
active: ch.Active,
|
|
35
|
+
startTime: ch.StartTime,
|
|
36
|
+
frequency: ch.Frequency,
|
|
37
|
+
processes: (ch.Tasks ?? []).map((t) => ({
|
|
38
|
+
name: t.Process?.Name ?? "<unknown>",
|
|
39
|
+
parameters: Object.fromEntries((t.Parameters ?? []).map((p) => [p.Name, p.Value])),
|
|
40
|
+
})),
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Activate or deactivate a chore.
|
|
45
|
+
* PATCH /api/v1/Chores('{name}') with { Active: bool }
|
|
46
|
+
*/
|
|
47
|
+
async toggleActive(choreName, active) {
|
|
48
|
+
const path = `/api/v1/Chores('${enc(choreName)}')`;
|
|
49
|
+
await this.http.request("PATCH", path, { Active: active });
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Execute a chore immediately (bypass its schedule), and report how it ended.
|
|
53
|
+
* opts.timeoutMs overrides the 30s default for chores that run long TI chains.
|
|
54
|
+
*
|
|
55
|
+
* Both actions here are SYNCHRONOUS — the POST returns when the chore is
|
|
56
|
+
* done, which is why the tool exposes a timeout ceiling of an hour. Using
|
|
57
|
+
* `tm1.ExecuteWithReturn` therefore costs no extra waiting; it only stops us
|
|
58
|
+
* throwing the status away.
|
|
59
|
+
*
|
|
60
|
+
* POST /api/v1/Chores('{name}')/tm1.ExecuteWithReturn?$expand=ErrorLogFile
|
|
61
|
+
* — v12 12.5.0 and up. `$expand` is REQUIRED: ErrorLogFile is a navigation
|
|
62
|
+
* property on ChoreExecuteResult, so without it the filename is silently
|
|
63
|
+
* absent (the same trap as ProcessService.execute).
|
|
64
|
+
* POST /api/v1/Chores('{name}')/tm1.Execute
|
|
65
|
+
* — everywhere else. Returns 204, so no status exists to report.
|
|
66
|
+
*/
|
|
67
|
+
async execute(choreName, opts) {
|
|
68
|
+
const plain = `/api/v1/Chores('${enc(choreName)}')/tm1.Execute`;
|
|
69
|
+
if (this.withReturnSupported === false) {
|
|
70
|
+
return this.executeWithoutStatus(plain, opts);
|
|
71
|
+
}
|
|
72
|
+
const withReturn = `/api/v1/Chores('${enc(choreName)}')/tm1.ExecuteWithReturn?$expand=ErrorLogFile`;
|
|
73
|
+
try {
|
|
74
|
+
const response = await this.http.request("POST", withReturn, {}, opts);
|
|
75
|
+
this.withReturnSupported = true;
|
|
76
|
+
return classifyChoreExecution(response?.ChoreExecuteStatusCode, response?.ErrorLogFile?.Filename);
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
rethrowIfSystemic(error);
|
|
80
|
+
// A build without the action answers 404 — and so does a chore that does
|
|
81
|
+
// not exist. Measured on 11.8.02900.8: the two differ only in the error
|
|
82
|
+
// PROSE ("resource can not be resolved on type 'Chore'" vs "can not be
|
|
83
|
+
// found in collection of type 'Chore'"), and prose is not something this
|
|
84
|
+
// codebase parses (a v11 server answers in the server's own language).
|
|
85
|
+
//
|
|
86
|
+
// So do not classify the 404 — retry on the plain action and let the
|
|
87
|
+
// outcome say which it was. If the chore was missing, that call 404s the
|
|
88
|
+
// same way and the error surfaces unchanged, one round-trip later. If it
|
|
89
|
+
// runs, the chore existed, which proves the 404 was about the action:
|
|
90
|
+
// record that and stop paying for the probe.
|
|
91
|
+
//
|
|
92
|
+
// Nothing can have executed here: a 404 means the request never reached
|
|
93
|
+
// an action, so the retry cannot double-run the chore.
|
|
94
|
+
if (error instanceof TM1Error &&
|
|
95
|
+
error.code === TM1ErrorCode.NOT_FOUND &&
|
|
96
|
+
this.withReturnSupported === null) {
|
|
97
|
+
const result = await this.executeWithoutStatus(plain, opts);
|
|
98
|
+
this.withReturnSupported = false;
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The statusless path: run the chore, report that nothing is known about how
|
|
106
|
+
* it ended. Deliberately NOT `{success: true}` — that claim is what this
|
|
107
|
+
* whole change exists to remove.
|
|
108
|
+
*/
|
|
109
|
+
async executeWithoutStatus(path, opts) {
|
|
110
|
+
await this.http.request("POST", path, {}, opts);
|
|
111
|
+
return {
|
|
112
|
+
success: false,
|
|
113
|
+
outcome: "indeterminate",
|
|
114
|
+
choreErrorStatus: CHORE_STATUS_UNAVAILABLE,
|
|
115
|
+
statusUnavailable: true,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Create a new chore.
|
|
120
|
+
* POST /api/v1/Chores
|
|
121
|
+
*/
|
|
122
|
+
async create(chore) {
|
|
123
|
+
const body = {
|
|
124
|
+
Name: chore.name,
|
|
125
|
+
StartTime: chore.startTime,
|
|
126
|
+
DSTSensitive: chore.dstSensitive,
|
|
127
|
+
Active: chore.active,
|
|
128
|
+
ExecutionMode: chore.executionMode,
|
|
129
|
+
Frequency: frequencyDuration(chore.frequency),
|
|
130
|
+
Tasks: chore.steps.map((step, idx) => ({
|
|
131
|
+
Step: idx,
|
|
132
|
+
"Process@odata.bind": `Processes('${enc(step.process)}')`,
|
|
133
|
+
Parameters: step.parameters.map((p) => ({
|
|
134
|
+
Name: p.name,
|
|
135
|
+
Value: p.value,
|
|
136
|
+
})),
|
|
137
|
+
})),
|
|
138
|
+
};
|
|
139
|
+
await this.http.request("POST", "/api/v1/Chores", body);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Update an existing chore (partial update).
|
|
143
|
+
* PATCH /api/v1/Chores('{name}')
|
|
144
|
+
*/
|
|
145
|
+
async update(choreName, updates) {
|
|
146
|
+
const path = `/api/v1/Chores('${enc(choreName)}')`;
|
|
147
|
+
const body = {};
|
|
148
|
+
if (updates.startTime !== undefined)
|
|
149
|
+
body.StartTime = updates.startTime;
|
|
150
|
+
if (updates.active !== undefined)
|
|
151
|
+
body.Active = updates.active;
|
|
152
|
+
if (updates.dstSensitive !== undefined)
|
|
153
|
+
body.DSTSensitive = updates.dstSensitive;
|
|
154
|
+
if (updates.executionMode !== undefined)
|
|
155
|
+
body.ExecutionMode = updates.executionMode;
|
|
156
|
+
if (updates.frequency !== undefined) {
|
|
157
|
+
body.Frequency = frequencyDuration(updates.frequency);
|
|
158
|
+
}
|
|
159
|
+
if (updates.steps !== undefined) {
|
|
160
|
+
body.Tasks = updates.steps.map((step, idx) => ({
|
|
161
|
+
Step: idx,
|
|
162
|
+
"Process@odata.bind": `Processes('${enc(step.process)}')`,
|
|
163
|
+
Parameters: step.parameters.map((p) => ({
|
|
164
|
+
Name: p.name,
|
|
165
|
+
Value: p.value,
|
|
166
|
+
})),
|
|
167
|
+
}));
|
|
168
|
+
}
|
|
169
|
+
await this.http.request("PATCH", path, body);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Delete a chore.
|
|
173
|
+
* DELETE /api/v1/Chores('{name}')
|
|
174
|
+
*/
|
|
175
|
+
async delete(choreName) {
|
|
176
|
+
await this.http.request("DELETE", `/api/v1/Chores('${enc(choreName)}')`);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=chore-service.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ChoreResult } from "../../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Turn TM1's `ChoreExecuteStatusCode` into a `ChoreResult`.
|
|
4
|
+
*
|
|
5
|
+
* Mirrors `classifyExecution`'s three fail-open guards — absent status is not
|
|
6
|
+
* success, a non-`CompletedSuccessfully` code is not a flat failure, and an
|
|
7
|
+
* unrecognised code is never a guess — but over the chore table above, not the
|
|
8
|
+
* process one.
|
|
9
|
+
*/
|
|
10
|
+
export declare function classifyChoreExecution(statusCode: string | undefined, errorLogFile: string | undefined): ChoreResult;
|
|
11
|
+
//# sourceMappingURL=chore-status.d.ts.map
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// Classification of TM1's `ChoreExecuteStatusCode`.
|
|
2
|
+
//
|
|
3
|
+
// This is NOT `process-status.ts` with different names, and the two must never
|
|
4
|
+
// be merged. A chore reports on a different axis than a process, and the codes
|
|
5
|
+
// that look identical do not mean the same thing. Measured against v12 12.5.9
|
|
6
|
+
// on 2026-08-21, with the identical TI bodies run standalone as a control:
|
|
7
|
+
//
|
|
8
|
+
// TI body in the step standalone process inside a chore
|
|
9
|
+
// ─────────────────── ─────────────────────── ─────────────────────────────
|
|
10
|
+
// (clean) CompletedSuccessfully ✓ CompletedSuccessfully ✓
|
|
11
|
+
// ItemReject CompletedWithMessages ✓ CompletedSuccessfully ✓
|
|
12
|
+
// ProcessQuit QuitCalled ✓ CompletedWithMessages ✓
|
|
13
|
+
// ProcessError Aborted ✗ CompletedWithMessages ✓
|
|
14
|
+
// CellPutN → no cube Aborted ✗ CompletedWithMessages ✓
|
|
15
|
+
// ProcessRollback RollbackCalled ✗ ProcessRollbackCalled ✗
|
|
16
|
+
// ↑ ↑
|
|
17
|
+
// ✓ = the step's writes survived the run
|
|
18
|
+
//
|
|
19
|
+
// Two findings drive everything below, and neither is guessable from the names:
|
|
20
|
+
//
|
|
21
|
+
// 1. A step that ABORTS commits its writes. `ProcessError` and a write into a
|
|
22
|
+
// missing cube both roll back when the process runs on its own; inside a
|
|
23
|
+
// chore the marker cell written just before the abort is still there
|
|
24
|
+
// afterwards, and the chore calls it `CompletedWithMessages`. Mapping
|
|
25
|
+
// chore statuses through the process table would therefore report
|
|
26
|
+
// `rolled_back` for a run that committed — the exact fail-open T-4 closed
|
|
27
|
+
// for processes, reintroduced from the other side.
|
|
28
|
+
//
|
|
29
|
+
// 2. Chores do NOT stop at a failing step. With the failing process as step 1
|
|
30
|
+
// and a clean writer as step 2, step 2 ran and committed in every case, in
|
|
31
|
+
// both execution modes. (`tm1_execute_chore` used to tell callers the
|
|
32
|
+
// opposite.)
|
|
33
|
+
//
|
|
34
|
+
// `ProcessRollbackCalled` is the only status that reports discarded writes, and
|
|
35
|
+
// how much it discards is the one place `ExecutionMode` shows through:
|
|
36
|
+
// SingleCommit — everything the chore had written up to that point is gone.
|
|
37
|
+
// MultipleCommit — only the rolling-back step's own writes are gone.
|
|
38
|
+
// Later steps run and commit under both. Measured in both modes.
|
|
39
|
+
import { CHORE_STATUS_UNKNOWN } from "../../types.js";
|
|
40
|
+
/**
|
|
41
|
+
* Statuses observed on a run whose writes were COMMITTED.
|
|
42
|
+
*
|
|
43
|
+
* `CompletedWithMessages` is what a chore returns for a step that quit AND for
|
|
44
|
+
* a step that aborted — the two are indistinguishable at chore level, so a
|
|
45
|
+
* caller who needs to know which step did what has to read the chore log.
|
|
46
|
+
*/
|
|
47
|
+
const COMMITTED_STATUSES = new Set([
|
|
48
|
+
"CompletedWithMessages",
|
|
49
|
+
]);
|
|
50
|
+
/** Statuses observed on a run whose writes were DISCARDED. */
|
|
51
|
+
const ROLLED_BACK_STATUSES = new Set([
|
|
52
|
+
"ProcessRollbackCalled",
|
|
53
|
+
]);
|
|
54
|
+
/**
|
|
55
|
+
* Members of `tm1.ChoreExecuteStatusCode` that the measurement never produced.
|
|
56
|
+
*
|
|
57
|
+
* They are declared in v12's `$metadata`, so they are real names, but no TI
|
|
58
|
+
* exit path drove a chore to any of them: `ProcessQuit` surfaced as
|
|
59
|
+
* `CompletedWithMessages`, `ProcessError` likewise, `ProcessRollback` as
|
|
60
|
+
* `ProcessRollbackCalled`. Whether `Aborted`, `RollbackCalled` or a chore-level
|
|
61
|
+
* `QuitCalled` commit is therefore UNMEASURED, and this file does not guess:
|
|
62
|
+
* the whole reason the two tables are separate is that the obvious reading —
|
|
63
|
+
* "Aborted must mean rolled back, it does for processes" — is demonstrably
|
|
64
|
+
* wrong one line up. They classify as `indeterminate` with that said out loud.
|
|
65
|
+
*/
|
|
66
|
+
const DECLARED_BUT_UNOBSERVED = new Set([
|
|
67
|
+
"QuitCalled",
|
|
68
|
+
"Aborted",
|
|
69
|
+
"RollbackCalled",
|
|
70
|
+
]);
|
|
71
|
+
/**
|
|
72
|
+
* Turn TM1's `ChoreExecuteStatusCode` into a `ChoreResult`.
|
|
73
|
+
*
|
|
74
|
+
* Mirrors `classifyExecution`'s three fail-open guards — absent status is not
|
|
75
|
+
* success, a non-`CompletedSuccessfully` code is not a flat failure, and an
|
|
76
|
+
* unrecognised code is never a guess — but over the chore table above, not the
|
|
77
|
+
* process one.
|
|
78
|
+
*/
|
|
79
|
+
export function classifyChoreExecution(statusCode, errorLogFile) {
|
|
80
|
+
if (statusCode === undefined || statusCode === "") {
|
|
81
|
+
return {
|
|
82
|
+
success: false,
|
|
83
|
+
outcome: "indeterminate",
|
|
84
|
+
choreErrorStatus: CHORE_STATUS_UNKNOWN,
|
|
85
|
+
errorLogFile,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (statusCode === "CompletedSuccessfully") {
|
|
89
|
+
return {
|
|
90
|
+
success: true,
|
|
91
|
+
outcome: "succeeded",
|
|
92
|
+
choreErrorStatus: "CompletedSuccessfully",
|
|
93
|
+
errorLogFile,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
if (COMMITTED_STATUSES.has(statusCode)) {
|
|
97
|
+
return {
|
|
98
|
+
success: false,
|
|
99
|
+
outcome: "completed_with_errors",
|
|
100
|
+
choreErrorStatus: statusCode,
|
|
101
|
+
errorLogFile,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (ROLLED_BACK_STATUSES.has(statusCode)) {
|
|
105
|
+
return {
|
|
106
|
+
success: false,
|
|
107
|
+
outcome: "rolled_back",
|
|
108
|
+
choreErrorStatus: statusCode,
|
|
109
|
+
errorLogFile,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
if (DECLARED_BUT_UNOBSERVED.has(statusCode)) {
|
|
113
|
+
return {
|
|
114
|
+
success: false,
|
|
115
|
+
outcome: "indeterminate",
|
|
116
|
+
choreErrorStatus: `${statusCode}: declared in tm1.ChoreExecuteStatusCode but never produced by any measured chore exit path, so whether a chore ending this way commits its writes is unknown. Chore statuses do NOT follow the process ones — a chore step that aborts reports CompletedWithMessages and COMMITS. Verify server state before re-running.`,
|
|
117
|
+
errorLogFile,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
success: false,
|
|
122
|
+
outcome: "indeterminate",
|
|
123
|
+
choreErrorStatus: `${statusCode}: unrecognised ChoreExecuteStatusCode — this build does not know whether a chore ending this way commits its changes. Verify server state before re-running.`,
|
|
124
|
+
errorLogFile,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=chore-status.js.map
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { Cube, CubeRules, RuleSyntaxError } from "../../types.js";
|
|
2
|
+
import type { TM1HttpClient } from "../http.js";
|
|
3
|
+
import { type NameFilterOpts, type Paged, type PageOpts } from "./odata-page.js";
|
|
4
|
+
export interface AllRulesOpts {
|
|
5
|
+
/** Include control cubes (`}`-prefixed). Default false. */
|
|
6
|
+
includeControl?: boolean;
|
|
7
|
+
/** Also expand each cube's ordered dimension names into `CubeRules.dimensions`. */
|
|
8
|
+
withDimensions?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface CubeListOpts extends NameFilterOpts {
|
|
11
|
+
includeRules?: boolean;
|
|
12
|
+
/** Set to slice server-side. Only legal when every active filter is in NameFilterOpts. */
|
|
13
|
+
page?: PageOpts;
|
|
14
|
+
}
|
|
15
|
+
export declare class CubeService {
|
|
16
|
+
private readonly http;
|
|
17
|
+
constructor(http: TM1HttpClient);
|
|
18
|
+
/**
|
|
19
|
+
* List all cubes with their dimension names.
|
|
20
|
+
* GET /api/v1/Cubes?$expand=Dimensions($select=Name)
|
|
21
|
+
*
|
|
22
|
+
* opts.includeRules adds Rules text to the OData $select so we can derive
|
|
23
|
+
* hasRules per cube in a single round-trip (no N+1).
|
|
24
|
+
*/
|
|
25
|
+
list(opts?: {
|
|
26
|
+
includeRules?: boolean;
|
|
27
|
+
}): Promise<Cube[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Paged variant: with `page` set the slice happens server-side
|
|
30
|
+
* (`$orderby=Name&$top&$skip&$count=true`) and the return carries the
|
|
31
|
+
* post-`$filter` total so the caller can build an honest `Page<T>`.
|
|
32
|
+
* `total` is undefined if the server omitted `@odata.count` — fall back to
|
|
33
|
+
* an unpaged fetch then.
|
|
34
|
+
*/
|
|
35
|
+
list(opts: CubeListOpts & {
|
|
36
|
+
page: PageOpts;
|
|
37
|
+
}): Promise<Paged<Cube>>;
|
|
38
|
+
/**
|
|
39
|
+
* Return ordered dimension-name list of a cube.
|
|
40
|
+
* GET /api/v1/Cubes('{name}')?$expand=Dimensions($select=Name)
|
|
41
|
+
*/
|
|
42
|
+
getDimensionNames(cubeName: string): Promise<string[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Cheap existence probe: a single GET with $select=Name (404 → false)
|
|
45
|
+
* instead of list(), which pulls every cube plus its dimensions just to
|
|
46
|
+
* check one name. Rethrows anything that isn't NOT_FOUND — in particular a
|
|
47
|
+
* denial, which is "you may not look", not "it is not there".
|
|
48
|
+
*
|
|
49
|
+
* Structural on purpose. The alternative — reading existence out of the
|
|
50
|
+
* error sentence of a failed query — is wrong on any server whose version
|
|
51
|
+
* or locale words that sentence differently, and TM1 does both.
|
|
52
|
+
* GET /api/v1/Cubes('{name}')?$select=Name
|
|
53
|
+
*/
|
|
54
|
+
exists(cubeName: string): Promise<boolean>;
|
|
55
|
+
/**
|
|
56
|
+
* Create a new cube with the given dimensions (in order).
|
|
57
|
+
* POST /api/v1/Cubes
|
|
58
|
+
*/
|
|
59
|
+
create(name: string, dimensionNames: string[]): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Delete a cube.
|
|
62
|
+
* DELETE /api/v1/Cubes('{name}')
|
|
63
|
+
*/
|
|
64
|
+
delete(name: string): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Get the rules text for a cube.
|
|
67
|
+
* GET /api/v1/Cubes('{name}')/Rules
|
|
68
|
+
*/
|
|
69
|
+
getRules(cubeName: string): Promise<CubeRules>;
|
|
70
|
+
/**
|
|
71
|
+
* Bulk-fetch rules for every cube in a single round trip.
|
|
72
|
+
* GET /api/v1/Cubes?$select=Name,Rules
|
|
73
|
+
* Control cubes (Name starts with `}`) excluded unless includeControl=true.
|
|
74
|
+
*
|
|
75
|
+
* With `top` set the cap is pushed server-side ($top + $orderby=Name for
|
|
76
|
+
* stable ordering + $count=true) and the return carries the server-side
|
|
77
|
+
* total matching the filter so callers can report truncation honestly.
|
|
78
|
+
*
|
|
79
|
+
* `withDimensions` adds `$expand=Dimensions($select=Name)` to the same
|
|
80
|
+
* request. A caller that needs a cube's dimension order per rule — the
|
|
81
|
+
* feeder audit does — would otherwise issue one getDimensionNames() per
|
|
82
|
+
* rule-bearing cube. Opt-in, because the callers that only read rules text
|
|
83
|
+
* should not pay for the expansion.
|
|
84
|
+
*/
|
|
85
|
+
getAllRules(includeControl?: boolean): Promise<CubeRules[]>;
|
|
86
|
+
getAllRules(includeControl: boolean, top: number): Promise<{
|
|
87
|
+
items: CubeRules[];
|
|
88
|
+
/** Server-side total ($count=true); undefined when the server omitted @odata.count. */
|
|
89
|
+
total: number | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
getAllRules(opts: AllRulesOpts): Promise<CubeRules[]>;
|
|
92
|
+
/**
|
|
93
|
+
* Create or replace the rules for a cube.
|
|
94
|
+
* TM1 11.8 sets rules by PATCHing the Cube entity ({Rules: "...text..."}).
|
|
95
|
+
* PATCH/POST on /Cubes('{name}')/Rules returns 400 "not supported".
|
|
96
|
+
*
|
|
97
|
+
* There is no skipcheck switch to pass: SKIPCHECK is a line inside the rules
|
|
98
|
+
* text, so it travels in `rulesText` like every other statement.
|
|
99
|
+
*/
|
|
100
|
+
updateRules(cubeName: string, rulesText: string): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Validate cube rule syntax without applying. Empty array = valid.
|
|
103
|
+
* POST /api/v1/Cubes('{name}')/tm1.CheckRules with { Rules: "..." }
|
|
104
|
+
*/
|
|
105
|
+
checkRule(cubeName: string, ruleText: string): Promise<RuleSyntaxError[]>;
|
|
106
|
+
/**
|
|
107
|
+
* Clear cube cells.
|
|
108
|
+
*
|
|
109
|
+
* A **full** clear runs an ephemeral TI with CubeClearData(). tm1.Clear is
|
|
110
|
+
* not an alternative on either build: 11.8 and 12.5 both answer
|
|
111
|
+
* "'tm1.Clear' resource can not be resolved on type 'Cube'" for a cube that
|
|
112
|
+
* exists, and neither declares a clear action anywhere in $metadata — Cube
|
|
113
|
+
* carries only Lock and Unlock. CubeClearData() is the only route measured
|
|
114
|
+
* to work.
|
|
115
|
+
*
|
|
116
|
+
* A **partial** clear would need tuple selectors, which only tm1.Clear
|
|
117
|
+
* offers, so no server reachable here can do one. Callers get
|
|
118
|
+
* UNSUPPORTED_OPERATION pointing at bedrock `}bedrock.cube.data.clear`
|
|
119
|
+
* rather than a request that is known to 404.
|
|
120
|
+
*/
|
|
121
|
+
clear(cubeName: string, dimensions: string[], tuples: string[][]): Promise<void>;
|
|
122
|
+
/** Same verdict for both versions: no tuple-selective clear on this server. */
|
|
123
|
+
private partialClearUnsupported;
|
|
124
|
+
/**
|
|
125
|
+
* Unload a cube from memory. Forces TM1 to discard the in-memory fed-cell
|
|
126
|
+
* index and reload from disk on next access. Required for feeder corrections
|
|
127
|
+
* to take effect — the fed-cell index is cumulative, so changes to existing
|
|
128
|
+
* feeders only become visible after an unload.
|
|
129
|
+
* POST /api/v1/Cubes('{cube}')/tm1.Unload
|
|
130
|
+
*/
|
|
131
|
+
unload(cubeName: string): Promise<void>;
|
|
132
|
+
private clearViaTI;
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=cube-service.d.ts.map
|