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,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 cluster info. Get basic build, version, and cluster information. ::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.
|
|
9
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/rest-api-root.html | Elasticsearch API documentation}
|
|
10
|
+
*/
|
|
11
|
+
export default function InfoApi(this: That, params?: T.InfoRequest | TB.InfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InfoResponse>;
|
|
12
|
+
export default function InfoApi(this: That, params?: T.InfoRequest | TB.InfoRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InfoResponse, unknown>>;
|
|
13
|
+
export default function InfoApi(this: That, params?: T.InfoRequest | TB.InfoRequest, options?: TransportRequestOptions): Promise<T.InfoResponse>;
|
|
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 = InfoApi;
|
|
22
|
+
async function InfoApi(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 = 'GET';
|
|
37
|
+
const path = '/';
|
|
38
|
+
const meta = {
|
|
39
|
+
name: 'info'
|
|
40
|
+
};
|
|
41
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=info.js.map
|
|
@@ -0,0 +1,95 @@
|
|
|
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 Ingest {
|
|
8
|
+
transport: Transport;
|
|
9
|
+
constructor(transport: Transport);
|
|
10
|
+
/**
|
|
11
|
+
* Delete GeoIP database configurations. Delete one or more IP geolocation database configurations.
|
|
12
|
+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ingest-delete-geoip-database | Elasticsearch API documentation}
|
|
13
|
+
*/
|
|
14
|
+
deleteGeoipDatabase(this: That, params: T.IngestDeleteGeoipDatabaseRequest | TB.IngestDeleteGeoipDatabaseRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestDeleteGeoipDatabaseResponse>;
|
|
15
|
+
deleteGeoipDatabase(this: That, params: T.IngestDeleteGeoipDatabaseRequest | TB.IngestDeleteGeoipDatabaseRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestDeleteGeoipDatabaseResponse, unknown>>;
|
|
16
|
+
deleteGeoipDatabase(this: That, params: T.IngestDeleteGeoipDatabaseRequest | TB.IngestDeleteGeoipDatabaseRequest, options?: TransportRequestOptions): Promise<T.IngestDeleteGeoipDatabaseResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Delete IP geolocation database configurations.
|
|
19
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-ip-location-database-api.html | Elasticsearch API documentation}
|
|
20
|
+
*/
|
|
21
|
+
deleteIpLocationDatabase(this: That, params: T.IngestDeleteIpLocationDatabaseRequest | TB.IngestDeleteIpLocationDatabaseRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestDeleteIpLocationDatabaseResponse>;
|
|
22
|
+
deleteIpLocationDatabase(this: That, params: T.IngestDeleteIpLocationDatabaseRequest | TB.IngestDeleteIpLocationDatabaseRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestDeleteIpLocationDatabaseResponse, unknown>>;
|
|
23
|
+
deleteIpLocationDatabase(this: That, params: T.IngestDeleteIpLocationDatabaseRequest | TB.IngestDeleteIpLocationDatabaseRequest, options?: TransportRequestOptions): Promise<T.IngestDeleteIpLocationDatabaseResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Delete pipelines. Delete one or more ingest pipelines.
|
|
26
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-pipeline-api.html | Elasticsearch API documentation}
|
|
27
|
+
*/
|
|
28
|
+
deletePipeline(this: That, params: T.IngestDeletePipelineRequest | TB.IngestDeletePipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestDeletePipelineResponse>;
|
|
29
|
+
deletePipeline(this: That, params: T.IngestDeletePipelineRequest | TB.IngestDeletePipelineRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestDeletePipelineResponse, unknown>>;
|
|
30
|
+
deletePipeline(this: That, params: T.IngestDeletePipelineRequest | TB.IngestDeletePipelineRequest, options?: TransportRequestOptions): Promise<T.IngestDeletePipelineResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Get GeoIP statistics. Get download statistics for GeoIP2 databases that are used with the GeoIP processor.
|
|
33
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/geoip-processor.html | Elasticsearch API documentation}
|
|
34
|
+
*/
|
|
35
|
+
geoIpStats(this: That, params?: T.IngestGeoIpStatsRequest | TB.IngestGeoIpStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestGeoIpStatsResponse>;
|
|
36
|
+
geoIpStats(this: That, params?: T.IngestGeoIpStatsRequest | TB.IngestGeoIpStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestGeoIpStatsResponse, unknown>>;
|
|
37
|
+
geoIpStats(this: That, params?: T.IngestGeoIpStatsRequest | TB.IngestGeoIpStatsRequest, options?: TransportRequestOptions): Promise<T.IngestGeoIpStatsResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Get GeoIP database configurations. Get information about one or more IP geolocation database configurations.
|
|
40
|
+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ingest-get-geoip-database | Elasticsearch API documentation}
|
|
41
|
+
*/
|
|
42
|
+
getGeoipDatabase(this: That, params?: T.IngestGetGeoipDatabaseRequest | TB.IngestGetGeoipDatabaseRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestGetGeoipDatabaseResponse>;
|
|
43
|
+
getGeoipDatabase(this: That, params?: T.IngestGetGeoipDatabaseRequest | TB.IngestGetGeoipDatabaseRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestGetGeoipDatabaseResponse, unknown>>;
|
|
44
|
+
getGeoipDatabase(this: That, params?: T.IngestGetGeoipDatabaseRequest | TB.IngestGetGeoipDatabaseRequest, options?: TransportRequestOptions): Promise<T.IngestGetGeoipDatabaseResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* Get IP geolocation database configurations.
|
|
47
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-ip-location-database-api.html | Elasticsearch API documentation}
|
|
48
|
+
*/
|
|
49
|
+
getIpLocationDatabase(this: That, params?: T.IngestGetIpLocationDatabaseRequest | TB.IngestGetIpLocationDatabaseRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestGetIpLocationDatabaseResponse>;
|
|
50
|
+
getIpLocationDatabase(this: That, params?: T.IngestGetIpLocationDatabaseRequest | TB.IngestGetIpLocationDatabaseRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestGetIpLocationDatabaseResponse, unknown>>;
|
|
51
|
+
getIpLocationDatabase(this: That, params?: T.IngestGetIpLocationDatabaseRequest | TB.IngestGetIpLocationDatabaseRequest, options?: TransportRequestOptions): Promise<T.IngestGetIpLocationDatabaseResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Get pipelines. Get information about one or more ingest pipelines. This API returns a local reference of the pipeline.
|
|
54
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-pipeline-api.html | Elasticsearch API documentation}
|
|
55
|
+
*/
|
|
56
|
+
getPipeline(this: That, params?: T.IngestGetPipelineRequest | TB.IngestGetPipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestGetPipelineResponse>;
|
|
57
|
+
getPipeline(this: That, params?: T.IngestGetPipelineRequest | TB.IngestGetPipelineRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestGetPipelineResponse, unknown>>;
|
|
58
|
+
getPipeline(this: That, params?: T.IngestGetPipelineRequest | TB.IngestGetPipelineRequest, options?: TransportRequestOptions): Promise<T.IngestGetPipelineResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Run a grok processor. Extract structured fields out of a single text field within a document. You must choose which field to extract matched fields from, as well as the grok pattern you expect will match. A grok pattern is like a regular expression that supports aliased expressions that can be reused.
|
|
61
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/grok-processor.html | Elasticsearch API documentation}
|
|
62
|
+
*/
|
|
63
|
+
processorGrok(this: That, params?: T.IngestProcessorGrokRequest | TB.IngestProcessorGrokRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestProcessorGrokResponse>;
|
|
64
|
+
processorGrok(this: That, params?: T.IngestProcessorGrokRequest | TB.IngestProcessorGrokRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestProcessorGrokResponse, unknown>>;
|
|
65
|
+
processorGrok(this: That, params?: T.IngestProcessorGrokRequest | TB.IngestProcessorGrokRequest, options?: TransportRequestOptions): Promise<T.IngestProcessorGrokResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* Create or update a GeoIP database configuration. Refer to the create or update IP geolocation database configuration API.
|
|
68
|
+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ingest-put-geoip-database | Elasticsearch API documentation}
|
|
69
|
+
*/
|
|
70
|
+
putGeoipDatabase(this: That, params: T.IngestPutGeoipDatabaseRequest | TB.IngestPutGeoipDatabaseRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestPutGeoipDatabaseResponse>;
|
|
71
|
+
putGeoipDatabase(this: That, params: T.IngestPutGeoipDatabaseRequest | TB.IngestPutGeoipDatabaseRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestPutGeoipDatabaseResponse, unknown>>;
|
|
72
|
+
putGeoipDatabase(this: That, params: T.IngestPutGeoipDatabaseRequest | TB.IngestPutGeoipDatabaseRequest, options?: TransportRequestOptions): Promise<T.IngestPutGeoipDatabaseResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* Create or update an IP geolocation database configuration.
|
|
75
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-ip-location-database-api.html | Elasticsearch API documentation}
|
|
76
|
+
*/
|
|
77
|
+
putIpLocationDatabase(this: That, params: T.IngestPutIpLocationDatabaseRequest | TB.IngestPutIpLocationDatabaseRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestPutIpLocationDatabaseResponse>;
|
|
78
|
+
putIpLocationDatabase(this: That, params: T.IngestPutIpLocationDatabaseRequest | TB.IngestPutIpLocationDatabaseRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestPutIpLocationDatabaseResponse, unknown>>;
|
|
79
|
+
putIpLocationDatabase(this: That, params: T.IngestPutIpLocationDatabaseRequest | TB.IngestPutIpLocationDatabaseRequest, options?: TransportRequestOptions): Promise<T.IngestPutIpLocationDatabaseResponse>;
|
|
80
|
+
/**
|
|
81
|
+
* Create or update a pipeline. Changes made using this API take effect immediately.
|
|
82
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ingest.html | Elasticsearch API documentation}
|
|
83
|
+
*/
|
|
84
|
+
putPipeline(this: That, params: T.IngestPutPipelineRequest | TB.IngestPutPipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestPutPipelineResponse>;
|
|
85
|
+
putPipeline(this: That, params: T.IngestPutPipelineRequest | TB.IngestPutPipelineRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestPutPipelineResponse, unknown>>;
|
|
86
|
+
putPipeline(this: That, params: T.IngestPutPipelineRequest | TB.IngestPutPipelineRequest, options?: TransportRequestOptions): Promise<T.IngestPutPipelineResponse>;
|
|
87
|
+
/**
|
|
88
|
+
* Simulate a pipeline. Run an ingest pipeline against a set of provided documents. You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.
|
|
89
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/simulate-pipeline-api.html | Elasticsearch API documentation}
|
|
90
|
+
*/
|
|
91
|
+
simulate(this: That, params: T.IngestSimulateRequest | TB.IngestSimulateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestSimulateResponse>;
|
|
92
|
+
simulate(this: That, params: T.IngestSimulateRequest | TB.IngestSimulateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestSimulateResponse, unknown>>;
|
|
93
|
+
simulate(this: That, params: T.IngestSimulateRequest | TB.IngestSimulateRequest, options?: TransportRequestOptions): Promise<T.IngestSimulateResponse>;
|
|
94
|
+
}
|
|
95
|
+
export {};
|
|
@@ -0,0 +1,389 @@
|
|
|
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 Ingest {
|
|
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 deleteGeoipDatabase(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 = `/_ingest/geoip/database/${encodeURIComponent(params.id.toString())}`;
|
|
46
|
+
const meta = {
|
|
47
|
+
name: 'ingest.delete_geoip_database',
|
|
48
|
+
pathParts: {
|
|
49
|
+
id: params.id
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
53
|
+
}
|
|
54
|
+
async deleteIpLocationDatabase(params, options) {
|
|
55
|
+
const acceptedPath = ['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 = `/_ingest/ip_location/database/${encodeURIComponent(params.id.toString())}`;
|
|
69
|
+
const meta = {
|
|
70
|
+
name: 'ingest.delete_ip_location_database',
|
|
71
|
+
pathParts: {
|
|
72
|
+
id: params.id
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
76
|
+
}
|
|
77
|
+
async deletePipeline(params, options) {
|
|
78
|
+
const acceptedPath = ['id'];
|
|
79
|
+
const querystring = {};
|
|
80
|
+
const body = undefined;
|
|
81
|
+
for (const key in params) {
|
|
82
|
+
if (acceptedPath.includes(key)) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
else if (key !== 'body') {
|
|
86
|
+
// @ts-expect-error
|
|
87
|
+
querystring[key] = params[key];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const method = 'DELETE';
|
|
91
|
+
const path = `/_ingest/pipeline/${encodeURIComponent(params.id.toString())}`;
|
|
92
|
+
const meta = {
|
|
93
|
+
name: 'ingest.delete_pipeline',
|
|
94
|
+
pathParts: {
|
|
95
|
+
id: params.id
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
99
|
+
}
|
|
100
|
+
async geoIpStats(params, options) {
|
|
101
|
+
const acceptedPath = [];
|
|
102
|
+
const querystring = {};
|
|
103
|
+
const body = undefined;
|
|
104
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
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 = '/_ingest/geoip/stats';
|
|
116
|
+
const meta = {
|
|
117
|
+
name: 'ingest.geo_ip_stats'
|
|
118
|
+
};
|
|
119
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
120
|
+
}
|
|
121
|
+
async getGeoipDatabase(params, options) {
|
|
122
|
+
const acceptedPath = ['id'];
|
|
123
|
+
const querystring = {};
|
|
124
|
+
const body = undefined;
|
|
125
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
126
|
+
for (const key in params) {
|
|
127
|
+
if (acceptedPath.includes(key)) {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
else if (key !== 'body') {
|
|
131
|
+
// @ts-expect-error
|
|
132
|
+
querystring[key] = params[key];
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
let method = '';
|
|
136
|
+
let path = '';
|
|
137
|
+
if (params.id != null) {
|
|
138
|
+
method = 'GET';
|
|
139
|
+
path = `/_ingest/geoip/database/${encodeURIComponent(params.id.toString())}`;
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
method = 'GET';
|
|
143
|
+
path = '/_ingest/geoip/database';
|
|
144
|
+
}
|
|
145
|
+
const meta = {
|
|
146
|
+
name: 'ingest.get_geoip_database',
|
|
147
|
+
pathParts: {
|
|
148
|
+
id: params.id
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
152
|
+
}
|
|
153
|
+
async getIpLocationDatabase(params, options) {
|
|
154
|
+
const acceptedPath = ['id'];
|
|
155
|
+
const querystring = {};
|
|
156
|
+
const body = undefined;
|
|
157
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
158
|
+
for (const key in params) {
|
|
159
|
+
if (acceptedPath.includes(key)) {
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
else if (key !== 'body') {
|
|
163
|
+
// @ts-expect-error
|
|
164
|
+
querystring[key] = params[key];
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
let method = '';
|
|
168
|
+
let path = '';
|
|
169
|
+
if (params.id != null) {
|
|
170
|
+
method = 'GET';
|
|
171
|
+
path = `/_ingest/ip_location/database/${encodeURIComponent(params.id.toString())}`;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
method = 'GET';
|
|
175
|
+
path = '/_ingest/ip_location/database';
|
|
176
|
+
}
|
|
177
|
+
const meta = {
|
|
178
|
+
name: 'ingest.get_ip_location_database',
|
|
179
|
+
pathParts: {
|
|
180
|
+
id: params.id
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
184
|
+
}
|
|
185
|
+
async getPipeline(params, options) {
|
|
186
|
+
const acceptedPath = ['id'];
|
|
187
|
+
const querystring = {};
|
|
188
|
+
const body = undefined;
|
|
189
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
190
|
+
for (const key in params) {
|
|
191
|
+
if (acceptedPath.includes(key)) {
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
else if (key !== 'body') {
|
|
195
|
+
// @ts-expect-error
|
|
196
|
+
querystring[key] = params[key];
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
let method = '';
|
|
200
|
+
let path = '';
|
|
201
|
+
if (params.id != null) {
|
|
202
|
+
method = 'GET';
|
|
203
|
+
path = `/_ingest/pipeline/${encodeURIComponent(params.id.toString())}`;
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
method = 'GET';
|
|
207
|
+
path = '/_ingest/pipeline';
|
|
208
|
+
}
|
|
209
|
+
const meta = {
|
|
210
|
+
name: 'ingest.get_pipeline',
|
|
211
|
+
pathParts: {
|
|
212
|
+
id: params.id
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
216
|
+
}
|
|
217
|
+
async processorGrok(params, options) {
|
|
218
|
+
const acceptedPath = [];
|
|
219
|
+
const querystring = {};
|
|
220
|
+
const body = undefined;
|
|
221
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
222
|
+
for (const key in params) {
|
|
223
|
+
if (acceptedPath.includes(key)) {
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
else if (key !== 'body') {
|
|
227
|
+
// @ts-expect-error
|
|
228
|
+
querystring[key] = params[key];
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
const method = 'GET';
|
|
232
|
+
const path = '/_ingest/processor/grok';
|
|
233
|
+
const meta = {
|
|
234
|
+
name: 'ingest.processor_grok'
|
|
235
|
+
};
|
|
236
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
237
|
+
}
|
|
238
|
+
async putGeoipDatabase(params, options) {
|
|
239
|
+
const acceptedPath = ['id'];
|
|
240
|
+
const acceptedBody = ['name', 'maxmind'];
|
|
241
|
+
const querystring = {};
|
|
242
|
+
// @ts-expect-error
|
|
243
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
244
|
+
let body;
|
|
245
|
+
if (typeof userBody === 'string') {
|
|
246
|
+
body = userBody;
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
250
|
+
}
|
|
251
|
+
for (const key in params) {
|
|
252
|
+
if (acceptedBody.includes(key)) {
|
|
253
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
254
|
+
// @ts-expect-error
|
|
255
|
+
body[key] = params[key];
|
|
256
|
+
}
|
|
257
|
+
else if (acceptedPath.includes(key)) {
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
else if (key !== 'body') {
|
|
261
|
+
// @ts-expect-error
|
|
262
|
+
querystring[key] = params[key];
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
const method = 'PUT';
|
|
266
|
+
const path = `/_ingest/geoip/database/${encodeURIComponent(params.id.toString())}`;
|
|
267
|
+
const meta = {
|
|
268
|
+
name: 'ingest.put_geoip_database',
|
|
269
|
+
pathParts: {
|
|
270
|
+
id: params.id
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
274
|
+
}
|
|
275
|
+
async putIpLocationDatabase(params, options) {
|
|
276
|
+
var _a;
|
|
277
|
+
const acceptedPath = ['id'];
|
|
278
|
+
const acceptedBody = ['configuration'];
|
|
279
|
+
const querystring = {};
|
|
280
|
+
// @ts-expect-error
|
|
281
|
+
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
282
|
+
for (const key in params) {
|
|
283
|
+
if (acceptedBody.includes(key)) {
|
|
284
|
+
// @ts-expect-error
|
|
285
|
+
body = params[key];
|
|
286
|
+
}
|
|
287
|
+
else if (acceptedPath.includes(key)) {
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
else if (key !== 'body') {
|
|
291
|
+
// @ts-expect-error
|
|
292
|
+
querystring[key] = params[key];
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
const method = 'PUT';
|
|
296
|
+
const path = `/_ingest/ip_location/database/${encodeURIComponent(params.id.toString())}`;
|
|
297
|
+
const meta = {
|
|
298
|
+
name: 'ingest.put_ip_location_database',
|
|
299
|
+
pathParts: {
|
|
300
|
+
id: params.id
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
304
|
+
}
|
|
305
|
+
async putPipeline(params, options) {
|
|
306
|
+
const acceptedPath = ['id'];
|
|
307
|
+
const acceptedBody = ['_meta', 'description', 'on_failure', 'processors', 'version', 'deprecated'];
|
|
308
|
+
const querystring = {};
|
|
309
|
+
// @ts-expect-error
|
|
310
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
311
|
+
let body;
|
|
312
|
+
if (typeof userBody === 'string') {
|
|
313
|
+
body = userBody;
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
317
|
+
}
|
|
318
|
+
for (const key in params) {
|
|
319
|
+
if (acceptedBody.includes(key)) {
|
|
320
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
321
|
+
// @ts-expect-error
|
|
322
|
+
body[key] = params[key];
|
|
323
|
+
}
|
|
324
|
+
else if (acceptedPath.includes(key)) {
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
else if (key !== 'body') {
|
|
328
|
+
// @ts-expect-error
|
|
329
|
+
querystring[key] = params[key];
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
const method = 'PUT';
|
|
333
|
+
const path = `/_ingest/pipeline/${encodeURIComponent(params.id.toString())}`;
|
|
334
|
+
const meta = {
|
|
335
|
+
name: 'ingest.put_pipeline',
|
|
336
|
+
pathParts: {
|
|
337
|
+
id: params.id
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
341
|
+
}
|
|
342
|
+
async simulate(params, options) {
|
|
343
|
+
const acceptedPath = ['id'];
|
|
344
|
+
const acceptedBody = ['docs', 'pipeline'];
|
|
345
|
+
const querystring = {};
|
|
346
|
+
// @ts-expect-error
|
|
347
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
348
|
+
let body;
|
|
349
|
+
if (typeof userBody === 'string') {
|
|
350
|
+
body = userBody;
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
354
|
+
}
|
|
355
|
+
for (const key in params) {
|
|
356
|
+
if (acceptedBody.includes(key)) {
|
|
357
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
358
|
+
// @ts-expect-error
|
|
359
|
+
body[key] = params[key];
|
|
360
|
+
}
|
|
361
|
+
else if (acceptedPath.includes(key)) {
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
else if (key !== 'body') {
|
|
365
|
+
// @ts-expect-error
|
|
366
|
+
querystring[key] = params[key];
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
let method = '';
|
|
370
|
+
let path = '';
|
|
371
|
+
if (params.id != null) {
|
|
372
|
+
method = body != null ? 'POST' : 'GET';
|
|
373
|
+
path = `/_ingest/pipeline/${encodeURIComponent(params.id.toString())}/_simulate`;
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
method = body != null ? 'POST' : 'GET';
|
|
377
|
+
path = '/_ingest/pipeline/_simulate';
|
|
378
|
+
}
|
|
379
|
+
const meta = {
|
|
380
|
+
name: 'ingest.simulate',
|
|
381
|
+
pathParts: {
|
|
382
|
+
id: params.id
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
exports.default = Ingest;
|
|
389
|
+
//# sourceMappingURL=ingest.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
|
+
* Run a knn search. NOTE: The kNN search API has been replaced by the `knn` option in the search API. Perform a k-nearest neighbor (kNN) search on a dense_vector field and return the matching documents. Given a query vector, the API finds the k closest vectors and returns those documents as search hits. Elasticsearch uses the HNSW algorithm to support efficient kNN search. Like most kNN algorithms, HNSW is an approximate method that sacrifices result accuracy for improved search speed. This means the results returned are not always the true k closest neighbors. The kNN search API supports restricting the search using a filter. The search will return the top k documents that also match the filter query. A kNN search response has the exact same structure as a search API response. However, certain sections have a meaning specific to kNN search: * The document `_score` is determined by the similarity between the query and document vector. * The `hits.total` object contains the total number of nearest neighbor candidates considered, which is `num_candidates * num_shards`. The `hits.total.relation` will always be `eq`, indicating an exact value.
|
|
9
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/knn-search-api.html | Elasticsearch API documentation}
|
|
10
|
+
*/
|
|
11
|
+
export default function KnnSearchApi<TDocument = unknown>(this: That, params: T.KnnSearchRequest | TB.KnnSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.KnnSearchResponse<TDocument>>;
|
|
12
|
+
export default function KnnSearchApi<TDocument = unknown>(this: That, params: T.KnnSearchRequest | TB.KnnSearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.KnnSearchResponse<TDocument>, unknown>>;
|
|
13
|
+
export default function KnnSearchApi<TDocument = unknown>(this: That, params: T.KnnSearchRequest | TB.KnnSearchRequest, options?: TransportRequestOptions): Promise<T.KnnSearchResponse<TDocument>>;
|
|
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 = KnnSearchApi;
|
|
22
|
+
async function KnnSearchApi(params, options) {
|
|
23
|
+
const acceptedPath = ['index'];
|
|
24
|
+
const acceptedBody = ['_source', 'docvalue_fields', 'stored_fields', 'fields', 'filter', 'knn'];
|
|
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())}/_knn_search`;
|
|
51
|
+
const meta = {
|
|
52
|
+
name: 'knn_search',
|
|
53
|
+
pathParts: {
|
|
54
|
+
index: params.index
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=knn_search.js.map
|