@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.
Files changed (283) hide show
  1. package/dist/src/common/exceptions/concurrency-limit-exceeded.exception.d.ts +1 -1
  2. package/dist/src/common/exceptions/concurrency-limit-exceeded.exception.js +2 -2
  3. package/dist/src/common/markdown/markdown-parser.service.d.ts +2 -0
  4. package/dist/src/common/markdown/markdown-parser.service.js +15 -8
  5. package/dist/src/common/validators/max-byte-length.validator.d.ts +2 -0
  6. package/dist/src/common/validators/max-byte-length.validator.js +29 -0
  7. package/dist/src/config/env-validation.config.d.ts +12 -0
  8. package/dist/src/config/env-validation.config.js +7 -0
  9. package/dist/src/data-marts/ai-insights/agent/types.d.ts +6 -6
  10. package/dist/src/data-marts/calculated-fields/calculated-field-validator.service.js +22 -30
  11. package/dist/src/data-marts/calculated-fields/calculated-field.utils.d.ts +1 -0
  12. package/dist/src/data-marts/calculated-fields/calculated-field.utils.js +21 -0
  13. package/dist/src/data-marts/calculated-fields/formula-analyzer.d.ts +1 -0
  14. package/dist/src/data-marts/calculated-fields/formula-analyzer.js +2 -0
  15. package/dist/src/data-marts/calculated-fields/formula-violations.d.ts +7 -0
  16. package/dist/src/data-marts/calculated-fields/formula-violations.js +82 -1
  17. package/dist/src/data-marts/calculated-fields/join-grain.d.ts +32 -0
  18. package/dist/src/data-marts/calculated-fields/join-grain.js +107 -0
  19. package/dist/src/data-marts/calculated-fields/set-quantifier.d.ts +8 -0
  20. package/dist/src/data-marts/calculated-fields/set-quantifier.js +12 -0
  21. package/dist/src/data-marts/connector-types/connector-message/schemas/connector-message.schema.d.ts +66 -0
  22. package/dist/src/data-marts/connector-types/connector-message/schemas/connector-message.schema.js +13 -1
  23. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-credentials-update.schema.d.ts +3 -0
  24. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-credentials-update.schema.js +1 -0
  25. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-error.schema.d.ts +3 -0
  26. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-error.schema.js +1 -0
  27. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-log.schema.d.ts +12 -0
  28. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-log.schema.js +4 -0
  29. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-requested-date.schema.d.ts +3 -0
  30. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-requested-date.schema.js +1 -0
  31. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-state-update.schema.d.ts +16 -0
  32. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-state-update.schema.js +16 -0
  33. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-status.schema.d.ts +3 -0
  34. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-status.schema.js +1 -0
  35. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-warning.schema.d.ts +3 -0
  36. package/dist/src/data-marts/connector-types/connector-message/schemas/types/message-warning.schema.js +1 -0
  37. package/dist/src/data-marts/connector-types/connector-message/services/connector-event.translator.d.ts +10 -0
  38. package/dist/src/data-marts/connector-types/connector-message/services/connector-event.translator.js +138 -0
  39. package/dist/src/data-marts/connector-types/connector-message/services/connector-message-parser.service.d.ts +1 -3
  40. package/dist/src/data-marts/connector-types/connector-message/services/connector-message-parser.service.js +30 -34
  41. package/dist/src/data-marts/connector-types/connector-message/services/connector-output-capture.service.js +10 -12
  42. package/dist/src/data-marts/connector-types/connector-message/services/connector-state.service.js +3 -1
  43. package/dist/src/data-marts/connector-types/enums/connector-message-type-enum.d.ts +1 -0
  44. package/dist/src/data-marts/connector-types/enums/connector-message-type-enum.js +1 -0
  45. package/dist/src/data-marts/controllers/connector-definition.controller.d.ts +30 -0
  46. package/dist/src/data-marts/controllers/connector-definition.controller.js +252 -0
  47. package/dist/src/data-marts/controllers/data-mart-preview.controller.d.ts +10 -0
  48. package/dist/src/data-marts/controllers/data-mart-preview.controller.js +58 -0
  49. package/dist/src/data-marts/controllers/data-mart.controller.d.ts +5 -1
  50. package/dist/src/data-marts/controllers/data-mart.controller.js +25 -4
  51. package/dist/src/data-marts/controllers/insight-template.controller.js +4 -4
  52. package/dist/src/data-marts/controllers/insight.controller.js +5 -5
  53. package/dist/src/data-marts/controllers/project-data-mart-runs.controller.js +1 -1
  54. package/dist/src/data-marts/controllers/spec/connector-definition.api.d.ts +12 -0
  55. package/dist/src/data-marts/controllers/spec/connector-definition.api.js +179 -0
  56. package/dist/src/data-marts/controllers/spec/data-mart.api.d.ts +1 -0
  57. package/dist/src/data-marts/controllers/spec/data-mart.api.js +5 -0
  58. package/dist/src/data-marts/controllers/spec/report-openapi.d.ts +18 -0
  59. package/dist/src/data-marts/controllers/spec/report-openapi.js +3 -0
  60. package/dist/src/data-marts/data-marts.module.js +20 -2
  61. package/dist/src/data-marts/data-storage-types/blending/metric-sleeve.planner.js +3 -12
  62. package/dist/src/data-marts/data-storage-types/data-mart-schema.utils.d.ts +1 -0
  63. package/dist/src/data-marts/data-storage-types/data-mart-schema.utils.js +16 -0
  64. package/dist/src/data-marts/dto/domain/blendable-schema.dto.d.ts +10 -0
  65. package/dist/src/data-marts/dto/domain/blendable-schema.dto.js +71 -1
  66. package/dist/src/data-marts/dto/domain/create-data-mart.command.d.ts +3 -1
  67. package/dist/src/data-marts/dto/domain/create-data-mart.command.js +3 -1
  68. package/dist/src/data-marts/dto/domain/create-report.command.d.ts +3 -1
  69. package/dist/src/data-marts/dto/domain/create-report.command.js +3 -1
  70. package/dist/src/data-marts/dto/domain/data-mart-list-item.dto.d.ts +3 -1
  71. package/dist/src/data-marts/dto/domain/data-mart-list-item.dto.js +3 -1
  72. package/dist/src/data-marts/dto/domain/data-mart.dto.d.ts +4 -1
  73. package/dist/src/data-marts/dto/domain/data-mart.dto.js +5 -1
  74. package/dist/src/data-marts/dto/domain/model-canvas.dto.d.ts +4 -0
  75. package/dist/src/data-marts/dto/domain/report-like-read-plan.d.ts +2 -0
  76. package/dist/src/data-marts/dto/domain/report.dto.d.ts +3 -1
  77. package/dist/src/data-marts/dto/domain/report.dto.js +3 -1
  78. package/dist/src/data-marts/dto/domain/update-data-mart-icon.command.d.ts +9 -0
  79. package/dist/src/data-marts/dto/domain/update-data-mart-icon.command.js +19 -0
  80. package/dist/src/data-marts/dto/domain/update-report.command.d.ts +3 -1
  81. package/dist/src/data-marts/dto/domain/update-report.command.js +3 -1
  82. package/dist/src/data-marts/dto/presentation/create-data-mart-request-api.dto.d.ts +2 -0
  83. package/dist/src/data-marts/dto/presentation/create-data-mart-request-api.dto.js +13 -0
  84. package/dist/src/data-marts/dto/presentation/create-report-request-api.dto.d.ts +2 -0
  85. package/dist/src/data-marts/dto/presentation/create-report-request-api.dto.js +10 -0
  86. package/dist/src/data-marts/dto/presentation/custom-connector-response.dto.d.ts +46 -0
  87. package/dist/src/data-marts/dto/presentation/custom-connector-response.dto.js +216 -0
  88. package/dist/src/data-marts/dto/presentation/custom-connector.dto.d.ts +27 -0
  89. package/dist/src/data-marts/dto/presentation/custom-connector.dto.js +159 -0
  90. package/dist/src/data-marts/dto/presentation/data-mart-list-item-response-api.dto.d.ts +2 -0
  91. package/dist/src/data-marts/dto/presentation/data-mart-list-item-response-api.dto.js +10 -0
  92. package/dist/src/data-marts/dto/presentation/data-mart-response-api.dto.d.ts +2 -0
  93. package/dist/src/data-marts/dto/presentation/data-mart-response-api.dto.js +10 -0
  94. package/dist/src/data-marts/dto/presentation/model-canvas-response-api.dto.d.ts +4 -0
  95. package/dist/src/data-marts/dto/presentation/model-canvas-response-api.dto.js +20 -0
  96. package/dist/src/data-marts/dto/presentation/preview-data-mart-request-api.dto.d.ts +7 -0
  97. package/dist/src/data-marts/dto/presentation/preview-data-mart-request-api.dto.js +56 -0
  98. package/dist/src/data-marts/dto/presentation/preview-data-mart-response-api.dto.d.ts +12 -0
  99. package/dist/src/data-marts/dto/presentation/preview-data-mart-response-api.dto.js +64 -0
  100. package/dist/src/data-marts/dto/presentation/report-response-api.dto.d.ts +2 -0
  101. package/dist/src/data-marts/dto/presentation/report-response-api.dto.js +6 -0
  102. package/dist/src/data-marts/dto/presentation/run-data-mart-request-api.dto.js +67 -0
  103. package/dist/src/data-marts/dto/presentation/update-data-mart-description-api.dto.js +3 -0
  104. package/dist/src/data-marts/dto/presentation/update-data-mart-icon-api.dto.d.ts +4 -0
  105. package/dist/src/data-marts/dto/presentation/update-data-mart-icon-api.dto.js +30 -0
  106. package/dist/src/data-marts/dto/presentation/update-report-request-api.dto.d.ts +2 -0
  107. package/dist/src/data-marts/dto/presentation/update-report-request-api.dto.js +10 -0
  108. package/dist/src/data-marts/dto/schemas/auto-aggregation-opt-out.schema.d.ts +15 -0
  109. package/dist/src/data-marts/dto/schemas/auto-aggregation-opt-out.schema.js +29 -0
  110. package/dist/src/data-marts/dto/schemas/data-mart-run/data-mart-run.schema.d.ts +9 -0
  111. package/dist/src/data-marts/dto/schemas/data-mart-table-definitions/connector-definition.schema.d.ts +15 -0
  112. package/dist/src/data-marts/dto/schemas/data-mart-table-definitions/connector-definition.schema.js +1 -0
  113. package/dist/src/data-marts/dto/schemas/data-mart-table-definitions/data-mart-definition.schema.d.ts +7 -0
  114. package/dist/src/data-marts/dto/schemas/data-quality/data-quality-run.schema.d.ts +20 -0
  115. package/dist/src/data-marts/entities/connector-definition-version.entity.d.ts +16 -0
  116. package/dist/src/data-marts/entities/connector-definition-version.entity.js +78 -0
  117. package/dist/src/data-marts/entities/connector-definition.entity.d.ts +14 -0
  118. package/dist/src/data-marts/entities/connector-definition.entity.js +82 -0
  119. package/dist/src/data-marts/entities/data-mart.entity.d.ts +2 -0
  120. package/dist/src/data-marts/entities/data-mart.entity.js +5 -0
  121. package/dist/src/data-marts/entities/report.entity.d.ts +2 -0
  122. package/dist/src/data-marts/entities/report.entity.js +11 -0
  123. package/dist/src/data-marts/enums/data-mart-icon.enum.d.ts +75 -0
  124. package/dist/src/data-marts/enums/data-mart-icon.enum.js +80 -0
  125. package/dist/src/data-marts/errors/connector-credential-boundary.error.d.ts +3 -0
  126. package/dist/src/data-marts/errors/connector-credential-boundary.error.js +14 -0
  127. package/dist/src/data-marts/facades/mcp-data-marts.facade.d.ts +2 -0
  128. package/dist/src/data-marts/facades/mcp-data-marts.facade.impl.d.ts +7 -1
  129. package/dist/src/data-marts/facades/mcp-data-marts.facade.impl.js +70 -5
  130. package/dist/src/data-marts/mappers/connector-definition.mapper.d.ts +14 -0
  131. package/dist/src/data-marts/mappers/connector-definition.mapper.js +57 -0
  132. package/dist/src/data-marts/mappers/data-mart.mapper.d.ts +9 -6
  133. package/dist/src/data-marts/mappers/data-mart.mapper.js +44 -19
  134. package/dist/src/data-marts/mappers/insight-template.mapper.d.ts +1 -1
  135. package/dist/src/data-marts/mappers/insight-template.mapper.js +2 -2
  136. package/dist/src/data-marts/mappers/insight.mapper.d.ts +1 -1
  137. package/dist/src/data-marts/mappers/insight.mapper.js +2 -2
  138. package/dist/src/data-marts/mappers/model-canvas.mapper.d.ts +10 -2
  139. package/dist/src/data-marts/mappers/model-canvas.mapper.js +9 -3
  140. package/dist/src/data-marts/mappers/report.mapper.js +4 -3
  141. package/dist/src/data-marts/services/auto-collapse.resolver.d.ts +1 -1
  142. package/dist/src/data-marts/services/auto-collapse.resolver.js +4 -0
  143. package/dist/src/data-marts/services/blendable-schema.service.d.ts +2 -0
  144. package/dist/src/data-marts/services/blendable-schema.service.js +59 -0
  145. package/dist/src/data-marts/services/connector/connector-credential-injector.service.d.ts +1 -1
  146. package/dist/src/data-marts/services/connector/connector-credential-injector.service.js +15 -1
  147. package/dist/src/data-marts/services/connector/connector-definition.service.d.ts +59 -0
  148. package/dist/src/data-marts/services/connector/connector-definition.service.js +491 -0
  149. package/dist/src/data-marts/services/connector/connector-executor.service.d.ts +9 -1
  150. package/dist/src/data-marts/services/connector/connector-executor.service.js +173 -63
  151. package/dist/src/data-marts/services/connector/connector-fields-preview.service.js +1 -1
  152. package/dist/src/data-marts/services/connector/connector-message.utils.js +2 -2
  153. package/dist/src/data-marts/services/connector/connector-preview-credentials.service.js +1 -1
  154. package/dist/src/data-marts/services/connector/connector-preview-support.d.ts +1 -1
  155. package/dist/src/data-marts/services/connector/connector-preview-support.js +14 -21
  156. package/dist/src/data-marts/services/connector/connector-process-spawner.service.d.ts +11 -2
  157. package/dist/src/data-marts/services/connector/connector-process-spawner.service.js +88 -60
  158. package/dist/src/data-marts/services/connector/connector-secret.service.d.ts +6 -3
  159. package/dist/src/data-marts/services/connector/connector-secret.service.js +77 -12
  160. package/dist/src/data-marts/services/connector/connector-source-config.service.js +1 -1
  161. package/dist/src/data-marts/services/connector/connector-source-credentials.service.d.ts +6 -2
  162. package/dist/src/data-marts/services/connector/connector-source-credentials.service.js +18 -16
  163. package/dist/src/data-marts/services/connector/connector-specification.mapper.d.ts +47 -0
  164. package/dist/src/data-marts/services/connector/connector-specification.mapper.js +46 -0
  165. package/dist/src/data-marts/services/connector/connector-test.service.d.ts +43 -0
  166. package/dist/src/data-marts/services/connector/connector-test.service.js +343 -0
  167. package/dist/src/data-marts/services/connector/connector.service.d.ts +8 -2
  168. package/dist/src/data-marts/services/connector/connector.service.js +65 -54
  169. package/dist/src/data-marts/services/connector/declarative-manifest-schemas.d.ts +4 -0
  170. package/dist/src/data-marts/services/connector/declarative-manifest-schemas.js +48 -0
  171. package/dist/src/data-marts/services/connector/run-log-flusher.d.ts +21 -0
  172. package/dist/src/data-marts/services/connector/run-log-flusher.js +67 -0
  173. package/dist/src/data-marts/services/data-mart.service.js +2 -0
  174. package/dist/src/data-marts/services/report-sql-composer.service.js +15 -1
  175. package/dist/src/data-marts/services/report.service.d.ts +1 -0
  176. package/dist/src/data-marts/services/report.service.js +13 -0
  177. package/dist/src/data-marts/services/scheduled-trigger.service.d.ts +1 -0
  178. package/dist/src/data-marts/services/scheduled-trigger.service.js +13 -0
  179. package/dist/src/data-marts/use-cases/create-data-mart.service.js +1 -0
  180. package/dist/src/data-marts/use-cases/create-report.service.js +2 -0
  181. package/dist/src/data-marts/use-cases/get-model-canvas-data-marts.service.d.ts +5 -1
  182. package/dist/src/data-marts/use-cases/get-model-canvas-data-marts.service.js +16 -3
  183. package/dist/src/data-marts/use-cases/list-project-scheduled-triggers.service.js +1 -1
  184. package/dist/src/data-marts/use-cases/preview-data-mart.service.d.ts +59 -0
  185. package/dist/src/data-marts/use-cases/preview-data-mart.service.js +293 -0
  186. package/dist/src/data-marts/use-cases/stream-http-data.service.js +1 -0
  187. package/dist/src/data-marts/use-cases/update-data-mart-definition.service.d.ts +1 -1
  188. package/dist/src/data-marts/use-cases/update-data-mart-definition.service.js +8 -6
  189. package/dist/src/data-marts/use-cases/update-data-mart-icon.service.d.ts +12 -0
  190. package/dist/src/data-marts/use-cases/update-data-mart-icon.service.js +46 -0
  191. package/dist/src/data-marts/use-cases/update-data-mart-schema.service.js +14 -1
  192. package/dist/src/data-marts/use-cases/update-report.service.js +9 -1
  193. package/dist/src/ee/ee.module.js +5 -8
  194. package/dist/src/ee/mcp/auth/mcp-auth-context.d.ts +0 -4
  195. package/dist/src/ee/mcp/auth/mcp-auth.middleware.d.ts +26 -0
  196. package/dist/src/ee/mcp/auth/mcp-auth.middleware.js +184 -0
  197. package/dist/src/ee/mcp/http-headers.util.d.ts +2 -0
  198. package/dist/src/ee/mcp/http-headers.util.js +8 -0
  199. package/dist/src/ee/mcp/observability/mcp-bus-wiring.js +4 -4
  200. package/dist/src/ee/mcp/observability/mcp-call-instrumentation.d.ts +2 -4
  201. package/dist/src/ee/mcp/observability/mcp-call-instrumentation.js +6 -6
  202. package/dist/src/ee/mcp/sdk/mcp-sdk-server.factory.d.ts +1 -1
  203. package/dist/src/ee/mcp/sdk/mcp-sdk-server.factory.js +5 -5
  204. package/dist/src/ee/mcp/tools/add-destination.tool.d.ts +20 -14
  205. package/dist/src/ee/mcp/tools/add-destination.tool.js +10 -10
  206. package/dist/src/ee/mcp/tools/add-report.tool.d.ts +88 -228
  207. package/dist/src/ee/mcp/tools/add-report.tool.js +28 -28
  208. package/dist/src/ee/mcp/tools/create-report-run-schedule.tool.d.ts +2 -12
  209. package/dist/src/ee/mcp/tools/create-report-run-schedule.tool.js +13 -13
  210. package/dist/src/ee/mcp/tools/data-mart-catalog.tool.d.ts +15 -81
  211. package/dist/src/ee/mcp/tools/data-mart-catalog.tool.js +11 -11
  212. package/dist/src/ee/mcp/tools/data-mart-details.tool.d.ts +19 -111
  213. package/dist/src/ee/mcp/tools/data-mart-details.tool.js +64 -48
  214. package/dist/src/ee/mcp/tools/delete-report-run-schedule.tool.d.ts +2 -6
  215. package/dist/src/ee/mcp/tools/delete-report-run-schedule.tool.js +7 -7
  216. package/dist/src/ee/mcp/tools/delete-report.tool.d.ts +2 -6
  217. package/dist/src/ee/mcp/tools/delete-report.tool.js +4 -4
  218. package/dist/src/ee/mcp/tools/get-data-mart-reports.tool.d.ts +30 -195
  219. package/dist/src/ee/mcp/tools/get-data-mart-reports.tool.js +22 -22
  220. package/dist/src/ee/mcp/tools/get-report-output-schema.tool.d.ts +3 -21
  221. package/dist/src/ee/mcp/tools/get-report-output-schema.tool.js +10 -10
  222. package/dist/src/ee/mcp/tools/get-report-run-status.tool.d.ts +15 -11
  223. package/dist/src/ee/mcp/tools/get-report-run-status.tool.js +14 -14
  224. package/dist/src/ee/mcp/tools/list-destinations.tool.d.ts +12 -20
  225. package/dist/src/ee/mcp/tools/list-destinations.tool.js +10 -10
  226. package/dist/src/ee/mcp/tools/list-report-run-schedules.tool.d.ts +5 -61
  227. package/dist/src/ee/mcp/tools/list-report-run-schedules.tool.js +14 -14
  228. package/dist/src/ee/mcp/tools/mcp-getting-started.util.d.ts +4 -52
  229. package/dist/src/ee/mcp/tools/mcp-getting-started.util.js +13 -13
  230. package/dist/src/ee/mcp/tools/mcp-tool.definition.d.ts +2 -2
  231. package/dist/src/ee/mcp/tools/project-context.tool.d.ts +3 -17
  232. package/dist/src/ee/mcp/tools/project-context.tool.js +10 -10
  233. package/dist/src/ee/mcp/tools/query-data-mart.input.d.ts +111 -152
  234. package/dist/src/ee/mcp/tools/query-data-mart.input.js +39 -39
  235. package/dist/src/ee/mcp/tools/query-data-mart.tool.d.ts +60 -130
  236. package/dist/src/ee/mcp/tools/query-data-mart.tool.js +35 -35
  237. package/dist/src/ee/mcp/tools/report-output-controls-output.d.ts +17 -60
  238. package/dist/src/ee/mcp/tools/report-output-controls-output.js +20 -20
  239. package/dist/src/ee/mcp/tools/report-run-outcome.d.ts +6 -42
  240. package/dist/src/ee/mcp/tools/report-run-outcome.js +20 -20
  241. package/dist/src/ee/mcp/tools/run-report.tool.d.ts +2 -6
  242. package/dist/src/ee/mcp/tools/run-report.tool.js +5 -5
  243. package/dist/src/ee/mcp/tools/search-data-marts.tool.d.ts +7 -79
  244. package/dist/src/ee/mcp/tools/search-data-marts.tool.js +11 -11
  245. package/dist/src/ee/mcp/tools/search-reports.tool.d.ts +15 -61
  246. package/dist/src/ee/mcp/tools/search-reports.tool.js +15 -15
  247. package/dist/src/ee/mcp/tools/summarize-data-catalog.tool.d.ts +7 -79
  248. package/dist/src/ee/mcp/tools/summarize-data-catalog.tool.js +15 -15
  249. package/dist/src/ee/mcp/tools/update-report-run-schedule.tool.d.ts +2 -12
  250. package/dist/src/ee/mcp/tools/update-report-run-schedule.tool.js +13 -13
  251. package/dist/src/ee/mcp/tools/update-report.tool.d.ts +105 -414
  252. package/dist/src/ee/mcp/tools/update-report.tool.js +20 -20
  253. package/dist/src/ee/mcp/transport/mcp-http-entry.service.d.ts +30 -0
  254. package/dist/src/ee/mcp/transport/mcp-http-entry.service.js +193 -0
  255. package/dist/src/idp/guards/idp.guard.js +2 -8
  256. package/dist/src/idp/oauth/controllers/oauth-authorization.controller.d.ts +4 -0
  257. package/dist/src/idp/oauth/controllers/oauth-authorization.controller.js +77 -1
  258. package/dist/src/idp/oauth/controllers/oauth-metadata.controller.d.ts +2 -1
  259. package/dist/src/idp/oauth/controllers/oauth-metadata.controller.js +5 -8
  260. package/dist/src/idp/oauth/controllers/oauth-token.controller.js +14 -1
  261. package/dist/src/idp/oauth/oauth-request.validator.d.ts +8 -0
  262. package/dist/src/idp/oauth/oauth-request.validator.js +27 -0
  263. package/dist/src/idp/utils/is-authentication-error.d.ts +1 -0
  264. package/dist/src/idp/utils/is-authentication-error.js +9 -0
  265. package/dist/src/idp/utils/role-hierarchy.d.ts +3 -0
  266. package/dist/src/idp/utils/role-hierarchy.js +14 -0
  267. package/dist/src/index.d.ts +1 -0
  268. package/dist/src/index.js +3 -1
  269. package/dist/src/migrations/1788048000000-create-connector-definition-tables.d.ts +6 -0
  270. package/dist/src/migrations/1788048000000-create-connector-definition-tables.js +116 -0
  271. package/dist/src/migrations/1790156789783-add-auto-aggregation-opt-out-to-report.d.ts +8 -0
  272. package/dist/src/migrations/1790156789783-add-auto-aggregation-opt-out-to-report.js +30 -0
  273. package/dist/src/migrations/1790247861000-add-icon-to-data-mart.d.ts +8 -0
  274. package/dist/src/migrations/1790247861000-add-icon-to-data-mart.js +31 -0
  275. package/package.json +10 -6
  276. package/dist/src/ee/mcp/auth/mcp-auth.exception-filter.d.ts +0 -14
  277. package/dist/src/ee/mcp/auth/mcp-auth.exception-filter.js +0 -84
  278. package/dist/src/ee/mcp/auth/mcp-auth.guard.d.ts +0 -14
  279. package/dist/src/ee/mcp/auth/mcp-auth.guard.js +0 -99
  280. package/dist/src/ee/mcp/controllers/mcp-transport.controller.d.ts +0 -17
  281. package/dist/src/ee/mcp/controllers/mcp-transport.controller.js +0 -134
  282. package/dist/src/ee/mcp/sdk/mcp-streamable-http-transport.handler.d.ts +0 -16
  283. package/dist/src/ee/mcp/sdk/mcp-streamable-http-transport.handler.js +0 -133
