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,60 @@
1
+ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
2
+ import * as T from '../types';
3
+ import * as TB from '../typesWithBodyKey';
4
+ interface That {
5
+ transport: Transport;
6
+ }
7
+ export default class License {
8
+ transport: Transport;
9
+ constructor(transport: Transport);
10
+ /**
11
+ * Delete the license. When the license expires, your subscription level reverts to Basic. If the operator privileges feature is enabled, only operator users can use this API.
12
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-license.html | Elasticsearch API documentation}
13
+ */
14
+ delete(this: That, params?: T.LicenseDeleteRequest | TB.LicenseDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicenseDeleteResponse>;
15
+ delete(this: That, params?: T.LicenseDeleteRequest | TB.LicenseDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicenseDeleteResponse, unknown>>;
16
+ delete(this: That, params?: T.LicenseDeleteRequest | TB.LicenseDeleteRequest, options?: TransportRequestOptions): Promise<T.LicenseDeleteResponse>;
17
+ /**
18
+ * Get license information. Get information about your Elastic license including its type, its status, when it was issued, and when it expires. >info > If the master node is generating a new cluster state, the get license API may return a `404 Not Found` response. > If you receive an unexpected 404 response after cluster startup, wait a short period and retry the request.
19
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-license.html | Elasticsearch API documentation}
20
+ */
21
+ get(this: That, params?: T.LicenseGetRequest | TB.LicenseGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicenseGetResponse>;
22
+ get(this: That, params?: T.LicenseGetRequest | TB.LicenseGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicenseGetResponse, unknown>>;
23
+ get(this: That, params?: T.LicenseGetRequest | TB.LicenseGetRequest, options?: TransportRequestOptions): Promise<T.LicenseGetResponse>;
24
+ /**
25
+ * Get the basic license status.
26
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-basic-status.html | Elasticsearch API documentation}
27
+ */
28
+ getBasicStatus(this: That, params?: T.LicenseGetBasicStatusRequest | TB.LicenseGetBasicStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicenseGetBasicStatusResponse>;
29
+ getBasicStatus(this: That, params?: T.LicenseGetBasicStatusRequest | TB.LicenseGetBasicStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicenseGetBasicStatusResponse, unknown>>;
30
+ getBasicStatus(this: That, params?: T.LicenseGetBasicStatusRequest | TB.LicenseGetBasicStatusRequest, options?: TransportRequestOptions): Promise<T.LicenseGetBasicStatusResponse>;
31
+ /**
32
+ * Get the trial status.
33
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-trial-status.html | Elasticsearch API documentation}
34
+ */
35
+ getTrialStatus(this: That, params?: T.LicenseGetTrialStatusRequest | TB.LicenseGetTrialStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicenseGetTrialStatusResponse>;
36
+ getTrialStatus(this: That, params?: T.LicenseGetTrialStatusRequest | TB.LicenseGetTrialStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicenseGetTrialStatusResponse, unknown>>;
37
+ getTrialStatus(this: That, params?: T.LicenseGetTrialStatusRequest | TB.LicenseGetTrialStatusRequest, options?: TransportRequestOptions): Promise<T.LicenseGetTrialStatusResponse>;
38
+ /**
39
+ * Update the license. You can update your license at runtime without shutting down your nodes. License updates take effect immediately. If the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response. You must then re-submit the API request with the acknowledge parameter set to true. NOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license. If the operator privileges feature is enabled, only operator users can use this API.
40
+ * @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-license-post | Elasticsearch API documentation}
41
+ */
42
+ post(this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicensePostResponse>;
43
+ post(this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicensePostResponse, unknown>>;
44
+ post(this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptions): Promise<T.LicensePostResponse>;
45
+ /**
46
+ * Start a basic license. Start an indefinite basic license, which gives access to all the basic features. NOTE: In order to start a basic license, you must not currently have a basic license. If the basic license does not support all of the features that are available with your current license, however, you are notified in the response. You must then re-submit the API request with the `acknowledge` parameter set to `true`. To check the status of your basic license, use the get basic license API.
47
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/start-basic.html | Elasticsearch API documentation}
48
+ */
49
+ postStartBasic(this: That, params?: T.LicensePostStartBasicRequest | TB.LicensePostStartBasicRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicensePostStartBasicResponse>;
50
+ postStartBasic(this: That, params?: T.LicensePostStartBasicRequest | TB.LicensePostStartBasicRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicensePostStartBasicResponse, unknown>>;
51
+ postStartBasic(this: That, params?: T.LicensePostStartBasicRequest | TB.LicensePostStartBasicRequest, options?: TransportRequestOptions): Promise<T.LicensePostStartBasicResponse>;
52
+ /**
53
+ * Start a trial. Start a 30-day trial, which gives access to all subscription features. NOTE: You are allowed to start a trial only if your cluster has not already activated a trial for the current major product version. For example, if you have already activated a trial for v8.0, you cannot start a new trial until v9.0. You can, however, request an extended trial at https://www.elastic.co/trialextension. To check the status of your trial, use the get trial status API.
54
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/start-trial.html | Elasticsearch API documentation}
55
+ */
56
+ postStartTrial(this: That, params?: T.LicensePostStartTrialRequest | TB.LicensePostStartTrialRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicensePostStartTrialResponse>;
57
+ postStartTrial(this: That, params?: T.LicensePostStartTrialRequest | TB.LicensePostStartTrialRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicensePostStartTrialResponse, unknown>>;
58
+ postStartTrial(this: That, params?: T.LicensePostStartTrialRequest | TB.LicensePostStartTrialRequest, options?: TransportRequestOptions): Promise<T.LicensePostStartTrialResponse>;
59
+ }
60
+ export {};
@@ -0,0 +1,194 @@
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 License {
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 delete(params, options) {
32
+ const acceptedPath = [];
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
+ const method = 'DELETE';
46
+ const path = '/_license';
47
+ const meta = {
48
+ name: 'license.delete'
49
+ };
50
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
51
+ }
52
+ async get(params, options) {
53
+ const acceptedPath = [];
54
+ const querystring = {};
55
+ const body = undefined;
56
+ params = params !== null && params !== void 0 ? params : {};
57
+ for (const key in params) {
58
+ if (acceptedPath.includes(key)) {
59
+ continue;
60
+ }
61
+ else if (key !== 'body') {
62
+ // @ts-expect-error
63
+ querystring[key] = params[key];
64
+ }
65
+ }
66
+ const method = 'GET';
67
+ const path = '/_license';
68
+ const meta = {
69
+ name: 'license.get'
70
+ };
71
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
72
+ }
73
+ async getBasicStatus(params, options) {
74
+ const acceptedPath = [];
75
+ const querystring = {};
76
+ const body = undefined;
77
+ params = params !== null && params !== void 0 ? params : {};
78
+ for (const key in params) {
79
+ if (acceptedPath.includes(key)) {
80
+ continue;
81
+ }
82
+ else if (key !== 'body') {
83
+ // @ts-expect-error
84
+ querystring[key] = params[key];
85
+ }
86
+ }
87
+ const method = 'GET';
88
+ const path = '/_license/basic_status';
89
+ const meta = {
90
+ name: 'license.get_basic_status'
91
+ };
92
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
93
+ }
94
+ async getTrialStatus(params, options) {
95
+ const acceptedPath = [];
96
+ const querystring = {};
97
+ const body = undefined;
98
+ params = params !== null && params !== void 0 ? params : {};
99
+ for (const key in params) {
100
+ if (acceptedPath.includes(key)) {
101
+ continue;
102
+ }
103
+ else if (key !== 'body') {
104
+ // @ts-expect-error
105
+ querystring[key] = params[key];
106
+ }
107
+ }
108
+ const method = 'GET';
109
+ const path = '/_license/trial_status';
110
+ const meta = {
111
+ name: 'license.get_trial_status'
112
+ };
113
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
114
+ }
115
+ async post(params, options) {
116
+ const acceptedPath = [];
117
+ const acceptedBody = ['license', 'licenses'];
118
+ const querystring = {};
119
+ // @ts-expect-error
120
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
121
+ let body;
122
+ if (typeof userBody === 'string') {
123
+ body = userBody;
124
+ }
125
+ else {
126
+ body = userBody != null ? { ...userBody } : undefined;
127
+ }
128
+ params = params !== null && params !== void 0 ? params : {};
129
+ for (const key in params) {
130
+ if (acceptedBody.includes(key)) {
131
+ body = body !== null && body !== void 0 ? body : {};
132
+ // @ts-expect-error
133
+ body[key] = params[key];
134
+ }
135
+ else if (acceptedPath.includes(key)) {
136
+ continue;
137
+ }
138
+ else if (key !== 'body') {
139
+ // @ts-expect-error
140
+ querystring[key] = params[key];
141
+ }
142
+ }
143
+ const method = 'PUT';
144
+ const path = '/_license';
145
+ const meta = {
146
+ name: 'license.post'
147
+ };
148
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
149
+ }
150
+ async postStartBasic(params, options) {
151
+ const acceptedPath = [];
152
+ const querystring = {};
153
+ const body = undefined;
154
+ params = params !== null && params !== void 0 ? params : {};
155
+ for (const key in params) {
156
+ if (acceptedPath.includes(key)) {
157
+ continue;
158
+ }
159
+ else if (key !== 'body') {
160
+ // @ts-expect-error
161
+ querystring[key] = params[key];
162
+ }
163
+ }
164
+ const method = 'POST';
165
+ const path = '/_license/start_basic';
166
+ const meta = {
167
+ name: 'license.post_start_basic'
168
+ };
169
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
170
+ }
171
+ async postStartTrial(params, options) {
172
+ const acceptedPath = [];
173
+ const querystring = {};
174
+ const body = undefined;
175
+ params = params !== null && params !== void 0 ? params : {};
176
+ for (const key in params) {
177
+ if (acceptedPath.includes(key)) {
178
+ continue;
179
+ }
180
+ else if (key !== 'body') {
181
+ // @ts-expect-error
182
+ querystring[key] = params[key];
183
+ }
184
+ }
185
+ const method = 'POST';
186
+ const path = '/_license/start_trial';
187
+ const meta = {
188
+ name: 'license.post_start_trial'
189
+ };
190
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
191
+ }
192
+ }
193
+ exports.default = License;
194
+ //# sourceMappingURL=license.js.map
@@ -0,0 +1,32 @@
1
+ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
2
+ import * as T from '../types';
3
+ import * as TB from '../typesWithBodyKey';
4
+ interface That {
5
+ transport: Transport;
6
+ }
7
+ export default class Logstash {
8
+ transport: Transport;
9
+ constructor(transport: Transport);
10
+ /**
11
+ * Delete a Logstash pipeline. Delete a pipeline that is used for Logstash Central Management. If the request succeeds, you receive an empty response with an appropriate status code.
12
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/logstash-api-delete-pipeline.html | Elasticsearch API documentation}
13
+ */
14
+ deletePipeline(this: That, params: T.LogstashDeletePipelineRequest | TB.LogstashDeletePipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LogstashDeletePipelineResponse>;
15
+ deletePipeline(this: That, params: T.LogstashDeletePipelineRequest | TB.LogstashDeletePipelineRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LogstashDeletePipelineResponse, unknown>>;
16
+ deletePipeline(this: That, params: T.LogstashDeletePipelineRequest | TB.LogstashDeletePipelineRequest, options?: TransportRequestOptions): Promise<T.LogstashDeletePipelineResponse>;
17
+ /**
18
+ * Get Logstash pipelines. Get pipelines that are used for Logstash Central Management.
19
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/logstash-api-get-pipeline.html | Elasticsearch API documentation}
20
+ */
21
+ getPipeline(this: That, params?: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LogstashGetPipelineResponse>;
22
+ getPipeline(this: That, params?: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LogstashGetPipelineResponse, unknown>>;
23
+ getPipeline(this: That, params?: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptions): Promise<T.LogstashGetPipelineResponse>;
24
+ /**
25
+ * Create or update a Logstash pipeline. Create a pipeline that is used for Logstash Central Management. If the specified pipeline exists, it is replaced.
26
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/logstash-api-put-pipeline.html | Elasticsearch API documentation}
27
+ */
28
+ putPipeline(this: That, params: T.LogstashPutPipelineRequest | TB.LogstashPutPipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LogstashPutPipelineResponse>;
29
+ putPipeline(this: That, params: T.LogstashPutPipelineRequest | TB.LogstashPutPipelineRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LogstashPutPipelineResponse, unknown>>;
30
+ putPipeline(this: That, params: T.LogstashPutPipelineRequest | TB.LogstashPutPipelineRequest, options?: TransportRequestOptions): Promise<T.LogstashPutPipelineResponse>;
31
+ }
32
+ export {};
@@ -0,0 +1,118 @@
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 Logstash {
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 deletePipeline(params, options) {
32
+ const acceptedPath = ['id'];
33
+ const querystring = {};
34
+ const body = undefined;
35
+ for (const key in params) {
36
+ if (acceptedPath.includes(key)) {
37
+ continue;
38
+ }
39
+ else if (key !== 'body') {
40
+ // @ts-expect-error
41
+ querystring[key] = params[key];
42
+ }
43
+ }
44
+ const method = 'DELETE';
45
+ const path = `/_logstash/pipeline/${encodeURIComponent(params.id.toString())}`;
46
+ const meta = {
47
+ name: 'logstash.delete_pipeline',
48
+ pathParts: {
49
+ id: params.id
50
+ }
51
+ };
52
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
53
+ }
54
+ async getPipeline(params, options) {
55
+ const acceptedPath = ['id'];
56
+ const querystring = {};
57
+ const body = undefined;
58
+ params = params !== null && params !== void 0 ? params : {};
59
+ for (const key in params) {
60
+ if (acceptedPath.includes(key)) {
61
+ continue;
62
+ }
63
+ else if (key !== 'body') {
64
+ // @ts-expect-error
65
+ querystring[key] = params[key];
66
+ }
67
+ }
68
+ let method = '';
69
+ let path = '';
70
+ if (params.id != null) {
71
+ method = 'GET';
72
+ path = `/_logstash/pipeline/${encodeURIComponent(params.id.toString())}`;
73
+ }
74
+ else {
75
+ method = 'GET';
76
+ path = '/_logstash/pipeline';
77
+ }
78
+ const meta = {
79
+ name: 'logstash.get_pipeline',
80
+ pathParts: {
81
+ id: params.id
82
+ }
83
+ };
84
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
85
+ }
86
+ async putPipeline(params, options) {
87
+ var _a;
88
+ const acceptedPath = ['id'];
89
+ const acceptedBody = ['pipeline'];
90
+ const querystring = {};
91
+ // @ts-expect-error
92
+ let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
93
+ for (const key in params) {
94
+ if (acceptedBody.includes(key)) {
95
+ // @ts-expect-error
96
+ body = params[key];
97
+ }
98
+ else if (acceptedPath.includes(key)) {
99
+ continue;
100
+ }
101
+ else if (key !== 'body') {
102
+ // @ts-expect-error
103
+ querystring[key] = params[key];
104
+ }
105
+ }
106
+ const method = 'PUT';
107
+ const path = `/_logstash/pipeline/${encodeURIComponent(params.id.toString())}`;
108
+ const meta = {
109
+ name: 'logstash.put_pipeline',
110
+ pathParts: {
111
+ id: params.id
112
+ }
113
+ };
114
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
115
+ }
116
+ }
117
+ exports.default = Logstash;
118
+ //# sourceMappingURL=logstash.js.map
@@ -0,0 +1,14 @@
1
+ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
2
+ import * as T from '../types';
3
+ import * as TB from '../typesWithBodyKey';
4
+ interface That {
5
+ transport: Transport;
6
+ }
7
+ /**
8
+ * Get multiple documents. Get multiple JSON documents by ID from one or more indices. If you specify an index in the request URI, you only need to specify the document IDs in the request body. To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. **Filter source fields** By default, the `_source` field is returned for every document (if stored). Use the `_source` and `_source_include` or `source_exclude` attributes to filter what fields are returned for a particular document. You can include the `_source`, `_source_includes`, and `_source_excludes` query parameters in the request URI to specify the defaults to use when there are no per-document instructions. **Get stored fields** Use the `stored_fields` attribute to specify the set of stored fields you want to retrieve. Any requested fields that are not stored are ignored. You can include the `stored_fields` query parameter in the request URI to specify the defaults to use when there are no per-document instructions.
9
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-multi-get.html | Elasticsearch API documentation}
10
+ */
11
+ export default function MgetApi<TDocument = unknown>(this: That, params?: T.MgetRequest | TB.MgetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MgetResponse<TDocument>>;
12
+ export default function MgetApi<TDocument = unknown>(this: That, params?: T.MgetRequest | TB.MgetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MgetResponse<TDocument>, unknown>>;
13
+ export default function MgetApi<TDocument = unknown>(this: That, params?: T.MgetRequest | TB.MgetRequest, options?: TransportRequestOptions): Promise<T.MgetResponse<TDocument>>;
14
+ export {};
@@ -0,0 +1,68 @@
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
+ exports.default = MgetApi;
22
+ async function MgetApi(params, options) {
23
+ const acceptedPath = ['index'];
24
+ const acceptedBody = ['docs', 'ids'];
25
+ const querystring = {};
26
+ // @ts-expect-error
27
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
28
+ let body;
29
+ if (typeof userBody === 'string') {
30
+ body = userBody;
31
+ }
32
+ else {
33
+ body = userBody != null ? { ...userBody } : undefined;
34
+ }
35
+ params = params !== null && params !== void 0 ? params : {};
36
+ for (const key in params) {
37
+ if (acceptedBody.includes(key)) {
38
+ body = body !== null && body !== void 0 ? body : {};
39
+ // @ts-expect-error
40
+ body[key] = params[key];
41
+ }
42
+ else if (acceptedPath.includes(key)) {
43
+ continue;
44
+ }
45
+ else if (key !== 'body') {
46
+ // @ts-expect-error
47
+ querystring[key] = params[key];
48
+ }
49
+ }
50
+ let method = '';
51
+ let path = '';
52
+ if (params.index != null) {
53
+ method = body != null ? 'POST' : 'GET';
54
+ path = `/${encodeURIComponent(params.index.toString())}/_mget`;
55
+ }
56
+ else {
57
+ method = body != null ? 'POST' : 'GET';
58
+ path = '/_mget';
59
+ }
60
+ const meta = {
61
+ name: 'mget',
62
+ pathParts: {
63
+ index: params.index
64
+ }
65
+ };
66
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
67
+ }
68
+ //# sourceMappingURL=mget.js.map
@@ -0,0 +1,32 @@
1
+ import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
2
+ import * as T from '../types';
3
+ import * as TB from '../typesWithBodyKey';
4
+ interface That {
5
+ transport: Transport;
6
+ }
7
+ export default class Migration {
8
+ transport: Transport;
9
+ constructor(transport: Transport);
10
+ /**
11
+ * Get deprecation information. Get information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version. TIP: This APIs is designed for indirect use by the Upgrade Assistant. You are strongly recommended to use the Upgrade Assistant.
12
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/migration-api-deprecation.html | Elasticsearch API documentation}
13
+ */
14
+ deprecations(this: That, params?: T.MigrationDeprecationsRequest | TB.MigrationDeprecationsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MigrationDeprecationsResponse>;
15
+ deprecations(this: That, params?: T.MigrationDeprecationsRequest | TB.MigrationDeprecationsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MigrationDeprecationsResponse, unknown>>;
16
+ deprecations(this: That, params?: T.MigrationDeprecationsRequest | TB.MigrationDeprecationsRequest, options?: TransportRequestOptions): Promise<T.MigrationDeprecationsResponse>;
17
+ /**
18
+ * Get feature migration information. Version upgrades sometimes require changes to how features store configuration information and data in system indices. Check which features need to be migrated and the status of any migrations that are in progress. TIP: This API is designed for indirect use by the Upgrade Assistant. You are strongly recommended to use the Upgrade Assistant.
19
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/feature-migration-api.html | Elasticsearch API documentation}
20
+ */
21
+ getFeatureUpgradeStatus(this: That, params?: T.MigrationGetFeatureUpgradeStatusRequest | TB.MigrationGetFeatureUpgradeStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MigrationGetFeatureUpgradeStatusResponse>;
22
+ getFeatureUpgradeStatus(this: That, params?: T.MigrationGetFeatureUpgradeStatusRequest | TB.MigrationGetFeatureUpgradeStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MigrationGetFeatureUpgradeStatusResponse, unknown>>;
23
+ getFeatureUpgradeStatus(this: That, params?: T.MigrationGetFeatureUpgradeStatusRequest | TB.MigrationGetFeatureUpgradeStatusRequest, options?: TransportRequestOptions): Promise<T.MigrationGetFeatureUpgradeStatusResponse>;
24
+ /**
25
+ * Start the feature migration. Version upgrades sometimes require changes to how features store configuration information and data in system indices. This API starts the automatic migration process. Some functionality might be temporarily unavailable during the migration process. TIP: The API is designed for indirect use by the Upgrade Assistant. We strongly recommend you use the Upgrade Assistant.
26
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/feature-migration-api.html | Elasticsearch API documentation}
27
+ */
28
+ postFeatureUpgrade(this: That, params?: T.MigrationPostFeatureUpgradeRequest | TB.MigrationPostFeatureUpgradeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MigrationPostFeatureUpgradeResponse>;
29
+ postFeatureUpgrade(this: That, params?: T.MigrationPostFeatureUpgradeRequest | TB.MigrationPostFeatureUpgradeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MigrationPostFeatureUpgradeResponse, unknown>>;
30
+ postFeatureUpgrade(this: That, params?: T.MigrationPostFeatureUpgradeRequest | TB.MigrationPostFeatureUpgradeRequest, options?: TransportRequestOptions): Promise<T.MigrationPostFeatureUpgradeResponse>;
31
+ }
32
+ export {};
@@ -0,0 +1,107 @@
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 Migration {
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 deprecations(params, options) {
32
+ const acceptedPath = ['index'];
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.index != null) {
48
+ method = 'GET';
49
+ path = `/${encodeURIComponent(params.index.toString())}/_migration/deprecations`;
50
+ }
51
+ else {
52
+ method = 'GET';
53
+ path = '/_migration/deprecations';
54
+ }
55
+ const meta = {
56
+ name: 'migration.deprecations',
57
+ pathParts: {
58
+ index: params.index
59
+ }
60
+ };
61
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
62
+ }
63
+ async getFeatureUpgradeStatus(params, options) {
64
+ const acceptedPath = [];
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
+ const method = 'GET';
78
+ const path = '/_migration/system_features';
79
+ const meta = {
80
+ name: 'migration.get_feature_upgrade_status'
81
+ };
82
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
83
+ }
84
+ async postFeatureUpgrade(params, options) {
85
+ const acceptedPath = [];
86
+ const querystring = {};
87
+ const body = undefined;
88
+ params = params !== null && params !== void 0 ? params : {};
89
+ for (const key in params) {
90
+ if (acceptedPath.includes(key)) {
91
+ continue;
92
+ }
93
+ else if (key !== 'body') {
94
+ // @ts-expect-error
95
+ querystring[key] = params[key];
96
+ }
97
+ }
98
+ const method = 'POST';
99
+ const path = '/_migration/system_features';
100
+ const meta = {
101
+ name: 'migration.post_feature_upgrade'
102
+ };
103
+ return await this.transport.request({ path, method, querystring, body, meta }, options);
104
+ }
105
+ }
106
+ exports.default = Migration;
107
+ //# sourceMappingURL=migration.js.map