@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/monitoring.js
CHANGED
|
@@ -35,15 +35,15 @@ MonitoringApi.prototype.bulk = function monitoringBulkApi (params, options, call
|
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
37
|
// check required parameters
|
|
38
|
-
if (params
|
|
38
|
+
if (params.body == null) {
|
|
39
39
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
40
40
|
return handleError(err, callback)
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
let { method, body, type, ...querystring } = params
|
|
44
44
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
let path = ''
|
|
47
47
|
if ((type) != null) {
|
|
48
48
|
if (method == null) method = 'POST'
|
|
49
49
|
path = '/' + '_monitoring' + '/' + encodeURIComponent(type) + '/' + 'bulk'
|
package/api/api/msearch.js
CHANGED
|
@@ -30,21 +30,21 @@ function msearchApi (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 = body == null ? 'GET' : 'POST'
|
|
50
50
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch'
|
|
@@ -30,21 +30,21 @@ function msearchTemplateApi (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 = body == null ? 'GET' : 'POST'
|
|
50
50
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch' + '/' + 'template'
|
package/api/api/mtermvectors.js
CHANGED
|
@@ -30,15 +30,15 @@ function mtermvectorsApi (params, options, callback) {
|
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
32
|
// check required url components
|
|
33
|
-
if (params
|
|
33
|
+
if (params.type != null && (params.index == null)) {
|
|
34
34
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
35
35
|
return handleError(err, callback)
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
let { method, body, index, type, ...querystring } = params
|
|
39
39
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
let path = ''
|
|
42
42
|
if ((index) != null && (type) != null) {
|
|
43
43
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
44
44
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mtermvectors'
|
package/api/api/nodes.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 = ['interval', 'snapshots', 'threads', 'ignore_idle_threads', 'type', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'flat_settings', 'completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'types', 'include_segment_file_sizes']
|
|
27
|
-
const snakeCase = { ignoreIdleThreads: 'ignore_idle_threads', errorTrace: 'error_trace', filterPath: 'filter_path', flatSettings: 'flat_settings', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes' }
|
|
26
|
+
const acceptedQuerystring = ['interval', 'snapshots', 'threads', 'ignore_idle_threads', 'type', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'flat_settings', 'completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments']
|
|
27
|
+
const snakeCase = { ignoreIdleThreads: 'ignore_idle_threads', errorTrace: 'error_trace', filterPath: 'filter_path', flatSettings: 'flat_settings', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes', includeUnloadedSegments: 'include_unloaded_segments' }
|
|
28
28
|
|
|
29
29
|
function NodesApi (transport, ConfigurationError) {
|
|
30
30
|
this.transport = transport
|
|
@@ -34,10 +34,10 @@ function NodesApi (transport, ConfigurationError) {
|
|
|
34
34
|
NodesApi.prototype.hotThreads = function nodesHotThreadsApi (params, options, callback) {
|
|
35
35
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
let { method, body, nodeId, node_id, ...querystring } = params
|
|
38
38
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
let path = ''
|
|
41
41
|
if ((node_id || nodeId) != null) {
|
|
42
42
|
if (method == null) method = 'GET'
|
|
43
43
|
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
|
|
@@ -69,10 +69,10 @@ NodesApi.prototype.hotThreads = function nodesHotThreadsApi (params, options, ca
|
|
|
69
69
|
NodesApi.prototype.info = function nodesInfoApi (params, options, callback) {
|
|
70
70
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
let { method, body, nodeId, node_id, metric, ...querystring } = params
|
|
73
73
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
let path = ''
|
|
76
76
|
if ((node_id || nodeId) != null && (metric) != null) {
|
|
77
77
|
if (method == null) method = 'GET'
|
|
78
78
|
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + encodeURIComponent(metric)
|
|
@@ -101,10 +101,10 @@ NodesApi.prototype.info = function nodesInfoApi (params, options, callback) {
|
|
|
101
101
|
NodesApi.prototype.reloadSecureSettings = function nodesReloadSecureSettingsApi (params, options, callback) {
|
|
102
102
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
let { method, body, nodeId, node_id, ...querystring } = params
|
|
105
105
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
let path = ''
|
|
108
108
|
if ((node_id || nodeId) != null) {
|
|
109
109
|
if (method == null) method = 'POST'
|
|
110
110
|
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'reload_secure_settings'
|
|
@@ -127,10 +127,10 @@ NodesApi.prototype.reloadSecureSettings = function nodesReloadSecureSettingsApi
|
|
|
127
127
|
NodesApi.prototype.stats = function nodesStatsApi (params, options, callback) {
|
|
128
128
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
let { method, body, nodeId, node_id, metric, indexMetric, index_metric, ...querystring } = params
|
|
131
131
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
let path = ''
|
|
134
134
|
if ((node_id || nodeId) != null && (metric) != null && (index_metric || indexMetric) != null) {
|
|
135
135
|
if (method == null) method = 'GET'
|
|
136
136
|
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'stats' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index_metric || indexMetric)
|
|
@@ -165,10 +165,10 @@ NodesApi.prototype.stats = function nodesStatsApi (params, options, callback) {
|
|
|
165
165
|
NodesApi.prototype.usage = function nodesUsageApi (params, options, callback) {
|
|
166
166
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
let { method, body, nodeId, node_id, metric, ...querystring } = params
|
|
169
169
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
let path = ''
|
|
172
172
|
if ((node_id || nodeId) != null && (metric) != null) {
|
|
173
173
|
if (method == null) method = 'GET'
|
|
174
174
|
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'usage' + '/' + encodeURIComponent(metric)
|
|
@@ -29,10 +29,10 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', expandWildcards: 'e
|
|
|
29
29
|
function openPointInTimeApi (params, options, callback) {
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
let { method, body, index, ...querystring } = params
|
|
33
33
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
let path = ''
|
|
36
36
|
if ((index) != null) {
|
|
37
37
|
if (method == null) method = 'POST'
|
|
38
38
|
path = '/' + encodeURIComponent(index) + '/' + '_pit'
|
package/api/api/ping.js
CHANGED
|
@@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|
|
29
29
|
function pingApi (params, options, callback) {
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
let { method, body, ...querystring } = params
|
|
33
33
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
let path = ''
|
|
36
36
|
if (method == null) method = 'HEAD'
|
|
37
37
|
path = '/'
|
|
38
38
|
|
package/api/api/put_script.js
CHANGED
|
@@ -30,25 +30,25 @@ function putScriptApi (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.id == null) {
|
|
34
34
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
|
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
|
// check required url components
|
|
43
|
-
if (params
|
|
43
|
+
if (params.context != null && (params.id == null)) {
|
|
44
44
|
const err = new this[kConfigurationError]('Missing required parameter of the url: id')
|
|
45
45
|
return handleError(err, callback)
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
let { method, body, id, context, ...querystring } = params
|
|
49
49
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
let path = ''
|
|
52
52
|
if ((id) != null && (context) != null) {
|
|
53
53
|
if (method == null) method = 'PUT'
|
|
54
54
|
path = '/' + '_scripts' + '/' + encodeURIComponent(id) + '/' + encodeURIComponent(context)
|
package/api/api/rank_eval.js
CHANGED
|
@@ -30,15 +30,15 @@ function rankEvalApi (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
|
+
let { method, body, index, ...querystring } = params
|
|
39
39
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
let path = ''
|
|
42
42
|
if ((index) != null) {
|
|
43
43
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
44
44
|
path = '/' + encodeURIComponent(index) + '/' + '_rank_eval'
|
package/api/api/reindex.js
CHANGED
|
@@ -30,15 +30,15 @@ function reindexApi (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
|
+
let { method, body, ...querystring } = params
|
|
39
39
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
let path = ''
|
|
42
42
|
if (method == null) method = 'POST'
|
|
43
43
|
path = '/' + '_reindex'
|
|
44
44
|
|
|
@@ -30,19 +30,19 @@ function reindexRethrottleApi (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.task_id == null && params.taskId == null) {
|
|
34
34
|
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
|
35
35
|
return handleError(err, callback)
|
|
36
36
|
}
|
|
37
|
-
if (params
|
|
37
|
+
if (params.requests_per_second == null && params.requestsPerSecond == null) {
|
|
38
38
|
const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
|
|
39
39
|
return handleError(err, callback)
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
let { method, body, taskId, task_id, ...querystring } = params
|
|
43
43
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
let path = ''
|
|
46
46
|
if (method == null) method = 'POST'
|
|
47
47
|
path = '/' + '_reindex' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
|
|
48
48
|
|
|
@@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|
|
29
29
|
function renderSearchTemplateApi (params, options, callback) {
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
let { method, body, id, ...querystring } = params
|
|
33
33
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
let path = ''
|
|
36
36
|
if ((id) != null) {
|
|
37
37
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
38
38
|
path = '/' + '_render' + '/' + 'template' + '/' + encodeURIComponent(id)
|
package/api/api/rollup.js
CHANGED
|
@@ -35,15 +35,15 @@ RollupApi.prototype.deleteJob = function rollupDeleteJobApi (params, options, ca
|
|
|
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 = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
|
|
49
49
|
|
|
@@ -61,10 +61,10 @@ RollupApi.prototype.deleteJob = function rollupDeleteJobApi (params, options, ca
|
|
|
61
61
|
RollupApi.prototype.getJobs = function rollupGetJobsApi (params, options, callback) {
|
|
62
62
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
let { method, body, id, ...querystring } = params
|
|
65
65
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
let path = ''
|
|
68
68
|
if ((id) != null) {
|
|
69
69
|
if (method == null) method = 'GET'
|
|
70
70
|
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
|
|
@@ -87,10 +87,10 @@ RollupApi.prototype.getJobs = function rollupGetJobsApi (params, options, callba
|
|
|
87
87
|
RollupApi.prototype.getRollupCaps = function rollupGetRollupCapsApi (params, options, callback) {
|
|
88
88
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
let { method, body, id, ...querystring } = params
|
|
91
91
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
let path = ''
|
|
94
94
|
if ((id) != null) {
|
|
95
95
|
if (method == null) method = 'GET'
|
|
96
96
|
path = '/' + '_rollup' + '/' + 'data' + '/' + encodeURIComponent(id)
|
|
@@ -114,15 +114,15 @@ RollupApi.prototype.getRollupIndexCaps = function rollupGetRollupIndexCapsApi (p
|
|
|
114
114
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
115
115
|
|
|
116
116
|
// check required parameters
|
|
117
|
-
if (params
|
|
117
|
+
if (params.index == null) {
|
|
118
118
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
119
119
|
return handleError(err, callback)
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
let { method, body, index, ...querystring } = params
|
|
123
123
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
let path = ''
|
|
126
126
|
if (method == null) method = 'GET'
|
|
127
127
|
path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + 'data'
|
|
128
128
|
|
|
@@ -141,19 +141,19 @@ RollupApi.prototype.putJob = function rollupPutJobApi (params, options, callback
|
|
|
141
141
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
142
142
|
|
|
143
143
|
// check required parameters
|
|
144
|
-
if (params
|
|
144
|
+
if (params.id == null) {
|
|
145
145
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
|
146
146
|
return handleError(err, callback)
|
|
147
147
|
}
|
|
148
|
-
if (params
|
|
148
|
+
if (params.body == null) {
|
|
149
149
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
150
150
|
return handleError(err, callback)
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
let { method, body, id, ...querystring } = params
|
|
154
154
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
let path = ''
|
|
157
157
|
if (method == null) method = 'PUT'
|
|
158
158
|
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
|
|
159
159
|
|
|
@@ -172,29 +172,29 @@ RollupApi.prototype.rollup = function rollupRollupApi (params, options, callback
|
|
|
172
172
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
173
173
|
|
|
174
174
|
// check required parameters
|
|
175
|
-
if (params
|
|
175
|
+
if (params.index == null) {
|
|
176
176
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
177
177
|
return handleError(err, callback)
|
|
178
178
|
}
|
|
179
|
-
if (params
|
|
179
|
+
if (params.rollup_index == null && params.rollupIndex == null) {
|
|
180
180
|
const err = new this[kConfigurationError]('Missing required parameter: rollup_index or rollupIndex')
|
|
181
181
|
return handleError(err, callback)
|
|
182
182
|
}
|
|
183
|
-
if (params
|
|
183
|
+
if (params.body == null) {
|
|
184
184
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
185
185
|
return handleError(err, callback)
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
// check required url components
|
|
189
|
-
if ((params
|
|
189
|
+
if ((params.rollup_index != null || params.rollupIndex != null) && (params.index == null)) {
|
|
190
190
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
191
191
|
return handleError(err, callback)
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
let { method, body, index, rollupIndex, rollup_index, ...querystring } = params
|
|
195
195
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
let path = ''
|
|
198
198
|
if (method == null) method = 'POST'
|
|
199
199
|
path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + encodeURIComponent(rollup_index || rollupIndex)
|
|
200
200
|
|
|
@@ -213,25 +213,25 @@ RollupApi.prototype.rollupSearch = function rollupRollupSearchApi (params, optio
|
|
|
213
213
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
214
214
|
|
|
215
215
|
// check required parameters
|
|
216
|
-
if (params
|
|
216
|
+
if (params.index == null) {
|
|
217
217
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
218
218
|
return handleError(err, callback)
|
|
219
219
|
}
|
|
220
|
-
if (params
|
|
220
|
+
if (params.body == null) {
|
|
221
221
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
222
222
|
return handleError(err, callback)
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
// check required url components
|
|
226
|
-
if (params
|
|
226
|
+
if (params.type != null && (params.index == null)) {
|
|
227
227
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
228
228
|
return handleError(err, callback)
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
|
|
231
|
+
let { method, body, index, type, ...querystring } = params
|
|
232
232
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
let path = ''
|
|
235
235
|
if ((index) != null && (type) != null) {
|
|
236
236
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
237
237
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_rollup_search'
|
|
@@ -255,15 +255,15 @@ RollupApi.prototype.startJob = function rollupStartJobApi (params, options, call
|
|
|
255
255
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
256
256
|
|
|
257
257
|
// check required parameters
|
|
258
|
-
if (params
|
|
258
|
+
if (params.id == null) {
|
|
259
259
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
|
260
260
|
return handleError(err, callback)
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
|
|
263
|
+
let { method, body, id, ...querystring } = params
|
|
264
264
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
265
265
|
|
|
266
|
-
|
|
266
|
+
let path = ''
|
|
267
267
|
if (method == null) method = 'POST'
|
|
268
268
|
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_start'
|
|
269
269
|
|
|
@@ -282,15 +282,15 @@ RollupApi.prototype.stopJob = function rollupStopJobApi (params, options, callba
|
|
|
282
282
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
283
283
|
|
|
284
284
|
// check required parameters
|
|
285
|
-
if (params
|
|
285
|
+
if (params.id == null) {
|
|
286
286
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
|
287
287
|
return handleError(err, callback)
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
let { method, body, id, ...querystring } = params
|
|
291
291
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
292
292
|
|
|
293
|
-
|
|
293
|
+
let path = ''
|
|
294
294
|
if (method == null) method = 'POST'
|
|
295
295
|
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_stop'
|
|
296
296
|
|
|
@@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|
|
29
29
|
function scriptsPainlessExecuteApi (params, options, callback) {
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
let { method, body, ...querystring } = params
|
|
33
33
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
let path = ''
|
|
36
36
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
37
37
|
path = '/' + '_scripts' + '/' + 'painless' + '/' + '_execute'
|
|
38
38
|
|
package/api/api/scroll.js
CHANGED
|
@@ -29,10 +29,10 @@ const snakeCase = { scrollId: 'scroll_id', restTotalHitsAsInt: 'rest_total_hits_
|
|
|
29
29
|
function scrollApi (params, options, callback) {
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
let { method, body, scrollId, scroll_id, ...querystring } = params
|
|
33
33
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
let path = ''
|
|
36
36
|
if ((scroll_id || scrollId) != null) {
|
|
37
37
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
38
38
|
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
|
package/api/api/search.js
CHANGED
|
@@ -23,22 +23,22 @@
|
|
|
23
23
|
/* eslint no-unused-vars: 0 */
|
|
24
24
|
|
|
25
25
|
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
|
26
|
-
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
|
27
|
-
const snakeCase = { analyzeWildcard: 'analyze_wildcard', ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', typedKeys: 'typed_keys', seqNoPrimaryTerm: 'seq_no_primary_term', requestCache: 'request_cache', batchedReduceSize: 'batched_reduce_size', maxConcurrentShardRequests: 'max_concurrent_shard_requests', preFilterShardSize: 'pre_filter_shard_size', restTotalHitsAsInt: 'rest_total_hits_as_int', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|
26
|
+
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'min_compatible_shard_node', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
|
27
|
+
const snakeCase = { analyzeWildcard: 'analyze_wildcard', ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', typedKeys: 'typed_keys', seqNoPrimaryTerm: 'seq_no_primary_term', requestCache: 'request_cache', batchedReduceSize: 'batched_reduce_size', maxConcurrentShardRequests: 'max_concurrent_shard_requests', preFilterShardSize: 'pre_filter_shard_size', restTotalHitsAsInt: 'rest_total_hits_as_int', minCompatibleShardNode: 'min_compatible_shard_node', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|
28
28
|
|
|
29
29
|
function searchApi (params, options, callback) {
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
32
|
// check required url components
|
|
33
|
-
if (params
|
|
33
|
+
if (params.type != null && (params.index == null)) {
|
|
34
34
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
35
35
|
return handleError(err, callback)
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
let { method, body, index, type, ...querystring } = params
|
|
39
39
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
let path = ''
|
|
42
42
|
if ((index) != null && (type) != null) {
|
|
43
43
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
44
44
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search'
|
package/api/api/search_shards.js
CHANGED
|
@@ -29,10 +29,10 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'al
|
|
|
29
29
|
function searchShardsApi (params, options, callback) {
|
|
30
30
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
let { method, body, index, ...querystring } = params
|
|
33
33
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
let path = ''
|
|
36
36
|
if ((index) != null) {
|
|
37
37
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
38
38
|
path = '/' + encodeURIComponent(index) + '/' + '_search_shards'
|
|
@@ -30,21 +30,21 @@ function searchTemplateApi (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 = body == null ? 'GET' : 'POST'
|
|
50
50
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' + '/' + 'template'
|