@@ -1,282 +1,64 @@
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
- export declare const updateReportInputSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
6
+ export declare const updateReportInputSchema: z.ZodObject<{
7
7
  report_id: z.ZodString;
8
- fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
8
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
9
  filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
10
10
  field: z.ZodString;
11
- operator: z.ZodEffects<z.ZodCatch<z.ZodEnum<["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", ...("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")[]]>>, "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>;
12
- value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
13
- }, "strip", z.ZodTypeAny, {
14
- 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";
15
- field: string;
16
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
17
- }, {
18
- field: string;
19
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
20
- operator?: unknown;
21
- }>, "many">>;
11
+ 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>>;
12
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
13
+ }, z.core.$strip>>>;
22
14
  slices: z.ZodOptional<z.ZodArray<z.ZodObject<{
23
15
  field: z.ZodString;
24
- operator: z.ZodEffects<z.ZodCatch<z.ZodEnum<["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", ...("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")[]]>>, "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>;
25
- value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
26
- }, "strip", z.ZodTypeAny, {
27
- 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";
28
- field: string;
29
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
30
- }, {
31
- field: string;
32
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
33
- operator?: unknown;
34
- }>, "many">>;
16
+ 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>>;
17
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
18
+ }, z.core.$strip>>>;
35
19
  aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
