API generation
This commit is contained in:
@ -13,10 +13,13 @@ function buildCatRecovery (opts) {
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'format',
|
||||
'active_only',
|
||||
'bytes',
|
||||
'detailed',
|
||||
'master_timeout',
|
||||
'h',
|
||||
'help',
|
||||
'index',
|
||||
's',
|
||||
'v',
|
||||
'pretty',
|
||||
@ -27,6 +30,7 @@ function buildCatRecovery (opts) {
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
activeOnly: 'active_only',
|
||||
masterTimeout: 'master_timeout',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
|
||||
@ -76,7 +76,7 @@ function buildExists (opts) {
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
var { method, body, id, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
@ -86,13 +86,8 @@ function buildExists (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else {
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -79,7 +79,7 @@ function buildExplain (opts) {
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
var { method, body, id, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
@ -89,13 +89,8 @@ function buildExplain (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_explain'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_explain' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_explain' + '/' + encodeURIComponent(id)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -76,7 +76,7 @@ function buildGet (opts) {
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
var { method, body, id, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
@ -86,13 +86,8 @@ function buildGet (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -74,7 +74,7 @@ function buildGetSource (opts) {
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
var { method, body, id, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
@ -84,13 +84,8 @@ function buildGetSource (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id)
|
||||
}
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -42,12 +42,6 @@ function buildGraphExplore (opts) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
@ -55,7 +49,7 @@ function buildGraphExplore (opts) {
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
@ -65,13 +59,8 @@ function buildGraphExplore (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_graph' + '/' + 'explore'
|
||||
}
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_graph' + '/' + 'explore'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -84,10 +84,10 @@ function buildIndex (opts) {
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
} else if ((index) != null && (id) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
|
||||
@ -65,7 +65,7 @@ function buildIndicesGetFieldMapping (opts) {
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, fields, index, type, ...querystring } = params
|
||||
var { method, body, fields, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
@ -75,15 +75,9 @@ function buildIndicesGetFieldMapping (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null && (fields) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
} else if ((index) != null && (fields) != null) {
|
||||
if ((index) != null && (fields) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
} else if ((type) != null && (fields) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||
|
||||
@ -12,7 +12,6 @@ function buildIndicesGetMapping (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'include_type_name',
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
@ -26,7 +25,6 @@ function buildIndicesGetMapping (opts) {
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
includeTypeName: 'include_type_name',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
@ -59,7 +57,7 @@ function buildIndicesGetMapping (opts) {
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
@ -69,15 +67,9 @@ function buildIndicesGetMapping (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null) {
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
||||
} else if ((type) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_mapping'
|
||||
|
||||
@ -12,7 +12,6 @@ function buildIndicesPutMapping (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'include_type_name',
|
||||
'timeout',
|
||||
'master_timeout',
|
||||
'ignore_unavailable',
|
||||
@ -26,7 +25,6 @@ function buildIndicesPutMapping (opts) {
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
includeTypeName: 'include_type_name',
|
||||
masterTimeout: 'master_timeout',
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
@ -53,6 +51,10 @@ function buildIndicesPutMapping (opts) {
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
@ -65,7 +67,7 @@ function buildIndicesPutMapping (opts) {
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
@ -75,31 +77,8 @@ function buildIndicesPutMapping (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mapping'
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mappings'
|
||||
} else if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mappings' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
||||
} else if ((type) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_mappings' + '/' + encodeURIComponent(type)
|
||||
} else if ((index) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mappings'
|
||||
} else {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||
}
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -62,12 +62,6 @@ function buildMget (opts) {
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
@ -75,7 +69,7 @@ function buildMget (opts) {
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
@ -85,10 +79,7 @@ function buildMget (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mget'
|
||||
} else if ((index) != null) {
|
||||
if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_mget'
|
||||
} else {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildDataFrameDeleteDataFrameTransform (opts) {
|
||||
function buildTransformDeleteTransform (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
@ -20,10 +20,10 @@ function buildDataFrameDeleteDataFrameTransform (opts) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a data_frame.delete_data_frame_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-data-frame-transform.html
|
||||
* Perform a transform.delete_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html
|
||||
*/
|
||||
return function dataFrameDeleteDataFrameTransform (params, options, callback) {
|
||||
return function transformDeleteTransform (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -74,4 +74,4 @@ function buildDataFrameDeleteDataFrameTransform (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildDataFrameDeleteDataFrameTransform
|
||||
module.exports = buildTransformDeleteTransform
|
||||
@ -7,7 +7,7 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildDataFrameGetDataFrameTransform (opts) {
|
||||
function buildTransformGetTransform (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
@ -22,10 +22,10 @@ function buildDataFrameGetDataFrameTransform (opts) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a data_frame.get_data_frame_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform.html
|
||||
* Perform a transform.get_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html
|
||||
*/
|
||||
return function dataFrameGetDataFrameTransform (params, options, callback) {
|
||||
return function transformGetTransform (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -75,4 +75,4 @@ function buildDataFrameGetDataFrameTransform (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildDataFrameGetDataFrameTransform
|
||||
module.exports = buildTransformGetTransform
|
||||
@ -7,7 +7,7 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildDataFrameGetDataFrameTransformStats (opts) {
|
||||
function buildTransformGetTransformStats (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
@ -22,10 +22,10 @@ function buildDataFrameGetDataFrameTransformStats (opts) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a data_frame.get_data_frame_transform_stats request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform-stats.html
|
||||
* Perform a transform.get_transform_stats request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html
|
||||
*/
|
||||
return function dataFrameGetDataFrameTransformStats (params, options, callback) {
|
||||
return function transformGetTransformStats (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -76,4 +76,4 @@ function buildDataFrameGetDataFrameTransformStats (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildDataFrameGetDataFrameTransformStats
|
||||
module.exports = buildTransformGetTransformStats
|
||||
@ -7,7 +7,7 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildDataFramePreviewDataFrameTransform (opts) {
|
||||
function buildTransformPreviewTransform (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
@ -20,10 +20,10 @@ function buildDataFramePreviewDataFrameTransform (opts) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a data_frame.preview_data_frame_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-data-frame-transform.html
|
||||
* Perform a transform.preview_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html
|
||||
*/
|
||||
return function dataFramePreviewDataFrameTransform (params, options, callback) {
|
||||
return function transformPreviewTransform (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -74,4 +74,4 @@ function buildDataFramePreviewDataFrameTransform (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildDataFramePreviewDataFrameTransform
|
||||
module.exports = buildTransformPreviewTransform
|
||||
@ -7,7 +7,7 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildDataFramePutDataFrameTransform (opts) {
|
||||
function buildTransformPutTransform (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
@ -20,10 +20,10 @@ function buildDataFramePutDataFrameTransform (opts) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a data_frame.put_data_frame_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/put-data-frame-transform.html
|
||||
* Perform a transform.put_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html
|
||||
*/
|
||||
return function dataFramePutDataFrameTransform (params, options, callback) {
|
||||
return function transformPutTransform (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -78,4 +78,4 @@ function buildDataFramePutDataFrameTransform (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildDataFramePutDataFrameTransform
|
||||
module.exports = buildTransformPutTransform
|
||||
@ -7,7 +7,7 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildDataFrameStartDataFrameTransform (opts) {
|
||||
function buildTransformStartTransform (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
@ -20,10 +20,10 @@ function buildDataFrameStartDataFrameTransform (opts) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a data_frame.start_data_frame_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/start-data-frame-transform.html
|
||||
* Perform a transform.start_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html
|
||||
*/
|
||||
return function dataFrameStartDataFrameTransform (params, options, callback) {
|
||||
return function transformStartTransform (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -74,4 +74,4 @@ function buildDataFrameStartDataFrameTransform (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildDataFrameStartDataFrameTransform
|
||||
module.exports = buildTransformStartTransform
|
||||
@ -7,7 +7,7 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildDataFrameStopDataFrameTransform (opts) {
|
||||
function buildTransformStopTransform (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
@ -23,10 +23,10 @@ function buildDataFrameStopDataFrameTransform (opts) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a data_frame.stop_data_frame_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-data-frame-transform.html
|
||||
* Perform a transform.stop_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html
|
||||
*/
|
||||
return function dataFrameStopDataFrameTransform (params, options, callback) {
|
||||
return function transformStopTransform (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -77,4 +77,4 @@ function buildDataFrameStopDataFrameTransform (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildDataFrameStopDataFrameTransform
|
||||
module.exports = buildTransformStopTransform
|
||||
@ -7,7 +7,7 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildDataFrameUpdateDataFrameTransform (opts) {
|
||||
function buildTransformUpdateTransform (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
@ -20,10 +20,10 @@ function buildDataFrameUpdateDataFrameTransform (opts) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a data_frame.update_data_frame_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/update-data-frame-transform.html
|
||||
* Perform a transform.update_transform request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html
|
||||
*/
|
||||
return function dataFrameUpdateDataFrameTransform (params, options, callback) {
|
||||
return function transformUpdateTransform (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -78,4 +78,4 @@ function buildDataFrameUpdateDataFrameTransform (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildDataFrameUpdateDataFrameTransform
|
||||
module.exports = buildTransformUpdateTransform
|
||||
54
api/index.js
54
api/index.js
@ -82,42 +82,6 @@ function ESAPI (opts) {
|
||||
},
|
||||
count: lazyLoad('count', opts),
|
||||
create: lazyLoad('create', opts),
|
||||
data_frame: {
|
||||
delete_data_frame_transform: lazyLoad('data_frame.delete_data_frame_transform', opts),
|
||||
deleteDataFrameTransform: lazyLoad('data_frame.delete_data_frame_transform', opts),
|
||||
get_data_frame_transform: lazyLoad('data_frame.get_data_frame_transform', opts),
|
||||
getDataFrameTransform: lazyLoad('data_frame.get_data_frame_transform', opts),
|
||||
get_data_frame_transform_stats: lazyLoad('data_frame.get_data_frame_transform_stats', opts),
|
||||
getDataFrameTransformStats: lazyLoad('data_frame.get_data_frame_transform_stats', opts),
|
||||
preview_data_frame_transform: lazyLoad('data_frame.preview_data_frame_transform', opts),
|
||||
previewDataFrameTransform: lazyLoad('data_frame.preview_data_frame_transform', opts),
|
||||
put_data_frame_transform: lazyLoad('data_frame.put_data_frame_transform', opts),
|
||||
putDataFrameTransform: lazyLoad('data_frame.put_data_frame_transform', opts),
|
||||
start_data_frame_transform: lazyLoad('data_frame.start_data_frame_transform', opts),
|
||||
startDataFrameTransform: lazyLoad('data_frame.start_data_frame_transform', opts),
|
||||
stop_data_frame_transform: lazyLoad('data_frame.stop_data_frame_transform', opts),
|
||||
stopDataFrameTransform: lazyLoad('data_frame.stop_data_frame_transform', opts),
|
||||
update_data_frame_transform: lazyLoad('data_frame.update_data_frame_transform', opts),
|
||||
updateDataFrameTransform: lazyLoad('data_frame.update_data_frame_transform', opts)
|
||||
},
|
||||
dataFrame: {
|
||||
delete_data_frame_transform: lazyLoad('data_frame.delete_data_frame_transform', opts),
|
||||
deleteDataFrameTransform: lazyLoad('data_frame.delete_data_frame_transform', opts),
|
||||
get_data_frame_transform: lazyLoad('data_frame.get_data_frame_transform', opts),
|
||||
getDataFrameTransform: lazyLoad('data_frame.get_data_frame_transform', opts),
|
||||
get_data_frame_transform_stats: lazyLoad('data_frame.get_data_frame_transform_stats', opts),
|
||||
getDataFrameTransformStats: lazyLoad('data_frame.get_data_frame_transform_stats', opts),
|
||||
preview_data_frame_transform: lazyLoad('data_frame.preview_data_frame_transform', opts),
|
||||
previewDataFrameTransform: lazyLoad('data_frame.preview_data_frame_transform', opts),
|
||||
put_data_frame_transform: lazyLoad('data_frame.put_data_frame_transform', opts),
|
||||
putDataFrameTransform: lazyLoad('data_frame.put_data_frame_transform', opts),
|
||||
start_data_frame_transform: lazyLoad('data_frame.start_data_frame_transform', opts),
|
||||
startDataFrameTransform: lazyLoad('data_frame.start_data_frame_transform', opts),
|
||||
stop_data_frame_transform: lazyLoad('data_frame.stop_data_frame_transform', opts),
|
||||
stopDataFrameTransform: lazyLoad('data_frame.stop_data_frame_transform', opts),
|
||||
update_data_frame_transform: lazyLoad('data_frame.update_data_frame_transform', opts),
|
||||
updateDataFrameTransform: lazyLoad('data_frame.update_data_frame_transform', opts)
|
||||
},
|
||||
delete: lazyLoad('delete', opts),
|
||||
delete_by_query: lazyLoad('delete_by_query', opts),
|
||||
deleteByQuery: lazyLoad('delete_by_query', opts),
|
||||
@ -508,6 +472,24 @@ function ESAPI (opts) {
|
||||
list: lazyLoad('tasks.list', opts)
|
||||
},
|
||||
termvectors: lazyLoad('termvectors', opts),
|
||||
transform: {
|
||||
delete_transform: lazyLoad('transform.delete_transform', opts),
|
||||
deleteTransform: lazyLoad('transform.delete_transform', opts),
|
||||
get_transform: lazyLoad('transform.get_transform', opts),
|
||||
getTransform: lazyLoad('transform.get_transform', opts),
|
||||
get_transform_stats: lazyLoad('transform.get_transform_stats', opts),
|
||||
getTransformStats: lazyLoad('transform.get_transform_stats', opts),
|
||||
preview_transform: lazyLoad('transform.preview_transform', opts),
|
||||
previewTransform: lazyLoad('transform.preview_transform', opts),
|
||||
put_transform: lazyLoad('transform.put_transform', opts),
|
||||
putTransform: lazyLoad('transform.put_transform', opts),
|
||||
start_transform: lazyLoad('transform.start_transform', opts),
|
||||
startTransform: lazyLoad('transform.start_transform', opts),
|
||||
stop_transform: lazyLoad('transform.stop_transform', opts),
|
||||
stopTransform: lazyLoad('transform.stop_transform', opts),
|
||||
update_transform: lazyLoad('transform.update_transform', opts),
|
||||
updateTransform: lazyLoad('transform.update_transform', opts)
|
||||
},
|
||||
update: lazyLoad('update', opts),
|
||||
update_by_query: lazyLoad('update_by_query', opts),
|
||||
updateByQuery: lazyLoad('update_by_query', opts),
|
||||
|
||||
109
api/requestParams.d.ts
vendored
109
api/requestParams.d.ts
vendored
@ -159,7 +159,9 @@ export interface CatPlugins extends Generic {
|
||||
export interface CatRecovery extends Generic {
|
||||
index?: string | string[];
|
||||
format?: string;
|
||||
active_only?: boolean;
|
||||
bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
|
||||
detailed?: boolean;
|
||||
master_timeout?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
@ -422,7 +424,6 @@ export interface DeleteScript extends Generic {
|
||||
export interface Exists extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
stored_fields?: string | string[];
|
||||
@ -457,7 +458,6 @@ export interface ExistsSource extends Generic {
|
||||
export interface Explain<T = any> extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
analyze_wildcard?: boolean;
|
||||
@ -487,7 +487,6 @@ export interface FieldCaps extends Generic {
|
||||
export interface Get extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
stored_fields?: string | string[];
|
||||
@ -510,7 +509,6 @@ export interface GetScript extends Generic {
|
||||
export interface GetSource extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
preference?: string;
|
||||
@ -692,7 +690,6 @@ export interface IndicesGetAlias extends Generic {
|
||||
export interface IndicesGetFieldMapping extends Generic {
|
||||
fields: string | string[];
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
include_type_name?: boolean;
|
||||
include_defaults?: boolean;
|
||||
ignore_unavailable?: boolean;
|
||||
@ -703,8 +700,6 @@ export interface IndicesGetFieldMapping extends Generic {
|
||||
|
||||
export interface IndicesGetMapping extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
include_type_name?: boolean;
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
|
||||
@ -758,9 +753,7 @@ export interface IndicesPutAlias<T = any> extends Generic {
|
||||
}
|
||||
|
||||
export interface IndicesPutMapping<T = any> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string;
|
||||
include_type_name?: boolean;
|
||||
index: string | string[];
|
||||
timeout?: string;
|
||||
master_timeout?: string;
|
||||
ignore_unavailable?: boolean;
|
||||
@ -930,7 +923,6 @@ export interface IngestSimulate<T = any> extends Generic {
|
||||
|
||||
export interface Mget<T = any> extends Generic {
|
||||
index?: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
stored_fields?: string | string[];
|
||||
@ -1378,56 +1370,8 @@ export interface CcrUnfollow extends Generic {
|
||||
index: string;
|
||||
}
|
||||
|
||||
export interface DataFrameDeleteDataFrameTransform extends Generic {
|
||||
transform_id: string;
|
||||
force?: boolean;
|
||||
}
|
||||
|
||||
export interface DataFrameGetDataFrameTransform extends Generic {
|
||||
transform_id?: string;
|
||||
from?: number;
|
||||
size?: number;
|
||||
allow_no_match?: boolean;
|
||||
}
|
||||
|
||||
export interface DataFrameGetDataFrameTransformStats extends Generic {
|
||||
transform_id: string;
|
||||
from?: number;
|
||||
size?: number;
|
||||
allow_no_match?: boolean;
|
||||
}
|
||||
|
||||
export interface DataFramePreviewDataFrameTransform<T = any> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface DataFramePutDataFrameTransform<T = any> extends Generic {
|
||||
transform_id: string;
|
||||
defer_validation?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface DataFrameStartDataFrameTransform extends Generic {
|
||||
transform_id: string;
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface DataFrameStopDataFrameTransform extends Generic {
|
||||
transform_id: string;
|
||||
wait_for_completion?: boolean;
|
||||
timeout?: string;
|
||||
allow_no_match?: boolean;
|
||||
}
|
||||
|
||||
export interface DataFrameUpdateDataFrameTransform<T = any> extends Generic {
|
||||
transform_id: string;
|
||||
defer_validation?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface GraphExplore<T = any> extends Generic {
|
||||
index: string | string[];
|
||||
type?: string | string[];
|
||||
routing?: string;
|
||||
timeout?: string;
|
||||
body?: T;
|
||||
@ -2089,6 +2033,53 @@ export interface SqlTranslate<T = any> extends Generic {
|
||||
export interface SslCertificates extends Generic {
|
||||
}
|
||||
|
||||
export interface TransformDeleteTransform extends Generic {
|
||||
transform_id: string;
|
||||
force?: boolean;
|
||||
}
|
||||
|
||||
export interface TransformGetTransform extends Generic {
|
||||
transform_id?: string;
|
||||
from?: number;
|
||||
size?: number;
|
||||
allow_no_match?: boolean;
|
||||
}
|
||||
|
||||
export interface TransformGetTransformStats extends Generic {
|
||||
transform_id: string;
|
||||
from?: number;
|
||||
size?: number;
|
||||
allow_no_match?: boolean;
|
||||
}
|
||||
|
||||
export interface TransformPreviewTransform<T = any> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface TransformPutTransform<T = any> extends Generic {
|
||||
transform_id: string;
|
||||
defer_validation?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface TransformStartTransform extends Generic {
|
||||
transform_id: string;
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface TransformStopTransform extends Generic {
|
||||
transform_id: string;
|
||||
wait_for_completion?: boolean;
|
||||
timeout?: string;
|
||||
allow_no_match?: boolean;
|
||||
}
|
||||
|
||||
export interface TransformUpdateTransform<T = any> extends Generic {
|
||||
transform_id: string;
|
||||
defer_validation?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface WatcherAckWatch extends Generic {
|
||||
watch_id: string;
|
||||
action_id?: string | string[];
|
||||
|
||||
@ -645,7 +645,9 @@ link:{ref}/cat-plugins.html[Reference]
|
||||
client.cat.recovery({
|
||||
index: string | string[],
|
||||
format: string,
|
||||
active_only: boolean,
|
||||
bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
|
||||
detailed: boolean,
|
||||
master_timeout: string,
|
||||
h: string | string[],
|
||||
help: boolean,
|
||||
@ -657,14 +659,20 @@ link:{ref}/cat-recovery.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`index`
|
||||
|`string \| string[]` - A comma-separated list of index names to limit the returned information
|
||||
|`string \| string[]` - Comma-separated list or wildcard expression of index names to limit the returned information
|
||||
|
||||
|`format`
|
||||
|`string` - a short version of the Accept header, e.g. json, yaml
|
||||
|
||||
|`active_only` or `activeOnly`
|
||||
|`boolean` - If `true`, the response only includes ongoing shard recoveries
|
||||
|
||||
|`bytes`
|
||||
|`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values
|
||||
|
||||
|`detailed`
|
||||
|`boolean` - If `true`, the response includes detailed information about shard recoveries
|
||||
|
||||
|`master_timeout` or `masterTimeout`
|
||||
|`string` - Explicit operation timeout for connection to master node
|
||||
|
||||
@ -1703,7 +1711,6 @@ link:{ref}/modules-scripting.html[Reference]
|
||||
client.exists({
|
||||
id: string,
|
||||
index: string,
|
||||
type: string,
|
||||
stored_fields: string | string[],
|
||||
preference: string,
|
||||
realtime: boolean,
|
||||
@ -1725,11 +1732,6 @@ link:{ref}/docs-get.html[Reference]
|
||||
|`index`
|
||||
|`string` - The name of the index
|
||||
|
||||
|`type`
|
||||
|`string` - The type of the document (use `_all` to fetch the first document matching the ID across all types) +
|
||||
|
||||
WARNING: This parameter has been deprecated.
|
||||
|
||||
|`stored_fields` or `storedFields`
|
||||
|`string \| string[]` - A comma-separated list of stored fields to return in the response
|
||||
|
||||
@ -1831,7 +1833,6 @@ WARNING: This parameter has been deprecated.
|
||||
client.explain({
|
||||
id: string,
|
||||
index: string,
|
||||
type: string,
|
||||
analyze_wildcard: boolean,
|
||||
analyzer: string,
|
||||
default_operator: 'AND' | 'OR',
|
||||
@ -1856,11 +1857,6 @@ link:{ref}/search-explain.html[Reference]
|
||||
|`index`
|
||||
|`string` - The name of the index
|
||||
|
||||
|`type`
|
||||
|`string` - The type of the document +
|
||||
|
||||
WARNING: This parameter has been deprecated.
|
||||
|
||||
|`analyze_wildcard` or `analyzeWildcard`
|
||||
|`boolean` - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
|
||||
|
||||
@ -1947,7 +1943,6 @@ _Default:_ `open`
|
||||
client.get({
|
||||
id: string,
|
||||
index: string,
|
||||
type: string,
|
||||
stored_fields: string | string[],
|
||||
preference: string,
|
||||
realtime: boolean,
|
||||
@ -1969,11 +1964,6 @@ link:{ref}/docs-get.html[Reference]
|
||||
|`index`
|
||||
|`string` - The name of the index
|
||||
|
||||
|`type`
|
||||
|`string` - The type of the document (use `_all` to fetch the first document matching the ID across all types) +
|
||||
|
||||
WARNING: This parameter has been deprecated.
|
||||
|
||||
|`stored_fields` or `storedFields`
|
||||
|`string \| string[]` - A comma-separated list of stored fields to return in the response
|
||||
|
||||
@ -2033,7 +2023,6 @@ link:{ref}/modules-scripting.html[Reference]
|
||||
client.getSource({
|
||||
id: string,
|
||||
index: string,
|
||||
type: string,
|
||||
preference: string,
|
||||
realtime: boolean,
|
||||
refresh: boolean,
|
||||
@ -2054,11 +2043,6 @@ link:{ref}/docs-get.html[Reference]
|
||||
|`index`
|
||||
|`string` - The name of the index
|
||||
|
||||
|`type`
|
||||
|`string` - The type of the document; deprecated and optional starting with 7.0 +
|
||||
|
||||
WARNING: This parameter has been deprecated.
|
||||
|
||||
|`preference`
|
||||
|`string` - Specify the node or shard the operation should be performed on (default: random)
|
||||
|
||||
@ -2769,7 +2753,6 @@ _Default:_ `all`
|
||||
client.indices.getFieldMapping({
|
||||
fields: string | string[],
|
||||
index: string | string[],
|
||||
type: string | string[],
|
||||
include_type_name: boolean,
|
||||
include_defaults: boolean,
|
||||
ignore_unavailable: boolean,
|
||||
@ -2787,11 +2770,6 @@ link:{ref}/indices-get-field-mapping.html[Reference]
|
||||
|`index`
|
||||
|`string \| string[]` - A comma-separated list of index names
|
||||
|
||||
|`type`
|
||||
|`string \| string[]` - A comma-separated list of document types +
|
||||
|
||||
WARNING: This parameter has been deprecated.
|
||||
|
||||
|`include_type_name` or `includeTypeName`
|
||||
|`boolean` - Whether a type should be returned in the body of the mappings.
|
||||
|
||||
@ -2819,8 +2797,6 @@ _Default:_ `open`
|
||||
----
|
||||
client.indices.getMapping({
|
||||
index: string | string[],
|
||||
type: string | string[],
|
||||
include_type_name: boolean,
|
||||
ignore_unavailable: boolean,
|
||||
allow_no_indices: boolean,
|
||||
expand_wildcards: 'open' | 'closed' | 'none' | 'all',
|
||||
@ -2834,14 +2810,6 @@ link:{ref}/indices-get-mapping.html[Reference]
|
||||
|`index`
|
||||
|`string \| string[]` - A comma-separated list of index names
|
||||
|
||||
|`type`
|
||||
|`string \| string[]` - A comma-separated list of document types +
|
||||
|
||||
WARNING: This parameter has been deprecated.
|
||||
|
||||
|`include_type_name` or `includeTypeName`
|
||||
|`boolean` - Whether to add the type name to the response (default: false)
|
||||
|
||||
|`ignore_unavailable` or `ignoreUnavailable`
|
||||
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
||||
|
||||
@ -3049,8 +3017,6 @@ link:{ref}/indices-aliases.html[Reference]
|
||||
----
|
||||
client.indices.putMapping({
|
||||
index: string | string[],
|
||||
type: string,
|
||||
include_type_name: boolean,
|
||||
timeout: string,
|
||||
master_timeout: string,
|
||||
ignore_unavailable: boolean,
|
||||
@ -3065,14 +3031,6 @@ link:{ref}/indices-put-mapping.html[Reference]
|
||||
|`index`
|
||||
|`string \| string[]` - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
|
||||
|
||||
|`type`
|
||||
|`string` - The name of the document type +
|
||||
|
||||
WARNING: This parameter has been deprecated.
|
||||
|
||||
|`include_type_name` or `includeTypeName`
|
||||
|`boolean` - Whether a type should be expected in the body of the mappings.
|
||||
|
||||
|`timeout`
|
||||
|`string` - Explicit operation timeout
|
||||
|
||||
@ -3742,7 +3700,6 @@ link:{ref}/simulate-pipeline-api.html[Reference]
|
||||
----
|
||||
client.mget({
|
||||
index: string,
|
||||
type: string,
|
||||
stored_fields: string | string[],
|
||||
preference: string,
|
||||
realtime: boolean,
|
||||
@ -3760,11 +3717,6 @@ link:{ref}/docs-multi-get.html[Reference]
|
||||
|`index`
|
||||
|`string` - The name of the index
|
||||
|
||||
|`type`
|
||||
|`string` - The type of the document +
|
||||
|
||||
WARNING: This parameter has been deprecated.
|
||||
|
||||
|`stored_fields` or `storedFields`
|
||||
|`string \| string[]` - A comma-separated list of stored fields to return in the response
|
||||
|
||||
@ -3790,7 +3742,7 @@ WARNING: This parameter has been deprecated.
|
||||
|`string \| string[]` - A list of fields to extract and return from the _source field
|
||||
|
||||
|`body`
|
||||
|`object` - Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL.
|
||||
|`object` - Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL.
|
||||
|
||||
|===
|
||||
|
||||
@ -5541,201 +5493,12 @@ link:http://www.elastic.co/guide/en/elasticsearch/reference/current[Reference]
|
||||
|
||||
|===
|
||||
|
||||
=== dataFrame.deleteDataFrameTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.dataFrame.deleteDataFrameTransform({
|
||||
transform_id: string,
|
||||
force: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/delete-data-frame-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the transform to delete
|
||||
|
||||
|`force`
|
||||
|`boolean` - When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted.
|
||||
|
||||
|===
|
||||
|
||||
=== dataFrame.getDataFrameTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.dataFrame.getDataFrameTransform({
|
||||
transform_id: string,
|
||||
from: number,
|
||||
size: number,
|
||||
allow_no_match: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/get-data-frame-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms
|
||||
|
||||
|`from`
|
||||
|`number` - skips a number of transform configs, defaults to 0
|
||||
|
||||
|`size`
|
||||
|`number` - specifies a max number of transforms to get, defaults to 100
|
||||
|
||||
|`allow_no_match` or `allowNoMatch`
|
||||
|`boolean` - Whether to ignore if a wildcard expression matches no data frame transforms. (This includes `_all` string or when no data frame transforms have been specified)
|
||||
|
||||
|===
|
||||
|
||||
=== dataFrame.getDataFrameTransformStats
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.dataFrame.getDataFrameTransformStats({
|
||||
transform_id: string,
|
||||
from: number,
|
||||
size: number,
|
||||
allow_no_match: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/get-data-frame-transform-stats.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the transform for which to get stats. '_all' or '*' implies all transforms
|
||||
|
||||
|`from`
|
||||
|`number` - skips a number of transform stats, defaults to 0
|
||||
|
||||
|`size`
|
||||
|`number` - specifies a max number of transform stats to get, defaults to 100
|
||||
|
||||
|`allow_no_match` or `allowNoMatch`
|
||||
|`boolean` - Whether to ignore if a wildcard expression matches no data frame transforms. (This includes `_all` string or when no data frame transforms have been specified)
|
||||
|
||||
|===
|
||||
|
||||
=== dataFrame.previewDataFrameTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.dataFrame.previewDataFrameTransform({
|
||||
body: object
|
||||
})
|
||||
----
|
||||
link:{ref}/preview-data-frame-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`body`
|
||||
|`object` - The definition for the data_frame transform to preview
|
||||
|
||||
|===
|
||||
|
||||
=== dataFrame.putDataFrameTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.dataFrame.putDataFrameTransform({
|
||||
transform_id: string,
|
||||
defer_validation: boolean,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
link:{ref}/put-data-frame-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the new transform.
|
||||
|
||||
|`defer_validation` or `deferValidation`
|
||||
|`boolean` - If validations should be deferred until data frame transform starts, defaults to false.
|
||||
|
||||
|`body`
|
||||
|`object` - The data frame transform definition
|
||||
|
||||
|===
|
||||
|
||||
=== dataFrame.startDataFrameTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.dataFrame.startDataFrameTransform({
|
||||
transform_id: string,
|
||||
timeout: string
|
||||
})
|
||||
----
|
||||
link:{ref}/start-data-frame-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the transform to start
|
||||
|
||||
|`timeout`
|
||||
|`string` - Controls the time to wait for the transform to start
|
||||
|
||||
|===
|
||||
|
||||
=== dataFrame.stopDataFrameTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.dataFrame.stopDataFrameTransform({
|
||||
transform_id: string,
|
||||
wait_for_completion: boolean,
|
||||
timeout: string,
|
||||
allow_no_match: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/stop-data-frame-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the transform to stop
|
||||
|
||||
|`wait_for_completion` or `waitForCompletion`
|
||||
|`boolean` - Whether to wait for the transform to fully stop before returning or not. Default to false
|
||||
|
||||
|`timeout`
|
||||
|`string` - Controls the time to wait until the transform has stopped. Default to 30 seconds
|
||||
|
||||
|`allow_no_match` or `allowNoMatch`
|
||||
|`boolean` - Whether to ignore if a wildcard expression matches no data frame transforms. (This includes `_all` string or when no data frame transforms have been specified)
|
||||
|
||||
|===
|
||||
|
||||
=== dataFrame.updateDataFrameTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.dataFrame.updateDataFrameTransform({
|
||||
transform_id: string,
|
||||
defer_validation: boolean,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
link:{ref}/update-data-frame-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the transform.
|
||||
|
||||
|`defer_validation` or `deferValidation`
|
||||
|`boolean` - If validations should be deferred until data frame transform starts, defaults to false.
|
||||
|
||||
|`body`
|
||||
|`object` - The update data frame transform definition
|
||||
|
||||
|===
|
||||
|
||||
=== graph.explore
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.graph.explore({
|
||||
index: string | string[],
|
||||
type: string | string[],
|
||||
routing: string,
|
||||
timeout: string,
|
||||
body: object
|
||||
@ -5747,11 +5510,6 @@ link:{ref}/graph-explore-api.html[Reference]
|
||||
|`index`
|
||||
|`string \| string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
||||
|
||||
|`type`
|
||||
|`string \| string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types +
|
||||
|
||||
WARNING: This parameter has been deprecated.
|
||||
|
||||
|`routing`
|
||||
|`string` - Specific routing value
|
||||
|
||||
@ -8338,6 +8096,194 @@ client.ssl.certificates()
|
||||
link:{ref}/security-api-ssl.html[Reference]
|
||||
|
||||
|
||||
=== transform.deleteTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.transform.deleteTransform({
|
||||
transform_id: string,
|
||||
force: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/delete-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the transform to delete
|
||||
|
||||
|`force`
|
||||
|`boolean` - When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted.
|
||||
|
||||
|===
|
||||
|
||||
=== transform.getTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.transform.getTransform({
|
||||
transform_id: string,
|
||||
from: number,
|
||||
size: number,
|
||||
allow_no_match: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/get-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms
|
||||
|
||||
|`from`
|
||||
|`number` - skips a number of transform configs, defaults to 0
|
||||
|
||||
|`size`
|
||||
|`number` - specifies a max number of transforms to get, defaults to 100
|
||||
|
||||
|`allow_no_match` or `allowNoMatch`
|
||||
|`boolean` - Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
|
||||
|
||||
|===
|
||||
|
||||
=== transform.getTransformStats
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.transform.getTransformStats({
|
||||
transform_id: string,
|
||||
from: number,
|
||||
size: number,
|
||||
allow_no_match: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/get-transform-stats.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the transform for which to get stats. '_all' or '*' implies all transforms
|
||||
|
||||
|`from`
|
||||
|`number` - skips a number of transform stats, defaults to 0
|
||||
|
||||
|`size`
|
||||
|`number` - specifies a max number of transform stats to get, defaults to 100
|
||||
|
||||
|`allow_no_match` or `allowNoMatch`
|
||||
|`boolean` - Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
|
||||
|
||||
|===
|
||||
|
||||
=== transform.previewTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.transform.previewTransform({
|
||||
body: object
|
||||
})
|
||||
----
|
||||
link:{ref}/preview-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`body`
|
||||
|`object` - The definition for the transform to preview
|
||||
|
||||
|===
|
||||
|
||||
=== transform.putTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.transform.putTransform({
|
||||
transform_id: string,
|
||||
defer_validation: boolean,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
link:{ref}/put-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the new transform.
|
||||
|
||||
|`defer_validation` or `deferValidation`
|
||||
|`boolean` - If validations should be deferred until transform starts, defaults to false.
|
||||
|
||||
|`body`
|
||||
|`object` - The transform definition
|
||||
|
||||
|===
|
||||
|
||||
=== transform.startTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.transform.startTransform({
|
||||
transform_id: string,
|
||||
timeout: string
|
||||
})
|
||||
----
|
||||
link:{ref}/start-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the transform to start
|
||||
|
||||
|`timeout`
|
||||
|`string` - Controls the time to wait for the transform to start
|
||||
|
||||
|===
|
||||
|
||||
=== transform.stopTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.transform.stopTransform({
|
||||
transform_id: string,
|
||||
wait_for_completion: boolean,
|
||||
timeout: string,
|
||||
allow_no_match: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/stop-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the transform to stop
|
||||
|
||||
|`wait_for_completion` or `waitForCompletion`
|
||||
|`boolean` - Whether to wait for the transform to fully stop before returning or not. Default to false
|
||||
|
||||
|`timeout`
|
||||
|`string` - Controls the time to wait until the transform has stopped. Default to 30 seconds
|
||||
|
||||
|`allow_no_match` or `allowNoMatch`
|
||||
|`boolean` - Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
|
||||
|
||||
|===
|
||||
|
||||
=== transform.updateTransform
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.transform.updateTransform({
|
||||
transform_id: string,
|
||||
defer_validation: boolean,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
link:{ref}/update-transform.html[Reference]
|
||||
[cols=2*]
|
||||
|===
|
||||
|`transform_id` or `transformId`
|
||||
|`string` - The id of the transform.
|
||||
|
||||
|`defer_validation` or `deferValidation`
|
||||
|`boolean` - If validations should be deferred until transform starts, defaults to false.
|
||||
|
||||
|`body`
|
||||
|`object` - The update transform definition
|
||||
|
||||
|===
|
||||
|
||||
=== watcher.ackWatch
|
||||
|
||||
[source,ts]
|
||||
|
||||
57
index.d.ts
vendored
57
index.d.ts
vendored
@ -180,38 +180,6 @@ declare class Client extends EventEmitter {
|
||||
}
|
||||
count: ApiMethod<RequestParams.Count>
|
||||
create: ApiMethod<RequestParams.Create>
|
||||
data_frame: {
|
||||
delete_data_frame_transform: ApiMethod<RequestParams.DataFrameDeleteDataFrameTransform>
|
||||
deleteDataFrameTransform: ApiMethod<RequestParams.DataFrameDeleteDataFrameTransform>
|
||||
get_data_frame_transform: ApiMethod<RequestParams.DataFrameGetDataFrameTransform>
|
||||
getDataFrameTransform: ApiMethod<RequestParams.DataFrameGetDataFrameTransform>
|
||||
get_data_frame_transform_stats: ApiMethod<RequestParams.DataFrameGetDataFrameTransformStats>
|
||||
getDataFrameTransformStats: ApiMethod<RequestParams.DataFrameGetDataFrameTransformStats>
|
||||
preview_data_frame_transform: ApiMethod<RequestParams.DataFramePreviewDataFrameTransform>
|
||||
previewDataFrameTransform: ApiMethod<RequestParams.DataFramePreviewDataFrameTransform>
|
||||
put_data_frame_transform: ApiMethod<RequestParams.DataFramePutDataFrameTransform>
|
||||
putDataFrameTransform: ApiMethod<RequestParams.DataFramePutDataFrameTransform>
|
||||
start_data_frame_transform: ApiMethod<RequestParams.DataFrameStartDataFrameTransform>
|
||||
startDataFrameTransform: ApiMethod<RequestParams.DataFrameStartDataFrameTransform>
|
||||
stop_data_frame_transform: ApiMethod<RequestParams.DataFrameStopDataFrameTransform>
|
||||
stopDataFrameTransform: ApiMethod<RequestParams.DataFrameStopDataFrameTransform>
|
||||
}
|
||||
dataFrame: {
|
||||
delete_data_frame_transform: ApiMethod<RequestParams.DataFrameDeleteDataFrameTransform>
|
||||
deleteDataFrameTransform: ApiMethod<RequestParams.DataFrameDeleteDataFrameTransform>
|
||||
get_data_frame_transform: ApiMethod<RequestParams.DataFrameGetDataFrameTransform>
|
||||
getDataFrameTransform: ApiMethod<RequestParams.DataFrameGetDataFrameTransform>
|
||||
get_data_frame_transform_stats: ApiMethod<RequestParams.DataFrameGetDataFrameTransformStats>
|
||||
getDataFrameTransformStats: ApiMethod<RequestParams.DataFrameGetDataFrameTransformStats>
|
||||
preview_data_frame_transform: ApiMethod<RequestParams.DataFramePreviewDataFrameTransform>
|
||||
previewDataFrameTransform: ApiMethod<RequestParams.DataFramePreviewDataFrameTransform>
|
||||
put_data_frame_transform: ApiMethod<RequestParams.DataFramePutDataFrameTransform>
|
||||
putDataFrameTransform: ApiMethod<RequestParams.DataFramePutDataFrameTransform>
|
||||
start_data_frame_transform: ApiMethod<RequestParams.DataFrameStartDataFrameTransform>
|
||||
startDataFrameTransform: ApiMethod<RequestParams.DataFrameStartDataFrameTransform>
|
||||
stop_data_frame_transform: ApiMethod<RequestParams.DataFrameStopDataFrameTransform>
|
||||
stopDataFrameTransform: ApiMethod<RequestParams.DataFrameStopDataFrameTransform>
|
||||
}
|
||||
delete: ApiMethod<RequestParams.Delete>
|
||||
delete_by_query: ApiMethod<RequestParams.DeleteByQuery>
|
||||
deleteByQuery: ApiMethod<RequestParams.DeleteByQuery>
|
||||
@ -257,6 +225,7 @@ declare class Client extends EventEmitter {
|
||||
analyze: ApiMethod<RequestParams.IndicesAnalyze>
|
||||
clear_cache: ApiMethod<RequestParams.IndicesClearCache>
|
||||
clearCache: ApiMethod<RequestParams.IndicesClearCache>
|
||||
clone: ApiMethod<RequestParams.IndicesClone>
|
||||
close: ApiMethod<RequestParams.IndicesClose>
|
||||
create: ApiMethod<RequestParams.IndicesCreate>
|
||||
delete: ApiMethod<RequestParams.IndicesDelete>
|
||||
@ -368,6 +337,8 @@ declare class Client extends EventEmitter {
|
||||
deleteJob: ApiMethod<RequestParams.MlDeleteJob>
|
||||
delete_model_snapshot: ApiMethod<RequestParams.MlDeleteModelSnapshot>
|
||||
deleteModelSnapshot: ApiMethod<RequestParams.MlDeleteModelSnapshot>
|
||||
estimate_memory_usage: ApiMethod<RequestParams.MlEstimateMemoryUsage>
|
||||
estimateMemoryUsage: ApiMethod<RequestParams.MlEstimateMemoryUsage>
|
||||
evaluate_data_frame: ApiMethod<RequestParams.MlEvaluateDataFrame>
|
||||
evaluateDataFrame: ApiMethod<RequestParams.MlEvaluateDataFrame>
|
||||
find_file_structure: ApiMethod<RequestParams.MlFindFileStructure>
|
||||
@ -562,10 +533,14 @@ declare class Client extends EventEmitter {
|
||||
executeLifecycle: ApiMethod<RequestParams.SlmExecuteLifecycle>
|
||||
get_lifecycle: ApiMethod<RequestParams.SlmGetLifecycle>
|
||||
getLifecycle: ApiMethod<RequestParams.SlmGetLifecycle>
|
||||
get_stats: ApiMethod<RequestParams.SlmGetStats>
|
||||
getStats: ApiMethod<RequestParams.SlmGetStats>
|
||||
put_lifecycle: ApiMethod<RequestParams.SlmPutLifecycle>
|
||||
putLifecycle: ApiMethod<RequestParams.SlmPutLifecycle>
|
||||
}
|
||||
snapshot: {
|
||||
cleanup_repository: ApiMethod<RequestParams.SnapshotCleanupRepository>
|
||||
cleanupRepository: ApiMethod<RequestParams.SnapshotCleanupRepository>
|
||||
create: ApiMethod<RequestParams.SnapshotCreate>
|
||||
create_repository: ApiMethod<RequestParams.SnapshotCreateRepository>
|
||||
createRepository: ApiMethod<RequestParams.SnapshotCreateRepository>
|
||||
@ -595,6 +570,24 @@ declare class Client extends EventEmitter {
|
||||
list: ApiMethod<RequestParams.TasksList>
|
||||
}
|
||||
termvectors: ApiMethod<RequestParams.Termvectors>
|
||||
transform: {
|
||||
delete_transform: ApiMethod<RequestParams.TransformDeleteTransform>
|
||||
deleteTransform: ApiMethod<RequestParams.TransformDeleteTransform>
|
||||
get_transform: ApiMethod<RequestParams.TransformGetTransform>
|
||||
getTransform: ApiMethod<RequestParams.TransformGetTransform>
|
||||
get_transform_stats: ApiMethod<RequestParams.TransformGetTransformStats>
|
||||
getTransformStats: ApiMethod<RequestParams.TransformGetTransformStats>
|
||||
preview_transform: ApiMethod<RequestParams.TransformPreviewTransform>
|
||||
previewTransform: ApiMethod<RequestParams.TransformPreviewTransform>
|
||||
put_transform: ApiMethod<RequestParams.TransformPutTransform>
|
||||
putTransform: ApiMethod<RequestParams.TransformPutTransform>
|
||||
start_transform: ApiMethod<RequestParams.TransformStartTransform>
|
||||
startTransform: ApiMethod<RequestParams.TransformStartTransform>
|
||||
stop_transform: ApiMethod<RequestParams.TransformStopTransform>
|
||||
stopTransform: ApiMethod<RequestParams.TransformStopTransform>
|
||||
update_transform: ApiMethod<RequestParams.TransformUpdateTransform>
|
||||
updateTransform: ApiMethod<RequestParams.TransformUpdateTransform>
|
||||
}
|
||||
update: ApiMethod<RequestParams.Update>
|
||||
update_by_query: ApiMethod<RequestParams.UpdateByQuery>
|
||||
updateByQuery: ApiMethod<RequestParams.UpdateByQuery>
|
||||
|
||||
Reference in New Issue
Block a user