plugin-elastic-report 0.0.0-stage → 0.7.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 (272) hide show
  1. package/ai/skills/elastic-report/SKILLS.md +34 -0
  2. package/client-v2.d.ts +2 -0
  3. package/client-v2.js +1 -0
  4. package/client.d.ts +2 -0
  5. package/client.js +1 -0
  6. package/dist/client/357.0dd385384cab5dbf.js +10 -0
  7. package/dist/client/index.js +10 -0
  8. package/dist/client-v2/851.142c93fc6d666b28.js +10 -0
  9. package/dist/client-v2/857.a5bf9637d5fd4ef5.js +10 -0
  10. package/dist/client-v2/877.f4095a3dbcadf98f.js +10 -0
  11. package/dist/client-v2/index.js +10 -0
  12. package/dist/externalVersion.js +21 -0
  13. package/dist/index.js +48 -0
  14. package/dist/locale/en-US.json +198 -0
  15. package/dist/locale/vi-VN.json +198 -0
  16. package/dist/locale/zh-CN.json +198 -0
  17. package/dist/node_modules/@elastic/elasticsearch/.dockerignore +11 -0
  18. package/dist/node_modules/@elastic/elasticsearch/LICENSE +202 -0
  19. package/dist/node_modules/@elastic/elasticsearch/NOTICE.txt +2 -0
  20. package/dist/node_modules/@elastic/elasticsearch/catalog-info.yaml +50 -0
  21. package/dist/node_modules/@elastic/elasticsearch/codecov.yml +14 -0
  22. package/dist/node_modules/@elastic/elasticsearch/index.d.ts +28 -0
  23. package/dist/node_modules/@elastic/elasticsearch/index.js +85525 -0
  24. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/async_search.d.ts +39 -0
  25. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/async_search.js +155 -0
  26. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/autoscaling.d.ts +39 -0
  27. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/autoscaling.js +130 -0
  28. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/bulk.d.ts +14 -0
  29. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/bulk.js +60 -0
  30. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/capabilities.d.ts +14 -0
  31. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/capabilities.js +43 -0
  32. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cat.d.ts +193 -0
  33. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cat.js +766 -0
  34. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ccr.d.ts +102 -0
  35. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ccr.js +395 -0
  36. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/clear_scroll.d.ts +14 -0
  37. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/clear_scroll.js +60 -0
  38. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/close_point_in_time.d.ts +14 -0
  39. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/close_point_in_time.js +56 -0
  40. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cluster.d.ts +123 -0
  41. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cluster.js +482 -0
  42. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/connector.d.ts +245 -0
  43. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/connector.js +1121 -0
  44. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/count.d.ts +14 -0
  45. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/count.js +68 -0
  46. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/create.d.ts +14 -0
  47. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/create.js +53 -0
  48. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/dangling_indices.d.ts +32 -0
  49. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/dangling_indices.js +100 -0
  50. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete.d.ts +14 -0
  51. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete.js +46 -0
  52. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query.d.ts +14 -0
  53. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query.js +59 -0
  54. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query_rethrottle.d.ts +14 -0
  55. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query_rethrottle.js +45 -0
  56. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_script.d.ts +14 -0
  57. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_script.js +45 -0
  58. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/enrich.d.ts +46 -0
  59. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/enrich.js +169 -0
  60. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/eql.d.ts +39 -0
  61. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/eql.js +139 -0
  62. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/esql.d.ts +46 -0
  63. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/esql.js +170 -0
  64. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists.d.ts +14 -0
  65. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists.js +46 -0
  66. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists_source.d.ts +14 -0
  67. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists_source.js +46 -0
  68. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/explain.d.ts +14 -0
  69. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/explain.js +60 -0
  70. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/features.d.ts +25 -0
  71. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/features.js +75 -0
  72. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/field_caps.d.ts +14 -0
  73. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/field_caps.js +68 -0
  74. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/fleet.d.ts +50 -0
  75. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/fleet.js +211 -0
  76. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get.d.ts +14 -0
  77. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get.js +46 -0
  78. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script.d.ts +14 -0
  79. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script.js +45 -0
  80. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_context.d.ts +14 -0
  81. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_context.js +43 -0
  82. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_languages.d.ts +14 -0
  83. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_languages.js +43 -0
  84. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_source.d.ts +14 -0
  85. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_source.js +46 -0
  86. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/graph.d.ts +18 -0
  87. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/graph.js +70 -0
  88. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/health_report.d.ts +14 -0
  89. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/health_report.js +54 -0
  90. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ilm.d.ts +88 -0
  91. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ilm.js +329 -0
  92. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/index.d.ts +14 -0
  93. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/index.js +61 -0
  94. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/indices.d.ts +494 -0
  95. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/indices.js +2133 -0
  96. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/inference.d.ts +221 -0
  97. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/inference.js +1167 -0
  98. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/info.d.ts +14 -0
  99. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/info.js +43 -0
  100. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ingest.d.ts +95 -0
  101. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ingest.js +389 -0
  102. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/knn_search.d.ts +14 -0
  103. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/knn_search.js +59 -0
  104. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/license.d.ts +60 -0
  105. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/license.js +194 -0
  106. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/logstash.d.ts +32 -0
  107. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/logstash.js +118 -0
  108. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mget.d.ts +14 -0
  109. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mget.js +68 -0
  110. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/migration.d.ts +32 -0
  111. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/migration.js +107 -0
  112. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ml.d.ts +522 -0
  113. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ml.js +2468 -0
  114. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/monitoring.d.ts +18 -0
  115. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/monitoring.js +60 -0
  116. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch.d.ts +14 -0
  117. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch.js +60 -0
  118. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch_template.d.ts +14 -0
  119. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch_template.js +60 -0
  120. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mtermvectors.d.ts +14 -0
  121. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mtermvectors.js +68 -0
  122. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/nodes.d.ts +60 -0
  123. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/nodes.js +290 -0
  124. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/open_point_in_time.d.ts +14 -0
  125. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/open_point_in_time.js +59 -0
  126. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ping.d.ts +14 -0
  127. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ping.js +43 -0
  128. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/profiling.d.ts +39 -0
  129. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/profiling.js +135 -0
  130. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/put_script.d.ts +14 -0
  131. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/put_script.js +68 -0
  132. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/query_rules.d.ts +67 -0
  133. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/query_rules.js +260 -0
  134. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rank_eval.d.ts +14 -0
  135. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rank_eval.js +67 -0
  136. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex.d.ts +14 -0
  137. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex.js +56 -0
  138. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex_rethrottle.d.ts +14 -0
  139. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex_rethrottle.js +45 -0
  140. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/render_search_template.d.ts +14 -0
  141. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/render_search_template.js +68 -0
  142. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rollup.d.ts +67 -0
  143. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rollup.js +263 -0
  144. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scripts_painless_execute.d.ts +14 -0
  145. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scripts_painless_execute.js +57 -0
  146. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scroll.d.ts +14 -0
  147. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scroll.js +59 -0
  148. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search.d.ts +14 -0
  149. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search.js +75 -0
  150. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_application.d.ts +81 -0
  151. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_application.js +313 -0
  152. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_mvt.d.ts +14 -0
  153. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_mvt.js +63 -0
  154. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_shards.d.ts +14 -0
  155. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_shards.js +54 -0
  156. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_template.d.ts +14 -0
  157. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_template.js +68 -0
  158. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/searchable_snapshots.d.ts +39 -0
  159. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/searchable_snapshots.js +167 -0
  160. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/security.d.ts +459 -0
  161. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/security.js +1982 -0
  162. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/shutdown.d.ts +32 -0
  163. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/shutdown.js +125 -0
  164. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/simulate.d.ts +18 -0
  165. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/simulate.js +78 -0
  166. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/slm.d.ts +74 -0
  167. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/slm.js +253 -0
  168. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/snapshot.d.ts +102 -0
  169. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/snapshot.js +410 -0
  170. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/sql.d.ts +53 -0
  171. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/sql.js +205 -0
  172. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ssl.d.ts +18 -0
  173. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ssl.js +54 -0
  174. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/streams.d.ts +32 -0
  175. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/streams.js +96 -0
  176. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/synonyms.d.ts +60 -0
  177. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/synonyms.js +223 -0
  178. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/tasks.d.ts +32 -0
  179. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/tasks.js +109 -0
  180. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/terms_enum.d.ts +14 -0
  181. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/terms_enum.js +59 -0
  182. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/termvectors.d.ts +14 -0
  183. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/termvectors.js +68 -0
  184. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/text_structure.d.ts +39 -0
  185. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/text_structure.js +148 -0
  186. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/transform.d.ts +101 -0
  187. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/transform.js +386 -0
  188. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update.d.ts +14 -0
  189. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update.js +60 -0
  190. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query.d.ts +14 -0
  191. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query.js +59 -0
  192. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query_rethrottle.d.ts +14 -0
  193. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query_rethrottle.js +45 -0
  194. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/watcher.d.ts +102 -0
  195. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/watcher.js +405 -0
  196. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/xpack.d.ts +25 -0
  197. package/dist/node_modules/@elastic/elasticsearch/lib/api/api/xpack.js +75 -0
  198. package/dist/node_modules/@elastic/elasticsearch/lib/api/index.d.ts +265 -0
  199. package/dist/node_modules/@elastic/elasticsearch/lib/api/index.js +632 -0
  200. package/dist/node_modules/@elastic/elasticsearch/lib/api/types.d.ts +19933 -0
  201. package/dist/node_modules/@elastic/elasticsearch/lib/api/types.js +21 -0
  202. package/dist/node_modules/@elastic/elasticsearch/lib/api/typesWithBodyKey.d.ts +20606 -0
  203. package/dist/node_modules/@elastic/elasticsearch/lib/api/typesWithBodyKey.js +21 -0
  204. package/dist/node_modules/@elastic/elasticsearch/lib/client.d.ts +152 -0
  205. package/dist/node_modules/@elastic/elasticsearch/lib/client.js +369 -0
  206. package/dist/node_modules/@elastic/elasticsearch/lib/helpers.d.ts +184 -0
  207. package/dist/node_modules/@elastic/elasticsearch/lib/helpers.js +889 -0
  208. package/dist/node_modules/@elastic/elasticsearch/lib/sniffingTransport.d.ts +4 -0
  209. package/dist/node_modules/@elastic/elasticsearch/lib/sniffingTransport.js +56 -0
  210. package/dist/node_modules/@elastic/elasticsearch/node_modules/.bin/arrow2csv +15 -0
  211. package/dist/node_modules/@elastic/elasticsearch/node_modules/.bin/arrow2csv.cmd +7 -0
  212. package/dist/node_modules/@elastic/elasticsearch/package.json +1 -0
  213. package/dist/node_modules/@elastic/elasticsearch/tsconfig.json +38 -0
  214. package/dist/server/acl-guard.js +179 -0
  215. package/dist/server/collections/es-report-data-views.js +85 -0
  216. package/dist/server/collections/es-reports.js +101 -0
  217. package/dist/server/index.js +58 -0
  218. package/dist/server/mcp/ElasticReportMcpServer.js +344 -0
  219. package/dist/server/mcp/ElasticReportToolCatalog.js +639 -0
  220. package/dist/server/plugin.js +529 -0
  221. package/dist/server/services/ElasticReportService.js +377 -0
  222. package/dist/server/services/ElasticsearchConnectionService.js +572 -0
  223. package/dist/server/services/ReportExportService.js +243 -0
  224. package/dist/server/services/ReportQueryCompiler.js +1299 -0
  225. package/dist/server/workflow/ElasticReportQueryInstruction.js +123 -0
  226. package/dist/shared/constants.js +96 -0
  227. package/dist/shared/types.js +24 -0
  228. package/package.json +62 -4
  229. package/server.d.ts +2 -0
  230. package/server.js +1 -0
  231. package/src/client/index.tsx +34 -0
  232. package/src/client/workflow-instructions.tsx +44 -0
  233. package/src/client-v2/__tests__/elastic-report.test.tsx +791 -0
  234. package/src/client-v2/__tests__/kql-autocomplete.test.ts +178 -0
  235. package/src/client-v2/api.ts +320 -0
  236. package/src/client-v2/bus/DashboardFilterBus.ts +212 -0
  237. package/src/client-v2/components/ElasticBasicCharts.tsx +652 -0
  238. package/src/client-v2/components/ElasticFilterBar.tsx +372 -0
  239. package/src/client-v2/components/ElasticKqlInput.tsx +421 -0
  240. package/src/client-v2/components/ElasticReportBlock.tsx +306 -0
  241. package/src/client-v2/components/ElasticReportRenderer.tsx +1257 -0
  242. package/src/client-v2/components/HighlightText.tsx +50 -0
  243. package/src/client-v2/components/ReportSelect.tsx +85 -0
  244. package/src/client-v2/index.tsx +14 -0
  245. package/src/client-v2/locale.ts +23 -0
  246. package/src/client-v2/models/ElasticFilterBarBlockModel.tsx +115 -0
  247. package/src/client-v2/models/ElasticReportBlockModel.tsx +118 -0
  248. package/src/client-v2/pages/ElasticReportManager.tsx +1453 -0
  249. package/src/client-v2/plugin.tsx +72 -0
  250. package/src/client-v2/utils/kqlAutocomplete.ts +861 -0
  251. package/src/client-v2/workflow/instructions.tsx +149 -0
  252. package/src/index.ts +11 -0
  253. package/src/locale/en-US.json +198 -0
  254. package/src/locale/vi-VN.json +198 -0
  255. package/src/locale/zh-CN.json +198 -0
  256. package/src/server/__tests__/query-compiler.test.ts +620 -0
  257. package/src/server/__tests__/report-mcp-acl.integration.test.ts +645 -0
  258. package/src/server/acl-guard.ts +194 -0
  259. package/src/server/collections/es-report-data-views.ts +64 -0
  260. package/src/server/collections/es-reports.ts +80 -0
  261. package/src/server/index.ts +15 -0
  262. package/src/server/mcp/ElasticReportMcpServer.ts +391 -0
  263. package/src/server/mcp/ElasticReportToolCatalog.ts +663 -0
  264. package/src/server/plugin.ts +599 -0
  265. package/src/server/services/ElasticReportService.ts +486 -0
  266. package/src/server/services/ElasticsearchConnectionService.ts +728 -0
  267. package/src/server/services/ReportExportService.ts +282 -0
  268. package/src/server/services/ReportQueryCompiler.ts +1552 -0
  269. package/src/server/workflow/ElasticReportQueryInstruction.ts +124 -0
  270. package/src/shared/constants.ts +36 -0
  271. package/src/shared/types.ts +272 -0
  272. package/README.md +0 -3