36
20
  field: z.ZodString;
37
- function: z.ZodEnum<["STRING_AGG", "MAX", "MIN", "SUM", "AVG", "COUNT", "COUNT_DISTINCT", "ANY_VALUE", "P25", "P50", "P75", "P95"]>;
38
- }, "strip", z.ZodTypeAny, {
39
- function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
40
- field: string;
41
- }, {
42
- function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
43
- field: string;
44
- }>, "many">>;
21
+ function: z.ZodEnum<{
22
+ STRING_AGG: "STRING_AGG";
23
+ MAX: "MAX";
24
+ MIN: "MIN";
25
+ SUM: "SUM";
26
+ AVG: "AVG";
27
+ COUNT: "COUNT";
28
+ COUNT_DISTINCT: "COUNT_DISTINCT";
29
+ ANY_VALUE: "ANY_VALUE";
30
+ P25: "P25";
31
+ P50: "P50";
32
+ P75: "P75";
33
+ P95: "P95";
34
+ }>;
35
+ }, z.core.$strip>>>;
45
36
  date_buckets: z.ZodOptional<z.ZodArray<z.ZodObject<{
46
37
  field: z.ZodString;
47
- unit: z.ZodEnum<["DAY", "WEEK", "MONTH", "QUARTER", "YEAR"]>;
38
+ unit: z.ZodEnum<{
39
+ DAY: "DAY";
40
+ WEEK: "WEEK";
41
+ MONTH: "MONTH";
42
+ QUARTER: "QUARTER";
43
+ YEAR: "YEAR";
44
+ }>;
48
45
  time_zone: z.ZodOptional<z.ZodString>;
49
- }, "strip", z.ZodTypeAny, {
50
- unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
51
- field: string;
52
- time_zone?: string | undefined;
53
- }, {
54
- unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
55
- field: string;
56
- time_zone?: string | undefined;
57
- }>, "many">>;
46
+ }, z.core.$strip>>>;
58
47
  sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
