@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/indices.js
CHANGED
|
@@ -30,13 +30,23 @@ class Indices {
|
|
|
30
30
|
}
|
|
31
31
|
async addBlock(params, options) {
|
|
32
32
|
const acceptedPath = ['index', 'block'];
|
|
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
|
}
|
|
@@ -55,15 +65,17 @@ class Indices {
|
|
|
55
65
|
async analyze(params, options) {
|
|
56
66
|
const acceptedPath = ['index'];
|
|
57
67
|
const acceptedBody = ['analyzer', 'attributes', 'char_filter', 'explain', 'field', 'filter', 'normalizer', 'text', 'tokenizer'];
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
68
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
69
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
61
70
|
let body;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
72
|
+
if (userBody != null) {
|
|
73
|
+
if (typeof userBody === 'string') {
|
|
74
|
+
body = userBody;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
body = { ...userBody };
|
|
78
|
+
}
|
|
67
79
|
}
|
|
68
80
|
params = params !== null && params !== void 0 ? params : {};
|
|
69
81
|
for (const key in params) {
|
|
@@ -75,7 +87,7 @@ class Indices {
|
|
|
75
87
|
else if (acceptedPath.includes(key)) {
|
|
76
88
|
continue;
|
|
77
89
|
}
|
|
78
|
-
else if (key !== 'body') {
|
|
90
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
79
91
|
// @ts-expect-error
|
|
80
92
|
querystring[key] = params[key];
|
|
81
93
|
}
|
|
@@ -98,16 +110,59 @@ class Indices {
|
|
|
98
110
|
};
|
|
99
111
|
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
100
112
|
}
|
|
113
|
+
async cancelMigrateReindex(params, options) {
|
|
114
|
+
const acceptedPath = ['index'];
|
|
115
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
116
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
117
|
+
let body;
|
|
118
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
119
|
+
if (userBody != null) {
|
|
120
|
+
if (typeof userBody === 'string') {
|
|
121
|
+
body = userBody;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
body = { ...userBody };
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
for (const key in params) {
|
|
128
|
+
if (acceptedPath.includes(key)) {
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
132
|
+
// @ts-expect-error
|
|
133
|
+
querystring[key] = params[key];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const method = 'POST';
|
|
137
|
+
const path = `/_migration/reindex/${encodeURIComponent(params.index.toString())}/_cancel`;
|
|
138
|
+
const meta = {
|
|
139
|
+
name: 'indices.cancel_migrate_reindex',
|
|
140
|
+
pathParts: {
|
|
141
|
+
index: params.index
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
145
|
+
}
|
|
101
146
|
async clearCache(params, options) {
|
|
102
147
|
const acceptedPath = ['index'];
|
|
103
|
-
const
|
|
104
|
-
const
|
|
148
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
149
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
150
|
+
let body;
|
|
151
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
152
|
+
if (userBody != null) {
|
|
153
|
+
if (typeof userBody === 'string') {
|
|
154
|
+
body = userBody;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
body = { ...userBody };
|
|
158
|
+
}
|
|
159
|
+
}
|
|
105
160
|
params = params !== null && params !== void 0 ? params : {};
|
|
106
161
|
for (const key in params) {
|
|
107
162
|
if (acceptedPath.includes(key)) {
|
|
108
163
|
continue;
|
|
109
164
|
}
|
|
110
|
-
else if (key !== 'body') {
|
|
165
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
111
166
|
// @ts-expect-error
|
|
112
167
|
querystring[key] = params[key];
|
|
113
168
|
}
|
|
@@ -133,15 +188,17 @@ class Indices {
|
|
|
133
188
|
async clone(params, options) {
|
|
134
189
|
const acceptedPath = ['index', 'target'];
|
|
135
190
|
const acceptedBody = ['aliases', 'settings'];
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
191
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
192
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
139
193
|
let body;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
194
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
195
|
+
if (userBody != null) {
|
|
196
|
+
if (typeof userBody === 'string') {
|
|
197
|
+
body = userBody;
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
body = { ...userBody };
|
|
201
|
+
}
|
|
145
202
|
}
|
|
146
203
|
for (const key in params) {
|
|
147
204
|
if (acceptedBody.includes(key)) {
|
|
@@ -152,7 +209,7 @@ class Indices {
|
|
|
152
209
|
else if (acceptedPath.includes(key)) {
|
|
153
210
|
continue;
|
|
154
211
|
}
|
|
155
|
-
else if (key !== 'body') {
|
|
212
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
156
213
|
// @ts-expect-error
|
|
157
214
|
querystring[key] = params[key];
|
|
158
215
|
}
|
|
@@ -170,13 +227,23 @@ class Indices {
|
|
|
170
227
|
}
|
|
171
228
|
async close(params, options) {
|
|
172
229
|
const acceptedPath = ['index'];
|
|
173
|
-
const
|
|
174
|
-
const
|
|
230
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
231
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
232
|
+
let body;
|
|
233
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
234
|
+
if (userBody != null) {
|
|
235
|
+
if (typeof userBody === 'string') {
|
|
236
|
+
body = userBody;
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
body = { ...userBody };
|
|
240
|
+
}
|
|
241
|
+
}
|
|
175
242
|
for (const key in params) {
|
|
176
243
|
if (acceptedPath.includes(key)) {
|
|
177
244
|
continue;
|
|
178
245
|
}
|
|
179
|
-
else if (key !== 'body') {
|
|
246
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
180
247
|
// @ts-expect-error
|
|
181
248
|
querystring[key] = params[key];
|
|
182
249
|
}
|
|
@@ -194,15 +261,17 @@ class Indices {
|
|
|
194
261
|
async create(params, options) {
|
|
195
262
|
const acceptedPath = ['index'];
|
|
196
263
|
const acceptedBody = ['aliases', 'mappings', 'settings'];
|
|
197
|
-
const
|
|
198
|
-
|
|
199
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
264
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
265
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
200
266
|
let body;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
267
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
268
|
+
if (userBody != null) {
|
|
269
|
+
if (typeof userBody === 'string') {
|
|
270
|
+
body = userBody;
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
body = { ...userBody };
|
|
274
|
+
}
|
|
206
275
|
}
|
|
207
276
|
for (const key in params) {
|
|
208
277
|
if (acceptedBody.includes(key)) {
|
|
@@ -213,7 +282,7 @@ class Indices {
|
|
|
213
282
|
else if (acceptedPath.includes(key)) {
|
|
214
283
|
continue;
|
|
215
284
|
}
|
|
216
|
-
else if (key !== 'body') {
|
|
285
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
217
286
|
// @ts-expect-error
|
|
218
287
|
querystring[key] = params[key];
|
|
219
288
|
}
|
|
@@ -230,13 +299,23 @@ class Indices {
|
|
|
230
299
|
}
|
|
231
300
|
async createDataStream(params, options) {
|
|
232
301
|
const acceptedPath = ['name'];
|
|
233
|
-
const
|
|
234
|
-
const
|
|
302
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
303
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
304
|
+
let body;
|
|
305
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
306
|
+
if (userBody != null) {
|
|
307
|
+
if (typeof userBody === 'string') {
|
|
308
|
+
body = userBody;
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
body = { ...userBody };
|
|
312
|
+
}
|
|
313
|
+
}
|
|
235
314
|
for (const key in params) {
|
|
236
315
|
if (acceptedPath.includes(key)) {
|
|
237
316
|
continue;
|
|
238
317
|
}
|
|
239
|
-
else if (key !== 'body') {
|
|
318
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
240
319
|
// @ts-expect-error
|
|
241
320
|
querystring[key] = params[key];
|
|
242
321
|
}
|
|
@@ -251,16 +330,57 @@ class Indices {
|
|
|
251
330
|
};
|
|
252
331
|
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
253
332
|
}
|
|
333
|
+
async createFrom(params, options) {
|
|
334
|
+
var _a;
|
|
335
|
+
const acceptedPath = ['source', 'dest'];
|
|
336
|
+
const acceptedBody = ['create_from'];
|
|
337
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
338
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
339
|
+
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
340
|
+
for (const key in params) {
|
|
341
|
+
if (acceptedBody.includes(key)) {
|
|
342
|
+
// @ts-expect-error
|
|
343
|
+
body = params[key];
|
|
344
|
+
}
|
|
345
|
+
else if (acceptedPath.includes(key)) {
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
349
|
+
// @ts-expect-error
|
|
350
|
+
querystring[key] = params[key];
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
const method = 'PUT';
|
|
354
|
+
const path = `/_create_from/${encodeURIComponent(params.source.toString())}/${encodeURIComponent(params.dest.toString())}`;
|
|
355
|
+
const meta = {
|
|
356
|
+
name: 'indices.create_from',
|
|
357
|
+
pathParts: {
|
|
358
|
+
source: params.source,
|
|
359
|
+
dest: params.dest
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
363
|
+
}
|
|
254
364
|
async dataStreamsStats(params, options) {
|
|
255
365
|
const acceptedPath = ['name'];
|
|
256
|
-
const
|
|
257
|
-
const
|
|
366
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
367
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
368
|
+
let body;
|
|
369
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
370
|
+
if (userBody != null) {
|
|
371
|
+
if (typeof userBody === 'string') {
|
|
372
|
+
body = userBody;
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
body = { ...userBody };
|
|
376
|
+
}
|
|
377
|
+
}
|
|
258
378
|
params = params !== null && params !== void 0 ? params : {};
|
|
259
379
|
for (const key in params) {
|
|
260
380
|
if (acceptedPath.includes(key)) {
|
|
261
381
|
continue;
|
|
262
382
|
}
|
|
263
|
-
else if (key !== 'body') {
|
|
383
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
264
384
|
// @ts-expect-error
|
|
265
385
|
querystring[key] = params[key];
|
|
266
386
|
}
|
|
@@ -285,13 +405,23 @@ class Indices {
|
|
|
285
405
|
}
|
|
286
406
|
async delete(params, options) {
|
|
287
407
|
const acceptedPath = ['index'];
|
|
288
|
-
const
|
|
289
|
-
const
|
|
408
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
409
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
410
|
+
let body;
|
|
411
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
412
|
+
if (userBody != null) {
|
|
413
|
+
if (typeof userBody === 'string') {
|
|
414
|
+
body = userBody;
|
|
415
|
+
}
|
|
416
|
+
else {
|
|
417
|
+
body = { ...userBody };
|
|
418
|
+
}
|
|
419
|
+
}
|
|
290
420
|
for (const key in params) {
|
|
291
421
|
if (acceptedPath.includes(key)) {
|
|
292
422
|
continue;
|
|
293
423
|
}
|
|
294
|
-
else if (key !== 'body') {
|
|
424
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
295
425
|
// @ts-expect-error
|
|
296
426
|
querystring[key] = params[key];
|
|
297
427
|
}
|
|
@@ -308,13 +438,23 @@ class Indices {
|
|
|
308
438
|
}
|
|
309
439
|
async deleteAlias(params, options) {
|
|
310
440
|
const acceptedPath = ['index', 'name'];
|
|
311
|
-
const
|
|
312
|
-
const
|
|
441
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
442
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
443
|
+
let body;
|
|
444
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
445
|
+
if (userBody != null) {
|
|
446
|
+
if (typeof userBody === 'string') {
|
|
447
|
+
body = userBody;
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
body = { ...userBody };
|
|
451
|
+
}
|
|
452
|
+
}
|
|
313
453
|
for (const key in params) {
|
|
314
454
|
if (acceptedPath.includes(key)) {
|
|
315
455
|
continue;
|
|
316
456
|
}
|
|
317
|
-
else if (key !== 'body') {
|
|
457
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
318
458
|
// @ts-expect-error
|
|
319
459
|
querystring[key] = params[key];
|
|
320
460
|
}
|
|
@@ -340,13 +480,23 @@ class Indices {
|
|
|
340
480
|
}
|
|
341
481
|
async deleteDataLifecycle(params, options) {
|
|
342
482
|
const acceptedPath = ['name'];
|
|
343
|
-
const
|
|
344
|
-
const
|
|
483
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
484
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
485
|
+
let body;
|
|
486
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
487
|
+
if (userBody != null) {
|
|
488
|
+
if (typeof userBody === 'string') {
|
|
489
|
+
body = userBody;
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
body = { ...userBody };
|
|
493
|
+
}
|
|
494
|
+
}
|
|
345
495
|
for (const key in params) {
|
|
346
496
|
if (acceptedPath.includes(key)) {
|
|
347
497
|
continue;
|
|
348
498
|
}
|
|
349
|
-
else if (key !== 'body') {
|
|
499
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
350
500
|
// @ts-expect-error
|
|
351
501
|
querystring[key] = params[key];
|
|
352
502
|
}
|
|
@@ -363,13 +513,23 @@ class Indices {
|
|
|
363
513
|
}
|
|
364
514
|
async deleteDataStream(params, options) {
|
|
365
515
|
const acceptedPath = ['name'];
|
|
366
|
-
const
|
|
367
|
-
const
|
|
516
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
517
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
518
|
+
let body;
|
|
519
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
520
|
+
if (userBody != null) {
|
|
521
|
+
if (typeof userBody === 'string') {
|
|
522
|
+
body = userBody;
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
body = { ...userBody };
|
|
526
|
+
}
|
|
527
|
+
}
|
|
368
528
|
for (const key in params) {
|
|
369
529
|
if (acceptedPath.includes(key)) {
|
|
370
530
|
continue;
|
|
371
531
|
}
|
|
372
|
-
else if (key !== 'body') {
|
|
532
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
373
533
|
// @ts-expect-error
|
|
374
534
|
querystring[key] = params[key];
|
|
375
535
|
}
|
|
@@ -386,13 +546,23 @@ class Indices {
|
|
|
386
546
|
}
|
|
387
547
|
async deleteIndexTemplate(params, options) {
|
|
388
548
|
const acceptedPath = ['name'];
|
|
389
|
-
const
|
|
390
|
-
const
|
|
549
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
550
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
551
|
+
let body;
|
|
552
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
553
|
+
if (userBody != null) {
|
|
554
|
+
if (typeof userBody === 'string') {
|
|
555
|
+
body = userBody;
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
body = { ...userBody };
|
|
559
|
+
}
|
|
560
|
+
}
|
|
391
561
|
for (const key in params) {
|
|
392
562
|
if (acceptedPath.includes(key)) {
|
|
393
563
|
continue;
|
|
394
564
|
}
|
|
395
|
-
else if (key !== 'body') {
|
|
565
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
396
566
|
// @ts-expect-error
|
|
397
567
|
querystring[key] = params[key];
|
|
398
568
|
}
|
|
@@ -409,13 +579,23 @@ class Indices {
|
|
|
409
579
|
}
|
|
410
580
|
async deleteTemplate(params, options) {
|
|
411
581
|
const acceptedPath = ['name'];
|
|
412
|
-
const
|
|
413
|
-
const
|
|
582
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
583
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
584
|
+
let body;
|
|
585
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
586
|
+
if (userBody != null) {
|
|
587
|
+
if (typeof userBody === 'string') {
|
|
588
|
+
body = userBody;
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
body = { ...userBody };
|
|
592
|
+
}
|
|
593
|
+
}
|
|
414
594
|
for (const key in params) {
|
|
415
595
|
if (acceptedPath.includes(key)) {
|
|
416
596
|
continue;
|
|
417
597
|
}
|
|
418
|
-
else if (key !== 'body') {
|
|
598
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
419
599
|
// @ts-expect-error
|
|
420
600
|
querystring[key] = params[key];
|
|
421
601
|
}
|
|
@@ -432,13 +612,23 @@ class Indices {
|
|
|
432
612
|
}
|
|
433
613
|
async diskUsage(params, options) {
|
|
434
614
|
const acceptedPath = ['index'];
|
|
435
|
-
const
|
|
436
|
-
const
|
|
615
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
616
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
617
|
+
let body;
|
|
618
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
619
|
+
if (userBody != null) {
|
|
620
|
+
if (typeof userBody === 'string') {
|
|
621
|
+
body = userBody;
|
|
622
|
+
}
|
|
623
|
+
else {
|
|
624
|
+
body = { ...userBody };
|
|
625
|
+
}
|
|
626
|
+
}
|
|
437
627
|
for (const key in params) {
|
|
438
628
|
if (acceptedPath.includes(key)) {
|
|
439
629
|
continue;
|
|
440
630
|
}
|
|
441
|
-
else if (key !== 'body') {
|
|
631
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
442
632
|
// @ts-expect-error
|
|
443
633
|
querystring[key] = params[key];
|
|
444
634
|
}
|
|
@@ -457,8 +647,8 @@ class Indices {
|
|
|
457
647
|
var _a;
|
|
458
648
|
const acceptedPath = ['index', 'target_index'];
|
|
459
649
|
const acceptedBody = ['config'];
|
|
460
|
-
const
|
|
461
|
-
|
|
650
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
651
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
462
652
|
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
463
653
|
for (const key in params) {
|
|
464
654
|
if (acceptedBody.includes(key)) {
|
|
@@ -468,7 +658,7 @@ class Indices {
|
|
|
468
658
|
else if (acceptedPath.includes(key)) {
|
|
469
659
|
continue;
|
|
470
660
|
}
|
|
471
|
-
else if (key !== 'body') {
|
|
661
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
472
662
|
// @ts-expect-error
|
|
473
663
|
querystring[key] = params[key];
|
|
474
664
|
}
|
|
@@ -486,13 +676,23 @@ class Indices {
|
|
|
486
676
|
}
|
|
487
677
|
async exists(params, options) {
|
|
488
678
|
const acceptedPath = ['index'];
|
|
489
|
-
const
|
|
490
|
-
const
|
|
679
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
680
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
681
|
+
let body;
|
|
682
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
683
|
+
if (userBody != null) {
|
|
684
|
+
if (typeof userBody === 'string') {
|
|
685
|
+
body = userBody;
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
body = { ...userBody };
|
|
689
|
+
}
|
|
690
|
+
}
|
|
491
691
|
for (const key in params) {
|
|
492
692
|
if (acceptedPath.includes(key)) {
|
|
493
693
|
continue;
|
|
494
694
|
}
|
|
495
|
-
else if (key !== 'body') {
|
|
695
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
496
696
|
// @ts-expect-error
|
|
497
697
|
querystring[key] = params[key];
|
|
498
698
|
}
|
|
@@ -509,13 +709,23 @@ class Indices {
|
|
|
509
709
|
}
|
|
510
710
|
async existsAlias(params, options) {
|
|
511
711
|
const acceptedPath = ['name', 'index'];
|
|
512
|
-
const
|
|
513
|
-
const
|
|
712
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
713
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
714
|
+
let body;
|
|
715
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
716
|
+
if (userBody != null) {
|
|
717
|
+
if (typeof userBody === 'string') {
|
|
718
|
+
body = userBody;
|
|
719
|
+
}
|
|
720
|
+
else {
|
|
721
|
+
body = { ...userBody };
|
|
722
|
+
}
|
|
723
|
+
}
|
|
514
724
|
for (const key in params) {
|
|
515
725
|
if (acceptedPath.includes(key)) {
|
|
516
726
|
continue;
|
|
517
727
|
}
|
|
518
|
-
else if (key !== 'body') {
|
|
728
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
519
729
|
// @ts-expect-error
|
|
520
730
|
querystring[key] = params[key];
|
|
521
731
|
}
|
|
@@ -541,13 +751,23 @@ class Indices {
|
|
|
541
751
|
}
|
|
542
752
|
async existsIndexTemplate(params, options) {
|
|
543
753
|
const acceptedPath = ['name'];
|
|
544
|
-
const
|
|
545
|
-
const
|
|
754
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
755
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
756
|
+
let body;
|
|
757
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
758
|
+
if (userBody != null) {
|
|
759
|
+
if (typeof userBody === 'string') {
|
|
760
|
+
body = userBody;
|
|
761
|
+
}
|
|
762
|
+
else {
|
|
763
|
+
body = { ...userBody };
|
|
764
|
+
}
|
|
765
|
+
}
|
|
546
766
|
for (const key in params) {
|
|
547
767
|
if (acceptedPath.includes(key)) {
|
|
548
768
|
continue;
|
|
549
769
|
}
|
|
550
|
-
else if (key !== 'body') {
|
|
770
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
551
771
|
// @ts-expect-error
|
|
552
772
|
querystring[key] = params[key];
|
|
553
773
|
}
|
|
@@ -564,13 +784,23 @@ class Indices {
|
|
|
564
784
|
}
|
|
565
785
|
async existsTemplate(params, options) {
|
|
566
786
|
const acceptedPath = ['name'];
|
|
567
|
-
const
|
|
568
|
-
const
|
|
787
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
788
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
789
|
+
let body;
|
|
790
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
791
|
+
if (userBody != null) {
|
|
792
|
+
if (typeof userBody === 'string') {
|
|
793
|
+
body = userBody;
|
|
794
|
+
}
|
|
795
|
+
else {
|
|
796
|
+
body = { ...userBody };
|
|
797
|
+
}
|
|
798
|
+
}
|
|
569
799
|
for (const key in params) {
|
|
570
800
|
if (acceptedPath.includes(key)) {
|
|
571
801
|
continue;
|
|
572
802
|
}
|
|
573
|
-
else if (key !== 'body') {
|
|
803
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
574
804
|
// @ts-expect-error
|
|
575
805
|
querystring[key] = params[key];
|
|
576
806
|
}
|
|
@@ -587,13 +817,23 @@ class Indices {
|
|
|
587
817
|
}
|
|
588
818
|
async explainDataLifecycle(params, options) {
|
|
589
819
|
const acceptedPath = ['index'];
|
|
590
|
-
const
|
|
591
|
-
const
|
|
820
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
821
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
822
|
+
let body;
|
|
823
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
824
|
+
if (userBody != null) {
|
|
825
|
+
if (typeof userBody === 'string') {
|
|
826
|
+
body = userBody;
|
|
827
|
+
}
|
|
828
|
+
else {
|
|
829
|
+
body = { ...userBody };
|
|
830
|
+
}
|
|
831
|
+
}
|
|
592
832
|
for (const key in params) {
|
|
593
833
|
if (acceptedPath.includes(key)) {
|
|
594
834
|
continue;
|
|
595
835
|
}
|
|
596
|
-
else if (key !== 'body') {
|
|
836
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
597
837
|
// @ts-expect-error
|
|
598
838
|
querystring[key] = params[key];
|
|
599
839
|
}
|
|
@@ -610,13 +850,23 @@ class Indices {
|
|
|
610
850
|
}
|
|
611
851
|
async fieldUsageStats(params, options) {
|
|
612
852
|
const acceptedPath = ['index'];
|
|
613
|
-
const
|
|
614
|
-
const
|
|
853
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
854
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
855
|
+
let body;
|
|
856
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
857
|
+
if (userBody != null) {
|
|
858
|
+
if (typeof userBody === 'string') {
|
|
859
|
+
body = userBody;
|
|
860
|
+
}
|
|
861
|
+
else {
|
|
862
|
+
body = { ...userBody };
|
|
863
|
+
}
|
|
864
|
+
}
|
|
615
865
|
for (const key in params) {
|
|
616
866
|
if (acceptedPath.includes(key)) {
|
|
617
867
|
continue;
|
|
618
868
|
}
|
|
619
|
-
else if (key !== 'body') {
|
|
869
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
620
870
|
// @ts-expect-error
|
|
621
871
|
querystring[key] = params[key];
|
|
622
872
|
}
|
|
@@ -633,14 +883,24 @@ class Indices {
|
|
|
633
883
|
}
|
|
634
884
|
async flush(params, options) {
|
|
635
885
|
const acceptedPath = ['index'];
|
|
636
|
-
const
|
|
637
|
-
const
|
|
886
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
887
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
888
|
+
let body;
|
|
889
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
890
|
+
if (userBody != null) {
|
|
891
|
+
if (typeof userBody === 'string') {
|
|
892
|
+
body = userBody;
|
|
893
|
+
}
|
|
894
|
+
else {
|
|
895
|
+
body = { ...userBody };
|
|
896
|
+
}
|
|
897
|
+
}
|
|
638
898
|
params = params !== null && params !== void 0 ? params : {};
|
|
639
899
|
for (const key in params) {
|
|
640
900
|
if (acceptedPath.includes(key)) {
|
|
641
901
|
continue;
|
|
642
902
|
}
|
|
643
|
-
else if (key !== 'body') {
|
|
903
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
644
904
|
// @ts-expect-error
|
|
645
905
|
querystring[key] = params[key];
|
|
646
906
|
}
|
|
@@ -665,14 +925,24 @@ class Indices {
|
|
|
665
925
|
}
|
|
666
926
|
async forcemerge(params, options) {
|
|
667
927
|
const acceptedPath = ['index'];
|
|
668
|
-
const
|
|
669
|
-
const
|
|
928
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
929
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
930
|
+
let body;
|
|
931
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
932
|
+
if (userBody != null) {
|
|
933
|
+
if (typeof userBody === 'string') {
|
|
934
|
+
body = userBody;
|
|
935
|
+
}
|
|
936
|
+
else {
|
|
937
|
+
body = { ...userBody };
|
|
938
|
+
}
|
|
939
|
+
}
|
|
670
940
|
params = params !== null && params !== void 0 ? params : {};
|
|
671
941
|
for (const key in params) {
|
|
672
942
|
if (acceptedPath.includes(key)) {
|
|
673
943
|
continue;
|
|
674
944
|
}
|
|
675
|
-
else if (key !== 'body') {
|
|
945
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
676
946
|
// @ts-expect-error
|
|
677
947
|
querystring[key] = params[key];
|
|
678
948
|
}
|
|
@@ -697,13 +967,23 @@ class Indices {
|
|
|
697
967
|
}
|
|
698
968
|
async get(params, options) {
|
|
699
969
|
const acceptedPath = ['index'];
|
|
700
|
-
const
|
|
701
|
-
const
|
|
970
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
971
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
972
|
+
let body;
|
|
973
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
974
|
+
if (userBody != null) {
|
|
975
|
+
if (typeof userBody === 'string') {
|
|
976
|
+
body = userBody;
|
|
977
|
+
}
|
|
978
|
+
else {
|
|
979
|
+
body = { ...userBody };
|
|
980
|
+
}
|
|
981
|
+
}
|
|
702
982
|
for (const key in params) {
|
|
703
983
|
if (acceptedPath.includes(key)) {
|
|
704
984
|
continue;
|
|
705
985
|
}
|
|
706
|
-
else if (key !== 'body') {
|
|
986
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
707
987
|
// @ts-expect-error
|
|
708
988
|
querystring[key] = params[key];
|
|
709
989
|
}
|
|
@@ -720,14 +1000,24 @@ class Indices {
|
|
|
720
1000
|
}
|
|
721
1001
|
async getAlias(params, options) {
|
|
722
1002
|
const acceptedPath = ['name', 'index'];
|
|
723
|
-
const
|
|
724
|
-
const
|
|
1003
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1004
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1005
|
+
let body;
|
|
1006
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1007
|
+
if (userBody != null) {
|
|
1008
|
+
if (typeof userBody === 'string') {
|
|
1009
|
+
body = userBody;
|
|
1010
|
+
}
|
|
1011
|
+
else {
|
|
1012
|
+
body = { ...userBody };
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
725
1015
|
params = params !== null && params !== void 0 ? params : {};
|
|
726
1016
|
for (const key in params) {
|
|
727
1017
|
if (acceptedPath.includes(key)) {
|
|
728
1018
|
continue;
|
|
729
1019
|
}
|
|
730
|
-
else if (key !== 'body') {
|
|
1020
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
731
1021
|
// @ts-expect-error
|
|
732
1022
|
querystring[key] = params[key];
|
|
733
1023
|
}
|
|
@@ -761,13 +1051,23 @@ class Indices {
|
|
|
761
1051
|
}
|
|
762
1052
|
async getDataLifecycle(params, options) {
|
|
763
1053
|
const acceptedPath = ['name'];
|
|
764
|
-
const
|
|
765
|
-
const
|
|
1054
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1055
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1056
|
+
let body;
|
|
1057
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1058
|
+
if (userBody != null) {
|
|
1059
|
+
if (typeof userBody === 'string') {
|
|
1060
|
+
body = userBody;
|
|
1061
|
+
}
|
|
1062
|
+
else {
|
|
1063
|
+
body = { ...userBody };
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
766
1066
|
for (const key in params) {
|
|
767
1067
|
if (acceptedPath.includes(key)) {
|
|
768
1068
|
continue;
|
|
769
1069
|
}
|
|
770
|
-
else if (key !== 'body') {
|
|
1070
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
771
1071
|
// @ts-expect-error
|
|
772
1072
|
querystring[key] = params[key];
|
|
773
1073
|
}
|
|
@@ -784,14 +1084,24 @@ class Indices {
|
|
|
784
1084
|
}
|
|
785
1085
|
async getDataLifecycleStats(params, options) {
|
|
786
1086
|
const acceptedPath = [];
|
|
787
|
-
const
|
|
788
|
-
const
|
|
1087
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1088
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1089
|
+
let body;
|
|
1090
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1091
|
+
if (userBody != null) {
|
|
1092
|
+
if (typeof userBody === 'string') {
|
|
1093
|
+
body = userBody;
|
|
1094
|
+
}
|
|
1095
|
+
else {
|
|
1096
|
+
body = { ...userBody };
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
789
1099
|
params = params !== null && params !== void 0 ? params : {};
|
|
790
1100
|
for (const key in params) {
|
|
791
1101
|
if (acceptedPath.includes(key)) {
|
|
792
1102
|
continue;
|
|
793
1103
|
}
|
|
794
|
-
else if (key !== 'body') {
|
|
1104
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
795
1105
|
// @ts-expect-error
|
|
796
1106
|
querystring[key] = params[key];
|
|
797
1107
|
}
|
|
@@ -805,14 +1115,24 @@ class Indices {
|
|
|
805
1115
|
}
|
|
806
1116
|
async getDataStream(params, options) {
|
|
807
1117
|
const acceptedPath = ['name'];
|
|
808
|
-
const
|
|
809
|
-
const
|
|
1118
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1119
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1120
|
+
let body;
|
|
1121
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1122
|
+
if (userBody != null) {
|
|
1123
|
+
if (typeof userBody === 'string') {
|
|
1124
|
+
body = userBody;
|
|
1125
|
+
}
|
|
1126
|
+
else {
|
|
1127
|
+
body = { ...userBody };
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
810
1130
|
params = params !== null && params !== void 0 ? params : {};
|
|
811
1131
|
for (const key in params) {
|
|
812
1132
|
if (acceptedPath.includes(key)) {
|
|
813
1133
|
continue;
|
|
814
1134
|
}
|
|
815
|
-
else if (key !== 'body') {
|
|
1135
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
816
1136
|
// @ts-expect-error
|
|
817
1137
|
querystring[key] = params[key];
|
|
818
1138
|
}
|
|
@@ -837,13 +1157,23 @@ class Indices {
|
|
|
837
1157
|
}
|
|
838
1158
|
async getFieldMapping(params, options) {
|
|
839
1159
|
const acceptedPath = ['fields', 'index'];
|
|
840
|
-
const
|
|
841
|
-
const
|
|
1160
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1161
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1162
|
+
let body;
|
|
1163
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1164
|
+
if (userBody != null) {
|
|
1165
|
+
if (typeof userBody === 'string') {
|
|
1166
|
+
body = userBody;
|
|
1167
|
+
}
|
|
1168
|
+
else {
|
|
1169
|
+
body = { ...userBody };
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
842
1172
|
for (const key in params) {
|
|
843
1173
|
if (acceptedPath.includes(key)) {
|
|
844
1174
|
continue;
|
|
845
1175
|
}
|
|
846
|
-
else if (key !== 'body') {
|
|
1176
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
847
1177
|
// @ts-expect-error
|
|
848
1178
|
querystring[key] = params[key];
|
|
849
1179
|
}
|
|
@@ -869,14 +1199,24 @@ class Indices {
|
|
|
869
1199
|
}
|
|
870
1200
|
async getIndexTemplate(params, options) {
|
|
871
1201
|
const acceptedPath = ['name'];
|
|
872
|
-
const
|
|
873
|
-
const
|
|
1202
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1203
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1204
|
+
let body;
|
|
1205
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1206
|
+
if (userBody != null) {
|
|
1207
|
+
if (typeof userBody === 'string') {
|
|
1208
|
+
body = userBody;
|
|
1209
|
+
}
|
|
1210
|
+
else {
|
|
1211
|
+
body = { ...userBody };
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
874
1214
|
params = params !== null && params !== void 0 ? params : {};
|
|
875
1215
|
for (const key in params) {
|
|
876
1216
|
if (acceptedPath.includes(key)) {
|
|
877
1217
|
continue;
|
|
878
1218
|
}
|
|
879
|
-
else if (key !== 'body') {
|
|
1219
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
880
1220
|
// @ts-expect-error
|
|
881
1221
|
querystring[key] = params[key];
|
|
882
1222
|
}
|
|
@@ -901,14 +1241,24 @@ class Indices {
|
|
|
901
1241
|
}
|
|
902
1242
|
async getMapping(params, options) {
|
|
903
1243
|
const acceptedPath = ['index'];
|
|
904
|
-
const
|
|
905
|
-
const
|
|
1244
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1245
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1246
|
+
let body;
|
|
1247
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1248
|
+
if (userBody != null) {
|
|
1249
|
+
if (typeof userBody === 'string') {
|
|
1250
|
+
body = userBody;
|
|
1251
|
+
}
|
|
1252
|
+
else {
|
|
1253
|
+
body = { ...userBody };
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
906
1256
|
params = params !== null && params !== void 0 ? params : {};
|
|
907
1257
|
for (const key in params) {
|
|
908
1258
|
if (acceptedPath.includes(key)) {
|
|
909
1259
|
continue;
|
|
910
1260
|
}
|
|
911
|
-
else if (key !== 'body') {
|
|
1261
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
912
1262
|
// @ts-expect-error
|
|
913
1263
|
querystring[key] = params[key];
|
|
914
1264
|
}
|
|
@@ -931,16 +1281,59 @@ class Indices {
|
|
|
931
1281
|
};
|
|
932
1282
|
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
933
1283
|
}
|
|
1284
|
+
async getMigrateReindexStatus(params, options) {
|
|
1285
|
+
const acceptedPath = ['index'];
|
|
1286
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1287
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1288
|
+
let body;
|
|
1289
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1290
|
+
if (userBody != null) {
|
|
1291
|
+
if (typeof userBody === 'string') {
|
|
1292
|
+
body = userBody;
|
|
1293
|
+
}
|
|
1294
|
+
else {
|
|
1295
|
+
body = { ...userBody };
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
for (const key in params) {
|
|
1299
|
+
if (acceptedPath.includes(key)) {
|
|
1300
|
+
continue;
|
|
1301
|
+
}
|
|
1302
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1303
|
+
// @ts-expect-error
|
|
1304
|
+
querystring[key] = params[key];
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
const method = 'GET';
|
|
1308
|
+
const path = `/_migration/reindex/${encodeURIComponent(params.index.toString())}/_status`;
|
|
1309
|
+
const meta = {
|
|
1310
|
+
name: 'indices.get_migrate_reindex_status',
|
|
1311
|
+
pathParts: {
|
|
1312
|
+
index: params.index
|
|
1313
|
+
}
|
|
1314
|
+
};
|
|
1315
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1316
|
+
}
|
|
934
1317
|
async getSettings(params, options) {
|
|
935
1318
|
const acceptedPath = ['index', 'name'];
|
|
936
|
-
const
|
|
937
|
-
const
|
|
1319
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1320
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1321
|
+
let body;
|
|
1322
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1323
|
+
if (userBody != null) {
|
|
1324
|
+
if (typeof userBody === 'string') {
|
|
1325
|
+
body = userBody;
|
|
1326
|
+
}
|
|
1327
|
+
else {
|
|
1328
|
+
body = { ...userBody };
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
938
1331
|
params = params !== null && params !== void 0 ? params : {};
|
|
939
1332
|
for (const key in params) {
|
|
940
1333
|
if (acceptedPath.includes(key)) {
|
|
941
1334
|
continue;
|
|
942
1335
|
}
|
|
943
|
-
else if (key !== 'body') {
|
|
1336
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
944
1337
|
// @ts-expect-error
|
|
945
1338
|
querystring[key] = params[key];
|
|
946
1339
|
}
|
|
@@ -974,14 +1367,24 @@ class Indices {
|
|
|
974
1367
|
}
|
|
975
1368
|
async getTemplate(params, options) {
|
|
976
1369
|
const acceptedPath = ['name'];
|
|
977
|
-
const
|
|
978
|
-
const
|
|
1370
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1371
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1372
|
+
let body;
|
|
1373
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1374
|
+
if (userBody != null) {
|
|
1375
|
+
if (typeof userBody === 'string') {
|
|
1376
|
+
body = userBody;
|
|
1377
|
+
}
|
|
1378
|
+
else {
|
|
1379
|
+
body = { ...userBody };
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
979
1382
|
params = params !== null && params !== void 0 ? params : {};
|
|
980
1383
|
for (const key in params) {
|
|
981
1384
|
if (acceptedPath.includes(key)) {
|
|
982
1385
|
continue;
|
|
983
1386
|
}
|
|
984
|
-
else if (key !== 'body') {
|
|
1387
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
985
1388
|
// @ts-expect-error
|
|
986
1389
|
querystring[key] = params[key];
|
|
987
1390
|
}
|
|
@@ -1004,15 +1407,52 @@ class Indices {
|
|
|
1004
1407
|
};
|
|
1005
1408
|
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1006
1409
|
}
|
|
1410
|
+
async migrateReindex(params, options) {
|
|
1411
|
+
var _a;
|
|
1412
|
+
const acceptedPath = [];
|
|
1413
|
+
const acceptedBody = ['reindex'];
|
|
1414
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1415
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1416
|
+
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
1417
|
+
for (const key in params) {
|
|
1418
|
+
if (acceptedBody.includes(key)) {
|
|
1419
|
+
// @ts-expect-error
|
|
1420
|
+
body = params[key];
|
|
1421
|
+
}
|
|
1422
|
+
else if (acceptedPath.includes(key)) {
|
|
1423
|
+
continue;
|
|
1424
|
+
}
|
|
1425
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1426
|
+
// @ts-expect-error
|
|
1427
|
+
querystring[key] = params[key];
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
const method = 'POST';
|
|
1431
|
+
const path = '/_migration/reindex';
|
|
1432
|
+
const meta = {
|
|
1433
|
+
name: 'indices.migrate_reindex'
|
|
1434
|
+
};
|
|
1435
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1436
|
+
}
|
|
1007
1437
|
async migrateToDataStream(params, options) {
|
|
1008
1438
|
const acceptedPath = ['name'];
|
|
1009
|
-
const
|
|
1010
|
-
const
|
|
1439
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1440
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1441
|
+
let body;
|
|
1442
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1443
|
+
if (userBody != null) {
|
|
1444
|
+
if (typeof userBody === 'string') {
|
|
1445
|
+
body = userBody;
|
|
1446
|
+
}
|
|
1447
|
+
else {
|
|
1448
|
+
body = { ...userBody };
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1011
1451
|
for (const key in params) {
|
|
1012
1452
|
if (acceptedPath.includes(key)) {
|
|
1013
1453
|
continue;
|
|
1014
1454
|
}
|
|
1015
|
-
else if (key !== 'body') {
|
|
1455
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1016
1456
|
// @ts-expect-error
|
|
1017
1457
|
querystring[key] = params[key];
|
|
1018
1458
|
}
|
|
@@ -1030,15 +1470,17 @@ class Indices {
|
|
|
1030
1470
|
async modifyDataStream(params, options) {
|
|
1031
1471
|
const acceptedPath = [];
|
|
1032
1472
|
const acceptedBody = ['actions'];
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1035
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1473
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1474
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1036
1475
|
let body;
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1476
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1477
|
+
if (userBody != null) {
|
|
1478
|
+
if (typeof userBody === 'string') {
|
|
1479
|
+
body = userBody;
|
|
1480
|
+
}
|
|
1481
|
+
else {
|
|
1482
|
+
body = { ...userBody };
|
|
1483
|
+
}
|
|
1042
1484
|
}
|
|
1043
1485
|
for (const key in params) {
|
|
1044
1486
|
if (acceptedBody.includes(key)) {
|
|
@@ -1049,7 +1491,7 @@ class Indices {
|
|
|
1049
1491
|
else if (acceptedPath.includes(key)) {
|
|
1050
1492
|
continue;
|
|
1051
1493
|
}
|
|
1052
|
-
else if (key !== 'body') {
|
|
1494
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1053
1495
|
// @ts-expect-error
|
|
1054
1496
|
querystring[key] = params[key];
|
|
1055
1497
|
}
|
|
@@ -1063,13 +1505,23 @@ class Indices {
|
|
|
1063
1505
|
}
|
|
1064
1506
|
async open(params, options) {
|
|
1065
1507
|
const acceptedPath = ['index'];
|
|
1066
|
-
const
|
|
1067
|
-
const
|
|
1508
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1509
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1510
|
+
let body;
|
|
1511
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1512
|
+
if (userBody != null) {
|
|
1513
|
+
if (typeof userBody === 'string') {
|
|
1514
|
+
body = userBody;
|
|
1515
|
+
}
|
|
1516
|
+
else {
|
|
1517
|
+
body = { ...userBody };
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1068
1520
|
for (const key in params) {
|
|
1069
1521
|
if (acceptedPath.includes(key)) {
|
|
1070
1522
|
continue;
|
|
1071
1523
|
}
|
|
1072
|
-
else if (key !== 'body') {
|
|
1524
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1073
1525
|
// @ts-expect-error
|
|
1074
1526
|
querystring[key] = params[key];
|
|
1075
1527
|
}
|
|
@@ -1086,13 +1538,23 @@ class Indices {
|
|
|
1086
1538
|
}
|
|
1087
1539
|
async promoteDataStream(params, options) {
|
|
1088
1540
|
const acceptedPath = ['name'];
|
|
1089
|
-
const
|
|
1090
|
-
const
|
|
1541
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1542
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1543
|
+
let body;
|
|
1544
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1545
|
+
if (userBody != null) {
|
|
1546
|
+
if (typeof userBody === 'string') {
|
|
1547
|
+
body = userBody;
|
|
1548
|
+
}
|
|
1549
|
+
else {
|
|
1550
|
+
body = { ...userBody };
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1091
1553
|
for (const key in params) {
|
|
1092
1554
|
if (acceptedPath.includes(key)) {
|
|
1093
1555
|
continue;
|
|
1094
1556
|
}
|
|
1095
|
-
else if (key !== 'body') {
|
|
1557
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1096
1558
|
// @ts-expect-error
|
|
1097
1559
|
querystring[key] = params[key];
|
|
1098
1560
|
}
|
|
@@ -1110,15 +1572,17 @@ class Indices {
|
|
|
1110
1572
|
async putAlias(params, options) {
|
|
1111
1573
|
const acceptedPath = ['index', 'name'];
|
|
1112
1574
|
const acceptedBody = ['filter', 'index_routing', 'is_write_index', 'routing', 'search_routing'];
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1115
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1575
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1576
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1116
1577
|
let body;
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1578
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1579
|
+
if (userBody != null) {
|
|
1580
|
+
if (typeof userBody === 'string') {
|
|
1581
|
+
body = userBody;
|
|
1582
|
+
}
|
|
1583
|
+
else {
|
|
1584
|
+
body = { ...userBody };
|
|
1585
|
+
}
|
|
1122
1586
|
}
|
|
1123
1587
|
for (const key in params) {
|
|
1124
1588
|
if (acceptedBody.includes(key)) {
|
|
@@ -1129,7 +1593,7 @@ class Indices {
|
|
|
1129
1593
|
else if (acceptedPath.includes(key)) {
|
|
1130
1594
|
continue;
|
|
1131
1595
|
}
|
|
1132
|
-
else if (key !== 'body') {
|
|
1596
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1133
1597
|
// @ts-expect-error
|
|
1134
1598
|
querystring[key] = params[key];
|
|
1135
1599
|
}
|
|
@@ -1154,28 +1618,21 @@ class Indices {
|
|
|
1154
1618
|
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1155
1619
|
}
|
|
1156
1620
|
async putDataLifecycle(params, options) {
|
|
1621
|
+
var _a;
|
|
1157
1622
|
const acceptedPath = ['name'];
|
|
1158
|
-
const acceptedBody = ['
|
|
1159
|
-
const
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
let body;
|
|
1163
|
-
if (typeof userBody === 'string') {
|
|
1164
|
-
body = userBody;
|
|
1165
|
-
}
|
|
1166
|
-
else {
|
|
1167
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1168
|
-
}
|
|
1623
|
+
const acceptedBody = ['lifecycle'];
|
|
1624
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1625
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1626
|
+
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
1169
1627
|
for (const key in params) {
|
|
1170
1628
|
if (acceptedBody.includes(key)) {
|
|
1171
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1172
1629
|
// @ts-expect-error
|
|
1173
|
-
body
|
|
1630
|
+
body = params[key];
|
|
1174
1631
|
}
|
|
1175
1632
|
else if (acceptedPath.includes(key)) {
|
|
1176
1633
|
continue;
|
|
1177
1634
|
}
|
|
1178
|
-
else if (key !== 'body') {
|
|
1635
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1179
1636
|
// @ts-expect-error
|
|
1180
1637
|
querystring[key] = params[key];
|
|
1181
1638
|
}
|
|
@@ -1193,15 +1650,17 @@ class Indices {
|
|
|
1193
1650
|
async putIndexTemplate(params, options) {
|
|
1194
1651
|
const acceptedPath = ['name'];
|
|
1195
1652
|
const acceptedBody = ['index_patterns', 'composed_of', 'template', 'data_stream', 'priority', 'version', '_meta', 'allow_auto_create', 'ignore_missing_component_templates', 'deprecated'];
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1653
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1654
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1199
1655
|
let body;
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1656
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1657
|
+
if (userBody != null) {
|
|
1658
|
+
if (typeof userBody === 'string') {
|
|
1659
|
+
body = userBody;
|
|
1660
|
+
}
|
|
1661
|
+
else {
|
|
1662
|
+
body = { ...userBody };
|
|
1663
|
+
}
|
|
1205
1664
|
}
|
|
1206
1665
|
for (const key in params) {
|
|
1207
1666
|
if (acceptedBody.includes(key)) {
|
|
@@ -1212,7 +1671,7 @@ class Indices {
|
|
|
1212
1671
|
else if (acceptedPath.includes(key)) {
|
|
1213
1672
|
continue;
|
|
1214
1673
|
}
|
|
1215
|
-
else if (key !== 'body') {
|
|
1674
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1216
1675
|
// @ts-expect-error
|
|
1217
1676
|
querystring[key] = params[key];
|
|
1218
1677
|
}
|
|
@@ -1230,15 +1689,17 @@ class Indices {
|
|
|
1230
1689
|
async putMapping(params, options) {
|
|
1231
1690
|
const acceptedPath = ['index'];
|
|
1232
1691
|
const acceptedBody = ['date_detection', 'dynamic', 'dynamic_date_formats', 'dynamic_templates', '_field_names', '_meta', 'numeric_detection', 'properties', '_routing', '_source', 'runtime'];
|
|
1233
|
-
const
|
|
1234
|
-
|
|
1235
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1692
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1693
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1236
1694
|
let body;
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1695
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1696
|
+
if (userBody != null) {
|
|
1697
|
+
if (typeof userBody === 'string') {
|
|
1698
|
+
body = userBody;
|
|
1699
|
+
}
|
|
1700
|
+
else {
|
|
1701
|
+
body = { ...userBody };
|
|
1702
|
+
}
|
|
1242
1703
|
}
|
|
1243
1704
|
for (const key in params) {
|
|
1244
1705
|
if (acceptedBody.includes(key)) {
|
|
@@ -1249,7 +1710,7 @@ class Indices {
|
|
|
1249
1710
|
else if (acceptedPath.includes(key)) {
|
|
1250
1711
|
continue;
|
|
1251
1712
|
}
|
|
1252
|
-
else if (key !== 'body') {
|
|
1713
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1253
1714
|
// @ts-expect-error
|
|
1254
1715
|
querystring[key] = params[key];
|
|
1255
1716
|
}
|
|
@@ -1268,8 +1729,8 @@ class Indices {
|
|
|
1268
1729
|
var _a;
|
|
1269
1730
|
const acceptedPath = ['index'];
|
|
1270
1731
|
const acceptedBody = ['settings'];
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1732
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1733
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1273
1734
|
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
1274
1735
|
for (const key in params) {
|
|
1275
1736
|
if (acceptedBody.includes(key)) {
|
|
@@ -1279,7 +1740,7 @@ class Indices {
|
|
|
1279
1740
|
else if (acceptedPath.includes(key)) {
|
|
1280
1741
|
continue;
|
|
1281
1742
|
}
|
|
1282
|
-
else if (key !== 'body') {
|
|
1743
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1283
1744
|
// @ts-expect-error
|
|
1284
1745
|
querystring[key] = params[key];
|
|
1285
1746
|
}
|
|
@@ -1305,15 +1766,17 @@ class Indices {
|
|
|
1305
1766
|
async putTemplate(params, options) {
|
|
1306
1767
|
const acceptedPath = ['name'];
|
|
1307
1768
|
const acceptedBody = ['aliases', 'index_patterns', 'mappings', 'order', 'settings', 'version'];
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1310
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1769
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1770
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1311
1771
|
let body;
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1772
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1773
|
+
if (userBody != null) {
|
|
1774
|
+
if (typeof userBody === 'string') {
|
|
1775
|
+
body = userBody;
|
|
1776
|
+
}
|
|
1777
|
+
else {
|
|
1778
|
+
body = { ...userBody };
|
|
1779
|
+
}
|
|
1317
1780
|
}
|
|
1318
1781
|
for (const key in params) {
|
|
1319
1782
|
if (acceptedBody.includes(key)) {
|
|
@@ -1324,7 +1787,7 @@ class Indices {
|
|
|
1324
1787
|
else if (acceptedPath.includes(key)) {
|
|
1325
1788
|
continue;
|
|
1326
1789
|
}
|
|
1327
|
-
else if (key !== 'body') {
|
|
1790
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1328
1791
|
// @ts-expect-error
|
|
1329
1792
|
querystring[key] = params[key];
|
|
1330
1793
|
}
|
|
@@ -1341,14 +1804,24 @@ class Indices {
|
|
|
1341
1804
|
}
|
|
1342
1805
|
async recovery(params, options) {
|
|
1343
1806
|
const acceptedPath = ['index'];
|
|
1344
|
-
const
|
|
1345
|
-
const
|
|
1807
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1808
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1809
|
+
let body;
|
|
1810
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1811
|
+
if (userBody != null) {
|
|
1812
|
+
if (typeof userBody === 'string') {
|
|
1813
|
+
body = userBody;
|
|
1814
|
+
}
|
|
1815
|
+
else {
|
|
1816
|
+
body = { ...userBody };
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1346
1819
|
params = params !== null && params !== void 0 ? params : {};
|
|
1347
1820
|
for (const key in params) {
|
|
1348
1821
|
if (acceptedPath.includes(key)) {
|
|
1349
1822
|
continue;
|
|
1350
1823
|
}
|
|
1351
|
-
else if (key !== 'body') {
|
|
1824
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1352
1825
|
// @ts-expect-error
|
|
1353
1826
|
querystring[key] = params[key];
|
|
1354
1827
|
}
|
|
@@ -1373,14 +1846,24 @@ class Indices {
|
|
|
1373
1846
|
}
|
|
1374
1847
|
async refresh(params, options) {
|
|
1375
1848
|
const acceptedPath = ['index'];
|
|
1376
|
-
const
|
|
1377
|
-
const
|
|
1849
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1850
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1851
|
+
let body;
|
|
1852
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1853
|
+
if (userBody != null) {
|
|
1854
|
+
if (typeof userBody === 'string') {
|
|
1855
|
+
body = userBody;
|
|
1856
|
+
}
|
|
1857
|
+
else {
|
|
1858
|
+
body = { ...userBody };
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1378
1861
|
params = params !== null && params !== void 0 ? params : {};
|
|
1379
1862
|
for (const key in params) {
|
|
1380
1863
|
if (acceptedPath.includes(key)) {
|
|
1381
1864
|
continue;
|
|
1382
1865
|
}
|
|
1383
|
-
else if (key !== 'body') {
|
|
1866
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1384
1867
|
// @ts-expect-error
|
|
1385
1868
|
querystring[key] = params[key];
|
|
1386
1869
|
}
|
|
@@ -1405,13 +1888,23 @@ class Indices {
|
|
|
1405
1888
|
}
|
|
1406
1889
|
async reloadSearchAnalyzers(params, options) {
|
|
1407
1890
|
const acceptedPath = ['index'];
|
|
1408
|
-
const
|
|
1409
|
-
const
|
|
1891
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1892
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1893
|
+
let body;
|
|
1894
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1895
|
+
if (userBody != null) {
|
|
1896
|
+
if (typeof userBody === 'string') {
|
|
1897
|
+
body = userBody;
|
|
1898
|
+
}
|
|
1899
|
+
else {
|
|
1900
|
+
body = { ...userBody };
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1410
1903
|
for (const key in params) {
|
|
1411
1904
|
if (acceptedPath.includes(key)) {
|
|
1412
1905
|
continue;
|
|
1413
1906
|
}
|
|
1414
|
-
else if (key !== 'body') {
|
|
1907
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1415
1908
|
// @ts-expect-error
|
|
1416
1909
|
querystring[key] = params[key];
|
|
1417
1910
|
}
|
|
@@ -1428,13 +1921,23 @@ class Indices {
|
|
|
1428
1921
|
}
|
|
1429
1922
|
async resolveCluster(params, options) {
|
|
1430
1923
|
const acceptedPath = ['name'];
|
|
1431
|
-
const
|
|
1432
|
-
const
|
|
1924
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1925
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1926
|
+
let body;
|
|
1927
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1928
|
+
if (userBody != null) {
|
|
1929
|
+
if (typeof userBody === 'string') {
|
|
1930
|
+
body = userBody;
|
|
1931
|
+
}
|
|
1932
|
+
else {
|
|
1933
|
+
body = { ...userBody };
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1433
1936
|
for (const key in params) {
|
|
1434
1937
|
if (acceptedPath.includes(key)) {
|
|
1435
1938
|
continue;
|
|
1436
1939
|
}
|
|
1437
|
-
else if (key !== 'body') {
|
|
1940
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1438
1941
|
// @ts-expect-error
|
|
1439
1942
|
querystring[key] = params[key];
|
|
1440
1943
|
}
|
|
@@ -1451,13 +1954,23 @@ class Indices {
|
|
|
1451
1954
|
}
|
|
1452
1955
|
async resolveIndex(params, options) {
|
|
1453
1956
|
const acceptedPath = ['name'];
|
|
1454
|
-
const
|
|
1455
|
-
const
|
|
1957
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1958
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1959
|
+
let body;
|
|
1960
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1961
|
+
if (userBody != null) {
|
|
1962
|
+
if (typeof userBody === 'string') {
|
|
1963
|
+
body = userBody;
|
|
1964
|
+
}
|
|
1965
|
+
else {
|
|
1966
|
+
body = { ...userBody };
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1456
1969
|
for (const key in params) {
|
|
1457
1970
|
if (acceptedPath.includes(key)) {
|
|
1458
1971
|
continue;
|
|
1459
1972
|
}
|
|
1460
|
-
else if (key !== 'body') {
|
|
1973
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1461
1974
|
// @ts-expect-error
|
|
1462
1975
|
querystring[key] = params[key];
|
|
1463
1976
|
}
|
|
@@ -1475,15 +1988,17 @@ class Indices {
|
|
|
1475
1988
|
async rollover(params, options) {
|
|
1476
1989
|
const acceptedPath = ['alias', 'new_index'];
|
|
1477
1990
|
const acceptedBody = ['aliases', 'conditions', 'mappings', 'settings'];
|
|
1478
|
-
const
|
|
1479
|
-
|
|
1480
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1991
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
1992
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1481
1993
|
let body;
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1994
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1995
|
+
if (userBody != null) {
|
|
1996
|
+
if (typeof userBody === 'string') {
|
|
1997
|
+
body = userBody;
|
|
1998
|
+
}
|
|
1999
|
+
else {
|
|
2000
|
+
body = { ...userBody };
|
|
2001
|
+
}
|
|
1487
2002
|
}
|
|
1488
2003
|
for (const key in params) {
|
|
1489
2004
|
if (acceptedBody.includes(key)) {
|
|
@@ -1494,7 +2009,7 @@ class Indices {
|
|
|
1494
2009
|
else if (acceptedPath.includes(key)) {
|
|
1495
2010
|
continue;
|
|
1496
2011
|
}
|
|
1497
|
-
else if (key !== 'body') {
|
|
2012
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1498
2013
|
// @ts-expect-error
|
|
1499
2014
|
querystring[key] = params[key];
|
|
1500
2015
|
}
|
|
@@ -1520,14 +2035,24 @@ class Indices {
|
|
|
1520
2035
|
}
|
|
1521
2036
|
async segments(params, options) {
|
|
1522
2037
|
const acceptedPath = ['index'];
|
|
1523
|
-
const
|
|
1524
|
-
const
|
|
2038
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2039
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
2040
|
+
let body;
|
|
2041
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2042
|
+
if (userBody != null) {
|
|
2043
|
+
if (typeof userBody === 'string') {
|
|
2044
|
+
body = userBody;
|
|
2045
|
+
}
|
|
2046
|
+
else {
|
|
2047
|
+
body = { ...userBody };
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
1525
2050
|
params = params !== null && params !== void 0 ? params : {};
|
|
1526
2051
|
for (const key in params) {
|
|
1527
2052
|
if (acceptedPath.includes(key)) {
|
|
1528
2053
|
continue;
|
|
1529
2054
|
}
|
|
1530
|
-
else if (key !== 'body') {
|
|
2055
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1531
2056
|
// @ts-expect-error
|
|
1532
2057
|
querystring[key] = params[key];
|
|
1533
2058
|
}
|
|
@@ -1552,14 +2077,24 @@ class Indices {
|
|
|
1552
2077
|
}
|
|
1553
2078
|
async shardStores(params, options) {
|
|
1554
2079
|
const acceptedPath = ['index'];
|
|
1555
|
-
const
|
|
1556
|
-
const
|
|
2080
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2081
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
2082
|
+
let body;
|
|
2083
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2084
|
+
if (userBody != null) {
|
|
2085
|
+
if (typeof userBody === 'string') {
|
|
2086
|
+
body = userBody;
|
|
2087
|
+
}
|
|
2088
|
+
else {
|
|
2089
|
+
body = { ...userBody };
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
1557
2092
|
params = params !== null && params !== void 0 ? params : {};
|
|
1558
2093
|
for (const key in params) {
|
|
1559
2094
|
if (acceptedPath.includes(key)) {
|
|
1560
2095
|
continue;
|
|
1561
2096
|
}
|
|
1562
|
-
else if (key !== 'body') {
|
|
2097
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1563
2098
|
// @ts-expect-error
|
|
1564
2099
|
querystring[key] = params[key];
|
|
1565
2100
|
}
|
|
@@ -1585,15 +2120,17 @@ class Indices {
|
|
|
1585
2120
|
async shrink(params, options) {
|
|
1586
2121
|
const acceptedPath = ['index', 'target'];
|
|
1587
2122
|
const acceptedBody = ['aliases', 'settings'];
|
|
1588
|
-
const
|
|
1589
|
-
|
|
1590
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2123
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2124
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1591
2125
|
let body;
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
2126
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2127
|
+
if (userBody != null) {
|
|
2128
|
+
if (typeof userBody === 'string') {
|
|
2129
|
+
body = userBody;
|
|
2130
|
+
}
|
|
2131
|
+
else {
|
|
2132
|
+
body = { ...userBody };
|
|
2133
|
+
}
|
|
1597
2134
|
}
|
|
1598
2135
|
for (const key in params) {
|
|
1599
2136
|
if (acceptedBody.includes(key)) {
|
|
@@ -1604,7 +2141,7 @@ class Indices {
|
|
|
1604
2141
|
else if (acceptedPath.includes(key)) {
|
|
1605
2142
|
continue;
|
|
1606
2143
|
}
|
|
1607
|
-
else if (key !== 'body') {
|
|
2144
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1608
2145
|
// @ts-expect-error
|
|
1609
2146
|
querystring[key] = params[key];
|
|
1610
2147
|
}
|
|
@@ -1622,13 +2159,23 @@ class Indices {
|
|
|
1622
2159
|
}
|
|
1623
2160
|
async simulateIndexTemplate(params, options) {
|
|
1624
2161
|
const acceptedPath = ['name'];
|
|
1625
|
-
const
|
|
1626
|
-
const
|
|
2162
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2163
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
2164
|
+
let body;
|
|
2165
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2166
|
+
if (userBody != null) {
|
|
2167
|
+
if (typeof userBody === 'string') {
|
|
2168
|
+
body = userBody;
|
|
2169
|
+
}
|
|
2170
|
+
else {
|
|
2171
|
+
body = { ...userBody };
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
1627
2174
|
for (const key in params) {
|
|
1628
2175
|
if (acceptedPath.includes(key)) {
|
|
1629
2176
|
continue;
|
|
1630
2177
|
}
|
|
1631
|
-
else if (key !== 'body') {
|
|
2178
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1632
2179
|
// @ts-expect-error
|
|
1633
2180
|
querystring[key] = params[key];
|
|
1634
2181
|
}
|
|
@@ -1646,15 +2193,17 @@ class Indices {
|
|
|
1646
2193
|
async simulateTemplate(params, options) {
|
|
1647
2194
|
const acceptedPath = ['name'];
|
|
1648
2195
|
const acceptedBody = ['allow_auto_create', 'index_patterns', 'composed_of', 'template', 'data_stream', 'priority', 'version', '_meta', 'ignore_missing_component_templates', 'deprecated'];
|
|
1649
|
-
const
|
|
1650
|
-
|
|
1651
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2196
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2197
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1652
2198
|
let body;
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
2199
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2200
|
+
if (userBody != null) {
|
|
2201
|
+
if (typeof userBody === 'string') {
|
|
2202
|
+
body = userBody;
|
|
2203
|
+
}
|
|
2204
|
+
else {
|
|
2205
|
+
body = { ...userBody };
|
|
2206
|
+
}
|
|
1658
2207
|
}
|
|
1659
2208
|
params = params !== null && params !== void 0 ? params : {};
|
|
1660
2209
|
for (const key in params) {
|
|
@@ -1666,7 +2215,7 @@ class Indices {
|
|
|
1666
2215
|
else if (acceptedPath.includes(key)) {
|
|
1667
2216
|
continue;
|
|
1668
2217
|
}
|
|
1669
|
-
else if (key !== 'body') {
|
|
2218
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1670
2219
|
// @ts-expect-error
|
|
1671
2220
|
querystring[key] = params[key];
|
|
1672
2221
|
}
|
|
@@ -1692,15 +2241,17 @@ class Indices {
|
|
|
1692
2241
|
async split(params, options) {
|
|
1693
2242
|
const acceptedPath = ['index', 'target'];
|
|
1694
2243
|
const acceptedBody = ['aliases', 'settings'];
|
|
1695
|
-
const
|
|
1696
|
-
|
|
1697
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2244
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2245
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1698
2246
|
let body;
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
2247
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2248
|
+
if (userBody != null) {
|
|
2249
|
+
if (typeof userBody === 'string') {
|
|
2250
|
+
body = userBody;
|
|
2251
|
+
}
|
|
2252
|
+
else {
|
|
2253
|
+
body = { ...userBody };
|
|
2254
|
+
}
|
|
1704
2255
|
}
|
|
1705
2256
|
for (const key in params) {
|
|
1706
2257
|
if (acceptedBody.includes(key)) {
|
|
@@ -1711,7 +2262,7 @@ class Indices {
|
|
|
1711
2262
|
else if (acceptedPath.includes(key)) {
|
|
1712
2263
|
continue;
|
|
1713
2264
|
}
|
|
1714
|
-
else if (key !== 'body') {
|
|
2265
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1715
2266
|
// @ts-expect-error
|
|
1716
2267
|
querystring[key] = params[key];
|
|
1717
2268
|
}
|
|
@@ -1729,14 +2280,24 @@ class Indices {
|
|
|
1729
2280
|
}
|
|
1730
2281
|
async stats(params, options) {
|
|
1731
2282
|
const acceptedPath = ['metric', 'index'];
|
|
1732
|
-
const
|
|
1733
|
-
const
|
|
2283
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2284
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
2285
|
+
let body;
|
|
2286
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2287
|
+
if (userBody != null) {
|
|
2288
|
+
if (typeof userBody === 'string') {
|
|
2289
|
+
body = userBody;
|
|
2290
|
+
}
|
|
2291
|
+
else {
|
|
2292
|
+
body = { ...userBody };
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
1734
2295
|
params = params !== null && params !== void 0 ? params : {};
|
|
1735
2296
|
for (const key in params) {
|
|
1736
2297
|
if (acceptedPath.includes(key)) {
|
|
1737
2298
|
continue;
|
|
1738
2299
|
}
|
|
1739
|
-
else if (key !== 'body') {
|
|
2300
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1740
2301
|
// @ts-expect-error
|
|
1741
2302
|
querystring[key] = params[key];
|
|
1742
2303
|
}
|
|
@@ -1768,41 +2329,20 @@ class Indices {
|
|
|
1768
2329
|
};
|
|
1769
2330
|
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1770
2331
|
}
|
|
1771
|
-
async unfreeze(params, options) {
|
|
1772
|
-
const acceptedPath = ['index'];
|
|
1773
|
-
const querystring = {};
|
|
1774
|
-
const body = undefined;
|
|
1775
|
-
for (const key in params) {
|
|
1776
|
-
if (acceptedPath.includes(key)) {
|
|
1777
|
-
continue;
|
|
1778
|
-
}
|
|
1779
|
-
else if (key !== 'body') {
|
|
1780
|
-
// @ts-expect-error
|
|
1781
|
-
querystring[key] = params[key];
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
const method = 'POST';
|
|
1785
|
-
const path = `/${encodeURIComponent(params.index.toString())}/_unfreeze`;
|
|
1786
|
-
const meta = {
|
|
1787
|
-
name: 'indices.unfreeze',
|
|
1788
|
-
pathParts: {
|
|
1789
|
-
index: params.index
|
|
1790
|
-
}
|
|
1791
|
-
};
|
|
1792
|
-
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1793
|
-
}
|
|
1794
2332
|
async updateAliases(params, options) {
|
|
1795
2333
|
const acceptedPath = [];
|
|
1796
2334
|
const acceptedBody = ['actions'];
|
|
1797
|
-
const
|
|
1798
|
-
|
|
1799
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2335
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2336
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1800
2337
|
let body;
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
2338
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2339
|
+
if (userBody != null) {
|
|
2340
|
+
if (typeof userBody === 'string') {
|
|
2341
|
+
body = userBody;
|
|
2342
|
+
}
|
|
2343
|
+
else {
|
|
2344
|
+
body = { ...userBody };
|
|
2345
|
+
}
|
|
1806
2346
|
}
|
|
1807
2347
|
params = params !== null && params !== void 0 ? params : {};
|
|
1808
2348
|
for (const key in params) {
|
|
@@ -1814,7 +2354,7 @@ class Indices {
|
|
|
1814
2354
|
else if (acceptedPath.includes(key)) {
|
|
1815
2355
|
continue;
|
|
1816
2356
|
}
|
|
1817
|
-
else if (key !== 'body') {
|
|
2357
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1818
2358
|
// @ts-expect-error
|
|
1819
2359
|
querystring[key] = params[key];
|
|
1820
2360
|
}
|
|
@@ -1829,15 +2369,17 @@ class Indices {
|
|
|
1829
2369
|
async validateQuery(params, options) {
|
|
1830
2370
|
const acceptedPath = ['index'];
|
|
1831
2371
|
const acceptedBody = ['query'];
|
|
1832
|
-
const
|
|
1833
|
-
|
|
1834
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2372
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2373
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
1835
2374
|
let body;
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
2375
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2376
|
+
if (userBody != null) {
|
|
2377
|
+
if (typeof userBody === 'string') {
|
|
2378
|
+
body = userBody;
|
|
2379
|
+
}
|
|
2380
|
+
else {
|
|
2381
|
+
body = { ...userBody };
|
|
2382
|
+
}
|
|
1841
2383
|
}
|
|
1842
2384
|
params = params !== null && params !== void 0 ? params : {};
|
|
1843
2385
|
for (const key in params) {
|
|
@@ -1849,7 +2391,7 @@ class Indices {
|
|
|
1849
2391
|
else if (acceptedPath.includes(key)) {
|
|
1850
2392
|
continue;
|
|
1851
2393
|
}
|
|
1852
|
-
else if (key !== 'body') {
|
|
2394
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
1853
2395
|
// @ts-expect-error
|
|
1854
2396
|
querystring[key] = params[key];
|
|
1855
2397
|
}
|