@@ -0,0 +1,766 @@
1
+ "use strict";
2
+ /*
3
+ * Licensed to Elasticsearch B.V. under one or more contributor
4
+ * license agreements. See the NOTICE file distributed with
5
+ * this work for additional information regarding copyright
6
+ * ownership. Elasticsearch B.V. licenses this file to you under
7
+ * the Apache License, Version 2.0 (the "License"); you may
8
+ * not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ class Cat {
22
+ constructor(transport) {
23
+ Object.defineProperty(this, "transport", {
24
+ enumerable: true,
25
+ configurable: true,
26
+ writable: true,
27
+ value: void 0
28
+ });
29
+ this.transport = transport;
30
+ }
31
+ async aliases(params, options) {
32
+ const acceptedPath = ['name'];
33
+ const querystring = {};
34
+ const body = undefined;
35
+ params = params !== null && params !== void 0 ? params : {};
36
+ for (const key in params) {
37
+ if (acceptedPath.includes(key)) {
38
+ continue;
39
+ }
40
+ else if (key !== 'body') {
41
+ // @ts-expect-error
42
+ querystring[key] = params[key];
43
+ }
44
+ }
45
+ let method = '';
46
+ let path = '';
47
+ if (params.name != null) {
48
+ method = 'GET';
49
+ path = `/_cat/aliases/${encodeURIComponent(params.name.toString())}`;
50
+ }
51
+ else {
52
+ method = 'GET';
53
+ path = '/_cat/aliases';
54
+ }
55
+ const meta = {
56
+ name: 'cat.aliases',
57
+ pathParts: {
58
+ name: params.name
59
+ }
60
+ };
61
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
62
+ }
63
+ async allocation(params, options) {
64
+ const acceptedPath = ['node_id'];
65
+ const querystring = {};
66
+ const body = undefined;
67
+ params = params !== null && params !== void 0 ? params : {};
68
+ for (const key in params) {
69
+ if (acceptedPath.includes(key)) {
70
+ continue;
71
+ }
72
+ else if (key !== 'body') {
73
+ // @ts-expect-error
74
+ querystring[key] = params[key];
75
+ }
76
+ }
77
+ let method = '';
78
+ let path = '';
79
+ if (params.node_id != null) {
80
+ method = 'GET';
81
+ path = `/_cat/allocation/${encodeURIComponent(params.node_id.toString())}`;
82
+ }
83
+ else {
84
+ method = 'GET';
85
+ path = '/_cat/allocation';
86
+ }
87
+ const meta = {
88
+ name: 'cat.allocation',
89
+ pathParts: {
90
+ node_id: params.node_id
91
+ }
92
+ };
93
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
94
+ }
95
+ async componentTemplates(params, options) {
96
+ const acceptedPath = ['name'];
97
+ const querystring = {};
98
+ const body = undefined;
99
+ params = params !== null && params !== void 0 ? params : {};
100
+ for (const key in params) {
101
+ if (acceptedPath.includes(key)) {
102
+ continue;
103
+ }
104
+ else if (key !== 'body') {
105
+ // @ts-expect-error
106
+ querystring[key] = params[key];
107
+ }
108
+ }
109
+ let method = '';
110
+ let path = '';
111
+ if (params.name != null) {
112
+ method = 'GET';
113
+ path = `/_cat/component_templates/${encodeURIComponent(params.name.toString())}`;
114
+ }
115
+ else {
116
+ method = 'GET';
117
+ path = '/_cat/component_templates';
118
+ }
119
+ const meta = {
120
+ name: 'cat.component_templates',
121
+ pathParts: {
122
+ name: params.name
123
+ }
124
+ };
125
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
126
+ }
127
+ async count(params, options) {
128
+ const acceptedPath = ['index'];
129
+ const querystring = {};
130
+ const body = undefined;
131
+ params = params !== null && params !== void 0 ? params : {};
132
+ for (const key in params) {
133
+ if (acceptedPath.includes(key)) {
134
+ continue;
135
+ }
136
+ else if (key !== 'body') {
137
+ // @ts-expect-error
138
+ querystring[key] = params[key];
139
+ }
140
+ }
141
+ let method = '';
142
+ let path = '';
143
+ if (params.index != null) {
144
+ method = 'GET';
145
+ path = `/_cat/count/${encodeURIComponent(params.index.toString())}`;
146
+ }
147
+ else {
148
+ method = 'GET';
149
+ path = '/_cat/count';
150
+ }
151
+ const meta = {
152
+ name: 'cat.count',
153
+ pathParts: {
154
+ index: params.index
155
+ }
156
+ };
157
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
158
+ }
159
+ async fielddata(params, options) {
160
+ const acceptedPath = ['fields'];
161
+ const querystring = {};
162
+ const body = undefined;
163
+ params = params !== null && params !== void 0 ? params : {};
164
+ for (const key in params) {
165
+ if (acceptedPath.includes(key)) {
166
+ continue;
167
+ }
168
+ else if (key !== 'body') {
169
+ // @ts-expect-error
170
+ querystring[key] = params[key];
171
+ }
172
+ }
173
+ let method = '';
174
+ let path = '';
175
+ if (params.fields != null) {
176
+ method = 'GET';
177
+ path = `/_cat/fielddata/${encodeURIComponent(params.fields.toString())}`;
178
+ }
179
+ else {
180
+ method = 'GET';
181
+ path = '/_cat/fielddata';
182
+ }
183
+ const meta = {
184
+ name: 'cat.fielddata',
185
+ pathParts: {
186
+ fields: params.fields
187
+ }
188
+ };
189
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
190
+ }
191
+ async health(params, options) {
192
+ const acceptedPath = [];
193
+ const querystring = {};
194
+ const body = undefined;
195
+ params = params !== null && params !== void 0 ? params : {};
196
+ for (const key in params) {
197
+ if (acceptedPath.includes(key)) {
198
+ continue;
199
+ }
200
+ else if (key !== 'body') {
201
+ // @ts-expect-error
202
+ querystring[key] = params[key];
203
+ }
204
+ }
205
+ const method = 'GET';
206
+ const path = '/_cat/health';
207
+ const meta = {
208
+ name: 'cat.health'
209
+ };
210
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
211
+ }
212
+ async help(params, options) {
213
+ const acceptedPath = [];
214
+ const querystring = {};
215
+ const body = undefined;
216
+ params = params !== null && params !== void 0 ? params : {};
217
+ for (const key in params) {
218
+ if (acceptedPath.includes(key)) {
219
+ continue;
220
+ }
221
+ else if (key !== 'body') {
222
+ // @ts-expect-error
223
+ querystring[key] = params[key];
224
+ }
225
+ }
226
+ const method = 'GET';
227
+ const path = '/_cat';
228
+ const meta = {
229
+ name: 'cat.help'
230
+ };
231
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
232
+ }
233
+ async indices(params, options) {
234
+ const acceptedPath = ['index'];
235
+ const querystring = {};
236
+ const body = undefined;
237
+ params = params !== null && params !== void 0 ? params : {};
238
+ for (const key in params) {
239
+ if (acceptedPath.includes(key)) {
240
+ continue;
241
+ }
242
+ else if (key !== 'body') {
243
+ // @ts-expect-error
244
+ querystring[key] = params[key];
245
+ }
246
+ }
247
+ let method = '';
248
+ let path = '';
249
+ if (params.index != null) {
250
+ method = 'GET';
251
+ path = `/_cat/indices/${encodeURIComponent(params.index.toString())}`;
252
+ }
253
+ else {
254
+ method = 'GET';
255
+ path = '/_cat/indices';
256
+ }
257
+ const meta = {
258
+ name: 'cat.indices',
259
+ pathParts: {
260
+ index: params.index
261
+ }
262
+ };
263
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
264
+ }
265
+ async master(params, options) {
266
+ const acceptedPath = [];
267
+ const querystring = {};
268
+ const body = undefined;
269
+ params = params !== null && params !== void 0 ? params : {};
270
+ for (const key in params) {
271
+ if (acceptedPath.includes(key)) {
272
+ continue;
273
+ }
274
+ else if (key !== 'body') {
275
+ // @ts-expect-error
276
+ querystring[key] = params[key];
277
+ }
278
+ }
279
+ const method = 'GET';
280
+ const path = '/_cat/master';
281
+ const meta = {
282
+ name: 'cat.master'
283
+ };
284
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
285
+ }
286
+ async mlDataFrameAnalytics(params, options) {
287
+ const acceptedPath = ['id'];
288
+ const querystring = {};
289
+ const body = undefined;
290
+ params = params !== null && params !== void 0 ? params : {};
291
+ for (const key in params) {
292
+ if (acceptedPath.includes(key)) {
293
+ continue;
294
+ }
295
+ else if (key !== 'body') {
296
+ // @ts-expect-error
297
+ querystring[key] = params[key];
298
+ }
299
+ }
300
+ let method = '';
301
+ let path = '';
302
+ if (params.id != null) {
303
+ method = 'GET';
304
+ path = `/_cat/ml/data_frame/analytics/${encodeURIComponent(params.id.toString())}`;
305
+ }
306
+ else {
307
+ method = 'GET';
308
+ path = '/_cat/ml/data_frame/analytics';
309
+ }
310
+ const meta = {
311
+ name: 'cat.ml_data_frame_analytics',
312
+ pathParts: {
313
+ id: params.id
314
+ }
315
+ };
316
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
317
+ }
318
+ async mlDatafeeds(params, options) {
319
+ const acceptedPath = ['datafeed_id'];
320
+ const querystring = {};
321
+ const body = undefined;
322
+ params = params !== null && params !== void 0 ? params : {};
323
+ for (const key in params) {
324
+ if (acceptedPath.includes(key)) {
325
+ continue;
326
+ }
327
+ else if (key !== 'body') {
328
+ // @ts-expect-error
329
+ querystring[key] = params[key];
330
+ }
331
+ }
332
+ let method = '';
333
+ let path = '';
334
+ if (params.datafeed_id != null) {
335
+ method = 'GET';
336
+ path = `/_cat/ml/datafeeds/${encodeURIComponent(params.datafeed_id.toString())}`;
337
+ }
338
+ else {
339
+ method = 'GET';
340
+ path = '/_cat/ml/datafeeds';
341
+ }
342
+ const meta = {
343
+ name: 'cat.ml_datafeeds',
344
+ pathParts: {
345
+ datafeed_id: params.datafeed_id
346
+ }
347
+ };
348
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
349
+ }
350
+ async mlJobs(params, options) {
351
+ const acceptedPath = ['job_id'];
352
+ const querystring = {};
353
+ const body = undefined;
354
+ params = params !== null && params !== void 0 ? params : {};
355
+ for (const key in params) {
356
+ if (acceptedPath.includes(key)) {
357
+ continue;
358
+ }
359
+ else if (key !== 'body') {
360
+ // @ts-expect-error
361
+ querystring[key] = params[key];
362
+ }
363
+ }
364
+ let method = '';
365
+ let path = '';
366
+ if (params.job_id != null) {
367
+ method = 'GET';
368
+ path = `/_cat/ml/anomaly_detectors/${encodeURIComponent(params.job_id.toString())}`;
369
+ }
370
+ else {
371
+ method = 'GET';
372
+ path = '/_cat/ml/anomaly_detectors';
373
+ }
374
+ const meta = {
375
+ name: 'cat.ml_jobs',
376
+ pathParts: {
377
+ job_id: params.job_id
378
+ }
379
+ };
380
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
381
+ }
382
+ async mlTrainedModels(params, options) {
383
+ const acceptedPath = ['model_id'];
384
+ const querystring = {};
385
+ const body = undefined;
386
+ params = params !== null && params !== void 0 ? params : {};
387
+ for (const key in params) {
388
+ if (acceptedPath.includes(key)) {
389
+ continue;
390
+ }
391
+ else if (key !== 'body') {
392
+ // @ts-expect-error
393
+ querystring[key] = params[key];
394
+ }
395
+ }
396
+ let method = '';
397
+ let path = '';
398
+ if (params.model_id != null) {
399
+ method = 'GET';
400
+ path = `/_cat/ml/trained_models/${encodeURIComponent(params.model_id.toString())}`;
401
+ }
402
+ else {
403
+ method = 'GET';
404
+ path = '/_cat/ml/trained_models';
405
+ }
406
+ const meta = {
407
+ name: 'cat.ml_trained_models',
408
+ pathParts: {
409
+ model_id: params.model_id
410
+ }
411
+ };
412
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
413
+ }
414
+ async nodeattrs(params, options) {
415
+ const acceptedPath = [];
416
+ const querystring = {};
417
+ const body = undefined;
418
+ params = params !== null && params !== void 0 ? params : {};
419
+ for (const key in params) {
420
+ if (acceptedPath.includes(key)) {
421
+ continue;
422
+ }
423
+ else if (key !== 'body') {
424
+ // @ts-expect-error
425
+ querystring[key] = params[key];
426
+ }
427
+ }
428
+ const method = 'GET';
429
+ const path = '/_cat/nodeattrs';
430
+ const meta = {
431
+ name: 'cat.nodeattrs'
432
+ };
433
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
434
+ }
435
+ async nodes(params, options) {
436
+ const acceptedPath = [];
437
+ const querystring = {};
438
+ const body = undefined;
439
+ params = params !== null && params !== void 0 ? params : {};
440
+ for (const key in params) {
441
+ if (acceptedPath.includes(key)) {
442
+ continue;
443
+ }
444
+ else if (key !== 'body') {
445
+ // @ts-expect-error
446
+ querystring[key] = params[key];
447
+ }
448
+ }
449
+ const method = 'GET';
450
+ const path = '/_cat/nodes';
451
+ const meta = {
452
+ name: 'cat.nodes'
453
+ };
454
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
455
+ }
456
+ async pendingTasks(params, options) {
457
+ const acceptedPath = [];
458
+ const querystring = {};
459
+ const body = undefined;
460
+ params = params !== null && params !== void 0 ? params : {};
461
+ for (const key in params) {
462
+ if (acceptedPath.includes(key)) {
463
+ continue;
464
+ }
465
+ else if (key !== 'body') {
466
+ // @ts-expect-error
467
+ querystring[key] = params[key];
468
+ }
469
+ }
470
+ const method = 'GET';
471
+ const path = '/_cat/pending_tasks';
472
+ const meta = {
473
+ name: 'cat.pending_tasks'
474
+ };
475
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
476
+ }
477
+ async plugins(params, options) {
478
+ const acceptedPath = [];
479
+ const querystring = {};
480
+ const body = undefined;
481
+ params = params !== null && params !== void 0 ? params : {};
482
+ for (const key in params) {
483
+ if (acceptedPath.includes(key)) {
484
+ continue;
485
+ }
486
+ else if (key !== 'body') {
487
+ // @ts-expect-error
488
+ querystring[key] = params[key];
489
+ }
490
+ }
491
+ const method = 'GET';
492
+ const path = '/_cat/plugins';
493
+ const meta = {
494
+ name: 'cat.plugins'
495
+ };
496
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
497
+ }
498
+ async recovery(params, options) {
499
+ const acceptedPath = ['index'];
500
+ const querystring = {};
501
+ const body = undefined;
502
+ params = params !== null && params !== void 0 ? params : {};
503
+ for (const key in params) {
504
+ if (acceptedPath.includes(key)) {
505
+ continue;
506
+ }
507
+ else if (key !== 'body') {
508
+ // @ts-expect-error
509
+ querystring[key] = params[key];
510
+ }
511
+ }
512
+ let method = '';
513
+ let path = '';
514
+ if (params.index != null) {
515
+ method = 'GET';
516
+ path = `/_cat/recovery/${encodeURIComponent(params.index.toString())}`;
517
+ }
518
+ else {
519
+ method = 'GET';
520
+ path = '/_cat/recovery';
521
+ }
522
+ const meta = {
523
+ name: 'cat.recovery',
524
+ pathParts: {
525
+ index: params.index
526
+ }
527
+ };
528
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
529
+ }
530
+ async repositories(params, options) {
531
+ const acceptedPath = [];
532
+ const querystring = {};
533
+ const body = undefined;
534
+ params = params !== null && params !== void 0 ? params : {};
535
+ for (const key in params) {
536
+ if (acceptedPath.includes(key)) {
537
+ continue;
538
+ }
539
+ else if (key !== 'body') {
540
+ // @ts-expect-error
541
+ querystring[key] = params[key];
542
+ }
543
+ }
544
+ const method = 'GET';
545
+ const path = '/_cat/repositories';
546
+ const meta = {
547
+ name: 'cat.repositories'
548
+ };
549
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
550
+ }
551
+ async segments(params, options) {
552
+ const acceptedPath = ['index'];
553
+ const querystring = {};
554
+ const body = undefined;
555
+ params = params !== null && params !== void 0 ? params : {};
556
+ for (const key in params) {
557
+ if (acceptedPath.includes(key)) {
558
+ continue;
559
+ }
560
+ else if (key !== 'body') {
561
+ // @ts-expect-error
562
+ querystring[key] = params[key];
563
+ }
564
+ }
565
+ let method = '';
566
+ let path = '';
567
+ if (params.index != null) {
568
+ method = 'GET';
569
+ path = `/_cat/segments/${encodeURIComponent(params.index.toString())}`;
570
+ }
571
+ else {
572
+ method = 'GET';
573
+ path = '/_cat/segments';
574
+ }
575
+ const meta = {
576
+ name: 'cat.segments',
577
+ pathParts: {
578
+ index: params.index
579
+ }
580
+ };
581
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
582
+ }
583
+ async shards(params, options) {
584
+ const acceptedPath = ['index'];
585
+ const querystring = {};
586
+ const body = undefined;
587
+ params = params !== null && params !== void 0 ? params : {};
588
+ for (const key in params) {
589
+ if (acceptedPath.includes(key)) {
590
+ continue;
591
+ }
592
+ else if (key !== 'body') {
593
+ // @ts-expect-error
594
+ querystring[key] = params[key];
595
+ }
596
+ }
597
+ let method = '';
598
+ let path = '';
599
+ if (params.index != null) {
600
+ method = 'GET';
601
+ path = `/_cat/shards/${encodeURIComponent(params.index.toString())}`;
602
+ }
603
+ else {
604
+ method = 'GET';
605
+ path = '/_cat/shards';
606
+ }
607
+ const meta = {
608
+ name: 'cat.shards',
609
+ pathParts: {
610
+ index: params.index
611
+ }
612
+ };
613
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
614
+ }
615
+ async snapshots(params, options) {
616
+ const acceptedPath = ['repository'];
617
+ const querystring = {};
618
+ const body = undefined;
619
+ params = params !== null && params !== void 0 ? params : {};
620
+ for (const key in params) {
621
+ if (acceptedPath.includes(key)) {
622
+ continue;
623
+ }
624
+ else if (key !== 'body') {
625
+ // @ts-expect-error
626
+ querystring[key] = params[key];
627
+ }
628
+ }
629
+ let method = '';
630
+ let path = '';
631
+ if (params.repository != null) {
632
+ method = 'GET';
633
+ path = `/_cat/snapshots/${encodeURIComponent(params.repository.toString())}`;
634
+ }
635
+ else {
636
+ method = 'GET';
637
+ path = '/_cat/snapshots';
638
+ }
639
+ const meta = {
640
+ name: 'cat.snapshots',
641
+ pathParts: {
642
+ repository: params.repository
643
+ }
644
+ };
645
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
646
+ }
647
+ async tasks(params, options) {
648
+ const acceptedPath = [];
649
+ const querystring = {};
650
+ const body = undefined;
651
+ params = params !== null && params !== void 0 ? params : {};
652
+ for (const key in params) {
653
+ if (acceptedPath.includes(key)) {
654
+ continue;
655
+ }
656
+ else if (key !== 'body') {
657
+ // @ts-expect-error
658
+ querystring[key] = params[key];
659
+ }
660
+ }
661
+ const method = 'GET';
662
+ const path = '/_cat/tasks';
663
+ const meta = {
664
+ name: 'cat.tasks'
665
+ };
666
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
667
+ }
668
+ async templates(params, options) {
669
+ const acceptedPath = ['name'];
670
+ const querystring = {};
671
+ const body = undefined;
672
+ params = params !== null && params !== void 0 ? params : {};
673
+ for (const key in params) {
674
+ if (acceptedPath.includes(key)) {
675
+ continue;
676
+ }
677
+ else if (key !== 'body') {
678
+ // @ts-expect-error
679
+ querystring[key] = params[key];
680
+ }
681
+ }
682
+ let method = '';
683
+ let path = '';
684
+ if (params.name != null) {
685
+ method = 'GET';
686
+ path = `/_cat/templates/${encodeURIComponent(params.name.toString())}`;
687
+ }
688
+ else {
689
+ method = 'GET';
690
+ path = '/_cat/templates';
691
+ }
692
+ const meta = {
693
+ name: 'cat.templates',
694
+ pathParts: {
695
+ name: params.name
696
+ }
697
+ };
698
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
699
+ }
700
+ async threadPool(params, options) {
701
+ const acceptedPath = ['thread_pool_patterns'];
702
+ const querystring = {};
703
+ const body = undefined;
704
+ params = params !== null && params !== void 0 ? params : {};
705
+ for (const key in params) {
706
+ if (acceptedPath.includes(key)) {
707
+ continue;
708
+ }
709
+ else if (key !== 'body') {
710
+ // @ts-expect-error
711
+ querystring[key] = params[key];
712
+ }
713
+ }
714
+ let method = '';
715
+ let path = '';
716
+ if (params.thread_pool_patterns != null) {
717
+ method = 'GET';
718
+ path = `/_cat/thread_pool/${encodeURIComponent(params.thread_pool_patterns.toString())}`;
719
+ }
720
+ else {
721
+ method = 'GET';
722
+ path = '/_cat/thread_pool';
723
+ }
724
+ const meta = {
725
+ name: 'cat.thread_pool',
726
+ pathParts: {
727
+ thread_pool_patterns: params.thread_pool_patterns
728
+ }
729
+ };
730
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
731
+ }
732
+ async transforms(params, options) {
733
+ const acceptedPath = ['transform_id'];
734
+ const querystring = {};
735
+ const body = undefined;
736
+ params = params !== null && params !== void 0 ? params : {};
737
+ for (const key in params) {
738
+ if (acceptedPath.includes(key)) {
739
+ continue;
740
+ }
741
+ else if (key !== 'body') {
742
+ // @ts-expect-error
743
+ querystring[key] = params[key];
744
+ }
745
+ }
746
+ let method = '';
747
+ let path = '';
748
+ if (params.transform_id != null) {
749
+ method = 'GET';
750
+ path = `/_cat/transforms/${encodeURIComponent(params.transform_id.toString())}`;
751
+ }
752
+ else {
753
+ method = 'GET';
754
+ path = '/_cat/transforms';
755
+ }
756
+ const meta = {
757
+ name: 'cat.transforms',
758
+ pathParts: {
759
+ transform_id: params.transform_id
760
+ }
761
+ };
762
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
763
+ }
764
+ }
765
+ exports.default = Cat;
766
+ //# sourceMappingURL=cat.js.map