@retter/elasticsearch 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +5 -0
- package/CHANGELOG.md +3 -0
- package/LICENSE +202 -0
- package/NOTICE.txt +2 -0
- package/README.md +186 -0
- package/codecov.yml +14 -0
- package/index.d.ts +27 -0
- package/index.js +55 -0
- package/lib/api/api/async_search.d.ts +23 -0
- package/lib/api/api/async_search.js +131 -0
- package/lib/api/api/async_search.js.map +1 -0
- package/lib/api/api/autoscaling.d.ts +23 -0
- package/lib/api/api/autoscaling.js +109 -0
- package/lib/api/api/autoscaling.js.map +1 -0
- package/lib/api/api/bulk.d.ts +10 -0
- package/lib/api/api/bulk.js +54 -0
- package/lib/api/api/bulk.js.map +1 -0
- package/lib/api/api/cat.d.ts +89 -0
- package/lib/api/api/cat.js +637 -0
- package/lib/api/api/cat.js.map +1 -0
- package/lib/api/api/ccr.d.ts +50 -0
- package/lib/api/api/ccr.js +320 -0
- package/lib/api/api/ccr.js.map +1 -0
- package/lib/api/api/clear_scroll.d.ts +10 -0
- package/lib/api/api/clear_scroll.js +54 -0
- package/lib/api/api/clear_scroll.js.map +1 -0
- package/lib/api/api/close_point_in_time.d.ts +10 -0
- package/lib/api/api/close_point_in_time.js +53 -0
- package/lib/api/api/close_point_in_time.js.map +1 -0
- package/lib/api/api/cluster.d.ts +56 -0
- package/lib/api/api/cluster.js +392 -0
- package/lib/api/api/cluster.js.map +1 -0
- package/lib/api/api/count.d.ts +10 -0
- package/lib/api/api/count.js +62 -0
- package/lib/api/api/count.js.map +1 -0
- package/lib/api/api/create.d.ts +10 -0
- package/lib/api/api/create.js +46 -0
- package/lib/api/api/create.js.map +1 -0
- package/lib/api/api/dangling_indices.d.ts +20 -0
- package/lib/api/api/dangling_indices.js +85 -0
- package/lib/api/api/dangling_indices.js.map +1 -0
- package/lib/api/api/delete.d.ts +10 -0
- package/lib/api/api/delete.js +39 -0
- package/lib/api/api/delete.js.map +1 -0
- package/lib/api/api/delete_by_query.d.ts +10 -0
- package/lib/api/api/delete_by_query.js +53 -0
- package/lib/api/api/delete_by_query.js.map +1 -0
- package/lib/api/api/delete_by_query_rethrottle.d.ts +10 -0
- package/lib/api/api/delete_by_query_rethrottle.js +39 -0
- package/lib/api/api/delete_by_query_rethrottle.js.map +1 -0
- package/lib/api/api/delete_script.d.ts +10 -0
- package/lib/api/api/delete_script.js +39 -0
- package/lib/api/api/delete_script.js.map +1 -0
- package/lib/api/api/enrich.d.ts +26 -0
- package/lib/api/api/enrich.js +142 -0
- package/lib/api/api/enrich.js.map +1 -0
- package/lib/api/api/eql.d.ts +23 -0
- package/lib/api/api/eql.js +115 -0
- package/lib/api/api/eql.js.map +1 -0
- package/lib/api/api/exists.d.ts +10 -0
- package/lib/api/api/exists.js +39 -0
- package/lib/api/api/exists.js.map +1 -0
- package/lib/api/api/exists_source.d.ts +10 -0
- package/lib/api/api/exists_source.js +39 -0
- package/lib/api/api/exists_source.js.map +1 -0
- package/lib/api/api/explain.d.ts +10 -0
- package/lib/api/api/explain.js +53 -0
- package/lib/api/api/explain.js.map +1 -0
- package/lib/api/api/features.d.ts +17 -0
- package/lib/api/api/features.js +69 -0
- package/lib/api/api/features.js.map +1 -0
- package/lib/api/api/field_caps.d.ts +10 -0
- package/lib/api/api/field_caps.js +61 -0
- package/lib/api/api/field_caps.js.map +1 -0
- package/lib/api/api/fleet.d.ts +20 -0
- package/lib/api/api/fleet.js +113 -0
- package/lib/api/api/fleet.js.map +1 -0
- package/lib/api/api/get.d.ts +10 -0
- package/lib/api/api/get.js +39 -0
- package/lib/api/api/get.js.map +1 -0
- package/lib/api/api/get_script.d.ts +10 -0
- package/lib/api/api/get_script.js +39 -0
- package/lib/api/api/get_script.js.map +1 -0
- package/lib/api/api/get_script_context.d.ts +10 -0
- package/lib/api/api/get_script_context.js +40 -0
- package/lib/api/api/get_script_context.js.map +1 -0
- package/lib/api/api/get_script_languages.d.ts +10 -0
- package/lib/api/api/get_script_languages.js +40 -0
- package/lib/api/api/get_script_languages.js.map +1 -0
- package/lib/api/api/get_source.d.ts +10 -0
- package/lib/api/api/get_source.js +39 -0
- package/lib/api/api/get_source.js.map +1 -0
- package/lib/api/api/graph.d.ts +14 -0
- package/lib/api/api/graph.js +64 -0
- package/lib/api/api/graph.js.map +1 -0
- package/lib/api/api/ilm.d.ts +44 -0
- package/lib/api/api/ilm.js +275 -0
- package/lib/api/api/ilm.js.map +1 -0
- package/lib/api/api/index.d.ts +10 -0
- package/lib/api/api/index.js +54 -0
- package/lib/api/api/index.js.map +1 -0
- package/lib/api/api/indices.d.ts +170 -0
- package/lib/api/api/indices.js +1378 -0
- package/lib/api/api/indices.js.map +1 -0
- package/lib/api/api/info.d.ts +10 -0
- package/lib/api/api/info.js +40 -0
- package/lib/api/api/info.js.map +1 -0
- package/lib/api/api/ingest.d.ts +29 -0
- package/lib/api/api/ingest.js +183 -0
- package/lib/api/api/ingest.js.map +1 -0
- package/lib/api/api/knn_search.d.ts +10 -0
- package/lib/api/api/knn_search.js +53 -0
- package/lib/api/api/knn_search.js.map +1 -0
- package/lib/api/api/license.d.ts +32 -0
- package/lib/api/api/license.js +172 -0
- package/lib/api/api/license.js.map +1 -0
- package/lib/api/api/logstash.d.ts +20 -0
- package/lib/api/api/logstash.js +91 -0
- package/lib/api/api/logstash.js.map +1 -0
- package/lib/api/api/mget.d.ts +10 -0
- package/lib/api/api/mget.js +62 -0
- package/lib/api/api/mget.js.map +1 -0
- package/lib/api/api/migration.d.ts +20 -0
- package/lib/api/api/migration.js +95 -0
- package/lib/api/api/migration.js.map +1 -0
- package/lib/api/api/ml.d.ts +224 -0
- package/lib/api/api/ml.js +1929 -0
- package/lib/api/api/ml.js.map +1 -0
- package/lib/api/api/monitoring.d.ts +14 -0
- package/lib/api/api/monitoring.js +57 -0
- package/lib/api/api/monitoring.js.map +1 -0
- package/lib/api/api/msearch.d.ts +10 -0
- package/lib/api/api/msearch.js +54 -0
- package/lib/api/api/msearch.js.map +1 -0
- package/lib/api/api/msearch_template.d.ts +10 -0
- package/lib/api/api/msearch_template.js +54 -0
- package/lib/api/api/msearch_template.js.map +1 -0
- package/lib/api/api/mtermvectors.d.ts +10 -0
- package/lib/api/api/mtermvectors.js +62 -0
- package/lib/api/api/mtermvectors.js.map +1 -0
- package/lib/api/api/nodes.d.ts +32 -0
- package/lib/api/api/nodes.js +243 -0
- package/lib/api/api/nodes.js.map +1 -0
- package/lib/api/api/open_point_in_time.d.ts +10 -0
- package/lib/api/api/open_point_in_time.js +39 -0
- package/lib/api/api/open_point_in_time.js.map +1 -0
- package/lib/api/api/ping.d.ts +10 -0
- package/lib/api/api/ping.js +40 -0
- package/lib/api/api/ping.js.map +1 -0
- package/lib/api/api/put_script.d.ts +10 -0
- package/lib/api/api/put_script.js +61 -0
- package/lib/api/api/put_script.js.map +1 -0
- package/lib/api/api/rank_eval.d.ts +10 -0
- package/lib/api/api/rank_eval.js +61 -0
- package/lib/api/api/rank_eval.js.map +1 -0
- package/lib/api/api/reindex.d.ts +10 -0
- package/lib/api/api/reindex.js +53 -0
- package/lib/api/api/reindex.js.map +1 -0
- package/lib/api/api/reindex_rethrottle.d.ts +10 -0
- package/lib/api/api/reindex_rethrottle.js +39 -0
- package/lib/api/api/reindex_rethrottle.js.map +1 -0
- package/lib/api/api/render_search_template.d.ts +10 -0
- package/lib/api/api/render_search_template.js +62 -0
- package/lib/api/api/render_search_template.js.map +1 -0
- package/lib/api/api/rollup.d.ts +38 -0
- package/lib/api/api/rollup.js +239 -0
- package/lib/api/api/rollup.js.map +1 -0
- package/lib/api/api/scripts_painless_execute.d.ts +10 -0
- package/lib/api/api/scripts_painless_execute.js +54 -0
- package/lib/api/api/scripts_painless_execute.js.map +1 -0
- package/lib/api/api/scroll.d.ts +10 -0
- package/lib/api/api/scroll.js +53 -0
- package/lib/api/api/scroll.js.map +1 -0
- package/lib/api/api/search.d.ts +10 -0
- package/lib/api/api/search.js +69 -0
- package/lib/api/api/search.js.map +1 -0
- package/lib/api/api/search_mvt.d.ts +10 -0
- package/lib/api/api/search_mvt.js +53 -0
- package/lib/api/api/search_mvt.js.map +1 -0
- package/lib/api/api/search_shards.d.ts +10 -0
- package/lib/api/api/search_shards.js +48 -0
- package/lib/api/api/search_shards.js.map +1 -0
- package/lib/api/api/search_template.d.ts +10 -0
- package/lib/api/api/search_template.js +62 -0
- package/lib/api/api/search_template.js.map +1 -0
- package/lib/api/api/searchable_snapshots.d.ts +23 -0
- package/lib/api/api/searchable_snapshots.js +142 -0
- package/lib/api/api/searchable_snapshots.js.map +1 -0
- package/lib/api/api/security.d.ts +173 -0
- package/lib/api/api/security.js +1344 -0
- package/lib/api/api/security.js.map +1 -0
- package/lib/api/api/shutdown.d.ts +20 -0
- package/lib/api/api/shutdown.js +107 -0
- package/lib/api/api/shutdown.js.map +1 -0
- package/lib/api/api/slm.d.ts +38 -0
- package/lib/api/api/slm.js +214 -0
- package/lib/api/api/slm.js.map +1 -0
- package/lib/api/api/snapshot.d.ts +47 -0
- package/lib/api/api/snapshot.js +315 -0
- package/lib/api/api/snapshot.js.map +1 -0
- package/lib/api/api/sql.d.ts +29 -0
- package/lib/api/api/sql.js +178 -0
- package/lib/api/api/sql.js.map +1 -0
- package/lib/api/api/ssl.d.ts +14 -0
- package/lib/api/api/ssl.js +51 -0
- package/lib/api/api/ssl.js.map +1 -0
- package/lib/api/api/tasks.d.ts +20 -0
- package/lib/api/api/tasks.js +94 -0
- package/lib/api/api/tasks.js.map +1 -0
- package/lib/api/api/terms_enum.d.ts +10 -0
- package/lib/api/api/terms_enum.js +53 -0
- package/lib/api/api/terms_enum.js.map +1 -0
- package/lib/api/api/termvectors.d.ts +10 -0
- package/lib/api/api/termvectors.js +61 -0
- package/lib/api/api/termvectors.js.map +1 -0
- package/lib/api/api/text_structure.d.ts +14 -0
- package/lib/api/api/text_structure.js +57 -0
- package/lib/api/api/text_structure.js.map +1 -0
- package/lib/api/api/transform.d.ts +41 -0
- package/lib/api/api/transform.js +264 -0
- package/lib/api/api/transform.js.map +1 -0
- package/lib/api/api/update.d.ts +10 -0
- package/lib/api/api/update.js +53 -0
- package/lib/api/api/update.js.map +1 -0
- package/lib/api/api/update_by_query.d.ts +10 -0
- package/lib/api/api/update_by_query.js +53 -0
- package/lib/api/api/update_by_query.js.map +1 -0
- package/lib/api/api/update_by_query_rethrottle.d.ts +10 -0
- package/lib/api/api/update_by_query_rethrottle.js +39 -0
- package/lib/api/api/update_by_query_rethrottle.js.map +1 -0
- package/lib/api/api/watcher.d.ts +44 -0
- package/lib/api/api/watcher.js +291 -0
- package/lib/api/api/watcher.js.map +1 -0
- package/lib/api/api/xpack.d.ts +17 -0
- package/lib/api/api/xpack.js +69 -0
- package/lib/api/api/xpack.js.map +1 -0
- package/lib/api/index.d.ts +225 -0
- package/lib/api/index.js +520 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/types.d.ts +15306 -0
- package/lib/api/types.js +21 -0
- package/lib/api/types.js.map +1 -0
- package/lib/api/typesWithBodyKey.d.ts +15718 -0
- package/lib/api/typesWithBodyKey.js +21 -0
- package/lib/api/typesWithBodyKey.js.map +1 -0
- package/lib/client.d.ts +70 -0
- package/lib/client.js +287 -0
- package/lib/client.js.map +1 -0
- package/lib/helpers.d.ts +149 -0
- package/lib/helpers.js +776 -0
- package/lib/helpers.js.map +1 -0
- package/lib/sniffingTransport.d.ts +4 -0
- package/lib/sniffingTransport.js +56 -0
- package/lib/sniffingTransport.js.map +1 -0
- package/package.json +93 -0
- package/tsconfig.json +37 -0
|
@@ -0,0 +1,10 @@
|
|
|
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 function ExistsSourceApi(this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ExistsSourceResponse>;
|
|
8
|
+
export default function ExistsSourceApi(this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ExistsSourceResponse, unknown>>;
|
|
9
|
+
export default function ExistsSourceApi(this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptions): Promise<T.ExistsSourceResponse>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
async function ExistsSourceApi(params, options) {
|
|
22
|
+
const acceptedPath = ['id', 'index'];
|
|
23
|
+
const querystring = {};
|
|
24
|
+
const body = undefined;
|
|
25
|
+
for (const key in params) {
|
|
26
|
+
if (acceptedPath.includes(key)) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
else if (key !== 'body') {
|
|
30
|
+
// @ts-expect-error
|
|
31
|
+
querystring[key] = params[key];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const method = 'HEAD';
|
|
35
|
+
const path = `/${encodeURIComponent(params.index.toString())}/_source/${encodeURIComponent(params.id.toString())}`;
|
|
36
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
37
|
+
}
|
|
38
|
+
exports.default = ExistsSourceApi;
|
|
39
|
+
//# sourceMappingURL=exists_source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exists_source.js","sourceRoot":"","sources":["../../../src/api/api/exists_source.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAyBY,KAAK,UAAU,eAAe,CAAc,MAAsD,EAAE,OAAiC;IAClJ,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,SAAQ;SACT;aAAM,IAAI,GAAG,KAAK,MAAM,EAAE;YACzB,mBAAmB;YACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SAC/B;KACF;IAED,MAAM,MAAM,GAAG,MAAM,CAAA;IACrB,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,YAAY,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IAClH,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAjBD,kCAiBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 function ExplainApi<TDocument = unknown>(this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ExplainResponse<TDocument>>;
|
|
8
|
+
export default function ExplainApi<TDocument = unknown>(this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ExplainResponse<TDocument>, unknown>>;
|
|
9
|
+
export default function ExplainApi<TDocument = unknown>(this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptions): Promise<T.ExplainResponse<TDocument>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
async function ExplainApi(params, options) {
|
|
22
|
+
const acceptedPath = ['id', 'index'];
|
|
23
|
+
const acceptedBody = ['query'];
|
|
24
|
+
const querystring = {};
|
|
25
|
+
// @ts-expect-error
|
|
26
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
27
|
+
let body;
|
|
28
|
+
if (typeof userBody === 'string') {
|
|
29
|
+
body = userBody;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
33
|
+
}
|
|
34
|
+
for (const key in params) {
|
|
35
|
+
if (acceptedBody.includes(key)) {
|
|
36
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
37
|
+
// @ts-expect-error
|
|
38
|
+
body[key] = params[key];
|
|
39
|
+
}
|
|
40
|
+
else if (acceptedPath.includes(key)) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
else if (key !== 'body') {
|
|
44
|
+
// @ts-expect-error
|
|
45
|
+
querystring[key] = params[key];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const method = body != null ? 'POST' : 'GET';
|
|
49
|
+
const path = `/${encodeURIComponent(params.index.toString())}/_explain/${encodeURIComponent(params.id.toString())}`;
|
|
50
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
51
|
+
}
|
|
52
|
+
exports.default = ExplainApi;
|
|
53
|
+
//# sourceMappingURL=explain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explain.js","sourceRoot":"","sources":["../../../src/api/api/explain.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAyBY,KAAK,UAAU,UAAU,CAAmC,MAA4C,EAAE,OAAiC;IACxJ,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,YAAY,GAAa,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,mBAAmB;IACnB,MAAM,QAAQ,GAAQ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAA;IAClC,IAAI,IAAkC,CAAA;IACtC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,IAAI,GAAG,QAAQ,CAAA;KAChB;SAAM;QACL,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;KACtD;IAED,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,IAAI,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAA;YACjB,mBAAmB;YACnB,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SACxB;aAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACrC,SAAQ;SACT;aAAM,IAAI,GAAG,KAAK,MAAM,EAAE;YACzB,mBAAmB;YACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SAC/B;KACF;IAED,MAAM,MAAM,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;IAC5C,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,aAAa,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IACnH,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AA7BD,6BA6BC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 Features {
|
|
8
|
+
transport: Transport;
|
|
9
|
+
constructor(transport: Transport);
|
|
10
|
+
getFeatures(this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FeaturesGetFeaturesResponse>;
|
|
11
|
+
getFeatures(this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FeaturesGetFeaturesResponse, unknown>>;
|
|
12
|
+
getFeatures(this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptions): Promise<T.FeaturesGetFeaturesResponse>;
|
|
13
|
+
resetFeatures(this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FeaturesResetFeaturesResponse>;
|
|
14
|
+
resetFeatures(this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FeaturesResetFeaturesResponse, unknown>>;
|
|
15
|
+
resetFeatures(this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptions): Promise<T.FeaturesResetFeaturesResponse>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
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 Features {
|
|
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 getFeatures(params, options) {
|
|
32
|
+
const acceptedPath = [];
|
|
33
|
+
const querystring = {};
|
|
34
|
+
const body = undefined;
|
|
35
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
36
|
+
for (const key in params) {
|
|
37
|
+
if (acceptedPath.includes(key)) {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
else if (key !== 'body') {
|
|
41
|
+
// @ts-expect-error
|
|
42
|
+
querystring[key] = params[key];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const method = 'GET';
|
|
46
|
+
const path = '/_features';
|
|
47
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
48
|
+
}
|
|
49
|
+
async resetFeatures(params, options) {
|
|
50
|
+
const acceptedPath = [];
|
|
51
|
+
const querystring = {};
|
|
52
|
+
const body = undefined;
|
|
53
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
54
|
+
for (const key in params) {
|
|
55
|
+
if (acceptedPath.includes(key)) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
else if (key !== 'body') {
|
|
59
|
+
// @ts-expect-error
|
|
60
|
+
querystring[key] = params[key];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const method = 'POST';
|
|
64
|
+
const path = '/_features/_reset';
|
|
65
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.default = Features;
|
|
69
|
+
//# sourceMappingURL=features.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features.js","sourceRoot":"","sources":["../../../src/api/api/features.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,QAAQ;IAE3B,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAKD,KAAK,CAAC,WAAW,CAAc,MAAqE,EAAE,OAAiC;QACrI,MAAM,YAAY,GAAa,EAAE,CAAA;QACjC,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;QAEtB,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAA;QACrB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,SAAQ;aACT;iBAAM,IAAI,GAAG,KAAK,MAAM,EAAE;gBACzB,mBAAmB;gBACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;aAC/B;SACF;QAED,MAAM,MAAM,GAAG,KAAK,CAAA;QACpB,MAAM,IAAI,GAAG,YAAY,CAAA;QACzB,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;IAKD,KAAK,CAAC,aAAa,CAAc,MAAyE,EAAE,OAAiC;QAC3I,MAAM,YAAY,GAAa,EAAE,CAAA;QACjC,MAAM,WAAW,GAAwB,EAAE,CAAA;QAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;QAEtB,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAA;QACrB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC9B,SAAQ;aACT;iBAAM,IAAI,GAAG,KAAK,MAAM,EAAE;gBACzB,mBAAmB;gBACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;aAC/B;SACF;QAED,MAAM,MAAM,GAAG,MAAM,CAAA;QACrB,MAAM,IAAI,GAAG,mBAAmB,CAAA;QAChC,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC;CACF;AAnDD,2BAmDC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 function FieldCapsApi(this: That, params: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FieldCapsResponse>;
|
|
8
|
+
export default function FieldCapsApi(this: That, params: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FieldCapsResponse, unknown>>;
|
|
9
|
+
export default function FieldCapsApi(this: That, params: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptions): Promise<T.FieldCapsResponse>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
async function FieldCapsApi(params, options) {
|
|
22
|
+
const acceptedPath = ['index'];
|
|
23
|
+
const acceptedBody = ['index_filter', 'runtime_mappings'];
|
|
24
|
+
const querystring = {};
|
|
25
|
+
// @ts-expect-error
|
|
26
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
27
|
+
let body;
|
|
28
|
+
if (typeof userBody === 'string') {
|
|
29
|
+
body = userBody;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
33
|
+
}
|
|
34
|
+
for (const key in params) {
|
|
35
|
+
if (acceptedBody.includes(key)) {
|
|
36
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
37
|
+
// @ts-expect-error
|
|
38
|
+
body[key] = params[key];
|
|
39
|
+
}
|
|
40
|
+
else if (acceptedPath.includes(key)) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
else if (key !== 'body') {
|
|
44
|
+
// @ts-expect-error
|
|
45
|
+
querystring[key] = params[key];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
let method = '';
|
|
49
|
+
let path = '';
|
|
50
|
+
if (params.index != null) {
|
|
51
|
+
method = body != null ? 'POST' : 'GET';
|
|
52
|
+
path = `/${encodeURIComponent(params.index.toString())}/_field_caps`;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
method = body != null ? 'POST' : 'GET';
|
|
56
|
+
path = '/_field_caps';
|
|
57
|
+
}
|
|
58
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
59
|
+
}
|
|
60
|
+
exports.default = FieldCapsApi;
|
|
61
|
+
//# sourceMappingURL=field_caps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field_caps.js","sourceRoot":"","sources":["../../../src/api/api/field_caps.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAyBY,KAAK,UAAU,YAAY,CAAc,MAAgD,EAAE,OAAiC;IACzI,MAAM,YAAY,GAAa,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,YAAY,GAAa,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAA;IACnE,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,mBAAmB;IACnB,MAAM,QAAQ,GAAQ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAA;IAClC,IAAI,IAAkC,CAAA;IACtC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,IAAI,GAAG,QAAQ,CAAA;KAChB;SAAM;QACL,IAAI,GAAG,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;KACtD;IAED,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,IAAI,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAA;YACjB,mBAAmB;YACnB,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SACxB;aAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACrC,SAAQ;SACT;aAAM,IAAI,GAAG,KAAK,MAAM,EAAE;YACzB,mBAAmB;YACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SAC/B;KACF;IAED,IAAI,MAAM,GAAG,EAAE,CAAA;IACf,IAAI,IAAI,GAAG,EAAE,CAAA;IACb,IAAI,MAAM,CAAC,KAAK,IAAI,IAAI,EAAE;QACxB,MAAM,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;QACtC,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,cAAc,CAAA;KACrE;SAAM;QACL,MAAM,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;QACtC,IAAI,GAAG,cAAc,CAAA;KACtB;IACD,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AApCD,+BAoCC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 Fleet {
|
|
8
|
+
transport: Transport;
|
|
9
|
+
constructor(transport: Transport);
|
|
10
|
+
globalCheckpoints(this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetGlobalCheckpointsResponse>;
|
|
11
|
+
globalCheckpoints(this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FleetGlobalCheckpointsResponse, unknown>>;
|
|
12
|
+
globalCheckpoints(this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptions): Promise<T.FleetGlobalCheckpointsResponse>;
|
|
13
|
+
msearch<TDocument = unknown>(this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetMsearchResponse<TDocument>>;
|
|
14
|
+
msearch<TDocument = unknown>(this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FleetMsearchResponse<TDocument>, unknown>>;
|
|
15
|
+
msearch<TDocument = unknown>(this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptions): Promise<T.FleetMsearchResponse<TDocument>>;
|
|
16
|
+
search<TDocument = unknown>(this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetSearchResponse<TDocument>>;
|
|
17
|
+
search<TDocument = unknown>(this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FleetSearchResponse<TDocument>, unknown>>;
|
|
18
|
+
search<TDocument = unknown>(this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptions): Promise<T.FleetSearchResponse<TDocument>>;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
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 Fleet {
|
|
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 globalCheckpoints(params, options) {
|
|
32
|
+
const acceptedPath = ['index'];
|
|
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 = 'GET';
|
|
45
|
+
const path = `/${encodeURIComponent(params.index.toString())}/_fleet/global_checkpoints`;
|
|
46
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
47
|
+
}
|
|
48
|
+
async msearch(params, options) {
|
|
49
|
+
var _a;
|
|
50
|
+
const acceptedPath = ['index'];
|
|
51
|
+
const acceptedBody = ['searches'];
|
|
52
|
+
const querystring = {};
|
|
53
|
+
// @ts-expect-error
|
|
54
|
+
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
55
|
+
for (const key in params) {
|
|
56
|
+
if (acceptedBody.includes(key)) {
|
|
57
|
+
// @ts-expect-error
|
|
58
|
+
body = params[key];
|
|
59
|
+
}
|
|
60
|
+
else if (acceptedPath.includes(key)) {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
else if (key !== 'body') {
|
|
64
|
+
// @ts-expect-error
|
|
65
|
+
querystring[key] = params[key];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
let method = '';
|
|
69
|
+
let path = '';
|
|
70
|
+
if (params.index != null) {
|
|
71
|
+
method = body != null ? 'POST' : 'GET';
|
|
72
|
+
path = `/${encodeURIComponent(params.index.toString())}/_fleet/_fleet_msearch`;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
method = body != null ? 'POST' : 'GET';
|
|
76
|
+
path = '/_fleet/_fleet_msearch';
|
|
77
|
+
}
|
|
78
|
+
return await this.transport.request({ path, method, querystring, bulkBody: body }, options);
|
|
79
|
+
}
|
|
80
|
+
async search(params, options) {
|
|
81
|
+
const acceptedPath = ['index'];
|
|
82
|
+
const acceptedBody = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'];
|
|
83
|
+
const querystring = {};
|
|
84
|
+
// @ts-expect-error
|
|
85
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
86
|
+
let body;
|
|
87
|
+
if (typeof userBody === 'string') {
|
|
88
|
+
body = userBody;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
body = userBody != null ? { ...userBody } : undefined;
|
|
92
|
+
}
|
|
93
|
+
for (const key in params) {
|
|
94
|
+
if (acceptedBody.includes(key)) {
|
|
95
|
+
body = body !== null && body !== void 0 ? body : {};
|
|
96
|
+
// @ts-expect-error
|
|
97
|
+
body[key] = params[key];
|
|
98
|
+
}
|
|
99
|
+
else if (acceptedPath.includes(key)) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
else if (key !== 'body') {
|
|
103
|
+
// @ts-expect-error
|
|
104
|
+
querystring[key] = params[key];
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
const method = body != null ? 'POST' : 'GET';
|
|
108
|
+
const path = `/${encodeURIComponent(params.index.toString())}/_fleet/_fleet_search`;
|
|
109
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
exports.default = Fleet;
|
|
113
|
+
//# sourceMappingURL=fleet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleet.js","sourceRoot":"","sources":["../../../src/api/api/fleet.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 function GetApi<TDocument = unknown>(this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetResponse<TDocument>>;
|
|
8
|
+
export default function GetApi<TDocument = unknown>(this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GetResponse<TDocument>, unknown>>;
|
|
9
|
+
export default function GetApi<TDocument = unknown>(this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptions): Promise<T.GetResponse<TDocument>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
async function GetApi(params, options) {
|
|
22
|
+
const acceptedPath = ['id', 'index'];
|
|
23
|
+
const querystring = {};
|
|
24
|
+
const body = undefined;
|
|
25
|
+
for (const key in params) {
|
|
26
|
+
if (acceptedPath.includes(key)) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
else if (key !== 'body') {
|
|
30
|
+
// @ts-expect-error
|
|
31
|
+
querystring[key] = params[key];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const method = 'GET';
|
|
35
|
+
const path = `/${encodeURIComponent(params.index.toString())}/_doc/${encodeURIComponent(params.id.toString())}`;
|
|
36
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
37
|
+
}
|
|
38
|
+
exports.default = GetApi;
|
|
39
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/api/api/get.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAyBY,KAAK,UAAU,MAAM,CAAmC,MAAoC,EAAE,OAAiC;IAC5I,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,SAAQ;SACT;aAAM,IAAI,GAAG,KAAK,MAAM,EAAE;YACzB,mBAAmB;YACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SAC/B;KACF;IAED,MAAM,MAAM,GAAG,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,SAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IAC/G,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAjBD,yBAiBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 function GetScriptApi(this: That, params: T.GetScriptRequest | TB.GetScriptRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetScriptResponse>;
|
|
8
|
+
export default function GetScriptApi(this: That, params: T.GetScriptRequest | TB.GetScriptRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GetScriptResponse, unknown>>;
|
|
9
|
+
export default function GetScriptApi(this: That, params: T.GetScriptRequest | TB.GetScriptRequest, options?: TransportRequestOptions): Promise<T.GetScriptResponse>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
async function GetScriptApi(params, options) {
|
|
22
|
+
const acceptedPath = ['id'];
|
|
23
|
+
const querystring = {};
|
|
24
|
+
const body = undefined;
|
|
25
|
+
for (const key in params) {
|
|
26
|
+
if (acceptedPath.includes(key)) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
else if (key !== 'body') {
|
|
30
|
+
// @ts-expect-error
|
|
31
|
+
querystring[key] = params[key];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const method = 'GET';
|
|
35
|
+
const path = `/_scripts/${encodeURIComponent(params.id.toString())}`;
|
|
36
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
37
|
+
}
|
|
38
|
+
exports.default = GetScriptApi;
|
|
39
|
+
//# sourceMappingURL=get_script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_script.js","sourceRoot":"","sources":["../../../src/api/api/get_script.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAyBY,KAAK,UAAU,YAAY,CAAc,MAAgD,EAAE,OAAiC;IACzI,MAAM,YAAY,GAAa,CAAC,IAAI,CAAC,CAAA;IACrC,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,SAAQ;SACT;aAAM,IAAI,GAAG,KAAK,MAAM,EAAE;YACzB,mBAAmB;YACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SAC/B;KACF;IAED,MAAM,MAAM,GAAG,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,aAAa,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IACpE,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAjBD,+BAiBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 function GetScriptContextApi(this: That, params?: T.GetScriptContextRequest | TB.GetScriptContextRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetScriptContextResponse>;
|
|
8
|
+
export default function GetScriptContextApi(this: That, params?: T.GetScriptContextRequest | TB.GetScriptContextRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GetScriptContextResponse, unknown>>;
|
|
9
|
+
export default function GetScriptContextApi(this: That, params?: T.GetScriptContextRequest | TB.GetScriptContextRequest, options?: TransportRequestOptions): Promise<T.GetScriptContextResponse>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
async function GetScriptContextApi(params, options) {
|
|
22
|
+
const acceptedPath = [];
|
|
23
|
+
const querystring = {};
|
|
24
|
+
const body = undefined;
|
|
25
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
26
|
+
for (const key in params) {
|
|
27
|
+
if (acceptedPath.includes(key)) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
else if (key !== 'body') {
|
|
31
|
+
// @ts-expect-error
|
|
32
|
+
querystring[key] = params[key];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const method = 'GET';
|
|
36
|
+
const path = '/_script_context';
|
|
37
|
+
return await this.transport.request({ path, method, querystring, body }, options);
|
|
38
|
+
}
|
|
39
|
+
exports.default = GetScriptContextApi;
|
|
40
|
+
//# sourceMappingURL=get_script_context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_script_context.js","sourceRoot":"","sources":["../../../src/api/api/get_script_context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAyBY,KAAK,UAAU,mBAAmB,CAAc,MAA+D,EAAE,OAAiC;IAC/J,MAAM,YAAY,GAAa,EAAE,CAAA;IACjC,MAAM,WAAW,GAAwB,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAA;IAEtB,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAA;IACrB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC9B,SAAQ;SACT;aAAM,IAAI,GAAG,KAAK,MAAM,EAAE;YACzB,mBAAmB;YACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;SAC/B;KACF;IAED,MAAM,MAAM,GAAG,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,kBAAkB,CAAA;IAC/B,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACnF,CAAC;AAlBD,sCAkBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 function GetScriptLanguagesApi(this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetScriptLanguagesResponse>;
|
|
8
|
+
export default function GetScriptLanguagesApi(this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GetScriptLanguagesResponse, unknown>>;
|
|
9
|
+
export default function GetScriptLanguagesApi(this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptions): Promise<T.GetScriptLanguagesResponse>;
|
|
10
|
+
export {};
|