@elastic/elasticsearch 8.16.2 → 9.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog-info.yaml +4 -1
- package/lib/api/api/async_search.d.ts +16 -17
- package/lib/api/api/async_search.js +5 -16
- 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 +5 -7
- 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 -5
- package/lib/api/api/bulk.js.map +1 -1
- package/lib/api/api/capabilities.d.ts +3 -4
- package/lib/api/api/capabilities.js +2 -2
- package/lib/api/api/capabilities.js.map +1 -1
- package/lib/api/api/cat.d.ts +121 -122
- package/lib/api/api/cat.js +26 -26
- package/lib/api/api/cat.js.map +1 -1
- package/lib/api/api/ccr.d.ts +52 -53
- package/lib/api/api/ccr.js +18 -54
- 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 +3 -12
- 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 +3 -12
- 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 +20 -56
- package/lib/api/api/cluster.js.map +1 -1
- package/lib/api/api/connector.d.ts +132 -133
- package/lib/api/api/connector.js +50 -194
- package/lib/api/api/connector.js.map +1 -1
- package/lib/api/api/count.d.ts +5 -6
- package/lib/api/api/count.js +3 -12
- package/lib/api/api/count.js.map +1 -1
- package/lib/api/api/create.d.ts +4 -5
- package/lib/api/api/create.js +3 -5
- 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 +3 -3
- 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 +2 -2
- 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 +3 -12
- 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 +2 -2
- 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 +2 -2
- package/lib/api/api/delete_script.js.map +1 -1
- package/lib/api/api/enrich.d.ts +21 -22
- package/lib/api/api/enrich.js +6 -15
- package/lib/api/api/enrich.js.map +1 -1
- package/lib/api/api/eql.d.ts +20 -21
- package/lib/api/api/eql.js +6 -15
- package/lib/api/api/eql.js.map +1 -1
- package/lib/api/api/esql.d.ts +13 -14
- package/lib/api/api/esql.js +4 -13
- package/lib/api/api/esql.js.map +1 -1
- package/lib/api/api/exists.d.ts +4 -5
- package/lib/api/api/exists.js +2 -2
- 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 +2 -2
- package/lib/api/api/exists_source.js.map +1 -1
- package/lib/api/api/explain.d.ts +4 -5
- package/lib/api/api/explain.js +3 -12
- package/lib/api/api/explain.js.map +1 -1
- package/lib/api/api/features.d.ts +8 -9
- package/lib/api/api/features.js +2 -2
- 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 +3 -12
- 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 +8 -19
- package/lib/api/api/fleet.js.map +1 -1
- package/lib/api/api/get.d.ts +4 -5
- package/lib/api/api/get.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/lib/api/api/get_source.js.map +1 -1
- package/lib/api/api/graph.d.ts +5 -6
- package/lib/api/api/graph.js +2 -11
- 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 +2 -2
- 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 +14 -41
- package/lib/api/api/ilm.js.map +1 -1
- package/lib/api/api/index.d.ts +4 -5
- package/lib/api/api/index.js +3 -5
- package/lib/api/api/index.js.map +1 -1
- package/lib/api/api/indices.d.ts +238 -239
- package/lib/api/api/indices.js +77 -216
- package/lib/api/api/indices.js.map +1 -1
- package/lib/api/api/inference.d.ts +20 -21
- package/lib/api/api/inference.js +7 -18
- package/lib/api/api/inference.js.map +1 -1
- package/lib/api/api/info.d.ts +4 -5
- package/lib/api/api/info.js +2 -2
- package/lib/api/api/info.js.map +1 -1
- package/lib/api/api/ingest.d.ts +57 -58
- package/lib/api/api/ingest.js +15 -42
- package/lib/api/api/ingest.js.map +1 -1
- package/lib/api/api/knn_search.d.ts +4 -5
- package/lib/api/api/knn_search.js +3 -12
- 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 +8 -17
- package/lib/api/api/license.js.map +1 -1
- package/lib/api/api/logstash.d.ts +12 -13
- package/lib/api/api/logstash.js +4 -6
- package/lib/api/api/logstash.js.map +1 -1
- package/lib/api/api/mget.d.ts +4 -5
- package/lib/api/api/mget.js +3 -12
- package/lib/api/api/mget.js.map +1 -1
- package/lib/api/api/migration.d.ts +12 -13
- package/lib/api/api/migration.js +3 -3
- package/lib/api/api/migration.js.map +1 -1
- package/lib/api/api/ml.d.ts +293 -294
- package/lib/api/api/ml.js +112 -449
- package/lib/api/api/ml.js.map +1 -1
- package/lib/api/api/monitoring.d.ts +4 -5
- package/lib/api/api/monitoring.js +2 -4
- 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 -5
- package/lib/api/api/msearch.js.map +1 -1
- package/lib/api/api/msearch_template.d.ts +4 -5
- package/lib/api/api/msearch_template.js +3 -5
- package/lib/api/api/msearch_template.js.map +1 -1
- package/lib/api/api/mtermvectors.d.ts +4 -5
- package/lib/api/api/mtermvectors.js +3 -12
- package/lib/api/api/mtermvectors.js.map +1 -1
- package/lib/api/api/nodes.d.ts +28 -29
- package/lib/api/api/nodes.js +8 -17
- 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 +3 -12
- 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 +2 -2
- package/lib/api/api/ping.js.map +1 -1
- package/lib/api/api/profiling.d.ts +16 -17
- package/lib/api/api/profiling.js +4 -4
- 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 +3 -12
- package/lib/api/api/put_script.js.map +1 -1
- package/lib/api/api/query_rules.d.ts +40 -41
- package/lib/api/api/query_rules.js +11 -38
- 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 +3 -12
- package/lib/api/api/rank_eval.js.map +1 -1
- package/lib/api/api/reindex.d.ts +4 -5
- package/lib/api/api/reindex.js +3 -12
- 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 +2 -2
- 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 +3 -12
- 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 +10 -28
- package/lib/api/api/rollup.js.map +1 -1
- package/lib/api/api/scripts_painless_execute.d.ts +4 -5
- package/lib/api/api/scripts_painless_execute.js +3 -12
- 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 +3 -12
- package/lib/api/api/scroll.js.map +1 -1
- package/lib/api/api/search.d.ts +4 -5
- package/lib/api/api/search.js +3 -14
- package/lib/api/api/search.js.map +1 -1
- package/lib/api/api/search_application.d.ts +39 -40
- package/lib/api/api/search_application.js +12 -23
- package/lib/api/api/search_application.js.map +1 -1
- package/lib/api/api/search_mvt.d.ts +4 -5
- package/lib/api/api/search_mvt.js +3 -12
- package/lib/api/api/search_mvt.js.map +1 -1
- package/lib/api/api/search_shards.d.ts +4 -5
- package/lib/api/api/search_shards.js +2 -2
- 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 +3 -12
- 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 +5 -14
- package/lib/api/api/searchable_snapshots.js.map +1 -1
- package/lib/api/api/security.d.ts +253 -254
- package/lib/api/api/security.js +92 -337
- package/lib/api/api/security.js.map +1 -1
- package/lib/api/api/shutdown.d.ts +9 -10
- package/lib/api/api/shutdown.js +4 -13
- package/lib/api/api/shutdown.js.map +1 -1
- package/lib/api/api/simulate.d.ts +4 -5
- package/lib/api/api/simulate.js +1 -1
- package/lib/api/api/simulate.js.map +1 -1
- package/lib/api/api/slm.d.ts +36 -37
- package/lib/api/api/slm.js +10 -19
- package/lib/api/api/slm.js.map +1 -1
- package/lib/api/api/snapshot.d.ts +52 -53
- package/lib/api/api/snapshot.js +17 -46
- package/lib/api/api/snapshot.js.map +1 -1
- package/lib/api/api/sql.d.ts +30 -31
- package/lib/api/api/sql.js +9 -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 +1 -1
- package/lib/api/api/ssl.js.map +1 -1
- package/lib/api/api/synonyms.d.ts +35 -36
- package/lib/api/api/synonyms.js +9 -27
- package/lib/api/api/synonyms.js.map +1 -1
- package/lib/api/api/tasks.d.ts +12 -13
- package/lib/api/api/tasks.js +3 -3
- package/lib/api/api/tasks.js.map +1 -1
- package/lib/api/api/terms_enum.d.ts +4 -5
- package/lib/api/api/terms_enum.js +3 -12
- package/lib/api/api/terms_enum.js.map +1 -1
- package/lib/api/api/termvectors.d.ts +4 -5
- package/lib/api/api/termvectors.js +3 -12
- 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 +6 -17
- 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 +15 -42
- package/lib/api/api/transform.js.map +1 -1
- package/lib/api/api/update.d.ts +4 -5
- package/lib/api/api/update.js +3 -12
- 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 +3 -12
- 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 +2 -2
- 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 +16 -43
- package/lib/api/api/watcher.js.map +1 -1
- package/lib/api/api/xpack.d.ts +8 -9
- package/lib/api/api/xpack.js +2 -2
- package/lib/api/api/xpack.js.map +1 -1
- package/lib/api/index.js +1 -1
- package/lib/api/index.js.map +1 -1
- package/lib/api/types.d.ts +131 -72
- package/lib/client.d.ts +82 -2
- package/lib/client.js +11 -4
- package/lib/client.js.map +1 -1
- package/lib/helpers.d.ts +0 -3
- package/lib/helpers.js +8 -7
- package/lib/helpers.js.map +1 -1
- package/package.json +33 -33
- package/renovate.json +29 -0
- package/lib/api/typesWithBodyKey.d.ts +0 -18163
- package/lib/api/typesWithBodyKey.js +0 -21
- package/lib/api/typesWithBodyKey.js.map +0 -1
package/lib/api/api/indices.js
CHANGED
|
@@ -36,7 +36,7 @@ class Indices {
|
|
|
36
36
|
if (acceptedPath.includes(key)) {
|
|
37
37
|
continue;
|
|
38
38
|
}
|
|
39
|
-
else
|
|
39
|
+
else {
|
|
40
40
|
// @ts-expect-error
|
|
41
41
|
querystring[key] = params[key];
|
|
42
42
|
}
|
|
@@ -56,26 +56,17 @@ class Indices {
|
|
|
56
56
|
const acceptedPath = ['index'];
|
|
57
57
|
const acceptedBody = ['analyzer', 'attributes', 'char_filter', 'explain', 'field', 'filter', 'normalizer', 'text', 'tokenizer'];
|
|
58
58
|
const querystring = {};
|
|
59
|
-
|
|
60
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
61
|
-
let body;
|
|
62
|
-
if (typeof userBody === 'string') {
|
|
63
|
-
body = userBody;
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
67
|
-
}
|
|
59
|
+
const body = {};
|
|
68
60
|
params = params !== null && params !== void 0 ? params : {};
|
|
69
61
|
for (const key in params) {
|
|
70
62
|
if (acceptedBody.includes(key)) {
|
|
71
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
72
63
|
// @ts-expect-error
|
|
73
64
|
body[key] = params[key];
|
|
74
65
|
}
|
|
75
66
|
else if (acceptedPath.includes(key)) {
|
|
76
67
|
continue;
|
|
77
68
|
}
|
|
78
|
-
else
|
|
69
|
+
else {
|
|
79
70
|
// @ts-expect-error
|
|
80
71
|
querystring[key] = params[key];
|
|
81
72
|
}
|
|
@@ -107,7 +98,7 @@ class Indices {
|
|
|
107
98
|
if (acceptedPath.includes(key)) {
|
|
108
99
|
continue;
|
|
109
100
|
}
|
|
110
|
-
else
|
|
101
|
+
else {
|
|
111
102
|
// @ts-expect-error
|
|
112
103
|
querystring[key] = params[key];
|
|
113
104
|
}
|
|
@@ -134,25 +125,16 @@ class Indices {
|
|
|
134
125
|
const acceptedPath = ['index', 'target'];
|
|
135
126
|
const acceptedBody = ['aliases', 'settings'];
|
|
136
127
|
const querystring = {};
|
|
137
|
-
|
|
138
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
139
|
-
let body;
|
|
140
|
-
if (typeof userBody === 'string') {
|
|
141
|
-
body = userBody;
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
145
|
-
}
|
|
128
|
+
const body = {};
|
|
146
129
|
for (const key in params) {
|
|
147
130
|
if (acceptedBody.includes(key)) {
|
|
148
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
149
131
|
// @ts-expect-error
|
|
150
132
|
body[key] = params[key];
|
|
151
133
|
}
|
|
152
134
|
else if (acceptedPath.includes(key)) {
|
|
153
135
|
continue;
|
|
154
136
|
}
|
|
155
|
-
else
|
|
137
|
+
else {
|
|
156
138
|
// @ts-expect-error
|
|
157
139
|
querystring[key] = params[key];
|
|
158
140
|
}
|
|
@@ -176,7 +158,7 @@ class Indices {
|
|
|
176
158
|
if (acceptedPath.includes(key)) {
|
|
177
159
|
continue;
|
|
178
160
|
}
|
|
179
|
-
else
|
|
161
|
+
else {
|
|
180
162
|
// @ts-expect-error
|
|
181
163
|
querystring[key] = params[key];
|
|
182
164
|
}
|
|
@@ -195,25 +177,16 @@ class Indices {
|
|
|
195
177
|
const acceptedPath = ['index'];
|
|
196
178
|
const acceptedBody = ['aliases', 'mappings', 'settings'];
|
|
197
179
|
const querystring = {};
|
|
198
|
-
|
|
199
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
200
|
-
let body;
|
|
201
|
-
if (typeof userBody === 'string') {
|
|
202
|
-
body = userBody;
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
206
|
-
}
|
|
180
|
+
const body = {};
|
|
207
181
|
for (const key in params) {
|
|
208
182
|
if (acceptedBody.includes(key)) {
|
|
209
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
210
183
|
// @ts-expect-error
|
|
211
184
|
body[key] = params[key];
|
|
212
185
|
}
|
|
213
186
|
else if (acceptedPath.includes(key)) {
|
|
214
187
|
continue;
|
|
215
188
|
}
|
|
216
|
-
else
|
|
189
|
+
else {
|
|
217
190
|
// @ts-expect-error
|
|
218
191
|
querystring[key] = params[key];
|
|
219
192
|
}
|
|
@@ -236,7 +209,7 @@ class Indices {
|
|
|
236
209
|
if (acceptedPath.includes(key)) {
|
|
237
210
|
continue;
|
|
238
211
|
}
|
|
239
|
-
else
|
|
212
|
+
else {
|
|
240
213
|
// @ts-expect-error
|
|
241
214
|
querystring[key] = params[key];
|
|
242
215
|
}
|
|
@@ -260,7 +233,7 @@ class Indices {
|
|
|
260
233
|
if (acceptedPath.includes(key)) {
|
|
261
234
|
continue;
|
|
262
235
|
}
|
|
263
|
-
else
|
|
236
|
+
else {
|
|
264
237
|
// @ts-expect-error
|
|
265
238
|
querystring[key] = params[key];
|
|
266
239
|
}
|
|
@@ -291,7 +264,7 @@ class Indices {
|
|
|
291
264
|
if (acceptedPath.includes(key)) {
|
|
292
265
|
continue;
|
|
293
266
|
}
|
|
294
|
-
else
|
|
267
|
+
else {
|
|
295
268
|
// @ts-expect-error
|
|
296
269
|
querystring[key] = params[key];
|
|
297
270
|
}
|
|
@@ -314,7 +287,7 @@ class Indices {
|
|
|
314
287
|
if (acceptedPath.includes(key)) {
|
|
315
288
|
continue;
|
|
316
289
|
}
|
|
317
|
-
else
|
|
290
|
+
else {
|
|
318
291
|
// @ts-expect-error
|
|
319
292
|
querystring[key] = params[key];
|
|
320
293
|
}
|
|
@@ -346,7 +319,7 @@ class Indices {
|
|
|
346
319
|
if (acceptedPath.includes(key)) {
|
|
347
320
|
continue;
|
|
348
321
|
}
|
|
349
|
-
else
|
|
322
|
+
else {
|
|
350
323
|
// @ts-expect-error
|
|
351
324
|
querystring[key] = params[key];
|
|
352
325
|
}
|
|
@@ -369,7 +342,7 @@ class Indices {
|
|
|
369
342
|
if (acceptedPath.includes(key)) {
|
|
370
343
|
continue;
|
|
371
344
|
}
|
|
372
|
-
else
|
|
345
|
+
else {
|
|
373
346
|
// @ts-expect-error
|
|
374
347
|
querystring[key] = params[key];
|
|
375
348
|
}
|
|
@@ -392,7 +365,7 @@ class Indices {
|
|
|
392
365
|
if (acceptedPath.includes(key)) {
|
|
393
366
|
continue;
|
|
394
367
|
}
|
|
395
|
-
else
|
|
368
|
+
else {
|
|
396
369
|
// @ts-expect-error
|
|
397
370
|
querystring[key] = params[key];
|
|
398
371
|
}
|
|
@@ -415,7 +388,7 @@ class Indices {
|
|
|
415
388
|
if (acceptedPath.includes(key)) {
|
|
416
389
|
continue;
|
|
417
390
|
}
|
|
418
|
-
else
|
|
391
|
+
else {
|
|
419
392
|
// @ts-expect-error
|
|
420
393
|
querystring[key] = params[key];
|
|
421
394
|
}
|
|
@@ -438,7 +411,7 @@ class Indices {
|
|
|
438
411
|
if (acceptedPath.includes(key)) {
|
|
439
412
|
continue;
|
|
440
413
|
}
|
|
441
|
-
else
|
|
414
|
+
else {
|
|
442
415
|
// @ts-expect-error
|
|
443
416
|
querystring[key] = params[key];
|
|
444
417
|
}
|
|
@@ -454,12 +427,10 @@ class Indices {
|
|
|
454
427
|
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
455
428
|
}
|
|
456
429
|
async downsample(params, options) {
|
|
457
|
-
var _a;
|
|
458
430
|
const acceptedPath = ['index', 'target_index'];
|
|
459
431
|
const acceptedBody = ['config'];
|
|
460
432
|
const querystring = {};
|
|
461
|
-
|
|
462
|
-
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
433
|
+
let body;
|
|
463
434
|
for (const key in params) {
|
|
464
435
|
if (acceptedBody.includes(key)) {
|
|
465
436
|
// @ts-expect-error
|
|
@@ -468,7 +439,7 @@ class Indices {
|
|
|
468
439
|
else if (acceptedPath.includes(key)) {
|
|
469
440
|
continue;
|
|
470
441
|
}
|
|
471
|
-
else
|
|
442
|
+
else {
|
|
472
443
|
// @ts-expect-error
|
|
473
444
|
querystring[key] = params[key];
|
|
474
445
|
}
|
|
@@ -492,7 +463,7 @@ class Indices {
|
|
|
492
463
|
if (acceptedPath.includes(key)) {
|
|
493
464
|
continue;
|
|
494
465
|
}
|
|
495
|
-
else
|
|
466
|
+
else {
|
|
496
467
|
// @ts-expect-error
|
|
497
468
|
querystring[key] = params[key];
|
|
498
469
|
}
|
|
@@ -515,7 +486,7 @@ class Indices {
|
|
|
515
486
|
if (acceptedPath.includes(key)) {
|
|
516
487
|
continue;
|
|
517
488
|
}
|
|
518
|
-
else
|
|
489
|
+
else {
|
|
519
490
|
// @ts-expect-error
|
|
520
491
|
querystring[key] = params[key];
|
|
521
492
|
}
|
|
@@ -547,7 +518,7 @@ class Indices {
|
|
|
547
518
|
if (acceptedPath.includes(key)) {
|
|
548
519
|
continue;
|
|
549
520
|
}
|
|
550
|
-
else
|
|
521
|
+
else {
|
|
551
522
|
// @ts-expect-error
|
|
552
523
|
querystring[key] = params[key];
|
|
553
524
|
}
|
|
@@ -570,7 +541,7 @@ class Indices {
|
|
|
570
541
|
if (acceptedPath.includes(key)) {
|
|
571
542
|
continue;
|
|
572
543
|
}
|
|
573
|
-
else
|
|
544
|
+
else {
|
|
574
545
|
// @ts-expect-error
|
|
575
546
|
querystring[key] = params[key];
|
|
576
547
|
}
|
|
@@ -593,7 +564,7 @@ class Indices {
|
|
|
593
564
|
if (acceptedPath.includes(key)) {
|
|
594
565
|
continue;
|
|
595
566
|
}
|
|
596
|
-
else
|
|
567
|
+
else {
|
|
597
568
|
// @ts-expect-error
|
|
598
569
|
querystring[key] = params[key];
|
|
599
570
|
}
|
|
@@ -616,7 +587,7 @@ class Indices {
|
|
|
616
587
|
if (acceptedPath.includes(key)) {
|
|
617
588
|
continue;
|
|
618
589
|
}
|
|
619
|
-
else
|
|
590
|
+
else {
|
|
620
591
|
// @ts-expect-error
|
|
621
592
|
querystring[key] = params[key];
|
|
622
593
|
}
|
|
@@ -640,7 +611,7 @@ class Indices {
|
|
|
640
611
|
if (acceptedPath.includes(key)) {
|
|
641
612
|
continue;
|
|
642
613
|
}
|
|
643
|
-
else
|
|
614
|
+
else {
|
|
644
615
|
// @ts-expect-error
|
|
645
616
|
querystring[key] = params[key];
|
|
646
617
|
}
|
|
@@ -672,7 +643,7 @@ class Indices {
|
|
|
672
643
|
if (acceptedPath.includes(key)) {
|
|
673
644
|
continue;
|
|
674
645
|
}
|
|
675
|
-
else
|
|
646
|
+
else {
|
|
676
647
|
// @ts-expect-error
|
|
677
648
|
querystring[key] = params[key];
|
|
678
649
|
}
|
|
@@ -703,7 +674,7 @@ class Indices {
|
|
|
703
674
|
if (acceptedPath.includes(key)) {
|
|
704
675
|
continue;
|
|
705
676
|
}
|
|
706
|
-
else
|
|
677
|
+
else {
|
|
707
678
|
// @ts-expect-error
|
|
708
679
|
querystring[key] = params[key];
|
|
709
680
|
}
|
|
@@ -727,7 +698,7 @@ class Indices {
|
|
|
727
698
|
if (acceptedPath.includes(key)) {
|
|
728
699
|
continue;
|
|
729
700
|
}
|
|
730
|
-
else
|
|
701
|
+
else {
|
|
731
702
|
// @ts-expect-error
|
|
732
703
|
querystring[key] = params[key];
|
|
733
704
|
}
|
|
@@ -767,7 +738,7 @@ class Indices {
|
|
|
767
738
|
if (acceptedPath.includes(key)) {
|
|
768
739
|
continue;
|
|
769
740
|
}
|
|
770
|
-
else
|
|
741
|
+
else {
|
|
771
742
|
// @ts-expect-error
|
|
772
743
|
querystring[key] = params[key];
|
|
773
744
|
}
|
|
@@ -791,7 +762,7 @@ class Indices {
|
|
|
791
762
|
if (acceptedPath.includes(key)) {
|
|
792
763
|
continue;
|
|
793
764
|
}
|
|
794
|
-
else
|
|
765
|
+
else {
|
|
795
766
|
// @ts-expect-error
|
|
796
767
|
querystring[key] = params[key];
|
|
797
768
|
}
|
|
@@ -822,7 +793,7 @@ class Indices {
|
|
|
822
793
|
if (acceptedPath.includes(key)) {
|
|
823
794
|
continue;
|
|
824
795
|
}
|
|
825
|
-
else
|
|
796
|
+
else {
|
|
826
797
|
// @ts-expect-error
|
|
827
798
|
querystring[key] = params[key];
|
|
828
799
|
}
|
|
@@ -855,7 +826,7 @@ class Indices {
|
|
|
855
826
|
if (acceptedPath.includes(key)) {
|
|
856
827
|
continue;
|
|
857
828
|
}
|
|
858
|
-
else
|
|
829
|
+
else {
|
|
859
830
|
// @ts-expect-error
|
|
860
831
|
querystring[key] = params[key];
|
|
861
832
|
}
|
|
@@ -887,7 +858,7 @@ class Indices {
|
|
|
887
858
|
if (acceptedPath.includes(key)) {
|
|
888
859
|
continue;
|
|
889
860
|
}
|
|
890
|
-
else
|
|
861
|
+
else {
|
|
891
862
|
// @ts-expect-error
|
|
892
863
|
querystring[key] = params[key];
|
|
893
864
|
}
|
|
@@ -919,7 +890,7 @@ class Indices {
|
|
|
919
890
|
if (acceptedPath.includes(key)) {
|
|
920
891
|
continue;
|
|
921
892
|
}
|
|
922
|
-
else
|
|
893
|
+
else {
|
|
923
894
|
// @ts-expect-error
|
|
924
895
|
querystring[key] = params[key];
|
|
925
896
|
}
|
|
@@ -960,7 +931,7 @@ class Indices {
|
|
|
960
931
|
if (acceptedPath.includes(key)) {
|
|
961
932
|
continue;
|
|
962
933
|
}
|
|
963
|
-
else
|
|
934
|
+
else {
|
|
964
935
|
// @ts-expect-error
|
|
965
936
|
querystring[key] = params[key];
|
|
966
937
|
}
|
|
@@ -991,7 +962,7 @@ class Indices {
|
|
|
991
962
|
if (acceptedPath.includes(key)) {
|
|
992
963
|
continue;
|
|
993
964
|
}
|
|
994
|
-
else
|
|
965
|
+
else {
|
|
995
966
|
// @ts-expect-error
|
|
996
967
|
querystring[key] = params[key];
|
|
997
968
|
}
|
|
@@ -1010,25 +981,16 @@ class Indices {
|
|
|
1010
981
|
const acceptedPath = [];
|
|
1011
982
|
const acceptedBody = ['actions'];
|
|
1012
983
|
const querystring = {};
|
|
1013
|
-
|
|
1014
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1015
|
-
let body;
|
|
1016
|
-
if (typeof userBody === 'string') {
|
|
1017
|
-
body = userBody;
|
|
1018
|
-
}
|
|
1019
|
-
else {
|
|
1020
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1021
|
-
}
|
|
984
|
+
const body = {};
|
|
1022
985
|
for (const key in params) {
|
|
1023
986
|
if (acceptedBody.includes(key)) {
|
|
1024
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1025
987
|
// @ts-expect-error
|
|
1026
988
|
body[key] = params[key];
|
|
1027
989
|
}
|
|
1028
990
|
else if (acceptedPath.includes(key)) {
|
|
1029
991
|
continue;
|
|
1030
992
|
}
|
|
1031
|
-
else
|
|
993
|
+
else {
|
|
1032
994
|
// @ts-expect-error
|
|
1033
995
|
querystring[key] = params[key];
|
|
1034
996
|
}
|
|
@@ -1048,7 +1010,7 @@ class Indices {
|
|
|
1048
1010
|
if (acceptedPath.includes(key)) {
|
|
1049
1011
|
continue;
|
|
1050
1012
|
}
|
|
1051
|
-
else
|
|
1013
|
+
else {
|
|
1052
1014
|
// @ts-expect-error
|
|
1053
1015
|
querystring[key] = params[key];
|
|
1054
1016
|
}
|
|
@@ -1071,7 +1033,7 @@ class Indices {
|
|
|
1071
1033
|
if (acceptedPath.includes(key)) {
|
|
1072
1034
|
continue;
|
|
1073
1035
|
}
|
|
1074
|
-
else
|
|
1036
|
+
else {
|
|
1075
1037
|
// @ts-expect-error
|
|
1076
1038
|
querystring[key] = params[key];
|
|
1077
1039
|
}
|
|
@@ -1090,25 +1052,16 @@ class Indices {
|
|
|
1090
1052
|
const acceptedPath = ['index', 'name'];
|
|
1091
1053
|
const acceptedBody = ['filter', 'index_routing', 'is_write_index', 'routing', 'search_routing'];
|
|
1092
1054
|
const querystring = {};
|
|
1093
|
-
|
|
1094
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1095
|
-
let body;
|
|
1096
|
-
if (typeof userBody === 'string') {
|
|
1097
|
-
body = userBody;
|
|
1098
|
-
}
|
|
1099
|
-
else {
|
|
1100
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1101
|
-
}
|
|
1055
|
+
const body = {};
|
|
1102
1056
|
for (const key in params) {
|
|
1103
1057
|
if (acceptedBody.includes(key)) {
|
|
1104
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1105
1058
|
// @ts-expect-error
|
|
1106
1059
|
body[key] = params[key];
|
|
1107
1060
|
}
|
|
1108
1061
|
else if (acceptedPath.includes(key)) {
|
|
1109
1062
|
continue;
|
|
1110
1063
|
}
|
|
1111
|
-
else
|
|
1064
|
+
else {
|
|
1112
1065
|
// @ts-expect-error
|
|
1113
1066
|
querystring[key] = params[key];
|
|
1114
1067
|
}
|
|
@@ -1134,27 +1087,18 @@ class Indices {
|
|
|
1134
1087
|
}
|
|
1135
1088
|
async putDataLifecycle(params, options) {
|
|
1136
1089
|
const acceptedPath = ['name'];
|
|
1137
|
-
const acceptedBody = ['
|
|
1090
|
+
const acceptedBody = ['lifecycle'];
|
|
1138
1091
|
const querystring = {};
|
|
1139
|
-
// @ts-expect-error
|
|
1140
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1141
1092
|
let body;
|
|
1142
|
-
if (typeof userBody === 'string') {
|
|
1143
|
-
body = userBody;
|
|
1144
|
-
}
|
|
1145
|
-
else {
|
|
1146
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1147
|
-
}
|
|
1148
1093
|
for (const key in params) {
|
|
1149
1094
|
if (acceptedBody.includes(key)) {
|
|
1150
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1151
1095
|
// @ts-expect-error
|
|
1152
|
-
body
|
|
1096
|
+
body = params[key];
|
|
1153
1097
|
}
|
|
1154
1098
|
else if (acceptedPath.includes(key)) {
|
|
1155
1099
|
continue;
|
|
1156
1100
|
}
|
|
1157
|
-
else
|
|
1101
|
+
else {
|
|
1158
1102
|
// @ts-expect-error
|
|
1159
1103
|
querystring[key] = params[key];
|
|
1160
1104
|
}
|
|
@@ -1173,25 +1117,16 @@ class Indices {
|
|
|
1173
1117
|
const acceptedPath = ['name'];
|
|
1174
1118
|
const acceptedBody = ['index_patterns', 'composed_of', 'template', 'data_stream', 'priority', 'version', '_meta', 'allow_auto_create', 'ignore_missing_component_templates', 'deprecated'];
|
|
1175
1119
|
const querystring = {};
|
|
1176
|
-
|
|
1177
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1178
|
-
let body;
|
|
1179
|
-
if (typeof userBody === 'string') {
|
|
1180
|
-
body = userBody;
|
|
1181
|
-
}
|
|
1182
|
-
else {
|
|
1183
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1184
|
-
}
|
|
1120
|
+
const body = {};
|
|
1185
1121
|
for (const key in params) {
|
|
1186
1122
|
if (acceptedBody.includes(key)) {
|
|
1187
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1188
1123
|
// @ts-expect-error
|
|
1189
1124
|
body[key] = params[key];
|
|
1190
1125
|
}
|
|
1191
1126
|
else if (acceptedPath.includes(key)) {
|
|
1192
1127
|
continue;
|
|
1193
1128
|
}
|
|
1194
|
-
else
|
|
1129
|
+
else {
|
|
1195
1130
|
// @ts-expect-error
|
|
1196
1131
|
querystring[key] = params[key];
|
|
1197
1132
|
}
|
|
@@ -1210,25 +1145,16 @@ class Indices {
|
|
|
1210
1145
|
const acceptedPath = ['index'];
|
|
1211
1146
|
const acceptedBody = ['date_detection', 'dynamic', 'dynamic_date_formats', 'dynamic_templates', '_field_names', '_meta', 'numeric_detection', 'properties', '_routing', '_source', 'runtime'];
|
|
1212
1147
|
const querystring = {};
|
|
1213
|
-
|
|
1214
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1215
|
-
let body;
|
|
1216
|
-
if (typeof userBody === 'string') {
|
|
1217
|
-
body = userBody;
|
|
1218
|
-
}
|
|
1219
|
-
else {
|
|
1220
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1221
|
-
}
|
|
1148
|
+
const body = {};
|
|
1222
1149
|
for (const key in params) {
|
|
1223
1150
|
if (acceptedBody.includes(key)) {
|
|
1224
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1225
1151
|
// @ts-expect-error
|
|
1226
1152
|
body[key] = params[key];
|
|
1227
1153
|
}
|
|
1228
1154
|
else if (acceptedPath.includes(key)) {
|
|
1229
1155
|
continue;
|
|
1230
1156
|
}
|
|
1231
|
-
else
|
|
1157
|
+
else {
|
|
1232
1158
|
// @ts-expect-error
|
|
1233
1159
|
querystring[key] = params[key];
|
|
1234
1160
|
}
|
|
@@ -1244,12 +1170,10 @@ class Indices {
|
|
|
1244
1170
|
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
1245
1171
|
}
|
|
1246
1172
|
async putSettings(params, options) {
|
|
1247
|
-
var _a;
|
|
1248
1173
|
const acceptedPath = ['index'];
|
|
1249
1174
|
const acceptedBody = ['settings'];
|
|
1250
1175
|
const querystring = {};
|
|
1251
|
-
|
|
1252
|
-
let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
|
|
1176
|
+
let body;
|
|
1253
1177
|
for (const key in params) {
|
|
1254
1178
|
if (acceptedBody.includes(key)) {
|
|
1255
1179
|
// @ts-expect-error
|
|
@@ -1258,7 +1182,7 @@ class Indices {
|
|
|
1258
1182
|
else if (acceptedPath.includes(key)) {
|
|
1259
1183
|
continue;
|
|
1260
1184
|
}
|
|
1261
|
-
else
|
|
1185
|
+
else {
|
|
1262
1186
|
// @ts-expect-error
|
|
1263
1187
|
querystring[key] = params[key];
|
|
1264
1188
|
}
|
|
@@ -1285,25 +1209,16 @@ class Indices {
|
|
|
1285
1209
|
const acceptedPath = ['name'];
|
|
1286
1210
|
const acceptedBody = ['aliases', 'index_patterns', 'mappings', 'order', 'settings', 'version'];
|
|
1287
1211
|
const querystring = {};
|
|
1288
|
-
|
|
1289
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1290
|
-
let body;
|
|
1291
|
-
if (typeof userBody === 'string') {
|
|
1292
|
-
body = userBody;
|
|
1293
|
-
}
|
|
1294
|
-
else {
|
|
1295
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1296
|
-
}
|
|
1212
|
+
const body = {};
|
|
1297
1213
|
for (const key in params) {
|
|
1298
1214
|
if (acceptedBody.includes(key)) {
|
|
1299
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1300
1215
|
// @ts-expect-error
|
|
1301
1216
|
body[key] = params[key];
|
|
1302
1217
|
}
|
|
1303
1218
|
else if (acceptedPath.includes(key)) {
|
|
1304
1219
|
continue;
|
|
1305
1220
|
}
|
|
1306
|
-
else
|
|
1221
|
+
else {
|
|
1307
1222
|
// @ts-expect-error
|
|
1308
1223
|
querystring[key] = params[key];
|
|
1309
1224
|
}
|
|
@@ -1327,7 +1242,7 @@ class Indices {
|
|
|
1327
1242
|
if (acceptedPath.includes(key)) {
|
|
1328
1243
|
continue;
|
|
1329
1244
|
}
|
|
1330
|
-
else
|
|
1245
|
+
else {
|
|
1331
1246
|
// @ts-expect-error
|
|
1332
1247
|
querystring[key] = params[key];
|
|
1333
1248
|
}
|
|
@@ -1359,7 +1274,7 @@ class Indices {
|
|
|
1359
1274
|
if (acceptedPath.includes(key)) {
|
|
1360
1275
|
continue;
|
|
1361
1276
|
}
|
|
1362
|
-
else
|
|
1277
|
+
else {
|
|
1363
1278
|
// @ts-expect-error
|
|
1364
1279
|
querystring[key] = params[key];
|
|
1365
1280
|
}
|
|
@@ -1390,7 +1305,7 @@ class Indices {
|
|
|
1390
1305
|
if (acceptedPath.includes(key)) {
|
|
1391
1306
|
continue;
|
|
1392
1307
|
}
|
|
1393
|
-
else
|
|
1308
|
+
else {
|
|
1394
1309
|
// @ts-expect-error
|
|
1395
1310
|
querystring[key] = params[key];
|
|
1396
1311
|
}
|
|
@@ -1413,7 +1328,7 @@ class Indices {
|
|
|
1413
1328
|
if (acceptedPath.includes(key)) {
|
|
1414
1329
|
continue;
|
|
1415
1330
|
}
|
|
1416
|
-
else
|
|
1331
|
+
else {
|
|
1417
1332
|
// @ts-expect-error
|
|
1418
1333
|
querystring[key] = params[key];
|
|
1419
1334
|
}
|
|
@@ -1436,7 +1351,7 @@ class Indices {
|
|
|
1436
1351
|
if (acceptedPath.includes(key)) {
|
|
1437
1352
|
continue;
|
|
1438
1353
|
}
|
|
1439
|
-
else
|
|
1354
|
+
else {
|
|
1440
1355
|
// @ts-expect-error
|
|
1441
1356
|
querystring[key] = params[key];
|
|
1442
1357
|
}
|
|
@@ -1455,25 +1370,16 @@ class Indices {
|
|
|
1455
1370
|
const acceptedPath = ['alias', 'new_index'];
|
|
1456
1371
|
const acceptedBody = ['aliases', 'conditions', 'mappings', 'settings'];
|
|
1457
1372
|
const querystring = {};
|
|
1458
|
-
|
|
1459
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1460
|
-
let body;
|
|
1461
|
-
if (typeof userBody === 'string') {
|
|
1462
|
-
body = userBody;
|
|
1463
|
-
}
|
|
1464
|
-
else {
|
|
1465
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1466
|
-
}
|
|
1373
|
+
const body = {};
|
|
1467
1374
|
for (const key in params) {
|
|
1468
1375
|
if (acceptedBody.includes(key)) {
|
|
1469
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1470
1376
|
// @ts-expect-error
|
|
1471
1377
|
body[key] = params[key];
|
|
1472
1378
|
}
|
|
1473
1379
|
else if (acceptedPath.includes(key)) {
|
|
1474
1380
|
continue;
|
|
1475
1381
|
}
|
|
1476
|
-
else
|
|
1382
|
+
else {
|
|
1477
1383
|
// @ts-expect-error
|
|
1478
1384
|
querystring[key] = params[key];
|
|
1479
1385
|
}
|
|
@@ -1506,7 +1412,7 @@ class Indices {
|
|
|
1506
1412
|
if (acceptedPath.includes(key)) {
|
|
1507
1413
|
continue;
|
|
1508
1414
|
}
|
|
1509
|
-
else
|
|
1415
|
+
else {
|
|
1510
1416
|
// @ts-expect-error
|
|
1511
1417
|
querystring[key] = params[key];
|
|
1512
1418
|
}
|
|
@@ -1538,7 +1444,7 @@ class Indices {
|
|
|
1538
1444
|
if (acceptedPath.includes(key)) {
|
|
1539
1445
|
continue;
|
|
1540
1446
|
}
|
|
1541
|
-
else
|
|
1447
|
+
else {
|
|
1542
1448
|
// @ts-expect-error
|
|
1543
1449
|
querystring[key] = params[key];
|
|
1544
1450
|
}
|
|
@@ -1565,25 +1471,16 @@ class Indices {
|
|
|
1565
1471
|
const acceptedPath = ['index', 'target'];
|
|
1566
1472
|
const acceptedBody = ['aliases', 'settings'];
|
|
1567
1473
|
const querystring = {};
|
|
1568
|
-
|
|
1569
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1570
|
-
let body;
|
|
1571
|
-
if (typeof userBody === 'string') {
|
|
1572
|
-
body = userBody;
|
|
1573
|
-
}
|
|
1574
|
-
else {
|
|
1575
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1576
|
-
}
|
|
1474
|
+
const body = {};
|
|
1577
1475
|
for (const key in params) {
|
|
1578
1476
|
if (acceptedBody.includes(key)) {
|
|
1579
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1580
1477
|
// @ts-expect-error
|
|
1581
1478
|
body[key] = params[key];
|
|
1582
1479
|
}
|
|
1583
1480
|
else if (acceptedPath.includes(key)) {
|
|
1584
1481
|
continue;
|
|
1585
1482
|
}
|
|
1586
|
-
else
|
|
1483
|
+
else {
|
|
1587
1484
|
// @ts-expect-error
|
|
1588
1485
|
querystring[key] = params[key];
|
|
1589
1486
|
}
|
|
@@ -1607,7 +1504,7 @@ class Indices {
|
|
|
1607
1504
|
if (acceptedPath.includes(key)) {
|
|
1608
1505
|
continue;
|
|
1609
1506
|
}
|
|
1610
|
-
else
|
|
1507
|
+
else {
|
|
1611
1508
|
// @ts-expect-error
|
|
1612
1509
|
querystring[key] = params[key];
|
|
1613
1510
|
}
|
|
@@ -1626,26 +1523,17 @@ class Indices {
|
|
|
1626
1523
|
const acceptedPath = ['name'];
|
|
1627
1524
|
const acceptedBody = ['allow_auto_create', 'index_patterns', 'composed_of', 'template', 'data_stream', 'priority', 'version', '_meta', 'ignore_missing_component_templates', 'deprecated'];
|
|
1628
1525
|
const querystring = {};
|
|
1629
|
-
|
|
1630
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1631
|
-
let body;
|
|
1632
|
-
if (typeof userBody === 'string') {
|
|
1633
|
-
body = userBody;
|
|
1634
|
-
}
|
|
1635
|
-
else {
|
|
1636
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1637
|
-
}
|
|
1526
|
+
const body = {};
|
|
1638
1527
|
params = params !== null && params !== void 0 ? params : {};
|
|
1639
1528
|
for (const key in params) {
|
|
1640
1529
|
if (acceptedBody.includes(key)) {
|
|
1641
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1642
1530
|
// @ts-expect-error
|
|
1643
1531
|
body[key] = params[key];
|
|
1644
1532
|
}
|
|
1645
1533
|
else if (acceptedPath.includes(key)) {
|
|
1646
1534
|
continue;
|
|
1647
1535
|
}
|
|
1648
|
-
else
|
|
1536
|
+
else {
|
|
1649
1537
|
// @ts-expect-error
|
|
1650
1538
|
querystring[key] = params[key];
|
|
1651
1539
|
}
|
|
@@ -1672,25 +1560,16 @@ class Indices {
|
|
|
1672
1560
|
const acceptedPath = ['index', 'target'];
|
|
1673
1561
|
const acceptedBody = ['aliases', 'settings'];
|
|
1674
1562
|
const querystring = {};
|
|
1675
|
-
|
|
1676
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1677
|
-
let body;
|
|
1678
|
-
if (typeof userBody === 'string') {
|
|
1679
|
-
body = userBody;
|
|
1680
|
-
}
|
|
1681
|
-
else {
|
|
1682
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1683
|
-
}
|
|
1563
|
+
const body = {};
|
|
1684
1564
|
for (const key in params) {
|
|
1685
1565
|
if (acceptedBody.includes(key)) {
|
|
1686
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1687
1566
|
// @ts-expect-error
|
|
1688
1567
|
body[key] = params[key];
|
|
1689
1568
|
}
|
|
1690
1569
|
else if (acceptedPath.includes(key)) {
|
|
1691
1570
|
continue;
|
|
1692
1571
|
}
|
|
1693
|
-
else
|
|
1572
|
+
else {
|
|
1694
1573
|
// @ts-expect-error
|
|
1695
1574
|
querystring[key] = params[key];
|
|
1696
1575
|
}
|
|
@@ -1715,7 +1594,7 @@ class Indices {
|
|
|
1715
1594
|
if (acceptedPath.includes(key)) {
|
|
1716
1595
|
continue;
|
|
1717
1596
|
}
|
|
1718
|
-
else
|
|
1597
|
+
else {
|
|
1719
1598
|
// @ts-expect-error
|
|
1720
1599
|
querystring[key] = params[key];
|
|
1721
1600
|
}
|
|
@@ -1755,7 +1634,7 @@ class Indices {
|
|
|
1755
1634
|
if (acceptedPath.includes(key)) {
|
|
1756
1635
|
continue;
|
|
1757
1636
|
}
|
|
1758
|
-
else
|
|
1637
|
+
else {
|
|
1759
1638
|
// @ts-expect-error
|
|
1760
1639
|
querystring[key] = params[key];
|
|
1761
1640
|
}
|
|
@@ -1774,26 +1653,17 @@ class Indices {
|
|
|
1774
1653
|
const acceptedPath = [];
|
|
1775
1654
|
const acceptedBody = ['actions'];
|
|
1776
1655
|
const querystring = {};
|
|
1777
|
-
|
|
1778
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1779
|
-
let body;
|
|
1780
|
-
if (typeof userBody === 'string') {
|
|
1781
|
-
body = userBody;
|
|
1782
|
-
}
|
|
1783
|
-
else {
|
|
1784
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1785
|
-
}
|
|
1656
|
+
const body = {};
|
|
1786
1657
|
params = params !== null && params !== void 0 ? params : {};
|
|
1787
1658
|
for (const key in params) {
|
|
1788
1659
|
if (acceptedBody.includes(key)) {
|
|
1789
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1790
1660
|
// @ts-expect-error
|
|
1791
1661
|
body[key] = params[key];
|
|
1792
1662
|
}
|
|
1793
1663
|
else if (acceptedPath.includes(key)) {
|
|
1794
1664
|
continue;
|
|
1795
1665
|
}
|
|
1796
|
-
else
|
|
1666
|
+
else {
|
|
1797
1667
|
// @ts-expect-error
|
|
1798
1668
|
querystring[key] = params[key];
|
|
1799
1669
|
}
|
|
@@ -1809,26 +1679,17 @@ class Indices {
|
|
|
1809
1679
|
const acceptedPath = ['index'];
|
|
1810
1680
|
const acceptedBody = ['query'];
|
|
1811
1681
|
const querystring = {};
|
|
1812
|
-
|
|
1813
|
-
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
1814
|
-
let body;
|
|
1815
|
-
if (typeof userBody === 'string') {
|
|
1816
|
-
body = userBody;
|
|
1817
|
-
}
|
|
1818
|
-
else {
|
|
1819
|
-
body = userBody != null ? { ...userBody } : undefined;
|
|
1820
|
-
}
|
|
1682
|
+
const body = {};
|
|
1821
1683
|
params = params !== null && params !== void 0 ? params : {};
|
|
1822
1684
|
for (const key in params) {
|
|
1823
1685
|
if (acceptedBody.includes(key)) {
|
|
1824
|
-
body = body !== null && body !== void 0 ? body : {};
|
|
1825
1686
|
// @ts-expect-error
|
|
1826
1687
|
body[key] = params[key];
|
|
1827
1688
|
}
|
|
1828
1689
|
else if (acceptedPath.includes(key)) {
|
|
1829
1690
|
continue;
|
|
1830
1691
|
}
|
|
1831
|
-
else
|
|
1692
|
+
else {
|
|
1832
1693
|
// @ts-expect-error
|
|
1833
1694
|
querystring[key] = params[key];
|
|
1834
1695
|
}
|