@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.
Files changed (97) hide show
  1. package/README.md +4 -2
  2. package/api/api/async_search.js +11 -11
  3. package/api/api/autoscaling.js +12 -12
  4. package/api/api/bulk.js +4 -4
  5. package/api/api/cat.js +127 -127
  6. package/api/api/ccr.js +40 -40
  7. package/api/api/clear_scroll.js +2 -2
  8. package/api/api/close_point_in_time.js +2 -2
  9. package/api/api/cluster.js +36 -36
  10. package/api/api/count.js +3 -3
  11. package/api/api/create.js +5 -5
  12. package/api/api/dangling_indices.js +8 -8
  13. package/api/api/delete.js +4 -4
  14. package/api/api/delete_by_query.js +5 -5
  15. package/api/api/delete_by_query_rethrottle.js +4 -4
  16. package/api/api/delete_script.js +3 -3
  17. package/api/api/enrich.js +14 -14
  18. package/api/api/eql.js +41 -10
  19. package/api/api/exists.js +4 -4
  20. package/api/api/exists_source.js +6 -6
  21. package/api/api/explain.js +4 -4
  22. package/api/api/features.js +81 -0
  23. package/api/api/field_caps.js +2 -2
  24. package/api/api/fleet.js +65 -0
  25. package/api/api/get.js +4 -4
  26. package/api/api/get_script.js +3 -3
  27. package/api/api/get_script_context.js +2 -2
  28. package/api/api/get_script_languages.js +2 -2
  29. package/api/api/get_source.js +4 -4
  30. package/api/api/graph.js +4 -4
  31. package/api/api/ilm.js +50 -28
  32. package/api/api/index.js +4 -4
  33. package/api/api/indices.js +381 -381
  34. package/api/api/info.js +2 -2
  35. package/api/api/ingest.js +37 -15
  36. package/api/api/license.js +14 -14
  37. package/api/api/logstash.js +125 -0
  38. package/api/api/mget.js +4 -4
  39. package/api/api/migration.js +2 -2
  40. package/api/api/ml.js +338 -208
  41. package/api/api/monitoring.js +3 -3
  42. package/api/api/msearch.js +4 -4
  43. package/api/api/msearch_template.js +4 -4
  44. package/api/api/mtermvectors.js +3 -3
  45. package/api/api/nodes.js +12 -12
  46. package/api/api/open_point_in_time.js +2 -2
  47. package/api/api/ping.js +2 -2
  48. package/api/api/put_script.js +5 -5
  49. package/api/api/rank_eval.js +3 -3
  50. package/api/api/reindex.js +3 -3
  51. package/api/api/reindex_rethrottle.js +4 -4
  52. package/api/api/render_search_template.js +2 -2
  53. package/api/api/rollup.js +31 -31
  54. package/api/api/scripts_painless_execute.js +2 -2
  55. package/api/api/scroll.js +2 -2
  56. package/api/api/search.js +5 -5
  57. package/api/api/search_shards.js +2 -2
  58. package/api/api/search_template.js +4 -4
  59. package/api/api/searchable_snapshots.js +42 -15
  60. package/api/api/security.js +464 -86
  61. package/api/api/shutdown.js +124 -0
  62. package/api/api/slm.js +21 -21
  63. package/api/api/snapshot.js +76 -48
  64. package/api/api/sql.js +96 -12
  65. package/api/api/ssl.js +2 -2
  66. package/api/api/tasks.js +7 -7
  67. package/api/api/terms_enum.js +56 -0
  68. package/api/api/termvectors.js +3 -3
  69. package/api/api/text_structure.js +65 -0
  70. package/api/api/transform.js +25 -25
  71. package/api/api/update.js +5 -5
  72. package/api/api/update_by_query.js +4 -4
  73. package/api/api/update_by_query_rethrottle.js +4 -4
  74. package/api/api/watcher.js +29 -29
  75. package/api/api/xpack.js +4 -4
  76. package/api/index.js +179 -120
  77. package/api/new.d.ts +1584 -0
  78. package/api/requestParams.d.ts +203 -7
  79. package/api/types.d.ts +15455 -0
  80. package/api/utils.js +4 -4
  81. package/free-report-junit.xml +3410 -0
  82. package/index.d.ts +326 -23
  83. package/index.js +28 -36
  84. package/lib/Connection.js +6 -4
  85. package/lib/Helpers.d.ts +4 -2
  86. package/lib/Helpers.js +31 -17
  87. package/lib/Serializer.d.ts +5 -0
  88. package/lib/Serializer.js +17 -6
  89. package/lib/Transport.d.ts +4 -2
  90. package/lib/Transport.js +194 -79
  91. package/lib/errors.d.ts +7 -0
  92. package/lib/errors.js +26 -2
  93. package/lib/pool/BaseConnectionPool.js +3 -3
  94. package/lib/pool/ConnectionPool.js +4 -5
  95. package/lib/pool/index.d.ts +5 -0
  96. package/package.json +26 -26
  97. package/api/kibana.d.ts +0 -485