59
48
  field: z.ZodString;
60
- direction: z.ZodEnum<["asc", "desc"]>;
61
- }, "strip", z.ZodTypeAny, {
62
- direction: "asc" | "desc";
63
- field: string;
64
- }, {
65
- direction: "asc" | "desc";
66
- field: string;
67
- }>, "many">>;
49
+ direction: z.ZodEnum<{
50
+ asc: "asc";
51
+ desc: "desc";
52
+ }>;
53
+ }, z.core.$strip>>>;
68
54
  limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
69
55
  name: z.ZodOptional<z.ZodString>;
70
56
  message: z.ZodOptional<z.ZodObject<{
71
57
  subject: z.ZodOptional<z.ZodString>;
72
58
  body: z.ZodOptional<z.ZodString>;
73
- }, "strict", z.ZodTypeAny, {
74
- subject?: string | undefined;
75
- body?: string | undefined;
76
- }, {
77
- subject?: string | undefined;
78
- body?: string | undefined;
79
- }>>;
59
+ }, z.core.$strict>>;
80
60
  run_immediately: z.ZodOptional<z.ZodBoolean>;
81
- }, "strict", z.ZodTypeAny, {
82
- report_id: string;
83
- message?: {
84
- subject?: string | undefined;
85
- body?: string | undefined;
86
- } | undefined;
87
- sort?: {
88
- direction: "asc" | "desc";
89
- field: string;
90
- }[] | undefined;
91
- name?: string | undefined;
92
- fields?: string[] | undefined;
93
- limit?: number | null | undefined;
94
- filters?: {
95
- 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";
96
- field: string;
97
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
98
- }[] | undefined;
99
- aggregations?: {
100
- function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
101
- field: string;
102
- }[] | undefined;
103
- slices?: {
104
- 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";
105
- field: string;
106
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
107
- }[] | undefined;
108
- date_buckets?: {
109
- unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
110
- field: string;
111
- time_zone?: string | undefined;
112
- }[] | undefined;
113
- run_immediately?: boolean | undefined;
114
- }, {
115
- report_id: string;
116
- message?: {
117
- subject?: string | undefined;
118
- body?: string | undefined;
119
- } | undefined;
120
- sort?: {
121
- direction: "asc" | "desc";
122
- field: string;
123
- }[] | undefined;
124
- name?: string | undefined;
125
- fields?: string[] | undefined;
126
- limit?: number | null | undefined;
127
- filters?: {
128
- field: string;
129
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
130
- operator?: unknown;
131
- }[] | undefined;
132
- aggregations?: {
133
- function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
134
- field: string;
135
- }[] | undefined;
136
- slices?: {
137
- field: string;
138
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
139
- operator?: unknown;
140
- }[] | undefined;
141
- date_buckets?: {
142
- unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
143
- field: string;
144
- time_zone?: string | undefined;
145
- }[] | undefined;
146
- run_immediately?: boolean | undefined;
147
- }>, {
148
- report_id: string;
149
- message?: {
150
- subject?: string | undefined;
151
- body?: string | undefined;
152
- } | undefined;
153
- sort?: {
154
- direction: "asc" | "desc";
155
- field: string;
156
- }[] | undefined;
157
- name?: string | undefined;
158
- fields?: string[] | undefined;
159
- limit?: number | null | undefined;
160
- filters?: {
161
- 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";
162
- field: string;
163
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
164
- }[] | undefined;
165
- aggregations?: {
166
- function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
167
- field: string;
168
- }[] | undefined;
169
- slices?: {
170
- 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";
171
- field: string;
172
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
173
- }[] | undefined;
174
- date_buckets?: {
175
- unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
176
- field: string;
177
- time_zone?: string | undefined;
178
- }[] | undefined;
179
- run_immediately?: boolean | undefined;
180
- }, {
181
- report_id: string;
182
- message?: {
183
- subject?: string | undefined;
184
- body?: string | undefined;
185
- } | undefined;
186
- sort?: {
187
- direction: "asc" | "desc";
188
- field: string;
189
- }[] | undefined;
190
- name?: string | undefined;
191
- fields?: string[] | undefined;
192
- limit?: number | null | undefined;
193
- filters?: {
194
- field: string;
195
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
196
- operator?: unknown;
197
- }[] | undefined;
198
- aggregations?: {
199
- function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
200
- field: string;
201
- }[] | undefined;
202
- slices?: {
203
- field: string;
204
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
205
- operator?: unknown;
206
- }[] | undefined;
207
- date_buckets?: {
208
- unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
209
- field: string;
210
- time_zone?: string | undefined;
211
- }[] | undefined;
212
- run_immediately?: boolean | undefined;
213
- }>, {
214
- report_id: string;
215
- message?: {
216
- subject?: string | undefined;
217
- body?: string | undefined;
218
- } | undefined;
219
- sort?: {
220
- direction: "asc" | "desc";
221
- field: string;
222
- }[] | undefined;
223
- name?: string | undefined;
224
- fields?: string[] | undefined;
225
- limit?: number | null | undefined;
226
- filters?: {
227
- 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";
228
- field: string;
229
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
230
- }[] | undefined;
231
- aggregations?: {
232
- function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
233
- field: string;
234
- }[] | undefined;
235
- slices?: {
236
- 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";
237
- field: string;
238
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
239
- }[] | undefined;
240
- date_buckets?: {
241
- unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
242
- field: string;
243
- time_zone?: string | undefined;
244
- }[] | undefined;
245
- run_immediately?: boolean | undefined;
246
- }, {
247
- report_id: string;
248
- message?: {
249
- subject?: string | undefined;
250
- body?: string | undefined;
251
- } | undefined;
252
- sort?: {
253
- direction: "asc" | "desc";
254
- field: string;
255
- }[] | undefined;
256
- name?: string | undefined;
257
- fields?: string[] | undefined;
258
- limit?: number | null | undefined;
259
- filters?: {
260
- field: string;
261
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
262
- operator?: unknown;
263
- }[] | undefined;
264
- aggregations?: {
265
- function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
266
- field: string;
267
- }[] | undefined;
268
- slices?: {
269
- field: string;
270
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
271
- operator?: unknown;
272
- }[] | undefined;
273
- date_buckets?: {
274
- unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
275
- field: string;
276
- time_zone?: string | undefined;
277
- }[] | undefined;
278
- run_immediately?: boolean | undefined;
279
- }>;
61
+ }, z.core.$strict>;
280
62
  type UpdateReportInput = z.infer<typeof updateReportInputSchema>;
