@elastic/elasticsearch 7.11.0 → 7.14.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/README.md +4 -2
- package/api/api/async_search.js +11 -11
- package/api/api/autoscaling.js +12 -12
- package/api/api/bulk.js +4 -4
- package/api/api/cat.js +127 -127
- package/api/api/ccr.js +40 -40
- package/api/api/clear_scroll.js +2 -2
- package/api/api/close_point_in_time.js +2 -2
- package/api/api/cluster.js +36 -36
- package/api/api/count.js +3 -3
- package/api/api/create.js +5 -5
- package/api/api/dangling_indices.js +8 -8
- package/api/api/delete.js +4 -4
- package/api/api/delete_by_query.js +5 -5
- package/api/api/delete_by_query_rethrottle.js +4 -4
- package/api/api/delete_script.js +3 -3
- package/api/api/enrich.js +14 -14
- package/api/api/eql.js +41 -10
- package/api/api/exists.js +4 -4
- package/api/api/exists_source.js +6 -6
- package/api/api/explain.js +4 -4
- package/api/api/features.js +81 -0
- package/api/api/field_caps.js +2 -2
- package/api/api/fleet.js +65 -0
- package/api/api/get.js +4 -4
- package/api/api/get_script.js +3 -3
- package/api/api/get_script_context.js +2 -2
- package/api/api/get_script_languages.js +2 -2
- package/api/api/get_source.js +4 -4
- package/api/api/graph.js +4 -4
- package/api/api/ilm.js +50 -28
- package/api/api/index.js +4 -4
- package/api/api/indices.js +381 -381
- package/api/api/info.js +2 -2
- package/api/api/ingest.js +37 -15
- package/api/api/license.js +14 -14
- package/api/api/logstash.js +125 -0
- package/api/api/mget.js +4 -4
- package/api/api/migration.js +2 -2
- package/api/api/ml.js +338 -208
- package/api/api/monitoring.js +3 -3
- package/api/api/msearch.js +4 -4
- package/api/api/msearch_template.js +4 -4
- package/api/api/mtermvectors.js +3 -3
- package/api/api/nodes.js +12 -12
- package/api/api/open_point_in_time.js +2 -2
- package/api/api/ping.js +2 -2
- package/api/api/put_script.js +5 -5
- package/api/api/rank_eval.js +3 -3
- package/api/api/reindex.js +3 -3
- package/api/api/reindex_rethrottle.js +4 -4
- package/api/api/render_search_template.js +2 -2
- package/api/api/rollup.js +31 -31
- package/api/api/scripts_painless_execute.js +2 -2
- package/api/api/scroll.js +2 -2
- package/api/api/search.js +5 -5
- package/api/api/search_shards.js +2 -2
- package/api/api/search_template.js +4 -4
- package/api/api/searchable_snapshots.js +42 -15
- package/api/api/security.js +464 -86
- package/api/api/shutdown.js +124 -0
- package/api/api/slm.js +21 -21
- package/api/api/snapshot.js +76 -48
- package/api/api/sql.js +96 -12
- package/api/api/ssl.js +2 -2
- package/api/api/tasks.js +7 -7
- package/api/api/terms_enum.js +56 -0
- package/api/api/termvectors.js +3 -3
- package/api/api/text_structure.js +65 -0
- package/api/api/transform.js +25 -25
- package/api/api/update.js +5 -5
- package/api/api/update_by_query.js +4 -4
- package/api/api/update_by_query_rethrottle.js +4 -4
- package/api/api/watcher.js +29 -29
- package/api/api/xpack.js +4 -4
- package/api/index.js +179 -120
- package/api/new.d.ts +1584 -0
- package/api/requestParams.d.ts +203 -7
- package/api/types.d.ts +15455 -0
- package/api/utils.js +4 -4
- package/free-report-junit.xml +3410 -0
- package/index.d.ts +326 -23
- package/index.js +28 -36
- package/lib/Connection.js +6 -4
- package/lib/Helpers.d.ts +4 -2
- package/lib/Helpers.js +31 -17
- package/lib/Serializer.d.ts +5 -0
- package/lib/Serializer.js +17 -6
- package/lib/Transport.d.ts +4 -2
- package/lib/Transport.js +194 -79
- package/lib/errors.d.ts +7 -0
- package/lib/errors.js +26 -2
- package/lib/pool/BaseConnectionPool.js +3 -3
- package/lib/pool/ConnectionPool.js +4 -5
- package/lib/pool/index.d.ts +5 -0
- package/package.json +26 -26
- package/api/kibana.d.ts +0 -485
package/api/api/ilm.js
CHANGED
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
/* eslint no-unused-vars: 0 */
|
|
24
24
|
|
|
25
25
|
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
|
26
|
-
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'only_managed', 'only_errors']
|
|
27
|
-
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', onlyManaged: 'only_managed', onlyErrors: 'only_errors' }
|
|
26
|
+
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'only_managed', 'only_errors', 'dry_run']
|
|
27
|
+
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', onlyManaged: 'only_managed', onlyErrors: 'only_errors', dryRun: 'dry_run' }
|
|
28
28
|
|
|
29
29
|
function IlmApi (transport, ConfigurationError) {
|
|
30
30
|
this.transport = transport
|
|
@@ -35,15 +35,15 @@ IlmApi.prototype.deleteLifecycle = function ilmDeleteLifecycleApi (params, optio
|
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
37
|
// check required parameters
|
|
38
|
-
if (params
|
|
38
|
+
if (params.policy == null) {
|
|
39
39
|
const err = new this[kConfigurationError]('Missing required parameter: policy')
|
|
40
40
|
return handleError(err, callback)
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
let { method, body, policy, ...querystring } = params
|
|
44
44
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
let path = ''
|
|
47
47
|
if (method == null) method = 'DELETE'
|
|
48
48
|
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
|
49
49
|
|
|
@@ -62,15 +62,15 @@ IlmApi.prototype.explainLifecycle = function ilmExplainLifecycleApi (params, opt
|
|
|
62
62
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
63
63
|
|
|
64
64
|
// check required parameters
|
|
65
|
-
if (params
|
|
65
|
+
if (params.index == null) {
|
|
66
66
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
67
67
|
return handleError(err, callback)
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
let { method, body, index, ...querystring } = params
|
|
71
71
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
let path = ''
|
|
74
74
|
if (method == null) method = 'GET'
|
|
75
75
|
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'explain'
|
|
76
76
|
|
|
@@ -88,10 +88,10 @@ IlmApi.prototype.explainLifecycle = function ilmExplainLifecycleApi (params, opt
|
|
|
88
88
|
IlmApi.prototype.getLifecycle = function ilmGetLifecycleApi (params, options, callback) {
|
|
89
89
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
let { method, body, policy, ...querystring } = params
|
|
92
92
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
let path = ''
|
|
95
95
|
if ((policy) != null) {
|
|
96
96
|
if (method == null) method = 'GET'
|
|
97
97
|
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
|
@@ -114,10 +114,10 @@ IlmApi.prototype.getLifecycle = function ilmGetLifecycleApi (params, options, ca
|
|
|
114
114
|
IlmApi.prototype.getStatus = function ilmGetStatusApi (params, options, callback) {
|
|
115
115
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
let { method, body, ...querystring } = params
|
|
118
118
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
let path = ''
|
|
121
121
|
if (method == null) method = 'GET'
|
|
122
122
|
path = '/' + '_ilm' + '/' + 'status'
|
|
123
123
|
|
|
@@ -132,19 +132,40 @@ IlmApi.prototype.getStatus = function ilmGetStatusApi (params, options, callback
|
|
|
132
132
|
return this.transport.request(request, options, callback)
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
IlmApi.prototype.migrateToDataTiers = function ilmMigrateToDataTiersApi (params, options, callback) {
|
|
136
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
137
|
+
|
|
138
|
+
let { method, body, ...querystring } = params
|
|
139
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
140
|
+
|
|
141
|
+
let path = ''
|
|
142
|
+
if (method == null) method = 'POST'
|
|
143
|
+
path = '/' + '_ilm' + '/' + 'migrate_to_data_tiers'
|
|
144
|
+
|
|
145
|
+
// build request object
|
|
146
|
+
const request = {
|
|
147
|
+
method,
|
|
148
|
+
path,
|
|
149
|
+
body: body || '',
|
|
150
|
+
querystring
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return this.transport.request(request, options, callback)
|
|
154
|
+
}
|
|
155
|
+
|
|
135
156
|
IlmApi.prototype.moveToStep = function ilmMoveToStepApi (params, options, callback) {
|
|
136
157
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
137
158
|
|
|
138
159
|
// check required parameters
|
|
139
|
-
if (params
|
|
160
|
+
if (params.index == null) {
|
|
140
161
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
141
162
|
return handleError(err, callback)
|
|
142
163
|
}
|
|
143
164
|
|
|
144
|
-
|
|
165
|
+
let { method, body, index, ...querystring } = params
|
|
145
166
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
146
167
|
|
|
147
|
-
|
|
168
|
+
let path = ''
|
|
148
169
|
if (method == null) method = 'POST'
|
|
149
170
|
path = '/' + '_ilm' + '/' + 'move' + '/' + encodeURIComponent(index)
|
|
150
171
|
|
|
@@ -163,15 +184,15 @@ IlmApi.prototype.putLifecycle = function ilmPutLifecycleApi (params, options, ca
|
|
|
163
184
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
164
185
|
|
|
165
186
|
// check required parameters
|
|
166
|
-
if (params
|
|
187
|
+
if (params.policy == null) {
|
|
167
188
|
const err = new this[kConfigurationError]('Missing required parameter: policy')
|
|
168
189
|
return handleError(err, callback)
|
|
169
190
|
}
|
|
170
191
|
|
|
171
|
-
|
|
192
|
+
let { method, body, policy, ...querystring } = params
|
|
172
193
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
173
194
|
|
|
174
|
-
|
|
195
|
+
let path = ''
|
|
175
196
|
if (method == null) method = 'PUT'
|
|
176
197
|
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
|
177
198
|
|
|
@@ -190,15 +211,15 @@ IlmApi.prototype.removePolicy = function ilmRemovePolicyApi (params, options, ca
|
|
|
190
211
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
191
212
|
|
|
192
213
|
// check required parameters
|
|
193
|
-
if (params
|
|
214
|
+
if (params.index == null) {
|
|
194
215
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
195
216
|
return handleError(err, callback)
|
|
196
217
|
}
|
|
197
218
|
|
|
198
|
-
|
|
219
|
+
let { method, body, index, ...querystring } = params
|
|
199
220
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
200
221
|
|
|
201
|
-
|
|
222
|
+
let path = ''
|
|
202
223
|
if (method == null) method = 'POST'
|
|
203
224
|
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'remove'
|
|
204
225
|
|
|
@@ -217,15 +238,15 @@ IlmApi.prototype.retry = function ilmRetryApi (params, options, callback) {
|
|
|
217
238
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
218
239
|
|
|
219
240
|
// check required parameters
|
|
220
|
-
if (params
|
|
241
|
+
if (params.index == null) {
|
|
221
242
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
222
243
|
return handleError(err, callback)
|
|
223
244
|
}
|
|
224
245
|
|
|
225
|
-
|
|
246
|
+
let { method, body, index, ...querystring } = params
|
|
226
247
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
227
248
|
|
|
228
|
-
|
|
249
|
+
let path = ''
|
|
229
250
|
if (method == null) method = 'POST'
|
|
230
251
|
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'retry'
|
|
231
252
|
|
|
@@ -243,10 +264,10 @@ IlmApi.prototype.retry = function ilmRetryApi (params, options, callback) {
|
|
|
243
264
|
IlmApi.prototype.start = function ilmStartApi (params, options, callback) {
|
|
244
265
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
245
266
|
|
|
246
|
-
|
|
267
|
+
let { method, body, ...querystring } = params
|
|
247
268
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
248
269
|
|
|
249
|
-
|
|
270
|
+
let path = ''
|
|
250
271
|
if (method == null) method = 'POST'
|
|
251
272
|
path = '/' + '_ilm' + '/' + 'start'
|
|
252
273
|
|
|
@@ -264,10 +285,10 @@ IlmApi.prototype.start = function ilmStartApi (params, options, callback) {
|
|
|
264
285
|
IlmApi.prototype.stop = function ilmStopApi (params, options, callback) {
|
|
265
286
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
266
287
|
|
|
267
|
-
|
|
288
|
+
let { method, body, ...querystring } = params
|
|
268
289
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
269
290
|
|
|
270
|
-
|
|
291
|
+
let path = ''
|
|
271
292
|
if (method == null) method = 'POST'
|
|
272
293
|
path = '/' + '_ilm' + '/' + 'stop'
|
|
273
294
|
|
|
@@ -287,6 +308,7 @@ Object.defineProperties(IlmApi.prototype, {
|
|
|
287
308
|
explain_lifecycle: { get () { return this.explainLifecycle } },
|
|
288
309
|
get_lifecycle: { get () { return this.getLifecycle } },
|
|
289
310
|
get_status: { get () { return this.getStatus } },
|
|
311
|
+
migrate_to_data_tiers: { get () { return this.migrateToDataTiers } },
|
|
290
312
|
move_to_step: { get () { return this.moveToStep } },
|
|
291
313
|
put_lifecycle: { get () { return this.putLifecycle } },
|
|
292
314
|
remove_policy: { get () { return this.removePolicy } }
|
package/api/api/index.js
CHANGED
|
@@ -30,19 +30,19 @@ function indexApi (params, options, callback) {
|
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
32
|
// check required parameters
|
|
33
|
-
if (params
|
|
33
|
+
if (params.index == null) {
|
|
34
34
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
35
35
|
return handleError(err, callback)
|
|
36
36
|
}
|
|
37
|
-
if (params
|
|
37
|
+
if (params.body == null) {
|
|
38
38
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
39
39
|
return handleError(err, callback)
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
let { method, body, id, index, type, ...querystring } = params
|
|
43
43
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
let path = ''
|
|
46
46
|
if ((index) != null && (type) != null && (id) != null) {
|
|
47
47
|
if (method == null) method = 'PUT'
|
|
48
48
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|