@owox/backend 0.35.0 → 0.36.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/dist/src/common/exceptions/concurrency-limit-exceeded.exception.d.ts +1 -1
- package/dist/src/common/exceptions/concurrency-limit-exceeded.exception.js +2 -2
- package/dist/src/common/markdown/markdown-parser.service.d.ts +2 -0
- package/dist/src/common/markdown/markdown-parser.service.js +15 -8
- package/dist/src/common/validators/max-byte-length.validator.d.ts +2 -0
- package/dist/src/common/validators/max-byte-length.validator.js +29 -0
- package/dist/src/config/env-validation.config.d.ts +12 -0
- package/dist/src/config/env-validation.config.js +7 -0
- package/dist/src/data-marts/ai-insights/agent/types.d.ts +6 -6
- package/dist/src/data-marts/calculated-fields/calculated-field-validator.service.js +22 -30
- package/dist/src/data-marts/calculated-fields/calculated-field.utils.d.ts +1 -0
- package/dist/src/data-marts/calculated-fields/calculated-field.utils.js +21 -0
- package/dist/src/data-marts/calculated-fields/formula-analyzer.d.ts +1 -0
- package/dist/src/data-marts/calculated-fields/formula-analyzer.js +2 -0
- package/dist/src/data-marts/calculated-fields/formula-violations.d.ts +7 -0
- package/dist/src/data-marts/calculated-fields/formula-violations.js +82 -1
- package/dist/src/data-marts/calculated-fields/join-grain.d.ts +32 -0
- package/dist/src/data-marts/calculated-fields/join-grain.js +107 -0
- package/dist/src/data-marts/calculated-fields/set-quantifier.d.ts +8 -0
- package/dist/src/data-marts/calculated-fields/set-quantifier.js +12 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/connector-message.schema.d.ts +66 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/connector-message.schema.js +13 -1
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-credentials-update.schema.d.ts +3 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-credentials-update.schema.js +1 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-error.schema.d.ts +3 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-error.schema.js +1 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-log.schema.d.ts +12 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-log.schema.js +4 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-requested-date.schema.d.ts +3 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-requested-date.schema.js +1 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-state-update.schema.d.ts +16 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-state-update.schema.js +16 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-status.schema.d.ts +3 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-status.schema.js +1 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-warning.schema.d.ts +3 -0
- package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-warning.schema.js +1 -0
- package/dist/src/data-marts/connector-types/connector-message/services/connector-event.translator.d.ts +10 -0
- package/dist/src/data-marts/connector-types/connector-message/services/connector-event.translator.js +138 -0
- package/dist/src/data-marts/connector-types/connector-message/services/connector-message-parser.service.d.ts +1 -3
- package/dist/src/data-marts/connector-types/connector-message/services/connector-message-parser.service.js +30 -34
- package/dist/src/data-marts/connector-types/connector-message/services/connector-output-capture.service.js +10 -12
- package/dist/src/data-marts/connector-types/connector-message/services/connector-state.service.js +3 -1
- package/dist/src/data-marts/connector-types/enums/connector-message-type-enum.d.ts +1 -0
- package/dist/src/data-marts/connector-types/enums/connector-message-type-enum.js +1 -0
- package/dist/src/data-marts/controllers/connector-definition.controller.d.ts +30 -0
- package/dist/src/data-marts/controllers/connector-definition.controller.js +252 -0
- package/dist/src/data-marts/controllers/data-mart-preview.controller.d.ts +10 -0
- package/dist/src/data-marts/controllers/data-mart-preview.controller.js +58 -0
- package/dist/src/data-marts/controllers/data-mart.controller.d.ts +5 -1
- package/dist/src/data-marts/controllers/data-mart.controller.js +25 -4
- package/dist/src/data-marts/controllers/insight-template.controller.js +4 -4
- package/dist/src/data-marts/controllers/insight.controller.js +5 -5
- package/dist/src/data-marts/controllers/project-data-mart-runs.controller.js +1 -1
- package/dist/src/data-marts/controllers/spec/connector-definition.api.d.ts +12 -0
- package/dist/src/data-marts/controllers/spec/connector-definition.api.js +179 -0
- package/dist/src/data-marts/controllers/spec/data-mart.api.d.ts +1 -0
- package/dist/src/data-marts/controllers/spec/data-mart.api.js +5 -0
- package/dist/src/data-marts/controllers/spec/report-openapi.d.ts +18 -0
- package/dist/src/data-marts/controllers/spec/report-openapi.js +3 -0
- package/dist/src/data-marts/data-marts.module.js +20 -2
- package/dist/src/data-marts/data-storage-types/blending/metric-sleeve.planner.js +3 -12
- package/dist/src/data-marts/data-storage-types/data-mart-schema.utils.d.ts +1 -0
- package/dist/src/data-marts/data-storage-types/data-mart-schema.utils.js +16 -0
- package/dist/src/data-marts/dto/domain/blendable-schema.dto.d.ts +10 -0
- package/dist/src/data-marts/dto/domain/blendable-schema.dto.js +71 -1
- package/dist/src/data-marts/dto/domain/create-data-mart.command.d.ts +3 -1
- package/dist/src/data-marts/dto/domain/create-data-mart.command.js +3 -1
- package/dist/src/data-marts/dto/domain/create-report.command.d.ts +3 -1
- package/dist/src/data-marts/dto/domain/create-report.command.js +3 -1
- package/dist/src/data-marts/dto/domain/data-mart-list-item.dto.d.ts +3 -1
- package/dist/src/data-marts/dto/domain/data-mart-list-item.dto.js +3 -1
- package/dist/src/data-marts/dto/domain/data-mart.dto.d.ts +4 -1
- package/dist/src/data-marts/dto/domain/data-mart.dto.js +5 -1
- package/dist/src/data-marts/dto/domain/model-canvas.dto.d.ts +4 -0
- package/dist/src/data-marts/dto/domain/report-like-read-plan.d.ts +2 -0
- package/dist/src/data-marts/dto/domain/report.dto.d.ts +3 -1
- package/dist/src/data-marts/dto/domain/report.dto.js +3 -1
- package/dist/src/data-marts/dto/domain/update-data-mart-icon.command.d.ts +9 -0
- package/dist/src/data-marts/dto/domain/update-data-mart-icon.command.js +19 -0
- package/dist/src/data-marts/dto/domain/update-report.command.d.ts +3 -1
- package/dist/src/data-marts/dto/domain/update-report.command.js +3 -1
- package/dist/src/data-marts/dto/presentation/create-data-mart-request-api.dto.d.ts +2 -0
- package/dist/src/data-marts/dto/presentation/create-data-mart-request-api.dto.js +13 -0
- package/dist/src/data-marts/dto/presentation/create-report-request-api.dto.d.ts +2 -0
- package/dist/src/data-marts/dto/presentation/create-report-request-api.dto.js +10 -0
- package/dist/src/data-marts/dto/presentation/custom-connector-response.dto.d.ts +46 -0
- package/dist/src/data-marts/dto/presentation/custom-connector-response.dto.js +216 -0
- package/dist/src/data-marts/dto/presentation/custom-connector.dto.d.ts +27 -0
- package/dist/src/data-marts/dto/presentation/custom-connector.dto.js +159 -0
- package/dist/src/data-marts/dto/presentation/data-mart-list-item-response-api.dto.d.ts +2 -0
- package/dist/src/data-marts/dto/presentation/data-mart-list-item-response-api.dto.js +10 -0
- package/dist/src/data-marts/dto/presentation/data-mart-response-api.dto.d.ts +2 -0
- package/dist/src/data-marts/dto/presentation/data-mart-response-api.dto.js +10 -0
- package/dist/src/data-marts/dto/presentation/model-canvas-response-api.dto.d.ts +4 -0
- package/dist/src/data-marts/dto/presentation/model-canvas-response-api.dto.js +20 -0
- package/dist/src/data-marts/dto/presentation/preview-data-mart-request-api.dto.d.ts +7 -0
- package/dist/src/data-marts/dto/presentation/preview-data-mart-request-api.dto.js +56 -0
- package/dist/src/data-marts/dto/presentation/preview-data-mart-response-api.dto.d.ts +12 -0
- package/dist/src/data-marts/dto/presentation/preview-data-mart-response-api.dto.js +64 -0
- package/dist/src/data-marts/dto/presentation/report-response-api.dto.d.ts +2 -0
- package/dist/src/data-marts/dto/presentation/report-response-api.dto.js +6 -0
- package/dist/src/data-marts/dto/presentation/run-data-mart-request-api.dto.js +67 -0
- package/dist/src/data-marts/dto/presentation/update-data-mart-description-api.dto.js +3 -0
- package/dist/src/data-marts/dto/presentation/update-data-mart-icon-api.dto.d.ts +4 -0
- package/dist/src/data-marts/dto/presentation/update-data-mart-icon-api.dto.js +30 -0
- package/dist/src/data-marts/dto/presentation/update-report-request-api.dto.d.ts +2 -0
- package/dist/src/data-marts/dto/presentation/update-report-request-api.dto.js +10 -0
- package/dist/src/data-marts/dto/schemas/auto-aggregation-opt-out.schema.d.ts +15 -0
- package/dist/src/data-marts/dto/schemas/auto-aggregation-opt-out.schema.js +29 -0
- package/dist/src/data-marts/dto/schemas/data-mart-run/data-mart-run.schema.d.ts +9 -0
- package/dist/src/data-marts/dto/schemas/data-mart-table-definitions/connector-definition.schema.d.ts +15 -0
- package/dist/src/data-marts/dto/schemas/data-mart-table-definitions/connector-definition.schema.js +1 -0
- package/dist/src/data-marts/dto/schemas/data-mart-table-definitions/data-mart-definition.schema.d.ts +7 -0
- package/dist/src/data-marts/dto/schemas/data-quality/data-quality-run.schema.d.ts +20 -0
- package/dist/src/data-marts/entities/connector-definition-version.entity.d.ts +16 -0
- package/dist/src/data-marts/entities/connector-definition-version.entity.js +78 -0
- package/dist/src/data-marts/entities/connector-definition.entity.d.ts +14 -0
- package/dist/src/data-marts/entities/connector-definition.entity.js +82 -0
- package/dist/src/data-marts/entities/data-mart.entity.d.ts +2 -0
- package/dist/src/data-marts/entities/data-mart.entity.js +5 -0
- package/dist/src/data-marts/entities/report.entity.d.ts +2 -0
- package/dist/src/data-marts/entities/report.entity.js +11 -0
- package/dist/src/data-marts/enums/data-mart-icon.enum.d.ts +75 -0
- package/dist/src/data-marts/enums/data-mart-icon.enum.js +80 -0
- package/dist/src/data-marts/errors/connector-credential-boundary.error.d.ts +3 -0
- package/dist/src/data-marts/errors/connector-credential-boundary.error.js +14 -0
- package/dist/src/data-marts/facades/mcp-data-marts.facade.d.ts +2 -0
- package/dist/src/data-marts/facades/mcp-data-marts.facade.impl.d.ts +7 -1
- package/dist/src/data-marts/facades/mcp-data-marts.facade.impl.js +70 -5
- package/dist/src/data-marts/mappers/connector-definition.mapper.d.ts +14 -0
- package/dist/src/data-marts/mappers/connector-definition.mapper.js +57 -0
- package/dist/src/data-marts/mappers/data-mart.mapper.d.ts +9 -6
- package/dist/src/data-marts/mappers/data-mart.mapper.js +44 -19
- package/dist/src/data-marts/mappers/insight-template.mapper.d.ts +1 -1
- package/dist/src/data-marts/mappers/insight-template.mapper.js +2 -2
- package/dist/src/data-marts/mappers/insight.mapper.d.ts +1 -1
- package/dist/src/data-marts/mappers/insight.mapper.js +2 -2
- package/dist/src/data-marts/mappers/model-canvas.mapper.d.ts +10 -2
- package/dist/src/data-marts/mappers/model-canvas.mapper.js +9 -3
- package/dist/src/data-marts/mappers/report.mapper.js +4 -3
- package/dist/src/data-marts/services/auto-collapse.resolver.d.ts +1 -1
- package/dist/src/data-marts/services/auto-collapse.resolver.js +4 -0
- package/dist/src/data-marts/services/blendable-schema.service.d.ts +2 -0
- package/dist/src/data-marts/services/blendable-schema.service.js +59 -0
- package/dist/src/data-marts/services/connector/connector-credential-injector.service.d.ts +1 -1
- package/dist/src/data-marts/services/connector/connector-credential-injector.service.js +15 -1
- package/dist/src/data-marts/services/connector/connector-definition.service.d.ts +59 -0
- package/dist/src/data-marts/services/connector/connector-definition.service.js +491 -0
- package/dist/src/data-marts/services/connector/connector-executor.service.d.ts +9 -1
- package/dist/src/data-marts/services/connector/connector-executor.service.js +173 -63
- package/dist/src/data-marts/services/connector/connector-fields-preview.service.js +1 -1
- package/dist/src/data-marts/services/connector/connector-message.utils.js +2 -2
- package/dist/src/data-marts/services/connector/connector-preview-credentials.service.js +1 -1
- package/dist/src/data-marts/services/connector/connector-preview-support.d.ts +1 -1
- package/dist/src/data-marts/services/connector/connector-preview-support.js +14 -21
- package/dist/src/data-marts/services/connector/connector-process-spawner.service.d.ts +11 -2
- package/dist/src/data-marts/services/connector/connector-process-spawner.service.js +88 -60
- package/dist/src/data-marts/services/connector/connector-secret.service.d.ts +6 -3
- package/dist/src/data-marts/services/connector/connector-secret.service.js +77 -12
- package/dist/src/data-marts/services/connector/connector-source-config.service.js +1 -1
- package/dist/src/data-marts/services/connector/connector-source-credentials.service.d.ts +6 -2
- package/dist/src/data-marts/services/connector/connector-source-credentials.service.js +18 -16
- package/dist/src/data-marts/services/connector/connector-specification.mapper.d.ts +47 -0
- package/dist/src/data-marts/services/connector/connector-specification.mapper.js +46 -0
- package/dist/src/data-marts/services/connector/connector-test.service.d.ts +43 -0
- package/dist/src/data-marts/services/connector/connector-test.service.js +343 -0
- package/dist/src/data-marts/services/connector/connector.service.d.ts +8 -2
- package/dist/src/data-marts/services/connector/connector.service.js +65 -54
- package/dist/src/data-marts/services/connector/declarative-manifest-schemas.d.ts +4 -0
- package/dist/src/data-marts/services/connector/declarative-manifest-schemas.js +48 -0
- package/dist/src/data-marts/services/connector/run-log-flusher.d.ts +21 -0
- package/dist/src/data-marts/services/connector/run-log-flusher.js +67 -0
- package/dist/src/data-marts/services/data-mart.service.js +2 -0
- package/dist/src/data-marts/services/report-sql-composer.service.js +15 -1
- package/dist/src/data-marts/services/report.service.d.ts +1 -0
- package/dist/src/data-marts/services/report.service.js +13 -0
- package/dist/src/data-marts/services/scheduled-trigger.service.d.ts +1 -0
- package/dist/src/data-marts/services/scheduled-trigger.service.js +13 -0
- package/dist/src/data-marts/use-cases/create-data-mart.service.js +1 -0
- package/dist/src/data-marts/use-cases/create-report.service.js +2 -0
- package/dist/src/data-marts/use-cases/get-model-canvas-data-marts.service.d.ts +5 -1
- package/dist/src/data-marts/use-cases/get-model-canvas-data-marts.service.js +16 -3
- package/dist/src/data-marts/use-cases/list-project-scheduled-triggers.service.js +1 -1
- package/dist/src/data-marts/use-cases/preview-data-mart.service.d.ts +59 -0
- package/dist/src/data-marts/use-cases/preview-data-mart.service.js +293 -0
- package/dist/src/data-marts/use-cases/stream-http-data.service.js +1 -0
- package/dist/src/data-marts/use-cases/update-data-mart-definition.service.d.ts +1 -1
- package/dist/src/data-marts/use-cases/update-data-mart-definition.service.js +8 -6
- package/dist/src/data-marts/use-cases/update-data-mart-icon.service.d.ts +12 -0
- package/dist/src/data-marts/use-cases/update-data-mart-icon.service.js +46 -0
- package/dist/src/data-marts/use-cases/update-data-mart-schema.service.js +14 -1
- package/dist/src/data-marts/use-cases/update-report.service.js +9 -1
- package/dist/src/ee/ee.module.js +5 -8
- package/dist/src/ee/mcp/auth/mcp-auth-context.d.ts +0 -4
- package/dist/src/ee/mcp/auth/mcp-auth.middleware.d.ts +26 -0
- package/dist/src/ee/mcp/auth/mcp-auth.middleware.js +184 -0
- package/dist/src/ee/mcp/http-headers.util.d.ts +2 -0
- package/dist/src/ee/mcp/http-headers.util.js +8 -0
- package/dist/src/ee/mcp/observability/mcp-bus-wiring.js +4 -4
- package/dist/src/ee/mcp/observability/mcp-call-instrumentation.d.ts +2 -4
- package/dist/src/ee/mcp/observability/mcp-call-instrumentation.js +6 -6
- package/dist/src/ee/mcp/sdk/mcp-sdk-server.factory.d.ts +1 -1
- package/dist/src/ee/mcp/sdk/mcp-sdk-server.factory.js +5 -5
- package/dist/src/ee/mcp/tools/add-destination.tool.d.ts +20 -14
- package/dist/src/ee/mcp/tools/add-destination.tool.js +10 -10
- package/dist/src/ee/mcp/tools/add-report.tool.d.ts +88 -228
- package/dist/src/ee/mcp/tools/add-report.tool.js +28 -28
- package/dist/src/ee/mcp/tools/create-report-run-schedule.tool.d.ts +2 -12
- package/dist/src/ee/mcp/tools/create-report-run-schedule.tool.js +13 -13
- package/dist/src/ee/mcp/tools/data-mart-catalog.tool.d.ts +15 -81
- package/dist/src/ee/mcp/tools/data-mart-catalog.tool.js +11 -11
- package/dist/src/ee/mcp/tools/data-mart-details.tool.d.ts +19 -111
- package/dist/src/ee/mcp/tools/data-mart-details.tool.js +64 -48
- package/dist/src/ee/mcp/tools/delete-report-run-schedule.tool.d.ts +2 -6
- package/dist/src/ee/mcp/tools/delete-report-run-schedule.tool.js +7 -7
- package/dist/src/ee/mcp/tools/delete-report.tool.d.ts +2 -6
- package/dist/src/ee/mcp/tools/delete-report.tool.js +4 -4
- package/dist/src/ee/mcp/tools/get-data-mart-reports.tool.d.ts +30 -195
- package/dist/src/ee/mcp/tools/get-data-mart-reports.tool.js +22 -22
- package/dist/src/ee/mcp/tools/get-report-output-schema.tool.d.ts +3 -21
- package/dist/src/ee/mcp/tools/get-report-output-schema.tool.js +10 -10
- package/dist/src/ee/mcp/tools/get-report-run-status.tool.d.ts +15 -11
- package/dist/src/ee/mcp/tools/get-report-run-status.tool.js +14 -14
- package/dist/src/ee/mcp/tools/list-destinations.tool.d.ts +12 -20
- package/dist/src/ee/mcp/tools/list-destinations.tool.js +10 -10
- package/dist/src/ee/mcp/tools/list-report-run-schedules.tool.d.ts +5 -61
- package/dist/src/ee/mcp/tools/list-report-run-schedules.tool.js +14 -14
- package/dist/src/ee/mcp/tools/mcp-getting-started.util.d.ts +4 -52
- package/dist/src/ee/mcp/tools/mcp-getting-started.util.js +13 -13
- package/dist/src/ee/mcp/tools/mcp-tool.definition.d.ts +2 -2
- package/dist/src/ee/mcp/tools/project-context.tool.d.ts +3 -17
- package/dist/src/ee/mcp/tools/project-context.tool.js +10 -10
- package/dist/src/ee/mcp/tools/query-data-mart.input.d.ts +111 -152
- package/dist/src/ee/mcp/tools/query-data-mart.input.js +39 -39
- package/dist/src/ee/mcp/tools/query-data-mart.tool.d.ts +60 -130
- package/dist/src/ee/mcp/tools/query-data-mart.tool.js +35 -35
- package/dist/src/ee/mcp/tools/report-output-controls-output.d.ts +17 -60
- package/dist/src/ee/mcp/tools/report-output-controls-output.js +20 -20
- package/dist/src/ee/mcp/tools/report-run-outcome.d.ts +6 -42
- package/dist/src/ee/mcp/tools/report-run-outcome.js +20 -20
- package/dist/src/ee/mcp/tools/run-report.tool.d.ts +2 -6
- package/dist/src/ee/mcp/tools/run-report.tool.js +5 -5
- package/dist/src/ee/mcp/tools/search-data-marts.tool.d.ts +7 -79
- package/dist/src/ee/mcp/tools/search-data-marts.tool.js +11 -11
- package/dist/src/ee/mcp/tools/search-reports.tool.d.ts +15 -61
- package/dist/src/ee/mcp/tools/search-reports.tool.js +15 -15
- package/dist/src/ee/mcp/tools/summarize-data-catalog.tool.d.ts +7 -79
- package/dist/src/ee/mcp/tools/summarize-data-catalog.tool.js +15 -15
- package/dist/src/ee/mcp/tools/update-report-run-schedule.tool.d.ts +2 -12
- package/dist/src/ee/mcp/tools/update-report-run-schedule.tool.js +13 -13
- package/dist/src/ee/mcp/tools/update-report.tool.d.ts +105 -414
- package/dist/src/ee/mcp/tools/update-report.tool.js +20 -20
- package/dist/src/ee/mcp/transport/mcp-http-entry.service.d.ts +30 -0
- package/dist/src/ee/mcp/transport/mcp-http-entry.service.js +193 -0
- package/dist/src/idp/guards/idp.guard.js +2 -8
- package/dist/src/idp/oauth/controllers/oauth-authorization.controller.d.ts +4 -0
- package/dist/src/idp/oauth/controllers/oauth-authorization.controller.js +77 -1
- package/dist/src/idp/oauth/controllers/oauth-metadata.controller.d.ts +2 -1
- package/dist/src/idp/oauth/controllers/oauth-metadata.controller.js +5 -8
- package/dist/src/idp/oauth/controllers/oauth-token.controller.js +14 -1
- package/dist/src/idp/oauth/oauth-request.validator.d.ts +8 -0
- package/dist/src/idp/oauth/oauth-request.validator.js +27 -0
- package/dist/src/idp/utils/is-authentication-error.d.ts +1 -0
- package/dist/src/idp/utils/is-authentication-error.js +9 -0
- package/dist/src/idp/utils/role-hierarchy.d.ts +3 -0
- package/dist/src/idp/utils/role-hierarchy.js +14 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +3 -1
- package/dist/src/migrations/1788048000000-create-connector-definition-tables.d.ts +6 -0
- package/dist/src/migrations/1788048000000-create-connector-definition-tables.js +116 -0
- package/dist/src/migrations/1790156789783-add-auto-aggregation-opt-out-to-report.d.ts +8 -0
- package/dist/src/migrations/1790156789783-add-auto-aggregation-opt-out-to-report.js +30 -0
- package/dist/src/migrations/1790247861000-add-icon-to-data-mart.d.ts +8 -0
- package/dist/src/migrations/1790247861000-add-icon-to-data-mart.js +31 -0
- package/package.json +10 -6
- package/dist/src/ee/mcp/auth/mcp-auth.exception-filter.d.ts +0 -14
- package/dist/src/ee/mcp/auth/mcp-auth.exception-filter.js +0 -84
- package/dist/src/ee/mcp/auth/mcp-auth.guard.d.ts +0 -14
- package/dist/src/ee/mcp/auth/mcp-auth.guard.js +0 -99
- package/dist/src/ee/mcp/controllers/mcp-transport.controller.d.ts +0 -17
- package/dist/src/ee/mcp/controllers/mcp-transport.controller.js +0 -134
- package/dist/src/ee/mcp/sdk/mcp-streamable-http-transport.handler.d.ts +0 -16
- package/dist/src/ee/mcp/sdk/mcp-streamable-http-transport.handler.js +0 -133
|
@@ -14,7 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.GetDataMartDetailsTool = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
|
-
const
|
|
17
|
+
const zod_v4_1 = require("zod-v4");
|
|
18
18
|
const mcp_data_marts_facade_1 = require("../../../data-marts/facades/mcp-data-marts.facade");
|
|
19
19
|
const public_origin_service_1 = require("../../../common/config/public-origin.service");
|
|
20
20
|
const mcp_tool_definition_1 = require("./mcp-tool.definition");
|
|
@@ -25,26 +25,26 @@ const formula_level_1 = require("../../../data-marts/calculated-fields/formula-l
|
|
|
25
25
|
const data_mart_schema_utils_1 = require("../../../data-marts/data-storage-types/data-mart-schema.utils");
|
|
26
26
|
const field_type_compatibility_1 = require("../../../data-marts/data-storage-types/field-type-compatibility");
|
|
27
27
|
const field_type_matrix_1 = require("./field-type-matrix");
|
|
28
|
-
const inputSchema =
|
|
28
|
+
const inputSchema = zod_v4_1.z
|
|
29
29
|
.object({
|
|
30
|
-
data_mart_id:
|
|
31
|
-
detail_level:
|
|
30
|
+
data_mart_id: zod_v4_1.z.string().trim().min(1),
|
|
31
|
+
detail_level: zod_v4_1.z
|
|
32
32
|
.enum(['native', 'with_joined_fields'])
|
|
33
33
|
.optional()
|
|
34
34
|
.describe('Use native (default) for ordinary queries. Request with_joined_fields only when the answer requires data from a joined Data Mart.'),
|
|
35
35
|
})
|
|
36
36
|
.strict();
|
|
37
|
-
const makeCategoryField = () =>
|
|
37
|
+
const makeCategoryField = () => zod_v4_1.z
|
|
38
38
|
.string()
|
|
39
39
|
.optional()
|
|
40
40
|
.describe('Field-type category (number/string/date/time/boolean/other) — the key into operators_by_category for the operators this field accepts in filters. Omitted for array fields, which can only be selected as columns. For slice operators, use "sliceCategory" instead when it is present.');
|
|
41
|
-
const makeAllowedAggregationsField = () =>
|
|
42
|
-
.array(
|
|
41
|
+
const makeAllowedAggregationsField = () => zod_v4_1.z
|
|
42
|
+
.array(zod_v4_1.z.string())
|
|
43
43
|
.optional()
|
|
44
44
|
.describe('The aggregation functions query_data_mart may apply to THIS field (type defaults narrowed by per-field settings). Use only these. An empty array means this field takes no aggregation — because it is an array, because its settings allow none, or because it is a Calculated Field that already aggregates; read "calculated" and "usage" to tell which.');
|
|
45
|
-
const makeCalculatedField = () =>
|
|
45
|
+
const makeCalculatedField = () => zod_v4_1.z
|
|
46
46
|
.object({
|
|
47
|
-
level:
|
|
47
|
+
level: zod_v4_1.z
|
|
48
48
|
.string()
|
|
49
49
|
.optional()
|
|
50
50
|
.describe('"metric" — the formula is ALREADY aggregated: select it by name and it is recomputed correctly at whatever grain your query asks for, including in a query that reads a joined Data Mart; it cannot be aggregated again (its allowedAggregations is empty), used as a group-by dimension, or given a date_bucket. This is also the meaning when the property is absent. "column" — the formula is row-level, so the field IS an ordinary dimension: select it by name and group by it exactly like a real column, including in a query that reads a joined Data Mart; it also accepts any aggregation listed in its own allowedAggregations (e.g. COUNT_DISTINCT), and applying one makes it a metric of that query rather than one of its grouping keys; when its declared type is DATE or TIMESTAMP it also takes a date_bucket, on the same rule a real date column follows. Filtering works at BOTH levels: a row-level field filters on its computed value like an ordinary column, and a metric filters on its aggregated value — but a metric filter needs the query to name its fields explicitly rather than relying on the default all-columns projection.'),
|
|
@@ -54,58 +54,62 @@ const makeCalculatedField = () => zod_1.z
|
|
|
54
54
|
.describe('Present when this field is a Calculated Field: a value the Data Mart computes from a formula instead of reading it from a warehouse column. Its "level" says whether it behaves as a metric or as a dimension — read that before using the field. When "level" is absent the field is a metric; nothing backfills it, so every field defined before levels existed arrives without one.');
|
|
55
55
|
const AGGREGATE_LEVEL_USAGE = 'Already computed by OWOX at the grain your query asks for: list it in "fields" and read the ' +
|
|
56
56
|
'value. Do not recompute it from other fields, and do not name it in "aggregations".';
|
|
57
|
-
const
|
|
57
|
+
const GRAIN_CAVEAT_PREFIX = 'Caveat to pass on to the user with this number — a change to its formula belongs in the ' +
|
|
58
|
+
'Data Mart:';
|
|
59
|
+
const DataMartFieldSchema = zod_v4_1.z
|
|
58
60
|
.object({
|
|
59
|
-
name:
|
|
60
|
-
type:
|
|
61
|
-
description:
|
|
62
|
-
businessName:
|
|
63
|
-
displayName:
|
|
61
|
+
name: zod_v4_1.z.string(),
|
|
62
|
+
type: zod_v4_1.z.string(),
|
|
63
|
+
description: zod_v4_1.z.string().optional().nullable(),
|
|
64
|
+
businessName: zod_v4_1.z.string().optional(),
|
|
65
|
+
displayName: zod_v4_1.z.string().optional(),
|
|
64
66
|
category: makeCategoryField(),
|
|
65
67
|
allowedAggregations: makeAllowedAggregationsField(),
|
|
66
68
|
calculated: makeCalculatedField(),
|
|
67
|
-
usage:
|
|
69
|
+
usage: zod_v4_1.z
|
|
68
70
|
.string()
|
|
69
71
|
.optional()
|
|
70
|
-
.describe('Present
|
|
72
|
+
.describe('Present on a field that needs reading before you query it: one the Data Mart has ' +
|
|
73
|
+
'ALREADY computed for you, one whose number a join can distort, or both. Read it ' +
|
|
74
|
+
'before writing a query that mentions this field.'),
|
|
71
75
|
})
|
|
72
76
|
.passthrough();
|
|
73
|
-
const JoinedFieldSchema =
|
|
77
|
+
const JoinedFieldSchema = zod_v4_1.z
|
|
74
78
|
.object({
|
|
75
|
-
name:
|
|
79
|
+
name: zod_v4_1.z
|
|
76
80
|
.string()
|
|
77
81
|
.describe('Qualified field name (<alias>__<field>) — copy verbatim into query_data_mart fields, and into filters/slices only when the corresponding category is present.'),
|
|
78
|
-
displayName:
|
|
82
|
+
displayName: zod_v4_1.z
|
|
79
83
|
.string()
|
|
80
84
|
.describe('Business-friendly label for presentation; use name for queries.'),
|
|
81
|
-
type:
|
|
85
|
+
type: zod_v4_1.z
|
|
82
86
|
.string()
|
|
83
87
|
.describe('Type in the blended result. Use filter operators or aggregation functions only when the corresponding category or allowedAggregations metadata is present. For slices, use "sliceType" when present. A field without category whose sliceType is an ARRAY can only be selected as a column.'),
|
|
84
|
-
description:
|
|
85
|
-
sourceDataMart:
|
|
88
|
+
description: zod_v4_1.z.string().optional().nullable(),
|
|
89
|
+
sourceDataMart: zod_v4_1.z.string().describe('Title of the joined data mart this field comes from.'),
|
|
86
90
|
category: makeCategoryField(),
|
|
87
|
-
sliceType:
|
|
91
|
+
sliceType: zod_v4_1.z
|
|
88
92
|
.string()
|
|
89
93
|
.optional()
|
|
90
94
|
.describe('Present only when this field is deduplicated with a type-changing aggregation. A slice runs BEFORE the join on the original value, so pick slice operators for this pre-join type — not "type". An ARRAY sliceType means the field can only be selected as a column. Absent when the two types are the same.'),
|
|
91
|
-
sliceCategory:
|
|
95
|
+
sliceCategory: zod_v4_1.z
|
|
92
96
|
.string()
|
|
93
97
|
.optional()
|
|
94
98
|
.describe('Category of "sliceType" — the operators_by_category key for SLICE operators on this field. Omitted for array fields; otherwise present when sliceType is.'),
|
|
95
99
|
allowedAggregations: makeAllowedAggregationsField(),
|
|
96
100
|
})
|
|
97
101
|
.passthrough();
|
|
98
|
-
const JoinSchema =
|
|
102
|
+
const JoinSchema = zod_v4_1.z
|
|
99
103
|
.object({
|
|
100
|
-
aliasPath:
|
|
104
|
+
aliasPath: zod_v4_1.z
|
|
101
105
|
.string()
|
|
102
106
|
.describe('Dotted alias path of the joined source — matches the "<alias>__" prefix of joined_fields names.'),
|
|
103
|
-
sourceDataMart:
|
|
104
|
-
targetDataMart:
|
|
105
|
-
joinConditions:
|
|
106
|
-
.array(
|
|
107
|
+
sourceDataMart: zod_v4_1.z.string().describe('Title of the data mart on the left side of this join.'),
|
|
108
|
+
targetDataMart: zod_v4_1.z.string().describe('Title of the joined data mart.'),
|
|
109
|
+
joinConditions: zod_v4_1.z
|
|
110
|
+
.array(zod_v4_1.z.object({ sourceFieldName: zod_v4_1.z.string(), targetFieldName: zod_v4_1.z.string() }).passthrough())
|
|
107
111
|
.describe('Field pairs the rows are matched on (source field = target field).'),
|
|
108
|
-
description:
|
|
112
|
+
description: zod_v4_1.z
|
|
109
113
|
.string()
|
|
110
114
|
.optional()
|
|
111
115
|
.describe('Analyst-written business meaning of this join (e.g. "Visitors from the website sign up for the product and convert into users"). May be specific to this join path — the same two data marts can carry a different meaning when joined through a different path. Use it to interpret joined fields and to reason about cause and effect across the joined data marts.'),
|
|
@@ -125,25 +129,25 @@ let GetDataMartDetailsTool = class GetDataMartDetailsTool {
|
|
|
125
129
|
dataMarts;
|
|
126
130
|
publicOriginService;
|
|
127
131
|
name = 'get_data_mart_details_by_id';
|
|
128
|
-
description = 'Get available details for a specific published OWOX Data Mart by data_mart_id, including its URL, native output fields, and (only on explicit request) joined_fields contributed by blended/joined data marts. Use detail_level=native by default: it avoids exposing irrelevant joined fields and keeps the response fast. Request detail_level=with_joined_fields only when the question truly needs a joined Data Mart. Use displayName for user-facing wording and copy name verbatim into query_data_mart. Each controllable field carries its type "category", and every field carries the effective "allowedAggregations" query_data_mart may apply to it; "operators_by_category" maps each category to the filter/slice operators its fields accept — build queries from these instead of guessing. An empty allowedAggregations on a field whose "calculated" level is "metric" means the value is ALREADY computed, not that the field is unusable: select it by name in query_data_mart instead of recomputing it from other fields, and read the "usage" note carried on that field. Array fields are the exception: when mode is REPEATED or type or sliceType is ARRAY, the field omits category and has empty allowedAggregations. It may appear in fields, but never in filters, slices, sort, aggregations, or date_buckets. This tool is optional in the discovery flow: get_relevant_data_marts_by_prompt finds relevant Data Marts, and this tool adds field-level metadata for a selected Data Mart. It does not return data owners, data freshness, sample values, or actual data rows.';
|
|
132
|
+
description = 'Get available details for a specific published OWOX Data Mart by data_mart_id, including its URL, native output fields, and (only on explicit request) joined_fields contributed by blended/joined data marts. Use detail_level=native by default: it avoids exposing irrelevant joined fields and keeps the response fast. Request detail_level=with_joined_fields only when the question truly needs a joined Data Mart. Use displayName for user-facing wording and copy name verbatim into query_data_mart. Each controllable field carries its type "category", and every field carries the effective "allowedAggregations" query_data_mart may apply to it; "operators_by_category" maps each category to the filter/slice operators its fields accept — build queries from these instead of guessing. An empty allowedAggregations on a field whose "calculated" level is "metric" means the value is ALREADY computed, not that the field is unusable: select it by name in query_data_mart instead of recomputing it from other fields, and read the "usage" note carried on that field — it may also warn that a join distorts the number. Array fields are the exception: when mode is REPEATED or type or sliceType is ARRAY, the field omits category and has empty allowedAggregations. It may appear in fields, but never in filters, slices, sort, aggregations, or date_buckets. This tool is optional in the discovery flow: get_relevant_data_marts_by_prompt finds relevant Data Marts, and this tool adds field-level metadata for a selected Data Mart. It does not return data owners, data freshness, sample values, or actual data rows.';
|
|
129
133
|
zodSchema = inputSchema.shape;
|
|
130
134
|
outputSchema = {
|
|
131
|
-
id:
|
|
132
|
-
name:
|
|
133
|
-
url:
|
|
134
|
-
description:
|
|
135
|
-
fields:
|
|
136
|
-
joined_fields_included:
|
|
135
|
+
id: zod_v4_1.z.string().describe('Data mart identifier.'),
|
|
136
|
+
name: zod_v4_1.z.string().describe('Data mart display name.'),
|
|
137
|
+
url: zod_v4_1.z.string().describe('Open this Data Mart in OWOX.'),
|
|
138
|
+
description: zod_v4_1.z.string().describe('Data mart description.'),
|
|
139
|
+
fields: zod_v4_1.z.array(DataMartFieldSchema).describe("The data mart's own (native) output fields."),
|
|
140
|
+
joined_fields_included: zod_v4_1.z
|
|
137
141
|
.boolean()
|
|
138
142
|
.describe('Whether joined_fields were requested and evaluated. false means joined fields were intentionally omitted; true means an empty joined_fields array has no accessible joined fields.'),
|
|
139
|
-
joined_fields:
|
|
143
|
+
joined_fields: zod_v4_1.z
|
|
140
144
|
.array(JoinedFieldSchema)
|
|
141
145
|
.describe('Fields available from joined/blended data marts when joined_fields_included is true. Reference each by its exact "name" in query_data_mart. Controllable joined fields may also be used in "slices"; an array field without category can only be used in "fields".'),
|
|
142
|
-
joins:
|
|
146
|
+
joins: zod_v4_1.z
|
|
143
147
|
.array(JoinSchema)
|
|
144
148
|
.describe('How the joined data marts relate to this one — one entry per join edge (populated only when joined_fields_included is true): the matched key fields plus, when set, the business meaning of the relationship. Read these before interpreting joined_fields.'),
|
|
145
|
-
operators_by_category:
|
|
146
|
-
.record(
|
|
149
|
+
operators_by_category: zod_v4_1.z
|
|
150
|
+
.record(zod_v4_1.z.string(), zod_v4_1.z.array(zod_v4_1.z.string()))
|
|
147
151
|
.describe('For each controllable field-type category present in this data mart, the query_data_mart filter/slice operators its fields accept. Look up a field via its "category"; an array field without category can only be used in "fields". For boolean fields, eq/neq take a boolean true or false as the value.'),
|
|
148
152
|
};
|
|
149
153
|
annotations = {
|
|
@@ -169,9 +173,17 @@ let GetDataMartDetailsTool = class GetDataMartDetailsTool {
|
|
|
169
173
|
roles: context.roles,
|
|
170
174
|
dataMartId: parsed.data_mart_id,
|
|
171
175
|
includeJoinedFields,
|
|
176
|
+
includeGrainCaveats: true,
|
|
172
177
|
});
|
|
173
178
|
const categories = new Set();
|
|
174
|
-
const
|
|
179
|
+
const grainCaveats = result.grainCaveats ?? {};
|
|
180
|
+
const fields = result.fields.map(f => {
|
|
181
|
+
const field = f;
|
|
182
|
+
const caveat = typeof field.name === 'string' && Object.hasOwn(grainCaveats, field.name)
|
|
183
|
+
? grainCaveats[field.name]
|
|
184
|
+
: undefined;
|
|
185
|
+
return this.enrichField(field, categories, caveat);
|
|
186
|
+
});
|
|
175
187
|
const joinedFields = result.joinedFields.map(f => this.enrichField(f, categories));
|
|
176
188
|
const operatorsByCategory = {};
|
|
177
189
|
for (const category of categories) {
|
|
@@ -190,7 +202,7 @@ let GetDataMartDetailsTool = class GetDataMartDetailsTool {
|
|
|
190
202
|
};
|
|
191
203
|
return (0, mcp_tool_definition_1.jsonToolResult)(structuredContent);
|
|
192
204
|
}
|
|
193
|
-
enrichField(field, categories) {
|
|
205
|
+
enrichField(field, categories, grainCaveat) {
|
|
194
206
|
const out = { ...field };
|
|
195
207
|
let isArray = false;
|
|
196
208
|
if (typeof out.type === 'string') {
|
|
@@ -217,9 +229,13 @@ let GetDataMartDetailsTool = class GetDataMartDetailsTool {
|
|
|
217
229
|
aggregationRole: out.aggregationRole,
|
|
218
230
|
allowedAggregations: out.allowedAggregations,
|
|
219
231
|
});
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
232
|
+
}
|
|
233
|
+
const caveat = grainCaveat === undefined ? undefined : `${GRAIN_CAVEAT_PREFIX} ${grainCaveat}`;
|
|
234
|
+
if (isAggregateLevelCalculatedField(out)) {
|
|
235
|
+
out.usage = caveat ? `${AGGREGATE_LEVEL_USAGE} ${caveat}` : AGGREGATE_LEVEL_USAGE;
|
|
236
|
+
}
|
|
237
|
+
else if (caveat) {
|
|
238
|
+
out.usage = caveat;
|
|
223
239
|
}
|
|
224
240
|
if (out.category !== undefined && typeof out.sliceType === 'string') {
|
|
225
241
|
const sliceCategory = (0, field_type_category_1.categorizeFieldType)(out.sliceType);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod-v4';
|
|
2
2
|
import type { McpScope } from '@owox/idp-protocol';
|
|
3
3
|
import { PublicOriginService } from '../../../common/config/public-origin.service';
|
|
4
4
|
import { type McpScheduledTriggersFacade } from '../../../data-marts/facades/mcp-scheduled-triggers.facade';
|
|
@@ -6,11 +6,7 @@ import type { McpAuthContext } from '../auth/mcp-auth-context';
|
|
|
6
6
|
import { type McpToolDefinition, type McpToolResult } from './mcp-tool.definition';
|
|
7
7
|
declare const inputSchema: z.ZodObject<{
|
|
8
8
|
trigger_id: z.ZodString;
|
|
9
|
-
},
|
|
10
|
-
trigger_id: string;
|
|
11
|
-
}, {
|
|
12
|
-
trigger_id: string;
|
|
13
|
-
}>;
|
|
9
|
+
}, z.core.$strict>;
|
|
14
10
|
type DeleteReportRunScheduleInput = z.infer<typeof inputSchema>;
|
|
15
11
|
export declare class DeleteReportRunScheduleTool implements McpToolDefinition<DeleteReportRunScheduleInput> {
|
|
16
12
|
private readonly facade;
|
|
@@ -14,15 +14,15 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.DeleteReportRunScheduleTool = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
|
-
const
|
|
17
|
+
const zod_v4_1 = require("zod-v4");
|
|
18
18
|
const public_origin_service_1 = require("../../../common/config/public-origin.service");
|
|
19
19
|
const mcp_scheduled_triggers_facade_1 = require("../../../data-marts/facades/mcp-scheduled-triggers.facade");
|
|
20
20
|
const mcp_tool_definition_1 = require("./mcp-tool.definition");
|
|
21
21
|
const data_mart_ui_path_1 = require("./data-mart-ui-path");
|
|
22
22
|
const mcp_public_url_util_1 = require("./mcp-public-url.util");
|
|
23
|
-
const inputSchema =
|
|
23
|
+
const inputSchema = zod_v4_1.z
|
|
24
24
|
.object({
|
|
25
|
-
trigger_id:
|
|
25
|
+
trigger_id: zod_v4_1.z.string().trim().min(1),
|
|
26
26
|
})
|
|
27
27
|
.strict();
|
|
28
28
|
let DeleteReportRunScheduleTool = class DeleteReportRunScheduleTool {
|
|
@@ -32,10 +32,10 @@ let DeleteReportRunScheduleTool = class DeleteReportRunScheduleTool {
|
|
|
32
32
|
description = 'Removes the single report run schedule identified by trigger_id (get it from list_report_run_schedules). Only that schedule is removed — the Report and any other schedules it may have are left intact. The response echoes the removed trigger_id and report_id with schedule: null to confirm that specific schedule is gone; check list_report_run_schedules if you need to know whether other schedules remain.';
|
|
33
33
|
zodSchema = inputSchema.shape;
|
|
34
34
|
outputSchema = {
|
|
35
|
-
trigger_id:
|
|
36
|
-
report_id:
|
|
37
|
-
schedules_url:
|
|
38
|
-
schedule:
|
|
35
|
+
trigger_id: zod_v4_1.z.string(),
|
|
36
|
+
report_id: zod_v4_1.z.string().nullable(),
|
|
37
|
+
schedules_url: zod_v4_1.z.string().describe('Open report schedules in OWOX.'),
|
|
38
|
+
schedule: zod_v4_1.z.null(),
|
|
39
39
|
};
|
|
40
40
|
annotations = {
|
|
41
41
|
title: 'Delete Report Run Schedule',
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod-v4';
|
|
2
2
|
import type { McpScope } from '@owox/idp-protocol';
|
|
3
3
|
import { type McpReportsFacade } from '../../../data-marts/facades/mcp-reports.facade';
|
|
4
4
|
import type { McpAuthContext } from '../auth/mcp-auth-context';
|
|
5
5
|
import { type McpToolDefinition, type McpToolResult } from './mcp-tool.definition';
|
|
6
6
|
declare const inputSchema: z.ZodObject<{
|
|
7
7
|
report_id: z.ZodString;
|
|
8
|
-
},
|
|
9
|
-
report_id: string;
|
|
10
|
-
}, {
|
|
11
|
-
report_id: string;
|
|
12
|
-
}>;
|
|
8
|
+
}, z.core.$strict>;
|
|
13
9
|
type DeleteReportInput = z.infer<typeof inputSchema>;
|
|
14
10
|
export declare class DeleteReportTool implements McpToolDefinition<DeleteReportInput> {
|
|
15
11
|
private readonly reports;
|
|
@@ -14,18 +14,18 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.DeleteReportTool = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
|
-
const
|
|
17
|
+
const zod_v4_1 = require("zod-v4");
|
|
18
18
|
const mcp_reports_facade_1 = require("../../../data-marts/facades/mcp-reports.facade");
|
|
19
19
|
const mcp_tool_definition_1 = require("./mcp-tool.definition");
|
|
20
|
-
const inputSchema =
|
|
20
|
+
const inputSchema = zod_v4_1.z.object({ report_id: zod_v4_1.z.string().min(1) }).strict();
|
|
21
21
|
let DeleteReportTool = class DeleteReportTool {
|
|
22
22
|
reports;
|
|
23
23
|
name = 'delete_report';
|
|
24
24
|
description = 'Delete a report by id. The report stops running and disappears from the project; the underlying data mart, destination, and any already-exported documents are not affected. This cannot be undone.';
|
|
25
25
|
zodSchema = inputSchema.shape;
|
|
26
26
|
outputSchema = {
|
|
27
|
-
report_id:
|
|
28
|
-
status:
|
|
27
|
+
report_id: zod_v4_1.z.string().describe('Id of the deleted report'),
|
|
28
|
+
status: zod_v4_1.z.literal('deleted').describe("Always 'deleted' on success"),
|
|
29
29
|
};
|
|
30
30
|
annotations = {
|
|
31
31
|
title: 'Delete Report',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod-v4';
|
|
2
2
|
import type { McpScope } from '@owox/idp-protocol';
|
|
3
3
|
import { PublicOriginService } from '../../../common/config/public-origin.service';
|
|
4
4
|
import { ReportRunStatus } from '../../../data-marts/enums/report-run-status.enum';
|
|
@@ -7,11 +7,7 @@ import type { McpAuthContext } from '../auth/mcp-auth-context';
|
|
|
7
7
|
import { type McpToolDefinition, type McpToolResult } from './mcp-tool.definition';
|
|
8
8
|
declare const inputSchema: z.ZodObject<{
|
|
9
9
|
data_mart_id: z.ZodString;
|
|
10
|
-
},
|
|
11
|
-
data_mart_id: string;
|
|
12
|
-
}, {
|
|
13
|
-
data_mart_id: string;
|
|
14
|
-
}>;
|
|
10
|
+
}, z.core.$strict>;
|
|
15
11
|
type GetDataMartReportsInput = z.infer<typeof inputSchema>;
|
|
16
12
|
export declare class GetDataMartReportsTool implements McpToolDefinition<GetDataMartReportsInput> {
|
|
17
13
|
private readonly reports;
|
|
@@ -30,106 +26,49 @@ export declare class GetDataMartReportsTool implements McpToolDefinition<GetData
|
|
|
30
26
|
is_active: z.ZodBoolean;
|
|
31
27
|
next_run_at: z.ZodNullable<z.ZodString>;
|
|
32
28
|
last_run_at: z.ZodNullable<z.ZodString>;
|
|
33
|
-
},
|
|
34
|
-
cron_expression: string;
|
|
35
|
-
time_zone: string;
|
|
36
|
-
is_active: boolean;
|
|
37
|
-
trigger_id: string;
|
|
38
|
-
next_run_at: string | null;
|
|
39
|
-
last_run_at: string | null;
|
|
40
|
-
}, {
|
|
41
|
-
cron_expression: string;
|
|
42
|
-
time_zone: string;
|
|
43
|
-
is_active: boolean;
|
|
44
|
-
trigger_id: string;
|
|
45
|
-
next_run_at: string | null;
|
|
46
|
-
last_run_at: string | null;
|
|
47
|
-
}>, "many">;
|
|
29
|
+
}, z.core.$strip>>;
|
|
48
30
|
last_run_at: z.ZodNullable<z.ZodString>;
|
|
49
|
-
last_run_status: z.ZodNullable<z.
|
|
31
|
+
last_run_status: z.ZodNullable<z.ZodEnum<typeof ReportRunStatus>>;
|
|
50
32
|
spreadsheet_id: z.ZodOptional<z.ZodString>;
|
|
51
33
|
sheet_url: z.ZodOptional<z.ZodString>;
|
|
52
|
-
fields: z.ZodArray<z.ZodString
|
|
53
|
-
unique_count_sources: z.ZodArray<z.ZodString
|
|
34
|
+
fields: z.ZodArray<z.ZodString>;
|
|
35
|
+
unique_count_sources: z.ZodArray<z.ZodString>;
|
|
54
36
|
filters: z.ZodArray<z.ZodObject<{
|
|
55
37
|
field: z.ZodString;
|
|
56
38
|
operator: z.ZodString;
|
|
57
39
|
value: z.ZodOptional<z.ZodUnknown>;
|
|
58
|
-
},
|
|
59
|
-
operator: string;
|
|
60
|
-
field: string;
|
|
61
|
-
value?: unknown;
|
|
62
|
-
}, {
|
|
63
|
-
operator: string;
|
|
64
|
-
field: string;
|
|
65
|
-
value?: unknown;
|
|
66
|
-
}>, "many">;
|
|
40
|
+
}, z.core.$strip>>;
|
|
67
41
|
slices: z.ZodArray<z.ZodObject<{
|
|
68
42
|
field: z.ZodString;
|
|
69
43
|
operator: z.ZodString;
|
|
70
44
|
value: z.ZodOptional<z.ZodUnknown>;
|
|
71
|
-
},
|
|
72
|
-
operator: string;
|
|
73
|
-
field: string;
|
|
74
|
-
value?: unknown;
|
|
75
|
-
}, {
|
|
76
|
-
operator: string;
|
|
77
|
-
field: string;
|
|
78
|
-
value?: unknown;
|
|
79
|
-
}>, "many">;
|
|
45
|
+
}, z.core.$strip>>;
|
|
80
46
|
ui_only_filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
81
47
|
field: z.ZodString;
|
|
82
48
|
operator: z.ZodString;
|
|
83
49
|
value: z.ZodOptional<z.ZodUnknown>;
|
|
84
|
-
|
|
85
|
-
|
|
50
|
+
placement: z.ZodEnum<{
|
|
51
|
+
"pre-join": "pre-join";
|
|
52
|
+
"post-join": "post-join";
|
|
53
|
+
}>;
|
|
86
54
|
function: z.ZodOptional<z.ZodString>;
|
|
87
|
-
},
|
|
88
|
-
operator: string;
|
|
89
|
-
placement: "pre-join" | "post-join";
|
|
90
|
-
field: string;
|
|
91
|
-
function?: string | undefined;
|
|
92
|
-
value?: unknown;
|
|
93
|
-
}, {
|
|
94
|
-
operator: string;
|
|
95
|
-
placement: "pre-join" | "post-join";
|
|
96
|
-
field: string;
|
|
97
|
-
function?: string | undefined;
|
|
98
|
-
value?: unknown;
|
|
99
|
-
}>, "many">>;
|
|
55
|
+
}, z.core.$strip>>>;
|
|
100
56
|
aggregations: z.ZodArray<z.ZodObject<{
|
|
101
57
|
field: z.ZodString;
|
|
102
58
|
function: z.ZodString;
|
|
103
|
-
},
|
|
104
|
-
function: string;
|
|
105
|
-
field: string;
|
|
106
|
-
}, {
|
|
107
|
-
function: string;
|
|
108
|
-
field: string;
|
|
109
|
-
}>, "many">;
|
|
59
|
+
}, z.core.$strip>>;
|
|
110
60
|
date_buckets: z.ZodArray<z.ZodObject<{
|
|
111
61
|
field: z.ZodString;
|
|
112
62
|
unit: z.ZodString;
|
|
113
63
|
time_zone: z.ZodOptional<z.ZodString>;
|
|
114
|
-
},
|
|
115
|
-
unit: string;
|
|
116
|
-
field: string;
|
|
117
|
-
time_zone?: string | undefined;
|
|
118
|
-
}, {
|
|
119
|
-
unit: string;
|
|
120
|
-
field: string;
|
|
121
|
-
time_zone?: string | undefined;
|
|
122
|
-
}>, "many">;
|
|
64
|
+
}, z.core.$strip>>;
|
|
123
65
|
sort: z.ZodArray<z.ZodObject<{
|
|
124
66
|
field: z.ZodString;
|
|
125
|
-
direction: z.ZodEnum<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
direction: "asc" | "desc";
|
|
131
|
-
field: string;
|
|
132
|
-
}>, "many">;
|
|
67
|
+
direction: z.ZodEnum<{
|
|
68
|
+
asc: "asc";
|
|
69
|
+
desc: "desc";
|
|
70
|
+
}>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
133
72
|
limit: z.ZodNullable<z.ZodNumber>;
|
|
134
73
|
report_id: z.ZodString;
|
|
135
74
|
report_url: z.ZodString;
|
|
@@ -137,123 +76,19 @@ export declare class GetDataMartReportsTool implements McpToolDefinition<GetData
|
|
|
137
76
|
name: z.ZodString;
|
|
138
77
|
destination_id: z.ZodString;
|
|
139
78
|
destination_url: z.ZodString;
|
|
140
|
-
destination_type: z.ZodEnum<
|
|
79
|
+
destination_type: z.ZodEnum<{
|
|
80
|
+
email: "email";
|
|
81
|
+
looker_studio: "looker_studio";
|
|
82
|
+
excel: "excel";
|
|
83
|
+
google_sheets: "google_sheets";
|
|
84
|
+
slack: "slack";
|
|
85
|
+
teams: "teams";
|
|
86
|
+
google_chat: "google_chat";
|
|
87
|
+
}>;
|
|
141
88
|
owner: z.ZodNullable<z.ZodString>;
|
|
142
89
|
created_by_current_user: z.ZodBoolean;
|
|
143
90
|
created_at: z.ZodString;
|
|
144
|
-
},
|
|
145
|
-
sort: {
|
|
146
|
-
direction: "asc" | "desc";
|
|
147
|
-
field: string;
|
|
148
|
-
}[];
|
|
149
|
-
name: string;
|
|
150
|
-
fields: string[];
|
|
151
|
-
destination_id: string;
|
|
152
|
-
data_mart_id: string;
|
|
153
|
-
limit: number | null;
|
|
154
|
-
filters: {
|
|
155
|
-
operator: string;
|
|
156
|
-
field: string;
|
|
157
|
-
value?: unknown;
|
|
158
|
-
}[];
|
|
159
|
-
aggregations: {
|
|
160
|
-
function: string;
|
|
161
|
-
field: string;
|
|
162
|
-
}[];
|
|
163
|
-
report_id: string;
|
|
164
|
-
destination_type: "email" | "looker_studio" | "excel" | "google_sheets" | "slack" | "teams" | "google_chat";
|
|
165
|
-
created_at: string;
|
|
166
|
-
unique_count_sources: string[];
|
|
167
|
-
slices: {
|
|
168
|
-
operator: string;
|
|
169
|
-
field: string;
|
|
170
|
-
value?: unknown;
|
|
171
|
-
}[];
|
|
172
|
-
date_buckets: {
|
|
173
|
-
unit: string;
|
|
174
|
-
field: string;
|
|
175
|
-
time_zone?: string | undefined;
|
|
176
|
-
}[];
|
|
177
|
-
owner: string | null;
|
|
178
|
-
report_url: string;
|
|
179
|
-
destination_url: string;
|
|
180
|
-
created_by_current_user: boolean;
|
|
181
|
-
schedules: {
|
|
182
|
-
cron_expression: string;
|
|
183
|
-
time_zone: string;
|
|
184
|
-
is_active: boolean;
|
|
185
|
-
trigger_id: string;
|
|
186
|
-
next_run_at: string | null;
|
|
187
|
-
last_run_at: string | null;
|
|
188
|
-
}[];
|
|
189
|
-
last_run_at: string | null;
|
|
190
|
-
last_run_status: ReportRunStatus | null;
|
|
191
|
-
ui_only_filters?: {
|
|
192
|
-
operator: string;
|
|
193
|
-
placement: "pre-join" | "post-join";
|
|
194
|
-
field: string;
|
|
195
|
-
function?: string | undefined;
|
|
196
|
-
value?: unknown;
|
|
197
|
-
}[] | undefined;
|
|
198
|
-
spreadsheet_id?: string | undefined;
|
|
199
|
-
sheet_url?: string | undefined;
|
|
200
|
-
}, {
|
|
201
|
-
sort: {
|
|
202
|
-
direction: "asc" | "desc";
|
|
203
|
-
field: string;
|
|
204
|
-
}[];
|
|
205
|
-
name: string;
|
|
206
|
-
fields: string[];
|
|
207
|
-
destination_id: string;
|
|
208
|
-
data_mart_id: string;
|
|
209
|
-
limit: number | null;
|
|
210
|
-
filters: {
|
|
211
|
-
operator: string;
|
|
212
|
-
field: string;
|
|
213
|
-
value?: unknown;
|
|
214
|
-
}[];
|
|
215
|
-
aggregations: {
|
|
216
|
-
function: string;
|
|
217
|
-
field: string;
|
|
218
|
-
}[];
|
|
219
|
-
report_id: string;
|
|
220
|
-
destination_type: "email" | "looker_studio" | "excel" | "google_sheets" | "slack" | "teams" | "google_chat";
|
|
221
|
-
created_at: string;
|
|
222
|
-
unique_count_sources: string[];
|
|
223
|
-
slices: {
|
|
224
|
-
operator: string;
|
|
225
|
-
field: string;
|
|
226
|
-
value?: unknown;
|
|
227
|
-
}[];
|
|
228
|
-
date_buckets: {
|
|
229
|
-
unit: string;
|
|
230
|
-
field: string;
|
|
231
|
-
time_zone?: string | undefined;
|
|
232
|
-
}[];
|
|
233
|
-
owner: string | null;
|
|
234
|
-
report_url: string;
|
|
235
|
-
destination_url: string;
|
|
236
|
-
created_by_current_user: boolean;
|
|
237
|
-
schedules: {
|
|
238
|
-
cron_expression: string;
|
|
239
|
-
time_zone: string;
|
|
240
|
-
is_active: boolean;
|
|
241
|
-
trigger_id: string;
|
|
242
|
-
next_run_at: string | null;
|
|
243
|
-
last_run_at: string | null;
|
|
244
|
-
}[];
|
|
245
|
-
last_run_at: string | null;
|
|
246
|
-
last_run_status: ReportRunStatus | null;
|
|
247
|
-
ui_only_filters?: {
|
|
248
|
-
operator: string;
|
|
249
|
-
placement: "pre-join" | "post-join";
|
|
250
|
-
field: string;
|
|
251
|
-
function?: string | undefined;
|
|
252
|
-
value?: unknown;
|
|
253
|
-
}[] | undefined;
|
|
254
|
-
spreadsheet_id?: string | undefined;
|
|
255
|
-
sheet_url?: string | undefined;
|
|
256
|
-
}>, "many">;
|
|
91
|
+
}, z.core.$strip>>;
|
|
257
92
|
};
|
|
258
93
|
readonly annotations: {
|
|
259
94
|
title: string;
|