281
63
  export declare class UpdateReportTool implements McpToolDefinition<UpdateReportInput> {
282
64
  private readonly reports;
@@ -284,223 +66,132 @@ export declare class UpdateReportTool implements McpToolDefinition<UpdateReportI
284
66
  readonly description = "Update an existing report: rename it, replace which data mart fields it exports, replace its output controls \u2014 filters/slices, aggregations, date_buckets, sort, limit \u2014 using the same vocabulary as query_data_mart ([] removes a control, null removes the limit), and/or \u2014 for reports with an email, slack, teams, or google_chat destination \u2014 change the message subject or body. Use it whenever the user asks to change a report that already exists \u2014 including one you created earlier in this conversation (\"add a filter\", \"sort by revenue\", \"rename it\") \u2014 instead of creating another report with add_report. Provide at least one change; anything not provided stays unchanged. Returns the report as it is after the update, and by default re-runs a Google Sheets report when the export changed (run.status=\"queued\" \u2014 poll get_report_run_status), so the sheet shows the new definition; email, Slack, Teams, and Google Chat reports are re-sent only with run_immediately=true.";
285
67
  readonly zodSchema: {
286
68
  report_id: z.ZodString;
287
- fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
69
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
288
70
  filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
289
71
  field: z.ZodString;
290
- operator: z.ZodEffects<z.ZodCatch<z.ZodEnum<["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", ...("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")[]]>>, "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>;
291
- value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
292
- }, "strip", z.ZodTypeAny, {
293
- 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";
294
- field: string;
295
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
296
- }, {
297
- field: string;
298
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
299
- operator?: unknown;
300
- }>, "many">>;
72
+ 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>>;
73
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
74
+ }, z.core.$strip>>>;
301
75
  slices: z.ZodOptional<z.ZodArray<z.ZodObject<{
302
76
  field: z.ZodString;
303
- operator: z.ZodEffects<z.ZodCatch<z.ZodEnum<["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", ...("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")[]]>>, "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>;
304
- value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
305
- }, "strip", z.ZodTypeAny, {
306
- 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";
307
- field: string;
308
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
309
- }, {
310
- field: string;
311
- value?: string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
312
- operator?: unknown;
313
- }>, "many">>;
77
+ 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>>;
78
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
79
+ }, z.core.$strip>>>;
314
80
  aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
