@elastic/elasticsearch 7.10.0 → 7.13.0
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 +2 -2
- package/api/api/async_search.js +35 -8
- package/api/api/autoscaling.js +15 -15
- 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 +26 -26
- package/api/api/index.js +4 -4
- package/api/api/indices.js +385 -339
- 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 +344 -204
- 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 +66 -25
- 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 +295 -85
- package/api/api/shutdown.js +124 -0
- package/api/api/slm.js +21 -21
- package/api/api/snapshot.js +48 -48
- package/api/api/sql.js +9 -9
- package/api/api/ssl.js +2 -2
- package/api/api/tasks.js +7 -7
- package/api/api/termvectors.js +3 -3
- package/api/api/text_structure.js +65 -0
- package/api/api/transform.js +27 -27
- 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 +50 -28
- package/api/api/xpack.js +4 -4
- package/api/index.js +176 -120
- package/api/new.d.ts +1498 -0
- package/api/requestParams.d.ts +168 -8
- package/api/types.d.ts +13881 -0
- package/api/utils.js +4 -4
- package/free-report-junit.xml +3410 -0
- package/index.d.ts +275 -30
- package/index.js +29 -30
- package/lib/Connection.js +7 -5
- package/lib/Helpers.d.ts +2 -2
- package/lib/Helpers.js +30 -18
- package/lib/Serializer.d.ts +5 -0
- package/lib/Serializer.js +17 -6
- package/lib/Transport.d.ts +2 -1
- package/lib/Transport.js +38 -8
- package/lib/errors.js +14 -1
- package/lib/pool/BaseConnectionPool.js +3 -3
- package/lib/pool/ConnectionPool.js +4 -5
- package/package.json +26 -26
- package/api/kibana.d.ts +0 -479
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ npm install @elastic/elasticsearch
|
|
|
28
28
|
|
|
29
29
|
### Node.js support
|
|
30
30
|
|
|
31
|
-
NOTE: The minimum supported version of Node.js is `
|
|
31
|
+
NOTE: The minimum supported version of Node.js is `v10`.
|
|
32
32
|
|
|
33
33
|
The client versioning follows the Elastc Stack versioning, this means that
|
|
34
34
|
major, minor, and patch releases are done following a precise schedule that
|
|
@@ -71,7 +71,7 @@ npm install @elastic/elasticsearch@<major>
|
|
|
71
71
|
#### Browser
|
|
72
72
|
|
|
73
73
|
WARNING: There is no official support for the browser environment. It exposes your Elasticsearch instance to everyone, which could lead to security issues.
|
|
74
|
-
We recommend that you write a lightweight proxy that uses this client instead.
|
|
74
|
+
We recommend that you write a lightweight proxy that uses this client instead, you can see a proxy example [here](./docs/examples/proxy).
|
|
75
75
|
|
|
76
76
|
## Documentation
|
|
77
77
|
|
package/api/api/async_search.js
CHANGED
|
@@ -35,15 +35,15 @@ AsyncSearchApi.prototype.delete = function asyncSearchDeleteApi (params, options
|
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
37
|
// check required parameters
|
|
38
|
-
if (params
|
|
38
|
+
if (params.id == null) {
|
|
39
39
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
|
40
40
|
return handleError(err, callback)
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
let { method, body, id, ...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 = '/' + '_async_search' + '/' + encodeURIComponent(id)
|
|
49
49
|
|
|
@@ -62,15 +62,15 @@ AsyncSearchApi.prototype.get = function asyncSearchGetApi (params, options, call
|
|
|
62
62
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
63
63
|
|
|
64
64
|
// check required parameters
|
|
65
|
-
if (params
|
|
65
|
+
if (params.id == null) {
|
|
66
66
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
|
67
67
|
return handleError(err, callback)
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
let { method, body, id, ...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 = '/' + '_async_search' + '/' + encodeURIComponent(id)
|
|
76
76
|
|
|
@@ -85,13 +85,40 @@ AsyncSearchApi.prototype.get = function asyncSearchGetApi (params, options, call
|
|
|
85
85
|
return this.transport.request(request, options, callback)
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
AsyncSearchApi.prototype.status = function asyncSearchStatusApi (params, options, callback) {
|
|
89
|
+
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
90
|
+
|
|
91
|
+
// check required parameters
|
|
92
|
+
if (params.id == null) {
|
|
93
|
+
const err = new this[kConfigurationError]('Missing required parameter: id')
|
|
94
|
+
return handleError(err, callback)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
let { method, body, id, ...querystring } = params
|
|
98
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
99
|
+
|
|
100
|
+
let path = ''
|
|
101
|
+
if (method == null) method = 'GET'
|
|
102
|
+
path = '/' + '_async_search' + '/' + 'status' + '/' + encodeURIComponent(id)
|
|
103
|
+
|
|
104
|
+
// build request object
|
|
105
|
+
const request = {
|
|
106
|
+
method,
|
|
107
|
+
path,
|
|
108
|
+
body: null,
|
|
109
|
+
querystring
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return this.transport.request(request, options, callback)
|
|
113
|
+
}
|
|
114
|
+
|
|
88
115
|
AsyncSearchApi.prototype.submit = function asyncSearchSubmitApi (params, options, callback) {
|
|
89
116
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
90
117
|
|
|
91
|
-
|
|
118
|
+
let { method, body, index, ...querystring } = params
|
|
92
119
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
93
120
|
|
|
94
|
-
|
|
121
|
+
let path = ''
|
|
95
122
|
if ((index) != null) {
|
|
96
123
|
if (method == null) method = 'POST'
|
|
97
124
|
path = '/' + encodeURIComponent(index) + '/' + '_async_search'
|
package/api/api/autoscaling.js
CHANGED
|
@@ -35,15 +35,15 @@ AutoscalingApi.prototype.deleteAutoscalingPolicy = function autoscalingDeleteAut
|
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
37
|
// check required parameters
|
|
38
|
-
if (params
|
|
38
|
+
if (params.name == null) {
|
|
39
39
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
40
40
|
return handleError(err, callback)
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
let { method, body, name, ...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 = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
|
49
49
|
|
|
@@ -58,15 +58,15 @@ AutoscalingApi.prototype.deleteAutoscalingPolicy = function autoscalingDeleteAut
|
|
|
58
58
|
return this.transport.request(request, options, callback)
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
AutoscalingApi.prototype.
|
|
61
|
+
AutoscalingApi.prototype.getAutoscalingCapacity = function autoscalingGetAutoscalingCapacityApi (params, options, callback) {
|
|
62
62
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
let { method, body, ...querystring } = params
|
|
65
65
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
let path = ''
|
|
68
68
|
if (method == null) method = 'GET'
|
|
69
|
-
path = '/' + '_autoscaling' + '/' + '
|
|
69
|
+
path = '/' + '_autoscaling' + '/' + 'capacity'
|
|
70
70
|
|
|
71
71
|
// build request object
|
|
72
72
|
const request = {
|
|
@@ -83,15 +83,15 @@ AutoscalingApi.prototype.getAutoscalingPolicy = function autoscalingGetAutoscali
|
|
|
83
83
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
84
84
|
|
|
85
85
|
// check required parameters
|
|
86
|
-
if (params
|
|
86
|
+
if (params.name == null) {
|
|
87
87
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
88
88
|
return handleError(err, callback)
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
let { method, body, name, ...querystring } = params
|
|
92
92
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
let path = ''
|
|
95
95
|
if (method == null) method = 'GET'
|
|
96
96
|
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
|
97
97
|
|
|
@@ -110,19 +110,19 @@ AutoscalingApi.prototype.putAutoscalingPolicy = function autoscalingPutAutoscali
|
|
|
110
110
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
111
111
|
|
|
112
112
|
// check required parameters
|
|
113
|
-
if (params
|
|
113
|
+
if (params.name == null) {
|
|
114
114
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
115
115
|
return handleError(err, callback)
|
|
116
116
|
}
|
|
117
|
-
if (params
|
|
117
|
+
if (params.body == null) {
|
|
118
118
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
119
119
|
return handleError(err, callback)
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
let { method, body, name, ...querystring } = params
|
|
123
123
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
let path = ''
|
|
126
126
|
if (method == null) method = 'PUT'
|
|
127
127
|
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
|
128
128
|
|
|
@@ -139,7 +139,7 @@ AutoscalingApi.prototype.putAutoscalingPolicy = function autoscalingPutAutoscali
|
|
|
139
139
|
|
|
140
140
|
Object.defineProperties(AutoscalingApi.prototype, {
|
|
141
141
|
delete_autoscaling_policy: { get () { return this.deleteAutoscalingPolicy } },
|
|
142
|
-
|
|
142
|
+
get_autoscaling_capacity: { get () { return this.getAutoscalingCapacity } },
|
|
143
143
|
get_autoscaling_policy: { get () { return this.getAutoscalingPolicy } },
|
|
144
144
|
put_autoscaling_policy: { get () { return this.putAutoscalingPolicy } }
|
|
145
145
|
})
|
package/api/api/bulk.js
CHANGED
|
@@ -30,21 +30,21 @@ function bulkApi (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.body == null) {
|
|
34
34
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
35
35
|
return handleError(err, callback)
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
// check required url components
|
|
39
|
-
if (params
|
|
39
|
+
if (params.type != null && (params.index == null)) {
|
|
40
40
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
41
41
|
return handleError(err, callback)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
let { method, body, index, type, ...querystring } = params
|
|
45
45
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
let path = ''
|
|
48
48
|
if ((index) != null && (type) != null) {
|
|
49
49
|
if (method == null) method = 'POST'
|
|
50
50
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_bulk'
|