@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,46 @@
|
|
|
1
|
+
import type { CubeView, NativeViewCreate, ViewDefinition, ViewResult } from "../../types.js";
|
|
2
|
+
import type { RequestOptions, TM1HttpClient } from "../http.js";
|
|
3
|
+
export declare class ViewService {
|
|
4
|
+
private readonly http;
|
|
5
|
+
constructor(http: TM1HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* List public + private views on a cube. Each view's MDX is included if it
|
|
8
|
+
* is an MDXView; native views surface with mdx=undefined.
|
|
9
|
+
* GET /api/v1/Cubes('{c}')/Views + /PrivateViews
|
|
10
|
+
*/
|
|
11
|
+
list(cubeName: string): Promise<CubeView[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Execute a named view and return its cells + axes. Cells paginate
|
|
14
|
+
* server-side via $top/$skip (mirrors CellService.executeMdx) so wide/tall
|
|
15
|
+
* views don't dump their whole cellset; totalCellCount stays exact (product
|
|
16
|
+
* of axis tuple counts) regardless of the slice.
|
|
17
|
+
* POST /api/v1/Cubes('{c}')/Views('{v}')/tm1.Execute
|
|
18
|
+
*/
|
|
19
|
+
getView(cubeName: string, viewName: string, top?: number, skip?: number, opts?: RequestOptions): Promise<ViewResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Return the structural definition of a view (MDX expression OR native
|
|
22
|
+
* axes) WITHOUT executing it. Auto-falls back from public to private when
|
|
23
|
+
* isPrivate is undefined.
|
|
24
|
+
* GET /api/v1/Cubes('X')/Views('Y') with tm1.NativeView/* expands.
|
|
25
|
+
*/
|
|
26
|
+
getDefinition(cubeName: string, viewName: string, isPrivate?: boolean): Promise<ViewDefinition>;
|
|
27
|
+
/**
|
|
28
|
+
* Create a public MDX-based view on a cube.
|
|
29
|
+
* POST /api/v1/Cubes('{c}')/Views with @odata.type = #ibm.tm1.api.v1.MDXView
|
|
30
|
+
*/
|
|
31
|
+
createMdx(cubeName: string, viewName: string, mdx: string): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Create a public native view on a cube. Each axis entry references exactly
|
|
34
|
+
* one subset source: a registered subset (`subset`), an MDX expression
|
|
35
|
+
* (`expression`), or an explicit element list (`elements`). The latter two
|
|
36
|
+
* create anonymous (view-private) subsets server-side.
|
|
37
|
+
* POST /api/v1/Cubes('{c}')/Views with @odata.type = #ibm.tm1.api.v1.NativeView
|
|
38
|
+
*/
|
|
39
|
+
createNative(cubeName: string, viewName: string, spec: NativeViewCreate): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Delete a public view from a cube.
|
|
42
|
+
* DELETE /api/v1/Cubes('{c}')/Views('{v}')
|
|
43
|
+
*/
|
|
44
|
+
delete(cubeName: string, viewName: string): Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=view-service.d.ts.map
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
// View domain service. Owns the OData calls under
|
|
2
|
+
// /api/v1/Cubes('{c}')/Views and /PrivateViews — list, create (MDX-based),
|
|
3
|
+
// delete, execute (getView), and the structural definition (getDefinition)
|
|
4
|
+
// that returns either MDX or NativeView (titles/columns/rows) without
|
|
5
|
+
// executing.
|
|
6
|
+
//
|
|
7
|
+
// See docs/ARCHITECTURE.md for the layering.
|
|
8
|
+
import { TM1Error, TM1ErrorCode } from "../../types.js";
|
|
9
|
+
import { freeCellset, transformCellsetResponse } from "./cellset-transform.js";
|
|
10
|
+
import { rethrowIfSystemicOrDenied } from "./fallback.js";
|
|
11
|
+
// OData key encoder: double ' per OData literal rules, then percent-encode.
|
|
12
|
+
const enc = (s) => encodeURIComponent(String(s).replace(/'/g, "''"));
|
|
13
|
+
export class ViewService {
|
|
14
|
+
http;
|
|
15
|
+
constructor(http) {
|
|
16
|
+
this.http = http;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* List public + private views on a cube. Each view's MDX is included if it
|
|
20
|
+
* is an MDXView; native views surface with mdx=undefined.
|
|
21
|
+
* GET /api/v1/Cubes('{c}')/Views + /PrivateViews
|
|
22
|
+
*/
|
|
23
|
+
async list(cubeName) {
|
|
24
|
+
// Public and private scopes are independent collections — issue both at
|
|
25
|
+
// once instead of paying two serial round-trips. Each keeps its own
|
|
26
|
+
// rethrow/swallow behaviour, and the results are concatenated in the
|
|
27
|
+
// original order (public first), so callers see no change but the wait.
|
|
28
|
+
//
|
|
29
|
+
// MDX stays in the $select: tm1_list_views advertises it as part of the
|
|
30
|
+
// response, so dropping it to save bytes would be a breaking output change,
|
|
31
|
+
// not an optimisation.
|
|
32
|
+
const fetchScope = async (collection, isPrivate) => {
|
|
33
|
+
try {
|
|
34
|
+
const res = await this.http.request("GET", `/api/v1/Cubes('${enc(cubeName)}')/${collection}?$select=Name,MDX`);
|
|
35
|
+
return res.value.map((v) => ({
|
|
36
|
+
name: v.Name,
|
|
37
|
+
mdx: v.MDX,
|
|
38
|
+
private: isPrivate,
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
// T-9: an empty list here is indistinguishable from "this cube has no
|
|
43
|
+
// views", so a denial must NOT be swallowed — "you may not see them" is
|
|
44
|
+
// a different answer and the caller has to be told. Same reasoning the
|
|
45
|
+
// transaction-log window already uses. What stays swallowed is the case
|
|
46
|
+
// the catch was written for: a scope this server does not expose at all
|
|
47
|
+
// (404 on /PrivateViews), which really is "not there".
|
|
48
|
+
rethrowIfSystemicOrDenied(e);
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const [pub, priv] = await Promise.all([
|
|
53
|
+
fetchScope("Views", false),
|
|
54
|
+
fetchScope("PrivateViews", true),
|
|
55
|
+
]);
|
|
56
|
+
return [...pub, ...priv];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Execute a named view and return its cells + axes. Cells paginate
|
|
60
|
+
* server-side via $top/$skip (mirrors CellService.executeMdx) so wide/tall
|
|
61
|
+
* views don't dump their whole cellset; totalCellCount stays exact (product
|
|
62
|
+
* of axis tuple counts) regardless of the slice.
|
|
63
|
+
* POST /api/v1/Cubes('{c}')/Views('{v}')/tm1.Execute
|
|
64
|
+
*/
|
|
65
|
+
async getView(cubeName, viewName, top, skip, opts) {
|
|
66
|
+
let cellsExpand = "Cells($select=Value,FormattedValue";
|
|
67
|
+
if (top !== undefined)
|
|
68
|
+
cellsExpand += `;$top=${top}`;
|
|
69
|
+
if (skip !== undefined)
|
|
70
|
+
cellsExpand += `;$skip=${skip}`;
|
|
71
|
+
cellsExpand += ")";
|
|
72
|
+
const axesExpand = "Axes($expand=Tuples($expand=Members($select=Name;$expand=Hierarchy($select=Name))))";
|
|
73
|
+
const path = `/api/v1/Cubes('${enc(cubeName)}')/Views('${enc(viewName)}')/tm1.Execute?$expand=${cellsExpand},${axesExpand}`;
|
|
74
|
+
const response = await this.http.request("POST", path, undefined, opts);
|
|
75
|
+
try {
|
|
76
|
+
const mdxResult = transformCellsetResponse(response);
|
|
77
|
+
return {
|
|
78
|
+
cubeName,
|
|
79
|
+
viewName,
|
|
80
|
+
cells: mdxResult.cells,
|
|
81
|
+
axes: mdxResult.axes,
|
|
82
|
+
totalCellCount: mdxResult.totalCellCount,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
// Cellsets are session-scoped and never auto-expire while keep-alive holds
|
|
87
|
+
// the session open; free the read-path cellset best-effort so it doesn't
|
|
88
|
+
// leak TM1 server memory indefinitely (mirrors TM1py's delete_cellset).
|
|
89
|
+
await freeCellset(this.http, response.ID, opts);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Return the structural definition of a view (MDX expression OR native
|
|
94
|
+
* axes) WITHOUT executing it. Auto-falls back from public to private when
|
|
95
|
+
* isPrivate is undefined.
|
|
96
|
+
* GET /api/v1/Cubes('X')/Views('Y') with tm1.NativeView/* expands.
|
|
97
|
+
*/
|
|
98
|
+
async getDefinition(cubeName, viewName, isPrivate) {
|
|
99
|
+
const fetchBase = async (segment) => {
|
|
100
|
+
const path = `/api/v1/Cubes('${enc(cubeName)}')/${segment}('${enc(viewName)}')?$select=Name,MDX`;
|
|
101
|
+
return this.http.request("GET", path);
|
|
102
|
+
};
|
|
103
|
+
const order = isPrivate === true
|
|
104
|
+
? [{ seg: "PrivateViews", priv: true }]
|
|
105
|
+
: isPrivate === false
|
|
106
|
+
? [{ seg: "Views", priv: false }]
|
|
107
|
+
: [
|
|
108
|
+
{ seg: "Views", priv: false },
|
|
109
|
+
{ seg: "PrivateViews", priv: true },
|
|
110
|
+
];
|
|
111
|
+
let base = null;
|
|
112
|
+
let resolvedSeg = "Views";
|
|
113
|
+
let resolvedPrivate = false;
|
|
114
|
+
let lastErr = null;
|
|
115
|
+
for (const { seg, priv } of order) {
|
|
116
|
+
try {
|
|
117
|
+
base = await fetchBase(seg);
|
|
118
|
+
resolvedSeg = seg;
|
|
119
|
+
resolvedPrivate = priv;
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
catch (e) {
|
|
123
|
+
lastErr = e;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (!base) {
|
|
127
|
+
if (lastErr instanceof TM1Error)
|
|
128
|
+
throw lastErr;
|
|
129
|
+
throw new TM1Error({
|
|
130
|
+
code: TM1ErrorCode.NOT_FOUND,
|
|
131
|
+
message: `View not found: ${cubeName}/${viewName}`,
|
|
132
|
+
endpoint: `/api/v1/Cubes('${cubeName}')/Views('${viewName}')`,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
const isMdx = typeof base.MDX === "string" && base.MDX.length > 0;
|
|
136
|
+
if (isMdx) {
|
|
137
|
+
return {
|
|
138
|
+
cubeName,
|
|
139
|
+
viewName,
|
|
140
|
+
private: resolvedPrivate,
|
|
141
|
+
type: "MDX",
|
|
142
|
+
mdx: base.MDX,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
// Titles/Columns/Rows are complex-type collections — TM1 11.8 rejects
|
|
146
|
+
// parenthesized expand options directly on them ("Expecting '/' after
|
|
147
|
+
// property of complex type in expand path") AND pure path form past the
|
|
148
|
+
// entity ("Expecting qualified entity type"). Working syntax
|
|
149
|
+
// (live-verified on 11.8): path through the complex part, parenthesized
|
|
150
|
+
// options from the first entity (Subset) on.
|
|
151
|
+
const subsetExpand = "Subset($expand=Hierarchy($expand=Dimension))";
|
|
152
|
+
const nativeExpand = [
|
|
153
|
+
`Titles/${subsetExpand}`,
|
|
154
|
+
"Titles/Selected",
|
|
155
|
+
`Columns/${subsetExpand}`,
|
|
156
|
+
`Rows/${subsetExpand}`,
|
|
157
|
+
].join(",");
|
|
158
|
+
const nativePath = `/api/v1/Cubes('${enc(cubeName)}')/${resolvedSeg}('${enc(viewName)}')/tm1.NativeView?$expand=${nativeExpand}`;
|
|
159
|
+
let native;
|
|
160
|
+
try {
|
|
161
|
+
native = await this.http.request("GET", nativePath);
|
|
162
|
+
}
|
|
163
|
+
catch (e) {
|
|
164
|
+
if (e instanceof TM1Error && e.httpStatus === 404) {
|
|
165
|
+
return {
|
|
166
|
+
cubeName,
|
|
167
|
+
viewName,
|
|
168
|
+
private: resolvedPrivate,
|
|
169
|
+
type: "Native",
|
|
170
|
+
native: { titles: [], columns: [], rows: [] },
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
throw e;
|
|
174
|
+
}
|
|
175
|
+
const mapAxis = (a) => {
|
|
176
|
+
const s = a.Subset ?? {};
|
|
177
|
+
return {
|
|
178
|
+
dimensionName: s.Hierarchy?.Dimension?.Name,
|
|
179
|
+
hierarchyName: s.Hierarchy?.Name,
|
|
180
|
+
subsetName: s.Name && s.Name.length > 0 ? s.Name : undefined,
|
|
181
|
+
expression: s.Expression && s.Expression.length > 0 ? s.Expression : undefined,
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
const mapTitle = (t) => ({
|
|
185
|
+
...mapAxis(t),
|
|
186
|
+
selectedElement: t.Selected?.Name,
|
|
187
|
+
});
|
|
188
|
+
return {
|
|
189
|
+
cubeName,
|
|
190
|
+
viewName,
|
|
191
|
+
private: resolvedPrivate,
|
|
192
|
+
type: "Native",
|
|
193
|
+
native: {
|
|
194
|
+
titles: (native.Titles ?? []).map(mapTitle),
|
|
195
|
+
columns: (native.Columns ?? []).map(mapAxis),
|
|
196
|
+
rows: (native.Rows ?? []).map(mapAxis),
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Create a public MDX-based view on a cube.
|
|
202
|
+
* POST /api/v1/Cubes('{c}')/Views with @odata.type = #ibm.tm1.api.v1.MDXView
|
|
203
|
+
*/
|
|
204
|
+
async createMdx(cubeName, viewName, mdx) {
|
|
205
|
+
await this.http.request("POST", `/api/v1/Cubes('${enc(cubeName)}')/Views`, {
|
|
206
|
+
"@odata.type": "#ibm.tm1.api.v1.MDXView",
|
|
207
|
+
Name: viewName,
|
|
208
|
+
MDX: mdx,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Create a public native view on a cube. Each axis entry references exactly
|
|
213
|
+
* one subset source: a registered subset (`subset`), an MDX expression
|
|
214
|
+
* (`expression`), or an explicit element list (`elements`). The latter two
|
|
215
|
+
* create anonymous (view-private) subsets server-side.
|
|
216
|
+
* POST /api/v1/Cubes('{c}')/Views with @odata.type = #ibm.tm1.api.v1.NativeView
|
|
217
|
+
*/
|
|
218
|
+
async createNative(cubeName, viewName, spec) {
|
|
219
|
+
const hierPath = (a) => `Dimensions('${enc(a.dimension)}')/Hierarchies('${enc(a.hierarchy ?? a.dimension)}')`;
|
|
220
|
+
const mapAxis = (a) => {
|
|
221
|
+
const sources = [a.subset, a.expression, a.elements].filter((s) => s !== undefined);
|
|
222
|
+
if (sources.length !== 1) {
|
|
223
|
+
throw new TM1Error({
|
|
224
|
+
code: TM1ErrorCode.VALIDATION_ERROR,
|
|
225
|
+
message: `Axis spec for dimension '${a.dimension}' must set exactly one of ` +
|
|
226
|
+
`subset, expression, or elements.`,
|
|
227
|
+
endpoint: `/api/v1/Cubes('${cubeName}')/Views`,
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
if (a.subset !== undefined) {
|
|
231
|
+
return {
|
|
232
|
+
"Subset@odata.bind": `${hierPath(a)}/Subsets('${enc(a.subset)}')`,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
if (a.expression !== undefined) {
|
|
236
|
+
return {
|
|
237
|
+
Subset: {
|
|
238
|
+
"Hierarchy@odata.bind": hierPath(a),
|
|
239
|
+
Expression: a.expression,
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
return {
|
|
244
|
+
Subset: {
|
|
245
|
+
"Hierarchy@odata.bind": hierPath(a),
|
|
246
|
+
"Elements@odata.bind": (a.elements ?? []).map((e) => `${hierPath(a)}/Elements('${enc(e)}')`),
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
const mapTitle = (t) => {
|
|
251
|
+
// TM1 rejects title subsets without a selected element (400: "Selected
|
|
252
|
+
// element was not specified on Title axis subset.") — fail fast here.
|
|
253
|
+
if (t.selected === undefined) {
|
|
254
|
+
throw new TM1Error({
|
|
255
|
+
code: TM1ErrorCode.VALIDATION_ERROR,
|
|
256
|
+
message: `Title spec for dimension '${t.dimension}' requires a selected element ` +
|
|
257
|
+
`(TM1 rejects title subsets without one).`,
|
|
258
|
+
endpoint: `/api/v1/Cubes('${cubeName}')/Views`,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
const axis = mapAxis(t);
|
|
262
|
+
axis["Selected@odata.bind"] =
|
|
263
|
+
`${hierPath(t)}/Elements('${enc(t.selected)}')`;
|
|
264
|
+
return axis;
|
|
265
|
+
};
|
|
266
|
+
const body = {
|
|
267
|
+
"@odata.type": "#ibm.tm1.api.v1.NativeView",
|
|
268
|
+
Name: viewName,
|
|
269
|
+
Columns: spec.columns.map(mapAxis),
|
|
270
|
+
Rows: spec.rows.map(mapAxis),
|
|
271
|
+
Titles: (spec.titles ?? []).map(mapTitle),
|
|
272
|
+
SuppressEmptyColumns: spec.suppressEmptyColumns ?? false,
|
|
273
|
+
SuppressEmptyRows: spec.suppressEmptyRows ?? false,
|
|
274
|
+
};
|
|
275
|
+
if (spec.formatString !== undefined)
|
|
276
|
+
body.FormatString = spec.formatString;
|
|
277
|
+
await this.http.request("POST", `/api/v1/Cubes('${enc(cubeName)}')/Views`, body);
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Delete a public view from a cube.
|
|
281
|
+
* DELETE /api/v1/Cubes('{c}')/Views('{v}')
|
|
282
|
+
*/
|
|
283
|
+
async delete(cubeName, viewName) {
|
|
284
|
+
await this.http.request("DELETE", `/api/v1/Cubes('${enc(cubeName)}')/Views('${enc(viewName)}')`);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
//# sourceMappingURL=view-service.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type pino from "pino";
|
|
2
|
+
import type { TM1Config } from "./config.js";
|
|
3
|
+
import type { SessionManager } from "./session-manager.js";
|
|
4
|
+
import { BatchService } from "./tm1-client/services/batch-service.js";
|
|
5
|
+
import { CubeService } from "./tm1-client/services/cube-service.js";
|
|
6
|
+
import { DimensionService } from "./tm1-client/services/dimension-service.js";
|
|
7
|
+
import { HierarchyService } from "./tm1-client/services/hierarchy-service.js";
|
|
8
|
+
import { ElementService } from "./tm1-client/services/element-service.js";
|
|
9
|
+
import { CellService } from "./tm1-client/services/cell-service.js";
|
|
10
|
+
import { ViewService } from "./tm1-client/services/view-service.js";
|
|
11
|
+
import { SubsetService } from "./tm1-client/services/subset-service.js";
|
|
12
|
+
import { ProcessService } from "./tm1-client/services/process-service.js";
|
|
13
|
+
import { ChoreService } from "./tm1-client/services/chore-service.js";
|
|
14
|
+
import { SecurityService } from "./tm1-client/services/security-service.js";
|
|
15
|
+
import { ServerService } from "./tm1-client/services/server-service.js";
|
|
16
|
+
import { MonitoringService } from "./tm1-client/services/monitoring-service.js";
|
|
17
|
+
import { FileService } from "./tm1-client/services/file-service.js";
|
|
18
|
+
export declare class TM1Client {
|
|
19
|
+
private connected;
|
|
20
|
+
private readonly http;
|
|
21
|
+
private readonly sessionManager;
|
|
22
|
+
private readonly logger;
|
|
23
|
+
private readonly config;
|
|
24
|
+
readonly batch: BatchService;
|
|
25
|
+
readonly cubes: CubeService;
|
|
26
|
+
readonly dimensions: DimensionService;
|
|
27
|
+
readonly hierarchies: HierarchyService;
|
|
28
|
+
readonly cells: CellService;
|
|
29
|
+
readonly views: ViewService;
|
|
30
|
+
readonly subsets: SubsetService;
|
|
31
|
+
readonly elements: ElementService;
|
|
32
|
+
readonly processes: ProcessService;
|
|
33
|
+
readonly chores: ChoreService;
|
|
34
|
+
readonly security: SecurityService;
|
|
35
|
+
readonly server: ServerService;
|
|
36
|
+
readonly monitoring: MonitoringService;
|
|
37
|
+
readonly files: FileService;
|
|
38
|
+
constructor(config: TM1Config, sessionManager: SessionManager, logger: pino.Logger);
|
|
39
|
+
/** The configured TM1 major version (11 or 12). Fixed for this connection. */
|
|
40
|
+
get version(): 11 | 12;
|
|
41
|
+
/**
|
|
42
|
+
* Stable label for this connection, used to keep per-connection files (the
|
|
43
|
+
* process backups) apart: host and port, plus the v12 instance/database.
|
|
44
|
+
*/
|
|
45
|
+
get connectionId(): string;
|
|
46
|
+
/**
|
|
47
|
+
* Authenticate and start the keep-alive timer.
|
|
48
|
+
*/
|
|
49
|
+
connect(): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Stop the keep-alive timer and mark as disconnected.
|
|
52
|
+
*/
|
|
53
|
+
disconnect(): Promise<void>;
|
|
54
|
+
isConnected(): boolean;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=tm1-client.d.ts.map
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { TM1HttpClient } from "./tm1-client/http.js";
|
|
2
|
+
import { BatchService } from "./tm1-client/services/batch-service.js";
|
|
3
|
+
import { CubeService } from "./tm1-client/services/cube-service.js";
|
|
4
|
+
import { DimensionService } from "./tm1-client/services/dimension-service.js";
|
|
5
|
+
import { HierarchyService } from "./tm1-client/services/hierarchy-service.js";
|
|
6
|
+
import { ElementService } from "./tm1-client/services/element-service.js";
|
|
7
|
+
import { CellService } from "./tm1-client/services/cell-service.js";
|
|
8
|
+
import { ViewService } from "./tm1-client/services/view-service.js";
|
|
9
|
+
import { SubsetService } from "./tm1-client/services/subset-service.js";
|
|
10
|
+
import { ProcessService } from "./tm1-client/services/process-service.js";
|
|
11
|
+
import { ChoreService } from "./tm1-client/services/chore-service.js";
|
|
12
|
+
import { SecurityService } from "./tm1-client/services/security-service.js";
|
|
13
|
+
import { ServerService } from "./tm1-client/services/server-service.js";
|
|
14
|
+
import { MonitoringService } from "./tm1-client/services/monitoring-service.js";
|
|
15
|
+
import { FileService } from "./tm1-client/services/file-service.js";
|
|
16
|
+
import { registerCallgraphCacheInvalidation } from "./lib/callgraph/tm1-adapter.js";
|
|
17
|
+
export class TM1Client {
|
|
18
|
+
connected = false;
|
|
19
|
+
// Transport is HELD, not inherited. Because TM1Client no longer `extends`
|
|
20
|
+
// TM1HttpClient, its public type does not expose `request()/requestRaw()/
|
|
21
|
+
// requestBinary()`, so a tool typed on TM1Client cannot call raw REST — that
|
|
22
|
+
// is now a compile error (`tsc`), not just a `lint:no-flat-api` failure.
|
|
23
|
+
// Services that legitimately need transport receive `this.http` explicitly.
|
|
24
|
+
http;
|
|
25
|
+
sessionManager;
|
|
26
|
+
logger;
|
|
27
|
+
config;
|
|
28
|
+
// Domain services. Init order matters when services depend on each other —
|
|
29
|
+
// `cells` is created before `elements` because the latter holds a CellService
|
|
30
|
+
// ref for the element-attribute-value methods that route through MDX/cellset.
|
|
31
|
+
batch;
|
|
32
|
+
cubes;
|
|
33
|
+
dimensions;
|
|
34
|
+
hierarchies;
|
|
35
|
+
cells;
|
|
36
|
+
views;
|
|
37
|
+
subsets;
|
|
38
|
+
elements;
|
|
39
|
+
processes;
|
|
40
|
+
chores;
|
|
41
|
+
security;
|
|
42
|
+
server;
|
|
43
|
+
monitoring;
|
|
44
|
+
files;
|
|
45
|
+
constructor(config, sessionManager, logger) {
|
|
46
|
+
this.config = config;
|
|
47
|
+
this.http = new TM1HttpClient(config, sessionManager, logger);
|
|
48
|
+
this.sessionManager = sessionManager;
|
|
49
|
+
this.logger = logger;
|
|
50
|
+
// Explicitly wire the callgraph cache-invalidation listener to tm1Events
|
|
51
|
+
// "mutation" notifications. Replaces the former import-time side-effect in
|
|
52
|
+
// http.ts — now the coupling is a visible, idempotent call at construction.
|
|
53
|
+
registerCallgraphCacheInvalidation();
|
|
54
|
+
this.batch = new BatchService(this.http);
|
|
55
|
+
this.cubes = new CubeService(this.http);
|
|
56
|
+
this.dimensions = new DimensionService(this.http);
|
|
57
|
+
this.hierarchies = new HierarchyService(this.http);
|
|
58
|
+
this.cells = new CellService(this.http);
|
|
59
|
+
this.views = new ViewService(this.http);
|
|
60
|
+
this.subsets = new SubsetService(this.http);
|
|
61
|
+
// ElementService depends on CellService and BatchService — both MUST be
|
|
62
|
+
// constructed above. Enforced at runtime so a future reorder fails loudly
|
|
63
|
+
// instead of injecting `undefined` (TS types the fields as defined, so the
|
|
64
|
+
// compiler won't catch a move). `batch` is asserted too even though the
|
|
65
|
+
// constructor parameter is optional: an undefined batch degrades bulkUpsert
|
|
66
|
+
// silently back to N round-trips, with no error and no failing test.
|
|
67
|
+
if (!this.cells) {
|
|
68
|
+
throw new Error("TM1Client init order: CellService must be constructed before ElementService");
|
|
69
|
+
}
|
|
70
|
+
if (!this.batch) {
|
|
71
|
+
throw new Error("TM1Client init order: BatchService must be constructed before ElementService");
|
|
72
|
+
}
|
|
73
|
+
this.elements = new ElementService(this.http, this.cells, this.batch);
|
|
74
|
+
this.processes = new ProcessService(this.http);
|
|
75
|
+
this.chores = new ChoreService(this.http);
|
|
76
|
+
this.security = new SecurityService(this.http);
|
|
77
|
+
this.server = new ServerService(this.http);
|
|
78
|
+
this.monitoring = new MonitoringService(this.http);
|
|
79
|
+
this.files = new FileService(this.http);
|
|
80
|
+
}
|
|
81
|
+
/** The configured TM1 major version (11 or 12). Fixed for this connection. */
|
|
82
|
+
get version() {
|
|
83
|
+
return this.config.version;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Stable label for this connection, used to keep per-connection files (the
|
|
87
|
+
* process backups) apart: host and port, plus the v12 instance/database.
|
|
88
|
+
*/
|
|
89
|
+
get connectionId() {
|
|
90
|
+
let host;
|
|
91
|
+
try {
|
|
92
|
+
const url = new URL(this.config.baseUrl);
|
|
93
|
+
host = url.port ? `${url.hostname}_${url.port}` : url.hostname;
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
host = this.config.baseUrl;
|
|
97
|
+
}
|
|
98
|
+
return [host, this.config.instance, this.config.database]
|
|
99
|
+
.filter((part) => Boolean(part))
|
|
100
|
+
.join("_");
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Authenticate and start the keep-alive timer.
|
|
104
|
+
*/
|
|
105
|
+
async connect() {
|
|
106
|
+
this.logger.info("Connecting to TM1 server");
|
|
107
|
+
await this.sessionManager.authenticate();
|
|
108
|
+
this.sessionManager.startKeepAlive();
|
|
109
|
+
this.connected = true;
|
|
110
|
+
this.logger.info("Connected to TM1 server");
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Stop the keep-alive timer and mark as disconnected.
|
|
114
|
+
*/
|
|
115
|
+
async disconnect() {
|
|
116
|
+
this.logger.info("Disconnecting from TM1 server");
|
|
117
|
+
this.sessionManager.stopKeepAlive();
|
|
118
|
+
await this.sessionManager.logout();
|
|
119
|
+
this.connected = false;
|
|
120
|
+
this.logger.info("Disconnected from TM1 server");
|
|
121
|
+
}
|
|
122
|
+
isConnected() {
|
|
123
|
+
return this.connected;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=tm1-client.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReferenceIndex } from "../../lib/callgraph/referenceIndex.js";
|
|
2
|
+
export interface RankEntry {
|
|
3
|
+
process: string;
|
|
4
|
+
outgoingCalls: number;
|
|
5
|
+
outgoingDistinct: number;
|
|
6
|
+
incomingCalls: number;
|
|
7
|
+
incomingDistinct: number;
|
|
8
|
+
}
|
|
9
|
+
export interface GlobalRankingResult {
|
|
10
|
+
rankBy: "outgoing" | "incoming";
|
|
11
|
+
totalProcessesIndexed: number;
|
|
12
|
+
processesWithEdges: number;
|
|
13
|
+
totalCallEdges: number;
|
|
14
|
+
truncated: boolean;
|
|
15
|
+
ranking: RankEntry[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Global fan-out/fan-in ranking across ALL processes — answers "which process
|
|
19
|
+
* triggers (or is triggered by) the most others" without a per-process traversal.
|
|
20
|
+
* Counts ExecuteProcess/RunProcess edges (targetKind='process') from the flat ref index.
|
|
21
|
+
*/
|
|
22
|
+
export declare function globalRanking(index: ReferenceIndex, opts: {
|
|
23
|
+
rankBy: "outgoing" | "incoming";
|
|
24
|
+
topN: number;
|
|
25
|
+
includeSystem: boolean;
|
|
26
|
+
}): GlobalRankingResult;
|
|
27
|
+
export declare const registerAnalyzeCallgraph: import("../define-tool.js").ToolRegistrar;
|
|
28
|
+
//# sourceMappingURL=analyze-callgraph.d.ts.map
|