315
81
  field: z.ZodString;
316
- function: z.ZodEnum<["STRING_AGG", "MAX", "MIN", "SUM", "AVG", "COUNT", "COUNT_DISTINCT", "ANY_VALUE", "P25", "P50", "P75", "P95"]>;
317
- }, "strip", z.ZodTypeAny, {
318
- function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
319
- field: string;
320
- }, {
321
- function: "STRING_AGG" | "MAX" | "MIN" | "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "ANY_VALUE" | "P25" | "P50" | "P75" | "P95";
322
- field: string;
323
- }>, "many">>;
82
+ function: z.ZodEnum<{
83
+ STRING_AGG: "STRING_AGG";
84
+ MAX: "MAX";
85
+ MIN: "MIN";
86
+ SUM: "SUM";
87
+ AVG: "AVG";
88
+ COUNT: "COUNT";
89
+ COUNT_DISTINCT: "COUNT_DISTINCT";
90
+ ANY_VALUE: "ANY_VALUE";
91
+ P25: "P25";
92
+ P50: "P50";
93
+ P75: "P75";
94
+ P95: "P95";
95
+ }>;
96
+ }, z.core.$strip>>>;
324
97
  date_buckets: z.ZodOptional<z.ZodArray<z.ZodObject<{
325
98
  field: z.ZodString;
326
- unit: z.ZodEnum<["DAY", "WEEK", "MONTH", "QUARTER", "YEAR"]>;
99
+ unit: z.ZodEnum<{
100
+ DAY: "DAY";
101
+ WEEK: "WEEK";
102
+ MONTH: "MONTH";
103
+ QUARTER: "QUARTER";
104
+ YEAR: "YEAR";
105
+ }>;
327
106
  time_zone: z.ZodOptional<z.ZodString>;
328
- }, "strip", z.ZodTypeAny, {
329
- unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
330
- field: string;
331
- time_zone?: string | undefined;
332
- }, {
333
- unit: "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
334
- field: string;
335
- time_zone?: string | undefined;
336
- }>, "many">>;
107
+ }, z.core.$strip>>>;
337
108
  sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
