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.
- package/ai/skills/elastic-report/SKILLS.md +34 -0
- package/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/357.0dd385384cab5dbf.js +10 -0
- package/dist/client/index.js +10 -0
- package/dist/client-v2/851.142c93fc6d666b28.js +10 -0
- package/dist/client-v2/857.a5bf9637d5fd4ef5.js +10 -0
- package/dist/client-v2/877.f4095a3dbcadf98f.js +10 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/externalVersion.js +21 -0
- package/dist/index.js +48 -0
- package/dist/locale/en-US.json +198 -0
- package/dist/locale/vi-VN.json +198 -0
- package/dist/locale/zh-CN.json +198 -0
- package/dist/node_modules/@elastic/elasticsearch/.dockerignore +11 -0
- package/dist/node_modules/@elastic/elasticsearch/LICENSE +202 -0
- package/dist/node_modules/@elastic/elasticsearch/NOTICE.txt +2 -0
- package/dist/node_modules/@elastic/elasticsearch/catalog-info.yaml +50 -0
- package/dist/node_modules/@elastic/elasticsearch/codecov.yml +14 -0
- package/dist/node_modules/@elastic/elasticsearch/index.d.ts +28 -0
- package/dist/node_modules/@elastic/elasticsearch/index.js +85525 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/async_search.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/async_search.js +155 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/autoscaling.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/autoscaling.js +130 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/bulk.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/bulk.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/capabilities.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/capabilities.js +43 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cat.d.ts +193 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cat.js +766 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ccr.d.ts +102 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ccr.js +395 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/clear_scroll.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/clear_scroll.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/close_point_in_time.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/close_point_in_time.js +56 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cluster.d.ts +123 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/cluster.js +482 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/connector.d.ts +245 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/connector.js +1121 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/count.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/count.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/create.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/create.js +53 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/dangling_indices.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/dangling_indices.js +100 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete.js +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query_rethrottle.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_by_query_rethrottle.js +45 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_script.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/delete_script.js +45 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/enrich.d.ts +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/enrich.js +169 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/eql.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/eql.js +139 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/esql.d.ts +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/esql.js +170 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists.js +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists_source.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/exists_source.js +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/explain.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/explain.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/features.d.ts +25 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/features.js +75 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/field_caps.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/field_caps.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/fleet.d.ts +50 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/fleet.js +211 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get.js +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script.js +45 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_context.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_context.js +43 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_languages.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_script_languages.js +43 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_source.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/get_source.js +46 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/graph.d.ts +18 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/graph.js +70 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/health_report.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/health_report.js +54 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ilm.d.ts +88 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ilm.js +329 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/index.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/index.js +61 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/indices.d.ts +494 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/indices.js +2133 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/inference.d.ts +221 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/inference.js +1167 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/info.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/info.js +43 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ingest.d.ts +95 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ingest.js +389 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/knn_search.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/knn_search.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/license.d.ts +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/license.js +194 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/logstash.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/logstash.js +118 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mget.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mget.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/migration.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/migration.js +107 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ml.d.ts +522 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ml.js +2468 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/monitoring.d.ts +18 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/monitoring.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch_template.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/msearch_template.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mtermvectors.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/mtermvectors.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/nodes.d.ts +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/nodes.js +290 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/open_point_in_time.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/open_point_in_time.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ping.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ping.js +43 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/profiling.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/profiling.js +135 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/put_script.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/put_script.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/query_rules.d.ts +67 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/query_rules.js +260 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rank_eval.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rank_eval.js +67 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex.js +56 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex_rethrottle.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/reindex_rethrottle.js +45 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/render_search_template.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/render_search_template.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rollup.d.ts +67 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/rollup.js +263 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scripts_painless_execute.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scripts_painless_execute.js +57 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scroll.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/scroll.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search.js +75 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_application.d.ts +81 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_application.js +313 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_mvt.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_mvt.js +63 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_shards.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_shards.js +54 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_template.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/search_template.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/searchable_snapshots.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/searchable_snapshots.js +167 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/security.d.ts +459 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/security.js +1982 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/shutdown.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/shutdown.js +125 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/simulate.d.ts +18 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/simulate.js +78 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/slm.d.ts +74 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/slm.js +253 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/snapshot.d.ts +102 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/snapshot.js +410 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/sql.d.ts +53 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/sql.js +205 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ssl.d.ts +18 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/ssl.js +54 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/streams.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/streams.js +96 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/synonyms.d.ts +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/synonyms.js +223 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/tasks.d.ts +32 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/tasks.js +109 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/terms_enum.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/terms_enum.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/termvectors.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/termvectors.js +68 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/text_structure.d.ts +39 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/text_structure.js +148 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/transform.d.ts +101 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/transform.js +386 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update.js +60 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query.js +59 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query_rethrottle.d.ts +14 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/update_by_query_rethrottle.js +45 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/watcher.d.ts +102 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/watcher.js +405 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/xpack.d.ts +25 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/api/xpack.js +75 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/index.d.ts +265 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/index.js +632 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/types.d.ts +19933 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/types.js +21 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/typesWithBodyKey.d.ts +20606 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/api/typesWithBodyKey.js +21 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/client.d.ts +152 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/client.js +369 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/helpers.d.ts +184 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/helpers.js +889 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/sniffingTransport.d.ts +4 -0
- package/dist/node_modules/@elastic/elasticsearch/lib/sniffingTransport.js +56 -0
- package/dist/node_modules/@elastic/elasticsearch/node_modules/.bin/arrow2csv +15 -0
- package/dist/node_modules/@elastic/elasticsearch/node_modules/.bin/arrow2csv.cmd +7 -0
- package/dist/node_modules/@elastic/elasticsearch/package.json +1 -0
- package/dist/node_modules/@elastic/elasticsearch/tsconfig.json +38 -0
- package/dist/server/acl-guard.js +179 -0
- package/dist/server/collections/es-report-data-views.js +85 -0
- package/dist/server/collections/es-reports.js +101 -0
- package/dist/server/index.js +58 -0
- package/dist/server/mcp/ElasticReportMcpServer.js +344 -0
- package/dist/server/mcp/ElasticReportToolCatalog.js +639 -0
- package/dist/server/plugin.js +529 -0
- package/dist/server/services/ElasticReportService.js +377 -0
- package/dist/server/services/ElasticsearchConnectionService.js +572 -0
- package/dist/server/services/ReportExportService.js +243 -0
- package/dist/server/services/ReportQueryCompiler.js +1299 -0
- package/dist/server/workflow/ElasticReportQueryInstruction.js +123 -0
- package/dist/shared/constants.js +96 -0
- package/dist/shared/types.js +24 -0
- package/package.json +62 -4
- package/server.d.ts +2 -0
- package/server.js +1 -0
- package/src/client/index.tsx +34 -0
- package/src/client/workflow-instructions.tsx +44 -0
- package/src/client-v2/__tests__/elastic-report.test.tsx +791 -0
- package/src/client-v2/__tests__/kql-autocomplete.test.ts +178 -0
- package/src/client-v2/api.ts +320 -0
- package/src/client-v2/bus/DashboardFilterBus.ts +212 -0
- package/src/client-v2/components/ElasticBasicCharts.tsx +652 -0
- package/src/client-v2/components/ElasticFilterBar.tsx +372 -0
- package/src/client-v2/components/ElasticKqlInput.tsx +421 -0
- package/src/client-v2/components/ElasticReportBlock.tsx +306 -0
- package/src/client-v2/components/ElasticReportRenderer.tsx +1257 -0
- package/src/client-v2/components/HighlightText.tsx +50 -0
- package/src/client-v2/components/ReportSelect.tsx +85 -0
- package/src/client-v2/index.tsx +14 -0
- package/src/client-v2/locale.ts +23 -0
- package/src/client-v2/models/ElasticFilterBarBlockModel.tsx +115 -0
- package/src/client-v2/models/ElasticReportBlockModel.tsx +118 -0
- package/src/client-v2/pages/ElasticReportManager.tsx +1453 -0
- package/src/client-v2/plugin.tsx +72 -0
- package/src/client-v2/utils/kqlAutocomplete.ts +861 -0
- package/src/client-v2/workflow/instructions.tsx +149 -0
- package/src/index.ts +11 -0
- package/src/locale/en-US.json +198 -0
- package/src/locale/vi-VN.json +198 -0
- package/src/locale/zh-CN.json +198 -0
- package/src/server/__tests__/query-compiler.test.ts +620 -0
- package/src/server/__tests__/report-mcp-acl.integration.test.ts +645 -0
- package/src/server/acl-guard.ts +194 -0
- package/src/server/collections/es-report-data-views.ts +64 -0
- package/src/server/collections/es-reports.ts +80 -0
- package/src/server/index.ts +15 -0
- package/src/server/mcp/ElasticReportMcpServer.ts +391 -0
- package/src/server/mcp/ElasticReportToolCatalog.ts +663 -0
- package/src/server/plugin.ts +599 -0
- package/src/server/services/ElasticReportService.ts +486 -0
- package/src/server/services/ElasticsearchConnectionService.ts +728 -0
- package/src/server/services/ReportExportService.ts +282 -0
- package/src/server/services/ReportQueryCompiler.ts +1552 -0
- package/src/server/workflow/ElasticReportQueryInstruction.ts +124 -0
- package/src/shared/constants.ts +36 -0
- package/src/shared/types.ts +272 -0
- package/README.md +0 -3
|
@@ -0,0 +1,290 @@
|
|
|
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 Nodes {
|
|
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 clearRepositoriesMeteringArchive(params, options) {
|
|
32
|
+
const acceptedPath = ['node_id', 'max_archive_version'];
|
|
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 = `/_nodes/${encodeURIComponent(params.node_id.toString())}/_repositories_metering/${encodeURIComponent(params.max_archive_version.toString())}`;
|
|
46
|
+
const meta = {
|
|
47
|
+
name: 'nodes.clear_repositories_metering_archive',
|
|
48
|
+
pathParts: {
|
|
49
|
+
node_id: params.node_id,
|
|
50
|
+
max_archive_version: params.max_archive_version
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
54
|
+
}
|
|
55
|
+
async getRepositoriesMeteringInfo(params, options) {
|
|
56
|
+
const acceptedPath = ['node_id'];
|
|
57
|
+
const querystring = {};
|
|
58
|
+
const body = undefined;
|
|
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
|
+
const method = 'GET';
|
|
69
|
+
const path = `/_nodes/${encodeURIComponent(params.node_id.toString())}/_repositories_metering`;
|
|
70
|
+
const meta = {
|
|
71
|
+
name: 'nodes.get_repositories_metering_info',
|
|
72
|
+
pathParts: {
|
|
73
|
+
node_id: params.node_id
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
77
|
+
}
|
|
78
|
+
async hotThreads(params, options) {
|
|
79
|
+
const acceptedPath = ['node_id'];
|
|
80
|
+
const querystring = {};
|
|
81
|
+
const body = undefined;
|
|
82
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
83
|
+
for (const key in params) {
|
|
84
|
+
if (acceptedPath.includes(key)) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
else if (key !== 'body') {
|
|
88
|
+
// @ts-expect-error
|
|
89
|
+
querystring[key] = params[key];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
let method = '';
|
|
93
|
+
let path = '';
|
|
94
|
+
if (params.node_id != null) {
|
|
95
|
+
method = 'GET';
|
|
96
|
+
path = `/_nodes/${encodeURIComponent(params.node_id.toString())}/hot_threads`;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
method = 'GET';
|
|
100
|
+
path = '/_nodes/hot_threads';
|
|
101
|
+
}
|
|
102
|
+
const meta = {
|
|
103
|
+
name: 'nodes.hot_threads',
|
|
104
|
+
pathParts: {
|
|
105
|
+
node_id: params.node_id
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
109
|
+
}
|
|
110
|
+
async info(params, options) {
|
|
111
|
+
const acceptedPath = ['node_id', 'metric'];
|
|
112
|
+
const querystring = {};
|
|
113
|
+
const body = undefined;
|
|
114
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
115
|
+
for (const key in params) {
|
|
116
|
+
if (acceptedPath.includes(key)) {
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
else if (key !== 'body') {
|
|
120
|
+
// @ts-expect-error
|
|
121
|
+
querystring[key] = params[key];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
let method = '';
|
|
125
|
+
let path = '';
|
|
126
|
+
if (params.node_id != null && params.metric != null) {
|
|
127
|
+
method = 'GET';
|
|
128
|
+
path = `/_nodes/${encodeURIComponent(params.node_id.toString())}/${encodeURIComponent(params.metric.toString())}`;
|
|
129
|
+
}
|
|
130
|
+
else if (params.node_id != null) {
|
|
131
|
+
method = 'GET';
|
|
132
|
+
path = `/_nodes/${encodeURIComponent(params.node_id.toString())}`;
|
|
133
|
+
}
|
|
134
|
+
else if (params.metric != null) {
|
|
135
|
+
method = 'GET';
|
|
136
|
+
path = `/_nodes/${encodeURIComponent(params.metric.toString())}`;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
method = 'GET';
|
|
140
|
+
path = '/_nodes';
|
|
141
|
+
}
|
|
142
|
+
const meta = {
|
|
143
|
+
name: 'nodes.info',
|
|
144
|
+
pathParts: {
|
|
145
|
+
node_id: params.node_id,
|
|
146
|
+
metric: params.metric
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
150
|
+
}
|
|
151
|
+
async reloadSecureSettings(params, options) {
|
|
152
|
+
const acceptedPath = ['node_id'];
|
|
153
|
+
const acceptedBody = ['secure_settings_password'];
|
|
154
|
+
const querystring = {};
|
|
155
|
+
// @ts-expect-error
|
|
156
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
157
|
+
let body;
|
|
158
|
+
if (typeof userBody === 'string') {
|
|
159
|
+
body = userBody;
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
163
|
+
}
|
|
164
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
165
|
+
for (const key in params) {
|
|
166
|
+
if (acceptedBody.includes(key)) {
|
|
167
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
168
|
+
// @ts-expect-error
|
|
169
|
+
body[key] = params[key];
|
|
170
|
+
}
|
|
171
|
+
else if (acceptedPath.includes(key)) {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
else if (key !== 'body') {
|
|
175
|
+
// @ts-expect-error
|
|
176
|
+
querystring[key] = params[key];
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
let method = '';
|
|
180
|
+
let path = '';
|
|
181
|
+
if (params.node_id != null) {
|
|
182
|
+
method = 'POST';
|
|
183
|
+
path = `/_nodes/${encodeURIComponent(params.node_id.toString())}/reload_secure_settings`;
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
method = 'POST';
|
|
187
|
+
path = '/_nodes/reload_secure_settings';
|
|
188
|
+
}
|
|
189
|
+
const meta = {
|
|
190
|
+
name: 'nodes.reload_secure_settings',
|
|
191
|
+
pathParts: {
|
|
192
|
+
node_id: params.node_id
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
196
|
+
}
|
|
197
|
+
async stats(params, options) {
|
|
198
|
+
const acceptedPath = ['node_id', 'metric', 'index_metric'];
|
|
199
|
+
const querystring = {};
|
|
200
|
+
const body = undefined;
|
|
201
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
202
|
+
for (const key in params) {
|
|
203
|
+
if (acceptedPath.includes(key)) {
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
else if (key !== 'body') {
|
|
207
|
+
// @ts-expect-error
|
|
208
|
+
querystring[key] = params[key];
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
let method = '';
|
|
212
|
+
let path = '';
|
|
213
|
+
if (params.node_id != null && params.metric != null && params.index_metric != null) {
|
|
214
|
+
method = 'GET';
|
|
215
|
+
path = `/_nodes/${encodeURIComponent(params.node_id.toString())}/stats/${encodeURIComponent(params.metric.toString())}/${encodeURIComponent(params.index_metric.toString())}`;
|
|
216
|
+
}
|
|
217
|
+
else if (params.node_id != null && params.metric != null) {
|
|
218
|
+
method = 'GET';
|
|
219
|
+
path = `/_nodes/${encodeURIComponent(params.node_id.toString())}/stats/${encodeURIComponent(params.metric.toString())}`;
|
|
220
|
+
}
|
|
221
|
+
else if (params.metric != null && params.index_metric != null) {
|
|
222
|
+
method = 'GET';
|
|
223
|
+
path = `/_nodes/stats/${encodeURIComponent(params.metric.toString())}/${encodeURIComponent(params.index_metric.toString())}`;
|
|
224
|
+
}
|
|
225
|
+
else if (params.node_id != null) {
|
|
226
|
+
method = 'GET';
|
|
227
|
+
path = `/_nodes/${encodeURIComponent(params.node_id.toString())}/stats`;
|
|
228
|
+
}
|
|
229
|
+
else if (params.metric != null) {
|
|
230
|
+
method = 'GET';
|
|
231
|
+
path = `/_nodes/stats/${encodeURIComponent(params.metric.toString())}`;
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
method = 'GET';
|
|
235
|
+
path = '/_nodes/stats';
|
|
236
|
+
}
|
|
237
|
+
const meta = {
|
|
238
|
+
name: 'nodes.stats',
|
|
239
|
+
pathParts: {
|
|
240
|
+
node_id: params.node_id,
|
|
241
|
+
metric: params.metric,
|
|
242
|
+
index_metric: params.index_metric
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
246
|
+
}
|
|
247
|
+
async usage(params, options) {
|
|
248
|
+
const acceptedPath = ['node_id', 'metric'];
|
|
249
|
+
const querystring = {};
|
|
250
|
+
const body = undefined;
|
|
251
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
252
|
+
for (const key in params) {
|
|
253
|
+
if (acceptedPath.includes(key)) {
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
else if (key !== 'body') {
|
|
257
|
+
// @ts-expect-error
|
|
258
|
+
querystring[key] = params[key];
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
let method = '';
|
|
262
|
+
let path = '';
|
|
263
|
+
if (params.node_id != null && params.metric != null) {
|
|
264
|
+
method = 'GET';
|
|
265
|
+
path = `/_nodes/${encodeURIComponent(params.node_id.toString())}/usage/${encodeURIComponent(params.metric.toString())}`;
|
|
266
|
+
}
|
|
267
|
+
else if (params.node_id != null) {
|
|
268
|
+
method = 'GET';
|
|
269
|
+
path = `/_nodes/${encodeURIComponent(params.node_id.toString())}/usage`;
|
|
270
|
+
}
|
|
271
|
+
else if (params.metric != null) {
|
|
272
|
+
method = 'GET';
|
|
273
|
+
path = `/_nodes/usage/${encodeURIComponent(params.metric.toString())}`;
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
method = 'GET';
|
|
277
|
+
path = '/_nodes/usage';
|
|
278
|
+
}
|
|
279
|
+
const meta = {
|
|
280
|
+
name: 'nodes.usage',
|
|
281
|
+
pathParts: {
|
|
282
|
+
node_id: params.node_id,
|
|
283
|
+
metric: params.metric
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
exports.default = Nodes;
|
|
290
|
+
//# sourceMappingURL=nodes.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
|
+
* Open a point in time. A search request by default runs against the most recent visible data of the target indices, which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple search requests using the same point in time. For example, if refreshes happen between `search_after` requests, then the results of those requests might not be consistent as changes happening between searches are only visible to the more recent point in time. A point in time must be opened explicitly before being used in search requests. A subsequent search request with the `pit` parameter must not specify `index`, `routing`, or `preference` values as these parameters are copied from the point in time. Just like regular searches, you can use `from` and `size` to page through point in time search results, up to the first 10,000 hits. If you want to retrieve more hits, use PIT with `search_after`. IMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request. When a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a `NoShardAvailableActionException` exception. To get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime. **Keeping point in time alive** The `keep_alive` parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time. The value does not need to be long enough to process all data — it just needs to be long enough for the next request. Normally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments. Once the smaller segments are no longer needed they are deleted. However, open point-in-times prevent the old segments from being deleted since they are still in use. TIP: Keeping older segments alive means that more disk space and file handles are needed. Ensure that you have configured your nodes to have ample free file handles. Additionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request. Ensure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates. Note that a point-in-time doesn't prevent its associated indices from being deleted. You can check how many point-in-times (that is, search contexts) are open with the nodes stats API.
|
|
9
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/point-in-time-api.html | Elasticsearch API documentation}
|
|
10
|
+
*/
|
|
11
|
+
export default function OpenPointInTimeApi(this: That, params: T.OpenPointInTimeRequest | TB.OpenPointInTimeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.OpenPointInTimeResponse>;
|
|
12
|
+
export default function OpenPointInTimeApi(this: That, params: T.OpenPointInTimeRequest | TB.OpenPointInTimeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.OpenPointInTimeResponse, unknown>>;
|
|
13
|
+
export default function OpenPointInTimeApi(this: That, params: T.OpenPointInTimeRequest | TB.OpenPointInTimeRequest, options?: TransportRequestOptions): Promise<T.OpenPointInTimeResponse>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
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 = OpenPointInTimeApi;
|
|
22
|
+
async function OpenPointInTimeApi(params, options) {
|
|
23
|
+
const acceptedPath = ['index'];
|
|
24
|
+
const acceptedBody = ['index_filter'];
|
|
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
|
+
for (const key in params) {
|
|
36
|
+
if (acceptedBody.includes(key)) {
|
|
37
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
38
|
+
// @ts-expect-error
|
|
39
|
+
body[key] = params[key];
|
|
40
|
+
}
|
|
41
|
+
else if (acceptedPath.includes(key)) {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
else if (key !== 'body') {
|
|
45
|
+
// @ts-expect-error
|
|
46
|
+
querystring[key] = params[key];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const method = 'POST';
|
|
50
|
+
const path = `/${encodeURIComponent(params.index.toString())}/_pit`;
|
|
51
|
+
const meta = {
|
|
52
|
+
name: 'open_point_in_time',
|
|
53
|
+
pathParts: {
|
|
54
|
+
index: params.index
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=open_point_in_time.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
|
+
* Ping the cluster. Get information about whether the cluster is running.
|
|
9
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster.html | Elasticsearch API documentation}
|
|
10
|
+
*/
|
|
11
|
+
export default function PingApi(this: That, params?: T.PingRequest | TB.PingRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.PingResponse>;
|
|
12
|
+
export default function PingApi(this: That, params?: T.PingRequest | TB.PingRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.PingResponse, unknown>>;
|
|
13
|
+
export default function PingApi(this: That, params?: T.PingRequest | TB.PingRequest, options?: TransportRequestOptions): Promise<T.PingResponse>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
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 = PingApi;
|
|
22
|
+
async function PingApi(params, options) {
|
|
23
|
+
const acceptedPath = [];
|
|
24
|
+
const querystring = {};
|
|
25
|
+
const body = undefined;
|
|
26
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
27
|
+
for (const key in params) {
|
|
28
|
+
if (acceptedPath.includes(key)) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
else if (key !== 'body') {
|
|
32
|
+
// @ts-expect-error
|
|
33
|
+
querystring[key] = params[key];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const method = 'HEAD';
|
|
37
|
+
const path = '/';
|
|
38
|
+
const meta = {
|
|
39
|
+
name: 'ping'
|
|
40
|
+
};
|
|
41
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=ping.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
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 Profiling {
|
|
8
|
+
transport: Transport;
|
|
9
|
+
constructor(transport: Transport);
|
|
10
|
+
/**
|
|
11
|
+
* Returns basic information about the status of Universal Profiling.
|
|
12
|
+
* @see {@link https://www.elastic.co/guide/en/observability/8.19/universal-profiling.html | Elasticsearch API documentation}
|
|
13
|
+
*/
|
|
14
|
+
flamegraph(this: That, params: T.ProfilingFlamegraphRequest | TB.ProfilingFlamegraphRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ProfilingFlamegraphResponse>;
|
|
15
|
+
flamegraph(this: That, params: T.ProfilingFlamegraphRequest | TB.ProfilingFlamegraphRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ProfilingFlamegraphResponse, unknown>>;
|
|
16
|
+
flamegraph(this: That, params: T.ProfilingFlamegraphRequest | TB.ProfilingFlamegraphRequest, options?: TransportRequestOptions): Promise<T.ProfilingFlamegraphResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Extracts raw stacktrace information from Universal Profiling.
|
|
19
|
+
* @see {@link https://www.elastic.co/guide/en/observability/8.19/universal-profiling.html | Elasticsearch API documentation}
|
|
20
|
+
*/
|
|
21
|
+
stacktraces(this: That, params: T.ProfilingStacktracesRequest | TB.ProfilingStacktracesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ProfilingStacktracesResponse>;
|
|
22
|
+
stacktraces(this: That, params: T.ProfilingStacktracesRequest | TB.ProfilingStacktracesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ProfilingStacktracesResponse, unknown>>;
|
|
23
|
+
stacktraces(this: That, params: T.ProfilingStacktracesRequest | TB.ProfilingStacktracesRequest, options?: TransportRequestOptions): Promise<T.ProfilingStacktracesResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Returns basic information about the status of Universal Profiling.
|
|
26
|
+
* @see {@link https://www.elastic.co/guide/en/observability/8.19/universal-profiling.html | Elasticsearch API documentation}
|
|
27
|
+
*/
|
|
28
|
+
status(this: That, params?: T.ProfilingStatusRequest | TB.ProfilingStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ProfilingStatusResponse>;
|
|
29
|
+
status(this: That, params?: T.ProfilingStatusRequest | TB.ProfilingStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ProfilingStatusResponse, unknown>>;
|
|
30
|
+
status(this: That, params?: T.ProfilingStatusRequest | TB.ProfilingStatusRequest, options?: TransportRequestOptions): Promise<T.ProfilingStatusResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Extracts a list of topN functions from Universal Profiling.
|
|
33
|
+
* @see {@link https://www.elastic.co/guide/en/observability/8.19/universal-profiling.html | Elasticsearch API documentation}
|
|
34
|
+
*/
|
|
35
|
+
topnFunctions(this: That, params: T.ProfilingTopnFunctionsRequest | TB.ProfilingTopnFunctionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ProfilingTopnFunctionsResponse>;
|
|
36
|
+
topnFunctions(this: That, params: T.ProfilingTopnFunctionsRequest | TB.ProfilingTopnFunctionsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ProfilingTopnFunctionsResponse, unknown>>;
|
|
37
|
+
topnFunctions(this: That, params: T.ProfilingTopnFunctionsRequest | TB.ProfilingTopnFunctionsRequest, options?: TransportRequestOptions): Promise<T.ProfilingTopnFunctionsResponse>;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,135 @@
|
|
|
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 Profiling {
|
|
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 flamegraph(params, options) {
|
|
32
|
+
var _a;
|
|
33
|
+
const acceptedPath = [];
|
|
34
|
+
const acceptedBody = ['conditions'];
|
|
35
|
+
const querystring = {};
|
|
36
|
+
// @ts-expect-error
|
|
37
|
+
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
38
|
+
for (const key in params) {
|
|
39
|
+
if (acceptedBody.includes(key)) {
|
|
40
|
+
// @ts-expect-error
|
|
41
|
+
body = params[key];
|
|
42
|
+
}
|
|
43
|
+
else if (acceptedPath.includes(key)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
else if (key !== 'body') {
|
|
47
|
+
// @ts-expect-error
|
|
48
|
+
querystring[key] = params[key];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const method = 'POST';
|
|
52
|
+
const path = '/_profiling/flamegraph';
|
|
53
|
+
const meta = {
|
|
54
|
+
name: 'profiling.flamegraph'
|
|
55
|
+
};
|
|
56
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
57
|
+
}
|
|
58
|
+
async stacktraces(params, options) {
|
|
59
|
+
var _a;
|
|
60
|
+
const acceptedPath = [];
|
|
61
|
+
const acceptedBody = ['conditions'];
|
|
62
|
+
const querystring = {};
|
|
63
|
+
// @ts-expect-error
|
|
64
|
+
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
65
|
+
for (const key in params) {
|
|
66
|
+
if (acceptedBody.includes(key)) {
|
|
67
|
+
// @ts-expect-error
|
|
68
|
+
body = params[key];
|
|
69
|
+
}
|
|
70
|
+
else if (acceptedPath.includes(key)) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
else if (key !== 'body') {
|
|
74
|
+
// @ts-expect-error
|
|
75
|
+
querystring[key] = params[key];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const method = 'POST';
|
|
79
|
+
const path = '/_profiling/stacktraces';
|
|
80
|
+
const meta = {
|
|
81
|
+
name: 'profiling.stacktraces'
|
|
82
|
+
};
|
|
83
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
84
|
+
}
|
|
85
|
+
async status(params, options) {
|
|
86
|
+
const acceptedPath = [];
|
|
87
|
+
const querystring = {};
|
|
88
|
+
const body = undefined;
|
|
89
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
90
|
+
for (const key in params) {
|
|
91
|
+
if (acceptedPath.includes(key)) {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
else if (key !== 'body') {
|
|
95
|
+
// @ts-expect-error
|
|
96
|
+
querystring[key] = params[key];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const method = 'GET';
|
|
100
|
+
const path = '/_profiling/status';
|
|
101
|
+
const meta = {
|
|
102
|
+
name: 'profiling.status'
|
|
103
|
+
};
|
|
104
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
105
|
+
}
|
|
106
|
+
async topnFunctions(params, options) {
|
|
107
|
+
var _a;
|
|
108
|
+
const acceptedPath = [];
|
|
109
|
+
const acceptedBody = ['conditions'];
|
|
110
|
+
const querystring = {};
|
|
111
|
+
// @ts-expect-error
|
|
112
|
+
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
113
|
+
for (const key in params) {
|
|
114
|
+
if (acceptedBody.includes(key)) {
|
|
115
|
+
// @ts-expect-error
|
|
116
|
+
body = params[key];
|
|
117
|
+
}
|
|
118
|
+
else if (acceptedPath.includes(key)) {
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
else if (key !== 'body') {
|
|
122
|
+
// @ts-expect-error
|
|
123
|
+
querystring[key] = params[key];
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const method = 'POST';
|
|
127
|
+
const path = '/_profiling/topn/functions';
|
|
128
|
+
const meta = {
|
|
129
|
+
name: 'profiling.topn_functions'
|
|
130
|
+
};
|
|
131
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
exports.default = Profiling;
|
|
135
|
+
//# sourceMappingURL=profiling.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
|
+
* Create or update a script or search template. Creates or updates a stored script or search template.
|
|
9
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-stored-script-api.html | Elasticsearch API documentation}
|
|
10
|
+
*/
|
|
11
|
+
export default function PutScriptApi(this: That, params: T.PutScriptRequest | TB.PutScriptRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.PutScriptResponse>;
|
|
12
|
+
export default function PutScriptApi(this: That, params: T.PutScriptRequest | TB.PutScriptRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.PutScriptResponse, unknown>>;
|
|
13
|
+
export default function PutScriptApi(this: That, params: T.PutScriptRequest | TB.PutScriptRequest, options?: TransportRequestOptions): Promise<T.PutScriptResponse>;
|
|
14
|
+
export {};
|