@elastic/elasticsearch 8.17.1 → 9.0.0-alpha.2
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/lib/api/api/async_search.d.ts +16 -17
- package/lib/api/api/async_search.js +50 -20
- package/lib/api/api/async_search.js.map +1 -1
- package/lib/api/api/autoscaling.d.ts +16 -17
- package/lib/api/api/autoscaling.js +42 -12
- package/lib/api/api/autoscaling.js.map +1 -1
- package/lib/api/api/bulk.d.ts +4 -5
- package/lib/api/api/bulk.js +3 -3
- package/lib/api/api/bulk.js.map +1 -1
- package/lib/api/api/capabilities.d.ts +3 -4
- package/lib/api/api/capabilities.js +13 -3
- package/lib/api/api/capabilities.js.map +1 -1
- package/lib/api/api/cat.d.ts +104 -105
- package/lib/api/api/cat.js +338 -78
- package/lib/api/api/cat.js.map +1 -1
- package/lib/api/api/ccr.d.ts +52 -53
- package/lib/api/api/ccr.js +162 -64
- package/lib/api/api/ccr.js.map +1 -1
- package/lib/api/api/clear_scroll.d.ts +4 -5
- package/lib/api/api/clear_scroll.js +11 -9
- package/lib/api/api/clear_scroll.js.map +1 -1
- package/lib/api/api/close_point_in_time.d.ts +4 -5
- package/lib/api/api/close_point_in_time.js +11 -9
- package/lib/api/api/close_point_in_time.js.map +1 -1
- package/lib/api/api/cluster.d.ts +64 -65
- package/lib/api/api/cluster.js +200 -72
- package/lib/api/api/cluster.js.map +1 -1
- package/lib/api/api/connector.d.ts +132 -133
- package/lib/api/api/connector.js +402 -222
- package/lib/api/api/connector.js.map +1 -1
- package/lib/api/api/count.d.ts +5 -6
- package/lib/api/api/count.js +11 -9
- package/lib/api/api/count.js.map +1 -1
- package/lib/api/api/create.d.ts +5 -6
- package/lib/api/api/create.js +3 -3
- package/lib/api/api/create.js.map +1 -1
- package/lib/api/api/dangling_indices.d.ts +12 -13
- package/lib/api/api/dangling_indices.js +39 -9
- package/lib/api/api/dangling_indices.js.map +1 -1
- package/lib/api/api/delete.d.ts +4 -5
- package/lib/api/api/delete.js +13 -3
- package/lib/api/api/delete.js.map +1 -1
- package/lib/api/api/delete_by_query.d.ts +4 -5
- package/lib/api/api/delete_by_query.js +11 -9
- package/lib/api/api/delete_by_query.js.map +1 -1
- package/lib/api/api/delete_by_query_rethrottle.d.ts +4 -5
- package/lib/api/api/delete_by_query_rethrottle.js +13 -3
- package/lib/api/api/delete_by_query_rethrottle.js.map +1 -1
- package/lib/api/api/delete_script.d.ts +4 -5
- package/lib/api/api/delete_script.js +13 -3
- package/lib/api/api/delete_script.js.map +1 -1
- package/lib/api/api/enrich.d.ts +20 -21
- package/lib/api/api/enrich.js +63 -21
- package/lib/api/api/enrich.js.map +1 -1
- package/lib/api/api/eql.d.ts +16 -17
- package/lib/api/api/eql.js +51 -19
- package/lib/api/api/eql.js.map +1 -1
- package/lib/api/api/esql.d.ts +16 -17
- package/lib/api/api/esql.js +50 -26
- package/lib/api/api/esql.js.map +1 -1
- package/lib/api/api/exists.d.ts +4 -5
- package/lib/api/api/exists.js +13 -3
- package/lib/api/api/exists.js.map +1 -1
- package/lib/api/api/exists_source.d.ts +4 -5
- package/lib/api/api/exists_source.js +13 -3
- package/lib/api/api/exists_source.js.map +1 -1
- package/lib/api/api/explain.d.ts +5 -6
- package/lib/api/api/explain.js +11 -9
- package/lib/api/api/explain.js.map +1 -1
- package/lib/api/api/features.d.ts +8 -9
- package/lib/api/api/features.js +26 -6
- package/lib/api/api/features.js.map +1 -1
- package/lib/api/api/field_caps.d.ts +4 -5
- package/lib/api/api/field_caps.js +11 -9
- package/lib/api/api/field_caps.js.map +1 -1
- package/lib/api/api/fleet.d.ts +22 -23
- package/lib/api/api/fleet.js +66 -24
- package/lib/api/api/fleet.js.map +1 -1
- package/lib/api/api/get.d.ts +4 -5
- package/lib/api/api/get.js +13 -3
- package/lib/api/api/get.js.map +1 -1
- package/lib/api/api/get_script.d.ts +4 -5
- package/lib/api/api/get_script.js +13 -3
- package/lib/api/api/get_script.js.map +1 -1
- package/lib/api/api/get_script_context.d.ts +4 -5
- package/lib/api/api/get_script_context.js +13 -3
- package/lib/api/api/get_script_context.js.map +1 -1
- package/lib/api/api/get_script_languages.d.ts +4 -5
- package/lib/api/api/get_script_languages.js +13 -3
- package/lib/api/api/get_script_languages.js.map +1 -1
- package/lib/api/api/get_source.d.ts +4 -5
- package/lib/api/api/get_source.js +13 -3
- package/lib/api/api/get_source.js.map +1 -1
- package/lib/api/api/graph.d.ts +4 -5
- package/lib/api/api/graph.js +11 -9
- package/lib/api/api/graph.js.map +1 -1
- package/lib/api/api/health_report.d.ts +4 -5
- package/lib/api/api/health_report.js +13 -3
- package/lib/api/api/health_report.js.map +1 -1
- package/lib/api/api/ilm.d.ts +44 -45
- package/lib/api/api/ilm.js +137 -51
- package/lib/api/api/ilm.js.map +1 -1
- package/lib/api/api/index.d.ts +5 -6
- package/lib/api/api/index.js +3 -3
- package/lib/api/api/index.js.map +1 -1
- package/lib/api/api/indices.d.ts +264 -244
- package/lib/api/api/indices.js +837 -295
- package/lib/api/api/indices.js.map +1 -1
- package/lib/api/api/inference.d.ts +31 -25
- package/lib/api/api/inference.js +102 -30
- package/lib/api/api/inference.js.map +1 -1
- package/lib/api/api/info.d.ts +4 -5
- package/lib/api/api/info.js +13 -3
- package/lib/api/api/info.js.map +1 -1
- package/lib/api/api/ingest.d.ts +48 -49
- package/lib/api/api/ingest.js +140 -54
- package/lib/api/api/ingest.js.map +1 -1
- package/lib/api/api/knn_search.d.ts +5 -6
- package/lib/api/api/knn_search.js +11 -9
- package/lib/api/api/knn_search.js.map +1 -1
- package/lib/api/api/license.d.ts +28 -29
- package/lib/api/api/license.js +89 -27
- package/lib/api/api/license.js.map +1 -1
- package/lib/api/api/logstash.d.ts +12 -13
- package/lib/api/api/logstash.js +29 -9
- package/lib/api/api/logstash.js.map +1 -1
- package/lib/api/api/mget.d.ts +5 -6
- package/lib/api/api/mget.js +11 -9
- package/lib/api/api/mget.js.map +1 -1
- package/lib/api/api/migration.d.ts +12 -13
- package/lib/api/api/migration.js +39 -9
- package/lib/api/api/migration.js.map +1 -1
- package/lib/api/api/ml.d.ts +292 -293
- package/lib/api/api/ml.js +855 -441
- package/lib/api/api/ml.js.map +1 -1
- package/lib/api/api/monitoring.d.ts +4 -5
- package/lib/api/api/monitoring.js +3 -3
- package/lib/api/api/monitoring.js.map +1 -1
- package/lib/api/api/msearch.d.ts +4 -5
- package/lib/api/api/msearch.js +3 -3
- package/lib/api/api/msearch.js.map +1 -1
- package/lib/api/api/msearch_template.d.ts +5 -6
- package/lib/api/api/msearch_template.js +3 -3
- package/lib/api/api/msearch_template.js.map +1 -1
- package/lib/api/api/mtermvectors.d.ts +5 -6
- package/lib/api/api/mtermvectors.js +11 -9
- package/lib/api/api/mtermvectors.js.map +1 -1
- package/lib/api/api/nodes.d.ts +28 -29
- package/lib/api/api/nodes.js +89 -27
- package/lib/api/api/nodes.js.map +1 -1
- package/lib/api/api/open_point_in_time.d.ts +4 -5
- package/lib/api/api/open_point_in_time.js +11 -9
- package/lib/api/api/open_point_in_time.js.map +1 -1
- package/lib/api/api/ping.d.ts +4 -5
- package/lib/api/api/ping.js +13 -3
- package/lib/api/api/ping.js.map +1 -1
- package/lib/api/api/profiling.d.ts +16 -17
- package/lib/api/api/profiling.js +52 -12
- package/lib/api/api/profiling.js.map +1 -1
- package/lib/api/api/put_script.d.ts +4 -5
- package/lib/api/api/put_script.js +11 -9
- package/lib/api/api/put_script.js.map +1 -1
- package/lib/api/api/query_rules.d.ts +32 -33
- package/lib/api/api/query_rules.js +98 -42
- package/lib/api/api/query_rules.js.map +1 -1
- package/lib/api/api/rank_eval.d.ts +4 -5
- package/lib/api/api/rank_eval.js +11 -9
- package/lib/api/api/rank_eval.js.map +1 -1
- package/lib/api/api/reindex.d.ts +5 -6
- package/lib/api/api/reindex.js +11 -9
- package/lib/api/api/reindex.js.map +1 -1
- package/lib/api/api/reindex_rethrottle.d.ts +4 -5
- package/lib/api/api/reindex_rethrottle.js +13 -3
- package/lib/api/api/reindex_rethrottle.js.map +1 -1
- package/lib/api/api/render_search_template.d.ts +4 -5
- package/lib/api/api/render_search_template.js +13 -11
- package/lib/api/api/render_search_template.js.map +1 -1
- package/lib/api/api/rollup.d.ts +32 -33
- package/lib/api/api/rollup.js +100 -36
- package/lib/api/api/rollup.js.map +1 -1
- package/lib/api/api/scripts_painless_execute.d.ts +5 -6
- package/lib/api/api/scripts_painless_execute.js +11 -9
- package/lib/api/api/scripts_painless_execute.js.map +1 -1
- package/lib/api/api/scroll.d.ts +4 -5
- package/lib/api/api/scroll.js +11 -9
- package/lib/api/api/scroll.js.map +1 -1
- package/lib/api/api/search.d.ts +4 -5
- package/lib/api/api/search.js +11 -11
- package/lib/api/api/search.js.map +1 -1
- package/lib/api/api/search_application.d.ts +40 -41
- package/lib/api/api/search_application.js +106 -42
- package/lib/api/api/search_application.js.map +1 -1
- package/lib/api/api/search_mvt.d.ts +5 -6
- package/lib/api/api/search_mvt.js +11 -9
- package/lib/api/api/search_mvt.js.map +1 -1
- package/lib/api/api/search_shards.d.ts +5 -6
- package/lib/api/api/search_shards.js +13 -3
- package/lib/api/api/search_shards.js.map +1 -1
- package/lib/api/api/search_template.d.ts +4 -5
- package/lib/api/api/search_template.js +11 -9
- package/lib/api/api/search_template.js.map +1 -1
- package/lib/api/api/searchable_snapshots.d.ts +16 -17
- package/lib/api/api/searchable_snapshots.js +50 -18
- package/lib/api/api/searchable_snapshots.js.map +1 -1
- package/lib/api/api/security.d.ts +256 -257
- package/lib/api/api/security.js +756 -390
- package/lib/api/api/security.js.map +1 -1
- package/lib/api/api/shutdown.d.ts +12 -13
- package/lib/api/api/shutdown.js +37 -15
- package/lib/api/api/shutdown.js.map +1 -1
- package/lib/api/api/simulate.d.ts +4 -5
- package/lib/api/api/simulate.js +11 -9
- package/lib/api/api/simulate.js.map +1 -1
- package/lib/api/api/slm.d.ts +36 -37
- package/lib/api/api/slm.js +115 -33
- package/lib/api/api/slm.js.map +1 -1
- package/lib/api/api/snapshot.d.ts +56 -57
- package/lib/api/api/snapshot.js +154 -58
- package/lib/api/api/snapshot.js.map +1 -1
- package/lib/api/api/sql.d.ts +24 -25
- package/lib/api/api/sql.js +72 -36
- package/lib/api/api/sql.js.map +1 -1
- package/lib/api/api/ssl.d.ts +4 -5
- package/lib/api/api/ssl.js +13 -3
- package/lib/api/api/ssl.js.map +1 -1
- package/lib/api/api/synonyms.d.ts +28 -29
- package/lib/api/api/synonyms.js +87 -33
- package/lib/api/api/synonyms.js.map +1 -1
- package/lib/api/api/tasks.d.ts +12 -13
- package/lib/api/api/tasks.js +39 -9
- package/lib/api/api/tasks.js.map +1 -1
- package/lib/api/api/terms_enum.d.ts +5 -6
- package/lib/api/api/terms_enum.js +11 -9
- package/lib/api/api/terms_enum.js.map +1 -1
- package/lib/api/api/termvectors.d.ts +5 -6
- package/lib/api/api/termvectors.js +11 -9
- package/lib/api/api/termvectors.js.map +1 -1
- package/lib/api/api/text_structure.d.ts +16 -17
- package/lib/api/api/text_structure.js +38 -24
- package/lib/api/api/text_structure.js.map +1 -1
- package/lib/api/api/transform.d.ts +48 -49
- package/lib/api/api/transform.js +150 -54
- package/lib/api/api/transform.js.map +1 -1
- package/lib/api/api/update.d.ts +4 -5
- package/lib/api/api/update.js +11 -9
- package/lib/api/api/update.js.map +1 -1
- package/lib/api/api/update_by_query.d.ts +4 -5
- package/lib/api/api/update_by_query.js +11 -9
- package/lib/api/api/update_by_query.js.map +1 -1
- package/lib/api/api/update_by_query_rethrottle.d.ts +4 -5
- package/lib/api/api/update_by_query_rethrottle.js +13 -3
- package/lib/api/api/update_by_query_rethrottle.js.map +1 -1
- package/lib/api/api/watcher.d.ts +52 -53
- package/lib/api/api/watcher.js +161 -63
- package/lib/api/api/watcher.js.map +1 -1
- package/lib/api/api/xpack.d.ts +8 -9
- package/lib/api/api/xpack.js +26 -6
- package/lib/api/api/xpack.js.map +1 -1
- package/lib/api/types.d.ts +12987 -170
- package/lib/client.js +4 -12
- package/lib/client.js.map +1 -1
- package/lib/helpers.js +1 -1
- package/lib/helpers.js.map +1 -1
- package/package.json +6 -7
- package/renovate.json +26 -0
- package/lib/api/typesWithBodyKey.d.ts +0 -18871
- package/lib/api/typesWithBodyKey.js +0 -21
- package/lib/api/typesWithBodyKey.js.map +0 -1
package/lib/api/api/graph.js
CHANGED
|
@@ -31,15 +31,17 @@ class Graph {
|
|
|
31
31
|
async explore(params, options) {
|
|
32
32
|
const acceptedPath = ['index'];
|
|
33
33
|
const acceptedBody = ['connections', 'controls', 'query', 'vertices'];
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
34
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
35
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
37
36
|
let body;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
38
|
+
if (userBody != null) {
|
|
39
|
+
if (typeof userBody === 'string') {
|
|
40
|
+
body = userBody;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
body = { ...userBody };
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
for (const key in params) {
|
|
45
47
|
if (acceptedBody.includes(key)) {
|
|
@@ -50,7 +52,7 @@ class Graph {
|
|
|
50
52
|
else if (acceptedPath.includes(key)) {
|
|
51
53
|
continue;
|
|
52
54
|
}
|
|
53
|
-
else if (key !== 'body') {
|
|
55
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
54
56
|
// @ts-expect-error
|
|
55
57
|
querystring[key] = params[key];
|
|
56
58
|
}
|
package/lib/api/api/graph.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../../src/api/api/graph.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;
|
|
1
|
+
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../../src/api/api/graph.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAsBH,MAAqB,KAAK;IAExB,YAAa,SAAoB;QADjC;;;;;WAAoB;QAElB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IASD,KAAK,CAAC,OAAO,CAAc,MAA6B,EAAE,OAAiC;QACzF,MAAM,YAAY,GAAa,CAAC,OAAO,CAAC,CAAA;QACxC,MAAM,YAAY,GAAa,CAAC,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAA;QAC/E,MAAM,SAAS,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,CAAA;QACrC,MAAM,WAAW,GAAwB,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QAElF,IAAI,IAA8C,CAAA;QAClD,MAAM,QAAQ,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAA;QAC7B,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;YACrB,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBACjC,IAAI,GAAG,QAAQ,CAAA;YACjB,CAAC;iBAAM,CAAC;gBACN,IAAI,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAA;YACxB,CAAC;QACH,CAAC;QAED,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;YACzB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC/B,IAAI,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAA;gBACjB,mBAAmB;gBACnB,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;YACzB,CAAC;iBAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBACtC,SAAQ;YACV,CAAC;iBAAM,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,aAAa,EAAE,CAAC;gBACnD,mBAAmB;gBACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;YAChC,CAAC;QACH,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;QAC5C,MAAM,IAAI,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,iBAAiB,CAAA;QAC7E,MAAM,IAAI,GAA6B;YACrC,IAAI,EAAE,eAAe;YACrB,SAAS,EAAE;gBACT,KAAK,EAAE,MAAM,CAAC,KAAK;aACpB;SACF,CAAA;QACD,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACzF,CAAC;CACF;AApDD,wBAoDC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
|
|
2
2
|
import * as T from '../types';
|
|
3
|
-
import * as TB from '../typesWithBodyKey';
|
|
4
3
|
interface That {
|
|
5
4
|
transport: Transport;
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
8
7
|
* Get the cluster health. Get a report with the health status of an Elasticsearch cluster. The report contains a list of indicators that compose Elasticsearch functionality. Each indicator has a health status of: green, unknown, yellow or red. The indicator will provide an explanation and metadata describing the reason for its current health status. The cluster’s status is controlled by the worst indicator status. In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue. Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system. Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system. The root cause and remediation steps are encapsulated in a diagnosis. A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem. NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently. When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic.
|
|
9
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
8
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/health-api.html | Elasticsearch API documentation}
|
|
10
9
|
*/
|
|
11
|
-
export default function HealthReportApi(this: That, params?: T.HealthReportRequest
|
|
12
|
-
export default function HealthReportApi(this: That, params?: T.HealthReportRequest
|
|
13
|
-
export default function HealthReportApi(this: That, params?: T.HealthReportRequest
|
|
10
|
+
export default function HealthReportApi(this: That, params?: T.HealthReportRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.HealthReportResponse>;
|
|
11
|
+
export default function HealthReportApi(this: That, params?: T.HealthReportRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.HealthReportResponse, unknown>>;
|
|
12
|
+
export default function HealthReportApi(this: That, params?: T.HealthReportRequest, options?: TransportRequestOptions): Promise<T.HealthReportResponse>;
|
|
14
13
|
export {};
|
|
@@ -21,14 +21,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
21
|
exports.default = HealthReportApi;
|
|
22
22
|
async function HealthReportApi(params, options) {
|
|
23
23
|
const acceptedPath = ['feature'];
|
|
24
|
-
const
|
|
25
|
-
const
|
|
24
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
25
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
26
|
+
let body;
|
|
27
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
28
|
+
if (userBody != null) {
|
|
29
|
+
if (typeof userBody === 'string') {
|
|
30
|
+
body = userBody;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
body = { ...userBody };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
26
36
|
params = params !== null && params !== void 0 ? params : {};
|
|
27
37
|
for (const key in params) {
|
|
28
38
|
if (acceptedPath.includes(key)) {
|
|
29
39
|
continue;
|
|
30
40
|
}
|
|
31
|
-
else if (key !== 'body') {
|
|
41
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
32
42
|
// @ts-expect-error
|
|
33
43
|
querystring[key] = params[key];
|
|
34
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health_report.js","sourceRoot":"","sources":["../../../../src/api/api/health_report.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;
|
|
1
|
+
{"version":3,"file":"health_report.js","sourceRoot":"","sources":["../../../../src/api/api/health_report.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AA6BH,kCAyCC;AAzCc,KAAK,UAAU,eAAe,CAAc,MAA8B,EAAE,OAAiC;IAC1H,MAAM,YAAY,GAAa,CAAC,SAAS,CAAC,CAAA;IAC1C,MAAM,SAAS,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,CAAA;IACrC,MAAM,WAAW,GAAwB,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IAElF,IAAI,IAA8C,CAAA;IAClD,MAAM,QAAQ,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAA;IAC7B,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;QACrB,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjC,IAAI,GAAG,QAAQ,CAAA;QACjB,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAA;QACxB,CAAC;IACH,CAAC;IAED,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAA;IACrB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/B,SAAQ;QACV,CAAC;aAAM,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,aAAa,EAAE,CAAC;YACnD,mBAAmB;YACnB,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;QAChC,CAAC;IACH,CAAC;IAED,IAAI,MAAM,GAAG,EAAE,CAAA;IACf,IAAI,IAAI,GAAG,EAAE,CAAA;IACb,IAAI,MAAM,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;QAC3B,MAAM,GAAG,KAAK,CAAA;QACd,IAAI,GAAG,mBAAmB,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAA;IAC3E,CAAC;SAAM,CAAC;QACN,MAAM,GAAG,KAAK,CAAA;QACd,IAAI,GAAG,iBAAiB,CAAA;IAC1B,CAAC;IACD,MAAM,IAAI,GAA6B;QACrC,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE;YACT,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB;KACF,CAAA;IACD,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;AACzF,CAAC"}
|
package/lib/api/api/ilm.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
|
|
2
2
|
import * as T from '../types';
|
|
3
|
-
import * as TB from '../typesWithBodyKey';
|
|
4
3
|
interface That {
|
|
5
4
|
transport: Transport;
|
|
6
5
|
}
|
|
@@ -9,80 +8,80 @@ export default class Ilm {
|
|
|
9
8
|
constructor(transport: Transport);
|
|
10
9
|
/**
|
|
11
10
|
* Delete a lifecycle policy. You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.
|
|
12
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
11
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-delete-lifecycle.html | Elasticsearch API documentation}
|
|
13
12
|
*/
|
|
14
|
-
deleteLifecycle(this: That, params: T.IlmDeleteLifecycleRequest
|
|
15
|
-
deleteLifecycle(this: That, params: T.IlmDeleteLifecycleRequest
|
|
16
|
-
deleteLifecycle(this: That, params: T.IlmDeleteLifecycleRequest
|
|
13
|
+
deleteLifecycle(this: That, params: T.IlmDeleteLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmDeleteLifecycleResponse>;
|
|
14
|
+
deleteLifecycle(this: That, params: T.IlmDeleteLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmDeleteLifecycleResponse, unknown>>;
|
|
15
|
+
deleteLifecycle(this: That, params: T.IlmDeleteLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmDeleteLifecycleResponse>;
|
|
17
16
|
/**
|
|
18
17
|
* Explain the lifecycle state. Get the current lifecycle status for one or more indices. For data streams, the API retrieves the current lifecycle status for the stream's backing indices. The response indicates when the index entered each lifecycle state, provides the definition of the running phase, and information about any failures.
|
|
19
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
18
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-explain-lifecycle.html | Elasticsearch API documentation}
|
|
20
19
|
*/
|
|
21
|
-
explainLifecycle(this: That, params: T.IlmExplainLifecycleRequest
|
|
22
|
-
explainLifecycle(this: That, params: T.IlmExplainLifecycleRequest
|
|
23
|
-
explainLifecycle(this: That, params: T.IlmExplainLifecycleRequest
|
|
20
|
+
explainLifecycle(this: That, params: T.IlmExplainLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmExplainLifecycleResponse>;
|
|
21
|
+
explainLifecycle(this: That, params: T.IlmExplainLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmExplainLifecycleResponse, unknown>>;
|
|
22
|
+
explainLifecycle(this: That, params: T.IlmExplainLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmExplainLifecycleResponse>;
|
|
24
23
|
/**
|
|
25
24
|
* Get lifecycle policies.
|
|
26
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
25
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-get-lifecycle.html | Elasticsearch API documentation}
|
|
27
26
|
*/
|
|
28
|
-
getLifecycle(this: That, params?: T.IlmGetLifecycleRequest
|
|
29
|
-
getLifecycle(this: That, params?: T.IlmGetLifecycleRequest
|
|
30
|
-
getLifecycle(this: That, params?: T.IlmGetLifecycleRequest
|
|
27
|
+
getLifecycle(this: That, params?: T.IlmGetLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmGetLifecycleResponse>;
|
|
28
|
+
getLifecycle(this: That, params?: T.IlmGetLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmGetLifecycleResponse, unknown>>;
|
|
29
|
+
getLifecycle(this: That, params?: T.IlmGetLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmGetLifecycleResponse>;
|
|
31
30
|
/**
|
|
32
31
|
* Get the ILM status. Get the current index lifecycle management status.
|
|
33
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
32
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-get-status.html | Elasticsearch API documentation}
|
|
34
33
|
*/
|
|
35
|
-
getStatus(this: That, params?: T.IlmGetStatusRequest
|
|
36
|
-
getStatus(this: That, params?: T.IlmGetStatusRequest
|
|
37
|
-
getStatus(this: That, params?: T.IlmGetStatusRequest
|
|
34
|
+
getStatus(this: That, params?: T.IlmGetStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmGetStatusResponse>;
|
|
35
|
+
getStatus(this: That, params?: T.IlmGetStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmGetStatusResponse, unknown>>;
|
|
36
|
+
getStatus(this: That, params?: T.IlmGetStatusRequest, options?: TransportRequestOptions): Promise<T.IlmGetStatusResponse>;
|
|
38
37
|
/**
|
|
39
38
|
* Migrate to data tiers routing. Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers. Optionally, delete one legacy index template. Using node roles enables ILM to automatically move the indices between data tiers. Migrating away from custom node attributes routing can be manually performed. This API provides an automated way of performing three out of the four manual steps listed in the migration guide: 1. Stop setting the custom hot attribute on new indices. 1. Remove custom allocation settings from existing ILM policies. 1. Replace custom allocation settings from existing indices with the corresponding tier preference. ILM must be stopped before performing the migration. Use the stop ILM and get ILM status APIs to wait until the reported operation mode is `STOPPED`.
|
|
40
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
39
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-migrate-to-data-tiers.html | Elasticsearch API documentation}
|
|
41
40
|
*/
|
|
42
|
-
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest
|
|
43
|
-
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest
|
|
44
|
-
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest
|
|
41
|
+
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmMigrateToDataTiersResponse>;
|
|
42
|
+
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmMigrateToDataTiersResponse, unknown>>;
|
|
43
|
+
migrateToDataTiers(this: That, params?: T.IlmMigrateToDataTiersRequest, options?: TransportRequestOptions): Promise<T.IlmMigrateToDataTiersResponse>;
|
|
45
44
|
/**
|
|
46
45
|
* Move to a lifecycle step. Manually move an index into a specific step in the lifecycle policy and run that step. WARNING: This operation can result in the loss of data. Manually moving an index into a specific step runs that step even if it has already been performed. This is a potentially destructive action and this should be considered an expert level API. You must specify both the current step and the step to be executed in the body of the request. The request will fail if the current step does not match the step currently running for the index This is to prevent the index from being moved from an unexpected step into the next step. When specifying the target (`next_step`) to which the index will be moved, either the name or both the action and name fields are optional. If only the phase is specified, the index will move to the first step of the first action in the target phase. If the phase and action are specified, the index will move to the first step of the specified action in the specified phase. Only actions specified in the ILM policy are considered valid. An index cannot move to a step that is not part of its policy.
|
|
47
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
46
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-move-to-step.html | Elasticsearch API documentation}
|
|
48
47
|
*/
|
|
49
|
-
moveToStep(this: That, params: T.IlmMoveToStepRequest
|
|
50
|
-
moveToStep(this: That, params: T.IlmMoveToStepRequest
|
|
51
|
-
moveToStep(this: That, params: T.IlmMoveToStepRequest
|
|
48
|
+
moveToStep(this: That, params: T.IlmMoveToStepRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmMoveToStepResponse>;
|
|
49
|
+
moveToStep(this: That, params: T.IlmMoveToStepRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmMoveToStepResponse, unknown>>;
|
|
50
|
+
moveToStep(this: That, params: T.IlmMoveToStepRequest, options?: TransportRequestOptions): Promise<T.IlmMoveToStepResponse>;
|
|
52
51
|
/**
|
|
53
52
|
* Create or update a lifecycle policy. If the specified policy exists, it is replaced and the policy version is incremented. NOTE: Only the latest version of the policy is stored, you cannot revert to previous versions.
|
|
54
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
53
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-put-lifecycle.html | Elasticsearch API documentation}
|
|
55
54
|
*/
|
|
56
|
-
putLifecycle(this: That, params: T.IlmPutLifecycleRequest
|
|
57
|
-
putLifecycle(this: That, params: T.IlmPutLifecycleRequest
|
|
58
|
-
putLifecycle(this: That, params: T.IlmPutLifecycleRequest
|
|
55
|
+
putLifecycle(this: That, params: T.IlmPutLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmPutLifecycleResponse>;
|
|
56
|
+
putLifecycle(this: That, params: T.IlmPutLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmPutLifecycleResponse, unknown>>;
|
|
57
|
+
putLifecycle(this: That, params: T.IlmPutLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmPutLifecycleResponse>;
|
|
59
58
|
/**
|
|
60
59
|
* Remove policies from an index. Remove the assigned lifecycle policies from an index or a data stream's backing indices. It also stops managing the indices.
|
|
61
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
60
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-remove-policy.html | Elasticsearch API documentation}
|
|
62
61
|
*/
|
|
63
|
-
removePolicy(this: That, params: T.IlmRemovePolicyRequest
|
|
64
|
-
removePolicy(this: That, params: T.IlmRemovePolicyRequest
|
|
65
|
-
removePolicy(this: That, params: T.IlmRemovePolicyRequest
|
|
62
|
+
removePolicy(this: That, params: T.IlmRemovePolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmRemovePolicyResponse>;
|
|
63
|
+
removePolicy(this: That, params: T.IlmRemovePolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmRemovePolicyResponse, unknown>>;
|
|
64
|
+
removePolicy(this: That, params: T.IlmRemovePolicyRequest, options?: TransportRequestOptions): Promise<T.IlmRemovePolicyResponse>;
|
|
66
65
|
/**
|
|
67
66
|
* Retry a policy. Retry running the lifecycle policy for an index that is in the ERROR step. The API sets the policy back to the step where the error occurred and runs the step. Use the explain lifecycle state API to determine whether an index is in the ERROR step.
|
|
68
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
67
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-retry-policy.html | Elasticsearch API documentation}
|
|
69
68
|
*/
|
|
70
|
-
retry(this: That, params: T.IlmRetryRequest
|
|
71
|
-
retry(this: That, params: T.IlmRetryRequest
|
|
72
|
-
retry(this: That, params: T.IlmRetryRequest
|
|
69
|
+
retry(this: That, params: T.IlmRetryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmRetryResponse>;
|
|
70
|
+
retry(this: That, params: T.IlmRetryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmRetryResponse, unknown>>;
|
|
71
|
+
retry(this: That, params: T.IlmRetryRequest, options?: TransportRequestOptions): Promise<T.IlmRetryResponse>;
|
|
73
72
|
/**
|
|
74
73
|
* Start the ILM plugin. Start the index lifecycle management plugin if it is currently stopped. ILM is started automatically when the cluster is formed. Restarting ILM is necessary only when it has been stopped using the stop ILM API.
|
|
75
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
74
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-start.html | Elasticsearch API documentation}
|
|
76
75
|
*/
|
|
77
|
-
start(this: That, params?: T.IlmStartRequest
|
|
78
|
-
start(this: That, params?: T.IlmStartRequest
|
|
79
|
-
start(this: That, params?: T.IlmStartRequest
|
|
76
|
+
start(this: That, params?: T.IlmStartRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmStartResponse>;
|
|
77
|
+
start(this: That, params?: T.IlmStartRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmStartResponse, unknown>>;
|
|
78
|
+
start(this: That, params?: T.IlmStartRequest, options?: TransportRequestOptions): Promise<T.IlmStartResponse>;
|
|
80
79
|
/**
|
|
81
80
|
* Stop the ILM plugin. Halt all lifecycle management operations and stop the index lifecycle management plugin. This is useful when you are performing maintenance on the cluster and need to prevent ILM from performing any actions on your indices. The API returns as soon as the stop request has been acknowledged, but the plugin might continue to run until in-progress operations complete and the plugin can be safely stopped. Use the get ILM status API to check whether ILM is running.
|
|
82
|
-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/
|
|
81
|
+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-stop.html | Elasticsearch API documentation}
|
|
83
82
|
*/
|
|
84
|
-
stop(this: That, params?: T.IlmStopRequest
|
|
85
|
-
stop(this: That, params?: T.IlmStopRequest
|
|
86
|
-
stop(this: That, params?: T.IlmStopRequest
|
|
83
|
+
stop(this: That, params?: T.IlmStopRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IlmStopResponse>;
|
|
84
|
+
stop(this: That, params?: T.IlmStopRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IlmStopResponse, unknown>>;
|
|
85
|
+
stop(this: That, params?: T.IlmStopRequest, options?: TransportRequestOptions): Promise<T.IlmStopResponse>;
|
|
87
86
|
}
|
|
88
87
|
export {};
|
package/lib/api/api/ilm.js
CHANGED
|
@@ -30,13 +30,23 @@ class Ilm {
|
|
|
30
30
|
}
|
|
31
31
|
async deleteLifecycle(params, options) {
|
|
32
32
|
const acceptedPath = ['name'];
|
|
33
|
-
const
|
|
34
|
-
const
|
|
33
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
34
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
35
|
+
let body;
|
|
36
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
37
|
+
if (userBody != null) {
|
|
38
|
+
if (typeof userBody === 'string') {
|
|
39
|
+
body = userBody;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
body = { ...userBody };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
35
45
|
for (const key in params) {
|
|
36
46
|
if (acceptedPath.includes(key)) {
|
|
37
47
|
continue;
|
|
38
48
|
}
|
|
39
|
-
else if (key !== 'body') {
|
|
49
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
40
50
|
// @ts-expect-error
|
|
41
51
|
querystring[key] = params[key];
|
|
42
52
|
}
|
|
@@ -53,13 +63,23 @@ class Ilm {
|
|
|
53
63
|
}
|
|
54
64
|
async explainLifecycle(params, options) {
|
|
55
65
|
const acceptedPath = ['index'];
|
|
56
|
-
const
|
|
57
|
-
const
|
|
66
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
67
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
68
|
+
let body;
|
|
69
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
70
|
+
if (userBody != null) {
|
|
71
|
+
if (typeof userBody === 'string') {
|
|
72
|
+
body = userBody;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
body = { ...userBody };
|
|
76
|
+
}
|
|
77
|
+
}
|
|
58
78
|
for (const key in params) {
|
|
59
79
|
if (acceptedPath.includes(key)) {
|
|
60
80
|
continue;
|
|
61
81
|
}
|
|
62
|
-
else if (key !== 'body') {
|
|
82
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
63
83
|
// @ts-expect-error
|
|
64
84
|
querystring[key] = params[key];
|
|
65
85
|
}
|
|
@@ -76,14 +96,24 @@ class Ilm {
|
|
|
76
96
|
}
|
|
77
97
|
async getLifecycle(params, options) {
|
|
78
98
|
const acceptedPath = ['name'];
|
|
79
|
-
const
|
|
80
|
-
const
|
|
99
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
100
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
101
|
+
let body;
|
|
102
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
103
|
+
if (userBody != null) {
|
|
104
|
+
if (typeof userBody === 'string') {
|
|
105
|
+
body = userBody;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
body = { ...userBody };
|
|
109
|
+
}
|
|
110
|
+
}
|
|
81
111
|
params = params !== null && params !== void 0 ? params : {};
|
|
82
112
|
for (const key in params) {
|
|
83
113
|
if (acceptedPath.includes(key)) {
|
|
84
114
|
continue;
|
|
85
115
|
}
|
|
86
|
-
else if (key !== 'body') {
|
|
116
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
87
117
|
// @ts-expect-error
|
|
88
118
|
querystring[key] = params[key];
|
|
89
119
|
}
|
|
@@ -108,14 +138,24 @@ class Ilm {
|
|
|
108
138
|
}
|
|
109
139
|
async getStatus(params, options) {
|
|
110
140
|
const acceptedPath = [];
|
|
111
|
-
const
|
|
112
|
-
const
|
|
141
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
142
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
143
|
+
let body;
|
|
144
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
145
|
+
if (userBody != null) {
|
|
146
|
+
if (typeof userBody === 'string') {
|
|
147
|
+
body = userBody;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
body = { ...userBody };
|
|
151
|
+
}
|
|
152
|
+
}
|
|
113
153
|
params = params !== null && params !== void 0 ? params : {};
|
|
114
154
|
for (const key in params) {
|
|
115
155
|
if (acceptedPath.includes(key)) {
|
|
116
156
|
continue;
|
|
117
157
|
}
|
|
118
|
-
else if (key !== 'body') {
|
|
158
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
119
159
|
// @ts-expect-error
|
|
120
160
|
querystring[key] = params[key];
|
|
121
161
|
}
|
|
@@ -130,15 +170,17 @@ class Ilm {
|
|
|
130
170
|
async migrateToDataTiers(params, options) {
|
|
131
171
|
const acceptedPath = [];
|
|
132
172
|
const acceptedBody = ['legacy_template_to_delete', 'node_attribute'];
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
173
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
174
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
136
175
|
let body;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
176
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
177
|
+
if (userBody != null) {
|
|
178
|
+
if (typeof userBody === 'string') {
|
|
179
|
+
body = userBody;
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
body = { ...userBody };
|
|
183
|
+
}
|
|
142
184
|
}
|
|
143
185
|
params = params !== null && params !== void 0 ? params : {};
|
|
144
186
|
for (const key in params) {
|
|
@@ -150,7 +192,7 @@ class Ilm {
|
|
|
150
192
|
else if (acceptedPath.includes(key)) {
|
|
151
193
|
continue;
|
|
152
194
|
}
|
|
153
|
-
else if (key !== 'body') {
|
|
195
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
154
196
|
// @ts-expect-error
|
|
155
197
|
querystring[key] = params[key];
|
|
156
198
|
}
|
|
@@ -165,15 +207,17 @@ class Ilm {
|
|
|
165
207
|
async moveToStep(params, options) {
|
|
166
208
|
const acceptedPath = ['index'];
|
|
167
209
|
const acceptedBody = ['current_step', 'next_step'];
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
210
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
211
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
171
212
|
let body;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
213
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
214
|
+
if (userBody != null) {
|
|
215
|
+
if (typeof userBody === 'string') {
|
|
216
|
+
body = userBody;
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
body = { ...userBody };
|
|
220
|
+
}
|
|
177
221
|
}
|
|
178
222
|
for (const key in params) {
|
|
179
223
|
if (acceptedBody.includes(key)) {
|
|
@@ -184,7 +228,7 @@ class Ilm {
|
|
|
184
228
|
else if (acceptedPath.includes(key)) {
|
|
185
229
|
continue;
|
|
186
230
|
}
|
|
187
|
-
else if (key !== 'body') {
|
|
231
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
188
232
|
// @ts-expect-error
|
|
189
233
|
querystring[key] = params[key];
|
|
190
234
|
}
|
|
@@ -202,15 +246,17 @@ class Ilm {
|
|
|
202
246
|
async putLifecycle(params, options) {
|
|
203
247
|
const acceptedPath = ['name'];
|
|
204
248
|
const acceptedBody = ['policy'];
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
249
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
250
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
208
251
|
let body;
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
252
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
253
|
+
if (userBody != null) {
|
|
254
|
+
if (typeof userBody === 'string') {
|
|
255
|
+
body = userBody;
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
body = { ...userBody };
|
|
259
|
+
}
|
|
214
260
|
}
|
|
215
261
|
for (const key in params) {
|
|
216
262
|
if (acceptedBody.includes(key)) {
|
|
@@ -221,7 +267,7 @@ class Ilm {
|
|
|
221
267
|
else if (acceptedPath.includes(key)) {
|
|
222
268
|
continue;
|
|
223
269
|
}
|
|
224
|
-
else if (key !== 'body') {
|
|
270
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
225
271
|
// @ts-expect-error
|
|
226
272
|
querystring[key] = params[key];
|
|
227
273
|
}
|
|
@@ -238,13 +284,23 @@ class Ilm {
|
|
|
238
284
|
}
|
|
239
285
|
async removePolicy(params, options) {
|
|
240
286
|
const acceptedPath = ['index'];
|
|
241
|
-
const
|
|
242
|
-
const
|
|
287
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
288
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
289
|
+
let body;
|
|
290
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
291
|
+
if (userBody != null) {
|
|
292
|
+
if (typeof userBody === 'string') {
|
|
293
|
+
body = userBody;
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
body = { ...userBody };
|
|
297
|
+
}
|
|
298
|
+
}
|
|
243
299
|
for (const key in params) {
|
|
244
300
|
if (acceptedPath.includes(key)) {
|
|
245
301
|
continue;
|
|
246
302
|
}
|
|
247
|
-
else if (key !== 'body') {
|
|
303
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
248
304
|
// @ts-expect-error
|
|
249
305
|
querystring[key] = params[key];
|
|
250
306
|
}
|
|
@@ -261,13 +317,23 @@ class Ilm {
|
|
|
261
317
|
}
|
|
262
318
|
async retry(params, options) {
|
|
263
319
|
const acceptedPath = ['index'];
|
|
264
|
-
const
|
|
265
|
-
const
|
|
320
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
321
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
322
|
+
let body;
|
|
323
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
324
|
+
if (userBody != null) {
|
|
325
|
+
if (typeof userBody === 'string') {
|
|
326
|
+
body = userBody;
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
body = { ...userBody };
|
|
330
|
+
}
|
|
331
|
+
}
|
|
266
332
|
for (const key in params) {
|
|
267
333
|
if (acceptedPath.includes(key)) {
|
|
268
334
|
continue;
|
|
269
335
|
}
|
|
270
|
-
else if (key !== 'body') {
|
|
336
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
271
337
|
// @ts-expect-error
|
|
272
338
|
querystring[key] = params[key];
|
|
273
339
|
}
|
|
@@ -284,14 +350,24 @@ class Ilm {
|
|
|
284
350
|
}
|
|
285
351
|
async start(params, options) {
|
|
286
352
|
const acceptedPath = [];
|
|
287
|
-
const
|
|
288
|
-
const
|
|
353
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
354
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
355
|
+
let body;
|
|
356
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
357
|
+
if (userBody != null) {
|
|
358
|
+
if (typeof userBody === 'string') {
|
|
359
|
+
body = userBody;
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
body = { ...userBody };
|
|
363
|
+
}
|
|
364
|
+
}
|
|
289
365
|
params = params !== null && params !== void 0 ? params : {};
|
|
290
366
|
for (const key in params) {
|
|
291
367
|
if (acceptedPath.includes(key)) {
|
|
292
368
|
continue;
|
|
293
369
|
}
|
|
294
|
-
else if (key !== 'body') {
|
|
370
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
295
371
|
// @ts-expect-error
|
|
296
372
|
querystring[key] = params[key];
|
|
297
373
|
}
|
|
@@ -305,14 +381,24 @@ class Ilm {
|
|
|
305
381
|
}
|
|
306
382
|
async stop(params, options) {
|
|
307
383
|
const acceptedPath = [];
|
|
308
|
-
const
|
|
309
|
-
const
|
|
384
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
385
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
386
|
+
let body;
|
|
387
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
388
|
+
if (userBody != null) {
|
|
389
|
+
if (typeof userBody === 'string') {
|
|
390
|
+
body = userBody;
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
body = { ...userBody };
|
|
394
|
+
}
|
|
395
|
+
}
|
|
310
396
|
params = params !== null && params !== void 0 ? params : {};
|
|
311
397
|
for (const key in params) {
|
|
312
398
|
if (acceptedPath.includes(key)) {
|
|
313
399
|
continue;
|
|
314
400
|
}
|
|
315
|
-
else if (key !== 'body') {
|
|
401
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
316
402
|
// @ts-expect-error
|
|
317
403
|
querystring[key] = params[key];
|
|
318
404
|
}
|