338
109
  field: z.ZodString;
339
- direction: z.ZodEnum<["asc", "desc"]>;
340
- }, "strip", z.ZodTypeAny, {
341
- direction: "asc" | "desc";
342
- field: string;
343
- }, {
344
- direction: "asc" | "desc";
345
- field: string;
346
- }>, "many">>;
110
+ direction: z.ZodEnum<{
111
+ asc: "asc";
112
+ desc: "desc";
113
+ }>;
114
+ }, z.core.$strip>>>;
347
115
  limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
348
116
  name: z.ZodOptional<z.ZodString>;
349
117
  message: z.ZodOptional<z.ZodObject<{
350
118
  subject: z.ZodOptional<z.ZodString>;
351
119
  body: z.ZodOptional<z.ZodString>;
352
- }, "strict", z.ZodTypeAny, {
353
- subject?: string | undefined;
354
- body?: string | undefined;
355
- }, {
356
- subject?: string | undefined;
357
- body?: string | undefined;
358
- }>>;
120
+ }, z.core.$strict>>;
359
121
  run_immediately: z.ZodOptional<z.ZodBoolean>;
360
122
  };
361
123
  readonly outputSchema: {
362
- run: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
124
+ run: z.ZodDiscriminatedUnion<[z.ZodObject<{
363
125
  status: z.ZodLiteral<"queued">;
364
126
  run_id: z.ZodString;
365
127
  should_poll: z.ZodLiteral<true>;
366
128
  message: z.ZodString;
367
- }, "strip", z.ZodTypeAny, {
368
- status: "queued";
369
- message: string;
370
- run_id: string;
371
- should_poll: true;
372
- }, {
373
- status: "queued";
374
- message: string;
375
- run_id: string;
376
- should_poll: true;
377
- }>, z.ZodObject<{
129
+ }, z.core.$strip>, z.ZodObject<{
378
130
  status: z.ZodLiteral<"not_requested">;
379
131
  should_poll: z.ZodLiteral<false>;
380
132
  message: z.ZodString;
381
- }, "strip", z.ZodTypeAny, {
382
- status: "not_requested";
383
- message: string;
384
- should_poll: false;
385
- }, {
386
- status: "not_requested";
387
- message: string;
388
- should_poll: false;
389
- }>, z.ZodObject<{
133
+ }, z.core.$strip>, z.ZodObject<{
390
134
  status: z.ZodLiteral<"not_applicable">;
391
135
  should_poll: z.ZodLiteral<false>;
392
136
  message: z.ZodString;
393
- }, "strip", z.ZodTypeAny, {
394
- status: "not_applicable";
395
- message: string;
396
- should_poll: false;
397
- }, {
398
- status: "not_applicable";
399
- message: string;
400
- should_poll: false;
401
- }>, z.ZodObject<{
137
+ }, z.core.$strip>, z.ZodObject<{
402
138
  status: z.ZodLiteral<"failed_to_queue">;
403
139
  should_poll: z.ZodLiteral<false>;
404
140
  error: z.ZodString;
405
141
  message: z.ZodString;
406
- }, "strip", z.ZodTypeAny, {
407
- status: "failed_to_queue";
408
- message: string;
409
- error: string;
410
- should_poll: false;
411
- }, {
412
- status: "failed_to_queue";
413
- message: string;
414
- error: string;
415
- should_poll: false;
416
- }>]>;
142
+ }, z.core.$strip>], "status">;
417
143
  spreadsheet_id: z.ZodOptional<z.ZodString>;
