@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.AddDestinationTool = 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_data_destinations_facade_1 = require("../../../data-marts/facades/mcp-data-destinations.facade");
|
|
20
20
|
const mcp_destination_type_1 = require("../../../data-marts/facades/mcp-destination-type");
|
|
@@ -30,13 +30,13 @@ function toDisplayLabel(type) {
|
|
|
30
30
|
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
|
31
31
|
.join(' ');
|
|
32
32
|
}
|
|
33
|
-
const inputSchema =
|
|
33
|
+
const inputSchema = zod_v4_1.z
|
|
34
34
|
.object({
|
|
35
|
-
destination_type:
|
|
35
|
+
destination_type: zod_v4_1.z
|
|
36
36
|
.enum(mcp_destination_type_1.MCP_DESTINATION_TYPES)
|
|
37
37
|
.exclude(mcp_destination_type_1.MCP_NON_CREATABLE_DESTINATION_TYPES)
|
|
38
38
|
.describe('The type of destination to connect/create (e.g. google_sheets, looker_studio, email, slack, teams, google_chat).'),
|
|
39
|
-
title:
|
|
39
|
+
title: zod_v4_1.z
|
|
40
40
|
.string()
|
|
41
41
|
.trim()
|
|
42
42
|
.min(1)
|
|
@@ -49,8 +49,8 @@ const inputSchema = zod_1.z
|
|
|
49
49
|
'you to create it. Does NOT apply to google_sheets: that page never pre-fills its ' +
|
|
50
50
|
"name from this parameter — the user always sets it directly in the form, so it's " +
|
|
51
51
|
'ignored there. Applies to email, slack, teams, google_chat, and looker_studio only.'),
|
|
52
|
-
emails:
|
|
53
|
-
.array(
|
|
52
|
+
emails: zod_v4_1.z
|
|
53
|
+
.array(zod_v4_1.z.string().email())
|
|
54
54
|
.optional()
|
|
55
55
|
.describe('Mandatory list of target email addresses/delivery targets. This parameter is STRICTLY REQUIRED for email, slack, teams, and google_chat through MCP. MCP creates Google Chat destinations using channel-email delivery only; direct webhook delivery must be configured in the OWOX UI/API, and the secret webhook URL must not be sent through MCP/chat.'),
|
|
56
56
|
})
|
|
@@ -85,15 +85,15 @@ let AddDestinationTool = class AddDestinationTool {
|
|
|
85
85
|
'user must open the destination in the OWOX Data Marts UI to copy them.';
|
|
86
86
|
zodSchema = inputSchema.shape;
|
|
87
87
|
outputSchema = {
|
|
88
|
-
authorization_url:
|
|
89
|
-
instructions:
|
|
90
|
-
destination_id:
|
|
88
|
+
authorization_url: zod_v4_1.z.string().optional(),
|
|
89
|
+
instructions: zod_v4_1.z.string(),
|
|
90
|
+
destination_id: zod_v4_1.z
|
|
91
91
|
.string()
|
|
92
92
|
.optional()
|
|
93
93
|
.describe('The new destination id. Present for every destination_type EXCEPT google_sheets ' +
|
|
94
94
|
'(returned immediately, before any external action is needed). For google_sheets, ' +
|
|
95
95
|
'this is absent — use list_destinations after the user confirms setup instead.'),
|
|
96
|
-
destination_url:
|
|
96
|
+
destination_url: zod_v4_1.z
|
|
97
97
|
.string()
|
|
98
98
|
.optional()
|
|
99
99
|
.describe('Open the created destination in OWOX. Absent until Google Sheets OAuth creates it.'),
|
|
@@ -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 McpReportsFacade } from '../../../data-marts/facades/mcp-reports.facade';
|
|
@@ -8,154 +8,62 @@ export declare const SIMILAR_REPORT_EXISTS_ERROR_CODE = "similar_report_exists";
|
|
|
8
8
|
export declare const addReportInputSchema: z.ZodObject<{
|
|
9
9
|
data_mart_id: z.ZodString;
|
|
10
10
|
destination_id: z.ZodString;
|
|
11
|
-
fields: z.ZodArray<z.ZodString
|
|
11
|
+
fields: z.ZodArray<z.ZodString>;
|
|
12
12
|
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13
13
|
field: z.ZodString;
|
|
14
|
-
operator: z.
|
|
15
|
-
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown
|
|
16
|
-
},
|
|
17
|
-
operator: "between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after";
|
|
18
|
-
field: string;
|
|
19
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
field: string;
|
|
22
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
23
|
-
operator?: unknown;
|
|
24
|
-
}>, "many">>;
|
|
14
|
+
operator: z.ZodType<"between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after", unknown, z.core.$ZodTypeInternals<"between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after", unknown>>;
|
|
15
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
|
|
16
|
+
}, z.core.$strip>>>;
|
|
25
17
|
slices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26
18
|
field: z.ZodString;
|
|
27
|
-
operator: z.
|
|
28
|
-
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown
|
|
29
|
-
},
|
|
30
|
-
operator: "between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after";
|
|
31
|
-
field: string;
|
|
32
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
33
|
-
}, {
|
|
34
|
-
field: string;
|
|
35
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
36
|
-
operator?: unknown;
|
|
37
|
-
}>, "many">>;
|
|
19
|
+
operator: z.ZodType<"between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after", unknown, z.core.$ZodTypeInternals<"between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after", unknown>>;
|
|
20
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
|
|
21
|
+
}, z.core.$strip>>>;
|
|
38
22
|
aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
23
|
field: z.ZodString;
|
|
40
|
-
function: z.ZodEnum<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
24
|
+
function: z.ZodEnum<{
|
|
25
|
+
STRING_AGG: "STRING_AGG";
|
|
26
|
+
MAX: "MAX";
|
|
27
|
+
MIN: "MIN";
|
|
28
|
+
SUM: "SUM";
|
|
29
|
+
AVG: "AVG";
|
|
30
|
+
COUNT: "COUNT";
|
|
31
|
+
COUNT_DISTINCT: "COUNT_DISTINCT";
|
|
32
|
+
ANY_VALUE: "ANY_VALUE";
|
|
33
|
+
P25: "P25";
|
|
34
|
+
P50: "P50";
|
|
35
|
+
P75: "P75";
|
|
36
|
+
P95: "P95";
|
|
37
|
+
}>;
|
|
38
|
+
}, z.core.$strip>>>;
|
|
48
39
|
date_buckets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
40
|
field: z.ZodString;
|
|
50
|
-
unit: z.ZodEnum<
|
|
41
|
+
unit: z.ZodEnum<{
|
|
42
|
+
DAY: "DAY";
|
|
43
|
+
WEEK: "WEEK";
|
|
44
|
+
MONTH: "MONTH";
|
|
45
|
+
QUARTER: "QUARTER";
|
|
46
|
+
YEAR: "YEAR";
|
|
47
|
+
}>;
|
|
51
48
|
time_zone: z.ZodOptional<z.ZodString>;
|
|
52
|
-
},
|
|
53
|
-
unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
|
|
54
|
-
field: string;
|
|
55
|
-
time_zone?: string | undefined;
|
|
56
|
-
}, {
|
|
57
|
-
unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
|
|
58
|
-
field: string;
|
|
59
|
-
time_zone?: string | undefined;
|
|
60
|
-
}>, "many">>;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
61
50
|
sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
62
51
|
field: z.ZodString;
|
|
63
|
-
direction: z.ZodEnum<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
direction: "asc" | "desc";
|
|
69
|
-
field: string;
|
|
70
|
-
}>, "many">>;
|
|
52
|
+
direction: z.ZodEnum<{
|
|
53
|
+
asc: "asc";
|
|
54
|
+
desc: "desc";
|
|
55
|
+
}>;
|
|
56
|
+
}, z.core.$strip>>>;
|
|
71
57
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
72
58
|
name: z.ZodOptional<z.ZodString>;
|
|
73
59
|
message: z.ZodOptional<z.ZodObject<{
|
|
74
60
|
subject: z.ZodOptional<z.ZodString>;
|
|
75
61
|
body: z.ZodString;
|
|
76
|
-
},
|
|
77
|
-
body: string;
|
|
78
|
-
subject?: string | undefined;
|
|
79
|
-
}, {
|
|
80
|
-
body: string;
|
|
81
|
-
subject?: string | undefined;
|
|
82
|
-
}>>;
|
|
62
|
+
}, z.core.$strict>>;
|
|
83
63
|
run_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
84
64
|
spreadsheet_id: z.ZodOptional<z.ZodString>;
|
|
85
65
|
allow_similar: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
-
},
|
|
87
|
-
fields: string[];
|
|
88
|
-
destination_id: string;
|
|
89
|
-
data_mart_id: string;
|
|
90
|
-
message?: {
|
|
91
|
-
body: string;
|
|
92
|
-
subject?: string | undefined;
|
|
93
|
-
} | undefined;
|
|
94
|
-
sort?: {
|
|
95
|
-
direction: "asc" | "desc";
|
|
96
|
-
field: string;
|
|
97
|
-
}[] | undefined;
|
|
98
|
-
name?: string | undefined;
|
|
99
|
-
limit?: number | undefined;
|
|
100
|
-
filters?: {
|
|
101
|
-
operator: "between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after";
|
|
102
|
-
field: string;
|
|
103
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
104
|
-
}[] | undefined;
|
|
105
|
-
aggregations?: {
|
|
106
|
-
function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
|
|
107
|
-
field: string;
|
|
108
|
-
}[] | undefined;
|
|
109
|
-
slices?: {
|
|
110
|
-
operator: "between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after";
|
|
111
|
-
field: string;
|
|
112
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
113
|
-
}[] | undefined;
|
|
114
|
-
date_buckets?: {
|
|
115
|
-
unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
|
|
116
|
-
field: string;
|
|
117
|
-
time_zone?: string | undefined;
|
|
118
|
-
}[] | undefined;
|
|
119
|
-
spreadsheet_id?: string | undefined;
|
|
120
|
-
run_immediately?: boolean | undefined;
|
|
121
|
-
allow_similar?: boolean | undefined;
|
|
122
|
-
}, {
|
|
123
|
-
fields: string[];
|
|
124
|
-
destination_id: string;
|
|
125
|
-
data_mart_id: string;
|
|
126
|
-
message?: {
|
|
127
|
-
body: string;
|
|
128
|
-
subject?: string | undefined;
|
|
129
|
-
} | undefined;
|
|
130
|
-
sort?: {
|
|
131
|
-
direction: "asc" | "desc";
|
|
132
|
-
field: string;
|
|
133
|
-
}[] | undefined;
|
|
134
|
-
name?: string | undefined;
|
|
135
|
-
limit?: number | undefined;
|
|
136
|
-
filters?: {
|
|
137
|
-
field: string;
|
|
138
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
139
|
-
operator?: unknown;
|
|
140
|
-
}[] | undefined;
|
|
141
|
-
aggregations?: {
|
|
142
|
-
function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
|
|
143
|
-
field: string;
|
|
144
|
-
}[] | undefined;
|
|
145
|
-
slices?: {
|
|
146
|
-
field: string;
|
|
147
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
148
|
-
operator?: unknown;
|
|
149
|
-
}[] | undefined;
|
|
150
|
-
date_buckets?: {
|
|
151
|
-
unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
|
|
152
|
-
field: string;
|
|
153
|
-
time_zone?: string | undefined;
|
|
154
|
-
}[] | undefined;
|
|
155
|
-
spreadsheet_id?: string | undefined;
|
|
156
|
-
run_immediately?: boolean | undefined;
|
|
157
|
-
allow_similar?: boolean | undefined;
|
|
158
|
-
}>;
|
|
66
|
+
}, z.core.$strict>;
|
|
159
67
|
type AddReportInput = z.infer<typeof addReportInputSchema>;
|
|
160
68
|
export declare class AddReportTool implements McpToolDefinition<AddReportInput> {
|
|
161
69
|
private readonly reports;
|
|
@@ -165,78 +73,58 @@ export declare class AddReportTool implements McpToolDefinition<AddReportInput>
|
|
|
165
73
|
readonly zodSchema: {
|
|
166
74
|
data_mart_id: z.ZodString;
|
|
167
75
|
destination_id: z.ZodString;
|
|
168
|
-
fields: z.ZodArray<z.ZodString
|
|
76
|
+
fields: z.ZodArray<z.ZodString>;
|
|
169
77
|
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
170
78
|
field: z.ZodString;
|
|
171
|
-
operator: z.
|
|
172
|
-
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown
|
|
173
|
-
},
|
|
174
|
-
operator: "between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after";
|
|
175
|
-
field: string;
|
|
176
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
177
|
-
}, {
|
|
178
|
-
field: string;
|
|
179
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
180
|
-
operator?: unknown;
|
|
181
|
-
}>, "many">>;
|
|
79
|
+
operator: z.ZodType<"between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after", unknown, z.core.$ZodTypeInternals<"between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after", unknown>>;
|
|
80
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
|
|
81
|
+
}, z.core.$strip>>>;
|
|
182
82
|
slices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
183
83
|
field: z.ZodString;
|
|
184
|
-
operator: z.
|
|
185
|
-
value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown
|
|
186
|
-
},
|
|
187
|
-
operator: "between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after";
|
|
188
|
-
field: string;
|
|
189
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
190
|
-
}, {
|
|
191
|
-
field: string;
|
|
192
|
-
value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
193
|
-
operator?: unknown;
|
|
194
|
-
}>, "many">>;
|
|
84
|
+
operator: z.ZodType<"between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after", unknown, z.core.$ZodTypeInternals<"between" | "in" | "this_week" | "last_week" | "this_month" | "this_quarter" | "last_quarter" | "this_year" | "eq" | "neq" | "contains" | "not_contains" | "starts_with" | "ends_with" | "gt" | "lt" | "gte" | "lte" | "is_blank" | "is_not_blank" | "is_empty" | "is_not_empty" | "is_null" | "is_not_null" | "not_in" | "in_last_n_days" | "in_next_n_days" | "before" | "after", unknown>>;
|
|
85
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
|
|
86
|
+
}, z.core.$strip>>>;
|
|
195
87
|
aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
196
88
|
field: z.ZodString;
|
|
197
|
-
function: z.ZodEnum<
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
89
|
+
function: z.ZodEnum<{
|
|
90
|
+
STRING_AGG: "STRING_AGG";
|
|
91
|
+
MAX: "MAX";
|
|
92
|
+
MIN: "MIN";
|
|
93
|
+
SUM: "SUM";
|
|
94
|
+
AVG: "AVG";
|
|
95
|
+
COUNT: "COUNT";
|
|
96
|
+
COUNT_DISTINCT: "COUNT_DISTINCT";
|
|
97
|
+
ANY_VALUE: "ANY_VALUE";
|
|
98
|
+
P25: "P25";
|
|
99
|
+
P50: "P50";
|
|
100
|
+
P75: "P75";
|
|
101
|
+
P95: "P95";
|
|
102
|
+
}>;
|
|
103
|
+
}, z.core.$strip>>>;
|
|
205
104
|
date_buckets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
206
105
|
field: z.ZodString;
|
|
207
|
-
unit: z.ZodEnum<
|
|
106
|
+
unit: z.ZodEnum<{
|
|
107
|
+
DAY: "DAY";
|
|
108
|
+
WEEK: "WEEK";
|
|
109
|
+
MONTH: "MONTH";
|
|
110
|
+
QUARTER: "QUARTER";
|
|
111
|
+
YEAR: "YEAR";
|
|
112
|
+
}>;
|
|
208
113
|
time_zone: z.ZodOptional<z.ZodString>;
|
|
209
|
-
},
|
|
210
|
-
unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
|
|
211
|
-
field: string;
|
|
212
|
-
time_zone?: string | undefined;
|
|
213
|
-
}, {
|
|
214
|
-
unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
|
|
215
|
-
field: string;
|
|
216
|
-
time_zone?: string | undefined;
|
|
217
|
-
}>, "many">>;
|
|
114
|
+
}, z.core.$strip>>>;
|
|
218
115
|
sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
219
116
|
field: z.ZodString;
|
|
220
|
-
direction: z.ZodEnum<
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
},
|
|
225
|
-
direction: "asc" | "desc";
|
|
226
|
-
field: string;
|
|
227
|
-
}>, "many">>;
|
|
117
|
+
direction: z.ZodEnum<{
|
|
118
|
+
asc: "asc";
|
|
119
|
+
desc: "desc";
|
|
120
|
+
}>;
|
|
121
|
+
}, z.core.$strip>>>;
|
|
228
122
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
229
123
|
name: z.ZodOptional<z.ZodString>;
|
|
230
124
|
message: z.ZodOptional<z.ZodObject<{
|
|
231
125
|
subject: z.ZodOptional<z.ZodString>;
|
|
232
126
|
body: z.ZodString;
|
|
233
|
-
},
|
|
234
|
-
body: string;
|
|
235
|
-
subject?: string | undefined;
|
|
236
|
-
}, {
|
|
237
|
-
body: string;
|
|
238
|
-
subject?: string | undefined;
|
|
239
|
-
}>>;
|
|
127
|
+
}, z.core.$strict>>;
|
|
240
128
|
run_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
241
129
|
spreadsheet_id: z.ZodOptional<z.ZodString>;
|
|
242
130
|
allow_similar: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -244,61 +132,25 @@ export declare class AddReportTool implements McpToolDefinition<AddReportInput>
|
|
|
244
132
|
readonly outputSchema: {
|
|
245
133
|
owner: z.ZodNullable<z.ZodString>;
|
|
246
134
|
status: z.ZodLiteral<"created">;
|
|
247
|
-
initial_run: z.ZodDiscriminatedUnion<
|
|
135
|
+
initial_run: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
248
136
|
status: z.ZodLiteral<"queued">;
|
|
249
137
|
run_id: z.ZodString;
|
|
250
138
|
should_poll: z.ZodLiteral<true>;
|
|
251
139
|
message: z.ZodString;
|
|
252
|
-
},
|
|
253
|
-
status: "queued";
|
|
254
|
-
message: string;
|
|
255
|
-
run_id: string;
|
|
256
|
-
should_poll: true;
|
|
257
|
-
}, {
|
|
258
|
-
status: "queued";
|
|
259
|
-
message: string;
|
|
260
|
-
run_id: string;
|
|
261
|
-
should_poll: true;
|
|
262
|
-
}>, z.ZodObject<{
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
263
141
|
status: z.ZodLiteral<"not_requested">;
|
|
264
142
|
should_poll: z.ZodLiteral<false>;
|
|
265
143
|
message: z.ZodString;
|
|
266
|
-
},
|
|
267
|
-
status: "not_requested";
|
|
268
|
-
message: string;
|
|
269
|
-
should_poll: false;
|
|
270
|
-
}, {
|
|
271
|
-
status: "not_requested";
|
|
272
|
-
message: string;
|
|
273
|
-
should_poll: false;
|
|
274
|
-
}>, z.ZodObject<{
|
|
144
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
275
145
|
status: z.ZodLiteral<"not_applicable">;
|
|
276
146
|
should_poll: z.ZodLiteral<false>;
|
|
277
147
|
message: z.ZodString;
|
|
278
|
-
},
|
|
279
|
-
status: "not_applicable";
|
|
280
|
-
message: string;
|
|
281
|
-
should_poll: false;
|
|
282
|
-
}, {
|
|
283
|
-
status: "not_applicable";
|
|
284
|
-
message: string;
|
|
285
|
-
should_poll: false;
|
|
286
|
-
}>, z.ZodObject<{
|
|
148
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
287
149
|
status: z.ZodLiteral<"failed_to_queue">;
|
|
288
150
|
should_poll: z.ZodLiteral<false>;
|
|
289
151
|
error: z.ZodString;
|
|
290
152
|
message: z.ZodString;
|
|
291
|
-
},
|
|
292
|
-
status: "failed_to_queue";
|
|
293
|
-
message: string;
|
|
294
|
-
error: string;
|
|
295
|
-
should_poll: false;
|
|
296
|
-
}, {
|
|
297
|
-
status: "failed_to_queue";
|
|
298
|
-
message: string;
|
|
299
|
-
error: string;
|
|
300
|
-
should_poll: false;
|
|
301
|
-
}>]>;
|
|
153
|
+
}, z.core.$strip>], "status">;
|
|
302
154
|
instructions: z.ZodOptional<z.ZodString>;
|
|
303
155
|
setup_guide_url: z.ZodOptional<z.ZodString>;
|
|
304
156
|
placed_in_root: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -306,7 +158,15 @@ export declare class AddReportTool implements McpToolDefinition<AddReportInput>
|
|
|
306
158
|
spreadsheet_id: z.ZodOptional<z.ZodString>;
|
|
307
159
|
sheet_url: z.ZodOptional<z.ZodString>;
|
|
308
160
|
report_id: z.ZodString;
|
|
309
|
-
destination_type: z.ZodEnum<
|
|
161
|
+
destination_type: z.ZodEnum<{
|
|
162
|
+
email: "email";
|
|
163
|
+
looker_studio: "looker_studio";
|
|
164
|
+
excel: "excel";
|
|
165
|
+
google_sheets: "google_sheets";
|
|
166
|
+
slack: "slack";
|
|
167
|
+
teams: "teams";
|
|
168
|
+
google_chat: "google_chat";
|
|
169
|
+
}>;
|
|
310
170
|
report_url: z.ZodString;
|
|
311
171
|
};
|
|
312
172
|
readonly annotations: {
|
|
@@ -14,7 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.AddReportTool = exports.addReportInputSchema = exports.SIMILAR_REPORT_EXISTS_ERROR_CODE = 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_reports_facade_1 = require("../../../data-marts/facades/mcp-reports.facade");
|
|
20
20
|
const mcp_destination_type_1 = require("../../../data-marts/facades/mcp-destination-type");
|
|
@@ -54,60 +54,60 @@ function refreshGuidanceFor(destinationType) {
|
|
|
54
54
|
return 'update_report does not run this destination type; it only changes the report definition.';
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
exports.addReportInputSchema =
|
|
57
|
+
exports.addReportInputSchema = zod_v4_1.z
|
|
58
58
|
.object({
|
|
59
|
-
data_mart_id:
|
|
60
|
-
destination_id:
|
|
61
|
-
fields:
|
|
62
|
-
.array(
|
|
59
|
+
data_mart_id: zod_v4_1.z.string().min(1),
|
|
60
|
+
destination_id: zod_v4_1.z.string().min(1),
|
|
61
|
+
fields: zod_v4_1.z
|
|
62
|
+
.array(zod_v4_1.z.string().min(1))
|
|
63
63
|
.min(1)
|
|
64
64
|
.describe("Column names to include, or ['*'] for every field"),
|
|
65
|
-
filters:
|
|
65
|
+
filters: zod_v4_1.z
|
|
66
66
|
.array((0, query_data_mart_input_1.makeMcpFilterSchema)())
|
|
67
67
|
.min(1)
|
|
68
68
|
.optional()
|
|
69
69
|
.describe('Row filters applied on every report run, so the export matches a filtered query_data_mart result — same shape and operator vocabulary as query_data_mart\'s "filters"; copy them verbatim from the query whose numbers the user is looking at. A filter may reference a field that is not in fields. Omit to export all rows.'),
|
|
70
|
-
slices:
|
|
70
|
+
slices: zod_v4_1.z
|
|
71
71
|
.array((0, query_data_mart_input_1.makeMcpFilterSchema)())
|
|
72
72
|
.min(1)
|
|
73
73
|
.optional()
|
|
74
74
|
.describe('Pre-join filters, same as query_data_mart\'s "slices": narrow a JOINED data mart before it is blended in. Only applicable to blended data marts; criteria on the main data mart belong in "filters".'),
|
|
75
|
-
aggregations:
|
|
75
|
+
aggregations: zod_v4_1.z
|
|
76
76
|
.array((0, query_data_mart_input_1.makeMcpReportAggregationSchema)())
|
|
77
77
|
.min(1)
|
|
78
78
|
.optional()
|
|
79
79
|
.describe('Aggregations applied on every report run, same as query_data_mart\'s "aggregations" plus the report-only STRING_AGG and ANY_VALUE. Each aggregated field must also appear in fields; fields that are neither aggregated nor bucketed become group-by dimensions. Omit to export raw rows.'),
|
|
80
|
-
date_buckets:
|
|
80
|
+
date_buckets: zod_v4_1.z
|
|
81
81
|
.array((0, query_data_mart_input_1.makeMcpDateBucketSchema)())
|
|
82
82
|
.min(1)
|
|
83
83
|
.optional()
|
|
84
84
|
.describe('Bucket a date/timestamp field by DAY/WEEK/MONTH/QUARTER/YEAR, same as query_data_mart\'s "date_buckets". Each bucketed field must also appear in fields.'),
|
|
85
|
-
sort:
|
|
85
|
+
sort: zod_v4_1.z
|
|
86
86
|
.array((0, query_data_mart_input_1.makeMcpSortSchema)())
|
|
87
87
|
.min(1)
|
|
88
88
|
.optional()
|
|
89
89
|
.describe('Order the exported rows, same as query_data_mart\'s "sort". Each sorted field must also appear in fields.'),
|
|
90
|
-
limit:
|
|
90
|
+
limit: zod_v4_1.z
|
|
91
91
|
.number()
|
|
92
92
|
.int()
|
|
93
93
|
.min(1)
|
|
94
94
|
.optional()
|
|
95
95
|
.describe('Max rows each report run exports. Omit for no cap. Do NOT copy the interactive limit from a query_data_mart call unless the user explicitly wants the export capped.'),
|
|
96
|
-
name:
|
|
96
|
+
name: zod_v4_1.z
|
|
97
97
|
.string()
|
|
98
98
|
.trim()
|
|
99
99
|
.min(1)
|
|
100
100
|
.optional()
|
|
101
101
|
.describe("Report name — also the new sheet's title (Google Sheets) and the default message subject (email family). Required for those destination types; not accepted for Looker Studio, whose reports carry no name."),
|
|
102
|
-
message:
|
|
102
|
+
message: zod_v4_1.z
|
|
103
103
|
.object({
|
|
104
|
-
subject:
|
|
104
|
+
subject: zod_v4_1.z
|
|
105
105
|
.string()
|
|
106
106
|
.trim()
|
|
107
107
|
.min(1)
|
|
108
108
|
.optional()
|
|
109
109
|
.describe('Message subject or heading. Defaults to the report name.'),
|
|
110
|
-
body:
|
|
110
|
+
body: zod_v4_1.z
|
|
111
111
|
.string()
|
|
112
112
|
.trim()
|
|
113
113
|
.min(1)
|
|
@@ -116,17 +116,17 @@ exports.addReportInputSchema = zod_1.z
|
|
|
116
116
|
.strict()
|
|
117
117
|
.optional()
|
|
118
118
|
.describe('Message settings. Required for email, slack, teams, and google_chat destinations; rejected for other types. Recipients and channels are configured on the destination itself, and the message is sent on every report run.'),
|
|
119
|
-
run_immediately:
|
|
119
|
+
run_immediately: zod_v4_1.z
|
|
120
120
|
.boolean()
|
|
121
121
|
.optional()
|
|
122
122
|
.describe('Whether to run the new report immediately. Defaults to true for push destinations (Google Sheets, Email, Slack, Microsoft Teams, Google Chat), which starts one billed Report Run and delivers data. Set false only when the user explicitly wants configuration-only creation, such as before adding a schedule. Looker Studio is pull-based: omit this field or set false; true is rejected.'),
|
|
123
|
-
spreadsheet_id:
|
|
123
|
+
spreadsheet_id: zod_v4_1.z
|
|
124
124
|
.string()
|
|
125
125
|
.trim()
|
|
126
126
|
.min(1)
|
|
127
127
|
.optional()
|
|
128
128
|
.describe("Google Sheets only. Add the report as a new sheet (tab) of this existing spreadsheet instead of creating a new file — use the spreadsheet_id returned by an earlier add_report in this conversation, or by get_data_mart_reports. Pass it whenever the user asks for several related exports, so they land in ONE document. The sheet is named after `name` and must not exist yet, so every report added to the same document needs a distinct name — including the first report's, whose name is also the document's first sheet; the destination's connected Google account needs edit access to the spreadsheet. Rejected for other destination types."),
|
|
129
|
-
allow_similar:
|
|
129
|
+
allow_similar: zod_v4_1.z
|
|
130
130
|
.boolean()
|
|
131
131
|
.optional()
|
|
132
132
|
.describe('By default add_report refuses (error_code similar_report_exists) when you already created a report exporting the same fields from this data mart to this destination — change that report with update_report instead. Set true only after the user explicitly confirmed they want a separate, additional report.'),
|
|
@@ -139,28 +139,28 @@ let AddReportTool = class AddReportTool {
|
|
|
139
139
|
description = 'Create a report that exports a data mart to an existing destination (create one with add_destination if the project has none — check list_destinations first). This is THE way to export, save, or deliver OWOX data — to Google Sheets, email, Slack, Microsoft Teams, Google Chat, or Looker Studio; never copy query_data_mart rows into a CSV, a file, or a document through another integration. Create one report per user request, then change it with update_report when the user asks to add a filter, sort, aggregation, or rename it — do not create another report for the same data: the tool refuses a report whose fields duplicate one you already created on this data mart and destination (error_code similar_report_exists). For push destinations, the new report runs immediately by default: this starts one billed Report Run and delivers data, then initial_run returns the run_id to poll with get_report_run_status. Set run_immediately=false only when the user explicitly wants to create configuration without delivering data, such as before adding a schedule. Every destination type accepts the same optional output controls as query_data_mart — filters, slices, aggregations, date_buckets, sort — applied on each run: when the user asks to export numbers they saw in a query, copy those parameters verbatim from that query so the report matches what they saw. Google Sheets: a new Google Sheet is created automatically (an external Google Drive side effect) with its file and sheet named after `name`, and linked to the report; pass spreadsheet_id to add the report as a sheet of an existing spreadsheet instead, so several related exports share one document. Looker Studio is pull-based, never runs through this tool, and accepts no name; omit run_immediately or set it false. Email, Slack, Microsoft Teams, Google Chat: requires message; the default initial run sends it to the configured recipients or channels.';
|
|
140
140
|
zodSchema = exports.addReportInputSchema.shape;
|
|
141
141
|
outputSchema = {
|
|
142
|
-
report_id:
|
|
143
|
-
destination_type:
|
|
142
|
+
report_id: zod_v4_1.z.string(),
|
|
143
|
+
destination_type: zod_v4_1.z
|
|
144
144
|
.enum(mcp_destination_type_1.MCP_DESTINATION_TYPES)
|
|
145
145
|
.describe('Type of the destination the report was created for.'),
|
|
146
|
-
report_url:
|
|
146
|
+
report_url: zod_v4_1.z.string(),
|
|
147
147
|
...report_output_controls_output_1.reportSheetInfoOutputShape,
|
|
148
|
-
owner:
|
|
149
|
-
status:
|
|
148
|
+
owner: zod_v4_1.z.string().nullable(),
|
|
149
|
+
status: zod_v4_1.z.literal('created'),
|
|
150
150
|
initial_run: report_run_outcome_1.reportRunOutcomeSchema.describe('Outcome of the automatic first run. The report exists for every status, including failed_to_queue.'),
|
|
151
|
-
instructions:
|
|
151
|
+
instructions: zod_v4_1.z
|
|
152
152
|
.string()
|
|
153
153
|
.optional()
|
|
154
154
|
.describe('Looker Studio only. What has to happen before dashboard data flows; relay this to the user.'),
|
|
155
|
-
setup_guide_url:
|
|
155
|
+
setup_guide_url: zod_v4_1.z
|
|
156
156
|
.string()
|
|
157
157
|
.optional()
|
|
158
158
|
.describe('Looker Studio only. Public step-by-step guide for connecting Looker Studio to OWOX — share this link with the user.'),
|
|
159
|
-
placed_in_root:
|
|
159
|
+
placed_in_root: zod_v4_1.z
|
|
160
160
|
.boolean()
|
|
161
161
|
.optional()
|
|
162
162
|
.describe('Google Sheets only, new files only. True when the configured Drive folder could not be used and the sheet was created in the Drive root instead.'),
|
|
163
|
-
shared_with_requester:
|
|
163
|
+
shared_with_requester: zod_v4_1.z
|
|
164
164
|
.boolean()
|
|
165
165
|
.optional()
|
|
166
166
|
.describe('Google Sheets only. New file: false when the sheet could not be shared with you. Existing spreadsheet (spreadsheet_id): false when your access to it could not be confirmed. Either way, opening the link may require requesting access — say so to the user.'),
|