@@ -35,21 +35,21 @@ WatcherApi.prototype.ackWatch = function watcherAckWatchApi (params, options, ca
35
35
  ;[params, options, callback] = normalizeArguments(params, options, callback)
36
36
 
37
37
  // check required parameters
38
- if (params['watch_id'] == null && params['watchId'] == null) {
38
+ if (params.watch_id == null && params.watchId == null) {
39
39
  const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
40
40
  return handleError(err, callback)
41
41
  }
42
42
 
43
43
  // check required url components
44
- if ((params['action_id'] != null || params['actionId'] != null) && ((params['watch_id'] == null && params['watchId'] == null))) {
44
+ if ((params.action_id != null || params.actionId != null) && ((params.watch_id == null && params.watchId == null))) {
45
45
  const err = new this[kConfigurationError]('Missing required parameter of the url: watch_id')
46
46
  return handleError(err, callback)
47
47
  }
48
48
 
49
- var { method, body, watchId, watch_id, actionId, action_id, ...querystring } = params
49
+ let { method, body, watchId, watch_id, actionId, action_id, ...querystring } = params
50
50
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
51
51
 
52
- var path = ''
52
+ let path = ''
53
53
  if ((watch_id || watchId) != null && (action_id || actionId) != null) {
54
54
  if (method == null) method = 'PUT'
55
55
  path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_ack' + '/' + encodeURIComponent(action_id || actionId)
@@ -73,15 +73,15 @@ WatcherApi.prototype.activateWatch = function watcherActivateWatchApi (params, o
73
73
  ;[params, options, callback] = normalizeArguments(params, options, callback)
74
74
 
75
75
  // check required parameters
76
- if (params['watch_id'] == null && params['watchId'] == null) {
76
+ if (params.watch_id == null && params.watchId == null) {
77
77
  const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
78
78
  return handleError(err, callback)
79
79
  }
80
80
 
81
- var { method, body, watchId, watch_id, ...querystring } = params
81
+ let { method, body, watchId, watch_id, ...querystring } = params
82
82
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
83
83
 
84
- var path = ''
84
+ let path = ''
85
85
  if (method == null) method = 'PUT'
86
86
  path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_activate'
87
87
 
@@ -100,15 +100,15 @@ WatcherApi.prototype.deactivateWatch = function watcherDeactivateWatchApi (param
100
100
  ;[params, options, callback] = normalizeArguments(params, options, callback)
101
101
 
102
102
  // check required parameters
103
- if (params['watch_id'] == null && params['watchId'] == null) {
103
+ if (params.watch_id == null && params.watchId == null) {
104
104
  const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
105
105
  return handleError(err, callback)
106
106
  }
107
107
 
108
- var { method, body, watchId, watch_id, ...querystring } = params
108
+ let { method, body, watchId, watch_id, ...querystring } = params
109
109
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
110
110
 
111
- var path = ''
111
+ let path = ''
112
112
  if (method == null) method = 'PUT'
113
113
  path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_deactivate'
114
114
 
@@ -127,15 +127,15 @@ WatcherApi.prototype.deleteWatch = function watcherDeleteWatchApi (params, optio
127
127
  ;[params, options, callback] = normalizeArguments(params, options, callback)
128
128
 
129
129
  // check required parameters
130
- if (params['id'] == null) {
130
+ if (params.id == null) {
131
131
  const err = new this[kConfigurationError]('Missing required parameter: id')
132
132
  return handleError(err, callback)
133
133
  }
134
134
 
135
- var { method, body, id, ...querystring } = params
135
+ let { method, body, id, ...querystring } = params
136
136
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
137
137
 
138
- var path = ''
138
+ let path = ''
139
139
  if (method == null) method = 'DELETE'
140
140
  path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
141
141
 
@@ -153,10 +153,10 @@ WatcherApi.prototype.deleteWatch = function watcherDeleteWatchApi (params, optio
153
153
  WatcherApi.prototype.executeWatch = function watcherExecuteWatchApi (params, options, callback) {
154
154
  ;[params, options, callback] = normalizeArguments(params, options, callback)
155
155
 
156
- var { method, body, id, ...querystring } = params
156
+ let { method, body, id, ...querystring } = params
157
157
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
158
158
 
159
- var path = ''
159
+ let path = ''
160
160
  if ((id) != null) {
161
161
  if (method == null) method = 'PUT'
162
162
  path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id) + '/' + '_execute'
@@ -180,15 +180,15 @@ WatcherApi.prototype.getWatch = function watcherGetWatchApi (params, options, ca
180
180
  ;[params, options, callback] = normalizeArguments(params, options, callback)
181
181
 
182
182
  // check required parameters
183
- if (params['id'] == null) {
183
+ if (params.id == null) {
184
184
  const err = new this[kConfigurationError]('Missing required parameter: id')
185
185
  return handleError(err, callback)
186
186
  }
187
187
 
188
- var { method, body, id, ...querystring } = params
188
+ let { method, body, id, ...querystring } = params
189
189
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
190
190
 
191
- var path = ''
191
+ let path = ''
192
192
  if (method == null) method = 'GET'
193
193
  path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
194
194
 
@@ -207,15 +207,15 @@ WatcherApi.prototype.putWatch = function watcherPutWatchApi (params, options, ca
207
207
  ;[params, options, callback] = normalizeArguments(params, options, callback)
208
208
 
209
209
  // check required parameters
210
- if (params['id'] == null) {
210
+ if (params.id == null) {
211
211
  const err = new this[kConfigurationError]('Missing required parameter: id')
212
212
  return handleError(err, callback)
213
213
  }
214
214
 
215
- var { method, body, id, ...querystring } = params
215
+ let { method, body, id, ...querystring } = params
216
216
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
217
217
 
218
- var path = ''
218
+ let path = ''
219
219
  if (method == null) method = 'PUT'
220
220
  path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
221
221
 
@@ -233,10 +233,10 @@ WatcherApi.prototype.putWatch = function watcherPutWatchApi (params, options, ca
233
233
  WatcherApi.prototype.queryWatches = function watcherQueryWatchesApi (params, options, callback) {
234
234
  ;[params, options, callback] = normalizeArguments(params, options, callback)
235
235
 
236
- var { method, body, ...querystring } = params
236
+ let { method, body, ...querystring } = params
237
237
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
238
238
 
239
- var path = ''
239
+ let path = ''
240
240
  if (method == null) method = body == null ? 'GET' : 'POST'
241
241
  path = '/' + '_watcher' + '/' + '_query' + '/' + 'watches'
242
242
 
@@ -254,10 +254,10 @@ WatcherApi.prototype.queryWatches = function watcherQueryWatchesApi (params, opt
254
254
  WatcherApi.prototype.start = function watcherStartApi (params, options, callback) {
255
255
  ;[params, options, callback] = normalizeArguments(params, options, callback)
256
256
 
257
- var { method, body, ...querystring } = params
257
+ let { method, body, ...querystring } = params
258
258
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
259
259
 
260
- var path = ''
260
+ let path = ''
261
261
  if (method == null) method = 'POST'
262
262
  path = '/' + '_watcher' + '/' + '_start'
263
263
 
@@ -275,10 +275,10 @@ WatcherApi.prototype.start = function watcherStartApi (params, options, callback
275
275
  WatcherApi.prototype.stats = function watcherStatsApi (params, options, callback) {
276
276
  ;[params, options, callback] = normalizeArguments(params, options, callback)
277
277
 
278
- var { method, body, metric, ...querystring } = params
278
+ let { method, body, metric, ...querystring } = params
279
279
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
280
280
 
281
- var path = ''
281
+ let path = ''
282
282
  if ((metric) != null) {
283
283
  if (method == null) method = 'GET'
284
284
  path = '/' + '_watcher' + '/' + 'stats' + '/' + encodeURIComponent(metric)
@@ -301,10 +301,10 @@ WatcherApi.prototype.stats = function watcherStatsApi (params, options, callback
301
301
  WatcherApi.prototype.stop = function watcherStopApi (params, options, callback) {
302
302
  ;[params, options, callback] = normalizeArguments(params, options, callback)
303
303
 
304
- var { method, body, ...querystring } = params
304
+ let { method, body, ...querystring } = params
305
305
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
306
306
 
307
- var path = ''
307
+ let path = ''
308
308
  if (method == null) method = 'POST'
309
309
  path = '/' + '_watcher' + '/' + '_stop'
310
310
 
package/api/api/xpack.js CHANGED
@@ -34,10 +34,10 @@ function XpackApi (transport, ConfigurationError) {
34
34
  XpackApi.prototype.info = function xpackInfoApi (params, options, callback) {
35
35
  ;[params, options, callback] = normalizeArguments(params, options, callback)
36
36
 
37
- var { method, body, ...querystring } = params
37
+ let { method, body, ...querystring } = params
38
38
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
39
39
 
40
- var path = ''
40
+ let path = ''
41
41
  if (method == null) method = 'GET'
42
42
  path = '/' + '_xpack'
43
43
 
@@ -55,10 +55,10 @@ XpackApi.prototype.info = function xpackInfoApi (params, options, callback) {
55
55
  XpackApi.prototype.usage = function xpackUsageApi (params, options, callback) {
56
56
  ;[params, options, callback] = normalizeArguments(params, options, callback)
57
57
 
58
- var { method, body, ...querystring } = params
58
+ let { method, body, ...querystring } = params
59
59
  querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
60
60
 
61
- var path = ''
61
+ let path = ''
62
62
  if (method == null) method = 'GET'
63
63
  path = '/' + '_xpack' + '/' + 'usage'
64
64