418
144
  sheet_url: z.ZodOptional<z.ZodString>;
419
- fields: z.ZodArray<z.ZodString, "many">;
420
- unique_count_sources: z.ZodArray<z.ZodString, "many">;
145
+ fields: z.ZodArray<z.ZodString>;
146
+ unique_count_sources: z.ZodArray<z.ZodString>;
421
147
  filters: z.ZodArray<z.ZodObject<{
422
148
  field: z.ZodString;
423
149
  operator: z.ZodString;
424
150
  value: z.ZodOptional<z.ZodUnknown>;
425
- }, "strip", z.ZodTypeAny, {
426
- operator: string;
427
- field: string;
428
- value?: unknown;
429
- }, {
430
- operator: string;
431
- field: string;
432
- value?: unknown;
433
- }>, "many">;
151
+ }, z.core.$strip>>;
434
152
  slices: z.ZodArray<z.ZodObject<{
435
153
  field: z.ZodString;
436
154
  operator: z.ZodString;
437
155
  value: z.ZodOptional<z.ZodUnknown>;
438
- }, "strip", z.ZodTypeAny, {
439
- operator: string;
440
- field: string;
441
- value?: unknown;
442
- }, {
443
- operator: string;
444
- field: string;
445
- value?: unknown;
446
- }>, "many">;
156
+ }, z.core.$strip>>;
447
157
  ui_only_filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
448
158
  field: z.ZodString;
449
159
  operator: z.ZodString;
450
160
  value: z.ZodOptional<z.ZodUnknown>;
451
- } & {
452
- placement: z.ZodEnum<["pre-join", "post-join"]>;
161
+ placement: z.ZodEnum<{
162
+ "pre-join": "pre-join";
163
+ "post-join": "post-join";
164
+ }>;
453
165
  function: z.ZodOptional<z.ZodString>;
454
- }, "strip", z.ZodTypeAny, {
455
- operator: string;
456
- placement: "pre-join" | "post-join";
457
- field: string;
458
- function?: string | undefined;
459
- value?: unknown;
460
- }, {
461
- operator: string;
462
- placement: "pre-join" | "post-join";
463
- field: string;
464
- function?: string | undefined;
465
- value?: unknown;
466
- }>, "many">>;
166
+ }, z.core.$strip>>>;
467
167
  aggregations: z.ZodArray<z.ZodObject<{
468
168
  field: z.ZodString;
469
169
  function: z.ZodString;
470
- }, "strip", z.ZodTypeAny, {
471
- function: string;
472
- field: string;
473
- }, {
474
- function: string;
475
- field: string;
476
- }>, "many">;
170
+ }, z.core.$strip>>;
477
171
  date_buckets: z.ZodArray<z.ZodObject<{
478
172
  field: z.ZodString;
479
173
  unit: z.ZodString;
480
174
  time_zone: z.ZodOptional<z.ZodString>;
481
- }, "strip", z.ZodTypeAny, {
482
- unit: string;
483
- field: string;
484
- time_zone?: string | undefined;
485
- }, {
486
- unit: string;
487
- field: string;
488
- time_zone?: string | undefined;
489
- }>, "many">;
175
+ }, z.core.$strip>>;
490
176
  sort: z.ZodArray<z.ZodObject<{
491
177
  field: z.ZodString;
492
- direction: z.ZodEnum<["asc", "desc"]>;
493
- }, "strip", z.ZodTypeAny, {
494
- direction: "asc" | "desc";
495
- field: string;
496
- }, {
497
- direction: "asc" | "desc";
498
- field: string;
499
- }>, "many">;
178
+ direction: z.ZodEnum<{
179
+ asc: "asc";
180
+ desc: "desc";
181
+ }>;
182
+ }, z.core.$strip>>;
500
183
  limit: z.ZodNullable<z.ZodNumber>;
501
184
  report_id: z.ZodString;
502
185
  status: z.ZodLiteral<"updated">;
503
- destination_type: z.ZodEnum<["google_sheets", "looker_studio", "excel", "email", "slack", "teams", "google_chat"]>;
186
+ destination_type: z.ZodEnum<{
187
+ email: "email";
188
+ looker_studio: "looker_studio";
189
+ excel: "excel";
190
+ google_sheets: "google_sheets";
191
+ slack: "slack";
192
+ teams: "teams";
193
+ google_chat: "google_chat";
194
+ }>;
504
195
  name: z.ZodString;
505
196
  };
506
197
  readonly annotations: {