@owox/backend 0.35.0 → 0.37.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 +10 -5
- 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 +16 -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 +11 -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 +11 -0
- package/dist/src/data-marts/dto/presentation/list-data-marts-query-api.dto.js +1 -1
- 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 +21 -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 +33 -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 +81 -0
- package/dist/src/data-marts/enums/data-mart-icon.enum.js +85 -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 +493 -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 +44 -0
- package/dist/src/data-marts/services/connector/connector-test.service.js +348 -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/context/context-access.service.js +2 -2
- package/dist/src/data-marts/services/data-mart.service.js +2 -0
- package/dist/src/data-marts/services/member-ownership-warnings.service.js +1 -1
- package/dist/src/data-marts/services/report-access.service.js +1 -1
- 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 +295 -0
- package/dist/src/data-marts/use-cases/stream-http-data.service.js +1 -0
- package/dist/src/data-marts/use-cases/update-availability.service.js +2 -2
- 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 +9 -7
- 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-owners.service.js +1 -1
- package/dist/src/data-marts/use-cases/update-data-mart-schema.service.js +14 -1
- package/dist/src/data-marts/use-cases/update-data-storage.service.js +2 -2
- 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/instructions/mcp-system-instructions.d.ts +1 -1
- package/dist/src/ee/mcp/instructions/mcp-system-instructions.js +3 -3
- 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 +89 -229
- package/dist/src/ee/mcp/tools/add-report.tool.js +30 -30
- 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 +14 -14
- 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 +16 -16
- 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 +15 -15
- 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 +36 -36
- 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 +6 -6
- 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 +3 -13
- package/dist/src/ee/mcp/tools/update-report-run-schedule.tool.js +16 -16
- package/dist/src/ee/mcp/tools/update-report.tool.d.ts +105 -414
- package/dist/src/ee/mcp/tools/update-report.tool.js +21 -21
- 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/decorators/auth.decorator.js +1 -1
- package/dist/src/idp/guards/idp.guard.js +3 -9
- 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-project-selection.service.js +1 -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
|
@@ -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;
|
|
@@ -14,7 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.GetDataMartReportsTool = 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_destination_type_1 = require("../../../data-marts/facades/mcp-destination-type");
|
|
20
20
|
const report_run_status_enum_1 = require("../../../data-marts/enums/report-run-status.enum");
|
|
@@ -23,7 +23,7 @@ const mcp_tool_definition_1 = require("./mcp-tool.definition");
|
|
|
23
23
|
const data_mart_ui_path_1 = require("./data-mart-ui-path");
|
|
24
24
|
const mcp_public_url_util_1 = require("./mcp-public-url.util");
|
|
25
25
|
const report_output_controls_output_1 = require("./report-output-controls-output");
|
|
26
|
-
const inputSchema =
|
|
26
|
+
const inputSchema = zod_v4_1.z.object({ data_mart_id: zod_v4_1.z.string().min(1) }).strict();
|
|
27
27
|
let GetDataMartReportsTool = class GetDataMartReportsTool {
|
|
28
28
|
reports;
|
|
29
29
|
publicOriginService;
|
|
@@ -31,31 +31,31 @@ let GetDataMartReportsTool = class GetDataMartReportsTool {
|
|
|
31
31
|
description = 'List the reports tied to a data mart in the active OWOX project, including each report destination, what it exports (fields, filters, slices, aggregations, date_buckets, sort, limit — in add_report/update_report vocabulary), the spreadsheet it writes to (Google Sheets), run schedules (a report can have any number of schedule triggers), and last run status. Call it before add_report to find a report that already exports what the user asks for — especially one with created_by_current_user=true — and change that one with update_report instead of creating a duplicate; reuse its spreadsheet_id when a related export should land in the same Google Sheets document.';
|
|
32
32
|
zodSchema = inputSchema.shape;
|
|
33
33
|
outputSchema = {
|
|
34
|
-
reports:
|
|
35
|
-
report_id:
|
|
36
|
-
report_url:
|
|
37
|
-
data_mart_id:
|
|
38
|
-
name:
|
|
39
|
-
destination_id:
|
|
40
|
-
destination_url:
|
|
41
|
-
destination_type:
|
|
42
|
-
owner:
|
|
43
|
-
created_by_current_user:
|
|
34
|
+
reports: zod_v4_1.z.array(zod_v4_1.z.object({
|
|
35
|
+
report_id: zod_v4_1.z.string(),
|
|
36
|
+
report_url: zod_v4_1.z.string().describe('Open this Data Mart reports page in OWOX.'),
|
|
37
|
+
data_mart_id: zod_v4_1.z.string(),
|
|
38
|
+
name: zod_v4_1.z.string(),
|
|
39
|
+
destination_id: zod_v4_1.z.string(),
|
|
40
|
+
destination_url: zod_v4_1.z.string().describe('Open the report destination in OWOX.'),
|
|
41
|
+
destination_type: zod_v4_1.z.enum(mcp_destination_type_1.MCP_DESTINATION_TYPES),
|
|
42
|
+
owner: zod_v4_1.z.string().nullable(),
|
|
43
|
+
created_by_current_user: zod_v4_1.z
|
|
44
44
|
.boolean()
|
|
45
45
|
.describe('True when you (the current MCP user) created this report.'),
|
|
46
|
-
created_at:
|
|
46
|
+
created_at: zod_v4_1.z.string().describe('ISO 8601 creation timestamp.'),
|
|
47
47
|
...report_output_controls_output_1.reportOutputControlsOutputShape,
|
|
48
48
|
...report_output_controls_output_1.reportSheetInfoOutputShape,
|
|
49
|
-
schedules:
|
|
50
|
-
trigger_id:
|
|
51
|
-
cron_expression:
|
|
52
|
-
time_zone:
|
|
53
|
-
is_active:
|
|
54
|
-
next_run_at:
|
|
55
|
-
last_run_at:
|
|
49
|
+
schedules: zod_v4_1.z.array(zod_v4_1.z.object({
|
|
50
|
+
trigger_id: zod_v4_1.z.string(),
|
|
51
|
+
cron_expression: zod_v4_1.z.string(),
|
|
52
|
+
time_zone: zod_v4_1.z.string(),
|
|
53
|
+
is_active: zod_v4_1.z.boolean(),
|
|
54
|
+
next_run_at: zod_v4_1.z.string().nullable(),
|
|
55
|
+
last_run_at: zod_v4_1.z.string().nullable(),
|
|
56
56
|
})),
|
|
57
|
-
last_run_at:
|
|
58
|
-
last_run_status:
|
|
57
|
+
last_run_at: zod_v4_1.z.string().nullable(),
|
|
58
|
+
last_run_status: zod_v4_1.z.nativeEnum(report_run_status_enum_1.ReportRunStatus).nullable(),
|
|
59
59
|
})),
|
|
60
60
|
};
|
|
61
61
|
annotations = {
|
|
@@ -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 GetReportOutputSchemaInput = z.infer<typeof inputSchema>;
|
|
14
10
|
export declare class GetReportOutputSchemaTool implements McpToolDefinition<GetReportOutputSchemaInput> {
|
|
15
11
|
private readonly reports;
|
|
@@ -27,21 +23,7 @@ export declare class GetReportOutputSchemaTool implements McpToolDefinition<GetR
|
|
|
27
23
|
type: z.ZodNullable<z.ZodString>;
|
|
28
24
|
aggregate_function: z.ZodNullable<z.ZodString>;
|
|
29
25
|
calculated_field_level: z.ZodNullable<z.ZodString>;
|
|
30
|
-
},
|
|
31
|
-
type: string | null;
|
|
32
|
-
title: string | null;
|
|
33
|
-
name: string;
|
|
34
|
-
description: string | null;
|
|
35
|
-
aggregate_function: string | null;
|
|
36
|
-
calculated_field_level: string | null;
|
|
37
|
-
}, {
|
|
38
|
-
type: string | null;
|
|
39
|
-
title: string | null;
|
|
40
|
-
name: string;
|
|
41
|
-
description: string | null;
|
|
42
|
-
aggregate_function: string | null;
|
|
43
|
-
calculated_field_level: string | null;
|
|
44
|
-
}>, "many">;
|
|
26
|
+
}, z.core.$strip>>;
|
|
45
27
|
};
|
|
46
28
|
readonly annotations: {
|
|
47
29
|
title: string;
|
|
@@ -14,10 +14,10 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.GetReportOutputSchemaTool = 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().trim().min(1) }).strict();
|
|
21
21
|
let GetReportOutputSchemaTool = class GetReportOutputSchemaTool {
|
|
22
22
|
reports;
|
|
23
23
|
name = 'get_report_output_schema';
|
|
@@ -26,23 +26,23 @@ let GetReportOutputSchemaTool = class GetReportOutputSchemaTool {
|
|
|
26
26
|
'`revenue | SUM`, Unique Count, calculated fields), which appear in no data mart schema. ' +
|
|
27
27
|
'Answers from the stored schema and the report config, so it reads no report data — the ' +
|
|
28
28
|
"columns are as of the Data Mart's last schema actualization, so one added warehouse-side and " +
|
|
29
|
-
'not yet actualized is missing until a run or a data read picks it up.
|
|
30
|
-
'
|
|
31
|
-
|
|
32
|
-
'
|
|
29
|
+
'not yet actualized is missing until a run or a data read picks it up. For a report that ' +
|
|
30
|
+
'joins other data marts, resolving the join may refresh SQL-defined source views in the ' +
|
|
31
|
+
'warehouse. This changes warehouse state and can incur warehouse costs even though the tool ' +
|
|
32
|
+
'does not return report data rows.';
|
|
33
33
|
zodSchema = inputSchema.shape;
|
|
34
34
|
outputSchema = {
|
|
35
|
-
report_id:
|
|
36
|
-
columns:
|
|
37
|
-
name:
|
|
38
|
-
title:
|
|
39
|
-
description:
|
|
40
|
-
type:
|
|
41
|
-
aggregate_function:
|
|
35
|
+
report_id: zod_v4_1.z.string(),
|
|
36
|
+
columns: zod_v4_1.z.array(zod_v4_1.z.object({
|
|
37
|
+
name: zod_v4_1.z.string().describe('The key each output row is keyed by.'),
|
|
38
|
+
title: zod_v4_1.z.string().nullable().describe('Alias configured for the column, if any.'),
|
|
39
|
+
description: zod_v4_1.z.string().nullable(),
|
|
40
|
+
type: zod_v4_1.z.string().nullable().describe('Storage field type, when it can be derived.'),
|
|
41
|
+
aggregate_function: zod_v4_1.z
|
|
42
42
|
.string()
|
|
43
43
|
.nullable()
|
|
44
44
|
.describe('The aggregate function the report applies to this column, if any.'),
|
|
45
|
-
calculated_field_level:
|
|
45
|
+
calculated_field_level: zod_v4_1.z
|
|
46
46
|
.string()
|
|
47
47
|
.nullable()
|
|
48
48
|
.describe('Calculated fields only. `metric` AGGREGATES — never re-aggregate it, whatever `type` says. `column` is row-level with no warehouse column behind it. null is an ordinary native column, which may be rolled up.'),
|
|
@@ -50,9 +50,9 @@ let GetReportOutputSchemaTool = class GetReportOutputSchemaTool {
|
|
|
50
50
|
};
|
|
51
51
|
annotations = {
|
|
52
52
|
title: 'Get Report Output Schema',
|
|
53
|
-
readOnlyHint:
|
|
53
|
+
readOnlyHint: false,
|
|
54
54
|
destructiveHint: false,
|
|
55
|
-
openWorldHint:
|
|
55
|
+
openWorldHint: true,
|
|
56
56
|
};
|
|
57
57
|
requiredScopes = ['mcp:read'];
|
|
58
58
|
constructor(reports) {
|
|
@@ -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 { type McpReportsFacade } from '../../../data-marts/facades/mcp-reports.facade';
|
|
4
4
|
import { DataMartRunStatus } from '../../../data-marts/enums/data-mart-run-status.enum';
|
|
@@ -8,13 +8,7 @@ import { type McpToolDefinition, type McpToolResult } from './mcp-tool.definitio
|
|
|
8
8
|
declare const inputSchema: z.ZodObject<{
|
|
9
9
|
report_id: z.ZodString;
|
|
10
10
|
run_id: z.ZodString;
|
|
11
|
-
},
|
|
12
|
-
report_id: string;
|
|
13
|
-
run_id: string;
|
|
14
|
-
}, {
|
|
15
|
-
report_id: string;
|
|
16
|
-
run_id: string;
|
|
17
|
-
}>;
|
|
11
|
+
}, z.core.$strict>;
|
|
18
12
|
type GetReportRunStatusInput = z.infer<typeof inputSchema>;
|
|
19
13
|
export declare class GetReportRunStatusTool implements McpToolDefinition<GetReportRunStatusInput> {
|
|
20
14
|
private readonly reports;
|
|
@@ -28,12 +22,22 @@ export declare class GetReportRunStatusTool implements McpToolDefinition<GetRepo
|
|
|
28
22
|
readonly outputSchema: {
|
|
29
23
|
report_id: z.ZodString;
|
|
30
24
|
run_id: z.ZodString;
|
|
31
|
-
status: z.ZodEnum<
|
|
25
|
+
status: z.ZodEnum<{
|
|
26
|
+
restricted: "restricted";
|
|
27
|
+
failed: "failed";
|
|
28
|
+
success: "success";
|
|
29
|
+
running: "running";
|
|
30
|
+
cancelled: "cancelled";
|
|
31
|
+
interrupted: "interrupted";
|
|
32
|
+
}>;
|
|
32
33
|
should_poll: z.ZodBoolean;
|
|
33
|
-
stop_reason: z.ZodNullable<z.ZodEnum<
|
|
34
|
+
stop_reason: z.ZodNullable<z.ZodEnum<{
|
|
35
|
+
queued_too_long: "queued_too_long";
|
|
36
|
+
running_too_long: "running_too_long";
|
|
37
|
+
}>>;
|
|
34
38
|
queued_at: z.ZodNullable<z.ZodString>;
|
|
35
39
|
started_at: z.ZodNullable<z.ZodString>;
|
|
36
|
-
raw_status: z.
|
|
40
|
+
raw_status: z.ZodEnum<typeof DataMartRunStatus>;
|
|
37
41
|
error: z.ZodNullable<z.ZodString>;
|
|
38
42
|
message: z.ZodNullable<z.ZodString>;
|
|
39
43
|
};
|
|
@@ -14,15 +14,15 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.GetReportRunStatusTool = 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 data_mart_run_status_enum_1 = require("../../../data-marts/enums/data-mart-run-status.enum");
|
|
20
20
|
const system_time_service_1 = require("../../../common/scheduler/services/system-time.service");
|
|
21
21
|
const mcp_tool_definition_1 = require("./mcp-tool.definition");
|
|
22
|
-
const inputSchema =
|
|
22
|
+
const inputSchema = zod_v4_1.z
|
|
23
23
|
.object({
|
|
24
|
-
report_id:
|
|
25
|
-
run_id:
|
|
24
|
+
report_id: zod_v4_1.z.string().trim().min(1),
|
|
25
|
+
run_id: zod_v4_1.z.string().trim().min(1),
|
|
26
26
|
})
|
|
27
27
|
.strict();
|
|
28
28
|
const RUN_LONGER_THAN_USUAL_MINUTES = 10;
|
|
@@ -35,16 +35,16 @@ let GetReportRunStatusTool = class GetReportRunStatusTool {
|
|
|
35
35
|
description = 'Get the current status of a report run, identified by report_id and run_id. The run_id may come from run_report or from add_report when initial_run.status is "queued". Report runs routinely take several minutes, so keep polling while should_poll is true and stop when should_poll is false; terminal statuses are "success", "failed", "cancelled", "interrupted", and "restricted". If you can wait between tool calls, poll about every 15 seconds; otherwise call again immediately. The message field tells you what to do next, including when to warn that a run is taking longer than usual and when to treat it as stuck and stop polling. stop_reason is set only when status is still "running" but should_poll is false, such as queued_too_long or running_too_long. queued_at is when the run was created; started_at is null until execution starts, including the brief worker-claimed state before the start time is recorded. raw_status exposes the backend status, and error is populated only for failed runs.';
|
|
36
36
|
zodSchema = inputSchema.shape;
|
|
37
37
|
outputSchema = {
|
|
38
|
-
report_id:
|
|
39
|
-
run_id:
|
|
40
|
-
status:
|
|
41
|
-
should_poll:
|
|
42
|
-
stop_reason:
|
|
43
|
-
queued_at:
|
|
44
|
-
started_at:
|
|
45
|
-
raw_status:
|
|
46
|
-
error:
|
|
47
|
-
message:
|
|
38
|
+
report_id: zod_v4_1.z.string(),
|
|
39
|
+
run_id: zod_v4_1.z.string(),
|
|
40
|
+
status: zod_v4_1.z.enum(mcp_reports_facade_1.MCP_REPORT_RUN_STATUSES),
|
|
41
|
+
should_poll: zod_v4_1.z.boolean(),
|
|
42
|
+
stop_reason: zod_v4_1.z.enum(['queued_too_long', 'running_too_long']).nullable(),
|
|
43
|
+
queued_at: zod_v4_1.z.string().nullable(),
|
|
44
|
+
started_at: zod_v4_1.z.string().nullable(),
|
|
45
|
+
raw_status: zod_v4_1.z.nativeEnum(data_mart_run_status_enum_1.DataMartRunStatus),
|
|
46
|
+
error: zod_v4_1.z.string().nullable(),
|
|
47
|
+
message: zod_v4_1.z.string().nullable(),
|
|
48
48
|
};
|
|
49
49
|
annotations = {
|
|
50
50
|
title: 'Get Report Run Status',
|