plugin-elastic-report 0.0.0-stage → 0.1.1
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 +32 -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/index.js +10 -0
- package/dist/client-v2/851.488fdbf5bc5b6a36.js +10 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/externalVersion.js +20 -0
- package/dist/index.js +48 -0
- package/dist/locale/en-US.json +99 -0
- package/dist/locale/vi-VN.json +99 -0
- package/dist/locale/zh-CN.json +99 -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 +107 -0
- package/dist/server/collections/es-report-data-views.js +79 -0
- package/dist/server/collections/es-reports.js +95 -0
- package/dist/server/index.js +58 -0
- package/dist/server/mcp/ElasticReportMcpServer.js +344 -0
- package/dist/server/mcp/ElasticReportToolCatalog.js +417 -0
- package/dist/server/plugin.js +395 -0
- package/dist/server/services/ElasticReportService.js +263 -0
- package/dist/server/services/ElasticsearchConnectionService.js +332 -0
- package/dist/server/services/ReportQueryCompiler.js +858 -0
- package/dist/shared/constants.js +81 -0
- package/dist/shared/types.js +24 -0
- package/package.json +61 -4
- package/server.d.ts +2 -0
- package/server.js +1 -0
- package/src/client/index.tsx +19 -0
- package/src/client-v2/__tests__/elastic-report.test.tsx +311 -0
- package/src/client-v2/api.ts +224 -0
- package/src/client-v2/components/ElasticBasicCharts.tsx +399 -0
- package/src/client-v2/components/ElasticReportBlock.tsx +160 -0
- package/src/client-v2/components/ElasticReportRenderer.tsx +707 -0
- package/src/client-v2/components/HighlightText.tsx +50 -0
- package/src/client-v2/components/ReportSelect.tsx +72 -0
- package/src/client-v2/index.tsx +14 -0
- package/src/client-v2/locale.ts +23 -0
- package/src/client-v2/models/ElasticReportBlockModel.tsx +85 -0
- package/src/client-v2/pages/ElasticReportManager.tsx +1047 -0
- package/src/client-v2/plugin.tsx +52 -0
- package/src/index.ts +11 -0
- package/src/locale/en-US.json +99 -0
- package/src/locale/vi-VN.json +99 -0
- package/src/locale/zh-CN.json +99 -0
- package/src/server/__tests__/query-compiler.test.ts +231 -0
- package/src/server/__tests__/report-mcp-acl.integration.test.ts +377 -0
- package/src/server/acl-guard.ts +103 -0
- package/src/server/collections/es-report-data-views.ts +58 -0
- package/src/server/collections/es-reports.ts +74 -0
- package/src/server/index.ts +15 -0
- package/src/server/mcp/ElasticReportMcpServer.ts +391 -0
- package/src/server/mcp/ElasticReportToolCatalog.ts +417 -0
- package/src/server/plugin.ts +431 -0
- package/src/server/services/ElasticReportService.ts +326 -0
- package/src/server/services/ElasticsearchConnectionService.ts +401 -0
- package/src/server/services/ReportQueryCompiler.ts +1017 -0
- package/src/shared/constants.ts +29 -0
- package/src/shared/types.ts +175 -0
- package/README.md +0 -3
|
@@ -0,0 +1,223 @@
|
|
|
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 Synonyms {
|
|
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 deleteSynonym(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 = `/_synonyms/${encodeURIComponent(params.id.toString())}`;
|
|
46
|
+
const meta = {
|
|
47
|
+
name: 'synonyms.delete_synonym',
|
|
48
|
+
pathParts: {
|
|
49
|
+
id: params.id
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
53
|
+
}
|
|
54
|
+
async deleteSynonymRule(params, options) {
|
|
55
|
+
const acceptedPath = ['set_id', 'rule_id'];
|
|
56
|
+
const querystring = {};
|
|
57
|
+
const body = undefined;
|
|
58
|
+
for (const key in params) {
|
|
59
|
+
if (acceptedPath.includes(key)) {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
else if (key !== 'body') {
|
|
63
|
+
// @ts-expect-error
|
|
64
|
+
querystring[key] = params[key];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const method = 'DELETE';
|
|
68
|
+
const path = `/_synonyms/${encodeURIComponent(params.set_id.toString())}/${encodeURIComponent(params.rule_id.toString())}`;
|
|
69
|
+
const meta = {
|
|
70
|
+
name: 'synonyms.delete_synonym_rule',
|
|
71
|
+
pathParts: {
|
|
72
|
+
set_id: params.set_id,
|
|
73
|
+
rule_id: params.rule_id
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
77
|
+
}
|
|
78
|
+
async getSynonym(params, options) {
|
|
79
|
+
const acceptedPath = ['id'];
|
|
80
|
+
const querystring = {};
|
|
81
|
+
const body = undefined;
|
|
82
|
+
for (const key in params) {
|
|
83
|
+
if (acceptedPath.includes(key)) {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
else if (key !== 'body') {
|
|
87
|
+
// @ts-expect-error
|
|
88
|
+
querystring[key] = params[key];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const method = 'GET';
|
|
92
|
+
const path = `/_synonyms/${encodeURIComponent(params.id.toString())}`;
|
|
93
|
+
const meta = {
|
|
94
|
+
name: 'synonyms.get_synonym',
|
|
95
|
+
pathParts: {
|
|
96
|
+
id: params.id
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
100
|
+
}
|
|
101
|
+
async getSynonymRule(params, options) {
|
|
102
|
+
const acceptedPath = ['set_id', 'rule_id'];
|
|
103
|
+
const querystring = {};
|
|
104
|
+
const body = undefined;
|
|
105
|
+
for (const key in params) {
|
|
106
|
+
if (acceptedPath.includes(key)) {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
else if (key !== 'body') {
|
|
110
|
+
// @ts-expect-error
|
|
111
|
+
querystring[key] = params[key];
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const method = 'GET';
|
|
115
|
+
const path = `/_synonyms/${encodeURIComponent(params.set_id.toString())}/${encodeURIComponent(params.rule_id.toString())}`;
|
|
116
|
+
const meta = {
|
|
117
|
+
name: 'synonyms.get_synonym_rule',
|
|
118
|
+
pathParts: {
|
|
119
|
+
set_id: params.set_id,
|
|
120
|
+
rule_id: params.rule_id
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
124
|
+
}
|
|
125
|
+
async getSynonymsSets(params, options) {
|
|
126
|
+
const acceptedPath = [];
|
|
127
|
+
const querystring = {};
|
|
128
|
+
const body = undefined;
|
|
129
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
130
|
+
for (const key in params) {
|
|
131
|
+
if (acceptedPath.includes(key)) {
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
else if (key !== 'body') {
|
|
135
|
+
// @ts-expect-error
|
|
136
|
+
querystring[key] = params[key];
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
const method = 'GET';
|
|
140
|
+
const path = '/_synonyms';
|
|
141
|
+
const meta = {
|
|
142
|
+
name: 'synonyms.get_synonyms_sets'
|
|
143
|
+
};
|
|
144
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
145
|
+
}
|
|
146
|
+
async putSynonym(params, options) {
|
|
147
|
+
const acceptedPath = ['id'];
|
|
148
|
+
const acceptedBody = ['synonyms_set'];
|
|
149
|
+
const querystring = {};
|
|
150
|
+
// @ts-expect-error
|
|
151
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
152
|
+
let body;
|
|
153
|
+
if (typeof userBody === 'string') {
|
|
154
|
+
body = userBody;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
158
|
+
}
|
|
159
|
+
for (const key in params) {
|
|
160
|
+
if (acceptedBody.includes(key)) {
|
|
161
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
162
|
+
// @ts-expect-error
|
|
163
|
+
body[key] = params[key];
|
|
164
|
+
}
|
|
165
|
+
else if (acceptedPath.includes(key)) {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
else if (key !== 'body') {
|
|
169
|
+
// @ts-expect-error
|
|
170
|
+
querystring[key] = params[key];
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const method = 'PUT';
|
|
174
|
+
const path = `/_synonyms/${encodeURIComponent(params.id.toString())}`;
|
|
175
|
+
const meta = {
|
|
176
|
+
name: 'synonyms.put_synonym',
|
|
177
|
+
pathParts: {
|
|
178
|
+
id: params.id
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
182
|
+
}
|
|
183
|
+
async putSynonymRule(params, options) {
|
|
184
|
+
const acceptedPath = ['set_id', 'rule_id'];
|
|
185
|
+
const acceptedBody = ['synonyms'];
|
|
186
|
+
const querystring = {};
|
|
187
|
+
// @ts-expect-error
|
|
188
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
189
|
+
let body;
|
|
190
|
+
if (typeof userBody === 'string') {
|
|
191
|
+
body = userBody;
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
195
|
+
}
|
|
196
|
+
for (const key in params) {
|
|
197
|
+
if (acceptedBody.includes(key)) {
|
|
198
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
199
|
+
// @ts-expect-error
|
|
200
|
+
body[key] = params[key];
|
|
201
|
+
}
|
|
202
|
+
else if (acceptedPath.includes(key)) {
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
else if (key !== 'body') {
|
|
206
|
+
// @ts-expect-error
|
|
207
|
+
querystring[key] = params[key];
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
const method = 'PUT';
|
|
211
|
+
const path = `/_synonyms/${encodeURIComponent(params.set_id.toString())}/${encodeURIComponent(params.rule_id.toString())}`;
|
|
212
|
+
const meta = {
|
|
213
|
+
name: 'synonyms.put_synonym_rule',
|
|
214
|
+
pathParts: {
|
|
215
|
+
set_id: params.set_id,
|
|
216
|
+
rule_id: params.rule_id
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
exports.default = Synonyms;
|
|
223
|
+
//# sourceMappingURL=synonyms.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 Tasks {
|
|
8
|
+
transport: Transport;
|
|
9
|
+
constructor(transport: Transport);
|
|
10
|
+
/**
|
|
11
|
+
* Cancel a task. WARNING: The task management API is new and should still be considered a beta feature. The API may change in ways that are not backwards compatible. A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. The get task information API will continue to list these cancelled tasks until they complete. The cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible. To troubleshoot why a cancelled task does not complete promptly, use the get task information API with the `?detailed` parameter to identify the other tasks the system is running. You can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.
|
|
12
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/tasks.html | Elasticsearch API documentation}
|
|
13
|
+
*/
|
|
14
|
+
cancel(this: That, params?: T.TasksCancelRequest | TB.TasksCancelRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TasksCancelResponse>;
|
|
15
|
+
cancel(this: That, params?: T.TasksCancelRequest | TB.TasksCancelRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TasksCancelResponse, unknown>>;
|
|
16
|
+
cancel(this: That, params?: T.TasksCancelRequest | TB.TasksCancelRequest, options?: TransportRequestOptions): Promise<T.TasksCancelResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Get task information. Get information about a task currently running in the cluster. WARNING: The task management API is new and should still be considered a beta feature. The API may change in ways that are not backwards compatible. If the task identifier is not found, a 404 response code indicates that there are no resources that match the request.
|
|
19
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/tasks.html | Elasticsearch API documentation}
|
|
20
|
+
*/
|
|
21
|
+
get(this: That, params: T.TasksGetRequest | TB.TasksGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TasksGetResponse>;
|
|
22
|
+
get(this: That, params: T.TasksGetRequest | TB.TasksGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TasksGetResponse, unknown>>;
|
|
23
|
+
get(this: That, params: T.TasksGetRequest | TB.TasksGetRequest, options?: TransportRequestOptions): Promise<T.TasksGetResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Get all tasks. Get information about the tasks currently running on one or more nodes in the cluster. WARNING: The task management API is new and should still be considered a beta feature. The API may change in ways that are not backwards compatible. **Identifying running tasks** The `X-Opaque-Id header`, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. This enables you to track certain calls or associate certain tasks with the client that started them. For example: ``` curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" ``` The API returns the following result: ``` HTTP/1.1 200 OK X-Opaque-Id: 123456 content-type: application/json; charset=UTF-8 content-length: 831 { "tasks" : { "u5lcZHqcQhu-rUoFaqDphA:45" : { "node" : "u5lcZHqcQhu-rUoFaqDphA", "id" : 45, "type" : "transport", "action" : "cluster:monitor/tasks/lists", "start_time_in_millis" : 1513823752749, "running_time_in_nanos" : 293139, "cancellable" : false, "headers" : { "X-Opaque-Id" : "123456" }, "children" : [ { "node" : "u5lcZHqcQhu-rUoFaqDphA", "id" : 46, "type" : "direct", "action" : "cluster:monitor/tasks/lists[n]", "start_time_in_millis" : 1513823752750, "running_time_in_nanos" : 92133, "cancellable" : false, "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", "headers" : { "X-Opaque-Id" : "123456" } } ] } } } ``` In this example, `X-Opaque-Id: 123456` is the ID as a part of the response header. The `X-Opaque-Id` in the task `headers` is the ID for the task that was initiated by the REST request. The `X-Opaque-Id` in the children `headers` is the child task of the task that was initiated by the REST request.
|
|
26
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/tasks.html | Elasticsearch API documentation}
|
|
27
|
+
*/
|
|
28
|
+
list(this: That, params?: T.TasksListRequest | TB.TasksListRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TasksListResponse>;
|
|
29
|
+
list(this: That, params?: T.TasksListRequest | TB.TasksListRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TasksListResponse, unknown>>;
|
|
30
|
+
list(this: That, params?: T.TasksListRequest | TB.TasksListRequest, options?: TransportRequestOptions): Promise<T.TasksListResponse>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,109 @@
|
|
|
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 Tasks {
|
|
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 cancel(params, options) {
|
|
32
|
+
const acceptedPath = ['task_id'];
|
|
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.task_id != null) {
|
|
48
|
+
method = 'POST';
|
|
49
|
+
path = `/_tasks/${encodeURIComponent(params.task_id.toString())}/_cancel`;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
method = 'POST';
|
|
53
|
+
path = '/_tasks/_cancel';
|
|
54
|
+
}
|
|
55
|
+
const meta = {
|
|
56
|
+
name: 'tasks.cancel',
|
|
57
|
+
pathParts: {
|
|
58
|
+
task_id: params.task_id
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
62
|
+
}
|
|
63
|
+
async get(params, options) {
|
|
64
|
+
const acceptedPath = ['task_id'];
|
|
65
|
+
const querystring = {};
|
|
66
|
+
const body = undefined;
|
|
67
|
+
for (const key in params) {
|
|
68
|
+
if (acceptedPath.includes(key)) {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
else if (key !== 'body') {
|
|
72
|
+
// @ts-expect-error
|
|
73
|
+
querystring[key] = params[key];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const method = 'GET';
|
|
77
|
+
const path = `/_tasks/${encodeURIComponent(params.task_id.toString())}`;
|
|
78
|
+
const meta = {
|
|
79
|
+
name: 'tasks.get',
|
|
80
|
+
pathParts: {
|
|
81
|
+
task_id: params.task_id
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
85
|
+
}
|
|
86
|
+
async list(params, options) {
|
|
87
|
+
const acceptedPath = [];
|
|
88
|
+
const querystring = {};
|
|
89
|
+
const body = undefined;
|
|
90
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
91
|
+
for (const key in params) {
|
|
92
|
+
if (acceptedPath.includes(key)) {
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
else if (key !== 'body') {
|
|
96
|
+
// @ts-expect-error
|
|
97
|
+
querystring[key] = params[key];
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const method = 'GET';
|
|
101
|
+
const path = '/_tasks';
|
|
102
|
+
const meta = {
|
|
103
|
+
name: 'tasks.list'
|
|
104
|
+
};
|
|
105
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.default = Tasks;
|
|
109
|
+
//# sourceMappingURL=tasks.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 terms in an index. Discover terms that match a partial string in an index. This API is designed for low-latency look-ups used in auto-complete scenarios. > info > The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.
|
|
9
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/search-terms-enum.html | Elasticsearch API documentation}
|
|
10
|
+
*/
|
|
11
|
+
export default function TermsEnumApi(this: That, params: T.TermsEnumRequest | TB.TermsEnumRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TermsEnumResponse>;
|
|
12
|
+
export default function TermsEnumApi(this: That, params: T.TermsEnumRequest | TB.TermsEnumRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TermsEnumResponse, unknown>>;
|
|
13
|
+
export default function TermsEnumApi(this: That, params: T.TermsEnumRequest | TB.TermsEnumRequest, options?: TransportRequestOptions): Promise<T.TermsEnumResponse>;
|
|
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 = TermsEnumApi;
|
|
22
|
+
async function TermsEnumApi(params, options) {
|
|
23
|
+
const acceptedPath = ['index'];
|
|
24
|
+
const acceptedBody = ['field', 'size', 'timeout', 'case_insensitive', 'index_filter', 'string', 'search_after'];
|
|
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 = body != null ? 'POST' : 'GET';
|
|
50
|
+
const path = `/${encodeURIComponent(params.index.toString())}/_terms_enum`;
|
|
51
|
+
const meta = {
|
|
52
|
+
name: 'terms_enum',
|
|
53
|
+
pathParts: {
|
|
54
|
+
index: params.index
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=terms_enum.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 term vector information. Get information and statistics about terms in the fields of a particular document. You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request. You can specify the fields you are interested in through the `fields` parameter or by adding the fields to the request body. For example: ``` GET /my-index-000001/_termvectors/1?fields=message ``` Fields can be specified using wildcards, similar to the multi match query. Term vectors are real-time by default, not near real-time. This can be changed by setting `realtime` parameter to `false`. You can request three types of values: _term information_, _term statistics_, and _field statistics_. By default, all term information and field statistics are returned for all fields but term statistics are excluded. **Term information** * term frequency in the field (always returned) * term positions (`positions: true`) * start and end offsets (`offsets: true`) * term payloads (`payloads: true`), as base64 encoded bytes If the requested information wasn't stored in the index, it will be computed on the fly if possible. Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user. > warn > Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16. **Behaviour** The term and field statistics are not accurate. Deleted documents are not taken into account. The information is only retrieved for the shard the requested document resides in. The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context. By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected. Use `routing` only to hit a particular shard.
|
|
9
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/docs-termvectors.html | Elasticsearch API documentation}
|
|
10
|
+
*/
|
|
11
|
+
export default function TermvectorsApi<TDocument = unknown>(this: That, params: T.TermvectorsRequest<TDocument> | TB.TermvectorsRequest<TDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.TermvectorsResponse>;
|
|
12
|
+
export default function TermvectorsApi<TDocument = unknown>(this: That, params: T.TermvectorsRequest<TDocument> | TB.TermvectorsRequest<TDocument>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TermvectorsResponse, unknown>>;
|
|
13
|
+
export default function TermvectorsApi<TDocument = unknown>(this: That, params: T.TermvectorsRequest<TDocument> | TB.TermvectorsRequest<TDocument>, options?: TransportRequestOptions): Promise<T.TermvectorsResponse>;
|
|
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 = TermvectorsApi;
|
|
22
|
+
async function TermvectorsApi(params, options) {
|
|
23
|
+
const acceptedPath = ['index', 'id'];
|
|
24
|
+
const acceptedBody = ['doc', 'filter', 'per_field_analyzer', 'fields', 'field_statistics', 'offsets', 'payloads', 'positions', 'term_statistics', 'routing', 'version', 'version_type'];
|
|
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
|
+
let method = '';
|
|
50
|
+
let path = '';
|
|
51
|
+
if (params.index != null && params.id != null) {
|
|
52
|
+
method = body != null ? 'POST' : 'GET';
|
|
53
|
+
path = `/${encodeURIComponent(params.index.toString())}/_termvectors/${encodeURIComponent(params.id.toString())}`;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
method = body != null ? 'POST' : 'GET';
|
|
57
|
+
path = `/${encodeURIComponent(params.index.toString())}/_termvectors`;
|
|
58
|
+
}
|
|
59
|
+
const meta = {
|
|
60
|
+
name: 'termvectors',
|
|
61
|
+
pathParts: {
|
|
62
|
+
index: params.index,
|
|
63
|
+
id: params.id
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=termvectors.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 TextStructure {
|
|
8
|
+
transport: Transport;
|
|
9
|
+
constructor(transport: Transport);
|
|
10
|
+
/**
|
|
11
|
+
* Find the structure of a text field. Find the structure of a text field in an Elasticsearch index. This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch. For example, if you have ingested data into a very simple index that has just `@timestamp` and message fields, you can use this API to see what common structure exists in the message field. The response from the API contains: * Sample messages. * Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. * Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. * Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. All this information can be calculated by the structure finder with no guidance. However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. If the structure finder produces unexpected results, specify the `explain` query parameter and an explanation will appear in the response. It helps determine why the returned structure was chosen.
|
|
12
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/find-field-structure.html | Elasticsearch API documentation}
|
|
13
|
+
*/
|
|
14
|
+
findFieldStructure(this: That, params: T.TextStructureFindFieldStructureRequest | TB.TextStructureFindFieldStructureRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TextStructureFindFieldStructureResponse>;
|
|
15
|
+
findFieldStructure(this: That, params: T.TextStructureFindFieldStructureRequest | TB.TextStructureFindFieldStructureRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TextStructureFindFieldStructureResponse, unknown>>;
|
|
16
|
+
findFieldStructure(this: That, params: T.TextStructureFindFieldStructureRequest | TB.TextStructureFindFieldStructureRequest, options?: TransportRequestOptions): Promise<T.TextStructureFindFieldStructureResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Find the structure of text messages. Find the structure of a list of text messages. The messages must contain data that is suitable to be ingested into Elasticsearch. This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process. The response from the API contains: * Sample messages. * Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. * Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. All this information can be calculated by the structure finder with no guidance. However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters. If the structure finder produces unexpected results, specify the `explain` query parameter and an explanation will appear in the response. It helps determine why the returned structure was chosen.
|
|
19
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/find-message-structure.html | Elasticsearch API documentation}
|
|
20
|
+
*/
|
|
21
|
+
findMessageStructure(this: That, params: T.TextStructureFindMessageStructureRequest | TB.TextStructureFindMessageStructureRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TextStructureFindMessageStructureResponse>;
|
|
22
|
+
findMessageStructure(this: That, params: T.TextStructureFindMessageStructureRequest | TB.TextStructureFindMessageStructureRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TextStructureFindMessageStructureResponse, unknown>>;
|
|
23
|
+
findMessageStructure(this: That, params: T.TextStructureFindMessageStructureRequest | TB.TextStructureFindMessageStructureRequest, options?: TransportRequestOptions): Promise<T.TextStructureFindMessageStructureResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Find the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch. This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality. Unlike other Elasticsearch endpoints, the data that is posted to this endpoint does not need to be UTF-8 encoded and in JSON format. It must, however, be text; binary text formats are not currently supported. The size is limited to the Elasticsearch HTTP receive buffer size, which defaults to 100 Mb. The response from the API contains: * A couple of messages from the beginning of the text. * Statistics that reveal the most common values for all fields detected within the text and basic numeric statistics for numeric fields. * Information about the structure of the text, which is useful when you write ingest configurations to index it or similarly formatted text. * Appropriate mappings for an Elasticsearch index, which you could use to ingest the text. All this information can be calculated by the structure finder with no guidance. However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters.
|
|
26
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/find-structure.html | Elasticsearch API documentation}
|
|
27
|
+
*/
|
|
28
|
+
findStructure<TJsonDocument = unknown>(this: That, params: T.TextStructureFindStructureRequest<TJsonDocument> | TB.TextStructureFindStructureRequest<TJsonDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.TextStructureFindStructureResponse>;
|
|
29
|
+
findStructure<TJsonDocument = unknown>(this: That, params: T.TextStructureFindStructureRequest<TJsonDocument> | TB.TextStructureFindStructureRequest<TJsonDocument>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TextStructureFindStructureResponse, unknown>>;
|
|
30
|
+
findStructure<TJsonDocument = unknown>(this: That, params: T.TextStructureFindStructureRequest<TJsonDocument> | TB.TextStructureFindStructureRequest<TJsonDocument>, options?: TransportRequestOptions): Promise<T.TextStructureFindStructureResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Test a Grok pattern. Test a Grok pattern on one or more lines of text. The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings.
|
|
33
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/test-grok-pattern.html | Elasticsearch API documentation}
|
|
34
|
+
*/
|
|
35
|
+
testGrokPattern(this: That, params: T.TextStructureTestGrokPatternRequest | TB.TextStructureTestGrokPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TextStructureTestGrokPatternResponse>;
|
|
36
|
+
testGrokPattern(this: That, params: T.TextStructureTestGrokPatternRequest | TB.TextStructureTestGrokPatternRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TextStructureTestGrokPatternResponse, unknown>>;
|
|
37
|
+
testGrokPattern(this: That, params: T.TextStructureTestGrokPatternRequest | TB.TextStructureTestGrokPatternRequest, options?: TransportRequestOptions): Promise<T.TextStructureTestGrokPatternResponse>;
|
|
38
|
+
}
|
|
39
|
+
export {};
|